diff --git a/apps/web/pages/settings/my-account/general.tsx b/apps/web/pages/settings/my-account/general.tsx index 1c422d6424..eb2927e449 100644 --- a/apps/web/pages/settings/my-account/general.tsx +++ b/apps/web/pages/settings/my-account/general.tsx @@ -13,6 +13,7 @@ import { Label, Meta, Select, + SettingsToggle, showToast, SkeletonButton, SkeletonContainer, @@ -120,6 +121,7 @@ const GeneralView = ({ localeProp, user }: GeneralViewProps) => { value: user.weekStart, label: nameOfDay(localeProp, user.weekStart === "Sunday" ? 0 : 1), }, + allowDynamicBooking: user.allowDynamicBooking ?? true, }, }); const { @@ -213,6 +215,22 @@ const GeneralView = ({ localeProp, user }: GeneralViewProps) => { )} /> +
+ ( + { + formMethods.setValue("allowDynamicBooking", checked, { shouldDirty: true }); + }} + /> + )} + /> +
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json index 6762099912..5ab43fd393 100644 --- a/apps/web/public/static/locales/en/common.json +++ b/apps/web/public/static/locales/en/common.json @@ -365,6 +365,7 @@ "user_dynamic_booking_disabled": "Some of the users in the group have currently disabled dynamic group bookings", "allow_dynamic_booking_tooltip": "Group booking links that can be created dynamically by adding multiple usernames with a '+'. example: '{{appName}}/bailey+peer'", "allow_dynamic_booking": "Allow attendees to book you through dynamic group bookings", + "dynamic_booking": "Dynamic group links", "email": "Email", "email_placeholder": "jdoe@example.com", "full_name": "Full name", diff --git a/packages/trpc/server/middlewares/sessionMiddleware.ts b/packages/trpc/server/middlewares/sessionMiddleware.ts index 6d7e2fddfb..eccd8fe4dc 100644 --- a/packages/trpc/server/middlewares/sessionMiddleware.ts +++ b/packages/trpc/server/middlewares/sessionMiddleware.ts @@ -67,6 +67,7 @@ export async function getUserFromSession(ctx: TRPCContextInner, session: Maybe { theme: user.theme, hideBranding: user.hideBranding, metadata: user.metadata, + allowDynamicBooking: user.allowDynamicBooking, }; };