@extends('layouts.store') @section('title', __('app.track_order') . ' - ' . __('app.site_name')) @section('content')

{{ __('app.track_order') }}

@if(request('order_number')) @if($order)

{{ $order->order_number }}

{{ $order->created_at->format('Y-m-d H:i') }}

@php $statusColors = ['pending' => 'bg-amber-100 text-amber-700', 'confirmed' => 'bg-blue-100 text-blue-700', 'shipped' => 'bg-indigo-100 text-indigo-700', 'delivered' => 'bg-emerald-100 text-emerald-700', 'cancelled' => 'bg-red-100 text-red-700']; @endphp {{ __('app.' . $order->status) }}
@php $steps = ['pending', 'confirmed', 'shipped', 'delivered']; $currentIdx = array_search($order->status, $steps); if ($order->status === 'cancelled') $currentIdx = -1; $stepIcons = ['M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z', 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z', 'M13 16V6a1 1 0 00-1-1H4a1 1 0 00-1 1v10a1 1 0 001 1h1m8-1a1 1 0 01-1 1H9m4-1V8a1 1 0 011-1h2.586a1 1 0 01.707.293l3.414 3.414a1 1 0 01.293.707V16a1 1 0 01-1 1h-1m-6-1a1 1 0 001 1h1M5 17a2 2 0 104 0m-4 0a2 2 0 114 0m6 0a2 2 0 104 0m-4 0a2 2 0 114 0', 'M5 13l4 4L19 7']; @endphp
@foreach($steps as $idx => $step)
{{ __('app.' . $step) }}
@if(!$loop->last)
@endif @endforeach
@foreach($order->items as $item)
{{ $item->product_name }} x{{ $item->quantity }} {{ number_format($item->total, 2) }} {{ __('app.jod') }}
@endforeach
{{ __('app.total') }} {{ number_format($order->total, 2) }} {{ __('app.jod') }}
@else

{{ __('app.order_not_found') }}

@endif @endif
@endsection