@extends('layouts.app') @section('title', __('repair::lang.add_job_sheet')) @section('content') @include('repair::layouts.nav')
@if(!empty($repair_settings)) @php $product_conf = isset($repair_settings['product_configuration']) ? explode(',', $repair_settings['product_configuration']) : []; $defects = isset($repair_settings['problem_reported_by_customer']) ? explode(',', $repair_settings['problem_reported_by_customer']) : []; $product_cond = isset($repair_settings['product_condition']) ? explode(',', $repair_settings['product_condition']) : []; @endphp @else @php $product_conf = []; $defects = []; $product_cond = []; @endphp @endif {!! Form::open(['action' => '\Modules\Repair\Http\Controllers\JobSheetController@store', 'id' => 'job_sheet_form', 'method' => 'post', 'files' => true]) !!} @includeIf('repair::job_sheet.partials.scurity_modal')
@lang('repair::lang.create')

@if(count($business_locations) == 1) @php $default_location = current(array_keys($business_locations->toArray())); @endphp @else @php $default_location = null; @endphp @endif
{!! Form::label('location_id', __('business.business_location') . ':*' )!!} {!! Form::select('location_id', $business_locations, $default_location, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select'), 'required', 'style' => 'width: 100%;']); !!}
{!! Form::label('contact_id', __('role.customer') .':*') !!}
{!! Form::select('contact_id', [], null, ['class' => 'form-control mousetrap', 'id' => 'customer_id', 'placeholder' => 'Enter Customer name / phone', 'required', 'style' => 'width: 100%;']); !!}
{!! Form::label('service_type', __('repair::lang.service_type').':*', ['style' => 'margin-left:20px;'])!!}
@lang('lang_v1.more_info')

{!! Form::label('brand_id', __('product.brand') . ':') !!}
{!! Form::select('brand_id', $brands, null, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::label('device_id', __('repair::lang.device') . ':') !!}
{!! Form::select('device_id', $devices, null, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select')]); !!}
{!! Form::label('device_model_id', __('repair::lang.device_model') . ':') !!}
{!! Form::select('device_model_id', $device_models, null, ['class' => 'form-control select2', 'placeholder' => __('messages.please_select')]); !!}
@lang('repair::lang.pre_repair_checklist'): @show_tooltip(__('repair::lang.prechecklist_help_text')) @lang('repair::lang.not_applicable_key') = @lang('repair::lang.not_applicable')

{!! Form::label('serial_no', __('repair::lang.serial_no') . ':*') !!} {!! Form::text('serial_no', null, ['class' => 'form-control bd-rd-7', 'placeholder' => __('repair::lang.serial_no'), 'required']); !!}
{!! Form::label('security_pwd', __('repair::lang.repair_passcode') . ':') !!}
{!! Form::text('security_pwd', null, ['class' => 'form-control bd-rd-7', 'placeholder' => __('lang_v1.password')]); !!}
{!! Form::label('product_configuration', __('repair::lang.product_configuration') . ':') !!}
{!! Form::textarea('product_configuration', null, ['class' => 'tags-look bd-rd-7', 'rows' => 3]); !!}
{!! Form::label('defects', __('repair::lang.problem_reported_by_customer') . ':') !!}
{!! Form::textarea('defects', null, ['class' => 'tags-look bd-rd-7', 'rows' => 3]); !!}
{!! Form::label('product_condition', __('repair::lang.condition_of_product') . ':') !!}
{!! Form::textarea('product_condition', null, ['class' => 'tags-look bd-rd-7', 'rows' => 3]); !!}
@if(in_array('service_staff' ,$enabled_modules))
{!! Form::label('service_staff', __('repair::lang.assign_service_staff') . ':') !!} {!! Form::select('service_staff', $technecians, null, ['class' => 'form-control select2', 'placeholder' => __('restaurant.select_service_staff')]); !!}
@endif
{!! Form::label('comment_by_ss', __('repair::lang.comment_by_ss') . ':') !!} {!! Form::textarea('comment_by_ss', null, ['class' => 'form-control bd-rd-7', 'rows' => '3']); !!}
{!! Form::label('estimated_cost', __('repair::lang.estimated_cost') . ':') !!} {!! Form::text('estimated_cost', null, ['class' => 'form-control input_number bd-rd-7', 'placeholder' => __('repair::lang.estimated_cost')]); !!}
{!! Form::label('delivery_date', __('lang_v1.due_date') . ':') !!} @show_tooltip(__('repair::lang.delivery_date_tooltip'))
{!! Form::text('delivery_date', null, ['class' => 'form-control bd-rd-7', 'readonly']); !!}
{!! Form::label('images', __('repair::lang.document') . ':') !!} {!! Form::file('images[]', ['id' => 'upload_job_sheet_image', 'accept' => implode(',', array_keys(config('constants.document_upload_mimes_types'))), 'multiple']); !!}

@lang('purchase.max_file_size', ['size' => (config('constants.document_size_limit') / 1000000)]) @includeIf('components.document_help_text')



@php $custom_field_1_label = !empty($repair_settings['job_sheet_custom_field_1']) ? $repair_settings['job_sheet_custom_field_1'] : __('lang_v1.custom_field', ['number' => 1]) @endphp {!! Form::label('custom_field_1', $custom_field_1_label . ':') !!} {!! Form::text('custom_field_1', null, ['class' => 'form-control bd-rd-7']); !!}
@php $custom_field_2_label = !empty($repair_settings['job_sheet_custom_field_2']) ? $repair_settings['job_sheet_custom_field_2'] : __('lang_v1.custom_field', ['number' => 2]) @endphp {!! Form::label('custom_field_2', $custom_field_2_label . ':') !!} {!! Form::text('custom_field_2', null, ['class' => 'form-control bd-rd-7']); !!}
@php $custom_field_3_label = !empty($repair_settings['job_sheet_custom_field_3']) ? $repair_settings['job_sheet_custom_field_3'] : __('lang_v1.custom_field', ['number' => 3]) @endphp {!! Form::label('custom_field_3', $custom_field_3_label . ':') !!} {!! Form::text('custom_field_3', null, ['class' => 'form-control bd-rd-7']); !!}
@php $custom_field_4_label = !empty($repair_settings['job_sheet_custom_field_4']) ? $repair_settings['job_sheet_custom_field_4'] : __('lang_v1.custom_field', ['number' => 4]) @endphp {!! Form::label('custom_field_4', $custom_field_4_label . ':') !!} {!! Form::text('custom_field_4', null, ['class' => 'form-control bd-rd-7']); !!}
@php $custom_field_5_label = !empty($repair_settings['job_sheet_custom_field_5']) ? $repair_settings['job_sheet_custom_field_5'] : __('lang_v1.custom_field', ['number' => 5]) @endphp {!! Form::label('custom_field_5', $custom_field_5_label . ':') !!} {!! Form::text('custom_field_5', null, ['class' => 'form-control bd-rd-7']); !!}

{!! Form::close() !!}
@stop @section('css') @include('repair::job_sheet.tagify_css') @stop @section('javascript') @includeIf('taxonomy.taxonomies_js', ['cat_code_enabled' => false]) @endsection