@extends('layouts.admin') @section('title','Parcel '.$parcel->number) @section('heading','Parcel '.$parcel->number) @section('content')

{{ $parcel->packageType?->name }} · {{ $parcel->weight_kg }} kg · {{ number_format($parcel->distance_km,2) }} km

Back to parcels
Parcel status{{ $parcel->status }}
Payment{{ ucfirst($parcel->payment_status) }}{{ strtoupper($parcel->payment_method) }}
TotalINR {{ number_format($parcel->total,2) }}
Dispatch{{ $job ? ucfirst($job->status) : 'Not assigned' }}

Customer

{{ $parcel->customer?->name }}
{{ $parcel->customer?->email }}
{{ $parcel->customer?->phone }}

Package notes

{{ $parcel->item_description ?: 'No item description.' }}

{{ $parcel->special_instructions ?: 'No special instructions.' }}

Stops

@foreach($parcel->stops as $stop)@endforeach
#TypeContactAddressStatus
{{ $stop->sequence }}{{ ucfirst($stop->type) }}{{ $stop->contact_name }}
{{ $stop->phone }}
{{ $stop->address }}
{{ $stop->latitude }}, {{ $stop->longitude }}
{{ $stop->status }}
@if(!$job || in_array($job->status,['searching','rejected']))

{{ $job ? 'Reassign delivery' : 'Dispatch parcel' }}

@csrf
@endif @if(in_array($parcel->status,['pending','confirmed','dispatched']) && $parcel->payment_status==='unpaid')

Cancel parcel

@csrf
@endif @if($job)

Dispatch history

Open job
@forelse($job->events->sortByDesc('created_at') as $event)@empty@endforelse
TimeFromToDetails
{{ $event->created_at->format('d M Y H:i') }}{{ $event->from_status ?: '—' }}{{ $event->to_status }}{{ data_get($event->metadata,'reason') ?: '—' }}
No dispatch events.
@endif @endsection