@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')
@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('service_type', __('repair::lang.service_type').':*', ['style' => 'margin-left:20px;'])!!}
{!! Form::label('pick_up_on_site_addr', __('repair::lang.pick_up_on_site_addr') . ':') !!}
{!! Form::textarea('pick_up_on_site_addr',null, ['class' => 'form-control ', 'id' => 'pick_up_on_site_addr', 'placeholder' => __('repair::lang.pick_up_on_site_addr'), 'rows' => 3]); !!}
{!! 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('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')]); !!}
@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() !!}
@include('contact.create', ['quick_add' => true])
@stop
@section('css')
@include('repair::job_sheet.tagify_css')
@stop
@section('javascript')
@includeIf('taxonomy.taxonomies_js', ['cat_code_enabled' => false])
@endsection