@extends('documents.procurement._layout', [
'documentTitle' => 'Shipment Event Log',
'reference' => $shipment->shipment_reference,
'documentDate' => now()->format('d M Y'),
])
@section('header-meta')
Status: {{ ucwords(str_replace('_', ' ', $shipment->status)) }}
Events: {{ $shipment->events->count() }}
@endsection
@section('content')
@php
$eventLabels = [
'booking_confirmed' => 'Booking Confirmed',
'cargo_received_at_origin'=> 'Cargo Received at Origin',
'vessel_departed' => 'Vessel Departed',
'transshipment' => 'Transshipment',
'destination_arrived' => 'Arrived at Destination',
'customs_exam_started' => 'Customs Examination Started',
'customs_exam_completed' => 'Customs Examination Completed',
'customs_released' => 'Customs Released',
'handed_to_haulier' => 'Handed to Haulier',
'delivered_to_warehouse' => 'Delivered to Warehouse',
'other' => 'Other',
];
@endphp
@if($shipment->events->count())
| # |
Date & Time |
Event |
Port / Location |
Recorded By |
Notes |
@foreach($shipment->events as $i => $event)
| {{ $i + 1 }} |
{{ \Carbon\Carbon::parse($event->event_date)->format('d M Y H:i') }}
|
{{ $eventLabels[$event->event_type] ?? ucwords(str_replace('_', ' ', $event->event_type)) }} |
{{ $event->port_code ?? $event->location_description ?? '—' }} |
{{ $event->recordedBy?->name ?? '—' }} |
{{ $event->notes ?? '—' }} |
@endforeach
@else
No events have been recorded for this shipment yet.
@endif
@endsection