{{-- Alur Status --}} @php $statusFlow = [ 'pending' => ['label'=>'Menunggu', 'icon'=>'fa-clock', 'color'=>'#F59E0B'], 'confirmed' => ['label'=>'Terkonfirmasi', 'icon'=>'fa-circle-check', 'color'=>'#3B82F6'], 'check_in' => ['label'=>'Check In', 'icon'=>'fa-door-open', 'color'=>'#8B5CF6'], 'in_process' => ['label'=>'Sedang Dicuci', 'icon'=>'fa-soap', 'color'=>'#06B6D4'], 'completed' => ['label'=>'Selesai', 'icon'=>'fa-flag-checkered', 'color'=>'#22C55E'], 'late' => ['label'=>'Antrian Manual', 'icon'=>'fa-clock-rotate-left','color'=>'#F97316'], 'void' => ['label'=>'Hangus', 'icon'=>'fa-ban', 'color'=>'#EF4444'], 'cancelled' => ['label'=>'Dibatalkan', 'icon'=>'fa-xmark-circle', 'color'=>'#94A3B8'], ]; $current = $booking->status; $mainFlow = ['pending','confirmed','check_in','in_process','completed']; @endphp {{-- Status Progress Bar (only for main flow) --}} @if(in_array($current, $mainFlow))
Alur Status Booking
@foreach($mainFlow as $i => $s) @php $sf = $statusFlow[$s]; $isActive = $s === $current; $isDone = array_search($current, $mainFlow) > $i; $isVoid = in_array($current, ['late','void','cancelled']); @endphp
{{ $sf['label'] }}
@if(!$loop->last)
@endif
@endforeach
@if(in_array($current, ['late','void']))
{{ $statusFlow[$current]['label'] }}
@endif
@endif
{{-- Detail Booking --}}
Kode Booking
{{ $booking->booking_code }}
@php $b=$booking->status_badge; @endphp {{ $b['label'] }}
Customer
{{ $booking->user->name }}
{{ $booking->user->phone ?? $booking->user->email }}
Paket
{{ $booking->service->name }}
Durasi: {{ $booking->service->formatted_duration }}
Tanggal
{{ $booking->schedule->date->locale('id')->isoFormat('D MMMM Y') }}
Jam
{{ substr($booking->schedule->time_slot,0,5) }} WIB
Nomor Antrian
#{{ str_pad($booking->queue_number,2,'0',STR_PAD_LEFT) }}
Harga
{{ $booking->formatted_price }}
Kendaraan
{{ $booking->vehicle_type }}
Plat Nomor
{{ $booking->vehicle_plate }}
@if($booking->vehicle_color)
Warna
{{ $booking->vehicle_color }}
@endif @if($booking->detailer)
Petugas Cuci
{{ $booking->detailer->name }}
@endif @if($booking->notes)
Catatan
{{ $booking->notes }}
@endif @if($booking->checked_in_at)
Check-In
{{ $booking->checked_in_at->format('d M Y, H:i') }}
@endif @if($booking->completed_at)
Selesai
{{ $booking->completed_at->format('d M Y, H:i') }}
@endif
{{-- ══ ACTION PANEL ════════════════════════════════════ --}}
Aksi Admin
{{-- CHECK-IN BUTTON — hanya jika status confirmed --}} @if($booking->status === 'confirmed')
Check-In Customer

Tekan tombol ini saat customer tiba secara fisik di lokasi. Sistem akan otomatis menentukan status berdasarkan keterlambatan:

≤ 15 menit → Check In
> 15 menit → Antrian Manual
Melewati durasi → Hangus
@csrf
@endif {{-- UPDATE STATUS (manual) --}} @if(!in_array($booking->status, ['completed','cancelled','void']))
Update Status Manual
@csrf @method('PATCH')
@endif {{-- APPROVE / REJECT untuk pending --}} @if($booking->status === 'pending')
@csrf @method('PATCH')
@csrf @method('PATCH')
@endif {{-- HAPUS --}}
@csrf @method('DELETE')
{{-- /col-lg-7 --}} {{-- Sidebar: Pembayaran + Refund --}}
{{-- Pembayaran --}} @if($booking->payment)
Pembayaran
@php $pb=$booking->payment->status_badge; @endphp
Kode{{ $booking->payment->payment_code }}
Status{{ $pb['label'] }}
Total{{ $booking->payment->formatted_amount }}
Metode{{ $booking->payment->method_label }}
@if($booking->payment->status === 'unpaid' && $booking->payment->proof_image)
@csrf @method('PATCH')
@csrf @method('PATCH')
@endif
@endif {{-- Refund (jika ada / void) --}} @if($booking->status === 'void' || $booking->refund)
Pengajuan Refund
@if($booking->refund) @php $rb=$booking->refund->status_badge; @endphp
Status{{ $rb['label'] }}
Jumlah{{ $booking->refund->formatted_amount }}
Bank{{ $booking->refund->bank_name }}
No. Rekening{{ $booking->refund->account_number }}
@if($booking->refund->status === 'pending') Proses Refund @else Lihat Detail Refund @endif @else
Belum ada pengajuan refund dari customer. @php $voidExpiry = $booking->updated_at->copy()->addHours(24); @endphp
Batas pengajuan customer: {{ $voidExpiry->locale('id')->isoFormat('D MMM, HH:mm') }}
@endif
@endif
{{-- /col-lg-5 --}}