{{-- A refused clock-in — or clock-out — and the way out of it. Mounted once in the app layout, opened by either clock button dispatching `offsite-blocked` with `action` set to which end of the day was turned away. Tone matters here more than in most dialogs: the person reading it is standing somewhere with their phone out, trying to start or end work. So it states what we observed, says what to do about it, and keeps the door open. --}}
@if ($show) @php // How the dialog dresses itself for each refusal. Being in the wrong // place is an amber "please come in"; a device that would not answer // is sky blue, because nobody did anything wrong and it should not // read like a telling-off. Full class strings, so Tailwind sees them. $look = match ($reason) { \App\Exceptions\AttendanceBlockedException::NO_LOCATION, \App\Exceptions\AttendanceBlockedException::IMPRECISE => [ 'icon' => 'map-pin', 'chip' => 'from-sky-400 to-sky-600', 'halo' => 'bg-sky-200/60', ], \App\Exceptions\AttendanceBlockedException::OFF_NETWORK => [ 'icon' => 'building-storefront', 'chip' => 'from-amber-400 to-amber-600', 'halo' => 'bg-amber-200/60', ], default => [ 'icon' => 'map-pin', 'chip' => 'from-amber-400 to-amber-600', 'halo' => 'bg-amber-200/60', ], }; @endphp @endif