@extends('layouts.portal') @section('title', 'Client Details') @section('page_title', 'Client Profile') @section('page_subtitle', $client->full_name) @section('sidebar') @include('admin.partials.sidebar', ['active' => 'clients']) @endsection @section('content')
← Back to Clients
{{ substr($client->first_name, 0, 1) }}

{{ $client->full_name }}

{{ $client->email }}

📞{{ $client->phone ?? 'N/A' }} 🆔{{ $client->ic_number ?? 'N/A' }}
{{ ucfirst($client->status) }}

Joined {{ $client->created_at->format('d M Y') }}

👤

Created By

@if($client->referrer)

{{ $client->referrer->name }} ({{ ucfirst($client->referrer->role) }})

@elseif($client->createdBy)

{{ $client->createdBy->name }} ({{ ucfirst($client->createdBy->role) }})

@else

Unknown

@endif

Created On

{{ $client->created_at->format('d M Y, g:i A') }}

📄

Wills

{{ $client->wills->count() }}

🛡️

KYC Status

{{ $client->risk_rating ?? 'Not Assessed' }}

📁

KYC Documents

{{ $client->kycDocuments->count() }}

👤 Personal Information

Date of Birth {{ $client->date_of_birth ? $client->date_of_birth->format('d M Y') : 'Not provided' }}
Country {{ $client->country ?? 'Not provided' }}
Identification Type {{ $client->identification_type ?? 'Not provided' }}
Occupation {{ $client->occupation ?? 'Not provided' }}
Nationality {{ $client->nationality ?? 'Not provided' }}
Marital Status {{ $client->marital_status ? $client->marital_status_text : 'Not provided' }}
@if($client->father_name_al)
Father's Name (A/L) {{ $client->father_name_al }}
@endif @if($client->mother_name_ap)
Mother's Name (A/P) {{ $client->mother_name_ap }}
@endif

🏠 Address

{{ $client->address ?: 'No address provided' }}

@if($client->marital_status === 'married')

💍 Spouse Details

Spouse Name {{ $client->spouse_name ?: 'Not provided' }}
Spouse IC Number {{ $client->spouse_ic_number ?: 'Not provided' }}
Spouse Phone {{ $client->spouse_phone ?: 'Not provided' }}
Spouse Email {{ $client->spouse_email ?: 'Not provided' }}
@endif @php $children = $client->familyMembers->where('relationship', 'child'); @endphp @if($children->count() > 0)

🧒 Child Details

@foreach($children as $child)

Child {{ $loop->iteration }}: {{ $child->full_name }}

Date of Birth: {{ $child->date_of_birth ? $child->date_of_birth->format('d M Y') : 'Not provided' }}
Gender: {{ $child->gender ? ucfirst($child->gender) : 'Not provided' }}
IC/Passport No.: {{ $child->ic_number ?: 'Not provided' }}
Phone: {{ $child->phone ?: 'Not provided' }}
@endforeach
@endif

📞 Emergency Contacts

@if($client->emergencyContacts && $client->emergencyContacts->count() > 0)
@foreach($client->emergencyContacts as $contact)

Contact #{{ $loop->iteration }}

{{ $contact->name }}

{{ $contact->phone }}

@if($contact->relationship)

{{ ucfirst($contact->relationship) }}

@endif
@endforeach
@else

Not provided

@endif

📄 Wills

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

{{ $will->is_joint ? 'Joint Will' : ($will->will_type === 'individual' ? 'Individual Will' : 'Trust Will') }}

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

{{ App\Models\Will::getStatuses()[$will->status] }} 👁️
@endforeach
@else

No wills created yet

@endif

📁 KYC Uploaded Documents

@if($client->kycDocuments->count() > 0)
@foreach($client->kycDocuments as $document)

{{ $document->document_type_label }}

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

Document No: {{ $document->document_number ?: 'Not provided' }}

Uploaded: {{ $document->uploaded_at ? $document->uploaded_at->format('d M Y') : $document->created_at->format('d M Y') }}

@if($document->file_path) 👁️ View Document @else

No file uploaded

@endif
@endforeach
@else

No KYC documents uploaded yet

@endif
@endsection