@extends('layout.template') @section('title','Order Details') @section('content') @php $steps = ['processing','shipped','delivered']; $currentStatus = $order['status']; $currentIndex = array_search($currentStatus, $steps); @endphp

Order Details

{{-- ORDER SUMMARY --}}
#{{ $order['order_number'] }}

{{ $order['order_date'] }}

₹{{ number_format($order['amounts']['total'],2) }}
{{ ucfirst($order['status']) }}
{{-- 🔥 TIMELINE --}}
@foreach($steps as $index => $step) @php $class = ''; if ($index < $currentIndex) $class = 'completed'; elseif ($index == $currentIndex) $class = 'active'; @endphp
{{ ucfirst($step) }}
@endforeach
{{-- ITEMS --}}
Items
@foreach($order['items'] as $item)
{{ $item['name'] }}
Qty: {{ $item['quantity'] }}
₹{{ $item['total'] }}
{{-- ⭐ REVIEW FORM (ONLY IF DELIVERED) --}} @if($order['status'] == 'delivered')
@csrf {{-- Stars --}}
@for($i=1;$i<=5;$i++) @endfor
@endif
@endforeach
@endsection