docker network
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
import { Event, Participant } from "@repo/db";
|
||||
|
||||
export const eventCompleted = (event: Event, participant?: Participant) => {
|
||||
if (!participant) return false;
|
||||
if (event.finisherMoodleCourseId && !participant.finisherMoodleCurseCompleted) return false;
|
||||
if (event.hasPresenceEvents && !participant.attended) return false;
|
||||
return true;
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
import { prisma } from "@repo/db";
|
||||
import { eventCompleted } from "@repo/shared-components";
|
||||
import { Router } from "express";
|
||||
import { eventCompleted } from "helper/events";
|
||||
import { handleParticipantEnrolled, handleParticipantFinished } from "modules/event";
|
||||
import { getMoodleCourseCompletionStatus } from "modules/moodle";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import { getServerSession } from "../../api/auth/[...nextauth]/auth";
|
||||
import { prisma } from "@repo/db";
|
||||
import { EventCard } from "../events/_components/item";
|
||||
import { RocketIcon } from "lucide-react";
|
||||
import { eventCompleted } from "../../../helper/events";
|
||||
import { eventCompleted } from "@repo/shared-components";
|
||||
|
||||
const page = async () => {
|
||||
const session = await getServerSession();
|
||||
|
||||
@@ -11,7 +11,8 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { Select } from "../../../_components/ui/Select";
|
||||
import toast from "react-hot-toast";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { eventCompleted, handleParticipantEnrolled } from "../../../../helper/events";
|
||||
import { handleParticipantEnrolled } from "../../../../helper/events";
|
||||
import { eventCompleted } from "@repo/shared-components";
|
||||
|
||||
interface ModalBtnProps {
|
||||
title: string;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Event, EventAppointment, Participant, Prisma } from "@repo/db";
|
||||
import axios from "axios";
|
||||
import { da } from "date-fns/locale";
|
||||
|
||||
export const getEvents = async (filter: Prisma.EventWhereInput) => {
|
||||
const { data } = await axios.get<
|
||||
@@ -19,13 +18,6 @@ export const getEvents = async (filter: Prisma.EventWhereInput) => {
|
||||
return data;
|
||||
};
|
||||
|
||||
export const eventCompleted = (event: Event, participant?: Participant) => {
|
||||
if (!participant) return false;
|
||||
if (event.finisherMoodleCourseId && !participant.finisherMoodleCurseCompleted) return false;
|
||||
if (event.hasPresenceEvents && !participant.attended) return false;
|
||||
return true;
|
||||
};
|
||||
|
||||
export const handleParticipantFinished = async (participantId: string) =>
|
||||
axios.post(`${process.env.NEXT_PUBLIC_HUB_SERVER_URL}/event/handle-participant-finished`, {
|
||||
participantId,
|
||||
|
||||
Reference in New Issue
Block a user