The Usuarios module provides full lifecycle management for UZDI system accounts: creating new users, editing existing ones, and browsing the complete user roster. Accounts created here determine who can log in to the platform and what they can access based on their assigned role (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Zapiony/PUCE_UZDI_2026/llms.txt
Use this file to discover all available pages before exploring further.
tppr_id) and UZDI zone (uzdi_id). The module is available at /app/usuarios and is restricted to Administrador (tppr_id >= 3) and Superadministrador roles — lower-privilege users will be redirected to the dashboard by the router guard.
User Table
On load, the table fetches the full user list fromGET /api/v1/users. Each row displays:
| Column | Description |
|---|---|
| Nombre | Full name (nombres + apellidos) |
| Login | Unique system login rendered in a monospaced pill |
| Correo | Institutional email address |
| Estado | Activity badge — all users returned by the API are shown as Activo (green) |
| Acciones | Edit button (pencil icon) to open the edit modal |
Search and Pagination
The toolbar above the table contains a live search field. Typing filters rows in real time across three fields simultaneously:Creating a User
Open the creation modal
Click the Nuevo usuario button in the page header (top-right). A modal dialog titled “Nuevo usuario” will appear over the page.
Fill in the required fields
Complete the form. The modal exposes the following fields:
| Field | Required | Notes |
|---|---|---|
| Nombres | ✅ | First and middle names |
| Apellidos | ✅ | Last names |
| Login | ✅ | Unique system identifier (e.g. juan.perez) |
| Correo electrónico | — | Valid email address; enforced as required by the backend DTO |
| Teléfono | — | e.g. 0999999999 |
| Contraseña | ✅ (new only) | Minimum 8 characters. Only shown when creating a new account. |
The backend
CreateUserDto also accepts sexo, direccion, tppr_id, uzdi_id, and observaciones. These fields are not exposed in the modal form and can be set via a direct API call or a future admin interface.The backend
ValidationPipe enforces whitelist: true — any fields not declared in CreateUserDto are stripped silently. The frontend validates that nombres, apellidos, and login are non-empty before sending the request.Editing a User
Click the pencil icon in the Actions column of any row to open the edit modal pre-filled with that user’s current data. The password field is hidden during edits — use the Perfil page to change passwords. Once changes are made, click Guardar cambios. This sends:UpdateUserDto, which extends PartialType(CreateUserDto)).
User Profile Page (/app/perfil)
Every logged-in user can view and update their own account at /app/perfil. This page is separate from the admin Usuarios module and is accessible to all roles.
Personal Information
The profile page opens in read-only mode by default, showing:- Full name (nombres + apellidos)
- Correo electrónico
- Teléfono
- Login (display only, not editable)
- Avatar circle with initials derived from nombres + apellidos
PATCH /api/v1/users/:id request and simultaneously updates the in-memory session state via setSession() so the topbar and avatar reflect changes immediately without a page reload.
Changing Your Password
The password change form sits below the personal information card and is always visible.Enter your current password
Type your existing password in the Contraseña actual field. This is required even for administrators changing their own password.
Enter and confirm the new password
Type the new password (minimum 8 characters) and repeat it in the Confirmar nueva contraseña field. The form validates that both values match before submitting.
User Entity Reference
The user record is stored in theseguridad.prsn table via TypeORM. Here are all mapped fields:
| Entity Field | DB Column | Type | Notes |
|---|---|---|---|
id | prsn_id | int4 PK | Auto-generated primary key |
uzdi_id | uzdi_id | int4 | UZDI zone assignment (nullable) |
tppr_id | tppr_id | int4 | Role profile ID (nullable) |
nombres | prsnnmbr | varchar(31) | Required |
apellidos | prsnapll | varchar(31) | Required |
sexo | prsnsexo | char(1) | M, F, or O (nullable) |
direccion | prsndire | varchar(255) | Nullable |
telefono | prsntelf | varchar(63) | Nullable |
correo | prsnmail | varchar(63) | Nullable in entity; validated as required email in DTO |
login | prsnlogn | varchar(30) | Unique |
password | prsnpass | varchar(63) | Bcrypt hash, write-only |
observaciones | prsnobsr | varchar(255) | Nullable |
Error Handling
TheusuarioService.getAll() method catches all API errors and returns an empty array rather than throwing, so the table renders an empty state instead of crashing the page:
create, update) do not swallow errors — they propagate to the modal’s catch block, which displays a red inline banner:
“No se pudo guardar. Verifica que el backend esté corriendo.”This pattern surfaces actionable feedback for save failures while keeping the read path resilient.