@extends('layouts.portal') @section('title', 'Client Details') @section('page_title', 'Client Details') @section('page_subtitle', 'View and manage client information') @section('sidebar') @include('agent.partials.sidebar', ['active' => 'clients']) @endsection @section('content')

Client Details

View and manage client information

Back to Clients

Personal Information

{{ ucfirst($client->status) }}

Full Name

{{ $client->first_name }} {{ $client->last_name }}

Email

{{ $client->email }}

Phone

{{ $client->phone }}

IC Number

{{ $client->ic_number }}

Address

{{ $client->address }}

Account Type

{{ ucfirst($client->account_type) }}

Wills

@if($client->wills->count() > 0)
@foreach($client->wills as $will)

Will #{{ $will->id }}

{{ $will->will_type ?? 'Standard Will' }} • Created: {{ $will->created_at->format('M d, Y') }}

{{ ucfirst(str_replace('_', ' ', $will->status)) }}
@if($will->beneficiaries && $will->beneficiaries->count() > 0)

Beneficiaries ({{ $will->beneficiaries->count() }})

@foreach($will->beneficiaries as $beneficiary)

{{ $beneficiary->name }}

{{ $beneficiary->relationship ?? 'N/A' }}

{{ $beneficiary->percentage ?? 0 }}%

{{ ucfirst($beneficiary->type ?? 'Beneficiary') }}

@endforeach
@endif @if($will->assets && $will->assets->count() > 0)

Assets ({{ $will->assets->count() }})

@foreach($will->assets->take(5) as $asset)

{{ ucfirst($asset->type) }}

{{ $asset->description ?? 'N/A' }}

${{ number_format($asset->value ?? 0, 2) }}

@endforeach @if($will->assets->count() > 5)

+{{ $will->assets->count() - 5 }} more assets

@endif
@endif @if($will->liabilities && $will->liabilities->count() > 0)

Liabilities ({{ $will->liabilities->count() }})

@foreach($will->liabilities->take(5) as $liability)

{{ ucfirst($liability->type) }}

{{ $liability->creditor ?? 'N/A' }}

${{ number_format($liability->amount ?? 0, 2) }}

@endforeach @if($will->liabilities->count() > 5)

+{{ $will->liabilities->count() - 5 }} more liabilities

@endif
@endif
@endforeach
@else

No wills created yet.

Create Will
@endif

Payment History

@if($client->payments->count() > 0)
@foreach($client->payments as $payment)

Payment #{{ $payment->id }}

Method: {{ ucfirst($payment->method) }}

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

${{ number_format($payment->amount, 2) }}

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

No payments recorded.

@endif

KYC Documents

View All
@if($client->kycDocuments->count() > 0)
@foreach($client->kycDocuments->take(3) as $document)
@if($document->file_path) @if(str_contains($document->file_path, '.pdf'))
@elseif(str_contains($document->file_path, '.jpg') || str_contains($document->file_path, '.jpeg') || str_contains($document->file_path, '.png'))
{{ $document->document_type }}'">
@else
@endif @else
@endif

{{ ucfirst(str_replace('_', ' ', $document->document_type)) }}

Uploaded: {{ $document->uploaded_at ? $document->uploaded_at->format('M d, Y') : 'N/A' }}

@if($document->original_filename)

{{ $document->original_filename }}

@endif
{{ ucfirst($document->status ?? 'pending') }}
@endforeach
@if($client->kycDocuments->count() > 3) View all {{ $client->kycDocuments->count() }} documents @endif @else

No KYC documents uploaded yet.

@endif

Family Members

@if($client->familyMembers->count() > 0)
@foreach($client->familyMembers as $member)

{{ $member->name }}

Relationship: {{ ucfirst($member->relationship) }}

IC: {{ $member->ic_number }}

{{ ucfirst($member->relationship) }}
@endforeach
@else

No family members added.

@endif

Liabilities

@if($client->liabilities->count() > 0)
@foreach($client->liabilities as $liability)

{{ ucfirst($liability->type) }}

{{ $liability->description }}

Creditor: {{ $liability->creditor }}

${{ number_format($liability->amount, 2) }}

{{ ucfirst($liability->type) }}
@endforeach
@else

No liabilities recorded.

@endif

Assets

@if($client->assets->count() > 0)
@foreach($client->assets as $asset)

{{ ucfirst($asset->type) }}

{{ $asset->description }}

Value: ${{ number_format($asset->value, 2) }}

${{ number_format($asset->value, 2) }}

{{ ucfirst($asset->type) }}
@endforeach
@else

No assets recorded.

@endif
@endsection