Identify Urgent and Overdue Assignments via Visual Urgency Badges
The urgency badge widget is a reusable component applied to each assignment row in the status list. It calculates elapsed days since the last state change and renders a color-coded badge: neutral for normal (0–6 days), amber/warning for approaching threshold (7–9 days), and red/overdue for assignments at or past the 10-day threshold with no completion event. For peer mentors, this provides a clear visual cue to respond. For coordinators, it enables instant triage of a long assignment list. The badge logic is purely presentational — threshold calculation is performed by the tracking service.
User Story
Acceptance Criteria
- Given an assignment with a last state change less than 7 days ago and no completion event, when the badge renders, then it shows a neutral style with no urgency indication
- Given an assignment with a last state change between 7 and 9 days ago and no completion event, when the badge renders, then it shows an amber 'Approaching' badge with the number of elapsed days
- Given an assignment with a last state change 10 or more days ago and no completion event, when the badge renders, then it shows a red 'Overdue' badge with the number of elapsed days
- Given an assignment is in a terminal state (completed, closed), when the badge renders, then no urgency indicator is shown regardless of elapsed time
- Given the badge is rendered alongside an assignment row, when viewed by a screen reader user, then the urgency level and elapsed days are communicated via an accessible semantic label
- Given an organization has configured a custom threshold other than 10 days, when the badge renders, then it uses the organization's configured threshold value for urgency calculations
Business Value
The 10-day auto-reminder rule formalizes a safeguard that previously depended on individual coordinator memory. Visual urgency indicators allow both peer mentors and coordinators to triage their assignment lists at a glance, reducing the cognitive load of scanning through dates and ensuring at-risk assignments receive timely attention.