@include('loan.accounting.partials.flash') @php $approvalRailSteps = collect($approvalRequest->approval_path ?? [])->map(fn (array $step): array => [ 'key' => (string) ($step['step_key'] ?? ''), 'label' => (string) ($step['step_name'] ?? $step['step_key'] ?? 'Step'), ])->values()->all(); $approvalRailStatus = (string) ($approvalRequest->current_step_key ?: $approvalRequest->current_status); @endphp
@if ($approvalRailSteps !== []) @endif
Status
{{ $approvalRequest->current_status }}
Current step
{{ $approvalRequest->current_step_key ?? '—' }}
Requester
{{ $approvalRequest->requester?->name }}
Amount
@php $approvalAmount = $approvalRequest->approvable instanceof \App\Models\LoanBookApplication ? $approvalRequest->approvable->displayPrincipal() : ($approvalRequest->amount !== null ? (float) $approvalRequest->amount : null); @endphp{{ $approvalAmount !== null ? number_format((float) $approvalAmount, 2) : '—' }}
@if ($approvalRequest->reason_text)

Reason: {{ $approvalRequest->reason_text }}

@endif

Approval path

    @foreach ($approvalRequest->approval_path ?? [] as $step)
  1. {{ $step['step_order'] ?? '' }}. {{ $step['step_name'] ?? $step['step_key'] }} {{ $step['required_permission'] ?? '' }}
  2. @endforeach
@if (! empty($waitingPanel) && $approvalRequest->isOpen()) @endif @if ($canAct && $approvalRequest->isOpen())

Actions

@if ($requiresOtp ?? false)

OTP verification required

@csrf
@endif
@csrf @if ($requiresOtp ?? false) @error('otp_code')

{{ $message }}

@enderror @endif
@csrf
@endif