🕐 {{ __('Login History') }}

{{-- Tabs --}} {{-- Last Device Login Summary Cards --}}
{{-- Admin Last Login Card --}}
🧑‍💼

Admin Last Login

Latest admin device session

@if($lastAdminLogin)
User {{ $lastAdminLogin->user->name ?? 'Unknown' }}
Device {{ $lastAdminLogin->platform_type === 'mobile' ? '📱' : '💻' }} {{ $lastAdminLogin->device_name }}
Time {{ $lastAdminLogin->login_datetime->format('d/m/Y h:i A') }}
@else

No admin login records found.

@endif
{{-- Vehicle Last Login Card --}}
🚗

Vehicle Last Login

Latest vehicle device session

@if($lastVehicleLogin)
User {{ $lastVehicleLogin->user->name ?? 'Unknown' }}
Device {{ $lastVehicleLogin->platform_type === 'mobile' ? '📱' : '💻' }} {{ $lastVehicleLogin->device_name }}
Time {{ $lastVehicleLogin->login_datetime->format('d/m/Y h:i A') }}
@else

No vehicle login records found.

@endif
{{-- Filters & Search --}}
{{-- User Dropdown --}}
{{-- Period Filter --}} {{-- Search Button --}}
{{-- Login History Table --}}
@forelse($histories as $history) @empty @endforelse
User Role Login Date & Time Logout Date & Time Device Platform Browser Status
{{ $history->user->name ?? 'Unknown' }} @if($history->role === 'Admin') 🧑‍💼 Admin @elseif($history->role === 'Vehicle') 🚗 Vehicle @else {{ $history->role }} @endif
{{ $history->login_datetime ? $history->login_datetime->format('d/m/Y h:i A') : 'N/A' }}
@if($history->logout_datetime)
{{ $history->logout_datetime->format('d/m/Y h:i A') }}
@else @endif
{{ $history->platform_type === 'mobile' ? '📱' : '💻' }} {{ $history->device_name }} {{ $history->platform }} {{ $history->browser_name }} @if($history->is_active) Active @else Logged out @endif

No login records found for {{ $tab }} role.

@if($histories->hasPages())
{{ $histories->links() }}
@endif