|
|
|
@ -85,7 +85,7 @@ const updateCollaborator = async (collab: any, roles: ProjectRoles) => {
|
|
|
|
|
WorkspaceRolesToProjectRoles[currentCollaborator.workspace_roles as WorkspaceUserRoles] === roles && |
|
|
|
|
isEeUI) |
|
|
|
|
) { |
|
|
|
|
await removeProjectUser(activeProjectId.value!, collab) |
|
|
|
|
await removeProjectUser(activeProjectId.value!, currentCollaborator as any) |
|
|
|
|
if ( |
|
|
|
|
currentCollaborator.workspace_roles && |
|
|
|
|
WorkspaceRolesToProjectRoles[currentCollaborator.workspace_roles as WorkspaceUserRoles] === roles && |
|
|
|
@ -97,11 +97,11 @@ const updateCollaborator = async (collab: any, roles: ProjectRoles) => {
|
|
|
|
|
} |
|
|
|
|
} else if (currentCollaborator.base_roles) { |
|
|
|
|
currentCollaborator.roles = roles |
|
|
|
|
await updateProjectUser(activeProjectId.value!, collab) |
|
|
|
|
await updateProjectUser(activeProjectId.value!, currentCollaborator as any) |
|
|
|
|
} else { |
|
|
|
|
currentCollaborator.roles = roles |
|
|
|
|
currentCollaborator.base_roles = roles |
|
|
|
|
await createProjectUser(activeProjectId.value!, collab) |
|
|
|
|
await createProjectUser(activeProjectId.value!, currentCollaborator as any) |
|
|
|
|
} |
|
|
|
|
} catch (e: any) { |
|
|
|
|
message.error(await extractSdkResponseErrorMsg(e)) |
|
|
|
|