Vehicle Diagnosis

Complete diagnostic analysis for Job Card #{{ $jobCard->job_number }}

{{ $jobCard->customer->first_name }} {{ $jobCard->customer->last_name }}
{{ $jobCard->vehicle->year }} {{ $jobCard->vehicle->make }} {{ $jobCard->vehicle->model }}
@if (session()->has('progress_saved'))

{{ session('progress_saved') }}

@endif

Vehicle Information

{{ $jobCard->customer->first_name }} {{ $jobCard->customer->last_name }}

{{ $jobCard->customer->phone }}

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

{{ $jobCard->vehicle->license_plate }}

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

{{ $jobCard->arrival_datetime->format('M j, Y') }}

{{ $jobCard->arrival_datetime->format('g:i A') }}

Customer Reported Issues

@if($showTimesheetSection)

Current Diagnosis Session

Track time spent on diagnosis activities

@if($currentTimesheet)
Session Active
Started: {{ \Carbon\Carbon::parse($currentTimesheet['start_time'])->format('g:i A') }}
@endif
@error('selectedDiagnosisType')

{{ $message }}

@enderror
@if(!$currentTimesheet) @else @endif
@if($currentTimesheet)
{{ \Carbon\Carbon::parse($currentTimesheet['start_time'])->diffForHumans(null, true) }}
Elapsed Time
@else
Ready to Start
@endif
@if(count($timesheets) > 0)

Previous Sessions

@foreach($timesheets as $timesheet) @endforeach
Type Start Time End Time Duration Technician Name Status
{{ $timesheet['description'] }} {{ \Carbon\Carbon::parse($timesheet['start_time'])->format('M j, g:i A') }} @if($timesheet['end_time']) {{ \Carbon\Carbon::parse($timesheet['end_time'])->format('M j, g:i A') }} @else Active @endif @if($timesheet['end_time']) {{ number_format(\Carbon\Carbon::parse($timesheet['start_time'])->diffInHours(\Carbon\Carbon::parse($timesheet['end_time'])), 2) }} hours @else In Progress @endif {{ $timesheet['user']['name'] ?? 'Unknown' }} {{ $timesheet['status'] === 'submitted' ? 'Completed' : 'In Progress' }}
@endif
@endif

Diagnostic Analysis

Complete your diagnostic findings and analysis

@error('diagnostic_findings')

{{ $message }}

@enderror
@error('recommended_repairs')

{{ $message }}

@enderror
@if($showPartsSection)

Parts Catalog ({{ \App\Models\Part::where('status', 'active')->count() }} parts available)

@if($filteredParts && $filteredParts->count() > 0)
@foreach($filteredParts as $part)

{{ $part->name }}

{{ $part->part_number }} • {{ $part->category }}

${{ number_format($part->sell_price, 2) }}

Stock: {{ $part->quantity_on_hand }}

@endforeach
@elseif($partSearchTerm)

No parts found matching "{{ $partSearchTerm }}"

@elseif($partSearchTerm === '' && $partCategoryFilter === '')

Start typing to search for parts...

{{ \App\Models\Part::where('status', 'active')->count() }} parts available

@endif
@if(count($parts_required) > 0)

Selected Parts

@foreach($parts_required as $index => $part)
@if($part['part_id'])

{{ $part['part_name'] }}

{{ $part['part_number'] }}

Catalog @else
Custom
@endif
@if($part['part_id'])

${{ number_format($part['estimated_cost'], 2) }}

@else
$
@endif
@if(!$part['part_id'])
@endif

Total

${{ number_format(($part['estimated_cost'] ?? 0) * ($part['quantity'] ?? 1), 2) }}

@endforeach
Parts Total: ${{ number_format(collect($parts_required)->sum(fn($part) => ($part['estimated_cost'] ?? 0) * ($part['quantity'] ?? 1)), 2) }}
@endif
@endif
@if($showLaborSection)

Service Operations Catalog

@if($filteredServiceItems && $filteredServiceItems->count() > 0)
@foreach($filteredServiceItems as $serviceItem)

{{ $serviceItem->name }}

{{ $serviceItem->category }}

@if($serviceItem->description)

{{ Str::limit($serviceItem->description, 60) }}

@endif

{{ $serviceItem->estimated_hours }}h

${{ number_format($serviceItem->labor_rate, 2) }}/hr

${{ number_format($serviceItem->estimated_hours * $serviceItem->labor_rate, 2) }}

@endforeach
@elseif($serviceSearchTerm)

No service operations found matching "{{ $serviceSearchTerm }}"

@endif
@if(count($labor_operations) > 0)

Selected Labor Operations

@foreach($labor_operations as $index => $operation)

{{ $operation['operation'] }}

@if(!empty($operation['category']))

{{ $operation['category'] }}

@endif

${{ number_format($operation['labor_rate'], 2) }}/hr

Total

${{ number_format($operation['estimated_hours'] * $operation['labor_rate'], 2) }}

@endforeach
Labor Total: ${{ number_format(collect($labor_operations)->sum(fn($op) => $op['estimated_hours'] * $op['labor_rate']), 2) }}
@endif
@endif
@if($showDiagnosticCodesSection)
@foreach($diagnostic_codes as $index => $code)
@endforeach
@endif

Diagnostic Photos

Upload photos to document your findings (Max 5MB per image)

@error('photos.*')

{{ $message }}

@enderror
@if($showAdvancedOptions)
@endif
@if(count($parts_required) > 0 || count($labor_operations) > 0 || count($timesheets) > 0)

Cost Summary

@if(count($timesheets) > 0)

Diagnostic Time

{{ number_format(collect($timesheets)->sum('billable_hours'), 2) }} hours

${{ number_format(collect($timesheets)->sum('total_amount'), 2) }}

@endif @if(count($parts_required) > 0)

Parts Cost

{{ count($parts_required) }} part{{ count($parts_required) !== 1 ? 's' : '' }}

${{ number_format(collect($parts_required)->sum(fn($part) => $part['estimated_cost'] * $part['quantity']), 2) }}

@endif @if(count($labor_operations) > 0)

Labor Cost

{{ number_format(collect($labor_operations)->sum('estimated_hours'), 2) }} hours

${{ number_format(collect($labor_operations)->sum(fn($op) => $op['estimated_hours'] * $op['labor_rate']), 2) }}

@endif

Total Estimate

Complete Repair Cost

${{ number_format($this->calculateTotalEstimatedCost(), 2) }}

@if($createEstimateAutomatically)

Automatic Estimate Creation Enabled

A detailed estimate will be automatically generated and sent to the customer when you complete this diagnosis.

@endif
@endif

This diagnosis will update the job card status to "Diagnosis Completed"

An estimate can be created based on these findings.

Cancel