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
Owner

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.

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.
jason added 1 commit 2026-03-07 22:02:31 -06:00
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.
jason merged commit 53dcce576a into master 2026-03-07 22:02:34 -06:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jason/cpas#30