@extends('backEnd.master') @section('slot_name') @lang('hr.slotemployee') @endsection @section('mainContent') @lang('hr.slotemployee') @lang('common.dashboard') @lang('hr.human_resource') @lang('hr.slotemployee') @if (isset($slotemployee)) @if (userPermission('slotemployee-store')) @lang('common.add') @endif @endif @if (isset($slotemployee)) {{ Form::open(['class' => 'form-horizontal', 'files' => true, 'route' => ['slotemployee-update', $slotemployee->id], 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }} @else @if (userPermission('slotemployee-store')) {{ Form::open([ 'class' => 'form-horizontal', 'files' => true, 'route' => 'slotemployee-store', 'method' => 'POST', 'enctype' => 'multipart/form-data', ]) }} @endif @endif @if (isset($slotemployee)) @lang('hr.edit_slotemployee') @else @lang('hr.add_slotemployee') @endif @php if (isset($slotemployee)) { $slotemployee->slot_day = explode(',', $slotemployee->slot_day); } @endphp @lang('hr.select_slot_day') * slot_day)) ? 'selected' : '' }}> @lang('common.monday') slot_day)) ? 'selected' : '' }}> @lang('common.tuesday') slot_day)) ? 'selected' : '' }}> @lang('common.wednesday') slot_day)) ? 'selected' : '' }}> @lang('common.thursday') slot_day)) ? 'selected' : '' }}> @lang('common.friday') slot_day)) ? 'selected' : '' }}> @lang('common.saturday') slot_day)) ? 'selected' : '' }}> @lang('common.sunday') @if ($errors->has('slot_day')) {{ $errors->first('slot_day') }} @endif @lang('hr.slot_start') * @if ($errors->has('slot_start')) {{ $errors->first('slot_start') }} @endif @lang('hr.slot_end') * @if ($errors->has('slot_end')) {{ $errors->first('slot_end') }} @endif @php $tooltip = ''; if (userPermission('slotemployee-store')) { $tooltip = ''; } elseif (isset($slotemployee) && userPermission('slotemployee-edit')) { $tooltip = ''; } else { $tooltip = 'You have no permission to add'; } @endphp @isset($slotemployee) @lang('hr.update_slotemployee') @else @lang('hr.save_slotemployee') @endisset {{ Form::close() }} @lang('hr.slotemployee_list') @lang('hr.slot_day') @lang('hr.slot_start') @lang('hr.slot_end') @lang('common.action') @foreach ($slotemployees as $slot) {{ $slot->slot_day }} {{ formatTime($slot->slot_start) }} {{ formatTime($slot->slot_end) }} @if (userPermission('slotemployee-edit')) @lang('common.edit') @endif @if (userPermission('slotemployee-delete')) @lang('common.delete') @endif @lang('hr.delete_slotemployee') × @lang('common.are_you_sure_to_delete') @lang('common.cancel') {{ Form::open(['route' => ['slotemployee-delete', $slot->id], 'method' => 'DELETE', 'enctype' => 'multipart/form-data']) }} @lang('common.delete') {{ Form::close() }} @endforeach @endsection @include('backEnd.partials.data_table_js')