Fix reloading the members list after excluding a member
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
356f69cef2
commit
569a4b6356
|
@ -376,6 +376,12 @@ export default class GroupMembers extends mixins(GroupMixin) {
|
||||||
|
|
||||||
async removeMember(memberId: string): Promise<void> {
|
async removeMember(memberId: string): Promise<void> {
|
||||||
const { roles, MEMBERS_PER_PAGE, group, page } = this;
|
const { roles, MEMBERS_PER_PAGE, group, page } = this;
|
||||||
|
const variables = {
|
||||||
|
name: usernameWithDomain(group),
|
||||||
|
page,
|
||||||
|
limit: MEMBERS_PER_PAGE,
|
||||||
|
roles,
|
||||||
|
};
|
||||||
try {
|
try {
|
||||||
await this.$apollo.mutate<{ removeMember: IMember }>({
|
await this.$apollo.mutate<{ removeMember: IMember }>({
|
||||||
mutation: REMOVE_MEMBER,
|
mutation: REMOVE_MEMBER,
|
||||||
|
@ -386,14 +392,7 @@ export default class GroupMembers extends mixins(GroupMixin) {
|
||||||
refetchQueries: [
|
refetchQueries: [
|
||||||
{
|
{
|
||||||
query: GROUP_MEMBERS,
|
query: GROUP_MEMBERS,
|
||||||
variables() {
|
variables,
|
||||||
return {
|
|
||||||
name: usernameWithDomain(group),
|
|
||||||
page,
|
|
||||||
limit: MEMBERS_PER_PAGE,
|
|
||||||
roles,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue