@extends('adminlte::page') @section('title', 'Dashboard') @section('content_header')

Dashboard

{{ $dashboardData['user_info']['rank'] }} @if($dashboardData['user_info']['badge_number']) {{ $dashboardData['user_info']['badge_number'] }} @endif {{ $dashboardData['user_info']['station'] }}
@stop @section('content')
Your Access Level

Rank: {{ $dashboardData['user_info']['rank'] }} (Level {{ $dashboardData['user_info']['rank_level'] }})

Station Access: @if($dashboardData['user_info']['has_multi_station_access']) All Stations @else {{ $dashboardData['user_info']['station'] }} Only @endif

Data Scope: @if($dashboardData['user_info']['is_admin']) System Administrator - Full Access @elseif($dashboardData['user_info']['has_multi_station_access']) All police stations and their data @else Limited to {{ $dashboardData['user_info']['station'] }} station data only @endif

@if(!empty($stats))
@foreach($stats as $key => $statGroup) @if(is_array($statGroup) && isset($statGroup['label']))
@if($key === 'cases')

{{ $statGroup['total'] }}

{{ $statGroup['label'] }}

Active: {{ $statGroup['active'] }} | Closed: {{ $statGroup['closed'] }} | Pending: {{ $statGroup['pending'] }} @elseif($key === 'evidence')

{{ $statGroup['total'] }}

{{ $statGroup['label'] }}

In Custody: {{ $statGroup['in_custody'] }} | In Analysis: {{ $statGroup['in_analysis'] }} @elseif($key === 'bail')

{{ $statGroup['pending'] }}

Pending {{ $statGroup['label'] }}

Approved: {{ $statGroup['approved'] }} | Rejected: {{ $statGroup['rejected'] }} | Today's Check-ins: {{ $statGroup['today_checkins'] }} @else

{{ $statGroup['total'] }}

{{ $statGroup['label'] }}

@endif
View Details
@endif @endforeach
@endif @if(!empty($alerts))

Alerts & Notifications

@foreach($alerts as $alert)
{{ $alert['title'] }}

{{ $alert['message'] }}

@if(isset($alert['action_url'])) Take Action @endif
@endforeach
@endif @if(!empty($quickActions))

Quick Actions

@foreach($quickActions as $action) @endforeach
@endif @if(!empty($sections))
@foreach($sections as $sectionKey => $section) @if($section['show']) @if($sectionKey === 'my_cases')

{{ $section['title'] }}

@if($section['data']->isEmpty())
No cases assigned to you.
@else @endif
@elseif($sectionKey === 'evidence_status')

{{ $section['title'] }}

@if($section['data']->isEmpty())
No evidence data available.
@else
@foreach($section['data'] as $status)
{{ ucfirst(str_replace('_', ' ', $status->status)) }} {{ $status->count }}
@endforeach
@endif
@elseif($sectionKey === 'station_overview')

{{ $section['title'] }}

Cases This Month {{ $section['data']['cases_this_month'] }}
Solved This Month {{ $section['data']['solved_this_month'] }}
Clearance Rate {{ $section['data']['clearance_rate'] }}%
@elseif($sectionKey === 'bail_management')

{{ $section['title'] }}

@if($section['data']->isEmpty())
No pending bail applications.
@else
    @foreach($section['data'] as $bail)
  • Bail Application #{{ $bail->id }} Pending Case: #{{ $bail->case->case_number ?? 'Unknown' }} - {{ $bail->case->title ?? 'Unknown Case' }} Applied {{ $bail->created_at->diffForHumans() }} | {{ $bail->suspect->name ?? 'Unknown Suspect' }}
  • @endforeach
@endif
@elseif($sectionKey === 'officer_performance')

{{ $section['title'] }}

@if($section['data']->isEmpty())
No officer performance data available.
@else
@foreach($section['data'] as $officer)
User Image
{{ $officer->lead_investigator_cases_count }} cases
{{ $officer->name }}
{{ $officer->rank }}
@endforeach
@endif
@elseif($sectionKey === 'multi_station_overview')

{{ $section['title'] }}

@if($section['data']->isEmpty())
No station data available.
@else
@foreach($section['data'] as $station)
{{ $station->name }} {{ $station->cases_count }} cases
{{ $station->officers_count }} officers
@endforeach
@endif
@elseif($sectionKey === 'station_performance_comparison')

{{ $section['title'] }}

@if($section['data']->isEmpty())
No station performance data available.
@else
@foreach($section['data'] as $station)
{{ $station->name }} {{ $station->clearance_rate }}%
{{ $station->total_cases }} cases | {{ $station->officers }} officers
@endforeach
@endif
@elseif($sectionKey === 'critical_cases_attention')

{{ $section['title'] }}

@if($section['data']->isEmpty())
No critical cases requiring immediate attention.
@else @endif
@elseif($sectionKey === 'resource_allocation_analysis')

{{ $section['title'] }}

@if(isset($section['data']['officer_workload']))
Average Officer Workload {{ $section['data']['officer_workload'] }} cases
@endif @if(isset($section['data']['evidence_backlog']))
Evidence Backlog {{ $section['data']['evidence_backlog'] }} items
@endif @if(isset($section['data']['pending_bail']))
Pending Bail Applications {{ $section['data']['pending_bail'] }}
@endif
@elseif($sectionKey === 'monthly_performance_trends')

{{ $section['title'] }}

@if(isset($section['data']['case_resolution_trend']))
Case Resolution Trend
@endif @if(isset($section['data']['crime_type_distribution']))
Crime Type Distribution
@foreach($section['data']['crime_type_distribution'] as $crime)
{{ $crime['type'] }} {{ $crime['count'] }}/{{ $section['data']['crime_type_distribution']->sum('count') }}
@endforeach
@endif @if(isset($section['data']['station_efficiency_ranking']))
Station Efficiency Ranking
@foreach($section['data']['station_efficiency_ranking']->take(5) as $index => $station)
{{ $index + 1 }} {{ $station->name }} {{ $station->efficiency_score }}
@endforeach
@endif
@elseif($sectionKey === 'operational_alerts')

{{ $section['title'] }}

@if(empty($section['data']))
No operational alerts at this time.
@else
@foreach($section['data'] as $alert)
{{ $alert['title'] }}

{{ $alert['message'] }}

@if(isset($alert['count'])) {{ $alert['count'] }} affected @endif @if(isset($alert['action_url'])) @endif
@endforeach
@endif
@elseif($sectionKey === 'station_overview')

{{ $section['title'] }}

Cases This Month {{ $section['data']['cases_this_month'] }}
Solved This Month {{ $section['data']['solved_this_month'] }}
Clearance Rate {{ $section['data']['clearance_rate'] }}%
@endif @endif @endforeach
@endif @if(!empty($recentActivities))

Recent Activities

@foreach($recentActivities as $activity)
{{ $activity['time'] }}

{{ $activity['title'] }}

{{ $activity['description'] }}
@endforeach
@if(!empty($performanceMetrics))

Performance Metrics

@if(isset($performanceMetrics['case_closure_rate']))
Your Case Closure Rate {{ $performanceMetrics['case_closure_rate'] }}%
@endif @if(isset($performanceMetrics['average_case_duration']))
Average Case Duration {{ $performanceMetrics['average_case_duration'] }} days
@endif @if(isset($performanceMetrics['station_efficiency']))
Station Efficiency {{ $performanceMetrics['station_efficiency'] }}%
@endif
@endif
@endif @stop @section('css') @stop @section('js') @stop