@php $todayCount = count($appointmentsToday ?? []); $cancelCount = count($pendingCancellations ?? []); $walkInCount = count($walkInsToday ?? []); $roomCount = count($rooms ?? []); @endphp Admin Dashboard

Admin Dashboard

{{ now()->format('l, d F Y') }}

{{ now()->format('D, d M Y') }}
🔔

Room Status

Manage
@forelse($rooms ?? [] as $room)

{{ $room['room_name'] ?? 'Room' }}

{{ $room['patient_category'] ?? 'Dental Room' }}

{{ ($room['is_active'] ?? true) ? 'Open' : 'Closed' }}
Serving {{ $room['serving_queue'] ?? '-' }}
Waiting {{ $room['waiting_count'] ?? 0 }}
@empty
No active rooms found.
@endforelse

Today’s Schedule ({{ $todayCount }})

View all
@if(count($appointmentsToday ?? []) > 0) @foreach($appointmentsToday as $appt) @php $status = strtolower($appt['status'] ?? 'pending'); $roomText = $appt['room']['room_name'] ?? (!empty($appt['room_id']) ? substr($appt['room_id'], 0, 6) : '-'); $patientText = $appt['patient']['upsi_id'] ?? substr($appt['user_id'] ?? '-', 0, 8); @endphp @endforeach
Time Patient ID Treatment Room Status
{{ !empty($appt['appointment_time']) ? date('g:i A', strtotime($appt['appointment_time'])) : '-' }} {{ $patientText }} {{ $appt['reason'] ?? 'Dental Check-Up' }} {{ $roomText }} {{ ucwords(str_replace('_', ' ', $status)) }}
@else
No appointments scheduled for today.
@endif