@php $ws = $approvalWorkspace ?? []; $terms = $ws['terms'] ?? ['requested' => [], 'recommended' => [], 'approved' => []]; $req = $terms['requested'] ?? []; $rec = $terms['recommended'] ?? []; $apr = $terms['approved'] ?? []; $fmt = static fn ($n) => number_format((float) ($n ?? 0), 2); $termLabel = static function (array $row): string { $v = (int) ($row['term_value'] ?? 0); $u = (string) ($row['term_unit'] ?? 'monthly'); return $v > 0 ? $v.' '.$u : '—'; }; // tabs = legacy pill nav; steps = parent Alpine workspaceStep drives visibility $lafMode = $approvalLafMode ?? 'steps'; $stepMode = $lafMode === 'steps'; @endphp
Credit Approval Decision
{{ $ws['rail_label'] ?? 'Approval' }}
@if (! empty($ws['credit_approved']))Credit approved @if (! empty($ws['ready_for_payout'])) · Ready for payout @else · Not ready for payout @endif
@endif| Field | Requested | Recommended | Approved |
|---|---|---|---|
| Principal | {{ $fmt($req['principal'] ?? 0) }} | {{ $fmt($rec['principal'] ?? 0) }} | {{ $fmt($apr['principal'] ?? 0) }} |
| Term | {{ $termLabel($req) }} | {{ $termLabel($rec) }} | {{ $termLabel($apr) }} |
| Frequency | {{ $req['repayment_frequency'] ?? '—' }} | {{ $rec['repayment_frequency'] ?? '—' }} | {{ $apr['repayment_frequency'] ?? '—' }} |
Appraisal recommendation: {{ str($rec['decision'])->replace('_', ' ')->headline() }}
@endifApproved principal is set when you record the approval decision. You can change it from the requested amount there.
Client
{{ $ws['client_summary']['client_name'] ?? '—' }}
{{ $ws['client_summary']['client_number'] ?? '' }} · {{ $ws['client_summary']['branch'] ?? '' }}
Product: {{ $ws['product'] ?? '—' }}
Capacity & security
@if (! empty($ws['affordability']['available']))Affordability: {{ $ws['affordability']['result'] ?? '—' }} ({{ $ws['affordability']['installment_ratio'] ?? '—' }}%)
@elseAffordability analysis unavailable
@endifGuarantors: {{ $ws['guarantors']['count'] ?? 0 }} · Collateral: {{ $ws['collateral'] ?? '—' }}
Client
{{ $ws['client_summary']['client_name'] ?? '—' }}
{{ $ws['client_summary']['client_number'] ?? '' }} · {{ $ws['client_summary']['branch'] ?? '' }}
Product: {{ $ws['product'] ?? '—' }}
Capacity & security
@if (! empty($ws['affordability']['available']))Affordability: {{ $ws['affordability']['result'] ?? '—' }} ({{ $ws['affordability']['installment_ratio'] ?? '—' }}%)
@elseAffordability analysis unavailable
@endifGuarantors: {{ $ws['guarantors']['count'] ?? 0 }} · Collateral: {{ $ws['collateral'] ?? '—' }}
Appraisal readiness
{{ str(($appraisalReady['status'] ?? 'unknown'))->replace('_', ' ')->headline() }} · {{ $appraisalReady['completion_percentage'] ?? 0 }}%
Evidence before approval
@forelse (($ws['evidence']['before_approval_blockers'] ?? []) as $blocker){{ $blocker['label'] ?? 'Evidence required' }} @if (! empty($blocker['action_url'])) Open @endif
@emptyNo evidence blocking approval.
@endforelseOpen items before payout
@foreach ($ws['pre_treasury_blockers'] as $blocker){{ $blocker['label'] ?? '' }}
@endforeach{{ $ex['description'] ?? ($ex['type'] ?? 'Exception') }}
Policy {{ $ex['policy_value'] ?? '—' }} → Actual {{ $ex['actual_value'] ?? '—' }}
@if (! empty($ex['reason'])){{ $ex['reason'] }}
@endifNo exceptions recorded.
@endforelse @if (! empty($ws['conditions']))Approval conditions
Graduation context
Suggested {{ $fmt($ws['graduation']['suggested_limit'] ?? 0) }} · Approved {{ $fmt($ws['graduation']['approved_amount'] ?? ($ws['graduation']['requested_amount'] ?? 0)) }} @if (isset($ws['graduation']['graduation_percent'])) · {{ $ws['graduation']['graduation_percent'] }}% @endif
{{ $ex['description'] ?? ($ex['type'] ?? 'Exception') }}
Policy {{ $ex['policy_value'] ?? '—' }} → Actual {{ $ex['actual_value'] ?? '—' }}
@if (! empty($ex['reason'])){{ $ex['reason'] }}
@endifNo exceptions recorded.
@endforelse @if (! empty($ws['conditions']))Approval conditions
Graduation context
Suggested {{ $fmt($ws['graduation']['suggested_limit'] ?? 0) }} · Approved {{ $fmt($ws['graduation']['approved_amount'] ?? ($ws['graduation']['requested_amount'] ?? 0)) }} @if (isset($ws['graduation']['graduation_percent'])) · {{ $ws['graduation']['graduation_percent'] }}% @endif
Decision history
@if (! empty($ws['legacy_decision']))Earlier approval record.
@endif @forelse (($ws['timeline'] ?? []) as $entry){{ $entry['decision'] ?? '—' }} · {{ $entry['actor'] ?? '—' }}
{{ optional($entry['timestamp'] ?? null)->diffForHumans() ?? '' }}
{{ $entry['comment'] ?? '' }}
No decision timeline entries yet.
@endforelse