Queue Management
Live queue control across all rooms
{{ 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
@empty
{{ $room['room_name'] ?? 'Dental Room' }}
{{ $room['room_type'] ?? 'General Dentistry' }}
{{ $doctorName }}
Now Serving
{{ $active['queue_number'] ?? '-' }}
Next: {{ $nextWaiting['queue_number'] ?? '-' }}
@forelse($queues as $q)
@php
$patient = $q['patient'] ?? [];
$status = $q['status'] ?? 'waiting';
@endphp
@endif
@empty
{{ $q['queue_number'] ?? '-' }}
{{ $patient['full_name'] ?? 'Unknown Patient' }}
@if($status === 'active')
{{ ucfirst(str_replace('_',' ', $status)) }}
No queue for this room.
@endforelse
No rooms found.
@endforelse