@extends('layouts.app') @section('content')
{{ __('loans.cards.total_loans') }}
{{ __('loans.cards.active') }}
{{ __('loans.cards.pending') }}
{{ __('loans.cards.paid') }}
{{ __('loans.stats.payments_this_month') }}
{{ __('loans.stats.payments_this_year') }}
{{ __('loans.stats.deductions_this_month') }}
{{ __('loans.stats.deductions_this_year') }}
| {{ __('loans.table.id') }} | {{ __('loans.table.employee_name') }} | {{ __('loans.table.type') }} | {{ __('loans.table.amount_requested') }} | {{ __('loans.table.amount_paid') }} | {{ __('loans.table.remaining') }} | {{ __('loans.table.installments_count') }} | {{ __('loans.table.installment_amount') }} | {{ __('loans.table.request_date') }} | {{ __('loans.table.status') }} | {{ __('loans.table.actions') }} |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $loan->id }} |
@if(isset($loan->employee) && $loan->employee->photo)
{{ isset($loan->employee) ? substr($loan->employee->name ?? '', 0, 1) : '?' }}
@endif
{{ $loan->employee->name ?? __('loans.not_specified') }} |
@switch($loan->loan_type ?? '') @case('personal') {{ __('loans.type_labels.personal') }} @break @case('housing') {{ __('loans.type_labels.housing') }} @break @case('car') {{ __('loans.type_labels.car') }} @break @case('emergency') {{ __('loans.type_labels.emergency') }} @break @case('education') {{ __('loans.type_labels.education') }} @break @default {{ $loan->loan_type ? __('loans.type_labels.' . $loan->loan_type) : __('loans.not_specified') }} @endswitch | {{ number_format($loan->amount ?? 0, 2) }} {{ $currency_name ?? 'د.ك' }} | {{ number_format($loan->paid_amount ?? 0, 2) }} {{ $currency_name ?? 'د.ك' }} | {{ number_format($loan->remaining_amount ?? $loan->amount ?? 0, 2) }} {{ $currency_name ?? 'د.ك' }} | {{ $loan->installment_count ?? 0 }} | {{ number_format($loan->installment_amount ?? 0, 2) }} {{ $currency_name ?? 'د.ك' }} | {{ $loan->created_at ? $loan->created_at->format('Y-m-d') : __('loans.not_specified') }} | @if(($loan->status ?? '') == 'pending') {{ __('loans.status.pending') }} @elseif(($loan->status ?? '') == 'approved') {{ __('loans.status.approved') }} @elseif(($loan->status ?? '') == 'active') {{ __('loans.status.active') }} @elseif(($loan->status ?? '') == 'rejected') {{ __('loans.status.rejected') }} @elseif(($loan->status ?? '') == 'paid') {{ __('loans.status.paid') }} @elseif(($loan->status ?? '') == 'cancelled') {{ __('loans.status.cancelled') }} @else {{ __('loans.status.unknown') }} @endif |
@can('view', $loan)
@endcan
@if(($loan->status ?? '') == 'pending')
@can('approve', $loan)
@endcan
@can('approve', $loan)
@endcan
@endif
@if(($loan->status ?? '') == 'approved')
@can('activate', $loan)
@endcan
@endif
@if(in_array($loan->status ?? '', ['active', 'approved']))
@can('cancel', $loan)
@endcan
@endif
@can('update', $loan)
@if(in_array($loan->status ?? '', ['pending', 'approved']))
@endif
@endcan
@can('delete', $loan)
@if(in_array($loan->status ?? '', ['pending', 'rejected', 'cancelled']))
@endif
@endcan
@if(($loan->status ?? '') == 'active' && ($loan->remaining_amount ?? $loan->amount ?? 0) > 0)
@can('pay', $loan)
@endcan
@endif
|
{{ __('loans.empty.title') }}{{ __('loans.empty.subtitle') }} @can('create', \App\Models\Loan::class) {{ __('loans.buttons.create') }} @endcan |
||||||||||
| النشاط | الموظف | نوع القرض | المبلغ | الحالة | التاريخ |
|---|---|---|---|---|---|
| طلب قرض جديد | أحمد محمد | شخصي | 1000.00 {{ $currency_name ?? 'د.ك' }} | قيد المراجعة | 2025-08-23 |
| موافقة على قرض | مدير المالية | سكن | 5000.00 {{ $currency_name ?? 'د.ك' }} | موافق عليه | 2025-08-22 |
| دفع قسط | سارة علي | سيارة | 200.00 {{ $currency_name ?? 'د.ك' }} | مدفوع | 2025-08-21 |