@extends('admin.layouts.master') @section('title', 'LynX Admin - God\'s Eye') @section('page-title', '👁️ God\'s Eye™ Safety Center') @section('content')
{{ $deviations->count() }}
Active Route Deviations
⚠️
@if($deviations->count() > 0)
Requires attention
@endif
{{ $alerts->count() }}
Active SOS Alerts
🆘
{{ $resolvedHistory->count() }}
Resolved This Month

⚠️ Active Route Deviations

@if($deviations->count() > 0) @endif
@forelse($deviations as $deviation)
Deviation #{{ $deviation->id }} {{ ucfirst($deviation->status) }}
{{ $deviation->detected_at?->diffForHumans() }}
🚗 Driver deviated {{ number_format($deviation->deviation_distance_meters, 0) }}m from route
👤 User: {{ $deviation->user?->full_name ?? 'Unknown' }}
🚗 Driver: {{ $deviation->driver?->full_name ?? 'Unknown' }}
📍 Expected: {{ number_format($deviation->expected_lat, 4) }}, {{ number_format($deviation->expected_lng, 4) }}
📍 Actual: {{ number_format($deviation->actual_lat, 4) }}, {{ number_format($deviation->actual_lng, 4) }}
@if($deviation->status === 'detected')
@csrf
@csrf
@endif 📍 View Route
@empty

No active deviations. All rides on track!

God's Eye is monitoring in real-time

@endforelse

🆘 Active SOS Alerts

@if($alerts->count() > 0) @endif
@forelse($alerts as $alert)
{{ strtoupper($alert->type) }} ACTIVE
{{ $alert->created_at->diffForHumans() }}
👤 User: {{ $alert->user?->full_name ?? 'Unknown' }} ({{ $alert->user?->phone ?? 'No phone' }})
@if($alert->ride)
🛵 Ride: #{{ substr($alert->ride_id, 0, 10) }}
@endif
📍 Location: {{ number_format($alert->latitude, 4) }}, {{ number_format($alert->longitude, 4) }}
@if($alert->description)
"{{ $alert->description }}"
@endif
@csrf
📍 View on Maps 📞 Call User
@empty

No active SOS alerts.

@endforelse

📋 Resolved History

Last 20 records
@forelse($resolvedHistory as $deviation) @empty @endforelse
IDTypeUserStatusDeviationDetectedResolved
#{{ $deviation->id }} {{ str_replace('_', ' ', ucfirst($deviation->status)) }} {{ $deviation->user?->full_name ?? 'N/A' }} {{ $deviation->status }} {{ number_format($deviation->deviation_distance_meters, 0) }}m {{ $deviation->detected_at?->diffForHumans() }} {{ $deviation->acknowledged_at?->diffForHumans() ?? $deviation->updated_at->diffForHumans() }}
No resolved deviations yet
@endsection