@extends('layouts.app') @section('title', 'Order Management') @section('content')
@yield('title')
@can('Order create') @else @endcan
@forelse($orders as $order) @empty @endforelse
Order # Outlet LSR Agent Status Created Date Actions
{{ $order->order_number }}
{{ $order->outlet->name ?? 'N/A' }}
@if(optional($order->outlet)->address) {{ Str::limit($order->outlet->address, 20) }} @endif
{{ substr($order->lsr->name ?? 'U', 0, 1) }}
{{ $order->lsr->name ?? 'Unassigned' }}
@php $statusClass = match ($order->status) { 'created' => 'bg-soft-warning', 'ready_for_collection' => 'bg-soft-primary', 'collected' => 'bg-soft-info', 'delivered' => 'bg-soft-success', default => 'bg-soft-secondary' }; @endphp {{ ucfirst($order->status) }} {{ $order->created_at->format('Y-m-d H:i') }}

No orders found.

Showing {{ $orders->firstItem() ?? 0 }} to {{ $orders->lastItem() ?? 0 }} of {{ $orders->total() }} entries
{{ $orders->appends(request()->query())->links() }}
@endsection @push('js') @endpush