@extends('layouts.app') @section('title') @lang('Application') @endsection @section('css') @endsection @section('content') @component('components.breadcrumb') @slot('li_1') Lead Finalization & Disbursement @endslot @slot('title') Client Acceptance @endslot @endcomponent

{!! $lead->processStatus->note_borrower ?? 'Upload your signed documents. Once all your document has been verified, it will automatically move to next process' !!}

@if (session('success')) @endif @if (session('error')) @endif @if ($lead->status == '204' && !$lead->agreement_submitted_at)
Your agreement documents are being prepared. You'll be able to review and sign them here once they're ready.
@elseif ($lead->status == '204') @php $allUploaded = true; @endphp
@foreach ($docTypes as $docType) @php $leadDoc = isset($uploadedDocs[$docType->code]) ? $uploadedDocs[$docType->code]->first() : null; @endphp @continue(!$leadDoc || !$leadDoc->unsigned_file_path) @php $hasSignedUpload = $leadDoc && $leadDoc->files->isNotEmpty(); if (!$hasSignedUpload) { $allUploaded = false; } @endphp @endforeach
Name Unsigned Document Uploaded Document Verified Action
{{ $docType->description }} Download {{-- Previous rejection remarks --}} @if ($leadDoc->verify_status_1 == 'rejected')
This document was rejected. @if ($leadDoc->verify_remarks_1)
Reason: {{ $leadDoc->verify_remarks_1 }}
@endif Please upload a corrected signed copy below.
@endif {{-- Uploaded files preview --}} @if ($hasSignedUpload) @foreach ($leadDoc->files as $file) @endforeach @else No file uploaded yet. @endif
@if ($leadDoc->verify_status_1 == 'accepted') @elseif ($leadDoc->verify_status_1 == 'rejected') @else - @endif {{-- Upload field - one form/submit per document --}}
@csrf
@csrf @if (!$allUploaded)
Upload all documents above before submitting.
@endif
{{-- View Only if 1401 or 1402 --}} {{-- @elseif (in_array($lead->status, ['1201', '1202'])) --}} @else
@foreach ($docTypes as $docType) @php $leadDocReadOnly = isset($uploadedDocs[$docType->code]) ? $uploadedDocs[$docType->code]->first() : null; @endphp @continue(!$leadDocReadOnly || !$leadDocReadOnly->unsigned_file_path) @endforeach
Name Unsigned Document Uploaded Document Verified
{{ $docType->description }} Download @if ($leadDocReadOnly->files->isNotEmpty()) @foreach ($leadDocReadOnly->files as $file) @endforeach @else

No file uploaded for this document yet.

@endif
@if ($leadDocReadOnly->verify_status_1 == 'accepted') @elseif ($leadDocReadOnly->verify_status_1 == 'rejected') @else - @endif
@endif
@endsection @section('script') {{-- select2 --}} {{-- --}} @endsection