@props(['vehicle', 'activeReservation', 'customers'])

Next action

Listing performance & availability →@if(in_array($vehicle->status, ['draft', 'in_transit']))@can('update', $vehicle)

Complete make, model, year and chassis/VIN, then advance the vehicle.

@csrf
@endcan @endif @if(in_array($vehicle->status, ['available', 'in_transit']))@can('reserve', $vehicle)@if($vehicle->status === 'in_transit')

You can reserve this vehicle for a customer while it is in transit. Record its arrival before handover.

@endif
@csrf
@endcan @endif @if($vehicle->status === 'reserved' && $activeReservation)

{{ $activeReservation->customer->display_name }}

Reserved until {{ $activeReservation->expires_at->format('d M Y, H:i') }} EAT.

@can('sell', $vehicle)
Record final sale
@csrf
@endcan @can('reserve', $vehicle)
Cancel reservation
@csrf
@endcan @elseif($vehicle->status === 'sold')@if($vehicle->sale)@can('deliver', $vehicle)
@csrf@endcan @else

Legacy sold record. No final sale price or buyer was inferred. Reconcile the historical sale before further handover processing.

@endif @elseif($vehicle->status === 'delivered')

Delivered {{ $vehicle->delivered_at?->format('d M Y, H:i') }} EAT. The sale and handover history are retained.

@endif

Reservation history

@forelse($vehicle->reservations->sortByDesc('id') as $reservation)
{{ $reservation->customer->display_name }}

Expires {{ $reservation->expires_at->format('d M, H:i') }} EAT

@if($reservation->cancellation_reason)

{{ $reservation->cancellation_reason }}

@endif
@empty

No reservations recorded.

@endforelse