@if ($selectedCustomerId)
{{-- Elegant native-styled Customer Profile card above the orders list --}}
@php
$customer = \App\Models\Customer::find($selectedCustomerId);
@endphp
@if ($customer)
@endif
@endif
{{-- Desktop/Tablet Table Wrapper --}}
@if (!$selectedCustomerId)
{{-- Customer List mobile search & layout --}}
@php $mobileCustomers = $this->getMobileCustomers(); @endphp
@if($mobileCustomers->count() > 0)
@foreach($mobileCustomers as $cust)
{{ $cust->name }}
@if($cust->phone)
Telp: {{ $cust->phone }}
@endif
{{ $cust->orders_count }} Transaksi
Rp {{ number_format($cust->orders_sum_total ?: 0, 0, ',', '.') }}
@endforeach
@if($mobileCustomers->lastPage() > 1)
@endif
@else
Tidak ada pelanggan ditemukan
@endif
@else
{{-- Orders List mobile search & layout --}}
@php $mobileOrders = $this->getMobileOrders(); @endphp
@if($mobileOrders->count() > 0)
@foreach($mobileOrders as $ord)
{{ $ord->order_number }}
{{ $ord->created_at->translatedFormat('d M Y, H:i') }}
{{ match ($ord->status) {
'pending' => 'Menunggu',
'processing' => 'Diproses',
'completed' => 'Selesai',
'cancelled' => 'Batal',
'voided' => 'Void',
'refunded' => 'Refund',
default => $ord->status,
} }}
Rp {{ number_format($ord->total ?: 0, 0, ',', '.') }}
@endforeach
@if($mobileOrders->lastPage() > 1)
@endif
@else
Tidak ada pesanan ditemukan
@endif
@endif