@php $actionColors = [ 'none' => 'slate', 'verbal_warning' => 'amber', 'written_warning' => 'amber', 'final_warning' => 'rose', 'suspension' => 'rose', 'dismissal' => 'rose', ]; $docColors = ['warning' => 'rose', 'incident_report' => 'amber', 'suspension' => 'rose', 'medical' => 'sky']; $money = fn ($v) => $baseCode.' '.number_format((float) $v, 2); $openCount = $cases->where('status', 'open')->count(); @endphp

{{ __('Conduct & disciplinary') }}

{{ __('Incidents, warnings, suspensions and costs recovered from pay. Private to HR and the employee.') }} @if ($cases->isNotEmpty()) · {{ trans_choice('{1}:count case|[2,*]:count cases', $cases->count(), ['count' => $cases->count()]) }}, {{ __(':n open', ['n' => $openCount]) }} @endif

@if ($canManageRecords) {{ __('Record incident') }} @endif
@if ($cases->isEmpty())
@else
@foreach ($cases as $case) @php $recovery = $case->recovery && $case->recovery->status !== 'cancelled' ? $case->recovery : null; $leave = $case->leaveApplication; $suspDays = $leave && $leave->status === 'approved' ? (float) $leave->requested_days : 0; @endphp
{{-- Heading --}}
{{ $case->reference }} {{ $case->actionLabel() }} {{ $case->isOpen() ? __('Open') : __('Closed') }}

{{ $case->title }}

{{ $case->incident_on?->format('j M Y') }} · {{ $case->categoryLabel() }} @if ($case->recorder) · {{ __('recorded by :name', ['name' => $case->recorder->name]) }} @endif

@if ($canManageRecords)
@if ($case->isOpen()) @else @endif
@endif
@if ($case->description)

{{ $case->description }}

@endif {{-- Suspension + recovery strip --}} @if ($case->hasSuspension() || ($recovery && $canSeeMoney))
@if ($case->hasSuspension())

{{ __('Suspension') }}

{{ $case->suspended_from->format('j M') }} – {{ $case->suspended_to->format('j M Y') }}

{{ trans_choice('{1}:n working day|[2,*]:n working days', (int) ceil($suspDays), ['n' => rtrim(rtrim(number_format($suspDays, 1), '0'), '.')]) }} · {{ $case->suspension_paid ? __('on full pay') : __('without pay') }} @if (! $case->suspension_paid && $canSeeMoney && $dailyRate > 0) · {{ __('about :amt off basic pay', ['amt' => $money($suspDays * $dailyRate)]) }} @endif

@endif @if ($recovery && $canSeeMoney) @php $pct = (float) $recovery->total_amount > 0 ? min(100, round((float) $recovery->recovered_amount / (float) $recovery->total_amount * 100)) : 0; @endphp

{{ __('Recovered from pay') }}

{{ $money($recovery->recovered_amount) }} {{ __('of') }} {{ $money($recovery->total_amount) }}

{{ __(':amt a month from :month', ['amt' => $money($recovery->instalment_amount ?: $recovery->target_instalment), 'month' => $recovery->start_period?->format('M Y')]) }} · @if ($recovery->status === 'settled') {{ __('paid back') }} @elseif ($recovery->status === 'waived') {{ __('waived') }} @else {{ __(':amt still to go', ['amt' => $money($recovery->outstanding)]) }} @endif

@endif
@endif {{-- Documents filed against the case --}} @if ($case->documents->isNotEmpty())
    @foreach ($case->documents as $doc)
  • {{ $doc->typeLabel() }} {{ $doc->title }} {{ $doc->issued_on?->format('j M Y') }}
    @if ($doc->body)

    {{ \Illuminate\Support\Str::limit($doc->body, 240) }}

    @endif
    @if ($doc->hasFile()) @endif
  • @endforeach
@elseif ($canManageRecords)

{{ __('No warning letter or report filed yet.') }}

@endif @if (! $case->isOpen() && $case->outcome)

{{ __('Outcome') }}: {{ $case->outcome }}

@endif
@endforeach
@endif
{{-- ===================================================== CASE MODAL --}} {{ $editingId ? __('Edit case') : __('Record an incident') }}

{{ __('File the signed warning letter and any reports against the case once it is saved.') }}

{{-- Suspension --}}
@if ($c_suspend)
@if ($previewDays > 0)

{{ __(':n working days.', ['n' => rtrim(rtrim(number_format($previewDays, 1), '0'), '.')]) }} @if (! $c_suspension_paid) {{ __('Payroll takes them off the basic salary of the month they fall in.') }} @if ($canSeeMoney && $dailyRate > 0) {{ __('About :amt at the current daily rate.', ['amt' => $money($previewDays * $dailyRate)]) }} @endif @endif {{ __('The attendance roster shows them as suspended, not absent.') }}

@endif
@endif
{{-- Recovery --}} @if ($canManagePay)

{{ __('For money the company paid on their behalf, such as a hospital bill. Deducted on each payroll until it is back.') }}

@if ($r_enabled)
@if ((float) $r_amount > 0 && (float) $r_instalment > 0)

{{ trans_choice('{1}Paid back in :n month.|[2,*]Paid back in :n months.', (int) ceil((float) $r_amount / (float) $r_instalment), ['n' => (int) ceil((float) $r_amount / (float) $r_instalment)]) }} {{ __('Taken in full each month, like a loan instalment, but never below zero pay.') }}

@endif
@endif
@endif
{{ __('Cancel') }} {{ $editingId ? __('Save changes') : __('Record incident') }} {{ __('Saving…') }}
{{-- ================================================= DOCUMENT MODAL --}} {{ __('File a letter or report') }}
{{ __('Cancel') }} {{ __('File it') }} {{ __('Saving…') }}
{{-- ==================================================== CLOSE MODAL --}} {{ __('Close the case') }}

{{ __('Closing does not stop a deduction still running.') }}

{{ __('Cancel') }} {{ __('Close case') }}