<x-admin-layout title="Pesanan Laundry">
    <div class="overflow-hidden rounded-lg bg-white shadow-sm">
        <table class="w-full text-left text-sm">
            <thead class="bg-slate-100 text-slate-600"><tr><th class="p-3">Nota</th><th>Pelanggan</th><th>Status</th><th>Pembayaran</th><th>Total</th><th></th></tr></thead>
            <tbody class="divide-y">
            @foreach ($orders as $order)
                <tr><td class="p-3 font-medium">{{ $order->invoice_no }}</td><td>{{ $order->customer?->name ?? 'Walk-in' }}</td><td>{{ $order->status }}</td><td>{{ $order->payment_status }}</td><td>Rp {{ number_format($order->grand_total, 0, ',', '.') }}</td><td><a class="text-slate-700 underline" href="{{ route('orders.show', $order) }}">Detail</a></td></tr>
            @endforeach
            </tbody>
        </table>
    </div>
    <div class="mt-4">{{ $orders->links() }}</div>
</x-admin-layout>
