@extends('layouts.app') @section('content')
Manage system users, roles and permissions
TOTAL USERS
ACTIVE USERS
ONLINE NOW
TODAY LOGIN
EXPIRED
| # | User Info | Contact | Role | Organization | Status | Activity | Security | Actions |
|---|---|---|---|---|---|---|---|---|
|
{{ $users->firstItem() + $index }}
|
{{ ucwords($user->name) }}
{{ optional($user->rank()->first())->name ?? 'N/A' }}
|
{{ $user->email }}
+{{ $user->phone_number }}
|
@if($user->getRoleNames()->isNotEmpty()) {{ ucwords(str_replace('_', ' ', $user->getRoleNames()->first())) }} @else No Role @endif |
{{ $user->branch->name ?? 'N/A' }}
{{ $user->region->name ?? 'N/A' }}
{{ $user->department->name ?? 'N/A' }} |
@if($user->status) Active @else Inactive @endif |
@if($user->is_online)
Online
@endif
@if($user->last_login)
{{ $user->last_login->diffForHumans() }}
@else
Never logged in
@endif
|
Login Expiry:
@if (is_numeric($user->expiry_login_days))
@if ($user->expiry_login_days <= 0)
Expired
@elseif ($user->expiry_login_days <= 30)
{{ $user->expiry_login_days }} days left
@else
{{ $user->expiry_login_days }} days left
@endif
@else
N/A
@endif
Password Expiry:
@if (is_numeric($user->password_change_status_days))
@if ($user->password_change_status_days <= 0)
Change Now
@elseif ($user->password_change_status_days <= 30)
{{ $user->password_change_status_days }} days left
@else
{{ $user->password_change_status_days }} days left
@endif
@else
N/A
@endif
|
No users match your current filters.
There are currently no active users in the system (last 5 minutes)
| # | User | Contact | Role | Branch | Last Login | Status |
|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ ucwords($user->name) }}
{{ $user->email }}
|
{{ $user->phone_number ?? 'N/A' }}
|
{{ ucfirst(str_replace('_', ' ', $user->getRoleNames()->first() ?? 'N/A')) }} | {{ $user->branch->name ?? 'N/A' }} |
@if($user->last_login)
{{ \Carbon\Carbon::parse($user->last_login)->format('d M Y') }}
{{ \Carbon\Carbon::parse($user->last_login)->format('h:i A') }}
|
@php $onlineThreshold = \Carbon\Carbon::now()->subMinutes(5); $isOnline = $user->last_activity && \Carbon\Carbon::parse($user->last_activity)->greaterThan($onlineThreshold); @endphp @if($isOnline) Online @else Offline @endif |
No users have logged in to the system today ({{ \Carbon\Carbon::today()->format('l, F j, Y') }})
| # | User | Contact | Role | Branch | Login Status | Password Status |
|---|---|---|---|---|---|---|
| {{ $index + 1 }} |
{{ ucwords($user->name) }}
{{ $user->email }}
|
{{ $user->phone_number }}
|
{{ ucfirst(str_replace('_', ' ', $user->getRoleNames()->first() ?? 'N/A')) }} | {{ $user->branch->name ?? 'N/A' }} | @if($loginExpired) Expired @else {{ $loginDaysLeft }} days left @endif | @if($passwordExpired) {{ is_numeric($passwordDaysLeft) ? 'Expired' : $passwordDaysLeft }} @else {{ $passwordDaysLeft }} days left @endif |
No users have expired login sessions or passwords
| User | Role | Department | Location | Status |
|---|---|---|---|---|
|
{{ strtoupper(substr($user->name, 0, 2)) }}
{{ $user->name }}
{{ $user->email }}
|
{{ $user->getRoleNames()->first() ?? 'N/A' }} | {{ $user->department->name ?? 'N/A' }} | {{ $user->branch->name ?? 'N/A' }} |
Online
|
No users currently online
| User | Event Type | Details | Time |
|---|---|---|---|
| {{ $attemptUser->user_name ?? 'Unknown' }} | Unauthorized Access | {{ $attemptUser->route_attempted ?? 'N/A' }} |
{{ $attemptUser->attempted_at ?? 'N/A' }} |
No security events recorded
| USER DETAILS | LOCATION | USER ROLE | PAGE ATTEMPTED | REQUIRED ROLES | TIMESTAMP | URL & IP | ACTION |
|---|---|---|---|---|---|---|---|
|
{{ strtoupper(substr($userName, 0, 2)) }}
{{ strtoupper($userName) }}
{{ $userPhone }}
|
{{ strtoupper($region) }}
{{ strtoupper($branch) }}
{{ strtoupper($district) }}
|
{{ strtoupper($userRole) }} |
{{ $routeName }}
|
@php
$rolesArray = is_string($requiredRoles) ? explode(',', $requiredRoles) : (is_array($requiredRoles) ? $requiredRoles : [$requiredRoles]);
$displayRoles = array_slice($rolesArray, 0, 2);
$remainingCount = count($rolesArray) - 2;
@endphp
@foreach($displayRoles as $role)
{{ trim($role) }}
@endforeach
@if($remainingCount > 0)
+{{ $remainingCount }} more
@endif
|
{{ $displayDate }}
{{ $displayTime }}
{{ $displayYear }}
|
{{ $urlAttempted }}
{{ $ipAddress }}
|
@php $attemptId = is_object($attemptUser) && isset($attemptUser->id) ? $attemptUser->id : (is_array($attempt) && isset($attempt['id']) ? $attempt['id'] : null); @endphp @if($attemptId) @endif |
No unauthorized access attempts recorded
Comprehensive insights and business intelligence for user management
No users currently online
Monitoring unauthorized access attempts and security breaches
Real-time monitoring of unauthorized access attempts
|
User Details
|
Contact
|
Role
|
Location
|
Violation Details
|
Timestamp
|
Actions
|
|---|---|---|---|---|---|---|
|
{{ substr($attempt['user_name'], 0, 2) }}
{{ $attempt['user_name'] }}
ID: USR{{ str_pad($index + 1, 3, '0', STR_PAD_LEFT) }}
|
{{ $attempt['user_phone'] }}
|
{{ ucfirst(str_replace('_', ' ', $attempt['user_role'])) }}
|
{{ $attempt['region'] }}
{{ $attempt['branch'] }}
{{ $attempt['district'] }}
|
{{ $attempt['route_attempted'] }}
High Risk
|
{{ $attempt['date'] }}
{{ $attempt['time'] }}
|
|
System SecureNo unauthorized access attempts detected. All systems operating normally.
All Clear
|
||||||