fix: managed user timeZone, timeFormat and weekStart during creation (#14955)
* refactor: create, update user inputs use types instead of custom validators * fix: save weekStart, timeFormat, timeZone when creating user * fix: save weekStart, timeFormat, timeZone when creating user * e2e: fix env variables and test weekStart, timeZone and timeFormat during user create
This commit is contained in:
1 parent
2f5768b74f
commit
b8890c841c
10 files changed
+80
-64
No files matched your search
@@ -215,6 +215,9 @@ export async function createNewUsersConnectToOrgIfExists({
|
||||
autoAcceptEmailDomain,
|
||||
connectionInfoMap,
|
||||
isPlatformManaged,
|
||||
timeFormat,
|
||||
weekStart,
|
||||
timeZone,
|
||||
}: {
|
||||
usernamesOrEmails: string[];
|
||||
input: InviteMemberOptions["input"];
|
||||
@@ -222,6 +225,9 @@ export async function createNewUsersConnectToOrgIfExists({
|
||||
autoAcceptEmailDomain?: string;
|
||||
connectionInfoMap: Record<string, ReturnType<typeof getOrgConnectionInfo>>;
|
||||
isPlatformManaged?: boolean;
|
||||
timeFormat?: number;
|
||||
weekStart?: string;
|
||||
timeZone?: string;
|
||||
}) {
|
||||
// fail if we have invalid emails
|
||||
usernamesOrEmails.forEach((usernameOrEmail) => checkInputEmailIsValid(usernameOrEmail));
|
||||
@@ -253,6 +259,9 @@ export async function createNewUsersConnectToOrgIfExists({
|
||||
verified: true,
|
||||
invitedTo: input.teamId,
|
||||
isPlatformManaged: !!isPlatformManaged,
|
||||
timeFormat,
|
||||
weekStart,
|
||||
timeZone,
|
||||
organizationId: orgId || null, // If the user is invited to a child team, they are automatically added to the parent org
|
||||
...(orgId
|
||||
? {
|
||||
|
||||
Reference in new issue
Block a user