@extends('layouts.app') @section('title', 'Queue & Appointments') @section('content')

Front-office flow control

Live Queue & Appointments

Manage arrival tokens, counter flow and upcoming customer bookings.

@if(auth()->user()->hasPermission('appointments.manage'))@endif @if(auth()->user()->hasPermission('queue.manage'))@endif
W

Waiting

{{ $queueCounts['waiting'] ?? 0 }}

Customers in today's queue

C

Called / At Counter

{{ ($queueCounts['called'] ?? 0) + ($queueCounts['at_counter'] ?? 0) }}

Currently being served

Completed Today

{{ $queueCounts['completed'] ?? 0 }}

Finished counter visits

M

Average Wait

{{ $averageWaitMinutes }}m

Based on called tokens

@if(auth()->user()->hasPermission('queue.manage'))

Issue Queue Token

No sensitive customer details appear on public displays.

@csrf
@endif @if(auth()->user()->hasPermission('appointments.manage'))

Book Appointment

Schedule by branch, customer and service.

@csrf
@endif

Live Queue Board

Operational staff view for {{ today()->format('d M Y') }}.

Updating
@forelse($tokens as $token)
{{ $token->token_number }}{{ str($token->status)->replace('_',' ')->title() }}

{{ $token->customer?->full_name_en ?? 'Walk-in customer' }}

{{ str($token->service_type)->title() }} · {{ $token->counter?->name ?? 'Counter pending' }}

Waiting {{ $token->created_at->diffForHumans(['parts'=>1]) }}

@if(auth()->user()->hasPermission('queue.manage'))
@foreach(['called'=>'Call','at_counter'=>'Serve','completed'=>'Complete','no_show'=>'No show'] as $status=>$label)@php($allowed = ($token->status==='waiting' && in_array($status,['called','no_show'])) || ($token->status==='called' && in_array($status,['at_counter','no_show'])) || ($token->status==='at_counter' && $status==='completed') || ($token->status==='no_show' && $status==='called'))@if($allowed)
@csrf
@endif @endforeach
@endif
@empty
QThe live queue is clear

Issue a token when the next customer arrives.

@endforelse

Upcoming Appointments

Confirmed and booked visits for the next 14 days.

{{ $appointments->count() }} scheduled
@forelse($appointments as $appointment)@empty@endforelse
ReferenceDate & TimeCustomerService / BranchAssigned StaffStatus / Action
{{ $appointment->reference_number ?: '#'.$appointment->id }}{{ $appointment->duration_minutes }} minutes{{ $appointment->appointment_date->format('d M Y') }}{{ date('h:i A', strtotime($appointment->appointment_time)) }}{{ $appointment->customer?->full_name_en }}{{ $appointment->customer?->customer_code }}{{ $appointment->service?->name_en ?? 'General consultation' }}{{ $appointment->branch?->name }}{{ $appointment->assignedUser?->name ?? 'Unassigned' }}@if(auth()->user()->hasPermission('appointments.manage') && !in_array($appointment->status,['completed','cancelled','no_show']))
@csrf
@else{{ str($appointment->status)->replace('_',' ')->title() }}@endif
ANo upcoming appointments

Book customer visits to coordinate staff and counters.

@endsection