@extends('admin.layouts.app') @section('title', 'User Detail — ExtraCash Admin') @section('page-title', 'User Detail') @section('breadcrumb', 'Account overview') @section('content') @php $latestKyc = $user->kycRecords->first(); $badgeClass = function (?string $status) { return match ($status) { 'verified', 'successful' => 'verified', 'pending', 'processing', 'requested', 'under_review', 'locked' => 'pending', 'approved', 'paid', 'available' => 'approved', 'rejected', 'failed', 'reversed', 'cancelled', 'expired', 'not_submitted' => 'rejected', default => 'pending', }; }; $labelize = fn (?string $s) => $s ? ucwords(str_replace('_', ' ', $s)) : '—'; @endphp
Wallet Total
ZMW {{ number_format(($user->wallet?->available_balance ?? 0) + ($user->wallet?->pending_balance ?? 0), 2) }}
Payments
{{ number_format($stats['payments_count']) }}
ZMW {{ number_format($stats['payments_total'], 2) }} total
Withdrawals
{{ number_format($stats['withdrawals_count']) }}
ZMW {{ number_format($stats['withdrawals_total'], 2) }} total
Cashback Earned
{{ number_format($stats['cashbacks_count']) }}
ZMW {{ number_format($stats['cashbacks_total'], 2) }} total
{{ $user->name }}
{{ $user->email }}
Temporary password (copy now):
{{ session('temp_password') }}
{{ $n->admin?->name ?? 'Admin' }}
{{ $n->created_at?->format('M d, Y H:i') }}
{{ $n->note }}
No notes yet
@endforelse{{ strtoupper($k->id_type ?? 'ID') }} · {{ $k->id_number ?? '—' }}
{{ $labelize($k->status?->value) }}Submitted {{ $k->created_at?->format('M d, Y H:i') ?? '—' }}
@if($k->review_notes){{ $k->review_notes }}
@endifNo KYC records
@endforelse| Reference | Amount | Status | Date |
|---|---|---|---|
| {{ $p->payment_reference ?? ('#'.$p->id) }} | ZMW {{ number_format($p->amount, 2) }} | {{ $labelize($p->status?->value) }} | {{ $p->created_at?->format('M d, Y H:i') ?? '—' }} |
| No payments | |||
{{ $w->reference ?? ('Withdrawal #'.$w->id) }}
{{ $w->created_at?->format('M d, Y H:i') ?? '—' }}
ZMW {{ number_format($w->amount, 2) }}
{{ $labelize($w->status?->value) }}No withdrawals
@endforelsePayment: {{ $cb->payment?->payment_reference ?? ('#'.$cb->payment_id) }}
Rate {{ number_format(((float)$cb->cashback_rate) * 100, 2) }}% • {{ $cb->created_at?->format('M d, Y H:i') }}
ZMW {{ number_format($cb->cashback_amount, 2) }}
{{ $labelize($cb->status?->value) }}No cashback transactions
@endforelse| Narration | Type | Amount | Date |
|---|---|---|---|
| {{ $t->narration }} | {{ ucfirst($t->type) }} | {{ $t->type === 'credit' ? '+' : '-' }}ZMW {{ number_format($t->amount, 2) }} | {{ $t->transacted_at?->format('M d, Y H:i') ?? '—' }} |
| No wallet transactions | |||