@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Termination & Resignation')) @push('css') @endpush @section('content') @php $openCreateModal = $errors->any() || old('staff_id') || old('separation_type') || old('reason'); @endphp
@if (session()->has('message'))
{{ session('message') }}
@endif @if (session()->has('error'))
{{ session('error') }}
@endif

{{ __('Termination & Resignation') }}

{{ __('Record separation requests and manage employee exits.') }}

{{ __('Export Excel') }}
{{ __('All Requests') }}
{{ __(':count total', ['count' => $rows->total()]) }}
{{ __('Clear') }}
@forelse($rows as $r) @php $pendingReinstate = $r->latestReinstateApproval && $r->latestReinstateApproval->status === 'pending' ? $r->latestReinstateApproval : null; $approvedReinstate = $r->latestReinstateApproval && $r->latestReinstateApproval->status === 'approved' ? $r->latestReinstateApproval : null; $showOffboarding = $r->status === 'confirmed' && ! $pendingReinstate; @endphp @empty @endforelse
# {{ __('Type') }} {{ __('Employee') }} {{ __('Application Date') }} {{ __('Status') }} {{ __('Last Day') }} {{ __('Actions') }}
{{ $r->id }} {{ \App\Models\StaffSeparationRequest::separationTypeLabel($r->separation_type ?? $r->kind) }}
{{ $r->staff?->user?->name ?? '—' }}
@if($r->staff)
{{ $r->staff->displaySid() }}
@endif
{{ $r->application_date?->format('Y-m-d') ?? '—' }} @if($r->status === 'pending') {{ __('Pending') }} @elseif($r->status === 'confirmed') {{ __('Confirmed') }} @if($r->finalSettlement) {{ __('Settled') }} @endif @if($approvedReinstate)
{{ __('Reinstate approved but not applied — open View and sync.') }}
@endif @elseif($r->status === 'reinstated') {{ __('Reinstate Approved') }} @if($r->reinstated_at)
{{ $r->reinstated_at->format('d M Y, h:i A') }}
@endif @else {{ __('Rejected') }} @endif
{{ $r->last_working_date?->format('Y-m-d') ?? '—' }}
@can('User-edit') @if($r->status === 'pending') @if($workflowEnabled) {{ __('Use Approval Center') }} @else @endif @endif @endcan @if($r->status === 'reinstated') {{ __('Employee reinstated — offboarding closed') }} @elseif($r->status === 'confirmed') @can('User-edit') @if(! $r->finalSettlement) @if($pendingReinstate) {{ __('Reinstate pending') }}: {{ user_display_label($pendingReinstate->currentApprover) }} @else @endif @endif @endcan @if($showOffboarding)
@endif @elseif($r->staff_id) {{ __('Experience Certificate') }} @endif {{ __('View') }} {{ __('Print') }}
{{ __('No requests found.') }}
@if($rows->hasPages()) @endif
@foreach($rows as $r) @can('User-edit') @if($r->status === 'pending' && ! $workflowEnabled) @endif @if($r->status === 'confirmed' && ! $r->finalSettlement) @endif @endcan @endforeach @endsection @push('script') @endpush