User Management is an admin-exclusive area of Amvel Warehouse that lists every staff account registered in the system along with each account’s current status. From this single page, administrators can perform all account operations — creating new staff accounts, editing existing records, resetting forgotten passwords, toggling active/inactive status, and permanently deleting accounts. To open it, click your name in the top-right corner of any page to open the user dropdown menu, then select User Management.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/phauline-racel/LIMO-YUSEN-WAREHOUSE/llms.txt
Use this file to discover all available pages before exploring further.
Accessing User Management
The User Management link appears in the user dropdown only when the logged-in user holds theadmin role. The link carries the CSS class admin-only-nav and is shown or hidden at page load based on the current session role.
If an employee account attempts to navigate directly to user-management.html, the route guard in app.js detects the non-admin session and immediately redirects to dashboard.html. There is no read-only view of User Management for employee accounts.
User Table
The main table lists all registered accounts. Each row contains the following columns:| Column | Description |
|---|---|
| Employee ID | Unique identifier assigned to the staff member (e.g. EMP-001) |
| Full Name | Display name of the account holder |
| Username | The login credential (userId) used on the sign-in screen |
| Role | Either admin or employee |
| Status | active (can log in) or inactive (login blocked) |
| Last Login | Timestamp of the most recent successful login |
| Actions | Buttons to Edit, Reset Password, Toggle Status, and Delete |
Creating a User
Open the Add User dialog
Click the Add User button in the top-right corner of the User Management toolbar. A modal form appears.
Fill in all required fields
Complete every field in the form:
| Field | Notes |
|---|---|
| Employee ID | Must be unique across all accounts |
| Full Name | The person’s display name |
| Username | Must be unique; used to log in |
| Password | The account’s initial password |
| Confirm Password | Must match the Password field exactly |
| Role | admin or employee |
| Status | active or inactive |
Editing a User
Click the Edit action on any table row to open the edit form pre-filled with that account’s current data. The following fields can be changed:- Full Name
- Username (
userId) - Password
- Role (
admin/employee) - Status (
active/inactive)
AuthService.updateUser().
Resetting a Password
An admin can reset any account’s password back to the system default. Click the Reset Password action on a user’s row. The system callsAuthService.resetPassword(userId) and sets the account’s password to:
{ success: true, message: 'Password reset successfully.' }.
Deactivating / Activating a User
Click the Toggle Status action on a user’s row to switch their account betweenactive and inactive. The system calls AuthService.toggleUserStatus(userId).
- Active → Inactive — the account is blocked from logging in. The status badge in the table updates to
inactive. - Inactive → Active — login access is restored. The status badge updates to
active.
{ success: true, message: '...', status: 'active' | 'inactive' } to reflect the resulting state.
Deleting a User
Click the Delete action on a user’s row to permanently remove the account. This operation cannot be undone. The system callsAuthService.deleteUser(userId) and enforces the following constraints before proceeding:
- You cannot delete your own account. The currently logged-in admin’s account is protected. Attempting to do so returns: “You cannot delete the currently logged-in admin account.”
- You cannot delete the last remaining admin account. The system checks whether any other admin accounts exist before allowing deletion of an admin. If none remain, the operation is blocked.
AuthService Methods Reference
The followingAuthService methods (defined in assets/auth.js) power the User Management page. All operations that modify account data require an active admin session.
| Method | Purpose | Admin Only |
|---|---|---|
createUser(userData) | Creates a new staff account | ✓ |
updateUser(userId, updates) | Edits an existing account’s fields | ✓ |
deleteUser(userId) | Permanently removes an account | ✓ |
resetPassword(userId) | Resets an account’s password to Password123 | ✓ |
toggleUserStatus(userId) | Switches an account between active and inactive | ✓ |
getUserManagementList() | Returns the full list of accounts for display in the table | ✗ |
{ success: boolean, message: string }. Methods that modify a specific account also return the updated user object in the response.