{!! Form::open(['url' => empty($shift) ? action('\Modules\Essentials\Http\Controllers\ShiftController@store') : action('\Modules\Essentials\Http\Controllers\ShiftController@update', [$shift->id]), 'method' => empty($shift) ? 'post' : 'put', 'id' => 'add_shift_form' ]) !!}

@lang( 'essentials::lang.add_shift' )

{!! Form::label('name', __( 'user.name' ) . ':*') !!} {!! Form::text('name', !empty($shift->name) ? $shift->name : null, ['class' => 'form-control', 'placeholder' => __( 'user.name'), 'required']); !!}
{!! Form::label('type', __('essentials::lang.shift_type') . ':*') !!} @show_tooltip(__('essentials::lang.shift_type_tooltip')) {!! Form::select('type', ['fixed_shift' => __('essentials::lang.fixed_shift'), 'flexible_shift' => __('essentials::lang.flexible_shift')], !empty($shift->type) ? $shift->type : null, ['class' => 'form-control select2', 'required', 'id' => 'shift_type']); !!}
{!! Form::label('start_time', __( 'restaurant.start_time' ) . ':*') !!}
{!! Form::text('start_time', !empty($shift->start_time) ? @format_time($shift->start_time) : null, ['class' => 'form-control', 'placeholder' => __( 'restaurant.start_time' ), 'readonly', 'required' ]); !!}
{!! Form::label('end_time', __( 'restaurant.end_time' ) . ':*') !!}
{!! Form::text('end_time', !empty($shift->end_time) ? @format_time($shift->end_time) : null, ['class' => 'form-control', 'placeholder' => __( 'restaurant.end_time' ), 'readonly', 'required']); !!}
{!! Form::label('holidays', __( 'essentials::lang.holiday' ) . ':') !!} {!! Form::select('holidays[]', $days, !empty($shift->holidays) ? $shift->holidays : null, ['class' => 'form-control select2', 'multiple' ]); !!}
{!! Form::close() !!}