@extends('admin.layouts.app') @section('title', get_setting('site_name').' | '.__('Disciplinary case').' #'.$case->id) @section('content') @include('admin.disciplinary.partials.styles') @php $statusOrder = [ \App\Models\DisciplinaryCase::STATUS_OPEN, \App\Models\DisciplinaryCase::STATUS_INVESTIGATION, \App\Models\DisciplinaryCase::STATUS_SHOW_CAUSE, \App\Models\DisciplinaryCase::STATUS_VERDICT_PENDING, \App\Models\DisciplinaryCase::STATUS_CLOSED, ]; $currentIdx = array_search($case->status, $statusOrder, true); if ($case->status === \App\Models\DisciplinaryCase::STATUS_DISMISSED) { $currentIdx = 99; } $evidence = $case->incident->evidence_files ?? []; @endphp

{{ __('Case') }} #{{ $case->id }}

{{ \App\Models\DisciplinaryCase::statusLabel($case->status) }}
{{ __('Back to cases') }}
{{ __('Case overview') }}
{{ __('Employee') }}{{ $case->incident->staff->user->name ?? '—' }}
{{ __('Category') }}{{ $case->incident->category->name ?? '—' }}
{{ __('Incident date') }}{{ $case->incident->incident_date?->format('d M Y') ?? '—' }}
{{ __('Reported by') }}{{ $case->incident->reporter->name ?? '—' }}
{{ __('Compliance total') }}{{ $complianceTotal }}
@if($case->investigator)
{{ __('Investigator') }}{{ $case->investigator->user->name ?? '—' }}
@endif
{{ __('Description') }}
{!! nl2br(e($case->incident->description)) !!}
@if(count($evidence))
{{ __('Evidence') }}
@endif
@if($case->investigation_notes && ! auth()->user()->can('Disciplinary-edit'))
{{ __('Investigation notes') }}
{!! nl2br(e($case->investigation_notes)) !!}
@endif @if(($case->hearing_at || $case->hearing_location || $case->hearing_notes) && (in_array($case->status, [\App\Models\DisciplinaryCase::STATUS_CLOSED, \App\Models\DisciplinaryCase::STATUS_DISMISSED], true) || ! auth()->user()->can('Disciplinary-edit')))
{{ __('Hearing') }}
{{ __('When') }}{{ $case->hearing_at?->format('d M Y H:i') ?? '—' }}
{{ __('Location') }}{{ $case->hearing_location ?: '—' }}
@if($case->hearing_notes)
{!! nl2br(e($case->hearing_notes)) !!}
@endif
@endif @if($case->appeal)
{{ __('Appeal') }} {{ \App\Models\DisciplinaryAppeal::statusLabel($case->appeal->status) }}
{{ __('Grounds') }}
{!! nl2br(e($case->appeal->grounds)) !!}
@if($case->appeal->decided_at)

{{ __('Decided') }}: {{ $case->appeal->decided_at->format('d M Y H:i') }} @if($case->appeal->decidedBy) — {{ $case->appeal->decidedBy->name }} @endif

@if($case->appeal->decision_notes)
{!! nl2br(e($case->appeal->decision_notes)) !!}
@endif @endif
@endif @if($case->employee_reply_text)
{{ __('Employee reply') }} {{ $case->employee_reply_at?->format('d M Y H:i') }}
{!! nl2br(e($case->employee_reply_text)) !!}
@endif @if($case->final_verdict)
{{ __('Proposed / final verdict') }}
@if($case->finalAction)

{{ __('Action') }}: {{ $case->finalAction->name }}

@endif {!! nl2br(e($case->final_verdict)) !!}
@endif @if($case->hasShowCauseNotice() || $case->hasWarningLetter())
{{ __('Letters') }}
@if($case->hasShowCauseNotice()) {{ __('View / Print show-cause') }} @endif @if($case->hasWarningLetter()) {{ __('View / Print warning letter') }} @endif
@endif @can('Disciplinary-edit') @if($case->status === \App\Models\DisciplinaryCase::STATUS_OPEN)
{{ __('Start investigation') }}
@csrf
@endif @if(! in_array($case->status, [\App\Models\DisciplinaryCase::STATUS_CLOSED, \App\Models\DisciplinaryCase::STATUS_DISMISSED], true))
{{ __('Investigation notes') }}
@csrf
{{ __('Hearing schedule') }}
@csrf
@endif @if($case->status === \App\Models\DisciplinaryCase::STATUS_INVESTIGATION)
{{ __('Show-cause') }}

{{ __('Issues the notice and opens the employee reply stage. Use View / Print for Bangla-safe output.') }}

@csrf
@endif @endcan @can('Disciplinary-Approve') @if($case->appeal && $case->appeal->status === \App\Models\DisciplinaryAppeal::STATUS_PENDING)
{{ __('Decide appeal') }}
@csrf
@endif @endcan @can('Disciplinary-Approve') @if(in_array($case->status, [\App\Models\DisciplinaryCase::STATUS_SHOW_CAUSE, \App\Models\DisciplinaryCase::STATUS_INVESTIGATION], true))
{{ __('Send for hierarchy verdict') }}
@csrf

{{ __('Uses Approval Hierarchy / supervisor chain when configured for request type :t.', ['t' => 'App\\Models\\DisciplinaryCase']) }}

@endif @endcan @can('Disciplinary-edit') @if(! in_array($case->status, [\App\Models\DisciplinaryCase::STATUS_CLOSED, \App\Models\DisciplinaryCase::STATUS_DISMISSED], true))
{{ __('Dismiss case') }}
@csrf
@endif @endcan
{{ __('Progress') }}
@if($case->status === \App\Models\DisciplinaryCase::STATUS_DISMISSED)

{{ __('Dismissed') }}

@else
    @foreach($statusOrder as $i => $st) @if($st === \App\Models\DisciplinaryCase::STATUS_CLOSED && $case->status === \App\Models\DisciplinaryCase::STATUS_DISMISSED) @continue @endif
  • {{ \App\Models\DisciplinaryCase::statusLabel($st) }}
    @if($st === \App\Models\DisciplinaryCase::STATUS_SHOW_CAUSE && $case->show_cause_issued_at)
    {{ $case->show_cause_issued_at->format('d M Y H:i') }}
    @elseif($st === \App\Models\DisciplinaryCase::STATUS_CLOSED && $case->closed_at)
    {{ $case->closed_at->format('d M Y H:i') }}
    @endif
  • @endforeach
@endif @if($case->appeal_deadline_at && $case->status === \App\Models\DisciplinaryCase::STATUS_CLOSED)

{{ __('Appeal deadline') }}: {{ $case->appeal_deadline_at->format('d M Y') }}

@endif
@endsection @section('script') @endsection