@extends('layouts.admin') @section('title', 'Customer Details') @section('content')
@if($customer->profile_photo) {{ $customer->name }} @else {{ strtoupper(substr($customer->name, 0, 1)) }} @endif

{{ $customer->name }}

{{ $customer->email }}

{{ $customer->is_active && !$customer->is_suspended ? 'Active' : 'Inactive' }}

Personal Information

Phone {{ $customer->phone ?? 'N/A' }}
Username {{ $customer->username ?? 'N/A' }}
Role {{ ucfirst($customer->role?->slug ?? 'customer') }}
Joined {{ $customer->created_at?->format('M d, Y') }}
Last Login {{ $customer->last_login_at ? $customer->last_login_at->diffForHumans() : 'Never' }}

Account Summary

Total Accounts {{ $customer->accounts_count }}
Total Balance {{ $currency ?? '₦' }}{{ number_format($customer->accounts->sum('balance'), 2) }}
Total Transactions {{ $customer->transactions_count }}
Total Cards {{ $customer->cards_count }}
Account Number Type Balance Status Actions @forelse($customer->accounts as $account) {{ $account->masked_number }} {{ ucfirst($account->account_type) }} {{ $currency ?? '₦' }}{{ number_format($account->balance, 2) }} {{ ucfirst($account->status) }} View @empty

No accounts found for this customer.

@endforelse
@endsection @push('scripts') @endpush