The Dashboard (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.
/app/dashboard) is the default landing view for all authenticated users. On mount it fires two parallel API calls — GET /api/v1/adolescente and GET /api/v1/expediente — and derives every counter, chart, and review alert from those live datasets. While the data is loading a full-page skeleton shimmer is displayed; once both requests resolve the page animates into its final layout. A dynamic greeting (Buenos días / Buenas tardes / Buenas noches) together with the current day and date sets the operational context at the top of the page.
Skeleton Loader
Before any data is available,DashboardSkeleton renders placeholder blocks styled with the .sk CSS class, which applies a continuous shimmer animation. The skeleton mirrors the exact layout of the real page — four stat-card placeholders, two chart placeholders, a table placeholder, and a card-grid placeholder — so the page does not jump when content arrives.
v-if="loading") once both adolescenteService.getAll() and expedienteService.getAll() have settled — success or error.
Statistics Cards
Four clickable.stat cards are rendered in a .stat-grid (4-column CSS grid). Each card navigates to the relevant module when clicked.
Adolescentes registrados
Total adolescents returned by
GET /api/v1/adolescente. Clicking navigates to /app/adolescentes.Expedientes en proceso
Count of expedientes whose
estado === 'En proceso'. Clicking navigates to /app/expedientes.Con alerta (atraso / incomparecencia)
Count of expedientes with
estado === 'Atraso' or estado === 'Incomparecencia'. When the count is greater than zero a delta label is shown. Clicking navigates to /app/expedientes.Total expedientes
Total expedientes regardless of state. Clicking navigates to
/app/expedientes.mouseenter / mouseleave handlers that toggle a box-shadow:
Charts
Both charts sit side-by-side in a.grid-2 two-column layout.
Bar Chart — Expedientes por tipo de medida
DashBarChart receives an items prop of type { l: string; v: number }[] derived from the live expediente list. The view groups expedientes by medida name, sorts descending by count, and passes the top 5.
div whose height is proportional to (value / max) * 100% with a minimum of 6% to stay visible. Hovering a bar column dims all other bars to opacity: 0.4 and bolds the hovered value label. Bars alternate the .alt CSS class for a two-tone color scheme.
Donut Chart — Estado de medidas (SVG)
DashDonut renders a pure-SVG donut using stroke-dasharray / stroke-dashoffset path segments. Segments are driven by donutData:
v === 0 are filtered out so the legend stays clean.
| Color | Estado | Meaning |
|---|---|---|
#16a34a (green) | En proceso | Measure is running on schedule |
#d97706 (amber) | Atraso | Adolescent is behind schedule |
#dc2626 (red) | Incomparecencia | Adolescent failed to appear |
Upcoming Reviews Table
RevisionListCard displays the five nearest upcoming review dates, sorted ascending by fecha_fin_medida. Only expedientes that have a fecha_fin_medida value appear in the list.
.badge + tone classes from the design system:
| Badge tone | Estado | Visual cue |
|---|---|---|
.badge.green | En proceso | Green pill |
.badge.amber | Atraso | Amber pill |
.badge.red | Incomparecencia | Red pill |
Quick Access Cards
QuickAccessCard renders a 2×2 grid of shortcut cards for the four main modules:
Adolescentes
Register and manage adolescent profiles.
Expedientes
Open and track socio-educational case files.
Medidas
Manage the catalogue of socio-educational measure types.
Reportes
Generate and export statistical reports.
Global Search (Ctrl+K)
The global search overlay is part ofAppShell.vue (the layout wrapper) and is available on every view, including the Dashboard. Press Ctrl+K (or ⌘+K on macOS) to open it.
- Adolescentes and expedientes are loaded from the API the first time the overlay is opened.
- Typing filters both lists in real time (client-side, no additional network requests).
- Results display the full name and cédula (adolescentes), or the expediente code and adolescent name (expedientes).
- Pressing Enter or clicking a result navigates directly to the relevant module.
- Press Esc or click outside the overlay to close it.
The global search index is populated on first open. If records are added during the session, refresh the page to update the search index.
AppShell Sidebar Navigation
The sidebar is divided into navigation groups that are dynamically built based on the authenticated user’s role (tppr_id).
| Group | Items | Visible to |
|---|---|---|
| General | Inicio, Mi Perfil | All roles |
| Gestión | Adolescentes, Expedientes, Medidas | All roles |
| Análisis | Reportes | Coordinador, Administrador |
| Configuración | Usuarios, Parámetros | Administrador only |
Role-Based Visibility (tppr_id)
Sidebar groups are filtered by the navGroups computed property in AppShell.vue. The router guard also redirects unauthorized direct URL access back to the Dashboard.
tppr_id | Role | Visible groups |
|---|---|---|
1 | Técnico | General, Gestión |
2 | Coordinador | General, Gestión, Análisis |
3 | Administrador | General, Gestión, Análisis, Configuración |
API Calls Made by the Dashboard
localStorage via the Axios request interceptor defined in src/services/api.ts.