@extends('layouts.app') @section('title', 'Compliance & Documentation') @section('content')

Compliance & documentation

Vehicle registrations, insurance, licences and mandatory NTSA inspections.
@include('transport._nav')

NTSA inspection prompts

Next inspection date taken from compliance documents or the vehicle record
@forelse($inspections as $row) @empty @endforelse
VehicleNext inspectionDocumentStatusPrompt
{{ $row->vehicle->reg_no }} {{ $row->inspection['date'] ? \Carbon\Carbon::parse($row->inspection['date'])->format('d M Y') : 'Not recorded' }} {{ $row->inspection['document']?->document_no ?: '—' }} {{ $row->inspection['label'] }} {{ $row->inspection['message'] }}

Vehicle documents

Registration, insurance, inspection and road-service records
@forelse($vehicleDocs as $row) @empty @endforelse
VehicleTypeDocument no.IssuerExpiresStatusFileActions
{{ $row->document->vehicle?->reg_no ?: '—' }} {{ $row->document->type }} {{ $row->document->document_no ?: '—' }} {{ $row->document->issuer ?: '—' }} {{ $row->document->expires_at ? $row->document->expires_at->format('d M Y') : 'No expiry' }} @if($row->status['days'] !== null)
{{ abs($row->status['days']) }} days {{ $row->status['days'] < 0 ? 'overdue' : 'left' }}
@endif
{{ $row->status['label'] }} @if($row->document->file_path)View@else —@endif
@csrf @method('DELETE')

Driver documents

Driving licences, PSV badges, medical and defensive-driving certificates
@forelse($driverDocs as $row) @empty @endforelse
DriverTypeDocument no.IssuerExpiresStatusFileActions
{{ $row->document->driver?->full_name ?: '—' }} {{ $row->document->type }} {{ $row->document->document_no ?: '—' }} {{ $row->document->issuer ?: '—' }} {{ $row->document->expires_at ? $row->document->expires_at->format('d M Y') : 'No expiry' }} @if($row->status['days'] !== null)
{{ abs($row->status['days']) }} days {{ $row->status['days'] < 0 ? 'overdue' : 'left' }}
@endif
{{ $row->status['label'] }} @if($row->document->file_path)View@else —@endif
@csrf @method('DELETE')
@csrf
@csrf
@foreach($vehicleDocs as $row)
@csrf @method('PUT')
@endforeach @foreach($driverDocs as $row)
@csrf @method('PUT')
@endforeach @endsection