@extends('layouts.app') @section('content') @php $status = trim((string) $s->status); $statusKey = strtolower(str_replace([' ', '_', '-'], '', $status)); $statusMap = [ 'ordered' => 'Shipment Ordered', 'sorting' => 'Sorting', 'intransit' => 'In Transit', 'outfordelivery' => 'Out for Delivery', 'delivered' => 'Delivered', 'cancelled' => 'Cancelled', ]; $displayStatus = $statusMap[$statusKey] ?? ($status !== '' ? $status : 'Shipment Processing'); $timeline = $s->trackingLogs->sortByDesc('occurred_at'); @endphp
SHIPMENT TRACKING

Shipment Details

← Track another shipment

Tracking History

{{ $timeline->count() }} milestone{{ $timeline->count() === 1 ? '' : 's' }} recorded
@forelse($timeline as $log)
{{ $log->status }}
{{ $log->occurred_at ? $log->occurred_at->format('d M Y, H:i') : 'Time not recorded' }} · {{ $log->location ?: 'Prime Next operations' }}
@if($log->notes)

{{ $log->notes }}

@endif
@empty
No tracking milestones have been recorded yet. Please check again after the shipment has been updated by the Prime Next operations team.
@endforelse
@endsection