{{ __('Urgent Cases Recipients') }} {{ __(' Here you can show and Manage all urgent cases recipients') }}
@include('components.jstable')
@foreach($recipients as $recipient) @endforeach
Full Name ID Birth Date City Phones National IDs Fund Type Application Date Required Amount Collected Amount Amount status Fund Status Recipient Status All Information Account Status Submit
user avatar
{{ $recipient->first_name }} {{ $recipient->second_name }} {{ $recipient->third_name }} {{ $recipient->last_name }} {{ $recipient->city }} - {{ $recipient->district }}
{{ $recipient->id }} {{ $recipient->birth_date }} {{ $recipient->city }} @forelse($recipient->phoneNumbers as $phone) {{ $phone->phone_number }} @empty No phones @endforelse @forelse($recipient->nationalIds as $nid) {{ $nid->national_id_number }} @empty No IDs @endforelse @forelse($recipient->fundRegistrations as $fund) {{ ucfirst($fund->fund_type) }} @empty No Fund @endforelse @forelse($recipient->fundRegistrations as $fund) {{ $fund->application_date }} @empty No Date @endforelse @forelse($recipient->urgentCases as $urgent) {{ number_format($urgent->required_amount, 2) }} YR @empty No Amount @endforelse @forelse($recipient->urgentCases as $urgent) {{ number_format($urgent->collected_amount, 2) }} YR @empty No Amount @endforelse @foreach($recipient->urgentCases as $urgent) @if($urgent->collected_amount >= $urgent->required_amount) completed @else Not completed @endif @endforeach @forelse($recipient->fundRegistrations as $fund) @switch($fund->fstatus) @case('approved') Approved @break @case('rejected') Rejected @break @case('pending') Pending @break @default {{ $fund->fstatus }} @endswitch @empty No Fund @endforelse @switch($recipient->status) @case('Active') Active @break @case('Canceled') Canceled @break @case('Pending') Pending @break @endswitch @php $statusFormId = 'urgentfunds-status-form-' . $recipient->id; @endphp
{{-- DataTables init is handled globally (resources/js/app.js) --}}
{{ __('Fund Donations') }} {{ __('View and manage individual donations for urgent cases') }}
{{-- --}} @foreach($subDonations as $sub) {{--
@csrf @method('DELETE')
--}} {{-- @csrf @method('PUT')
--}} @endforeach
Sub ID Case ID Recipient Donor Donated Amount Transaction Ref Created AtActions
{{ $sub->sub_id }} {{ $sub->case_id }} @if(optional($sub->urgentCase)->recipient) {{ optional($sub->urgentCase->recipient)->first_name }} {{ optional($sub->urgentCase->recipient)->last_name }} @else @endif @if($sub->donor) {{ $sub->donor->name ?? $sub->donor->email ?? 'Donor #' . $sub->donor->id }} @else Anonymous @endif {{ number_format($sub->donated_amount, 2) }} YR {{ $sub->transaction_reference ?? '-' }} {{ optional($sub->created_at)->format('Y-m-d H:i') ?? '-' }}