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 <[email protected]>
This commit is contained in:
Max Peintner
2023-01-11 10:20:12 +00:00
committed by GitHub
co-authored by Livio Spring
parent f4b920c11c
commit 3be1f51e48
10 changed files with 203 additions and 106 deletions
@@ -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);
});
}