@extends('layouts.adminLayout.admin_design') @section('content')
{{ Form::open(['url' =>route('employees.update',$empDetails['id']), 'method'=>'POST', 'name' => 'createemployee', 'id' => 'createemployee', 'files'=>'true']) }} @method('PATCH')

{{ $title }} {{ Form::button(' '.__('lbl.save'), ["name"=>"submit",'class' => 'clickbtncommon btn-sm btn btn-primary employeeaction', 'type' => 'submit']) }} {{ __('lbl.cancel') }}

{{ __('lbl.employees_details') }}

{{ Form::label(__('lbl.first_name')) }} {{ Form::text('first_name', $empDetails['first_name'], ["class"=>"form-control mxlen_20","placeholder"=>__('lbl.first_name'),"id"=>"first_name","name"=>"first_name"]) }}
{{ Form::label(__('lbl.last_name')) }} {{ Form::text('last_name', $empDetails['last_name'], ["class"=>"form-control mxlen_20","placeholder"=>__('lbl.last_name'),"id"=>"last_name","name"=>"last_name"]) }}
{{ Form::label(__('lbl.username')) }} {{ Form::text('username', $empDetails['username'], ["class"=>"form-control mxlen_100","placeholder"=>__('lbl.username'),"id"=>"username","name"=>"username"]) }}
{{ Form::label(__('lbl.email')) }} {{ Form::text('email', $empDetails['email'], ["class"=>"form-control","placeholder"=>__('lbl.email'),"id"=>"email","name"=>"email"]) }}
{{ Form::label(__('lbl.password')) }} {{ Form::password('password', ["class"=>"form-control mxlen_15","placeholder"=>__('lbl.password'),"id"=>"password","name"=>"password"]) }}
{{ Form::label(__('lbl.phone_number')) }} {{ Form::text('phone_number', $empDetails['phone_number'], ["class"=>" form-control phoneUS mxlen_15","placeholder"=>__('lbl.phone_number'),"id"=>"phone_number","name"=>"phone_number"]) }}
{{ Form::label(__('lbl.start_date')) }} {{ Form::text('emp_start_date', $empDetails['emp_start_date'], ["class"=>"form-control ","placeholder"=>__('lbl.start_date'),"id"=>"emp_start_date","name"=>"emp_start_date"]) }}
{{ Form::label(__('lbl.end_date')) }} {{ Form::text('emp_end_date', $empDetails['emp_end_date'], ["class"=>"form-control ","placeholder"=>"End date","id"=>"emp_end_date","name"=>"emp_end_date"]) }}
{{ Form::label(__('lbl.milage_reimb')) }} {{ Form::text('milage_reimb', $empDetails['milage_reimb'], ["class"=>"form-control numer_float_only mxlen_10","placeholder"=>__('lbl.milage_reimb'),"id"=>"milage_reimb","name"=>"exempt"]) }}
{{ Form::label(__('lbl.pos_pin') ,'',['style'=>'width:100%; clear:both']) }}
{{ Form::text('pos_pin', $empDetails['pos_pin'], ["class"=>"form-control numer_only mxlen_6", "minlength"=>"4", "maxlength"=>"4","placeholder"=>__('lbl.pos_pin'),"id"=>"pos_pin","name"=>"pos_pin"]) }}
{{ Form::label(__('lbl.department')) }} {{ Form::select('department_id', [''=>'Select Department']+$department, $empDetails['department_id'] ,["class"=>"form-control","id"=>"department_id","name"=>"department_id"]) }}
{{ Form::label('exempt') }}
{{ Form::checkbox('exempt', '1', ($empDetails['exempt'] == 1) ? true : false, ["id"=>"exempt","name"=>"exempt"]) }}
{{ Form::label(__('lbl.access_establishments')) }} {{ Form::select('establishment_access[]', $establishments, ($empDetails['establishment_access'])?explode(",",$empDetails['establishment_access']):[],["multiple"=>"multiple","class"=>"form-control select2","id"=>"establishment_access"]) }}
{{ Form::label('Image') }} {{ Form::file('image', null) }}
{{ Form::label('Sort') }} {{ Form::text('sort', $empDetails['sort'], ["class"=>"form-control numer_only","placeholder"=>__('lbl.sort'),"id"=>"sort","name"=>"sort"]) }}
{{ Form::label('Notify when inventory is updated?') }}
{{ Form::checkbox('inventory_email_notification', '1', ($empDetails['inventory_email_notification'] == 1) ? true : false, ["id"=>"inventory_email_notification","name"=>"inventory_email_notification"]) }}

{{ __('lbl.pos_prms') }}

@if(!empty($empDetails['rolewage'])) @foreach($empDetails['rolewage'] as $key => $emp) @php $divIdEmp = $emp["id"].$key+rand(); @endphp
{{ Form::hidden('role_wage_id[]', $emp['id']) }} {{ Form::label(__('lbl.role')) }} {{ Form::select('role[]', !empty($role) ? $role : [], ($emp['role_id']) ? $emp['role_id'] : '',["class"=>"form-control"]) }}
{{ Form::label(__('lbl.wage')) }} {{ Form::text('wage[]', $emp['wage'], ["class"=>"form-control numer_float_only mxlen_8","placeholder"=>__('lbl.wage')]) }}
{{ Form::label(__('lbl.action')) }}
{{ Form::button('', ["data-id"=>$divIdEmp, "data-recordid"=>$emp['id'],"class"=>"clickbtncommon remove_edititem btn btn-sm btn-primary","name"=>"item_remove[]"]) }}
@endforeach @endif
{{ Form::button(''. __('lbl.add_new'), ["name"=>"","id"=>"add_item","class"=>"clickbtncommon btn-sm btn btn-primary"]) }}

{{ __('lbl.management_console_permissions') }}

@if(!empty($empDetails['adminwebrole'])) @foreach($empDetails['adminwebrole'] as $key => $emp) @php $divId = $emp["id"].$key.$key+1; @endphp
{{ Form::hidden('admin_webrole_id[]', $emp['id']) }} {{ Form::label(__('lbl.role')) }} {{ Form::select('webrole[]', !empty($webrole) ? $webrole : [], isset($emp['role_id']) ? $emp['role_id'] : '',["class"=>"form-control"]) }}
{{ Form::label(__('lbl.action')) }}
{{ Form::button('', ["name"=>"remove_item","style"=>"width:15%","class"=>"clickbtncommon btn-sm btn btn-primary remove_dataitem_web btn-sm ","data-id"=>$divId,"data-recordid"=>$emp['id']]) }}
@endforeach @endif
{{ Form::button(' '. __('lbl.add_new'), ["name"=>"","id"=>"add_item_web","class"=>"clickbtncommon btn-sm btn btn-primary"]) }}
{{ Form::button(' '.__('lbl.save'), ["name"=>"submit",'class' => 'clickbtncommon btn-sm btn btn-primary ', 'type' => 'submit']) }} {{ __('lbl.cancel') }}
{{ Form::hidden('password_old', $empDetails['password']) }} {{ Form::hidden('profile_old', $empDetails['profile']) }} {{ Form::close() }} {{ Form::hidden('employeepin', route('employeepin'),['id'=>'employeepin']) }} {{ Form::hidden('subroledestroy', route('subroledestroy'),['id'=>'subroledestroy'])}}
{{ Form::hidden('role_wage_id[]', '0') }} {{ Form::label(__('lbl.role')) }} {{ Form::select('role', $role, '',["class"=>"form-control","id"=>"role","name"=>"role[]"]) }}
{{ Form::label('wage') }} {{ Form::text('wage', '', ["class"=>"form-control mxlen_8 numer_float_only","placeholder"=>"Wage","id"=>"wage","name"=>"wage[]"]) }}
{{ Form::label(__('lbl.action')) }}
{{ Form::button('', ['data-recordid'=>'', "name"=>"remove_item","class"=>"clickbtncommon remove_edititem btn btn-sm btn-primary remove_dataitem"]) }}
{{ Form::hidden('admin_webrole_id[]', '0') }} {{ Form::label(__('lbl.role')) }} {{ Form::select('webrole[]', !empty($webrole) ? $webrole : [], '',["class"=>"form-control"]) }}
{{ Form::label(__('lbl.action')) }}
{{ Form::button('', ['data-recordid'=>'',"name"=>"remove_item","style"=>"width:15%","class"=>"clickbtncommon btn-sm btn btn-primary remove_dataitem_web btn-sm "]) }}
@endsection @section('pagescript') {!! Helper::pagejs([ 'js/lib/select2/dist/js/select2.full.min.js', 'js/lib/moment/min/moment.min.js', 'js/lib/bootstrap-daterangepicker/daterangepicker.js', 'js/lib/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js', 'js/lib/plugins/timepicker/bootstrap-timepicker.min.js', 'bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js', 'js/backend/employees/add_edit.js' ]) !!} @stop