@php $specialtyLabel = $specialtyLabel ?? null; $specialtyDepartmentMap = $specialtyDepartmentMap ?? []; @endphp
@if ($canManageQueue) Walk-in @if (app(\App\Services\Care\CarePermissions::class)->can( auth()->user() ? app(\App\Services\Care\OrganizationResolver::class)->memberFor(auth()->user()) : null, 'devices.view' )) Add kiosk Add display @endif @if (app(\App\Services\Care\CarePermissions::class)->can( auth()->user() ? app(\App\Services\Care\OrganizationResolver::class)->memberFor(auth()->user()) : null, 'displays.view' )) Displays @endif @endif @include('care.partials.queue-board', [ 'queue' => $queue, 'inConsultation' => $inConsultation, 'done' => $done ?? collect(), 'queueIntegration' => $queueIntegration ?? null, 'branchId' => $branchId, 'canConsult' => $canConsult, 'lockToPractitioner' => $lockToPractitioner ?? false, 'canSwitchBranch' => $canSwitchBranch ?? false, 'branches' => $branches ?? collect(), 'practitioners' => $practitioners ?? collect(), 'practitionerId' => $practitionerId ?? null, 'queueCallNextRoute' => 'care.queue.call-next', 'queueCallNextParams' => array_filter(['practitioner_id' => $practitionerId]), 'startRouteName' => 'care.queue.start', 'inCareLabel' => $specialtyLabel ? 'In care' : 'In consultation', 'openInCareUrl' => function ($appointment) use ($specialtyDepartmentMap) { $deptId = (int) ($appointment->department_id ?? 0); $module = $deptId > 0 ? ($specialtyDepartmentMap[$deptId] ?? null) : null; if ($module && $appointment->visit) { return route('care.specialty.workspace', [ 'module' => $module, 'visit' => $appointment->visit, ]); } return $appointment->consultation ? route('care.consultations.show', $appointment->consultation) : null; }, ])