@extends('admin.layout') @section('title', 'Customer Details') @section('admin-content')
← Back to Users

Total Orders

{{ $totalOrders }}

Total Paid

₦{{ number_format($totalPaid, 0) }}

Outstanding Balance

₦{{ number_format($totalBalance, 0) }}

Customer Info

Name: {{ $user->name }}

Email: {{ $user->email }}

Phone: {{ $user->phone ?? 'N/A' }}

Joined: {{ $user->created_at->format('M d, Y') }}

Orders ({{ $user->orders->count() }})

@if($user->orders->isEmpty())

No orders yet

@else @endif

Payment History

@if($user->orders->flatMap->payments->isEmpty())

No payments yet

@else
@foreach($user->orders->flatMap->payments as $payment)

₦{{ number_format($payment->amount, 0) }}

{{ $payment->created_at->format('M d, Y') }}

{{ ucfirst($payment->status) }}
@endforeach
@endif

Active Pairings

@if($user->pairings->isEmpty())

No pairings yet

@else
@foreach($user->pairings as $pairing)

{{ $pairing->product->name }}

Qty: {{ $pairing->quantity }}

₦{{ number_format($pairing->total_price, 0) }}

{{ ucfirst($pairing->status) }}
@endforeach
@endif
@endsection