Finalized Event modal

This commit is contained in:
PxlLoewe
2025-07-02 22:32:30 -07:00
parent 363aad803d
commit fc8d81d2d1
9 changed files with 172 additions and 153 deletions

View File

@@ -35,7 +35,7 @@ export const AppointmentModal = ({
return (
<dialog ref={ref} className="modal ">
<div className="modal-box min-w-[900px]">
<div className="modal-box min-w-[900px] min-h-[500px]">
<form method="dialog">
{/* if there is a button in form, it will close the modal */}
<button

View File

@@ -155,27 +155,6 @@ export const Form = ({ event }: { event?: Event }) => {
{form.watch("hasPresenceEvents") ? (
<div className="card bg-base-200 shadow-xl col-span-6">
<div className="card-body">
<div className="flex justify-between">
<h2 className="card-title">
<Calendar className="w-5 h-5" /> Termine
</h2>
{event && (
<button
className="btn btn-primary btn-outline"
onClick={() => {
appointmentModal.current?.showModal();
appointmentForm.reset({
id: undefined,
eventId: event.id,
presenterId: session?.user?.id,
});
}}
>
Hinzufügen
</button>
)}
</div>
<PaginatedTable
ref={appointmentsTableRef}
prismaModel={"eventAppointment"}
@@ -186,6 +165,28 @@ export const Form = ({ event }: { event?: Event }) => {
Presenter: true,
Participants: true,
}}
leftOfSearch={
<h2 className="card-title">
<Calendar className="w-5 h-5" /> Termine
</h2>
}
rightOfSearch={
event && (
<button
className="btn btn-primary btn-outline"
onClick={() => {
appointmentModal.current?.showModal();
appointmentForm.reset({
id: undefined,
eventId: event.id,
presenterId: session?.user?.id,
});
}}
>
Hinzufügen
</button>
)
}
columns={
[
{