{{-- resources/views/probation/cases/show.blade.php Tabbed case workspace — one screen for every work-stream. Each tab lives in its own partial (probation/cases/_*.blade.php). --}} @extends('layouts.app') @section('title', $case->serial_number . ' - ICMIS') @push('styles') @endpush @section('content') @php $rt = 'probation.' . $module['routeKey']; $ct = $module['caseType']; $isSI = $ct === 'social_inquiry'; $isSup = !empty($module['isSupervision']); // Supervision / Interventions / Empowerment / Completion $isCso = $ct === 'community_service'; $remarks = !empty($module['hasRemarks']); $residency = $module['residency'] ?? null; $hasOutcome = empty($module['noOutcome']); $alerts = $alerts ?? []; // tab list — "Supervision Summary" sits between the last two tabs (CSO analysis 18) $tabs = [['t-overview', 'Overview'], ['t-ledger', 'Case Ledger']]; if (!$isSI) $tabs[] = ['t-nok', 'Next of Kin']; if ($isSI) $tabs[] = ['t-inquiry', 'Interviews']; $tabs[] = ['t-assess', 'Assessments']; $tabs[] = ['t-conf', 'Case Conferences']; $tabs[] = ['t-reports', 'Reports']; if ($residency) $tabs[] = ['t-residency', ['probation_hostel' => 'Hostel', 'halfway_house' => 'Halfway House', 'borstal' => 'Borstal Vacancy'][$residency]]; if ($isCso) $tabs[] = ['t-cso', 'CSO Quantification']; if ($isSup) { $tabs[] = ['t-superv', 'Supervision']; $tabs[] = ['t-interv', 'Interventions']; $tabs[] = ['t-emp', 'Empowerment']; } $tabs[] = ['t-docs', 'Documents']; if ($remarks) $tabs[] = ['t-remarks', 'Remarks']; if ($isSup) $tabs[] = ['t-complete', 'Completion']; if ($hasOutcome) $tabs[] = ['t-outcome', 'Outcome']; if ($isSup) array_splice($tabs, count($tabs) - 1, 0, [['t-summary', 'Supervision Summary']]); @endphp