{{-- Overview tab: case facts · quick actions · biometrics · historical records · case timeline --}} @php $timeline = collect(); $timeline->push(['at' => $case->created_at, 'text' => 'Registered (' . $case->serial_number . ')']); foreach ($case->allocations as $al) { $timeline->push(['at' => $al->created_at, 'text' => ucwords(str_replace('_', ' ', $al->action)) . ' → ' . (optional($al->officer)->name ?? '—') . ($al->reason ? ' · ' . $al->reason : '')]); } foreach (optional($case->socialInquiry)->interviews ?? [] as $iv) { $timeline->push(['at' => $iv->interview_date ?? $iv->created_at, 'text' => 'Interview' . ($iv->is_draft ? ' (draft)' : '') . ' — ' . (config('probation.informants')[$iv->source_type] ?? $iv->source_type)]); } foreach ($case->assessments as $a) $timeline->push(['at' => $a->assessed_on ?? $a->created_at, 'text' => $a->tool . ' assessment — ' . ($a->risk_level ?? 'not classified')]); foreach ($case->conferences as $cf) $timeline->push(['at' => $cf->scheduled_for ?? $cf->created_at, 'text' => (config('probation_workflow.conference_kinds')[$cf->kind ?? 'case_conference'] ?? 'Case conference') . ' — ' . $cf->status]); foreach ($case->reports as $r) { $timeline->push(['at' => $r->created_at, 'text' => 'Report drafted: ' . $r->title]); if ($r->submitted_to_court_at) $timeline->push(['at' => $r->submitted_to_court_at, 'text' => 'Submitted to court: ' . $r->title]); } foreach ($case->courtOutcomes as $o) $timeline->push(['at' => $o->outcome_date ?? $o->created_at, 'text' => 'Outcome: ' . ucwords(str_replace('_', ' ', $o->outcome))]); foreach ($case->breaches as $b) $timeline->push(['at' => $b->reported_on, 'text' => 'Breach reported']); if ($case->completion) $timeline->push(['at' => $case->completion->completed_on, 'text' => 'Completed — ' . \App\Models\ProbationCase::completionLabel($case->completion->mode)]); $timeline = $timeline->filter(fn ($t) => $t['at'])->sortByDesc(fn ($t) => \Carbon\Carbon::parse($t['at'])->timestamp)->values(); $canDelegate = empty($module['noDelegate']); @endphp
| Ref. No. | Module | Offence | Status | Opened |
|---|---|---|---|---|
| {{ $h->serial_number }} | {{ \App\Models\ProbationCase::labelForType($h->case_type) }} | {{ $h->offence }} | {{ $h->status_label }} | {{ optional($h->opened_at)->format('d M Y') }} |
No earlier cases for this person in ICMIS.
@endif