@php $colorFor = function ($status) { return match ($status) { 'success' => 'green', 'partial' => 'yellow', 'expired' => '#888', 'skipped_past' => '#888', 'none' => '#666', default => 'red', }; }; $detailColor = function ($status) { return match ($status) { 'success' => 'green', 'failed' => 'red', 'expired', 'skipped_past' => '#888', default => 'orange', }; }; // Unifi-only properties keep a permanently-'unsent' Sciener row per // booking (LockID null), so the Sciener circle would always show red — // hide it and let the Unifi status stand alone. $hideSciener = $hideSciener ?? false; $scienerStatus = $booking['status'] ?? 'failed'; $scienerColor = $colorFor($scienerStatus); $scienerDetails = $booking['status_details'] ?? []; $unifiStatus = $booking['unifi_status'] ?? 'none'; $unifiColor = $colorFor($unifiStatus); $unifiDetails = $booking['unifi_status_details'] ?? []; @endphp