@extends('layouts.app') @section('title', 'Department Performance: ' . $department->name) @section('content')
Back to Department

Performance: {{ $department->name }}

Total Employees

{{ $metrics['total_employees'] ?? 0 }}

Total Incidents

{{ $metrics['total_incidents'] ?? 0 }}

Toolbox Talks

{{ $metrics['total_toolbox_talks'] ?? 0 }}

Safety Score

{{ $metrics['safety_score'] ?? 'N/A' }}

Recent Incidents

@if($recentIncidents->count() > 0)
@foreach($recentIncidents as $incident)

{{ $incident->title ?? $incident->incident_type }}

{{ $incident->severity }} • {{ $incident->created_at->format('M d, Y') }}

@endforeach
@else

No recent incidents

@endif

Upcoming Toolbox Talks

@if($upcomingTalks->count() > 0)
@foreach($upcomingTalks as $talk)

{{ $talk->topic->title ?? 'No Topic' }}

{{ $talk->scheduled_date->format('M d, Y H:i') }}

@endforeach
@else

No upcoming toolbox talks

@endif
@endsection