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

Monthly Inspection Report

@if(($month ?? '') === 'all') All conducted inspections{{ $vehicleId ? ' for selected vehicle' : '' }}. @else Inspections in {{ $month ? \Carbon\Carbon::parse($month . '-01')->format('F Y') : '' }}{{ $vehicleId ? ' for selected vehicle' : '' }}. @endif

@forelse($inspections as $i) @php $rMechanic = null; foreach ($i->answers->sortByDesc('created_at') as $a) { $m = $a->mechanic; if ($m && $m->id != 1) { $rMechanic = $m; break; } } if (!$rMechanic && $i->mechanic && $i->mechanic->id != 1) $rMechanic = $i->mechanic; @endphp @empty @endforelse
Vehicle # VIN Date Mechanic Status Actions
{{ $i->vehicle?->unit_number ?? '—' }} {{ $i->vehicle?->vin ?? '—' }} {{ $i->inspection_date ? $i->inspection_date->format('M d, Y H:i') : '—' }}{{ $rMechanic?->name ?? '—' }} @if($i->status === 'pass')Pass @elseif($i->status === 'fix')Fix @elseif($i->status === 'fail')Fail @else — @endif PDF
No inspections in this period.
@include('admin.include.footer')