Deploy Ladill Care / deploy (push) Successful in 53s
Remove the standalone Service Queues nav so call-next/now-serving lives on clinical queue, appointments, pharmacy, lab, and specialty surfaces; Pro orgs can activate dentistry and related modules with branch departments and queue stubs. Co-authored-by: Cursor <cursoragent@cursor.com>
85 lines
4.9 KiB
PHP
85 lines
4.9 KiB
PHP
<x-app-layout title="Queue">
|
|
<div class="space-y-6">
|
|
<x-care.page-hero
|
|
badge="Waiting room · Consultations · Walk-ins"
|
|
title="Patient queue"
|
|
description="See who is waiting, start consultations, and keep patient flow moving across your branch."
|
|
:stats="[
|
|
['value' => number_format($heroStats['waiting']), 'label' => 'Waiting'],
|
|
['value' => number_format($heroStats['in_consultation']), 'label' => 'In consultation'],
|
|
['value' => number_format($heroStats['today']), 'label' => 'Today'],
|
|
]">
|
|
@if ($canManageQueue)
|
|
<x-slot name="actions">
|
|
<a href="{{ route('care.appointments.walk-in.create') }}" class="btn-primary">Walk-in</a>
|
|
</x-slot>
|
|
@endif
|
|
</x-care.page-hero>
|
|
|
|
<form method="GET" class="flex flex-wrap gap-3 rounded-2xl border border-slate-200 bg-white p-4">
|
|
<select name="branch_id" class="rounded-lg border-slate-300 text-sm" onchange="this.form.submit()">
|
|
@foreach ($branches as $branch)
|
|
<option value="{{ $branch->id }}" @selected($branchId == $branch->id)>{{ $branch->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
<select name="practitioner_id" class="rounded-lg border-slate-300 text-sm">
|
|
<option value="">All practitioners</option>
|
|
@foreach ($practitioners as $practitioner)
|
|
<option value="{{ $practitioner->id }}" @selected($practitionerId == $practitioner->id)>{{ $practitioner->name }}</option>
|
|
@endforeach
|
|
</select>
|
|
<button type="submit" class="btn-primary">Filter</button>
|
|
</form>
|
|
|
|
<div class="grid gap-6 lg:grid-cols-2">
|
|
<section class="rounded-2xl border border-slate-200 bg-white p-6">
|
|
<h2 class="text-sm font-semibold uppercase tracking-wide text-slate-500">Waiting ({{ $queue->count() }})</h2>
|
|
<div class="mt-4 space-y-3">
|
|
@forelse ($queue as $appointment)
|
|
<div class="flex items-center justify-between rounded-xl border border-slate-100 bg-slate-50 p-4">
|
|
<div>
|
|
<p class="font-medium text-slate-900">
|
|
@if ($appointment->queue_position)
|
|
<span class="mr-2 inline-flex h-6 w-6 items-center justify-center rounded-full bg-sky-100 text-xs font-bold text-sky-700">{{ $appointment->queue_position }}</span>
|
|
@endif
|
|
{{ $appointment->patient->fullName() }}
|
|
</p>
|
|
<p class="text-xs text-slate-500">{{ $appointment->patient->patient_number }} · {{ $appointment->reason ?? '—' }}</p>
|
|
</div>
|
|
@if ($canConsult)
|
|
<form method="POST" action="{{ route('care.queue.start', $appointment) }}">
|
|
@csrf
|
|
<button type="submit" class="rounded-lg bg-sky-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-sky-700">Start</button>
|
|
</form>
|
|
@endif
|
|
</div>
|
|
@empty
|
|
<p class="text-sm text-slate-500">No patients waiting.</p>
|
|
@endforelse
|
|
</div>
|
|
</section>
|
|
|
|
<section class="rounded-2xl border border-slate-200 bg-white p-6">
|
|
<h2 class="text-sm font-semibold uppercase tracking-wide text-slate-500">In consultation ({{ $inConsultation->count() }})</h2>
|
|
<div class="mt-4 space-y-3">
|
|
@forelse ($inConsultation as $appointment)
|
|
<div class="flex items-center justify-between rounded-xl border border-emerald-100 bg-emerald-50 p-4">
|
|
<div>
|
|
<p class="font-medium text-slate-900">{{ $appointment->patient->fullName() }}</p>
|
|
<p class="text-xs text-slate-500">{{ $appointment->practitioner?->name ?? 'Unassigned' }}</p>
|
|
</div>
|
|
@if ($appointment->consultation)
|
|
<a href="{{ route('care.consultations.show', $appointment->consultation) }}" class="text-sm text-sky-600 hover:text-sky-700">Open</a>
|
|
@endif
|
|
</div>
|
|
@empty
|
|
<p class="text-sm text-slate-500">No active consultations.</p>
|
|
@endforelse
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
@include('care.service-queues._panel')
|
|
</div>
|
|
</x-app-layout>
|