@extends('layouts.portal') @section('title', 'Will Lifecycle Report') @section('page_title', 'Will Lifecycle Report') @section('page_subtitle', 'Track will creation, approval, and payment journey') @section('sidebar') @include('admin.partials.sidebar', ['active' => 'reports-master']) @endsection @section('content')
Complete audit trail from creation to approval - Total Wills: {{ $willsLifecycle->count() }}
| Will ID | Client Name | Will Type | Status | Created By | Role | Created Date | Invoice Date | Invoice Amount | Invoice Status | Payment Date | Payment Amount | Payment Status | Method | Approved By | Approved Date | Version | Version History | Bene | Liab | Edit Request Date | Edit Created By | Edit Status | Sections Edited | Edit Payment | Edit Approved Date | Edit Approved By |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| {{ $will['id'] }} | {{ $will['client_name'] }} | {{ ucfirst($will['will_type']) }} | @php $statusClass = match($will['status']) { 'completed' => 'bg-green-100 text-green-800', 'draft' => 'bg-yellow-100 text-yellow-800', 'pending_approval' => 'bg-orange-100 text-orange-800', 'approved' => 'bg-blue-100 text-blue-800', default => 'bg-gray-100 text-gray-800' }; @endphp {{ ucfirst(str_replace('_', ' ', $will['status'])) }} | {{ $will['created_by_name'] }} | {{ ucfirst($will['created_by_role']) }} | {{ $will['created_date'] }} | @if($will['invoice_raised_date'] !== 'Not Raised') {{ $will['invoice_raised_date'] }} @else {{ $will['invoice_raised_date'] }} @endif | RM {{ $will['invoice_amount'] }} | {{ ucfirst($will['invoice_status']) }} | @if($will['payment_date'] !== 'Not Paid') {{ $will['payment_date'] }} @else {{ $will['payment_date'] }} @endif | RM {{ $will['payment_amount'] }} | @php $paymentStatusClass = match($will['payment_status']) { 'Completed' => 'bg-green-200 text-green-900', 'Pending' => 'bg-yellow-200 text-yellow-900', 'Failed' => 'bg-red-200 text-red-900', default => 'bg-gray-200 text-gray-900' }; @endphp {{ $will['payment_status'] }} | {{ $will['payment_method'] }} | {{ $will['approved_by_name'] }} | {{ $will['approved_date'] }} | {{ $will['version'] }} | {{ $will['version_history_string'] }} | {{ $will['beneficiaries_count'] }} | {{ $will['liabilities_count'] }} | {{ $will['edit_request_created_date'] }} | {{ $will['edit_request_created_by'] }} | @php $editStatusClass = match($will['edit_request_status']) { 'Approved' => 'bg-green-200 text-green-900', 'Pending' => 'bg-yellow-200 text-yellow-900', 'Rejected' => 'bg-red-200 text-red-900', 'No Edits' => 'bg-gray-200 text-gray-900', default => 'bg-gray-200 text-gray-900' }; @endphp {{ $will['edit_request_status'] }} | {{ $will['edit_request_sections'] }} | {{ $will['edit_request_payment_status'] }} | {{ $will['edit_request_approved_date'] }} | {{ $will['edit_request_approved_by'] }} |
| No will lifecycle data found | ||||||||||||||||||||||||||