@extends('layouts.app') @section('title', 'Geofence Violations Report') @section('no-page-header') @section('content')
Total Violations
Resolved
Unresolved
Resolution Rate
Most Common Type
Violation Types
| Employee | Geofence | Violation Type | Violation Time | Location | Status | Resolution Notes | Actions |
|---|---|---|---|---|---|---|---|
|
{{ $violation->employee->full_name }}
{{ $violation->employee->profile->employee_id ?? '' }}
|
{{ $violation->geofence->name }} | {{ ucfirst(str_replace('_', ' ', $violation->violation_type)) }} | {{ $violation->violation_time->format('M d, Y h:i A') }} | {{ $violation->latitude }}, {{ $violation->longitude }} | {{ $violation->is_resolved ? 'Resolved' : 'Unresolved' }} | {{ $violation->resolution_notes ?? 'N/A' }} |
@if(!$violation->is_resolved)
@endif
|
| No violation records found | |||||||
| Geofence | Violations | Unique Employees | Risk Level |
|---|---|---|---|
| {{ $hotspot['geofence']['name'] }} | {{ $hotspot['violation_count'] }} | {{ $hotspot['unique_employees'] }} | @php $riskLevel = $hotspot['violation_count'] > 10 ? 'High' : ($hotspot['violation_count'] > 5 ? 'Medium' : 'Low'); $riskColor = $riskLevel === 'High' ? 'danger' : ($riskLevel === 'Medium' ? 'warning' : 'success'); @endphp {{ $riskLevel }} |
| No hotspots data available | |||
| Employee | Violations | Geofences | Common Type |
|---|---|---|---|
| {{ $pattern['employee']['full_name'] }} | {{ $pattern['violation_count'] }} | {{ $pattern['geofences_violated'] }} | @php $mostCommonType = $pattern['violation_types']->sortDesc()->keys()->first(); @endphp {{ ucfirst(str_replace('_', ' ', $mostCommonType)) }} |
| No pattern data available | |||
| Hour | Violations | Risk Level |
|---|---|---|
| {{ $hour }}:00 | {{ $count }} | @php $riskLevel = $count > 5 ? 'High' : ($count > 2 ? 'Medium' : 'Low'); $riskColor = $riskLevel === 'High' ? 'danger' : ($riskLevel === 'Medium' ? 'warning' : 'success'); @endphp {{ $riskLevel }} |
| No hourly data available | ||
| Day | Violations | Risk Level |
|---|---|---|
| {{ $day }} | {{ $count }} | @php $riskLevel = $count > 10 ? 'High' : ($count > 5 ? 'Medium' : 'Low'); $riskColor = $riskLevel === 'High' ? 'danger' : ($riskLevel === 'Medium' ? 'warning' : 'success'); @endphp {{ $riskLevel }} |
| No daily data available | ||