@if ($canActOnWorkflow || $canRejectWorkflow)
@if ($hasApprovalValidationErrors ?? false) @endif @if (($borrowerBlocked ?? false) && ($canActOnWorkflow ?? false))

Client warnings may block approval.

@endif @if ($canActOnWorkflow ?? false) @php $requiresApprovalOtp = ($approvalRequest ?? null) && app(\App\Services\Communication\Otp\OtpApprovalIntegrationService::class) ->requiresOtp((string) $approvalRequest->workflow_key); $aprTerms = (array) ($approvalWorkspace['terms']['approved'] ?? []); $reqTerms = (array) ($approvalWorkspace['terms']['requested'] ?? []); $carryPrincipal = old('approved_principal', $aprTerms['principal'] ?? $reqTerms['principal'] ?? $application->amount_requested ?? ''); $carryTermValue = old('approved_term_value', $aprTerms['term_value'] ?? $reqTerms['term_value'] ?? $application->term_value ?? ''); $carryTermUnit = old('approved_term_unit', $aprTerms['term_unit'] ?? $reqTerms['term_unit'] ?? $application->term_unit ?? 'monthly'); $carryFrequency = old('approved_repayment_frequency', $aprTerms['repayment_frequency'] ?? $reqTerms['repayment_frequency'] ?? $carryTermUnit); @endphp @if ($requiresApprovalOtp && ($approvalRequest ?? null))

Staff OTP confirmation

Loan approval requires a one-time code sent to your staff phone.

@csrf @if (session('otp_challenge_token') || old('otp_challenge_token'))

Code requested — enter the SMS digits below, then approve.

@endif @error('otp_code')

{{ $message }}

@enderror
@endif
@csrf

Requested KES {{ number_format((float) ($reqTerms['principal'] ?? $application->amount_requested ?? 0), 2) }}. You can approve a different amount. If you change it, say why in the decision comment.

This differs from the requested amount. Record why in the decision comment below.

Optional for a standard approval. Required when you approve a different amount or add conditions.

@error('comments')

{{ $message }}

@enderror @error('approval')

{{ $message }}

@enderror @error('approved_principal')

{{ $message }}

@enderror @if ($requiresApprovalOtp && ($approvalRequest ?? null))
@endif @if ($finalApproveBlocked ?? false)

Approval locked

{{ $approveBlockReason }}

@if ($approveBlockReasonHint ?? null)

{{ $approveBlockReasonHint }}

@endif

Tap the locked button to jump to what still needs action.

@else @endif @endif @if ($canRejectWorkflow ?? false)
Reject entire application
@csrf @php $rejectTargets = $approvalWorkspace['reject_targets'] ?? \App\Support\Approval\ApprovalRejectTargetOptions::correctionWorkspaces(); $rejectTargetDefault = old('reject_target', $rejectTargets[0]['value'] ?? 'appraisal'); @endphp @error('reject_target')

{{ $message }}

@enderror @error('comments')

{{ $message }}

@enderror
@endif
@endif