diff --git a/apps/web/components/v2/eventtype/EventAdvancedTab.tsx b/apps/web/components/v2/eventtype/EventAdvancedTab.tsx index 7e3aa37ece..230a2f83f3 100644 --- a/apps/web/components/v2/eventtype/EventAdvancedTab.tsx +++ b/apps/web/components/v2/eventtype/EventAdvancedTab.tsx @@ -42,7 +42,6 @@ export const EventAdvancedTab = ({ eventType, team }: Pick( eventType.customInputs.sort((a, b) => a.id - b.id) || [] ); @@ -51,7 +50,7 @@ export const EventAdvancedTab = ({ eventType, team }: Pick { animationRef.current && autoAnimate(animationRef.current); @@ -313,45 +312,57 @@ export const EventAdvancedTab = ({ eventType, team }: Pick
( - <> -
- { - setSeatsInputVisible(e); - formMethods.setValue("seatsPerTimeSlot", seatsPerTimeSlot); - onChange(e ? seatsPerTimeSlot : null); - }} - fitToHeight={true} - /> -
- -

{t("offer_seats_description")}

-
+
+ { + setSeatsInputVisible(e); + // Enabling seats will disable guests and requiring confimation until fully supported + if (e) { + formMethods.setValue("disableGuests", true); + formMethods.setValue("requiresConfirmation", false); + formMethods.setValue("seatsPerTimeSlot", 2); + } else { + formMethods.setValue("seatsPerTimeSlot", null); + } + onChange(e); + }} + fitToHeight={true} + /> +
+ +

{t("offer_seats_description")}

- {seatsInputVisible && ( -
- {t("seats")}} - onChange={(e) => { - formMethods.setValue("seatsPerTimeSlot", Number(e.target.value)); - }} - /> -
- )} - +
)} /> + {seatsInputVisible && ( + ( +
+ {t("seats")}} + onChange={(e) => { + onChange(Number(e.target.value)); + }} + /> +
+ )} + /> + )} {showEventNameTip && ( ) => { locations, blockchainId, smartContractAddress, + // We don't need to send it to the backend + // eslint-disable-next-line @typescript-eslint/no-unused-vars + seatsPerTimeSlotEnabled, ...input } = values; diff --git a/packages/ui/v2/core/Switch.tsx b/packages/ui/v2/core/Switch.tsx index 76fd5d4b43..ba76e4af15 100644 --- a/packages/ui/v2/core/Switch.tsx +++ b/packages/ui/v2/core/Switch.tsx @@ -21,7 +21,8 @@ const Switch = (
+ className={classNames( + "ml-2 align-text-top text-sm font-medium text-gray-900 ltr:ml-3 rtl:mr-3 dark:text-white", + primitiveProps.disabled ? "cursor-not-allowed opacity-25" : "cursor-pointer " + )}> {label} )}