@extends("admin.layouts.app") @section("title", __("admin.orders.title")) @section("content")
@foreach(["" => "All", "pending" => "Pending", "active" => "Active", "fraud" => "Fraud", "cancelled" => "Cancelled"] as $val => $label) @php $isActive = (request("status","") == $val); @endphp $val]) }}" style="display:inline-block;padding:8px 16px;font-size:13px;text-decoration:none;color:{{ $isActive ? "#1a4d80" : "#666" }};font-weight:{{ $isActive ? "700" : "400" }};border-bottom:{{ $isActive ? "3px solid #1a4d80" : "3px solid transparent" }};margin-bottom:-1px;"> {{ $label }} @endforeach
@forelse($orders as $order) @php $badgeClass = match(strtolower($order->status ?? "")) { "active" => "badge-active", "pending" => "badge-pending", "fraud" => "badge-fraud", "cancelled" => "badge-cancelled", default => "badge-cancelled", }; @endphp @empty @endforelse
{{ __('common.table.order_num') }} {{ __('common.table.client') }} {{ __('common.table.date') }} {{ __('common.table.amount') }} {{ __('common.table.payment_method') }} {{ __('common.table.status') }} {{ __('common.table.actions') }}
#{{ $order->order_num }} @if($order->client) client_id) }}" style="color:#337ab7;text-decoration:none;">{{ $order->client?->full_name ?? "Deleted Client" }} @else N/A @endif {{ $order->date?->format("d M Y") ?? "-" }} ${{ number_format($order->amount, 2) }} {{ $order->payment_method ?? "-" }} {{ ucfirst($order->status ?? "") }} {{ __('common.actions.view') }}
{{ __('admin.orders.no_orders') }}
{{ $orders->withQueryString()->links() }}
@endsection