Remove scheduling cheerleader special case
Some checks failed
E2E Tests / e2e (push) Has been cancelled
Tests and checks on push / run-checks-and-tests (push) Has been cancelled
Updates translation progress / update-translation-progress-issue (push) Has been cancelled

This commit is contained in:
Kalle
2026-09-05 07:19:47 +03:00
parent b6e202c277
commit 41a56ed7d7
6 changed files with 14 additions and 22 deletions

View File

@@ -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")