Pfadauswahl hinzugefügt
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user