@if (!$isLoaded)
Loading...

Loading patients...

@else

Patient Management Total Patients: {{ $patients->total() ?? 0 }}

@forelse ($patients as $association) @php $user = $association->patient; $doctor = $association->doctor; $profileImage = $user->patient?->profile_image; @endphp @empty @endforelse
Name {!! $sortField === 'name' ? ($sortDirection === 'asc' ? '↑' : '↓') : '' !!} Email {!! $sortField === 'email' ? ($sortDirection === 'asc' ? '↑' : '↓') : '' !!} Assigned Doctor Status {!! $sortField === 'status' ? ($sortDirection === 'asc' ? '↑' : '↓') : '' !!} Approval Status {!! $sortField === 'approval_status' ? ($sortDirection === 'asc' ? '↑' : '↓') : '' !!}
{{ $user->email }} {{ $doctor ? $doctor->name : 'N/A' }} {{ ucfirst($association?->status ?? 'Inactive') }}
{{ ucfirst($association?->approval_status ?? 'Pending') }}
No patients found.
{{-- Pagination --}} @endif