@extends('layouts.app') @section('title', 'Track Order') @section('content')

Track Order #{{ $order['order_number'] ?? $order['id'] }}

Real-time delivery tracking

@php $status = $order['status'] ?? 'pending'; $statusText = str_replace('_', ' ', ucfirst($status)); $badgeColor = match($status) { 'pending' => 'warning', 'processing' => 'info', 'preparing' => 'primary', 'ready' => 'success', 'on_delivery' => 'info', 'completed' => 'success', 'cancelled' => 'danger', default => 'secondary' }; @endphp {{ $statusText }}
Delivery Route

Live Tracking Map

Restaurant
Your Location

Delivery Address:

{{ $order['delivery_address'] ?? 'Not specified' }}

Estimated Arrival:

{{ $order['delivery']['estimated_time'] ?? '30-45 minutes' }}
Order placed at {{ date('h:i A', strtotime($order['created_at'])) }}

Driver: Budi Santoso

0812-3456-7890
Honda Beat - B 1234 XYZ

Delivery Status
@php $timelineSteps = [ ['icon' => 'fas fa-shopping-cart', 'status' => 'Order placed', 'time' => date('h:i A', strtotime($order['created_at'])), 'active' => true], ['icon' => 'fas fa-check-circle', 'status' => 'Order confirmed', 'time' => date('h:i A', strtotime($order['created_at']) + 300), 'active' => true], ['icon' => 'fas fa-utensils', 'status' => 'Food preparing', 'time' => date('h:i A', strtotime($order['created_at']) + 600), 'active' => true], ['icon' => 'fas fa-box', 'status' => 'Ready for pickup', 'time' => date('h:i A', strtotime($order['created_at']) + 1200), 'active' => true], ['icon' => 'fas fa-motorcycle', 'status' => 'Out for delivery', 'time' => date('h:i A', strtotime($order['created_at']) + 1500), 'active' => $status == 'on_delivery'], ['icon' => 'fas fa-home', 'status' => 'Delivered', 'time' => 'Estimated: ' . date('h:i A', strtotime($order['created_at']) + 2700), 'active' => false] ]; @endphp @foreach($timelineSteps as $step)
{{ $step['status'] }}

{{ $step['time'] }}

@endforeach
Estimated Delivery Time

{{ date('h:i A', strtotime($order['created_at']) + 2700) }}

Approximately 45 minutes from order time

View Order Details
Live Updates
Live
Driver is on the way

Your order is out for delivery

2 minutes ago
Order picked up by driver

Driver has collected your order from the restaurant

5 minutes ago
Food preparation complete

Your order is ready and waiting for pickup

10 minutes ago
@endsection