fix: issues in 'updateNewTeamMemberEventTypes' while adding new team member. (#17513)
* fix due to error in zod.parse while adding new member * updated zod parsing * fix the linking with parent * update fixture to accomodate assignAllTeamMembers for team and org scenarios * added e2e test * nit
This commit is contained in:
1 parent
9873e373dc
commit
540bd478dc
3 files changed
+70
-2
No files matched your search
@@ -419,7 +419,9 @@ export async function updateNewTeamMemberEventTypes(userId: number, teamId: numb
|
||||
},
|
||||
});
|
||||
|
||||
const allManagedEventTypePropsZod = _EventTypeModel.pick(allManagedEventTypeProps);
|
||||
const allManagedEventTypePropsZod = _EventTypeModel.pick(allManagedEventTypeProps).extend({
|
||||
bookingFields: _EventTypeModel.shape.bookingFields.nullish(),
|
||||
});
|
||||
|
||||
eventTypesToAdd.length > 0 &&
|
||||
(await prisma.$transaction(
|
||||
@@ -454,7 +456,7 @@ export async function updateNewTeamMemberEventTypes(userId: number, teamId: numb
|
||||
users: {
|
||||
connect: [{ id: userId }],
|
||||
},
|
||||
parentId: eventType.parentId,
|
||||
parentId: eventType.id,
|
||||
hidden: false,
|
||||
workflows: currentWorkflowIds && {
|
||||
create: currentWorkflowIds.map((wfId) => ({ workflowId: wfId })),
|
||||
|
||||
Reference in new issue
Block a user