@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Separation Request').' #'.$row->id) @push('css') @endpush @section('content') @php $staff = $row->staff; $typeLabel = \App\Models\StaffSeparationRequest::separationTypeLabel($row->separation_type ?? $row->kind); $statusBadge = match ($row->status) { 'pending' => 'badge-warning', 'confirmed' => 'badge-success', 'reinstated' => 'badge-primary', 'rejected' => 'badge-secondary', default => 'badge-light', }; @endphp

{{ __('Separation Request') }} #{{ $row->id }}

{{ $typeLabel }} · {{ $staff?->user?->name ?? '—' }}

{{ __('Back') }} {{ __('Print Application') }} @if($row->status === 'confirmed') নমুনা-১৫ @if($row->finalClearanceForm?->hasBranchData()) নমুনা-১৫ @endif @php $canSeeHo = \App\Models\StaffFinalClearanceForm::canViewHeadOfficeClearance($row->finalClearanceForm); $canEditHo = \App\Models\StaffFinalClearanceForm::canEditHeadOfficeClearance(); @endphp @if($canEditHo || $canSeeHo) নমুনা-১৫/১ @endif @if($row->finalClearanceForm?->hasHeadOfficeData() && $canSeeHo) নমুনা-১৫/১ @endif {{ __('Settlement Checklist') }} @if($row->settlementChecklist) {{ __('Print Checklist') }} @endif @if($row->finalSettlement) {{ __('No-Demand Certificate') }} @else @can('User-edit') @if(! empty($pendingReinstate)) {{ __('Reinstate pending') }}: {{ user_display_label($pendingReinstate->currentApprover) }} @else @endif @endcan @endif @endif
@if(session('message'))
{{ session('message') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($row->status === 'reinstated')
{{ __('Reinstate Approved') }} — {{ __('This employee is active again. Offboarding actions (clearance / settlement / reinstate) are closed.') }} @if($row->reinstated_at)
{{ __('Reinstated on') }}: {{ $row->reinstated_at->format('d M Y, h:i A') }} @if($row->reinstatedBy) · {{ $row->reinstatedBy->name }} @endif
@endif @if($row->reinstate_remark)
{{ $row->reinstate_remark }}
@endif
@endif @if(! empty($approvalStages))
@foreach($approvalStages as $stage)
@if(($stage['state'] ?? '') === 'done') @elseif(($stage['state'] ?? '') === 'rejected') @else {{ $loop->iteration }} @endif
{{ $stage['label'] }}
@if(! empty($stage['sub']))
{{ $stage['sub'] }}
@endif
@endforeach
@endif
{{ __('Request Details') }}
{{ __('Separation Type') }}
{{ $typeLabel }}
{{ __('Application Date') }}
{{ $row->application_date?->format('Y-m-d') ?? '—' }}
{{ __('Last Working Date') }}
{{ $row->last_working_date?->format('Y-m-d') ?? '—' }}
{{ __('Status') }}
@if($row->status === 'reinstated') {{ __('Reinstate Approved') }} @else {{ ucfirst($row->status) }} @endif
{{ __('Created By') }}
{{ $row->createdBy?->name ?? '—' }}
{{ __('Decided By') }}
{{ $row->confirmedBy?->name ?? '—' }} @if($row->confirmed_at) ({{ $row->confirmed_at->format('Y-m-d H:i') }}) @endif
{{ __('Reason') }}
{{ $row->reason ?: '—' }}
@if($row->employee_remark)
{{ __('Employee Note') }}
{{ $row->employee_remark }}
@endif @if($row->admin_remark)
{{ __('Admin Note') }}
{{ $row->admin_remark }}
@endif @if($row->status === 'reinstated')
{{ __('Reinstated By') }}
{{ $row->reinstatedBy?->name ?? '—' }} @if($row->reinstated_at) ({{ $row->reinstated_at->format('Y-m-d H:i') }}) @endif
@if($row->reinstate_remark)
{{ __('Reinstate Remark') }}
{{ $row->reinstate_remark }}
@endif @endif
{{ __('Employee Signature & Seal') }}
@if($signatureUrl || $sealUrl)
@if($signatureUrl)
{{ __('Signature') }}
{{ __('Signature') }}
@endif @if($sealUrl)
{{ __('Seal') }}
{{ __('Seal') }}
@endif
@else

{{ __('No signature or seal uploaded for this employee.') }}

@endif
{{ __('Employee') }}
{{ __('Name') }}
{{ $staff?->user?->name ?? '—' }}
{{ __('SID') }}
{{ $staff?->displaySid() ?? '—' }}
{{ __('Designation') }}
{{ $staff?->designation?->name ?? '—' }}
{{ __('Department') }}
{{ $staff?->department?->name ?? '—' }}
{{ __('Branch') }}
{{ $staff?->warehouse?->name ?? '—' }}
{{ __('Joining Date') }}
{{ $staff?->joing_date?->format('Y-m-d') ?? '—' }}
{{ __('Mobile') }}
{{ $staff?->mobile_no ?? '—' }}
@if($workflowEnabled && $row->status === 'pending')
{{ __('This request is pending approval. Use Approval Center to decide.') }}
@endif
@can('User-edit') @if($row->status === 'confirmed' && ! $row->finalSettlement) @endif @endcan @endsection