Skip to main content

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.

The Adolescentes module is the foundation of the UZDI platform. Every socio-educational case file (Expediente) and every measure (Medida) must be linked to an existing adolescent record. This module provides a complete CRUD interface for managing adolescent profiles, including personal data, socio-demographic context, and educational background.

Accessing the Module

  • Route: /app/adolescentes
  • Sidebar group: Gestión
  • Access: All authenticated users (tppr_id 1, 2, or 3) can view, search, create, edit, and delete records.

Table Features

The main table (AdolescentesView.vue) loads all records from GET /api/v1/adolescente on mount and applies all filtering and pagination client-side — no additional requests are made when you type in the search box or change a filter.
FeatureDetail
Rows per page8 (PAGE_SIZE = 8)
SearchMatches on nombre (full name) or cedula (ID number), case-insensitive
Filter — NacionalidadDropdown populated from the nacionalidades catalogue; default “Todas”
ColumnsID · Adolescente (name + canton) · Cédula · Edad · Nacionalidad · Ingreso · Acciones
The pagination control shows X–Y de Z registros and disables the previous/next buttons at the boundary pages. Changing the search query or any filter resets the current page to 1.
// AdolescentesView.vue — filtered computed
const filtered = computed(() => {
  const q = search.value.toLowerCase()
  return rows.value.filter(r => {
    const matchSearch = !q || r.nombre.toLowerCase().includes(q) || r.ced.includes(q)
    const matchNac    = filterNacionalidad.value === 'Todas' || r.nacionalidad === filterNacionalidad.value
    return matchSearch && matchNac
  })
})

Creating an Adolescent

1

Open the creation modal

Click the Nuevo adolescente button (top-right of the toolbar). An lg-size modal opens with two sections: Datos personales and Ubicación y contexto.
2

Fill the 16-field form

Complete all required fields (marked with a red asterisk). The Save button remains disabled until formValido returns true — all 10 required fields must have non-empty, non-zero values.Section 1 — Datos personales
FieldInput typeRequiredNotes
Cédula de identidadText (max 20)National ID (cedula)
NombresTextGiven names (nombre)
ApellidosTextFamily names (apellido)
Fecha de nacimientoDate pickerISO 8601 date (fecha_nac)
SexoSelect: M / F / OMasculino, Femenino, Otro (sexo)
Fecha de ingresoDate pickerSystem registration date (fecha_ingr)
NacionalidadSelect from catalogueLoaded from GET /api/v1/nacionalidad (nacn_id)
Estado civilSelect from catalogueLoaded from GET /api/v1/estado-civil (etcv_id)
EtniaSelect from catalogueLoaded from GET /api/v1/etnia (etna_id)
Section 2 — Ubicación y contexto
FieldInput typeRequiredNotes
CantónSelect from catalogueLoaded from GET /api/v1/canton (cntn_id)
Nivel educativo (GDO)Select from catalogueAcademic grade; optional (gdo_id)
N.º de hijosNumber (min 0)Defaults to 0 (hijos)
Centro educativoTextName of the attending institution (nved_nombre)
ReincidenteCheckboxCheck if adolescent has prior measures (reincide)
Hijo de PPLCheckboxCheck if parent is deprived of liberty (hijoPpl)
ObservacionesTextareaFree-text notes (observaciones)
3

Save the record

Click Guardar registro. The view calls adolescenteService.create(payload) which issues:
POST /api/v1/adolescente
Content-Type: application/json

{
  "cedula": "1720345678",
  "nombre": "Jorge",
  "apellido": "Morales",
  "fecha_nac": "2008-04-15",
  "sexo": "M",
  "fecha_ingr": "2024-01-10",
  "nacn_id": 1,
  "etcv_id": 2,
  "etna_id": 3,
  "cntn_id": 12,
  "gdo_id": 5,
  "hijos": 0,
  "reincide": false,
  "hijoPpl": false,
  "observaciones": "Primer ingreso al sistema."
}
On success the modal closes and the table refreshes by calling cargarAdolescentes().
Catalogues (nacionalidades, etnias, estados civiles, cantones, GDOs) are loaded once via useCatalogos() and cached for the session — they do not re-fetch each time you open a modal.

Editing an Adolescent

1

Click the edit icon

In the Acciones column of any table row, click the pencil icon. The modal opens in edit mode, pre-populated from row._raw.
2

Modify fields

All 16 fields are editable. The modal title changes to Editar adolescente · #ID where #ID is the adolescent’s database ID.
3

Save changes

Click Actualizar. This calls adolescenteService.update(id, payload):
PATCH /api/v1/adolescente/:id
Content-Type: application/json

{ ...same payload shape as POST... }
The table refreshes on success.

Deleting an Adolescent

1

Click the delete icon

Click the ban icon in the Acciones column. A small confirmation modal (sm size) opens.
2

Confirm deletion

The modal shows the adolescent’s full name and ID. Click Eliminar registro to confirm.
DELETE /api/v1/adolescente/:id
On success the modal closes and the record is removed from the table.
The delete action issues a hard DELETE at the API level. The confirmation modal warns: “El adolescente y sus expedientes asociados se eliminarán de forma permanente. Esta acción no se puede deshacer.” Verify the record before confirming.

Full Field Reference

Field (form key)API keyTypeRequiredDescription
Cédulacedulastring (max 20)National identity document number
NombresnombrestringGiven names
ApellidosapellidostringFamily names
Fecha de nacimientofecha_nacstring (ISO date)Used to compute displayed age
Sexosexo'M' | 'F' | 'O'Biological sex
Fecha de ingresofecha_ingrstring (ISO date)System registration date
Nacionalidadnacn_idnumber (FK)References nacionalidad catalogue
Estado civiletcv_idnumber (FK)References estado_civil catalogue
Etniaetna_idnumber (FK)References etnia catalogue
Cantóncntn_idnumber (FK)References canton catalogue
Nivel educativo (GDO)gdo_idnumber (FK)References gdo catalogue
N.º de hijoshijosnumberDefaults to 0
Centro educativonved_nombrestringName of school / institution
ReincidentereincidebooleanPrior measures flag
Hijo de PPLhijoPplbooleanParent deprived of liberty flag
ObservacionesobservacionesstringFree-text notes

Service Layer Reference

All HTTP calls are delegated to adolescenteService (src/services/adolescente.service.ts):
// adolescente.service.ts
export const adolescenteService = {
  // GET /api/v1/adolescente
  async getAll(): Promise<AdolescenteRow[]>,

  // POST /api/v1/adolescente
  async create(payload: AdolescentePayload): Promise<AdolescenteDto>,

  // PATCH /api/v1/adolescente/:id
  async update(id: number, payload: AdolescentePayload): Promise<AdolescenteDto>,

  // DELETE /api/v1/adolescente/:id
  async remove(id: number): Promise<void>,
}
getAll() maps the raw DTO array into display rows, computing the full name (nombre + apellido), formatted ingreso date (DD/MM/YYYY), and age from fecha_nac. The raw DTO is preserved in _raw for the edit pre-fill logic.
The eye icon in the Acciones column navigates directly to /app/expedientes, where you can search by the adolescent’s name or cédula to find all their associated case files.

Build docs developers (and LLMs) love