{{$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}}
|
@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))))
@if($viewType == 'model')
@if ($leave->status == 'pending' && $approveRejectPermission == 'all')
@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