@php use Carbon\Carbon; @endphp @extends('layouts.iconbar') @section('title') Create Job @endsection @section('content') @section('breadcrumbs') {{ Breadcrumbs::render(\Request::route()->getName()) }} @endsection
{!! Form::open(['method' => 'POST', 'route' => ['admin.jobs.store'], 'files' => true, 'id' => 'create', 'class' => 'needs-validation', 'novalidate', 'entype' => 'multipart/form-data']) !!}
{{--Left Column--}}
@if (Auth::user()->hasRole('Admin') ) {!! Form::text('internal_id', old('internal_id', $next_internal_id), ['class' => 'form-control', 'placeholder' => '', 'required'=>'', 'id' => 'internal_id']) !!} @else {!! Form::text('internal_id', old('internal_id', $next_internal_id), ['class' => 'form-control', 'placeholder' => '', 'required'=>'', 'readonly', 'id' => 'internal_id']) !!} @endif {!! Form::label('internal_id', 'Internal Id', ['class' => 'floating-label']) !!} @if($errors->has('internal_id'))

{{ $errors->first('internal_id') }}

@endif
@if(Auth::user()->hasRole('Admin') )
{!! Form::hidden('customer_id', null, ['id' => 'customer_id']) !!} {!! Form::select('user_id', $users, old('user_id'), ['class' => 'form-control select2','id' => 'customer', 'onchange' => 'getCustomerData(true);']) !!} {!! Form::label('user_id', 'Customer', ['class' => 'floating-label top-2']) !!} @if($errors->has('user_id'))

{{ $errors->first('user_id') }}

@endif
{!! Form::select('account_manager_id', $global_admin, old('account_manager_id'), ['class' => 'form-control account_manager_id select2','id' => 'account_manager']) !!} {!! Form::label('account_manager_id', trans('global.users.fields.account_manager').'*', ['class' => 'floating-label top-2']) !!}
Please select account manager.
@if($errors->has('account_manager_id'))

{{ $errors->first('account_manager_id') }}

@endif
@else {!! Form::hidden('user_id', Auth::user()->id) !!} @endif
{!! Form::text('name', old('name'), ['class' => 'form-control', 'placeholder' => '', 'required'=>'', 'id' => 'name']) !!} {!! Form::label('name', trans('global.jobs.fields.name').'*', ['class' => 'floating-label']) !!}
Name field is required.
{!! Form::label('job_type', trans('global.jobs.fields.job-type').'', ['class' => ' floating-label']) !!}
{!! Form::radio('job_type', 'Carcase & Doors/Panels', false, ['required' => '', 'onclick' => 'radioChanged(this)', 'class' => 'radioJob ', 'v-model'=>'type', 'id' => 'job_type_all']) !!}
{!! Form::radio('job_type', 'Doors/Panels', false, ['required' => '', 'onclick' => 'radioChanged(this)', 'class' => 'radioJob ', 'v-model'=>'type', 'id' => 'job_type_doors']) !!}
{!! Form::radio('job_type', 'Carcase', false, ['required' => '', 'onclick' => 'radioChanged(this)', 'class' => 'radioJob ', 'v-model'=>'type', 'id' => 'job_type_carcase']) !!}
@if($errors->has('job_type'))

{{ $errors->first('job_type') }}

@endif
{!! Form::label('material_type', trans('global.jobs.fields.material_type').'', ['class' => ' floating-label']) !!}
{!! Form::radio('material_type', '16mm HMR white', true, ['id' => '16_mm_white', 'v-model' => 'material_type']) !!}
{!! Form::radio('material_type', 'other', false, ['id' => 'other_material', 'v-model' => 'material_type']) !!}
{!! Form::text('other_material', old('otherMaterial'), ['class' => 'form-control', 'required' => '']) !!} {!! Form::label('other_material', 'Material Type*', ['class' => 'floating-label']) !!}
@if($errors->has('material_type'))

{{ $errors->first('material_type') }}

@endif
{!! Form::label('carcase_wrap', trans('global.jobs.fields.carcase-wrap').'', ['class' => 'floating-label']) !!}
{!! Form::radio('carcase_wrap', 'Yes', false, ['id' => 'yes_carcase_wrap', 'v-model' => 'carcase_wrap']) !!}
{!! Form::radio('carcase_wrap', 'No', false, ['id' => 'no_carcase_wrap', 'v-model' => 'carcase_wrap']) !!}
@if($errors->has('carcase_wrap'))

{{ $errors->first('carcase_wrap') }}

@endif
{!! Form::label('black_edge', trans('global.jobs.fields.black_edge').'', ['class' => 'floating-label']) !!}
{!! Form::radio('black_edge', 'Yes',false, ['id' => 'yes_black_edge', 'v-model' => 'black_edge']) !!}
{!! Form::radio('black_edge', 'No', false, ['id' => 'no_black_edge', 'v-model' => 'black_edge']) !!}
@if($errors->has('black_edge'))

{{ $errors->first('black_edge') }}

@endif
{!! Form::label('cnc', trans('global.jobs.fields.cnc').'', ['class' => 'floating-label']) !!}
{!! Form::radio('cnc', 'B',false, ['id' => 'b_cnc', 'v-model' => 'cnc']) !!}
{!! Form::radio('cnc', 'S', false, ['id' => 'b_cnc', 'v-model' => 'cnc']) !!}
{!! Form::radio('cnc', 'P', false, ['id' => 'p_cnc', 'v-model' => 'cnc']) !!}
@if($errors->has('cnc'))

{{ $errors->first('cnc') }}

@endif
{!! Form::label('painted', trans('global.jobs.fields.painted').'', ['class' => 'floating-label']) !!}
{!! Form::radio('painted', 'Yes',false, ['id' => 'yes_painted', 'v-model' => 'painted']) !!}
{!! Form::radio('painted', 'No', false, ['id' => 'no_painted', 'v-model' => 'painted']) !!}
@if($errors->has('painted'))

{{ $errors->first('painted') }}

@endif
@if(Auth::user()->hasRole('Admin') )
{!! Form::checkbox('update_inventory', 1 , old('update_inventory', true), ['class' => '', 'placeholder' => '', 'id' => 'update_inventory']) !!} {!! Form::label('update_inventory', trans('global.jobs.fields.update_inventory'), ['class' => 'floating-label']) !!}
@if($errors->has('update_inventory'))

{{ $errors->first('update_inventory') }}

@endif
{!! Form::checkbox('sharknose', 'Yes' , old('sharknose', false), ['class' => '', 'placeholder' => '', 'id' => 'sharknose']) !!} {!! Form::label('sharknose', trans('global.jobs.fields.sharknose'), ['class' => 'floating-label']) !!}
{!! Form::checkbox('profile', 'Yes' , old('profile', false), ['class' => '', 'placeholder' => '', 'id' => 'profile']) !!} {!! Form::label('profile', trans('global.jobs.fields.profile'), ['class' => 'floating-label']) !!}
@endif
Colours
{!! Form::text('colors[0][supplier]', old('supplier'), ['class' => 'form-control color-input supplier_name', 'placeholder' => '']) !!} {!! Form::label('supplier', 'Supplier', ['class' => 'floating-label']) !!}
Supplier is required field.
{!! Form::text('colors[0][colour]', old('colour'), ['class' => 'form-control color-input colorname', 'placeholder' => '']) !!} {!! Form::label('colour', 'Colour', ['class' => 'floating-label']) !!}
Colour is required field.
{!! Form::text('colors[0][thickness]', old('thickness'), ['class' => 'form-control color-input thickness', 'placeholder' => '']) !!} {!! Form::label('thickness', 'Thickness', ['class' => 'floating-label']) !!}
Thickness is required field.
@if (Auth::user()->hasRole('Admin'))
{!! Form::label('cut_only', trans('global.jobs.fields.cut_only').'', ['class' => 'floating-label']) !!}
{!! Form::radio('colors[0][cut_only]', 'Yes', false, ['class' => 'cut_only_yes']) !!}
{!! Form::radio('colors[0][cut_only]', 'No', true, ['class' => 'cut_only_no']) !!}
@endif
{!! Form::label('customer_supplied', trans('global.jobs.fields.customer-supplied').'', ['class' => 'floating-label']) !!}
{!! Form::radio('customer_supplied', 'Yes', false, ['v-model'=>'supplied', 'id' => 'yes_customer_supplied']) !!}
{!! Form::radio('customer_supplied', 'No', false, ['v-model'=>'supplied', 'id' => 'no_customer_supplied']) !!}
@if($errors->has('customer_supplied'))

{{ $errors->first('customer_supplied') }}

@endif
{!! Form::label('return_offcuts', trans('global.jobs.fields.return-offcuts').'', ['class' => 'floating-label']) !!}
{!! Form::checkbox('return_offcut_board', 'Yes', false, ['id' => 'return_offcut_board']) !!}
{!! Form::checkbox('return_offcut_edge', 'Yes', false, ['id' => 'return_offcut_edge']) !!}
{{--Required Required --}}
{!! Form::label('delivery_required', trans('global.jobs.fields.delivery_required').'', ['class' => 'floating-label']) !!}
{!! Form::radio('delivery_required', 'Yes', false, ['v-model'=>'delivery_required', 'id' => 'yes_delivery_required', 'v-on:change' => "deliveryChange"]) !!}
{!! Form::radio('delivery_required', 'No', false, ['v-model'=>'delivery_required', 'id' => 'no_delivery_required', 'v-on:change' => "deliveryChange"]) !!}
@if($errors->has('delivery_required'))

{{ $errors->first('delivery_required') }}

@endif
{{--delivery Required = YES --}}
{!! Form::text('address_address', old('address_address'), ['class' => 'form-control map-input', 'id' => 'address-input', 'placeholder' => '']) !!} {!! Form::label('address_address', trans('global.users.fields.address').'', ['class' => 'floating-label']) !!} {!! Form::hidden('address_latitude', 0 , ['id' => 'address-latitude']) !!} {!! Form::hidden('address_longitude', 0 , ['id' => 'address-longitude']) !!}
Please enter address.
@if($errors->has('address'))

{{ $errors->first('address') }}

@endif
{{--delivery Required = NO --}}
{!! Form::label('forklift_pickup', trans('global.jobs.fields.forklift_pickup').'', ['class' => 'col-md-12 floating-label']) !!}
{!! Form::radio('forklift_pickup', 'Yes', false,['v-model' => 'forklift_pickup', 'id' => 'forklift_pickup_yes', 'v-on:change' => "forkliftChange"]) !!}
{!! Form::radio('forklift_pickup', 'No', false,['v-model' => 'forklift_pickup', 'id' => 'forklift_pickup_no', 'v-on:change' => "forkliftChange"]) !!}
{!! Form::radio('forklift_pickup', 'Not Sure', false,['v-model' => 'forklift_pickup', 'id' => 'forklift_pickup_not_sure', 'v-on:change' => "forkliftChange"]) !!}
@if($errors->has('forklift_pickup'))

{{ $errors->first('forklift_pickup') }}

@endif
{!! Form::label('pallet', trans('global.jobs.fields.pallet').'', ['class' => 'floating-label']) !!} {!! Form::select('pallet', ["2400x1200 or 1800x1200" => "2400x1200 or 1800x1200", "2400x1200" => "2400x1200", "1800x1200" => "1800x1200", "900x2400" => "900x2400", 'custom' => 'Add Custom'], old('pallet'), ['class' => 'form-control pallet select2','id' => 'pallet', 'required' => true, 'v-model' => 'pallet']) !!}
{!! Form::label('custom_pallet', trans('global.jobs.fields.custom_pallet').'', ['class' => 'floating-label']) !!} {!! Form::text('custom_pallet', old('custom_pallet'), ['class' => 'form-control', 'required' => true]) !!}
{{--Delivery dates--}}
@if (\Auth::user()->hasRole('Customer')) {!! Form::label('delivery_date_carcase', 'Carcass Date Required', ['class' => 'floating-label']) !!} @else {!! Form::label('delivery_date_carcase', trans('global.jobs.fields.delivery_date_carcase').'', ['class' => 'floating-label']) !!} @endif
{!! Form::hidden('delivery_date_carcase', old('delivery_date_carcase', Carbon::now()->addDays(10)->format('d-m-Y')), ['class' => 'form-control date', 'placeholder' => '', 'required', 'id' => 'delivery_date_carcase']) !!}
Carcase Delivery Date is required Field
@if($errors->has('delivery_date_carcase'))

{{ $errors->first('delivery_date_carcase') }}

@endif
{!! Form::select('delivery_date_period_carcase', ['am' => 'am', 'pm' => 'pm'] ,old('delivery_date_period_carcase'), ['class' => 'form-control', 'required' => '']) !!}
Delivery date period is required field.
@if($errors->has('delivery_date_period_carcase'))

{{ $errors->first('delivery_date_period_carcase') }}

@endif
@if (\Auth::user()->hasRole('Customer')) {!! Form::label('delivery_date_doors', 'Doors Date Required', ['class' => 'floating-label']) !!} @else {!! Form::label('delivery_date_doors', trans('global.jobs.fields.delivery_date_doors').'', ['class' => 'floating-label']) !!} @endif
{!! Form::hidden('delivery_date_doors', old('delivery_date_doors', Carbon::now()->addDays(10)->format('d-m-Y')), ['class' => 'form-control date', 'placeholder' => '', 'required', 'id' => 'delivery_date_doors']) !!}
Delivery Date is required Field
@if($errors->has('delivery_date_doors'))

{{ $errors->first('delivery_date_doors') }}

@endif
{!! Form::select('delivery_date_period_doors', ['am' => 'am', 'pm' => 'pm'] ,old('delivery_date_period_doors'), ['class' => 'form-control', 'required' => '']) !!}
Delivery date period is required field.
@if($errors->has('delivery_date_period_doors'))

{{ $errors->first('delivery_date_period_doors') }}

@endif
{{--Special--}} @if(Auth::user()->hasRole('Admin') )
{!! Form::label('special', trans('global.jobs.fields.special').'', ['class' => 'floating-label']) !!}
{!! Form::radio('special', '1',false, ['id' => 'special_yes']) !!}
{!! Form::radio('special', '0', false, ['checked'=>'checked', 'id' => 'special_no']) !!}
@if($errors->has('special'))

{{ $errors->first('painted') }}

@endif
@endif
{!! Form::label('cod', trans('global.jobs.fields.cod').'', ['class' => 'floating-label']) !!}
{!! Form::radio('cod', 'Yes',false, ['id' => 'yes_cod', 'v-model' => 'cod']) !!}
{!! Form::radio('cod', 'No', false, ['id' => 'no_cod', 'v-model' => 'cod']) !!}
@if($errors->has('cod'))

{{ $errors->first('cod') }}

@endif
{!! Form::label('quote', trans('global.jobs.fields.quote').'', ['class' => 'col-md-12 floating-label']) !!}
{!! Form::radio('quote', 'Yes', ['v-model' => 'quote', 'id' => 'quote_yes']) !!}
{!! Form::radio('quote', 'No', ['v-model' => 'quote', 'id' => 'quote_no']) !!}
@if($errors->has('quote'))

{{ $errors->first('quote') }}

@endif
{!! Form::label('priority', trans('global.jobs.fields.priority').'', ['class' => 'floating-label']) !!} {!! Form::text('priority', old('priority'), ['class' => 'form-control']) !!}
Priority is required field.
@if($errors->has('priority'))

{{ $errors->first('priority') }}

@endif
{!! Form::select('hardwares', $hardwares->pluck('name', 'id'), old('hardwares'), ['class' => 'form-control hardware select2', 'id' => 'hardware_options', 'multiple' => true]) !!} {!! Form::label('hardwares', trans('global.jobs.fields.hardwares').'*', ['class' => 'floating-label', 'style' => 'top: -2rem;']) !!}
Please select hadware.
@if($errors->has('hadware'))

{{ $errors->first('hadware') }}

@endif
@foreach ($hardwares as $k => $hardware)
@endforeach
Item field is required.
Qty field is required.
Price field is required.
{{--End Left Column--}} {{--Right Column--}}
{!! Form::label('order_pdf', trans('global.jobs.fields.upload_files').'', ['class' => 'floating-label']) !!}
@if($errors->has('order_pdf'))

{{ $errors->first('order_pdf') }}

@endif
{!! Form::textarea('customer_notes', old('customer_notes'), ['class' => 'form-control ', 'placeholder' => '']) !!}
Customer note is required.
@if($errors->has('customer_notes'))

{{ $errors->first('customer_notes') }}

@endif
{!! old('special_packing') !!}
{!! Form::textarea('special_packing', old('special_packing'), ['class' => 'form-control ', 'placeholder' => '', 'style' => 'display:none;']) !!} @if($errors->has('special_packing'))

{{ $errors->first('special_packing') }}

@endif
{!! Form::textarea('notes', old('notes'), ['class' => 'form-control 12', 'placeholder' => '', 'style' => 'border: 1px solid #e0e0e0; ']) !!} @if($errors->has('notes'))

{{ $errors->first('notes') }}

@endif
{{--End Right Column--}} {{--Submit Button--}}
{!! Form::hidden('submitted', 0) !!} @if(Auth::user()->hasRole('Customer')) @endif
{!! Form::close() !!}
@stop @section('javascript') @parent