@if($orders->count() > 0)
| Order ID |
Produk |
Tujuan |
Harga |
Status |
Tanggal |
Aksi |
@foreach($orders as $order)
|
#{{ $order->order_id }}
|
{{ $order->product->name ?? '-' }}
{{ $order->product->brand->name ?? '-' }}
|
{{ $order->customer_id }}
|
Rp {{ number_format($order->price, 0, ',', '.') }}
|
@php
$statusColors = [
'pending' => 'bg-yellow-100 text-yellow-800',
'processing' => 'bg-blue-100 text-blue-800',
'success' => 'bg-green-100 text-green-800',
'failed' => 'bg-red-100 text-red-800',
];
$statusLabels = [
'pending' => 'Menunggu',
'processing' => 'Diproses',
'success' => 'Berhasil',
'failed' => 'Gagal',
];
@endphp
{{ $statusLabels[$order->status] ?? ucfirst($order->status) }}
|
{{ $order->created_at->format('d M Y H:i') }}
|
Detail
|
@endforeach
{{ $orders->links() }}
@else
Belum Ada Pesanan
Anda belum memiliki riwayat pesanan
@endif