diff --git a/app/features/availability/AvailabilityRepository.server.test.ts b/app/features/availability/AvailabilityRepository.server.test.ts index ec17ab39d..2a8b9b738 100644 --- a/app/features/availability/AvailabilityRepository.server.test.ts +++ b/app/features/availability/AvailabilityRepository.server.test.ts @@ -335,7 +335,7 @@ describe("AvailabilityRepository.findWeekReminderUserIds", () => { expect(await reminderUserIds()).toEqual([]); }); - test("leaves cheerleaders out, the schedule surfaces do not show them", async () => { + test("reminds cheerleaders like any other member", async () => { await TeamFactory.create( { memberUserIds: [users.id(1), users.id(2), users.id(3)] }, { roles: { [users.id(3)]: "CHEERLEADER" } }, @@ -345,7 +345,7 @@ describe("AvailabilityRepository.findWeekReminderUserIds", () => { weekStartsAt: WEEK_STARTS_AT, }); - expect(await reminderUserIds()).toEqual([users.id(2)]); + expect(await reminderUserIds()).toEqual([users.id(2), users.id(3)]); }); }); diff --git a/app/features/availability/AvailabilityRepository.server.ts b/app/features/availability/AvailabilityRepository.server.ts index c374ec740..3f683659d 100644 --- a/app/features/availability/AvailabilityRepository.server.ts +++ b/app/features/availability/AvailabilityRepository.server.ts @@ -97,17 +97,11 @@ export async function hasReportedWeek({ /** * Users who have not reported the week starting at `weekStartsAt` while a teammate has (a reminder - * is only worth sending then). Cheerleaders are left out, the schedule views do not show them. + * is only worth sending then). */ export async function findWeekReminderUserIds(weekStartsAt: number) { const memberships = await db .selectFrom("TeamMemberWithSecondary") - .where((eb) => - eb.or([ - eb("TeamMemberWithSecondary.role", "is", null), - eb("TeamMemberWithSecondary.role", "!=", "CHEERLEADER"), - ]), - ) .leftJoin("AvailabilityWeek", (join) => join .onRef("AvailabilityWeek.userId", "=", "TeamMemberWithSecondary.userId") diff --git a/app/features/availability/actions/t.$customUrl.schedule.server.ts b/app/features/availability/actions/t.$customUrl.schedule.server.ts index 4dc764be1..8e1aff727 100644 --- a/app/features/availability/actions/t.$customUrl.schedule.server.ts +++ b/app/features/availability/actions/t.$customUrl.schedule.server.ts @@ -51,7 +51,6 @@ export const action: ActionFunction = async ({ request, params }) => { .filter( (member) => member.id !== user.id && - member.role !== "CHEERLEADER" && (!participantUserIds || participantUserIds.includes(member.id)), ) .map((member) => member.id), @@ -119,9 +118,7 @@ function validatedParticipantUserIds( const userIds = data.participantUserIds.map(Number); errorToastIfFalsy( userIds.every((userId) => - team.members.some( - (member) => member.id === userId && member.role !== "CHEERLEADER", - ), + team.members.some((member) => member.id === userId), ), "Participants must be members of the team", ); diff --git a/app/features/availability/loaders/t.$customUrl.schedule.server.ts b/app/features/availability/loaders/t.$customUrl.schedule.server.ts index 5893b3859..31b37f4db 100644 --- a/app/features/availability/loaders/t.$customUrl.schedule.server.ts +++ b/app/features/availability/loaders/t.$customUrl.schedule.server.ts @@ -41,9 +41,7 @@ export const loader = async ({ params }: LoaderFunctionArgs) => { meta: { teamCustomUrl: team.customUrl }, }); - const members = team.members.filter( - (member) => member.role !== "CHEERLEADER", - ); + const members = team.members; const timezone = getViewerTimezone() ?? "UTC"; const now = new Date(); diff --git a/app/features/availability/routes/t.$customUrl.schedule.tsx b/app/features/availability/routes/t.$customUrl.schedule.tsx index 7a3ae82e0..c009a816f 100644 --- a/app/features/availability/routes/t.$customUrl.schedule.tsx +++ b/app/features/availability/routes/t.$customUrl.schedule.tsx @@ -495,12 +495,10 @@ function ParticipantUserIdsFormField() { return ( member.role !== "CHEERLEADER") - .map((member) => ({ - value: String(member.id), - label: () => member.username, - }))} + options={members.map((member) => ({ + value: String(member.id), + label: () => member.username, + }))} /> ); } diff --git a/changelog/2026-09-05-cheerleaders-on-team-schedule.md b/changelog/2026-09-05-cheerleaders-on-team-schedule.md new file mode 100644 index 000000000..8abdc9432 --- /dev/null +++ b/changelog/2026-09-05-cheerleaders-on-team-schedule.md @@ -0,0 +1,5 @@ +--- +navItem: calendar +type: feature +--- +Cheerleaders now show up on the team schedule like coaches and subs, can be picked as team event participants and get team event notifications and availability reminders