added Badges to Dashboard, warning for full events

This commit is contained in:
PxlLoewe
2025-03-10 23:29:02 -07:00
parent c01e618a56
commit 92dff8f3c9
20 changed files with 141 additions and 31 deletions

View File

@@ -30,6 +30,25 @@ export default async () => {
},
},
});
const appointments = await prisma.eventAppointment.findMany({
where: {
appointmentDate: {
gte: new Date(),
},
},
include: {
Participants: {
where: {
userId: user.id,
},
},
_count: {
select: {
Participants: true,
},
},
},
});
const userAppointments = await prisma.eventAppointment.findMany({
where: {
Participants: {
@@ -51,6 +70,7 @@ export default async () => {
{events.map((event) => {
return (
<KursItem
appointments={appointments}
selectedAppointments={userAppointments}
user={user}
event={event}