mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-13 18:22:12 +00:00
fix(console): member table updates (#4984)
* fix: members table refresh, delete with single role * trigger update after change * remove event propagation handler Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
@@ -66,9 +66,13 @@ export class InstanceMembersComponent {
|
||||
.updateIAMMember(member.userId, selectionChange)
|
||||
.then(() => {
|
||||
this.toast.showInfo('ORG.TOAST.MEMBERCHANGED', true);
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -79,10 +83,13 @@ export class InstanceMembersComponent {
|
||||
.removeIAMMember(member.userId)
|
||||
.then(() => {
|
||||
this.toast.showInfo('IAM.TOAST.MEMBERREMOVED', true);
|
||||
this.changePage.emit();
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
});
|
||||
}),
|
||||
);
|
||||
@@ -99,6 +106,7 @@ export class InstanceMembersComponent {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -129,6 +137,7 @@ export class InstanceMembersComponent {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,6 +64,7 @@ export class OrgMembersComponent {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -72,8 +73,12 @@ export class OrgMembersComponent {
|
||||
.updateOrgMember(member.userId, selectionChange)
|
||||
.then(() => {
|
||||
this.toast.showInfo('ORG.TOAST.MEMBERCHANGED', true);
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.changePage.emit();
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
@@ -85,16 +90,24 @@ export class OrgMembersComponent {
|
||||
.removeOrgMember(member.userId)
|
||||
.then(() => {
|
||||
this.toast.showInfo('ORG.TOAST.MEMBERREMOVED', true);
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}),
|
||||
).then(() => {
|
||||
setTimeout(() => {
|
||||
)
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
public removeOrgMember(member: Member.AsObject): void {
|
||||
@@ -109,6 +122,7 @@ export class OrgMembersComponent {
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -138,6 +152,7 @@ export class OrgMembersComponent {
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.changePage.emit();
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -112,9 +112,13 @@ export class ProjectGrantDetailComponent {
|
||||
.then(() => {
|
||||
this.toast.showInfo('PROJECT.TOAST.DEACTIVATED', true);
|
||||
this.grant.state = newState;
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -141,9 +145,13 @@ export class ProjectGrantDetailComponent {
|
||||
.updateProjectGrant(this.grant.grantId, this.grant.projectId, selectionChange)
|
||||
.then(() => {
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTUPDATED', true);
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toast.showError(error);
|
||||
this.changePage.emit();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -159,6 +167,7 @@ export class ProjectGrantDetailComponent {
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.changePage.emit();
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}),
|
||||
@@ -175,6 +184,7 @@ export class ProjectGrantDetailComponent {
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.changePage.emit();
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
@@ -203,9 +213,10 @@ export class ProjectGrantDetailComponent {
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTMEMBERADDED', true);
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 3000);
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.changePage.emit();
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
@@ -217,9 +228,13 @@ export class ProjectGrantDetailComponent {
|
||||
this.mgmtService
|
||||
.updateProjectGrantMember(this.grant.projectId, this.grant.grantId, member.userId, selectionChange)
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTMEMBERCHANGED', true);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.changePage.emit();
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
@@ -232,9 +247,13 @@ export class ProjectGrantDetailComponent {
|
||||
this.mgmtService
|
||||
.updateProjectGrant(this.grant.grantId, this.grant.projectId, this.grant.grantedRoleKeysList)
|
||||
.then(() => {
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTUPDATED', true);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.changePage.emit();
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
@@ -257,8 +276,12 @@ export class ProjectGrantDetailComponent {
|
||||
.then(() => {
|
||||
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTUPDATED', true);
|
||||
this.grant.grantedRoleKeysList = resp.roles;
|
||||
setTimeout(() => {
|
||||
this.changePage.emit();
|
||||
}, 1000);
|
||||
})
|
||||
.catch((error) => {
|
||||
this.changePage.emit();
|
||||
this.toast.showError(error);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user