@extends('layouts.app')
@section('title', 'Command & Control Center - ICMIS')
@push('styles')
@endpush
@section('content')
@php
// Branch-scoped probation incident snapshot (verified models; no controller change needed)
$PC = \App\Models\ProbationCase::class;
$pcIds = $PC::forCurrentBranch()->pluck('id');
$ccBreaches = \App\Models\SupervisionBreach::whereIn('case_id', $pcIds)
->where(fn($q)=>$q->whereNull('action')->orWhere('action',''))->count();
$ccPendingReports = \App\Models\CaseReport::whereIn('case_id', $pcIds)
->whereIn('status', ['Submitted','Under Review'])->count();
$ccRecentBreaches = \App\Models\SupervisionBreach::whereIn('case_id', $pcIds)
->with('case.prisoner')->latest('reported_on')->limit(5)->get();
@endphp
Integrated Command & Control Center
{{ optional(auth()->user())->name }} ·
{{-- LIVE STATUS TILES --}}
In Custody
{{ number_format($currentOccupancy) }}
Intake Today
{{ number_format($todayIntake) }}
Releases Today
{{ number_format($todayReleases) }}
In Transit
{{ number_format($activeTransfers) }}
Pending Verify
{{ number_format($pendingVerifications) }}
Knocked-Out
{{ number_format($knockedOut) }}
{{-- INCIDENT & SECURITY FEED --}}
Incidents & Security
{{ $knockedOut + $ccBreaches }} active
@if($knockedOut > 0)
{{ $knockedOut }} prisoner(s) knocked-out, not knocked-in
Movement unaccounted — verify against biometric counts.
@endif
@if($activeTransfers > 0)
{{ $activeTransfers }} transfer(s) in transit
Confirm arrival at receiving station within the time limit.
@endif
@forelse($ccRecentBreaches as $b)
Order breach — {{ optional(optional($b->case)->prisoner)->name ?? 'Case #'.$b->case_id }}
{{ \Illuminate\Support\Str::limit($b->description, 70) }} · triggers warrant/discharge
@empty
@if($knockedOut == 0 && $activeTransfers == 0)
No active incidents
All movements and orders accounted for.
@endif
@endforelse
{{-- MOVEMENT & QUEUES --}}
Movement Control
Intake today{{ $todayIntake }}
Releases today{{ $todayReleases }}
Transfers in transit{{ $activeTransfers }}
Verification queue{{ $pendingVerifications }}
Probation Watch
Breaches needing warrant{{ $ccBreaches }}
Reports awaiting approval{{ $ccPendingReports }}
{{-- COMMAND ACTIONS --}}
{{-- INTEGRATIONS (wiring points per tender 23.0) --}}
Integrations & Escalation
tender §23.0 — to be wired to live systems
CCTV & access control
Live feeds and door/movement events per facility.
CONNECT
3D facility view
Spatial view of every prison and accommodation unit.
CONNECT
Agency alerts
Broadcast to CGP, RCs & security agencies on breach.
CONNECT
GPS & fleet
Transfer vehicle tracking and offender GPS.
CONNECT
Penetration detection
Alert on attempted system intrusion; notify C&CC + CGP.
CONNECT
Sub-center control
Disable station command centers and assume central control.
CONNECT
@endsection
@push('scripts')
@endpush