@include('pdf._styles') @php $statusText = ['ok' => 'On file', 'expiring' => 'Expiring', 'expired' => 'Expired', 'overdue' => 'Overdue', 'missing' => 'Missing', 'needs_date' => 'No expiry date', 'not_due' => 'Not due yet', 'optional' => 'Optional']; $clearText = ['cleared' => 'Cleared to drive', 'expiring' => 'Cleared — something expires within 90 days', 'not_cleared' => 'Not cleared to drive']; @endphp
@if($logo)
@endif
{{ $company?->name }}
{{ $company?->address }}@if($company?->city), {{ $company->city }}, {{ $company->state }} {{ $company->zip }}@endif
@if($company?->usdot_no)USDOT {{ $company->usdot_no }}@endif @if($company?->mc_no) · MC {{ $company->mc_no }}@endif
DRIVER QUALIFICATION FILE
49 CFR 391.51 · printed {{ now()->format('m/d/Y') }}
Driver{{ $driver->full_name }} @if($driver->employee_code)({{ $driver->employee_code }})@endif Hire date{{ $driver->hire_date?->format('m/d/Y') ?? '—' }}
CDL{{ trim(($info['cdl_state'] ?? '').' '.($info['cdl_number'] ?? '')) ?: '—' }} @if($driver->driverDetail?->cdl_expiry)· exp. {{ $driver->driverDetail->cdl_expiry->format('m/d/Y') }}@endif Medical card{{ $driver->driverDetail?->medical_card_expiry?->format('m/d/Y') ?? '—' }}
Phone{{ $info['phone'] ?? '—' }}Status{{ ucfirst($driver->status) }}
{{ $clearText[$check['clearance']] }} · {{ $check['done'] }} of {{ $check['required'] }} required items on file @if($check['blockers']) · Missing / expired: {{ collect($check['blockers'])->pluck('label')->implode(', ') }}@endif

Checklist

@foreach($check['items'] as $i) @continue(! $i['required'] && ! $i['count']) @endforeach
ItemRuleStatusExpires / dueDocs
{{ $i['label'] }}@if(! $i['required']) (optional)@endif {{ $i['rule'] }} {{ $statusText[$i['status']] ?? $i['status'] }} {{ $i['due_on'] ? \Illuminate\Support\Carbon::parse($i['due_on'])->format('m/d/Y') : '—' }} {{ $i['count'] }}

Documents follow in this order. Pictures are printed below; PDF files are included in the ZIP download of this file.

@foreach($pages as $p) @php $d = $p['doc']; @endphp

{{ $loop->iteration }}. {{ $d->label }}

@if($d->notes)@endif
Number{{ $d->document_no ?: '—' }}Done / issued{{ $d->issued_on?->format('m/d/Y') ?? '—' }}
Expires / due{{ $d->expires_on?->format('m/d/Y') ?? '—' }}File{{ $d->file_name ?: 'No file uploaded' }}
Notes{{ $d->notes }}
@if($p['image'])@elseif($d->file_name)

File "{{ $d->file_name }}" is in the ZIP download.

@endif
@endforeach