@php $appointments = $appointments ?? []; @endphp Booking Management

Booking Management

{{ now()->format('D, d M Y') }}
@if(session('success'))
{{ session('success') }}
@endif

Booking Management

All scheduled appointments

@if(count($appointments) > 0) @foreach($appointments as $appt) @php $patient = $appt['patient'] ?? []; $room = $appt['room'] ?? []; $queue = $appt['queue'] ?? []; $queueNumber = $queue['queue_number'] ?? ($appt['queue_number'] ?? '-'); $status = strtolower($appt['status'] ?? 'pending'); @endphp @endforeach
Ref Patient ID Treatment Room Date Time Queue Status Action
{{ $appt['reference_no'] ?? 'PKU-' . substr($appt['id'] ?? '', 0, 8) }} {{ $patient['full_name'] ?? 'Unknown Patient' }} {{ $patient['email'] ?? '-' }} {{ $patient['upsi_id'] ?? '-' }} {{ $appt['reason'] ?? 'Dental Check-Up' }} {{ $room['room_name'] ?? '-' }} {{ !empty($appt['appointment_date']) ? date('d M Y', strtotime($appt['appointment_date'])) : '-' }} {{ !empty($appt['appointment_time']) ? date('g:i A', strtotime($appt['appointment_time'])) : '-' }} {{ $queueNumber }} {{ ucwords(str_replace('_', ' ', $status)) }} View
@else
No booking records found.
@endif