@extends('layouts.app') @section('title', 'Patrol Violations') @section('no-page-header') @section('content')
Monitor patrol violations and compliance issues
Total Violations
{{ $violations->count() }}
Unresolved
{{ $violations->where('is_resolved', false)->count() }}
Resolved
{{ $violations->where('is_resolved', true)->count() }}
Today
{{ $violations->getCollection()->filter(function($violation) { return \Carbon\Carbon::parse($violation->violation_time)->isToday(); })->count() }}
| ID | Type | Employee | Client | Checkpoint | Time | Location | Status | Actions | ||
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $violation->id }} | {{ ucfirst(str_replace('_', ' ', $violation->violation_type)) }} | {{ $violation->employee->full_name }} | {{ $violation->schedule?->client?->name ?? 'N/A' }} | {{ $violation->checkpoint?->checkpoint_name ?? 'N/A' }} | {{ $violation->violation_time->format('M d, Y h:i A') }} | {{ $violation->latitude }}, {{ $violation->longitude }} | @if($violation->is_resolved) Resolved @else Unresolved @endif | |||
| No violations found. | ||||||||||