@php use App\Enums\JobPriority; use App\Support\JobIntakeOptions; $device = $job->device; // Saved value, or what was typed before a validation error. $brandId = old('brand_id') ?? ($device->brand_id ?? ($device->brand_name ? 'other' : '')); $modelId = old('device_model_id') ?? ($device->device_model_id ?? ($device->model_name ? 'other' : '')); $config = [ 'catalogue' => $catalogue, 'phoneTypeId' => $catalogue['types']->firstWhere('name', 'Phone')?->id, 'typeId' => old('device_type_id', $device->device_type_id), 'brandId' => old('brand_other') && ! old('brand_id') ? 'other' : $brandId, 'modelId' => old('model_other') && ! old('device_model_id') ? 'other' : $modelId, ]; $problems = old('problems', $job->problems ?? []); $conditions = old('condition_checks', $job->condition_checks ?? []); $accessories = old('accessories', $job->accessories ?? []); $input = 'mt-1 block w-full min-h-12 text-base border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-lg shadow-sm'; $chip = 'flex min-h-12 cursor-pointer select-none items-center gap-2 rounded-lg border border-gray-300 bg-white px-3 text-sm font-medium text-gray-700 has-[:checked]:border-indigo-600 has-[:checked]:bg-indigo-50 has-[:checked]:text-indigo-800'; $section = 'rounded-xl bg-white p-4 shadow-sm sm:p-6 space-y-4'; $heading = 'text-lg font-semibold text-gray-900'; @endphp ← Job {{ $job->job_no }}

Edit job {{ $job->job_no }}

@csrf @method('PUT') @if ($errors->any()) @endif {{-- Customer: shown only. Change it on the customer page. --}}

Customer

{{ $job->customer->name }}

{{ $job->customer->phone_display }}{{ $job->customer->email ? ' · '.$job->customer->email : '' }}

Edit customer
{{-- Device --}}

Device

{{-- Problem --}}

Problem

@foreach (JobIntakeOptions::PROBLEMS as $key => $label) @endforeach
{{-- Condition --}}

Condition when received

@foreach (JobIntakeOptions::CONDITIONS as $key => $label) @endforeach
{{-- Accessories --}}

Accessories received

@foreach (JobIntakeOptions::ACCESSORIES as $key => $label) @endforeach
{{-- Estimate, date, priority --}}

Estimate and delivery

@foreach (JobPriority::cases() as $p) @endforeach

The advance payment, screen lock and photos are not changed here.

Cancel