{{__('hr_messages.Employee Shift')}} - {{$employee->name}}

@livewire('hr.employee-train-component' , ['component_name' => 'Employee Shifts' , 'employee' => $employee , 'employee_id' => $employee->id])
@can('add employee_shifts')
{{-- Shifts --}}
*
shift_id @foreach(\App\Models\Shift::all() as $shift) @endforeach
{{-- Shift Date --}}
{{-- work_place_id --}}
*
work_place_id @foreach(\App\Models\WorkPlace::all() as $work_place) @endforeach
@endcan @if (session()->has('message'))
{{ session('message') }}
@endif
@can("show employee_shifts") # {{__('hr_messages.Shift Name')}} {{__('hr_messages.Shift Date')}} {{__('hr_messages.From')}} {{__('hr_messages.To')}} {{__('hr_messages.Work Place')}} {{__('hr_messages.Shift Hours')}} {{__('messages.Created At')}} {{__('messages.Updated By')}}   @forelse(\App\Models\EmployeeShift::where('employee_id',$employee->id)->get() as $emp_shift) #{{$loop->iteration}} {{__('hr_messages.Shift Name')}}{{$emp_shift->shift->name}} {{__('hr_messages.Shift Date')}} @if ($emp_shift->shift_date) {{$emp_shift->shift_date}} @else Your Always Shift @endif {{__('hr_messages.From')}} {{$emp_shift->from}} {{__('hr_messages.To')}} {{$emp_shift->to}} {{__('hr_messages.Work Place')}}{{($emp_shift->work_place_id)?$emp_shift->work_place->name : "-"}} {{__('hr_messages.Shift Hours')}} @if ($emp_shift->from &&$emp_shift->to) {{ abs(number_format((float)( strtotime($emp_shift->to) - strtotime($emp_shift->from) ) /60 /60, 0, '.', '') ) }} Hours @endif {{__('messages.Created At')}} {{$emp_shift->created_at}} {{__('messages.Updated By')}} {{($emp_shift->last_updated_by)?$emp_shift->last_updated_by_user->name:"-"}}
@can("delete employee_shifts") mt-0 {{__('hr_messages.Shift Name')}} : {{$emp_shift->shift->name}} {{__('hr_messages.To Employee Name')}} : {{$emp_shift->employee->name}} {{$emp_shift->id}} @endcan @can('edit employee_shifts') {{__('hr_messages.Employee Shift')}} mt-0 {{$emp_shift->id}}
{{-- Shifts --}}
*
edit_shift_id @foreach(\App\Models\Shift::all() as $shift) @endforeach
{{-- Shift Date --}}
{{-- work_place_id --}}
*
edit_work_place_id @foreach(\App\Models\WorkPlace::all() as $work_place) @endforeach
@endcan
@empty {{__('messages.Empty Result')}} @endforelse
@endcan