@php use App\Support\Loan\ClientLocationPolicy; $inFormModal = request()->header('Turbo-Frame') === 'loan-form-modal'; $locationReadOnly = $loan_client->kind === \App\Models\LoanClient::KIND_CLIENT && $loan_client->hasRegisteredCoordinates() && ! ClientLocationPolicy::canChangeExistingClientCoordinates(auth()->user(), $loan_client); @endphp @if ($loan_client->kind === \App\Models\LoanClient::KIND_CLIENT) Client 360 @endif @if ($loan_client->kind === 'lead') Lead workspace @endif Back to list @include('loan.clients.partials.identity-flashes', ['contextClient' => $loan_client]) @if ($loan_client->kind === \App\Models\LoanClient::KIND_CLIENT && $loan_client->isDraft())
This client is saved as a draft. Complete the required details and save to activate the profile, or keep saving as draft while you gather information.
@endif
$inFormModal, 'max-w-7xl grid-cols-1 xl:grid-cols-[minmax(0,1fr)_320px]' => ! $inFormModal, ]) x-data="clientFormPreview()" >
kind === \App\Models\LoanClient::KIND_CLIENT && ! $loan_client->isDraft() && ($operationalStatusForm['can_edit'] ?? false)) x-data="{ submitting: false }" @submit.prevent=" if (submitting) return; const statusSelect = document.getElementById('operational_status'); const reasonInput = document.getElementById('status_change_reason'); const initial = statusSelect?.dataset.initial ?? ''; const next = statusSelect?.value ?? initial; if (! statusSelect || next === initial) { $el.submit(); return; } const result = await (window.swalPrompt ? window.swalPrompt({ title: 'Change client status?', input: 'textarea', inputPlaceholder: 'Reason for this status change…', inputAttributes: { 'aria-label': 'Status change reason' }, confirmButtonText: 'Save status', inputValidator: (value) => { if (! value || ! String(value).trim()) { return 'A reason is required'; } }, }) : Promise.resolve({ isConfirmed: false })); if (! result.isConfirmed) return; if (reasonInput) reasonInput.value = String(result.value).trim(); submitting = true; $el.submit(); " @endif > @csrf @method('patch') @if (filled($returnUrl ?? null)) @endif

Auto-assigned ID (cannot be changed).

@include('loan.clients.partials.spouse-fields', ['client' => $loan_client])
@include('loan.clients.partials.branch-select-with-modal', [ 'fieldId' => 'loan_branch_id', 'selectedBranchId' => old('loan_branch_id', $loan_client->loan_branch_id), 'directoryBranches' => $directoryBranches ?? collect(), 'label' => 'Branch', 'placeholder' => 'Select branch...', ])
{{ old('address', $loan_client->address) }}
@include('loan.clients.partials.lending-profile-fields', ['client' => $loan_client])
@if ($loan_client->kind === 'lead')
@else @if ($loan_client->isDraft())
Draft
@else @include('loan.clients.partials.client-operational-status-select', [ 'loan_client' => $loan_client, 'operationalStatusForm' => $operationalStatusForm ?? [], ]) @endif @endif @include('loan.clients.partials.additional-biodata-fields', ['client' => $loan_client])
@if ($loan_client->kind === \App\Models\LoanClient::KIND_CLIENT && $loan_client->isDraft()) {{ __('Complete client') }} {{ __('Save as draft') }} @else {{ __('Save changes') }} @endif
@if ($loan_client->kind === \App\Models\LoanClient::KIND_CLIENT && $loan_client->isDraft())
@csrf @method('delete')
@endif
@if ($inFormModal)