@extends('layouts.app') @section('title', 'User Management') @section('content')

User Management

Create, edit, activate/deactivate users

{{-- Add User routes through the unified People form. The in-page modal still exists below for legacy bookmarks, but the primary entry point is now the consolidated form so personal info is only typed once. For a back-office user who doesn't need a payroll record, the form picks "System User Only". --}} Add User
@if(request()->hasAny(['search','status','department_id']))Clear@endif
@forelse($users as $u) @empty @endforelse
NameEmailPhoneRoleDepartmentStatusLast LoginActions
{{ $u->name }} {{ $u->email }} {{ $u->phone ?? '-' }} {{ $u->roles->first()->name ?? '-' }} {{ $u->department->name ?? '-' }} @if($u->is_active)Active@elseInactive@endif {{ $u->last_login_at ? \Carbon\Carbon::parse($u->last_login_at)->format('d M H:i') : '-' }}
@csrf
@csrf
No users.
@if($users->hasPages())
{{ $users->links() }}
@endif
{{-- Add User Modal --}} {{-- Edit User Modal --}} @endsection @section('scripts') @php $rolePermsMap = $roles->mapWithKeys(function($r) { return [$r->name => $r->permissions->pluck('name')]; })->toArray(); @endphp @endsection