@extends('layouts.mobile') @section('title', 'Tracking Result') @section('content')

Package Tracking

{{ $order->tracking_code }}

{{ ucfirst(str_replace('_', ' ', $order->status)) }}
@if($order->status === 'delivered')
Package Delivered Successfully!
@elseif($order->status === 'in_transit')
Package is on the way!
@elseif($order->status === 'picked')
Package picked up from sender
@else
Package created, waiting for pickup
@endif
Package Information
Type {{ ucfirst($order->package_type) }}
Weight {{ $order->weight }} kg
Booked {{ $order->created_at->format('M d, Y') }}
{{ $order->created_at->format('h:i A') }}
Amount Rs. {{ number_format($order->final_price) }}
{{ ucfirst($order->payment_method) }}
Delivery Route
Pickup Location
{{ $order->pickupDistrict->name }}
{{ $order->pickup_address }}
Delivery Location
{{ $order->dropDistrict->name }}
{{ $order->drop_address }}
Recipient Details
{{ $order->recipient_name }}
{{ $order->recipient_phone }}
@if($order->assignedAgent)
Delivery Agent
{{ $order->assignedAgent->user->name }}
{{ $order->assignedAgent->user->phone ?? 'Contact through office' }}
Agent ID: {{ $order->assignedAgent->agent_id }}
@endif @if($order->special_instructions)
Special Instructions

{{ $order->special_instructions }}

@endif
Tracking Timeline
Order Created

Package booking confirmed

{{ $order->created_at->format('M d, Y h:i A') }}
Package Picked Up

Collected from sender

@if($order->status !== 'created') {{ $order->updated_at->format('M d, Y h:i A') }} @else Pending @endif
In Transit

On the way to destination

@if(in_array($order->status, ['in_transit', 'delivered'])) {{ $order->updated_at->format('M d, Y h:i A') }} @else Pending @endif
Delivered

Package delivered successfully

@if($order->status === 'delivered') {{ $order->updated_at->format('M d, Y h:i A') }} @else Pending @endif
@auth @if($order->user_id === auth()->id()) @endif @endauth
Need Help?
@endsection @push('styles') @endpush @push('scripts') @endpush