@extends('layouts.app') @section('title', 'Supervision Analysis - Reports') @section('content') @php $types = config('probation.case_types'); @endphp
| Period | Brought forward | New placements | Completed / closed | Carried forward |
|---|---|---|---|---|
| {{ $b->label }} | {{ $b->bf }} | {{ $b->new }} | {{ $b->done }} | {{ $b->cf }} |
| Total in range | — | {{ collect($buckets)->sum('new') }} | {{ collect($buckets)->sum('done') }} | — |
| Serial | Name | Category | Officer | Date released | Status | PR 2A records | Latest progress | Interventions | Empowerment | Completion |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $c->serial_number }} | {{ optional($c->prisoner)->name }} | {{ config('probation.aftercare_categories')[$c->aftercare_category] ?? 'Borstal' }} | {{ optional($c->officer)->name ?? '—' }} | {{ optional($c->date_released)->format('d M Y') ?? '—' }} | {{ ucwords(str_replace('_',' ',$c->status)) }} | {{ $notes->count() }} | @if($latest){{ optional($latest->reported_on)->format('d M Y') }}: {{ \Illuminate\Support\Str::limit($latest->progress ?? $latest->discussions, 70) }}@else — @endif | {{ $c->interventions->count() }} | {{ $c->empowerments->map(fn ($e) => ucwords(str_replace('_',' ',$e->type)) . ' (' . $e->status . ')')->implode(', ') ?: '—' }} | {{ $c->completion ? \App\Models\ProbationCase::completionLabel($c->completion->mode) : 'Ongoing' }} |
| No aftercare clients yet. | ||||||||||