@extends('layouts.admin') @section('title', 'Shipment Summary') @section('content')
Overview of all merchant shipments and delivery status
Total Shipments
{{ $shipments->count() }}
Pending
{{ $shipments->where('status', 'pending')->count() }}
In Transit
{{ $shipments->where('status', 'in-transit')->count() }}
Delivered
{{ $shipments->where('status', 'delivered')->count() }}
Failed
{{ $shipments->whereIn('status', ['failed', 'returned'])->count() }}
| Tracking ID | Merchant | Origin | Destination | Status | Date | Actions |
|---|---|---|---|---|---|---|
|
{{ $shipment->tracking_id }}
|
{{ $shipment->merchant->name ?? 'N/A' }}
|
{{ $shipment->origin_city ?? 'N/A' }}
|
{{ $shipment->destination_city ?? 'N/A' }}
|
@php $statusColors = [ 'pending' => 'bg-yellow-100 text-yellow-800', 'in-transit' => 'bg-blue-100 text-blue-800', 'delivered' => 'bg-green-100 text-green-800', 'failed' => 'bg-red-100 text-red-800', 'returned' => 'bg-gray-100 text-gray-800', ]; $color = $statusColors[$shipment->status] ?? 'bg-gray-100 text-gray-800'; @endphp {{ ucfirst(str_replace('_', ' ', $shipment->status)) }} |
{{ $shipment->created_at->format('M d, Y') }}
|
Track |
|
No shipments found. |
||||||