@extends('admin.layouts.dashboard') @section('title', 'Edit Admin Booking') @push('head') @include('admin.job-details._booking-form-styles') @endpush @section('content')

Edit Admin Booking

Update booking details for {{ $jobDetail->customer_name ?? 'this customer' }}

Back
@if($errors->any())
Please fix the following:
@endif @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@csrf @method('PUT')
{{-- Customer --}}
Customer Information

Select an existing customer or add a new one

has('customer_id')) style="display:none;"@endif>{{ $errors->first('customer_id') }}
customer_id || !$jobDetail->customer) style="display:none;" @endif>
@if($jobDetail->customer_id && $jobDetail->customer){{ $jobDetail->customer->name }}@endif
@if($jobDetail->customer_id && $jobDetail->customer) {{ collect([$jobDetail->customer->phone, $jobDetail->customer->email])->filter()->implode(' · ') }} @endif
{{-- Job details --}}
Job Details

Items, services and work description

@php $selectedIds = old('product_ids', $jobDetail->product_ids ?? ($jobDetail->product_id ? [$jobDetail->product_id] : [])); @endphp
has('product_ids')) style="display:none;"@endif>{{ $errors->first('product_ids') }}
Select one or more items from the list
Schedule

Pick date and available time slot

@php $originalDate = $jobDetail->job_date->format('Y-m-d'); $today = date('Y-m-d'); @endphp
has('job_date')) style="display:none;"@endif>{{ $errors->first('job_date') }}
Only original date or today onwards
has('job_time')) style="display:none;"@endif>{{ $errors->first('job_time') }}
Additional Notes

Optional internal remarks

@if($jobDetail->customer_email && $jobDetail->job_status !== 'cancelled')
@csrf @include('admin.partials._reminder-send-form', ['compact' => false, 'scheduledAt' => $jobDetail->scheduledAt()])
@endif @if($jobDetail->reminder_sent_at) Last reminder: {{ \App\Support\BusinessTimezone::formatInstant($jobDetail->reminder_sent_at) }} @endif Cancel
@include('admin.job-details._add-customer-modal') {{-- Add Product / Service Modal --}}
Add New Item / Service
@push('scripts') @include('admin.customers._customer-validation') @include('admin.job-details._booking-form-validation') @include('admin.customers._customer-modal-address-autocomplete') @endpush @endsection