{{ __('form.Shift-Change') }}

{{-- --}}
@foreach ($data as $shiftchange) @php $approval = $shiftchange->approval; $currentStep = $approval?->steps->firstWhere('status', 'active'); $currentUser = auth()->user(); $canApprove = false; if ($currentStep) { $canApprove = ($currentStep->user_id === $currentUser->id) || ($currentStep->approver_role && $currentUser->hasRole($currentStep->approver_role)); } @endphp @endforeach
# {{ __('table.Code') }} {{ __('table.Employee-Name') }} {{ __('table.Date') }} {{ __('table.Current-Shift') }} {{ __('table.New-Shift') }} Status {{ __('table.Action') }}
{{ $loop->iteration }} {{ $shiftchange->code }} {{ $shiftchange->effective_date }} {{ $shiftchange->currentshift->name }} {{ $shiftchange->newshift->name }} @if ($shiftchange->status === 'P') @if ($canApprove) @endif @else {{__('form.No-Action')}} @endif