@php $vehicle = $quote->vehicle; $customer = $quote->customer; $titleParts = array_filter([ // $vehicle?->make, $vehicle?->model, $vehicle?->year, $vehicle?->fuel_type, $vehicle?->engine_size ? $vehicle->engine_size . ' CC' : null, ]); $title = !empty($titleParts) ? strtoupper(implode(' ', $titleParts)) : 'QUOTE DETAILS'; $statusClasses = [ 'web_inquiries' => 'bg-label-warning text-warning', 'portal_quote' => 'bg-label-info text-info', 'update_quote' => 'bg-label-primary text-primary', 'accepted' => 'bg-label-success text-success', 'archived' => 'bg-label-secondary text-secondary', 'job_card' => 'bg-label-dark text-dark', 'sold' => 'bg-label-success text-success', ]; $statusClass = $statusClasses[$quote->status] ?? 'bg-label-secondary text-secondary'; $vrm = $vehicle?->vrm ?: $quote->vrm ?? 'N/A'; $shortVin = $vehicle?->vin ? substr($vehicle->vin, -7) : 'N/A'; $quoteUserLabel = match ($listingType) { 'accepted-quotes' => 'Accepted By', 'archived-quotes' => 'Archived By', default => 'Quoted By', }; $quoteUserName = match ($listingType) { 'accepted-quotes' => $quote->acceptedByUser?->name, 'archived-quotes' => $quote->archivedByUser?->name, default => $quote->updatedByUser?->name, }; @endphp
Reference No {{ $quote->quote_number }}
Created at {{ $quote->created_at->format('d-M-Y H:i') }}
{{ $listingType === 'accepted-quotes' ? 'Accepted at' : 'Updated at' }} {{ $listingType === 'accepted-quotes' ? date('d-M-Y H:i', strtotime($quote->accepted_at)) : date('d-M-Y H:i', strtotime($quote->updated_at)) }}
{{ $title }}
UK UK {{ $vrm }} {{ $vehicle?->engine_code ?: 'No Engine Code' }} {{ $shortVin }} {{ $vehicle?->maximum_bhp ?: 'No BHP' }}
{{-- {{ ucwords(str_replace('_', ' ', $quote->status)) }} --}} {{ $quoteUserLabel }} {{ $quoteUserName }} @if ($quote->no_answer === 1 && $listingType === 'updated-quotes') No Answer @endif
@if ($listingType !== 'archived-quotes')
@endif