Files
var-monorepo/apps/hub/helper/event.ts
2025-02-28 07:21:07 +01:00

12 lines
317 B
TypeScript

import { Event, Participant } from "@repo/db";
export const participantCompleted = (
event: Event,
participant: Participant,
) => {
if (event.finisherMoodleCourseId && !participant.finisherMoodleCurseCompleted)
return false;
if (event.hasPresenceEvents && !participant.attended) return false;
return true;
};