@php use Carbon\Carbon; @endphp @extends('layouts.iconbar') @section('title') Edit Job @endsection @section('content') @section('breadcrumbs') {{ Breadcrumbs::render(\Request::route()->getName(), $job) }} @endsection {{--

@lang('global.jobs.title')

--}}
{!! Form::model($job, ['method' => 'PUT', 'route' => ['admin.jobs.update', $job->id], 'files' => true, 'id' => 'edit', 'class' => 'needs-validation', 'novalidate']) !!}
{{--Left Column--}}
@if (Auth::user()->hasRole('Admin') ) {!! Form::text('internal_id', old('internal_id'), ['class' => 'form-control', 'placeholder' => '', 'required'=>'']) !!} @else {!! Form::text('internal_id', old('internal_id'), ['class' => 'form-control', 'placeholder' => '', 'required'=>'', 'readonly']) !!} @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::select('user_id', $users, old('user_id'), ['class' => 'form-control select2','id' => 'customer', 'onchange' => 'getCustomerData(true);']) !!} {!! Form::label('user_id', 'Customer', ['class' => 'floating-label']) !!} @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']) !!}
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'=>'']) !!} {!! Form::label('name', trans('global.jobs.fields.name').'*', ['class' => 'floating-label']) !!}
Name field is required.
{!! Form::radio('job_type', $job->job_type, true) !!}
@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', 'placeholder' => 'Material Type', '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
{!! 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' , $job->sharknose == 'Yes' ? true : false, ['class' => '', 'placeholder' => '', 'id' => 'sharknose']) !!} {!! Form::label('sharknose', trans('global.jobs.fields.sharknose'), ['class' => 'floating-label']) !!}
{!! Form::checkbox('profile', 'Yes' , $job->profile == 'Yes' ? true : false, ['class' => '', 'placeholder' => '', 'id' => 'profile']) !!} {!! Form::label('profile', trans('global.jobs.fields.profile'), ['class' => 'floating-label']) !!}
Colours
{!! Form::text('colors[0][supplier]', $job->supplier, ['class' => 'form-control supplier_name', 'placeholder' => '', 'required' => true]) !!} {!! Form::label('supplier', 'Supplier', ['class' => 'floating-label']) !!}
Supplier is required field.
{!! Form::text('colors[0][colour]', $job->colour, ['class' => 'form-control colorname', 'placeholder' => '', 'required' => true]) !!} {!! Form::label('colour', 'Colour', ['class' => 'floating-label']) !!}
Colour is required field.
{!! Form::text('colors[0][thickness]', $job->thickness, ['class' => 'form-control thickness', 'placeholder' => '', 'required' => true]) !!} {!! 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', $job->cut_only == 'Yes', ['class' => 'cut_only_yes']) !!}
{!! Form::radio('colors[0][cut_only]', 'No', $job->cut_only == 'No', ['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
@if (!$job->white_satin)
{!! Form::label('return_offcuts', trans('global.jobs.fields.return-offcuts').'', ['class' => 'floating-label']) !!}
{!! Form::checkbox('return_offcut_board', 'Yes', $job->return_offcut_board == 'Yes' ? true : false, ['id' => 'return_offcut_board']) !!}
{!! Form::checkbox('return_offcut_edge', 'Yes', $job->return_offcut_edge == 'Yes' ? true : false, ['id' => 'return_offcut_edge']) !!}
@endif
{!! 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::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 Required = NO --}}
{!! 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', $job->address_latitude , ['id' => 'address-latitude']) !!} {!! Form::hidden('address_longitude', $job->address_longitude , ['id' => 'address-longitude']) !!}
Please enter address.
@if($errors->has('address'))

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

@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('special') }}

@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('delivery_date_period', trans('global.jobs.fields.delivery_date_period').'', ['class' => 'floating-label']) !!} {!! Form::select('delivery_date_period', ['am' => 'am', 'pm' => 'pm'] ,old('delivery_date_period'), ['class' => 'form-control', 'required' => '']) !!}
Delivery date period is required field.
@if($errors->has('delivery_date_period'))

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

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

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

@endif
{{--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', strip_tags($job->customer_notes)), ['class' => 'form-control ', 'placeholder' => '']) !!}
Customer note is required.
@if($errors->has('customer_notes'))

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

@endif
{!! $job->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 ', 'placeholder' => '', 'style' => 'border: 1px solid #e0e0e0;']) !!} @if($errors->has('notes'))

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

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