@extends("layouts.app") @section('title', 'Order History') @section("main")

Tools Order History

Track and manage all your service orders in one place

Total Orders

{{ $orders->total() }}

Active

{{ $orders->where('service_status', 'Active')->count() }}

Expired

{{ $orders->where('service_status', 'Expired')->count() }}

Total Spent

{{ $currency->icon }}{{ $orders->sum('service_price') * $currency->rate }}

@forelse ($orders as $order) @empty @endforelse
Service
Quantity
Price
Status
Purchase Date
Expiry Date
Code
@php $order_created = $order->created_at->format('d M Y H:i A') @endphp
{{ $order->service_title }}
{{ $order->service_qnt }} items
{{ $currency->icon }}{{ number_format($order->service_price * $currency->rate, 2) }}
@php $statusConfig = [ 'Active' => ['bg' => 'bg-green-100 dark:bg-green-900/30', 'text' => 'text-green-800 dark:text-green-300', 'icon' => 'fas fa-check-circle'], 'Expired' => ['bg' => 'bg-red-100 dark:bg-red-900/30', 'text' => 'text-red-800 dark:text-red-300', 'icon' => 'fas fa-times-circle'], ]; $config = $statusConfig[$order->service_status] ?? ['bg' => 'bg-gray-100 dark:bg-gray-700', 'text' => 'text-gray-800 dark:text-gray-300', 'icon' => 'fas fa-question-circle']; @endphp {{ $order->service_status }}
{{ $order->created_at->format('d M Y') }}
{{ $order->created_at->format('H:i A') }}
{{ $order->expired_at->format('d M Y') }}
{{ $order->expired_at->format('H:i A') }}
{!! $order->service_comments !!}

No Orders Found

You haven't placed any orders yet.

Place Your First Order
@if($orders->hasPages())
{{ $orders->links() }}
@endif
@endsection @push('script') @endpush