@php use App\Support\LoanBook\SignatureTimestamp; $officerSignatures = app(\App\Services\LoanBook\Appraisal\LoanBookAppraisalOfficerSignatureService::class); $existingSignature = $officerSignatures->signatureDataUri($appraisal); $signedAt = SignatureTimestamp::forInput( old('officer_signed_at', $appraisal?->officer_signed_at) ); $suggestedName = old( 'officer_signature_name', $appraisal?->assignedOfficer?->name ?? auth()->user()?->name ?? '' ); $showSignature = $errors->has('officer_signature') || $errors->has('officer_signed_at') || filled($existingSignature) || filled(old('officer_signature')) || $canEdit; $signatureConfig = [ 'existingSignature' => $existingSignature, 'signedAt' => (string) $signedAt, 'suggestedName' => (string) $suggestedName, 'initialOpen' => $showSignature, ]; $readOnly = ! $canEdit || ($appraisal?->isOfficerComplete() ?? false); $sigStatus = filled($existingSignature) ? 'Signed' : ($canEdit ? 'Required' : null); $saveFormId = $saveFormId ?? null; @endphp
@unless ($readOnly) Submitted @endunless @if ($readOnly)

Signed at

{{ \App\Support\LoanBook\SignatureTimestamp::display($appraisal?->officer_signed_at) }}

@if ($existingSignature) Loan officer signature @else

Not captured

@endif
@else
@error('officer_signed_at')

{{ $message }}

@enderror
@include('loan.book.applications.partials.signature-pad-actions', ['clearLabel' => 'Clear signature']) @error('officer_signature')

{{ $message }}

@enderror
@endif