Queue Management

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

Queue Management

Live queue control across all rooms

@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
Total In Queue

{{ $totalInQueue }}

All rooms combined

Currently Serving

{{ $currentlyServing }}

One per room

Completed Today

{{ $completedToday }}

Done queues

Average Wait

Across all rooms

@forelse($roomQueues as $roomId => $data) @php $room = $data['room']; $active = $data['active']; $queues = $data['queues']; $doctorName = $room['doctor_name'] ?? 'Doctor not assigned'; $nextWaiting = null; foreach ($queues as $candidate) { if (($candidate['status'] ?? 'waiting') === 'waiting') { $nextWaiting = $candidate; break; } } @endphp

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

{{ $room['room_type'] ?? 'General Dentistry' }}

{{ $doctorName }}
Now Serving {{ $active['queue_number'] ?? '-' }} Next: {{ $nextWaiting['queue_number'] ?? '-' }}
@csrf
@forelse($queues as $q) @php $patient = $q['patient'] ?? []; $status = $q['status'] ?? 'waiting'; @endphp
{{ $q['queue_number'] ?? '-' }}
{{ $patient['full_name'] ?? 'Unknown Patient' }}
@if($status === 'active')
@csrf
@csrf
@endif
{{ ucfirst(str_replace('_',' ', $status)) }}
@empty
No queue for this room.
@endforelse
@empty
No rooms found.
@endforelse