@if(auth()->check() && auth()->user()->role === 'medicalCouncil')
{{ $recipient->first_name }} {{ $recipient->second_name }} {{ $recipient->third_name }} {{ $recipient->last_name }}
{{ $recipient->city }} - {{ $recipient->district }}
{{ __('Recipient ID') }}: {{ $recipient->id }} @php $age = null; try { $age = $recipient->birth_date ? \Carbon\Carbon::parse($recipient->birth_date)->age : null; } catch (Throwable $e) { $age = null; } @endphp {{ __('Age') }}: {{ $age ?? '—' }} {{ __('Status') }}: {{ $recipient->status }}
{{ __('Medical Description') }}
{{ $recipient->description ?: '—' }}
{{ __('Fund & Appointment') }}
@forelse($recipient->fundRegistrations as $fund)
{{ __('Type') }}: {{ ucfirst($fund->fund_type) }}
{{ __('Application Date') }}: {{ $fund->application_date ?? $fund->created_at }}
@if($fund->medical_council_appointment_at)
{{ __('Appointment') }}: {{ $fund->medical_council_appointment_at->format('Y-m-d H:i') }}
{{ __('Location') }}: {{ $fund->medical_council_appointment_location ?: '—' }}
@endif @if($fund->initial_review_notes)
{{ __('Initial Review Notes') }}:
{{ $fund->initial_review_notes }}
@endif
{{ $fund->fstatus }}
@empty
{{ __('No Fund Registrations') }}
@endforelse
{{ __('Documents') }}
{{ __('Click to open') }}
@forelse($recipient->documents as $doc) @php $docPath = $doc->document ? asset('storage/' . $doc->document) : null; $docExt = $doc->document ? strtolower(pathinfo($doc->document, PATHINFO_EXTENSION)) : null; $isPdf = $docExt === 'pdf'; @endphp @if($docPath) @if($isPdf)
PDF
@else Document @endif @else
@endif
{{ __('Document') }}
@empty
{{ __('No documents') }}
@endforelse
@else
{{ $recipient->first_name }} {{ $recipient->second_name }} {{ $recipient->third_name }} {{ $recipient->last_name }}
{{ $recipient->city }} - {{ $recipient->district }}
ID: {{ $recipient->id }} {{ __('Birth Date') }}: {{ $recipient->birth_date }} {{ __('Status') }}: {{ $recipient->status }}
@if(auth()->check() && auth()->user()->role === 'medicalCouncil') @endif
Medical Description
{{ $recipient->description ?: '—' }}
Phones
@forelse($recipient->phoneNumbers as $phone)
{{ $phone->phone_number }}
@empty
No phones
@endforelse
Fund Registrations
@forelse($recipient->fundRegistrations as $fund)
Type: {{ ucfirst($fund->fund_type) }}
Date: {{ $fund->application_date ?? $fund->created_at }}
@if($fund->medical_council_appointment_at)
Medical council appointment: {{ $fund->medical_council_appointment_at->format('Y-m-d H:i') }}
@if($fund->medical_council_appointment_location)
Location: {{ $fund->medical_council_appointment_location }}
@endif
@endif @if($fund->fstatus === 'rejected' && $fund->rejection_reason)
Rejection reason: {{ $fund->rejection_reason }}
@endif @if($fund->initial_reviewed_at)
Initial reviewed at: {{ $fund->initial_reviewed_at->format('Y-m-d H:i') }}
@endif
{{ $fund->fstatus }}
@if(auth()->check() && in_array(auth()->user()->role, ['admin', 'superadmin'], true) && !(($context ?? null) === 'chronic' && ($fund->fund_type ?? null) === 'urgent')) Decision @endif
@empty
No Fund Registrations
@endforelse
National IDs
@forelse($recipient->nationalIds as $nid)
ID Number: {{ $nid->national_id_number }}
Front
@if($nid->front_image) Front ID @else
No image
@endif
Back
@if($nid->back_image) Back ID @else
No image
@endif
Selfie with ID
@if($nid->selfie_with_id_image) Selfie with ID @else
No image
@endif
@empty
No National IDs
@endforelse
Documents
@forelse($recipient->documents as $doc) @php $docPath = $doc->document ? asset('storage/' . $doc->document) : null; $docExt = $doc->document ? strtolower(pathinfo($doc->document, PATHINFO_EXTENSION)) : null; $isPdf = $docExt === 'pdf'; @endphp @if($docPath) @if($isPdf)
PDF
@else Document @endif
@else
@endif @empty
No documents
@endforelse
Urgent Cases
@forelse($recipient->urgentCases as $case)
{{ $case->case_description }}
Required: {{ $case->required_amount }}
Collected: {{ $case->collected_amount }}
Status: {{ $case->status }}
Hospital: {{ $case->hospital?->hospital_name ?? '—' }}
Hospital submitted: {{ $case->hospital_submitted_at?->format('Y-m-d H:i') ?? '—' }}
RFQ: @if($case->RFQ) View @else — @endif
Document: @if($case->document) View @else — @endif
@if($case->hospital_notes)
Hospital notes: {{ $case->hospital_notes }}
@endif @if($case->reasoun_for_rejection)
Reason: {{ $case->reasoun_for_rejection }}
@endif
@empty
No Urgent Cases
@endforelse
@endif