Finalized Event modal
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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={
|
||||
[
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user