Intranet / Trainee absences
Putting trainee absences in context.
The module turns existing absence records into a searchable trainee overview. A detail view shows monthly values, yearly totals and a cumulative trend. The training period and calculated net working days provide context for the figures.
Example profile A
August to October
- AugDays: 2Cumulative: 2
- SepDays: 0Cumulative: 2
- OctDays: 1Cumulative: 3
September adds no absence days. The cumulative count stays at two days.
The problem
A total does not explain the pattern
A total alone shows neither when absences were recorded nor which part of the training period it describes. A useful report needs detail over time.
The decision
Connect month, year and period
Records are aggregated by year and month. A detail view complements the overview with monthly values and a cumulative chart within the training period.
The result
From overview to the underlying trend
Selecting a profile opens monthly values, yearly totals and the trend. The overall count can be understood through its individual time periods.
The decisions behind it
1. Search and load the details
Search filters the trainee overview. Selecting an entry loads its JSON data and opens a detail view without rebuilding the entire page.
2. The period is part of the figure
Months outside the training period show a dash; months within it can show zero recorded absence days. The overview ratio uses the elapsed period to today, while the detail figure uses the full training period. These different reference periods matter when reading the figures.
3. Accumulate monthly values
The backend sums absence days by month, year and overall. Chart.js builds the cumulative trend from chronologically sorted year-month keys. A month without new absence days leaves the cumulative count unchanged.
Tech stack
Symfony · Doctrine DBAL · SQL Server · Twig · Stimulus · Chart.js
This module belongs to the same internal Symfony intranet as the manufacturing workflow and the other modules shown here.