@if (session()->has('message'))

{{ session('message') }}

@endif

Service Progress

    @php $steps = [ ['key' => 'received', 'title' => 'Vehicle Received', 'description' => 'Your vehicle has been checked in'], ['key' => 'inspection', 'title' => 'Initial Inspection', 'description' => 'Comprehensive vehicle inspection completed'], ['key' => 'diagnosis', 'title' => 'Diagnosis', 'description' => 'Issue diagnosis and root cause analysis'], ['key' => 'estimate', 'title' => 'Estimate Provided', 'description' => 'Repair estimate prepared and sent'], ['key' => 'approved', 'title' => 'Work Approved', 'description' => 'Estimate approved, work can begin'], ['key' => 'in_progress', 'title' => 'Work in Progress', 'description' => 'Repairs and services being performed'], ['key' => 'completed', 'title' => 'Work Completed', 'description' => 'All repairs finished, ready for pickup'], ]; $currentStep = $jobCard->status; @endphp @foreach($steps as $index => $step) @php $isCompleted = in_array($currentStep, ['inspection', 'diagnosis', 'estimate_sent', 'estimate_approved', 'in_progress', 'completed']) && $step['key'] === 'received' || in_array($currentStep, ['diagnosis', 'estimate_sent', 'estimate_approved', 'in_progress', 'completed']) && $step['key'] === 'inspection' || in_array($currentStep, ['estimate_sent', 'estimate_approved', 'in_progress', 'completed']) && $step['key'] === 'diagnosis' || in_array($currentStep, ['estimate_sent', 'estimate_approved', 'in_progress', 'completed']) && $step['key'] === 'estimate' || in_array($currentStep, ['estimate_approved', 'in_progress', 'completed']) && $step['key'] === 'approved' || in_array($currentStep, ['in_progress', 'completed']) && $step['key'] === 'in_progress' || $currentStep === 'completed' && $step['key'] === 'completed'; $isCurrent = ($currentStep === 'pending' && $step['key'] === 'received') || ($currentStep === 'inspection' && $step['key'] === 'inspection') || ($currentStep === 'diagnosis' && $step['key'] === 'diagnosis') || ($currentStep === 'estimate_sent' && $step['key'] === 'estimate') || ($currentStep === 'estimate_approved' && $step['key'] === 'approved') || ($currentStep === 'in_progress' && $step['key'] === 'in_progress') || ($currentStep === 'completed' && $step['key'] === 'completed'); @endphp
  • @if($index < count($steps) - 1) @endif
    @if($isCompleted) @else @endif

    {{ $step['title'] }}

    {{ $step['description'] }}

    @if($isCurrent)
    Current
    @endif
  • @endforeach
@if($jobCard->estimates && $jobCard->estimates->count() > 0)

Estimates

@foreach($jobCard->estimates as $estimate)

Estimate #{{ $estimate->id }}

Created: {{ $estimate->created_at->format('M j, Y g:i A') }}

${{ number_format($estimate->total_amount, 2) }}

{{ ucfirst($estimate->status) }} @if(in_array($estimate->status, ['sent', 'viewed'])) Review Estimate @endif
@endforeach
@endif

Vehicle Information

Vehicle Details

{{ $jobCard->vehicle->year }} {{ $jobCard->vehicle->make }} {{ $jobCard->vehicle->model }}

VIN: {{ $jobCard->vehicle->vin ?? 'Not provided' }}

License: {{ $jobCard->vehicle->license_plate ?? 'Not provided' }}

Mileage: {{ number_format($jobCard->vehicle->mileage ?? 0) }} miles

Service Advisor

{{ $jobCard->serviceAdvisor->name ?? 'Not assigned' }}

@if($jobCard->serviceAdvisor)

{{ $jobCard->serviceAdvisor->email ?? '' }}

{{ $jobCard->serviceAdvisor->phone ?? '' }}

@endif
@if($jobCard->description)

Service Description

{{ $jobCard->description }}

@endif