@extends('admin.layout.master') @section('title', __('admin.orders')) @section('styles') @endsection @section('content')
{{ __('admin.pending_payments') }}

{{ $pendingPayments }}

{{ __('admin.completed_orders') }}

{{ $completedOrders }}

{{ __('admin.out_for_delivery') }}

{{ $outForDelivery }}

{{ __('admin.cancelled_orders') }}

{{ $cancelledOrders }}

{{ __('admin.orders') }}
@foreach ($orders as $order) @endforeach
{{ __('admin.order_id') }} {{ __('admin.date') }} {{ __('admin.customer') }} {{ __('admin.status') }} {{ __('admin.service_provider') }}
#{{ $order->id }} {{ $order->created_at ? $order->created_at->format('M d, Y h:i A') : 'N/A' }} @if ($order->user && $order->user->avatar) {{ $order->user->name }} @endif {{ $order->user->name ?? 'N/A' }}
{{ $order->user->email ?? 'N/A' }}
{{ __('admin.' . $order->status) }} @if ($order->driver) {{ $order->driver->name }} @elseif ($order->status === 'confirmed' && !$order->driver_id)
@csrf
@else {{ __('admin.unassigned') }} @endif
{{ $orders->links() }}
@endsection