@extends('layouts.app') @section('content')
{{-- CSS ya Unified Header --}} {{-- Unified User Management Header --}}
{{-- Top Section: Breadcrumb --}}
{{-- Main Section: Title & Menu --}}
{{-- Left: Icon & Title --}}
User Management
{{-- Right: Menu Dropdown --}}
{{-- CSS ya Modern Table --}} {{-- Modern Users Table --}}
@foreach ($usersWithStatus as $user) {{-- User --}} {{-- Contact --}} {{-- Role & Status --}} {{-- Organization --}} {{-- Activity --}} {{-- Security --}} {{-- Actions --}} @endforeach
User Contact Role & Status Organization Activity Security Actions
@if($user->is_online) @else @endif
{{ strtoupper(substr($user->name, 0, 2)) }}
{{ ucwords($user->name) }}
{{ optional($user->rank()->first())->name ?? 'N/A' }}
{{ $user->email }}
+{{ $user->phone_number }}
@if($user->getRoleNames()->isNotEmpty()) {{ $user->getRoleNames()->first() }} @else No Role @endif
@if($user->status) Active @else Inactive @endif
Branch: {{ $user->branch->name ?? 'N/A' }}
Region: {{ $user->region->name ?? 'N/A' }}
Dept: {{ $user->department->name ?? 'N/A' }}
District: {{ $user->district->name ?? 'N/A' }}
@if($user->is_online)
Online
@endif @if($user->last_login)
Last Login:
{{ $user->last_login->diffForHumans() }}
@else
Never logged in
@endif
Attempts: {{ $user->login_attempts }}
@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
@if (is_numeric($user->password_change_status_days)) @if ($user->password_change_status_days <= 0) Change Password @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
{{-- Footer with Pagination --}}