@php $role = session('login_role'); $rolePath = $role === 'staff' ? 'staff' : 'student'; $portal = $role === 'staff' ? 'STAFF PORTAL' : 'STUDENT PORTAL'; $patientName = $dependent['full_name'] ?? ($profile['full_name'] ?? '-'); $date = $appointment['appointment_date'] ?? null; $time = $appointment['appointment_time'] ?? null; $status = strtolower($appointment['status'] ?? 'confirmed'); $ref = $date ? 'PKU-' . date('Ymd', strtotime($date)) . '-' . strtoupper(substr($appointment['id'], 0, 4)) : '-'; @endphp Appointment Details - PKU Dental

Appointment Details

{{ now()->format('D, d M Y') }}
← My Appointments

Appointment Details

{{ ucfirst($status) }}
@if(session('error'))
{{ session('error') }}
@endif
REFERENCE NUMBER

{{ $ref }}

Queue No. {{ $appointment['queue_number'] ?? '-' }}
Date {{ $date ? date('d M Y', strtotime($date)) : '-' }}
Time {{ $time ? date('g:i A', strtotime($time)) : '-' }}

Appointment Information

Patient {{ $patientName }}
Treatment {{ $appointment['reason'] ?? 'Dental Check-Up' }}
Room {{ $room['room_name'] ?? '-' }}
Duration 30 – 45 minutes
Notes {{ $appointment['reason'] ?? '-' }}
@if(in_array($status, ['cancelled','cancelled_by_pku']))
Cancelled By PKU Admin
Cancellation Reason {{ $appointment['admin_action_reason'] ?? ($appointment['cancel_reason'] ?? '-') }}
@if(!empty($appointment['cancel_notes']))
Cancellation Notes {{ $appointment['cancel_notes'] }}
@endif
User Response {{ ucfirst(str_replace('_', ' ', $appointment['user_response_type'] ?? 'pending')) }}
@endif

Actions

@if(!in_array($status, ['completed', 'attended'])) Reschedule @if($status !== 'cancelled') Cancel Appointment @endif @else
No action is available for this appointment.
@endif
Cancellation Policy
Cancellation or reschedule is not allowed within 2 hours before appointment time.