80 lines
3.8 KiB
PHP
80 lines
3.8 KiB
PHP
<flux:main>
|
|
<flux:heading size="xl" level="1">{{ $pageTitle }}</flux:heading>
|
|
<flux:text class="mb-6 mt-2 text-base">{{ $pageDescription }}</flux:text>
|
|
|
|
@if (empty($orders))
|
|
<flux:card class="text-center py-12">
|
|
<div class="flex flex-col items-center justify-center">
|
|
<flux:icon.shopping-bag variant="outline" class="size-16 text-zinc-400 mb-4" />
|
|
<flux:heading size="lg" class="mb-2">Belum Ada Pesanan</flux:heading>
|
|
<flux:text class="text-zinc-500 mb-6">
|
|
Anda belum melakukan pemesanan apapun. Mulai belanja sekarang!
|
|
</flux:text>
|
|
</div>
|
|
</flux:card>
|
|
@else
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
|
@foreach ($orders as $order)
|
|
<flux:card class="relative overflow-hidden flex flex-col h-full">
|
|
{{-- Badge Status --}}
|
|
<div class="absolute top-4 right-4">
|
|
<flux:badge color="{{ $order['status_color'] }}" size="sm">
|
|
{{ $order['status_label'] }}
|
|
</flux:badge>
|
|
</div>
|
|
|
|
{{-- Order Header --}}
|
|
<div class="mb-4 flex-1">
|
|
<flux:heading size="lg" class="mb-1">Order #{{ $order['invoice_number'] }}
|
|
</flux:heading>
|
|
|
|
{{-- Date --}}
|
|
<div class="flex items-center gap-2 mb-4 text-zinc-500 dark:text-zinc-400">
|
|
<flux:icon.calendar class="size-4" />
|
|
<flux:text class="text-sm">
|
|
{{ $order['formatted_created_at'] }}
|
|
</flux:text>
|
|
</div>
|
|
|
|
{{-- Items Count --}}
|
|
<div class="flex items-center gap-2 mb-2">
|
|
<flux:icon.shopping-bag class="size-4 text-zinc-500" />
|
|
<flux:text class="text-sm">
|
|
{{ $order['total_items_count'] }} Produk
|
|
</flux:text>
|
|
</div>
|
|
|
|
{{-- Total Amount --}}
|
|
<div class="flex items-center gap-2">
|
|
<flux:icon.credit-card class="size-4 text-zinc-500" />
|
|
<flux:text class="text-lg font-semibold text-zinc-900 dark:text-white">
|
|
{{ $order['formatted_total'] }}
|
|
</flux:text>
|
|
</div>
|
|
</div>
|
|
|
|
<flux:separator class="my-3" />
|
|
|
|
{{-- Items Preview --}}
|
|
<div class="space-y-2">
|
|
<flux:text class="text-xs font-medium uppercase tracking-wider text-zinc-500">Ringkasan Pesanan
|
|
</flux:text>
|
|
@foreach ($order['preview_items'] as $item)
|
|
<div class="flex justify-between items-start text-sm">
|
|
<span class="truncate pr-2 text-zinc-700 dark:text-zinc-300">{{ $item['name'] }}</span>
|
|
<span
|
|
class="text-xs text-zinc-500 whitespace-nowrap">{{ $item['quantity_label'] }}</span>
|
|
</div>
|
|
@endforeach
|
|
@if ($order['remaining_items_count'] > 0)
|
|
<flux:text class="text-xs text-zinc-400 italic">
|
|
+{{ $order['remaining_items_count'] }} item lainnya
|
|
</flux:text>
|
|
@endif
|
|
</div>
|
|
</flux:card>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
</flux:main>
|