@extends('layouts.customer') @section('title', 'Customer Dashboard') @section('content')
{{-- Upgrade banner --}} @if($user->customer_type !== 'premium')

Upgrade to Premium & Save 10% on Every Shipment

Get discounts, priority processing, and 10x reward points at a Cheaper Rate

Upgrade Now ⭐
@endif {{-- Statistics Cards --}}
Total Shipments
{{ $totalShipments ?? 0 }}
+{{ $shipmentsThisMonth ?? 0 }} this month
Points Balance
{{ $walletPoints ?? 0 }}
+{{ $earnedThisMonth ?? 0 }} this month
Pending Deliveries
{{ $pendingDeliveries ?? 0 }}
In transit
{{-- Potential Savings / Premium Benefit Card --}}
Potential Savings
{{-- Currency Toggle --}}
£
@if($user->customer_type === 'premium') @else 🔒 @endif
@if($user->customer_type === 'premium') You are enjoying a total discount of on your shipments! @else Subscribe to Premium to enjoy 10% discount on every shipment. @endif
{{-- Alpine.js (include in your layout if not already) --}}
@if(session('error'))
{{ session('error') }}
@endif {{-- Quick Track --}}

Quick Track Parcel

{{-- Recent Shipments --}}

Recent Shipments

View All
{{-- Desktop Table --}} {{-- Mobile Cards --}}
@forelse($shipments ?? [] as $shipment)
{{ $shipment->tracking_number }} {{ $shipment->status }}
Weight: {{ $shipment->weight }} kg
Price: ₦{{ number_format($shipment->price) }}
Date: {{ $shipment->created_at->toDateString() }}
@empty

No shipments recorded yet.

@endforelse
{{-- Recent Invoices --}}

Recent Invoices

View All
{{-- Desktop Table --}} {{-- Mobile Cards --}}
@forelse($invoices ?? [] as $invoice)
{{ $invoice->invoice_number ?? 'INV-'.$invoice->id }} {{ $invoice->status }}
Amount: @if($invoice->currency === 'NGN' && $invoice->converted_amount) ₦{{ number_format($invoice->converted_amount, 2) }} @else £{{ number_format($invoice->final_price, 2) }} @endif
Date: {{ $invoice->created_at->toDateString() }}
@if($invoice->status === 'Unpaid') @if(optional($invoice->shipment)->is_certified == 1)
@csrf
@csrf
@else Awaiting Admin Confirmation @endif @else Download Receipt @endif
@empty

No invoices yet.

@endforelse
@endsection