{{$leave->leave_date->translatedFormat(company()->date_format)}}
({{ $leave->leave_date->format('l') }})
|
{{ $leave->type->type_name }}
|
@if ($leave->paid == 1)
{{ __('app.paid') }}
@else
{{ __('app.unpaid') }}
@endif
@if ($leave->over_utilized == 1)
({{ __('modules.leaves.overUtilized') }})
@endif
|
@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}}
|
@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