@foreach ($orders as $order) @endforeach
Product ame Agent Name Order Amount Order Products Order Status Order Date Actions
{{ $order->request_number }} {{ $order->agent->name ?? 'N/A' }} {{ $order->total_amount }} {{ $order->customer->name ?? 'Walk-in' }} {{ $order->customer->phone ?? '-' }} {{ $order->total_product }} {{ ucfirst($order->status) }} {{ $order->request_date }} @php $actions = []; if ($order->status === 'Requested') { $actions[] = [ 'data-replace' => null, 'url' => '/admin/requests/delete/'.$order->id, 'ajax-url' => null, 'name' => 'Delete', 'icon' => 'trash', 'class' => 'btn btn-danger', ]; } $actions[] = [ 'data-replace' => null, 'url' => url('Backoffice/requests/view/' . $order->id), 'ajax-url' => null, // No AJAX URL needed for direct link 'name' => 'View', 'icon' => 'eye', // Using 'eye' as a common icon for view 'class' => 'btn btn-success', ]; @endphp @include('partials.actions', ['actions' => $actions])
@foreach ($order->agentRequestItems as $agentRequestItem) @endforeach
Product Name Price Quantity Subtotal Actions
{{ $agentRequestItem->product->product_name }} {{ $agentRequestItem->price }} {{ $agentRequestItem->subtotal }}
@foreach ($orders as $order) @endforeach