@extends('layouts.portal') @section('title', 'Will & Trust Status') @section('page_title', 'Will & Trust Status') @section('page_subtitle', 'Track the progress of your wills and trusts') @section('sidebar') @include('client.partials.sidebar', ['active' => 'will-status']) @endsection @section('content')

Will & Trust Status

Monitor your estate planning journey with real-time updates

Last updated: {{ now()->format('M d, Y H:i') }}

{{ $wills->count() }}

Total Wills

Active will documents

{{ $trusts->count() }}

Total Trusts

Trust arrangements

{{ $wills->where('status', 'new')->count() + $trusts->where('status', 'pending_review')->count() }}

In Progress

Awaiting completion

{{ $wills->where('status', 'completed')->count() + $trusts->where('status', 'completed')->count() }}

Completed

Ready to use

Payment Status

Payment Pending

Awaiting payment

{{ $wills->whereIn('payment_status', ['pending', 'processing', 'payment_pending', 'payment_processing'])->count() }}

Payment Completed

Ready for processing

{{ $wills->where('payment_status', 'paid')->count() }}

Quick Actions

@if($wills->count() > 0 || $trusts->count() > 0)

Your Documents

{{ $wills->count() + $trusts->count() }} total documents
@if($wills->count() > 0)

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

@foreach($wills as $will)
@if($will->status === 'dummy') @else @endif

{{ $will->will_type === 'individual' ? 'Individual Will' : 'Trust Will' }} @if($will->status === 'dummy') Test @endif

Created {{ $will->created_at->format('M d, Y') }} @if($will->updated_at != $will->created_at) • Updated {{ $will->updated_at->format('M d, Y') }} @endif

ID: {{ $will->id }} @if($will->version) v{{ $will->version }} @endif @if($will->createdBy && $will->createdBy->role) @if($will->createdBy->role === 'staff' || $will->createdBy->role === 'admin') Staff: {{ $will->createdBy->name }} @else Self Created @endif @else Self Created @endif @if($will->package_name) {{ $will->package_name }} @endif
{{ App\Models\Will::getStatuses()[$will->status] }}
Progress {{ $will->progress_percentage ?? 25 }}%

Draft

Submitted

@if(in_array($will->payment_status, ['pending', 'processing', 'payment_pending', 'payment_processing'])) @elseif($will->payment_status == 'paid' || $will->status == 'completed') @else @endif

Payment

Review

Complete

@if(in_array($will->payment_status, ['pending', 'processing', 'payment_pending', 'payment_processing']) || in_array($will->status, ['payment_pending', 'payment_processing']))
@if($will->payment_status === 'processing' || $will->status === 'payment_processing') @else @endif

Payment Required

Complete payment to proceed

${{ number_format($will->package_price ?? 99, 2) }}

{{ $will->package_name ?? 'Standard Package' }}

@endif @if($will->payment_status == 'paid' && $will->status != 'completed')

Payment Completed

Your will is now under review

SUBMITTED
@endif
View Details @if($will->status == 'completed') Download @endif @if(in_array($will->payment_status, ['pending', 'processing', 'payment_pending', 'payment_processing']) || in_array($will->status, ['payment_pending', 'payment_processing'])) Pay Now @endif
@endforeach
@endif @if($trusts->count() > 0)

Trusts ({{ $trusts->count() }})

@foreach($trusts as $trust)

{{ $trust->trust_name }} Trust

Type: {{ \App\Models\Trust::getTypes()[$trust->trust_type] ?? $trust->trust_type }} • Created {{ $trust->created_at->format('M d, Y') }} @if($trust->updated_at != $trust->created_at) • Updated {{ $trust->updated_at->format('M d, Y') }} @endif

ID: {{ $trust->id }} @if(isset($trust->version) && $trust->version) v{{ $trust->version }} @endif @if($trust->client && $trust->client->user && $trust->client->user->role) @if($trust->client->user->role === 'staff' || $trust->client->user->role === 'admin') Staff: {{ $trust->client->user->name }} @else Self Created @endif @else Self Created @endif @if($trust->trust_purpose) {{ Str::limit($trust->trust_purpose, 30) }} @endif
{{ ucfirst(str_replace('_', ' ', $trust->status)) }}
@if($trust->trust_creator_details) @php $creator = json_decode($trust->trust_creator_details, true) @endphp

TRUST CREATOR

{{ $creator['full_name'] ?? 'N/A' }}

@endif @if($trust->administrators_details) @php $admins = json_decode($trust->administrators_details, true) @endphp

ADMINISTRATORS

{{ count($admins) }} appointed

@endif @if($trust->assets_details) @php $assets = json_decode($trust->assets_details, true) @endphp

ASSETS

{{ count($assets) }} listed

@endif
Progress {{ $trust->progress_percentage ?? 25 }}%

Draft

Submitted

Review

Approved

Active

@php $packageDetails = json_decode($trust->package_details ?? '{}', true); $trustPaymentStatus = $packageDetails['payment_status'] ?? null; $trustPackagePrice = $packageDetails['price'] ?? $packageDetails['package_price'] ?? 299; $trustPackageName = $packageDetails['name'] ?? $packageDetails['package_name'] ?? 'Trust Package'; @endphp @if($trustPaymentStatus && in_array($trustPaymentStatus, ['pending', 'processing', 'payment_pending', 'payment_processing']))
@if($trustPaymentStatus === 'processing') @else @endif

Trust Payment Required

Complete payment to activate your trust

${{ number_format($trustPackagePrice, 2) }}

{{ $trustPackageName }}

@endif @if($trustPaymentStatus == 'paid' && $trust->status != 'approved')

Trust Payment Completed

Your trust is now under review

SUBMITTED
@endif
View Details @if($trust->status == 'pending_review') Continue Editing @endif @if($trustPaymentStatus && in_array($trustPaymentStatus, ['pending', 'processing', 'payment_pending', 'payment_processing'])) Pay Now @endif
@endforeach
@endif
@else

No Wills Created Yet

Your will will be created by your assigned staff member. Please contact them for assistance with your estate planning needs.

Return to Dashboard
@endif @endsection