diff --git a/apps/web/components/eventtype/EventAdvancedTab.tsx b/apps/web/components/eventtype/EventAdvancedTab.tsx index c42564ccd6..2d5f17c66d 100644 --- a/apps/web/components/eventtype/EventAdvancedTab.tsx +++ b/apps/web/components/eventtype/EventAdvancedTab.tsx @@ -338,6 +338,7 @@ export const EventAdvancedTab = ({ eventType, team }: Pick(undefined); const [multipleDuration, setMultipleDuration] = useState(eventType.metadata?.multipleDuration); const orgBranding = useOrgBranding(); + const seatsEnabled = formMethods.watch("seatsPerTimeSlotEnabled"); const locationOptions = props.locationOptions.map((locationOption) => { const options = locationOption.options.filter((option) => { @@ -508,6 +509,8 @@ export const EventSetupTab = ( { if (multipleDuration !== undefined) { setMultipleDuration(undefined); diff --git a/apps/web/pages/event-types/[type]/index.tsx b/apps/web/pages/event-types/[type]/index.tsx index 0ab4bd54f4..8f5a69718a 100644 --- a/apps/web/pages/event-types/[type]/index.tsx +++ b/apps/web/pages/event-types/[type]/index.tsx @@ -132,6 +132,7 @@ export type FormValues = { bookingFields: z.infer; availability?: AvailabilityOption; bookerLayouts: BookerLayoutSettings; + multipleDurationEnabled: boolean; }; export type CustomInputParsed = typeof customInputSchema._output; @@ -278,6 +279,7 @@ const EventTypePage = (props: EventTypeSetupProps) => { .filter((slug) => slug !== eventType.slug) ?? [], }, })), + seatsPerTimeSlotEnabled: eventType.seatsPerTimeSlot, }; }, [eventType, periodDates, metadata]); @@ -375,7 +377,10 @@ const EventTypePage = (props: EventTypeSetupProps) => { seatsPerTimeSlotEnabled, // eslint-disable-next-line @typescript-eslint/no-unused-vars minimumBookingNoticeInDurationType, + // eslint-disable-next-line @typescript-eslint/no-unused-vars bookerLayouts, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + multipleDurationEnabled, ...input } = values; @@ -463,6 +468,8 @@ const EventTypePage = (props: EventTypeSetupProps) => { // We don't need to send send these values to the backend // eslint-disable-next-line @typescript-eslint/no-unused-vars seatsPerTimeSlotEnabled, + // eslint-disable-next-line @typescript-eslint/no-unused-vars + multipleDurationEnabled, ...input } = values; diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index d7e76709c1..e3eb6eb6ec 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -2010,5 +2010,6 @@ "member_removed": "Member removed", "my_availability": "My Availability", "team_availability": "Team Availability", + "seat_options_doesnt_multiple_durations": "Seat option doesn't support multiple durations", "ADD_NEW_STRINGS_ABOVE_THIS_LINE_TO_PREVENT_MERGE_CONFLICTS": "↑↑↑↑↑↑↑↑↑↑↑↑↑ Add your new strings above here ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑" }