Pfadauswahl hinzugefügt

This commit is contained in:
PxlLoewe
2025-06-25 21:06:03 -07:00
parent 7ad75bff63
commit 2bd8a455c8
14 changed files with 253 additions and 90 deletions

View File

@@ -1,5 +1,23 @@
import { Event, Participant } from "@repo/db";
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<
(Event & {
Appointments: (EventAppointment & {
Appointments: EventAppointment[];
Participants: Participant[];
})[];
Participants: Participant[];
})[]
>(`/api/event`, {
params: {
filter: JSON.stringify(filter),
},
});
return data;
};
export const eventCompleted = (event: Event, participant?: Participant) => {
if (!participant) return false;