@extends('admin.MainComponent') @section('content')

Orders Management

@if(session('success')) @endif @if(session('error')) @endif
Filters
Orders List
Showing {{ $orders->firstItem() }} to {{ $orders->lastItem() }} of {{ $orders->total() }} entries
@forelse($orders as $order) @empty @endforelse
Order ID Customer Total Status Payment Date Actions
#{{ $order->partitionId ?? $order->id }}
@if($order->client?->avatar) Customer @else Customer @endif
{{ $order->buyerName ?? $order->client?->name ?? 'Guest' }}
{{ $order->client?->phone ?? 'N/A' }}
{{ $order->total }} @if($order->additionPrice) +{{ $order->additionPrice }} additions @endif @php $statusClass = [ 'pending' => 'warning', 'completed' => 'success', 'cancelled' => 'danger' ][$order->status] ?? 'info'; @endphp {{ ucfirst($order->status) }} @if($order->is_paid) Paid @else Unpaid @endif {{ $order->created_at->format('M d, Y') }}
{{ $order->created_at->diffForHumans() }}
No orders found

Try adjusting your search or filter criteria

@if($orders->hasPages()) @endif
@push('scripts') @endpush @endsection