@extends('layouts.portal')
@section('title', 'Complete Trust Summary')
@section('page_title', 'Complete Trust Summary')
@section('page_subtitle', 'View all trust information')
@section('sidebar')
@include('client.partials.onboarding-sidebar', ['step' => 1])
@endsection
@push('styles')
@include('components.form-styles')
@endpush
@section('content')
Trust Information
Trust Name
{{ $trust->trust_name ?? 'N/A' }}
Trust Type
{{ str_replace('_', ' ', $trust->trust_type ?? 'N/A') }}
Status
{{ ucfirst(str_replace('_', ' ', $trust->status ?? 'N/A')) }}
Created
{{ $trust->created_at ? $trust->created_at->format('d M Y') : 'N/A' }}
Trust Purpose:
{{ $trust->trust_purpose ?? 'N/A' }}
Trust Code:
{{ $trust->trust_code ?? 'N/A' }}
@php
$trustCreatorDetails = is_string($trust->trust_creator) ? json_decode($trust->trust_creator, true) ?? [] : ($trust->trust_creator ?? []);
$trustCreatorName = $trustCreatorDetails['full_name'] ?? $trustCreatorDetails['name'] ?? $trust->client->full_name ?? 'N/A';
$trustCreatorIC = $trustCreatorDetails['ic'] ?? $trustCreatorDetails['ic_number'] ?? $trust->client->ic_number ?? 'N/A';
$trustCreatorAddress = $trustCreatorDetails['address'] ?? $trust->client->address ?? 'N/A';
@endphp
Settlor Information
Full Name:
{{ strtoupper($trustCreatorName) }}
NRIC/Passport:
{{ $trustCreatorIC }}
Address:
{{ $trustCreatorAddress }}
@php
$trustees = $trust->trustees->map(fn($t) => ['full_name' => $t->full_name, 'ic' => $t->ic_or_reg_no, 'address' => $t->address, 'phone' => $t->phone])->toArray();
@endphp
Trustees ({{ count($trustees) }})
@if(count($trustees) > 0)
| Name |
NRIC/Passport |
Address |
Contact |
@foreach($trustees as $trustee)
| {{ strtoupper($trustee['full_name'] ?? 'N/A') }} |
{{ $trustee['ic'] ?? 'N/A' }} |
{{ $trustee['address'] ?? 'N/A' }} |
{{ $trustee['phone'] ?? 'N/A' }} |
@endforeach
@else
No trustees recorded.
@endif
@php
$beneficiaries = $trust->beneficiaries->map(fn($b) => ['full_name' => $b->full_name, 'type' => $b->beneficiary_type, 'ic' => $b->ic_or_reg_no, 'phone' => $b->phone])->toArray();
@endphp
Beneficiaries ({{ count($beneficiaries) }})
@if(count($beneficiaries) > 0)
| Full Name |
Type |
NRIC/Passport |
Contact |
@foreach($beneficiaries as $beneficiary)
| {{ strtoupper($beneficiary['full_name'] ?? 'N/A') }} |
{{ str_replace('_', ' ', ucfirst($beneficiary['type'] ?? 'N/A')) }} |
{{ $beneficiary['ic'] ?? 'N/A' }} |
{{ $beneficiary['phone'] ?? 'N/A' }} |
@endforeach
@else
No beneficiaries recorded.
@endif
@php
$assets = $trust->assets->map(fn($a) => ['description' => $a->description, 'category' => $a->asset_category, 'value' => $a->current_value])->toArray();
$totalAssetValue = collect($assets)->sum('value');
@endphp
Trust Assets ({{ count($assets) }})
@if(count($assets) > 0)
| Description |
Category |
Value (RM) |
@foreach($assets as $asset)
| {{ $asset['description'] ?? 'N/A' }} |
{{ str_replace('_', ' ', ucfirst($asset['category'] ?? 'N/A')) }} |
RM {{ number_format($asset['value'] ?? 0, 2) }} |
@endforeach
Total Trust Asset Value: RM {{ number_format($totalAssetValue, 2) }}
@else
No assets recorded.
@endif
@php
$allowances = $trust->allowances->map(fn($a) => ['beneficiary' => $a->beneficiary_name, 'amount' => $a->monthly_amount, 'frequency' => $a->frequency, 'start_date' => $a->start_date])->toArray();
@endphp
@if(count($allowances) > 0)
Allowances & Distributions ({{ count($allowances) }})
| Beneficiary |
Amount (RM) |
Frequency |
Start Date |
@foreach($allowances as $allowance)
| {{ $allowance['beneficiary'] ?? 'N/A' }} |
RM {{ number_format($allowance['amount'] ?? 0, 2) }} |
{{ ucfirst($allowance['frequency'] ?? 'N/A') }} |
{{ isset($allowance['start_date']) ? date('M d, Y', strtotime($allowance['start_date'])) : 'N/A' }} |
@endforeach
@endif
@php
$gifts = $trust->gifts->map(fn($g) => ['description' => $g->description, 'value' => $g->value])->toArray();
@endphp
@if(count($gifts) > 0)
Gifts & Bequests ({{ count($gifts) }})
| Description |
Value (RM) |
@foreach($gifts as $gift)
| {{ $gift['description'] ?? 'N/A' }} |
RM {{ number_format($gift['value'] ?? 0, 2) }} |
@endforeach
@endif
@php
$caretakers = $trust->caretakers->map(fn($c) => ['full_name' => $c->full_name, 'role' => $c->role, 'ic' => $c->ic_or_reg_no, 'phone' => $c->phone])->toArray();
@endphp
@if(count($caretakers) > 0)
Caretakers ({{ count($caretakers) }})
| Full Name |
Role |
NRIC/Passport |
Contact |
@foreach($caretakers as $caretaker)
| {{ strtoupper($caretaker['full_name'] ?? 'N/A') }} |
{{ ucfirst($caretaker['role'] ?? 'N/A') }} |
{{ $caretaker['ic'] ?? 'N/A' }} |
{{ $caretaker['phone'] ?? 'N/A' }} |
@endforeach
@endif
@php
$guardianAllowances = $trust->guardianAllowances->map(fn($ga) => ['name' => $ga->name, 'amount' => $ga->monthly_amount, 'frequency' => $ga->frequency, 'start_date' => $ga->start_date])->toArray();
@endphp
@if(count($guardianAllowances) > 0)
Guardian & Caretaker Allowances ({{ count($guardianAllowances) }})
| Name |
Amount (RM) |
Frequency |
Start Date |
@foreach($guardianAllowances as $allowance)
| {{ $allowance['name'] ?? 'N/A' }} |
RM {{ number_format($allowance['amount'] ?? 0, 2) }} |
{{ ucfirst($allowance['frequency'] ?? 'N/A') }} |
{{ isset($allowance['start_date']) ? date('M d, Y', strtotime($allowance['start_date'])) : 'N/A' }} |
@endforeach
@endif
@php
$administratorAllowances = $trust->administratorAllowances->map(fn($aa) => ['name' => $aa->name, 'amount' => $aa->monthly_amount, 'frequency' => $aa->frequency])->toArray();
@endphp
@if(count($administratorAllowances) > 0)
Administrator Allowances ({{ count($administratorAllowances) }})
| Administrator |
Amount (RM) |
Frequency |
@foreach($administratorAllowances as $allowance)
| {{ $allowance['name'] ?? 'N/A' }} |
RM {{ number_format($allowance['amount'] ?? 0, 2) }} |
{{ ucfirst($allowance['frequency'] ?? 'N/A') }} |
@endforeach
@endif
@php
$donations = $trust->donations->map(fn($d) => ['organization' => $d->organization_name, 'amount' => $d->donation_amount, 'purpose' => $d->donation_purpose])->toArray();
@endphp
@if(count($donations) > 0)
Charitable Donations ({{ count($donations) }})
| Organization |
Amount (RM) |
Purpose |
@foreach($donations as $donation)
| {{ $donation['organization'] ?? 'N/A' }} |
RM {{ number_format($donation['amount'] ?? 0, 2) }} |
{{ $donation['purpose'] ?? 'N/A' }} |
@endforeach
@endif
@endsection