File tree Expand file tree Collapse file tree
packages/features/ee/users Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,11 @@ type OptionValues = {
3030 identityProvider : Option ;
3131} ;
3232
33- type FormValues = Pick < User , "avatarUrl" | "name" | "username" | "email" | "bio" > & OptionValues ;
33+ type FormValues = Pick <
34+ User ,
35+ "avatarUrl" | "name" | "username" | "email" | "bio" | "theme" | "defaultScheduleId" | "allowDynamicBooking"
36+ > &
37+ OptionValues ;
3438
3539export const UserForm = ( {
3640 defaultValues,
@@ -79,6 +83,9 @@ export const UserForm = ({
7983 username : defaultValues ?. username ,
8084 email : defaultValues ?. email ,
8185 bio : defaultValues ?. bio ,
86+ theme : defaultValues ?. theme ,
87+ defaultScheduleId : defaultValues ?. defaultScheduleId ,
88+ allowDynamicBooking : defaultValues ?. allowDynamicBooking ,
8289 locale : {
8390 value : defaultLocale ,
8491 label : new Intl . DisplayNames ( defaultLocale , { type : "language" } ) . of ( defaultLocale ) || "" ,
Original file line number Diff line number Diff line change 22
33import { usePathname , useRouter } from "next/navigation" ;
44
5+ import { getParserWithGeneric } from "@calcom/prisma/zod-utils" ;
56import { trpc } from "@calcom/trpc/react" ;
67import { showToast } from "@calcom/ui/components/toast" ;
78
@@ -33,7 +34,8 @@ const UsersAddView = () => {
3334 < UserForm
3435 submitLabel = "Add user"
3536 onSubmit = { async ( values ) => {
36- const parsedValues = userBodySchema . parse ( values ) ;
37+ const parser = getParserWithGeneric ( userBodySchema ) ;
38+ const parsedValues = parser ( values ) ;
3739 mutation . mutate ( parsedValues ) ;
3840 } }
3941 />
You can’t perform that action at this time.
0 commit comments