@php $statusBadges = [0 => 'bg-light text-dark border', 1 => 'bg-light text-dark border', 2 => 'bg-light text-dark border', 3 => 'bg-light text-dark border', 4 => 'bg-light text-dark border']; $s = (int) $order->status; $statusBadge = $statusBadges[$s] ?? 'bg-light text-dark'; $statusStyles = [ 0 => ['bg' => '#DBEAFE', 'text' => '#3B82F6', 'border' => '#3B82F6'], 1 => ['bg' => '#FFEDD5', 'text' => '#F97316', 'border' => '#F97316'], 2 => ['bg' => '#EDE9FE', 'text' => '#8B5CF6', 'border' => '#8B5CF6'], 3 => ['bg' => '#D1FAE5', 'text' => '#10B981', 'border' => '#10B981'], 4 => ['bg' => '#FEE2E2', 'text' => '#EF4444', 'border' => '#EF4444'], ]; $currentStatusStyle = $statusStyles[$s] ?? ['bg' => '#f8f9fa', 'text' => 'black', 'border' => '#dee2e6']; $typeOrder = (int) ($order->type_order ?? 1); if (!in_array($typeOrder, [1, 2], true)) { $typeOrder = 1; } @endphp
@method('PUT') @csrf