Welcome back, {{ Auth::user()->name }}!

Here's an overview of your vehicle services and appointments.

Total Vehicles
{{ $stats['total_vehicles'] }}
Active Services
{{ $stats['active_jobs'] }}
Pending Estimates
{{ $stats['pending_estimates'] }}
Completed Services
{{ $stats['completed_services'] }}

Active Services

@if($activeJobCards->count() > 0)
@foreach($activeJobCards as $jobCard)

Job Card #{{ $jobCard->id }}

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

@if($jobCard->serviceAdvisor)

Advisor: {{ $jobCard->serviceAdvisor->name }}

@endif
{{ ucfirst(str_replace('_', ' ', $jobCard->status)) }} View Details
@endforeach
@else

No active services

You don't have any vehicles currently being serviced.

@endif

Recent Activity

@if($recentActivity->count() > 0)
@foreach($recentActivity as $activity)
@if($activity['type'] === 'job_card')
@else
@endif

{{ $activity['title'] }}

{{ $activity['description'] }}

{{ $activity['date']->diffForHumans() }}

@endforeach
@else

No recent activity

Your activity will appear here once you start using our services.

@endif
@if($upcomingAppointments->count() > 0)

Upcoming Appointments

@foreach($upcomingAppointments as $appointment)

{{ $appointment->service_type }}

{{ $appointment->scheduled_datetime->format('M j, Y g:i A') }}

@if($appointment->notes)

{{ $appointment->notes }}

@endif
{{ ucfirst($appointment->status) }}
@endforeach
@endif