@php $counter = $state['counter'] ?? []; $current = $state['current_ticket'] ?? null; $queues = $state['queues'] ?? []; $waiting = $state['waiting_by_queue'] ?? []; $transferQueues = collect($state['transfer_queues'] ?? []); $handoffQueues = $transferQueues ->filter(fn ($q) => ($q['uuid'] ?? '') !== ($current['queue']['uuid'] ?? '')) ->values(); $statusLabel = match ($current['status'] ?? null) { 'called' => 'Called', 'serving' => 'Serving', 'on_hold' => 'On hold', default => $current['status'] ?? null, }; @endphp
← Patient queue

{{ $counter['name'] ?? 'Counter' }}

{{ $counter['branch'] ?? '' }} · Ladill Queue console

@if (! empty($counter['status'])) {{ $counter['status'] }} @endif
@csrf
@csrf
@if (session('success'))

{{ session('success') }}

@endif @if (session('error'))

{{ session('error') }}

@endif @if ($current)

Current customer

{{ $current['ticket_number'] }}

{{ $current['queue']['name'] ?? '' }}

{{ $current['customer_name'] ?? 'Walk-in customer' }}

@if ($statusLabel) {{ $statusLabel }} @endif
@foreach ([ 'recall' => ['Recall', 'btn-secondary'], 'start' => ['Start serving', 'btn-primary'], 'hold' => ['Hold', 'btn-secondary'], 'skip' => ['Skip', 'btn-secondary'], 'complete' => ['Complete', 'btn-primary'], 'no_show' => ['No show', 'btn-secondary'], ] as $action => [$label, $btnClass])
@csrf
@endforeach
@if ($handoffQueues->isNotEmpty())
@csrf

Hand off to another queue

Sends this patient to the next service while keeping ticket {{ $current['ticket_number'] }}.

@endif
@else

No active customer

Call the next waiting ticket from a queue below.

@endif
@foreach ($queues as $queue) @php $waitingTickets = $waiting[$queue['uuid']] ?? []; @endphp

{{ $queue['name'] }}

{{ count($waitingTickets) }} waiting

@csrf
    @forelse ($waitingTickets as $ticket)
  • {{ $ticket['ticket_number'] }} {{ $ticket['customer_name'] ?? 'Walk-in' }}
  • @empty
  • Queue is empty
  • @endforelse
@endforeach