@forelse($orders ?? [] as $order)
{{ __('Order no') }}#{{ $order->id }}
{{ $order->orderProducts()->count() ?? 0 }} {{ __('product') }}
{{ __('Order placed on :date', ['date' => $order->created_at->format('d-m-Y')]) }}
{{ __('Total') }}: {{ $order->total }}
@php $progress = $order->shipping_progress; if ($progress < 33) { $statusText = __('Pending'); $statusClass = 'orange'; } elseif ($progress < 66) { $statusText = __('Ready for Shipping'); $statusClass = 'orange'; } elseif ($progress < 100) { $statusText = __('Shipping in Progress'); $statusClass = 'orange'; } else { $statusText = __('Shipped'); $statusClass = 'green'; } @endphp

{{ $statusText }} ( {{ $progress }}% )

@empty

{{ __('There are no orders to display.') }}

@endforelse