@extends('layouts.app') @section('title', 'Incidents') @php $breadcrumbs = [ ['label' => 'Dashboard', 'url' => route('dashboard'), 'icon' => 'fa-home'], ['label' => 'Incidents', 'url' => route('incidents.index'), 'active' => true] ]; @endphp @section('content')

Incident Management

@can('incidents.export') Export Excel @endcan @can('incidents.print') Export PDF @endcan @can('incidents.view') Reports Trend Analysis @endcan @can('incidents.create') Report Incident @endcan

Total Incidents

{{ $incidents->total() }}

Open

{{ $incidents->whereIn('status', ['reported', 'open'])->count() }}

Investigating

{{ $incidents->where('status', 'investigating')->count() }}

Closed

{{ $incidents->whereIn('status', ['closed', 'resolved'])->count() }}

Filters

@forelse($incidents as $incident) @empty @endforelse
Reference Title Event Type Severity Status Department Date Actions
{{ $incident->reference_number }}
{{ $incident->title ?? $incident->incident_type }}
{{ Str::limit($incident->description, 60) }}
@if($incident->event_type) @php $eventTypeIcons = [ 'injury_illness' => ['icon' => 'fa-user-injured', 'color' => 'red'], 'property_damage' => ['icon' => 'fa-tools', 'color' => 'orange'], 'near_miss' => ['icon' => 'fa-exclamation-triangle', 'color' => 'yellow'], 'environmental' => ['icon' => 'fa-leaf', 'color' => 'green'], ]; $eventType = $eventTypeIcons[$incident->event_type] ?? ['icon' => 'fa-circle', 'color' => 'gray']; @endphp {{ ucfirst(str_replace('_', ' ', $incident->event_type)) }} @else N/A @endif {{ ucfirst($incident->severity) }} {{ ucfirst($incident->status) }} @if($incident->investigation)
Investigation
@endif
{{ $incident->department->name ?? 'N/A' }}
{{ $incident->incident_date->format('M j, Y') }}
{{ $incident->incident_date->format('g:i A') }}

No incidents found

Get started by reporting a new incident

Report Incident
@if($incidents->hasPages())
{{ $incidents->links() }}
@endif
@push('scripts') @endpush @endsection