fix: score endpoint now returns total_violations and negated_count #30

Merged
jason merged 1 commits from feature/ack-signature-and-toasts into master 2026-03-07 22:02:34 -06:00

1 Commits

Author SHA1 Message Date
979e9724e0 fix: score endpoint now returns total_violations and negated_count
The /api/employees/:id/score endpoint previously only returned data from
the active_cpas_scores view (active_points + violation_count for the 90-day
window). The EmployeeModal score cards reference total_violations and
negated_count which were undefined, causing blank displays.

Now queries the violations table directly for all-time totals alongside
the rolling 90-day active data.
2026-03-07 22:01:35 -06:00