@extends('layouts.app') @section('title', 'Order Status - AVIOBOOTS') @section('content')
{{-- Back link --}} Track another order @if(!$order) {{-- Not found --}}

Order Not Found

No order found with Tracking ID: {{ $trackingId }}

Please check your email for the correct Tracking ID, or contact us at avioboots0@gmail.com

@else {{-- Header --}}

Order #{{ $order->id }}

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

@php $statusColors = [ 'pending' => ['bg' => '#fffbeb', 'border' => '#fde68a', 'text' => '#92400e'], 'confirmed' => ['bg' => '#eff6ff', 'border' => '#bfdbfe', 'text' => '#1e40af'], 'shipped' => ['bg' => '#f0fdf4', 'border' => '#bbf7d0', 'text' => '#166534'], 'complete' => ['bg' => '#f0fdf4', 'border' => '#6ee7b7', 'text' => '#065f46'], ]; $sc = $statusColors[$order->status] ?? ['bg'=>'#f1f5f9','border'=>'#e2e8f0','text'=>'#334155']; @endphp @if($order->status === 'pending') Pending @elseif($order->status === 'confirmed') In Production @elseif($order->status === 'shipped') Shipped @elseif($order->status === 'complete') Delivered @endif
{{-- 4-Step Progress Bar --}} @php $steps = [ ['key'=>'pending', 'icon'=>'fa-clock', 'label'=>'Order Placed', 'sub'=>'Awaiting confirmation'], ['key'=>'confirmed', 'icon'=>'fa-hammer', 'label'=>'In Production', 'sub'=>'Your boots are being crafted'], ['key'=>'shipped', 'icon'=>'fa-truck', 'label'=>'Shipped', 'sub'=>'On the way to you'], ['key'=>'complete', 'icon'=>'fa-circle-check', 'label'=>'Delivered', 'sub'=>'Enjoy your boots!'], ]; $statusOrder = ['pending'=>0, 'confirmed'=>1, 'shipped'=>2, 'complete'=>3]; $currentIdx = $statusOrder[$order->status] ?? 0; @endphp
@foreach($steps as $i => $step) @php $done = $currentIdx >= $i; $current = $currentIdx === $i; @endphp
{{ $step['label'] }}
{{ $step['sub'] }}
@if($i < count($steps)-1)
@endif @endforeach
{{-- Tracking Info --}}

Tracking Details

@if($order->courier) @endif @if($order->shipped_at) @endif
Tracking ID {{ $order->tracking_id }}
Courier {{ $order->courier }}
Shipped On {{ $order->shipped_at->format('d M Y, h:i A') }}
Delivery To {{ $order->city }}@if($order->state), {{ $order->state }}@endif
@if($order->tracking_url)
Track on Courier Website
@endif
{{-- Order Items --}}

Items Ordered

@foreach($order->items as $it)
{{ $it->product_name }}
{{ $it->product_name }}
Size: {{ $it->size ?? 'N/A' }}  ยท  Qty: {{ $it->qty }}
Rs {{ number_format($it->price * $it->qty, 0) }}
@endforeach
Shipping {{ $order->shipping == 0 ? 'FREE' : 'Rs '.number_format($order->shipping, 0) }}
Total Rs {{ number_format($order->total, 0) }}

Questions? Email us at avioboots0@gmail.com

@endif
@endsection