@extends('adminlte::page') @section('title', 'Cases by Crime Type') @section('content_header')

Cases by Crime Type

@stop @section('content')

Distribution by Crime Type

Crime Type Statistics

@php $totalCases = array_sum($casesByCrimeType); @endphp @foreach($casesByCrimeType as $crimeType => $count) @endforeach
Crime Type Total Cases Percentage Actions
{{ $crimeTypes[$crimeType] ?? ucfirst(str_replace('_', ' ', $crimeType)) }} {{ $count }} {{ number_format(($count / $totalCases) * 100, 1) }}% View Cases

Crime Type Trends (Last 12 Months)

Crime Type Status Breakdown

@foreach($casesByCrimeType as $crimeType => $count) @endforeach
Crime Type Total Open Under Investigation Pending Review Closed Other
{{ $crimeTypes[$crimeType] ?? ucfirst(str_replace('_', ' ', $crimeType)) }} {{ $count }} @php $openCount = 0; if (isset($crimeTypeStatusBreakdown[$crimeType])) { foreach ($crimeTypeStatusBreakdown[$crimeType] as $breakdown) { if ($breakdown->status === 'open') { $openCount = $breakdown->total; break; } } } @endphp {{ $openCount }} @php $underInvestigationCount = 0; if (isset($crimeTypeStatusBreakdown[$crimeType])) { foreach ($crimeTypeStatusBreakdown[$crimeType] as $breakdown) { if ($breakdown->status === 'under_investigation') { $underInvestigationCount = $breakdown->total; break; } } } @endphp {{ $underInvestigationCount }} @php $pendingReviewCount = 0; if (isset($crimeTypeStatusBreakdown[$crimeType])) { foreach ($crimeTypeStatusBreakdown[$crimeType] as $breakdown) { if ($breakdown->status === 'pending_review') { $pendingReviewCount = $breakdown->total; break; } } } @endphp {{ $pendingReviewCount }} @php $closedCount = 0; if (isset($crimeTypeStatusBreakdown[$crimeType])) { foreach ($crimeTypeStatusBreakdown[$crimeType] as $breakdown) { if ($breakdown->status === 'closed') { $closedCount = $breakdown->total; break; } } } @endphp {{ $closedCount }} @php $otherCount = 0; if (isset($crimeTypeStatusBreakdown[$crimeType])) { foreach ($crimeTypeStatusBreakdown[$crimeType] as $breakdown) { if (!in_array($breakdown->status, ['open', 'under_investigation', 'pending_review', 'closed'])) { $otherCount += $breakdown->total; } } } @endphp {{ $otherCount }}

Crime Type by Priority

@foreach($crimeTypesByPriority->take(6) as $crimeType => $priorityData)
{{ $crimeTypes[$crimeType] ?? ucfirst(str_replace('_', ' ', $crimeType)) }}
@endforeach
@stop @section('css') @stop @section('js') @stop