* added toggle for dynamic booking in general settings * trigger GitHub actions --------- Co-authored-by: Peer Richelsen <peeroke@gmail.com> Co-authored-by: Syed Ali Shahbaz <52925846+alishaz-polymath@users.noreply.github.com> Co-authored-by: Alex van Andel <me@alexvanandel.com> Co-authored-by: Bailey Pumfleet <bailey@pumfleet.co.uk>gh-readonly-queue/main/pr-8955-7c46d1b34847501759158be6ad8da80c441eeb34
parent
54271283af
commit
18815a9a70
|
@ -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) => {
|
|||
</>
|
||||
)}
|
||||
/>
|
||||
<div className="mt-8">
|
||||
<Controller
|
||||
name="allowDynamicBooking"
|
||||
control={formMethods.control}
|
||||
render={() => (
|
||||
<SettingsToggle
|
||||
title={t("dynamic_booking")}
|
||||
description={t("allow_dynamic_booking")}
|
||||
checked={formMethods.getValues("allowDynamicBooking")}
|
||||
onCheckedChange={(checked) => {
|
||||
formMethods.setValue("allowDynamicBooking", checked, { shouldDirty: true });
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<Button disabled={isDisabled} color="primary" type="submit" className="mt-8">
|
||||
<>{t("update")}</>
|
||||
</Button>
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -67,6 +67,7 @@ export async function getUserFromSession(ctx: TRPCContextInner, session: Maybe<S
|
|||
trialEndsAt: true,
|
||||
metadata: true,
|
||||
role: true,
|
||||
allowDynamicBooking: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -37,5 +37,6 @@ export const meHandler = async ({ ctx }: MeOptions) => {
|
|||
theme: user.theme,
|
||||
hideBranding: user.hideBranding,
|
||||
metadata: user.metadata,
|
||||
allowDynamicBooking: user.allowDynamicBooking,
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue