@if ($selectedCustomerId) {{-- Elegant native-styled Customer Profile card above the orders list --}} @php $customer = \App\Models\Customer::find($selectedCustomerId); @endphp @if ($customer)
{{ strtoupper(substr($customer->name, 0, 2)) }}

{{ $customer->name }}

Telp: {{ $customer->phone ?: '-' }} @if ($customer->address) • Alamat: {{ $customer->address }} @endif

Status: {{ $customer->is_active ? 'Aktif' : 'Non-aktif' }}
@endif @endif {{-- Desktop/Tablet Table Wrapper --}}
{{ $this->table }}
{{-- Mobile UI/UX: Copying custom categories schema --}}
@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)
Hal {{ $mobileCustomers->currentPage() }} / {{ $mobileCustomers->lastPage() }}
@if($mobileCustomers->currentPage() > 1) @else @endif @if($mobileCustomers->hasMorePages()) @else @endif
@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)
Hal {{ $mobileOrders->currentPage() }} / {{ $mobileOrders->lastPage() }}
@if($mobileOrders->currentPage() > 1) @else @endif @if($mobileOrders->hasMorePages()) @else @endif
@endif @else

Tidak ada pesanan ditemukan

@endif @endif
@script @endscript