Skip to content

feat: add attendance rate card to program overview to fill space and per users request#1082

Open
carddev81 wants to merge 1 commit intomainfrom
carddev81/ticket_id572_attendance
Open

feat: add attendance rate card to program overview to fill space and per users request#1082
carddev81 wants to merge 1 commit intomainfrom
carddev81/ticket_id572_attendance

Conversation

@carddev81
Copy link
Contributor

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

Added a card to display the Attendance Rate within the Program Overview per users' request.

Screenshot(s)

image

@carddev81 carddev81 requested a review from a team as a code owner February 12, 2026 02:17
@carddev81 carddev81 requested review from corypride and removed request for a team February 12, 2026 02:17
@carddev81 carddev81 force-pushed the carddev81/ticket_id572_attendance branch from 91a23a0 to 762e324 Compare February 12, 2026 20:26
Copy link
Contributor

@corypride corypride left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, minor fixes mentioned above and gtg!

label="%"
/>
<StatsCard
title="Avg Attendance Rpate"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo -> Rate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch!!


const status = getProgramStatus(program, user?.facility.id);
const canAddClass = status === 'active';
const attendanceRate: number | string | undefined =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const attendanceRate: number | string | undefined =
typeof program?.attendance_rate === 'number' ||
typeof program?.attendance_rate === 'string'
? program.attendance_rate
: undefined;
This seems redundant since the model defines attendance_rate as number. Unless there's a specific reason for this check, could it can be simplified to just accessing program?.attendance_rate or even program?.attendance_rate ?? undefined;?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll make sure and make the change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants