remove appointment from events

This commit is contained in:
PxlLoewe
2026-01-18 01:09:39 +01:00
parent 606379d151
commit 9129652912
22 changed files with 105 additions and 1133 deletions

View File

@@ -1,34 +0,0 @@
import { AppointmentForm } from "(app)/admin/event/_components/AppointmentForm";
import { prisma } from "@repo/db";
export default async function Page({
params,
}: {
params: Promise<{ id: string; appointmentId: string }>;
}) {
const { id: eventId, appointmentId } = await params;
const event = await prisma.event.findUnique({
where: { id: parseInt(eventId) },
});
if (!event) return <div>Event nicht gefunden</div>;
let appointment = null;
if (appointmentId !== "new") {
appointment = await prisma.eventAppointment.findUnique({
where: { id: parseInt(appointmentId) },
include: {
Presenter: true,
Participants: {
include: { User: true },
},
},
});
if (!appointment) return <div>Termin nicht gefunden</div>;
}
return (
<AppointmentForm event={event} initialAppointment={appointment} appointmentId={appointmentId} />
);
}

View File

@@ -40,11 +40,11 @@ export default async function Page({
</Link>
</div>
<p className="text-left text-2xl font-semibold">
<PersonIcon className="mr-2 inline h-5 w-5" /> Event-übersicht für{" "}
<PersonIcon className="mr-2 inline h-5 w-5" /> Event-Übersicht für{" "}
{`${user.firstname} ${user.lastname} #${user.publicId}`}
</p>
</div>
<ParticipantForm event={event} user={user} participant={participant} />
<ParticipantForm event={event} participant={participant} />
</div>
);
}