The Reports view (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/rtajio/ESEN/llms.txt
Use this file to discover all available pages before exploring further.
view-reportes) gives administrators a complete picture of extracurricular activity data for the current session. It is divided into three sections: a horizontal bar chart showing hours broken down by category, a general summary panel with six aggregate figures, and a full detail table of all activities. All data is drawn directly from the live actividades array — there is no separate reporting database or cache.
Reports reflect the current in-session state only. Because ESEN is a browser-only static app with no persistent storage, all data resets when the page is reloaded.
Hours by category
The top-left card renders a horizontal CSS bar chart. For each of the five categories,renderReportes() (app.js:370) sums the horas field of every matching activity, then computes a percentage relative to the category with the most hours:
app.js
- A fixed-width label (110 px) showing the category name.
- A flex-grow track filled to
pct%width using the green--green-500colour. - A right-aligned value showing the raw hour count (e.g.
20h).
Math.max(...horas, 1) guard prevents division by zero when no activities have been entered yet.
General summary
The top-right card shows six computed figures:| Label | Calculation |
|---|---|
| Total actividades | actividades.length |
| Actividades activas | actividades.filter(a => a.activo).length |
| Horas totales | actividades.reduce((s, a) => s + a.horas, 0) |
| Total participaciones | actividades.reduce((s, a) => s + a.participantes.length, 0) |
| Promedio horas / actividad | Math.round(totalHrs / actividades.length) (0 when no activities) |
| Estudiantes registrados | estudiantes.length (the static roster array) |
Total participaciones counts raw participant slots, not unique people. If the same student appears in three activities, they contribute 3 to this total. For unique participant counts, see the Participantes stat card on the dashboard.
Activity detail table
Below the two summary cards, a full table lists every activity with the following columns:| Column | Source field | Notes |
|---|---|---|
| Actividad | nombre | Bold |
| Categoría | cat | Category badge via catBadge() |
| Horas | horas | Displayed as Xh, bold |
| Participantes | participantes.length | Raw count |
| Resolución | res | Small grey text |
| Fecha | fecha | DD/MM/YYYY via formatDate() |
CSV export
The Exportar CSV button in the detail table header callsexportCSV() (app.js:413). The export includes every activity in the current session.
Export format
- Filename:
reporte-actividades-esen.csv - Encoding: UTF-8 with BOM (
\uFEFF) prepended so that Excel opens the file with correct character encoding - Headers:
Actividad,Categoría,Horas,Participantes,Resolución,Fecha,Estado - Delivery:
Blob+URL.createObjectURL— no server required
exportCSV() source
app.js
Column details
Column details
- Actividad — wrapped in double quotes to handle activity names that contain commas.
- Categoría — plain string value (e.g.
Académico). - Horas — integer hour count for that activity.
- Participantes — count of participants, not their names.
- Resolución — resolution number string (e.g.
RES-2024-001). - Fecha — ISO date string (
YYYY-MM-DD) as stored internally. - Estado —
ActivoorInactivo.
Why the UTF-8 BOM?
Why the UTF-8 BOM?
Microsoft Excel does not automatically detect UTF-8 encoding without a byte-order mark. Prepending
\uFEFF ensures that accented characters in Spanish (e.g. Categoría, Resolución) display correctly when the CSV is opened in Excel on Windows without any manual import configuration.