@extends('admin.layouts.app') @section('title', 'Application #' . $application->id) @section('page-title', 'Application #' . $application->id) @section('page-subtitle', $application->full_name . ' — ' . ucfirst($application->application_type)) @section('content')
@php $sections = [ 'Loan Information' => ['fa-hand-holding-usd', [ 'Desired Loan Amount' => '$' . number_format($application->desired_loan_amount ?? 0, 2), 'Monthly Payment' => '$' . number_format($application->desired_monthly_payment ?? 0, 2), 'Selected Vehicle' => $application->selected_vehicle ?? 'N/A', 'Down Payment' => '$' . number_format($application->down_payment ?? 0, 2), ]], 'Personal Information' => ['fa-user', [ 'Full Name' => $application->full_name, 'Email' => $application->email, 'Daytime Phone' => $application->daytime_phone, 'Evening Phone' => $application->evening_phone ?? 'N/A', 'Address' => $application->address . ', ' . $application->city . ', ' . $application->state . ' ' . $application->zip_code, 'Country' => $application->country, ]], 'Residence & Verification' => ['fa-home', [ 'DOB' => $application->date_of_birth ? \Carbon\Carbon::parse($application->date_of_birth)->format('M j, Y') : 'N/A', 'SSN (Last 4)' => '***-**-' . ($application->ssn_last4 ?? '****'), 'Residence Type' => $application->residence_type ?? 'N/A', 'Mortgage/Rent' => '$' . number_format($application->mortgage_rent_payment ?? 0, 2) . '/mo', 'Time at Residence' => ($application->time_at_residence_years ?? 'N/A') . ' years', 'DL Number' => $application->drivers_license_number ?? 'N/A', 'DL State' => $application->drivers_license_state ?? 'N/A', 'DL Expiry' => $application->drivers_license_expiry ? \Carbon\Carbon::parse($application->drivers_license_expiry)->format('M j, Y') : 'N/A', ]], 'Employment Information' => ['fa-briefcase', [ 'Employer' => $application->employer_name ?? 'N/A', 'Status' => $application->employment_status ?? 'N/A', 'Occupation' => $application->occupation ?? 'N/A', 'Time on Job' => ($application->time_on_job_years ?? 'N/A') . ' years', 'Pay Frequency' => $application->pay_frequency ?? 'N/A', 'Paycheck Amount' => '$' . number_format($application->paycheck_amount ?? 0, 2), ]], 'Vehicle Information' => ['fa-car', [ 'Make' => $application->vehicle_make ?? 'N/A', 'Model' => $application->vehicle_model ?? 'N/A', 'Year' => $application->vehicle_year ?? 'N/A', 'Mileage' => $application->vehicle_mileage ?? 'N/A', 'Trade-in' => ($application->tradein_make ?? '') . ' ' . ($application->tradein_model ?? '') . ' ' . ($application->tradein_year ?? ''), ]], ]; @endphp @foreach($sections as $title => [$icon, $fields])

{{ $title }}

@foreach($fields as $label => $value)

{{ $label }}

{{ $value ?: 'N/A' }}

@endforeach
@endforeach @if($application->additional_comments)

Additional Comments

{{ $application->additional_comments }}

@endif

Application Status

{{ $application->status }}
@csrf @method('PATCH')

Application Info

ID#{{ $application->id }}
Type{{ str_replace('_', ' ', $application->application_type) }}
Submitted{{ \Carbon\Carbon::parse($application->created_at)->format('M j, Y') }}
IP Address{{ $application->ip_address ?? 'N/A' }}
Consent{{ $application->consent_given ? 'Given' : 'Not Given' }}
Back to List
@endsection