Status Order
@php $statusColors = [ 'draft' => 'secondary', 'assigned' => 'info', 'accepted' => 'primary', 'in_progress' => 'warning', 'completed' => 'success', 'cancelled' => 'danger' ]; $statusLabels = [ 'draft' => 'Draft', 'assigned' => 'Ditugaskan', 'accepted' => 'Diterima', 'in_progress' => 'Sedang Dikerjakan', 'completed' => 'Selesai', 'cancelled' => 'Dibatalkan' ]; $status = $order->status ?? 'draft'; $badgeColor = $statusColors[$status] ?? 'secondary'; $badgeLabel = $statusLabels[$status] ?? ucfirst($status); @endphp
{{ $badgeLabel }}
Order Dibuat
{{ $order->created_at->format('d M Y H:i') }}
Teknisi Ditugaskan
@if($order->assignedTeknisi) {{ $order->assignedTeknisi->name }} @else Belum ditugaskan @endif
Diterima Teknisi
@if(in_array($status, ['accepted', 'in_progress', 'completed'])) Teknisi menerima tugas @else Menunggu @endif
Sedang Dikerjakan
@if(in_array($status, ['in_progress', 'completed'])) Teknisi dalam perjalanan/kerja @else Menunggu @endif
Selesai
@if($status == 'completed') Pekerjaan selesai @else Menunggu @endif
Informasi Customer
Nama: {{ $order->client_name ?? 'N/A' }}
Telepon: {{ $order->client_phone ?? 'N/A' }}
@if($order->client_email)
Email: {{ $order->client_email }}
@endif
Alamat: {{ $order->client_address ?? 'N/A' }}
Detail Pekerjaan
@if($order->title)
Judul: {{ $order->title }}
@endif @if($order->description)
Deskripsi:
{{ $order->description }}
@endif @if($order->service_type)
Jenis Layanan: {{ ucfirst($order->service_type) }}
@endif
Tanggal: {{ $order->created_at->format('d F Y') }}
@if($order->assignedTeknisi)
Teknisi yang Ditugaskan
Nama: {{ $order->assignedTeknisi->name }}
Kontak: {{ $order->assignedTeknisi->username ?? 'N/A' }}
@endif @if($order->locationPath && $order->locationPath->count() > 0)
Lokasi Teknisi

Peta menampilkan jalur perjalanan teknisi menuju lokasi Anda

@endif @if($order->resultPhotos && $order->resultPhotos->count() > 0) @php $instalasiPhotos = $order->resultPhotos->where('category', 'instalasi'); $snPerangkatPhotos = $order->resultPhotos->where('category', 'sn_perangkat'); @endphp @if($instalasiPhotos->count() > 0 || $snPerangkatPhotos->count() > 0)
Foto Hasil Pekerjaan
{{-- Instalasi Photos --}} @if($instalasiPhotos->count() > 0)
Foto Instalasi:
@foreach($instalasiPhotos as $photo)
{{ $photo->title }} @if($photo->title) {{ $photo->title }} @endif
@endforeach
@endif {{-- SN Perangkat Photos --}} @if($snPerangkatPhotos->count() > 0)
Foto Serial Number Perangkat:
@foreach($snPerangkatPhotos as $photo)
{{ $photo->title }} @if($photo->title) {{ $photo->title }} @endif
@endforeach
@endif
@endif @endif
@if($order->locationPath && $order->locationPath->count() > 0 && $order->latitude_customer && $order->longitude_customer) @endif