{{ __('Manage Users') }}

{{-- View HOD / Employee --}} {{-- Search / Filter / Add --}}
{{-- Search input with real-time search --}}
{{-- Department dropdown --}}
{{-- Status dropdown --}}
{{-- Add User button inline with form --}} {{ __('Add User') }}
{{-- Progress bar (shown during import) --}} {{-- Status message (shown after import completes) --}} {{-- Legacy status message (for non-import operations) --}} @if (session('status') && !request()->has('progressId'))

{{ session('status') }}

@endif {{-- Error message popup --}} @if ($errors->has('delete'))

{{ $errors->first('delete') }}

@endif
@php($columns = [ ['key' => 'userID', 'label' => 'Username', 'sortable' => false], ['key' => 'fullName', 'label' => 'Full Name', 'sortable' => false], ['key' => 'email', 'label' => 'Email', 'sortable' => false], ['key' => 'department', 'label' => 'Department', 'sortable' => true], ]) @foreach ($columns as $c) @endforeach @php($statusActive = ($sort ?? null) === 'accStat') @forelse ($users as $user) @empty @endforelse
@if($c['sortable'] ?? true) @php($isActive = ($sort ?? null) === $c['key']) {{ __($c['label']) }} @if ($isActive) {{ ($dir ?? 'asc') === 'asc' ? '▲' : '▼' }} @else ▲▼ @endif @else {{ __($c['label']) }} @endif {{ __('Status') }} @if ($statusActive) {{ ($dir ?? 'asc') === 'asc' ? '▲' : '▼' }} @else ▲▼ @endif {{ __('Action') }}
{{ $user->userID }} {{ $user->fullName }} {{ $user->email ?? '-' }} {{ $user->department ?? '-' }} {{ ucfirst($user->accStat ?? 'active') }}
@if($user->accStat === 'active')
@csrf @method('PATCH')
@else
@csrf @method('PATCH')
@endif
@csrf @method('DELETE')
No users found.
{{-- Pagination --}}
{{ $users->links() }}