@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')
Total Incidents
{{ $incidents->total() }}
Open
{{ $incidents->whereIn('status', ['reported', 'open'])->count() }}
Investigating
{{ $incidents->where('status', 'investigating')->count() }}
Closed
{{ $incidents->whereIn('status', ['closed', 'resolved'])->count() }}
| 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') }}
|
||