@foreach ($received_order as $index => $order) @if(!empty($order->assign_user_id == Auth::user()->id)) @if(Auth::user()->hasRole('Employee')) @endif @endif @if(Auth::user()->hasRole(['Client_test', 'Admin'])) @if(!empty($order->user->name)) @endif @endif @endforeach
{{__('admin.Action')}} ID {{__('admin.Customer')}} {{__('admin.Date')}} SKU QTY {{__('admin.Amount')}} {{__('admin.Order Status')}} Order Note Courier Courier Status Courier Tracking Link Assign Order id
@if(auth()->user()->can('admin.delete-order')) @endif {{ $order->order_id }} {{ $order->orderAddress->shipping_name }} {{ $order->orderAddress->shipping_phone }} {{ $order->orderAddress->shipping_address }} {{ $order->created_at->format('d F, Y') }} @foreach ($order->orderProducts as $orderProduct) @if(!empty($orderProduct->product->sku)) {{ $orderProduct->product->sku }}, @else Unavailable @endif @endforeach {{ $order->product_qty }} {{ $setting->currency_icon }}{{ round($order->total_amount) }} @if ($order->order_status == 1) Process @elseif ($order->order_status == 2) Courier @elseif ($order->order_status == 3) Completed @elseif ($order->order_status == 4) Cancell @elseif($order->order_status == 5) On Hold @elseif($order->order_status == 6) Return @else {{__('admin.Pending')}} @endif {{ $order->note ? $order->note : '' }} @if($order->courier_id == '3') SteadFast {{ $order->courier_tracking_id }} @elseif($order->courier_id == '2') Pathao {{ $order->courier_tracking_id }} @elseif($order->courier_id == '1') Redx {{ $order->courier_tracking_id }} @else @endif @if($order->courier_status) {{ $order->courier_status ?? '' }} @endif {!! $order->courier_tracking_link !!} @if(!empty($order->assign->name)) {{$order->assign->name}} @endif
@if(auth()->user()->can('admin.delete-order')) @endif {{ $order->order_id }} {{ $order->orderAddress->shipping_name }} {{ $order->orderAddress->shipping_phone }} {{ $order->orderAddress->shipping_address }} @php $now = \Carbon\Carbon::now(); // Get the current time $orderCreatedAt = \Carbon\Carbon::parse($order->created_at); // Parse the order creation time $timeDifference = $now->diffInHours($orderCreatedAt); // Calculate the time difference in hours @endphp @if ($timeDifference <= 24) @if ($timeDifference == 0) Less than an hour ago @elseif ($timeDifference == 1) 1 hr ago @else {{ $timeDifference }} hrs ago @endif @elseif ($timeDifference <= 12) {{ $orderCreatedAt->format('h:i A') }} @else {{ $orderCreatedAt->format('d M, Y') }} @endif @foreach ($order->orderProducts as $orderProduct) @if(!empty($orderProduct->product->sku)) {{ $orderProduct->product->sku }}, @else @endif @endforeach {{ $order->product_qty }} {{ $setting->currency_icon }}{{ round($order->total_amount) }} @if ($order->order_status == 1) Process @elseif ($order->order_status == 2) Courier @elseif ($order->order_status == 3) Completed @elseif ($order->order_status == 4) Cancell @elseif($order->order_status == 5) On Hold @elseif($order->order_status == 6) Return @else {{__('admin.Pending')}} @endif {{ $order->note ? $order->note : '' }} @if($order->courier_id == '3') SteadFast {{ $order->courier_tracking_id }} @elseif($order->courier_id == '2') Pathao {{ $order->courier_tracking_id }} @elseif($order->courier_id == '1') Redx {{ $order->courier_tracking_id }} @else @endif @if($order->courier_status) {{ $order->courier_status ?? '' }} @endif {!! $order->courier_tracking_link !!} @if(!empty($order->assign->name)) {{$order->assign->name}} @endif