@include('admin.include.header') @include('admin.include.sidebar')

Vehicle Overview — {{ $vehicle->unit_number }}

Vehicle #
{{ $vehicle->unit_number }}
VIN
{{ $vehicle->vin }}
Type
{{ ucfirst($vehicle->type) }}
Status
{{ ucfirst($vehicle->status) }}
Last Inspection Date (Overall)
{{ $overallLastDate ? $overallLastDate->format('Y-m-d') : '—' }}
Last Inspection (Truck)
{{ optional($statusByType['truck']['last_inspection'] ?? null)?->format('Y-m-d') ?? '—' }}
Last Inspection (Trailer)
{{ optional($statusByType['trailer']['last_inspection'] ?? null)?->format('Y-m-d') ?? '—' }}
Next Due Date (Earliest)
{{ $overallNextDue ? $overallNextDue->format('Y-m-d') : '—' }}
{{ $overallStatus }}
Inspection Status by Type
@foreach (['truck', 'trailer'] as $t) @php $info = $statusByType[$t] ?? null; @endphp @endforeach
Type Last Inspection Next Due Status
{{ ucfirst($t) }} {{ optional($info['last_inspection'] ?? null)?->format('Y-m-d') ?? '—' }} {{ optional($info['next_due'] ?? null)?->format('Y-m-d') ?? '—' }} {{ $info['status'] ?? 'Never inspected' }}
Maintenance Summary
Total Maintenance Spend (Lifetime)
${{ number_format($lifetimeMaintenanceTotal, 2) }}
Exports

Maintenance history exports:

Maintenance CSV Maintenance PDF

Inspection report (PDF):

All Inspections PDF

Inspection History (All Months)

@forelse($inspections as $inspection) @empty @endforelse
Date Type Mechanic Status
{{ optional($inspection->inspection_date)->format('Y-m-d') ?? '—' }} {{ ucfirst($inspection->inspection_type ?? '') }} {{ $inspection->mechanic->name ?? '—' }} {{ ucfirst($inspection->status ?? '') }}
No inspections recorded for this vehicle yet.

Maintenance History

@forelse($maintenances as $m) @empty @endforelse
Date Type Description Total Cost
{{ optional($m->date_performed)->format('Y-m-d') ?? '—' }} {{ $m->maintenance_type }} {{ \Illuminate\Support\Str::limit($m->description ?? '', 80) }} ${{ number_format($m->total_cost ?? 0, 2) }}
No maintenance records for this vehicle yet.
@include('admin.include.footer')