The Medidas module manages the catalogue of socio-educational measure types (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.
medida_socioeducativa) that can be assigned to case files. Each catalogue entry defines a measure name and its standard duration in months. These catalogue records are referenced by expedientes through the mdso_id foreign key. Think of this module as the master list of available measure types — not the individual measure instances, which live inside each expediente.
Accessing the Module
- Route:
/app/medidas - Sidebar group: Gestión
- Access: All authenticated roles can view, create, edit, and delete catalogue entries.
Table Features
On mount,MedidasView.vue loads all catalogue entries from GET /api/v1/medida-socioeducativa and applies all filtering and pagination client-side.
| Feature | Detail |
|---|---|
| Rows per page | 8 (PAGE_SIZE = 8) |
| Search | Matches on nombre (measure name) or codigo (MED-NNNN display code) |
| Columns | ID (MED-NNNN) · Tipo de medida · Duración (meses) · Acciones |
onSearchInput).
Auto-Generated Measure Codes
Like expediente codes, measure codes are computed client-side:Creating a Medida
Click 'Nueva medida'
Click the Nueva medida button (top-right toolbar). A
md-size modal opens with a single Datos del catálogo section.Fill the form
| Field | Type | Required | Notes |
|---|---|---|---|
| Nombre de la medida | Text | ✅ | Descriptive name, e.g. Libertad asistida (nombre) |
| Duración (meses) | Number (min 1) | ❌ | Standard duration in months; leave blank if variable (duracion_meses) |
duracion_meses: undefined when the duration field is left blank.Editing a Medida
Click the edit icon
Click the pencil icon in the Acciones column. The modal opens in The modal title changes to Editar medida · MED-NNNN.
edit mode, pre-filled from the selected row:Deleting a Medida
Click the delete icon
Click the ban icon in the Acciones column. A small confirmation modal opens showing the measure name and code.
Field Reference
| Field (form key) | API key | Type | Required | Description |
|---|---|---|---|---|
| Nombre de la medida | nombre | string | ✅ | Human-readable measure type name |
| Duración (meses) | duracion_meses | number | undefined | ❌ | Standard duration; null stored if omitted |
Service Layer Reference
All HTTP calls are delegated tomedidaService (src/services/medida.service.ts):
getAll() maps raw DTOs into display rows, adding the codigo (MED-NNNN) display code and normalising duracion_meses to null when absent.
Relationship to Expedientes
The Medidas catalogue feeds the Medida socioeducativa dropdown in the Expediente creation form (ExpedientesView.vue). The selected m.id is stored as mdso_id on the expediente record. When the expediente list is rendered, medida.nombre is resolved through the backend relation and displayed in the Medida column.
The Medidas module is a catalogue (master data), not an individual-measure tracker. Tracking the actual application of a measure — start date, end date, state — is done through the Expedientes module.
Dashboard Integration
Expedientes grouped by their linkedmedida.nombre drive the DashBarChart (“Expedientes por tipo de medida”) on the Dashboard. The top 5 measure types by count are displayed. Adding or editing measure names here directly updates those chart labels on the next dashboard load.