@extends('theme::layouts.app', ['title' => $title ?? __('account.title|Orders')]) @section('content')
@if(isset($pageHeader))

{{ $pageHeader['title'] }}

{{ $pageHeader['subtitle'] }}

@endif
@forelse($orders as $order) @php $statusDetails = getStatusDetails($order->status); $statusClass = match((int)$order->status) { 1 => 'status-completed', 0 => 'status-pending', 2 => 'status-processing', 3 => 'status-refunded', 4, 5 => 'status-failed', 6, 7 => 'status-cancelled', default => 'status-default', }; $firstItem = $order->itemPurchased->first(); @endphp @empty @endforelse
{{ __('account.Order ID') }} {{ __('account.Date') }} {{ __('account.Product Name') }} {{ __('account.Amount') }} {{ __('account.Status') }} {{ __('account.Action') }}
#{{ $order->order_reference }} {{ $order->created_at->format('M d, Y') }}
@if($firstItem && $firstItem->product_image) {{ html_entity_decode($firstItem->name ?? 'Product') }} @else
extension
@endif {{ html_entity_decode($firstItem->name ?? 'N/A') }}
{!! ch_currency_symbol(setting('currency', 'USD')) !!}{{ number_format($order->total, 2) }} {{ $statusDetails['label'] }} receipt_long {{ __('account.View Order') }}
shopping_cart

{{ __('account.No orders found') }}

{{ __('account.Start Shopping') }} →
@if($orders->hasPages())

{{ __('account.Showing :first to :last of :total orders', ['first' => $orders->firstItem(), 'last' => $orders->lastItem(), 'total' => $orders->total()]) }}

@if($orders->onFirstPage()) @else chevron_left @endif @if($orders->hasMorePages()) chevron_right @else @endif
@endif
@endsection