@lang('app.leaveDate') @lang('app.leaveType') @lang('app.status') @php if (isset($multipleLeaves)) { $leave = $multipleLeaves[0]; } @endphp @if ($approveRejectPermission == 'all' || ($deleteLeavePermission == 'all' || ($deleteLeavePermission == 'added' && user()->id == $leave->added_by) || ($deleteLeavePermission == 'owned' && user()->id == $leave->user_id) || ($deleteLeavePermission == 'both' && (user()->id == $leave->user_id || user()->id == $leave->added_by)) || ($leaveSetting->manager_permission != 'cannot-approve' && user()->id == $multipleLeaves->first()->user->employeeDetails->reporting_to) )) @lang('app.action') @endif @forelse($multipleLeaves as $leave) {{$leave->leave_date->translatedFormat(company()->date_format)}} {{ $leave->type->type_name }} @php if ($leave->status == 'approved') { $class = 'text-light-green'; $status = __('app.approved'); } else if ($leave->status == 'pending') { $class = 'text-yellow'; $status = __('app.pending'); } else { $class = 'text-red'; $status = __('app.rejected'); } @endphp {{$status}} {{-- @dd($leaveSetting->manager_permission != 'cannot-approve', user()->id == $leave->user->employeeDetails->reporting_to)--}} @if ($approveRejectPermission == 'all' || ($deleteLeavePermission == 'all' || ($deleteLeavePermission == 'added' && user()->id == $leave->added_by) || ($deleteLeavePermission == 'owned' && user()->id == $leave->user_id) || ($deleteLeavePermission == 'both' && (user()->id == $leave->user_id || user()->id == $leave->added_by)) ) || ($leaveSetting->manager_permission != 'cannot-approve' && user()->id == $leave->user->employeeDetails->reporting_to) ) @if($viewType == 'model') @if ($leave->status == 'pending' && ($approveRejectPermission == 'all' || ($leaveSetting->manager_permission != 'cannot-approve' && user()->id == $leave->user->employeeDetails->reporting_to)))
id }} data-leave-action="approved" data-toggle="tooltip" data-original-title="@lang('app.approve')" data-leave-type-id="{{ $leave->leave_type_id }}" href="javascript:;">
id }} data-leave-action="rejected" data-toggle="tooltip" data-original-title="@lang('app.reject')" data-leave-type-id="{{ $leave->leave_type_id }}" href="javascript:;">
@endif @if ($deleteLeavePermission == 'all' || ($deleteLeavePermission == 'added' && user()->id == $leave->added_by) || ($deleteLeavePermission == 'owned' && user()->id == $leave->user_id) || ($deleteLeavePermission == 'both' && (user()->id == $leave->user_id || user()->id == $leave->added_by)))
id}} data-type="multiple-leave" data-unique-id="{{$leave->unique_id}}" class="dropdown-item delete-table-row action-hover" data-toggle="tooltip" data-original-title="@lang('app.delete')" href="javascript:;">
@endif @else
@endif @endif @empty @endforelse