docker network

This commit is contained in:
PxlLoewe
2025-06-26 22:19:27 -07:00
parent 4068fdb807
commit dee7f4702d
7 changed files with 48 additions and 54 deletions

View File

@@ -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;
};

View File

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

View File

@@ -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();

View File

@@ -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;

View File

@@ -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,