@extends('layouts.app') @section('content')
ESS Loan Applications
Member employee loan requests from ESS portal
PENDING

{{ $pendingCount ?? 0 }}

+0 this week
APPROVED

{{ $approvedCount ?? 0 }}

+0 this week
REJECTED

{{ $rejectedCount ?? 0 }}

0 this week
CANCELLED

{{ $cancelledCount ?? 0 }}

0 this week
DISBURSED

{{ $disbursedCount ?? 0 }}

+0 this week
Smart Filters

Quick access to filter options

Quick Filters:
@if(request('search')) @endif
@if(request()->hasAny(['search', 'status', 'date_from', 'date_to']))
Active Filters: @if(request('search')) Search: "{{ request('search') }}" @endif @if(request('status')) Status: {{ ucfirst(str_replace('_', ' ', request('status'))) }} @endif @if(request('date_from')) From: {{ request('date_from') }} @endif @if(request('date_to')) To: {{ request('date_to') }} @endif
@endif

Loan Applications

{{ $loanOffers->count() }} of {{ $loanOffers->total() ?? 0 }} @if(request()->has('status_filter') || request()->has('approval_filter') || request()->has('date_from') || request()->has('date_to')) Filtered @else All Records @endif
{{ $loanOffers->whereIn('approval', ['PENDING', null])->count() }} Pending
{{ $loanOffers->where('approval', 'APPROVED')->count() }} Approved
{{ number_format($loanOffers->sum('requested_amount') / 1000000, 1) }}M Total
@forelse ($loanOffers as $offer) @php $loanData = $offer->toArray(); if ($offer->bank) { $loanData['bank'] = [ 'id' => $offer->bank->id, 'name' => $offer->bank->name, 'short_name' => $offer->bank->short_name, 'swift_code' => $offer->bank->swift_code ]; } else { $loanData['bank'] = null; } @endphp @empty @endforelse
Employee
Salary
Deductible
Requested
Take Home
Employee Bank Tenure Approval Status Actions
{{ $offer->first_name }} {{ $offer->last_name }}
{{ $offer->check_number }}
{{ number_format($offer->basic_salary ?? 0, 0) }}
Net: {{ number_format($offer->net_salary ?? 0, 0) }}
{{ number_format($offer->desired_deductible_amount ?? 0, 0) }}
{{ number_format($offer->requested_amount ?? 0, 0) }}
{{ number_format($offer->take_home_amount ?? $offer->net_loan_amount ?? 0, 0) }}
@if($offer->bank) {{ $offer->bank->short_name ?: $offer->bank->name }} @elseif($offer->swift_code) {{ $offer->swift_code }} @else No bank info @endif @if($offer->tenure) {{ $offer->tenure }} mo @else - @endif @switch($offer->approval) @case('APPROVED') Approved @break @case('REJECTED') Rejected @break @case('CANCELLED') Cancelled @break @case('PENDING') Pending @break @default Pending @endswitch @if($offer->status == 'SUBMITTED_FOR_DISBURSEMENT') Submitted @elseif($offer->status == 'disbursement_pending' || $offer->status == 'DISBURSEMENT_PENDING') Processing @elseif($offer->status == 'disbursed' || $offer->status == 'DISBURSED') Disbursed @elseif($offer->status == 'DISBURSEMENT_FAILED') reason) title="{{ $offer->reason }}" @endif> Failed @elseif($offer->status == 'FULL_SETTLED' || $offer->status == 'SETTLED') Settled @elseif($offer->status == 'CANCELLED') Cancelled @else {{ $offer->status ?: 'New' }} @endif
@php $isCancelled = in_array(strtoupper($offer->status ?? ''), ['CANCELLED', 'CANCELED']) || in_array(strtoupper($offer->state ?? ''), ['CANCELLED', 'CANCELED', 'LOAN_CANCELLATION']); @endphp @if($isCancelled) Cancelled @else @if($offer->approval !== 'APPROVED' && $offer->status !== 'disbursed') @endif @if($offer->approval !== 'REJECTED' && $offer->status !== 'disbursed') @endif @endif
No Loan Applications Found

Start by syncing data from ESS or adjusting your filters

@if($loanOffers->hasPages()) @endif
Loading...

Processing your request...

@endsection @push('styles') @endpush @push('scripts') @endpush