12 lines
317 B
TypeScript
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;
|
|
};
|