{{$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)))
@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)))
@endif
|
@else
|
@endif
@endif
@empty