@extends('layouts.app') @section('title') Upload Agreement Documents (Unsigned) @endsection @section('css') @endsection @section('content') @if (session('success')) @endif @if (session('error')) @endif
Upload Unsigned Agreement Documents for Lead: {{ $lead->serial_no }}

Upload the unsigned/draft agreement documents (such as Letter of Offer and Agreements) for the borrower to review, sign, and re-upload. Fields marked with * are required. The borrower cannot see or upload against these documents until you click "Submit to Borrower" below.

@if($lead->agreement_submitted_at)
Submitted to borrower on {{ \Carbon\Carbon::parse($lead->agreement_submitted_at)->format('d/m/Y h:i A') }}. Any documents uploaded after this are visible to the borrower immediately.
@endif @php $missingRequired = $docTypes->filter(function ($docType) use ($uploadedDocs) { $existingDoc = $uploadedDocs[$docType->code] ?? null; return $docType->required && !($existingDoc && $existingDoc->unsigned_file_path); }); @endphp
@foreach($docTypes as $docType) @php $existingDoc = $uploadedDocs[$docType->code] ?? null; $hasUnsigned = $existingDoc && $existingDoc->unsigned_file_path; @endphp @endforeach
Name Required Unsigned Document Action
{{ $docType->description }} {{ $docType->required ? 'Yes' : 'No' }} @if($hasUnsigned) {{ $existingDoc->unsigned_file_name }} Uploaded by {{ $existingDoc->unsigned_uploaded_by ?? '-' }} on {{ $existingDoc->unsigned_uploaded_at ? \Carbon\Carbon::parse($existingDoc->unsigned_uploaded_at)->format('d/m/Y h:i A') : '-' }} @else No file uploaded yet. @endif
@csrf
required && !$hasUnsigned ? 'required' : '' }}> @if ($errors->has("documents.{$docType->code}")) {{ $errors->first("documents.{$docType->code}") }} @endif
@csrf
Back to List @if($missingRequired->isNotEmpty()) Upload required documents before submitting: {{ $missingRequired->pluck('description')->implode(', ') }} @endif
View Related Document
@include('components.forms.related-documents', [ 'application_form' => true, 'term_sheet' => true, 'credit_paper' => true, ])
@endsection