User Story
As an Administrator, I want to filter the "Days Active" metric in a Resident's Profile Overview between the last 7 days and the last 30 days, so that I can better understand short-term and long-term engagement patterns.
Description
The Resident Profile Overview currently shows the Days Active metric as the total number of days the Resident was active in the past 30 days. This issue introduces a filter toggle that allows administrators to switch between two time ranges:
- Last 7 Days — Displays the number of days the Resident has been active in the last 7 days.
- Last 30 Days — Displays the number of days the Resident has been active in the past 30 days (current implementation).
The filter will be implemented as a toggle pill component positioned to the right of the Days Active value.
Tasks
User Flow
- Admin logs into UnlockEd.
- Admin navigates to the Residents page.
- Admin clicks on a Resident's name to open the Resident Profile Overview.
- In the Engagement Metrics section, Admin sees the Days Active value with a toggle pill labeled:
- "Last 7 Days"
- "Last 30 Days" (default selection)
- Admin clicks the "Last 7 Days" pill.
- The Days Active metric updates to show the number of active days in the past 7 days.
- Admin clicks "Last 30 Days".
- The Days Active metric returns to the monthly total (last 30 days).
Acceptance Criteria
- The Days Active metric displays correctly for both last 7 days and last 30 days.
- "Last 30 Days" is the default selection when loading the Resident Profile Overview.
- Switching between "Last 7 Days" and "Last 30 Days" updates the metric without refreshing the page.
- The toggle pill is visually consistent with the rest of the UnlockEd UI.
Technical Considerations
- Use the existing date-tracking logic but extend it to support filtering by "last 7 days".
- Test performance when toggling between "Last 7 Days" and "Last 30 Days" to ensure no lag.
User Story
As an Administrator, I want to filter the "Days Active" metric in a Resident's Profile Overview between the last 7 days and the last 30 days, so that I can better understand short-term and long-term engagement patterns.
Description
The Resident Profile Overview currently shows the Days Active metric as the total number of days the Resident was active in the past 30 days. This issue introduces a filter toggle that allows administrators to switch between two time ranges:
The filter will be implemented as a toggle pill component positioned to the right of the Days Active value.
Tasks
User Flow
Acceptance Criteria
Technical Considerations