@extends('backend.layouts.layout') @section('content')

Repair & Customization Requests

All Requests
  • All Requests
  • Pending
  • In Progress
  • Completed
  • Cancelled
Show Dashboard
@foreach($repairs as $repair) @endforeach
Request Details Customer Vehicle Services Preferred Date Assigned To Status Actions
#REP-{{ str_pad($repair->id, 3, '0', STR_PAD_LEFT) }}

Submitted: {{ $repair->created_at->format('Y-m-d') }}

@php $priority = 'low'; if (strpos(strtolower($repair->service_description), 'urgent') !== false) { $priority = 'high'; } elseif (in_array('Engine Repair', $repair->services ?? [])) { $priority = 'medium'; } @endphp
{{ ucfirst($priority) }} Priority

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

{{ $repair->customer->email }}

{{ $repair->customer->phone }}

{{ $repair->vehicle_year }} {{ $repair->vehicle_make }} {{ $repair->vehicle_model }} {{ $repair->vehicle_trim }}

@if($repair->vehicle_vin)

VIN: {{ $repair->vehicle_vin }}

@endif

{{ number_format($repair->vehicle_mileage) }} mi

@if($repair->services && is_array($repair->services)) @foreach($repair->services as $service) {{ $service }} @endforeach @endif @if($repair->repair_customizations && is_array($repair->repair_customizations)) @foreach($repair->repair_customizations as $custom) {{ $custom }} @endforeach @endif

{{ \Carbon\Carbon::parse($repair->preferred_date)->format('Y-m-d') }}

{{ $repair->preferred_time }}

@if($repair->assignedEmployees && $repair->assignedEmployees->count() > 0) @foreach($repair->assignedEmployees as $assigned)
{{ $assigned->employee->name ?? 'Unknown' }}

{{ \Carbon\Carbon::parse($assigned->service_date)->format('d M Y') }} @if($assigned->end_date && $assigned->end_date != $assigned->service_date) - {{ \Carbon\Carbon::parse($assigned->end_date)->format('d M Y') }} @endif

{{ \Carbon\Carbon::parse($assigned->start_time)->format('h:i A') }} - {{ \Carbon\Carbon::parse($assigned->end_time)->format('h:i A') }}

@endforeach @else Not Assigned @endif
{{ ucfirst(str_replace('_', ' ', $repair->status)) }}
@if($repair->status === 'pending') @elseif($repair->status === 'in_progress') @if(!$repair->assignedEmployees || $repair->assignedEmployees->count() == 0) @endif @endif @if($repair->assignedEmployees && $repair->assignedEmployees->count() > 0) @endif
{{ $repairs->links() }}
@endsection