diff --git a/components/booking/pages/BookingPage.tsx b/components/booking/pages/BookingPage.tsx index bb492fa279..295d3a6c27 100644 --- a/components/booking/pages/BookingPage.tsx +++ b/components/booking/pages/BookingPage.tsx @@ -329,42 +329,48 @@ const BookingPage = (props: any): JSX.Element => { )} ))} -
- {!guestToggle && ( - - )} - {guestToggle && ( -
+ {!props.eventType.disableGuests && ( +
+ {!guestToggle && ( - { - setGuestEmails(_emails); - }} - getLabel={(email: string, index: number, removeEmail: (index: number) => void) => { - return ( -
- {email} - removeEmail(index)}> - × - -
- ); - }} - /> -
- )} -
+ )} + {guestToggle && ( +
+ + { + setGuestEmails(_emails); + }} + getLabel={( + email: string, + index: number, + removeEmail: (index: number) => void + ) => { + return ( +
+ {email} + removeEmail(index)}> + × + +
+ ); + }} + /> +
+ )} +
+ )}
-
-
- -
-
-
-
- -
-
-

- The booking needs to be manually confirmed before it is pushed to the - integrations and a confirmation mail is sent. -

-
-
-
-
+ + + +
@@ -1153,6 +1143,7 @@ export const getServerSideProps = async (context: GetServerSidePropsContext) => periodEndDate: true, periodCountCalendarDays: true, requiresConfirmation: true, + disableGuests: true, team: { select: { slug: true, diff --git a/pages/team/[slug]/book.tsx b/pages/team/[slug]/book.tsx index 49daa763ad..ff88dda3b9 100644 --- a/pages/team/[slug]/book.tsx +++ b/pages/team/[slug]/book.tsx @@ -33,6 +33,7 @@ export async function getServerSideProps(context) { periodStartDate: true, periodEndDate: true, periodCountCalendarDays: true, + disableGuests: true, team: { select: { slug: true, diff --git a/prisma/migrations/20210922004424_add_disable_guests_to_event_type/migration.sql b/prisma/migrations/20210922004424_add_disable_guests_to_event_type/migration.sql new file mode 100644 index 0000000000..840f7f98b2 --- /dev/null +++ b/prisma/migrations/20210922004424_add_disable_guests_to_event_type/migration.sql @@ -0,0 +1,2 @@ +-- AlterTable +ALTER TABLE "EventType" ADD COLUMN "disableGuests" BOOLEAN NOT NULL DEFAULT false; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 6a9bb33afd..4d094719f5 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -38,6 +38,7 @@ model EventType { periodDays Int? periodCountCalendarDays Boolean? requiresConfirmation Boolean @default(false) + disableGuests Boolean @default(false) minimumBookingNotice Int @default(120) schedulingType SchedulingType? Schedule Schedule[]