feat(scheduler): Clinical Scheduler audit trail + inline per-week history#236
feat(scheduler): Clinical Scheduler audit trail + inline per-week history#236rlorenzo wants to merge 4 commits into
Conversation
Replace the legacy ColdFusion "Schedule Changes Audit log" with a filterable audit trail (year, rotation, area, modified-by, person, date range) and colored action badges, matching the Effort audit trail UI. Reachable from a left-nav link and in-page tab gated on SVMSecure.ClnSched.Manage. The ScheduleAudit table was already written on every add/remove/primary-evaluator change but had no reader; this surfaces that data, so the audit read paths are no longer dead code.
- Inline change-history popover per week (centered dialog on mobile), reusing the existing schedule-audit data; gated on the same SVMSecure.ClnSched.Manage permission as the audit trail page. - Audit trail: add a Term column and a grad-year-scoped Term filter, relabel the "Year" filter to "Grad Year", and default every filter to an explicit "All ..." state. - Make the audit table responsive: full table on desktop, a stacked table on tablet/iPad, and cards on phones, matching the Effort audit trail. Claude-Session: https://claude.ai/code/session_01KG91i9MUZbBB7Mp73qwmA4
- Default every filter to an explicit "All ..." state and move the free-text search to a bar on top of the results table. - Extract a shared AuditChangeDetail component, removing the duplicated old-to-new diff markup in the desktop and mobile views. Claude-Session: https://claude.ai/code/session_01KG91i9MUZbBB7Mp73qwmA4
Bundle ReportChanges will increase total bundle size by 22.5kB (1.06%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: viper-frontend-esmAssets Changed:
Files in
Files in
Files in
Files in
Files in
Files in
Files in
Files in
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #236 +/- ##
==========================================
- Coverage 44.49% 44.20% -0.30%
==========================================
Files 895 909 +14
Lines 51655 52424 +769
Branches 4812 4914 +102
==========================================
+ Hits 22983 23173 +190
- Misses 28108 28671 +563
- Partials 564 580 +16
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
Replace .HasValue/.Value with "is T x" pattern matching on the audit-log filter params (rotation, term, from/to dates) so the code-quality analyzer stops flagging the guarded .Value access as a possible null dereference. No behavior change. Claude-Session: https://claude.ai/code/session_01KG91i9MUZbBB7Mp73qwmA4
Summary
Surfaces the clinical schedule-change audit data VIPER already records, replacing the legacy ColdFusion "Schedule Changes Audit log". Everything is gated on
SVMSecure.ClnSched.Manage, the same permission the legacy page used, so no new permission is introduced.ScheduleAudittable (grad year, term, rotation, area, modified-by, person, date range) with colored action badges.AuditChangeDetailcomponent (removes duplicated diff markup).Activates previously-dead code (flagged by fallow)
This branch is mostly surfacing audit code that already existed but was dead, not new plumbing:
ScheduleAudittable has been written on every add/remove/primary-evaluator change, but had no reader. At this branch's base the read methods (GetInstructorScheduleAuditHistoryAsync,GetRotationWeekAuditHistoryAsync) had zero callers, i.e. dead code.