{{-- One place that decides how a status looks, so the list and the detail page cannot describe the same job differently. `completed` is amber rather than green on purpose: it means the reader is done and the office has not looked yet. Only `verified` is closed, and only it gets the green. --}} @php $status = $order->workflow_status; $styles = [ 'requested' => ['bg-secondary', 'Requested'], 'accepted' => ['bg-info text-dark', 'Accepted'], 'in_progress' => ['bg-primary', 'In progress'], 'completed' => ['bg-warning text-dark', 'Awaiting verification'], 'verified' => ['bg-success', 'Verified'], 'rejected' => ['bg-danger', 'Sent back'], 'cancelled' => ['bg-dark', 'Cancelled'], ]; [$class, $label] = $styles[$status] ?? ['bg-secondary', ucfirst(str_replace('_', ' ', $status))]; @endphp {{ $label }}