Skip to content

feat: resident profile PR 2#1098

Open
CK-7vn wants to merge 5 commits intoCK-7vn/total-refactor-resident-profile-1from
CK-7vn/total-refactor-resident-profile-2
Open

feat: resident profile PR 2#1098
CK-7vn wants to merge 5 commits intoCK-7vn/total-refactor-resident-profile-1from
CK-7vn/total-refactor-resident-profile-2

Conversation

@CK-7vn
Copy link
Member

@CK-7vn CK-7vn commented Mar 2, 2026

Pre-Submission PR Checklist

  • No debug/console/fmt.Println statements
  • Unnecessary development comments removed
  • All acceptance criteria verified
  • Functions according to ticket specifications
  • Tested manually where applicable
  • Branch rebased with latest main
  • No business logic exists within the database layer

Description of the change

This is the Resident Profile PR #2

Adds active enrollments table, attendance trend chart, engagement badges, and detailed attendance dialog to the Resident Profile page.

Requirements Covered

- 585 (Engagement Charts -- attendance trend line chart displays last 8 weeks)*
- 586 (Engagement Charts -- chart shows weekly attendance rates correctly)*
- 587 (Engagement Charts -- hovering chart shows tooltip with rate percentage)
- 588 (Engagement Charts -- Y-axis displays 0-100 percent range)
- 589 (Active Enrollments -- program name and class name display in table)
- 590 (Active Enrollments -- schedule displays days and time)*
- 591 (Active Enrollments -- enrolled date formats correctly)
- 592 (Active Enrollments -- attendance shows sessions attended of total)
- 593 (Active Enrollments -- attendance percentage calculates correctly)
- 594 (Active Enrollments -- Strong Engagement badge shows for 80%+ attendance)
- 595 (Active Enrollments -- Check-in Opportunity badge shows for 60-79% attendance)
- 596 (Active Enrollments -- Support Recommended badge shows for below 60% attendance)
- 597 (Active Enrollments -- engagement tooltip explains badge levels)
- 598 (Active Enrollments -- View Details button opens detailed attendance dialog)
- 599 (Active Enrollments -- See X others button shows when more than 3 enrollments)
- 600 (Active Enrollments -- clicking See X others displays all enrollments)
- 601 (Active Enrollments -- Show less button appears when expanded)
- 660 (Detailed Attendance -- dialog opens for enrollment)
- 661 (Detailed Attendance -- dialog shows program and class name)
- 662 (Detailed Attendance -- attendance summary displays in dialog)
- 663 (Detailed Attendance -- Export button appears in dialog)
- 664 (Detailed Attendance -- clicking export shows CSV download success toast)
- 665 (Empty States -- empty enrollments section shows appropriate message)

*Deferred to final PR -- requires backend changes:
- 585, 586: Chart renders but shows empty state until new GET /api/users/{id}/attendance-trend endpoint provides weekly attendance data (attendance records exist with dates in program_class_event_attendance, just need a weekly aggregation query)
- 590: Schedule column renders "-" until schedule field is added to ResidentProgramOverview backend response

Screenshot(s)

PR Resident Profile

image

Redesign Resident Profile

image

Additional context

- `engagement-utils.ts` exports `getEngagementIndicator()` as a shared utility -- reusable by PR 3 for completed programs
- `schedule?: string` added to `ResidentProgramOverview` type in preparation for backend field
- Chart component is fully functional and will render data once the backend endpoint is wired in

@CK-7vn CK-7vn force-pushed the CK-7vn/total-refactor-resident-profile-1 branch from e297347 to e6ab107 Compare March 5, 2026 22:03
@CK-7vn CK-7vn force-pushed the CK-7vn/total-refactor-resident-profile-2 branch 2 times, most recently from ab5825b to 15d4f98 Compare March 6, 2026 15:54
@CK-7vn CK-7vn requested a review from a team as a code owner March 6, 2026 15:54
@CK-7vn CK-7vn requested review from carddev81 and removed request for a team March 6, 2026 15:54
@CK-7vn CK-7vn force-pushed the CK-7vn/total-refactor-resident-profile-1 branch from e6ab107 to 09efe09 Compare March 7, 2026 06:37
@CK-7vn CK-7vn force-pushed the CK-7vn/total-refactor-resident-profile-2 branch 3 times, most recently from e9b920a to 086cbad Compare March 11, 2026 17:57
@CK-7vn CK-7vn force-pushed the CK-7vn/total-refactor-resident-profile-1 branch from 09efe09 to b6cc465 Compare March 12, 2026 18:21
@CK-7vn CK-7vn force-pushed the CK-7vn/total-refactor-resident-profile-2 branch from 086cbad to 8a2651e Compare March 12, 2026 18:27
@CK-7vn CK-7vn force-pushed the CK-7vn/total-refactor-resident-profile-1 branch from b6cc465 to 8ac7012 Compare March 19, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant