{!! Form::open(['url' => action([\Modules\Repair\Http\Controllers\RepairAppointmentController::class, 'store']), 'method' => 'post', 'id' => 'admin_appointment_form']) !!}

@lang('repair::lang.add_appointment')

@includeIf('repair::device_model.partials.vehicle_model_image_cards', [ 'device_models_list' => $device_models_list ?? collect(), 'mode' => 'appointment', ])
{!! Form::label('apt_vehicle_no', __('repair::lang.serial_no') . ':*') !!}
{!! Form::text('vehicle_no', null, ['id' => 'apt_vehicle_no', 'class' => 'form-control', 'required', 'style' => 'text-transform:uppercase;', 'placeholder' => 'e.g. CAB-1234', 'autocomplete' => 'off', 'data-lookup-url' => action([\Modules\Repair\Http\Controllers\RepairAppointmentController::class, 'lookupVehicle'])]) !!}
{!! Form::label('apt_customer_name', __('contact.name') . ':*') !!} {!! Form::text('customer_name', null, ['id' => 'apt_customer_name', 'class' => 'form-control', 'required']) !!}
{!! Form::label('apt_customer_mobile', __('lang_v1.mobile_number') . ':*') !!} {!! Form::text('customer_mobile', null, ['id' => 'apt_customer_mobile', 'class' => 'form-control', 'required']) !!}
{!! Form::label('apt_customer_email', __('business.email') . ':') !!} {!! Form::email('customer_email', null, ['id' => 'apt_customer_email', 'class' => 'form-control']) !!}
{!! Form::label('apt_vehicle_make_model', __('repair::lang.vehicle_make_model') . ':') !!} {!! Form::text('vehicle_make_model', null, ['id' => 'apt_vehicle_make_model', 'class' => 'form-control', 'placeholder' => 'e.g. Toyota Aqua']) !!}
{!! Form::label('apt_location_id', __('business.business_location') . ':') !!} {!! Form::select('location_id', $business_locations, null, ['id' => 'apt_location_id', 'class' => 'form-control']) !!}
{!! Form::label('apt_appointment_date', __('repair::lang.preferred_date') . ':*') !!} {!! Form::date('appointment_date', $default_date ?? \Carbon\Carbon::today()->toDateString(), ['id' => 'apt_appointment_date', 'class' => 'form-control', 'required', 'data-availability-url' => route('repair.public.check_availability'), 'data-business-id' => $business_id]) !!}
{!! Form::label('apt_time_slot', __('repair::lang.preferred_time_slot') . ':') !!}
{!! Form::label('service_type', __('repair::lang.service_type') . ':') !!}
{!! Form::label('problem_description', __('repair::lang.problem_or_service_notes') . ':') !!} {!! Form::textarea('problem_description', null, ['class' => 'form-control', 'rows' => 2]) !!}
{!! Form::close() !!}