Resignation #{{ $r->id }}
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif @php $empName = $r->employee_name ?? optional($r->user)->name; $empEmail = $r->employee_email ?? optional($r->user)->email; $empCode = $r->employee_code ?? optional($r->user)->employee_code; @endphp
Employee: {{ $empName }} @if ($empEmail)
{{ $empEmail }}
@endif
Type: {{ $r->resource_type_label }}
Employee Code: {{ $empCode }}
Applied: {{ $r->resignation_date?->format('d M Y') }}
Notice: {{ $r->notice_period_months }} month(s)
LWD: {{ $r->last_working_day ? $r->last_working_day->format('d M Y') : '—' }}
Status: {{ $r->status }}

Department Clearances
@foreach ($r->tasks as $t) @php $perm = \App\Support\ExitDept::clearancePermissionFor((int) $t->department_id); $canShow = in_array($r->status, ['APPROVED', 'ABSCOND']) && (auth()->user()->can(\App\Support\ExitDept::OVERRIDE_PERMISSION) || ($perm && auth()->user()->can($perm))); // Lock the row once the department has taken action (status finalized or action timestamp present) $alreadyActioned = in_array($t->status, ['APPROVED', 'LOST'], true) || !is_null($t->action_at); @endphp @endforeach
Department Status Remarks Approver Updated Action
{{ $t->department->name ?? $t->department_id }} {{ $t->status }} {{ $t->remarks ?? '—' }} {{ $t->actor->name ?? '—' }} {{ optional($t->action_at)?->format('d M Y H:i') ?? '—' }} @if ($canShow)
@csrf
@if ($alreadyActioned) Finalized {{ $t->action_at?->format('d M Y H:i') }} @endif
@else — @endif

{{-- Decision form (HR/Manager only) --}} @can('decide', $r)
@csrf
@endcan {{-- Exit (HR only) --}} @can('exit', $r)
@csrf
@endcan
Loading...