diff --git a/js/src/components/Event/OrganizerPicker.vue b/js/src/components/Event/OrganizerPicker.vue index eaca31a83..d9c2b1d13 100644 --- a/js/src/components/Event/OrganizerPicker.vue +++ b/js/src/components/Event/OrganizerPicker.vue @@ -51,6 +51,13 @@ import { MemberRole } from "@/types/enums"; groupMemberships: { query: LOGGED_USER_MEMBERSHIPS, update: (data) => data.loggedUser.memberships, + variables() { + return { + page: 1, + limit: 10, + membershipName: this.actorFilter, + }; + }, }, identities: IDENTITIES, currentActor: CURRENT_ACTOR_CLIENT, diff --git a/js/src/components/Event/OrganizerPickerWrapper.vue b/js/src/components/Event/OrganizerPickerWrapper.vue index de352277a..8a07705a6 100644 --- a/js/src/components/Event/OrganizerPickerWrapper.vue +++ b/js/src/components/Event/OrganizerPickerWrapper.vue @@ -65,42 +65,60 @@ />
{{ $t("Add a contact") }}
-
{{ $t("Your profile will be shown as contact.") }}
@@ -122,6 +140,7 @@ import { Component, Prop, Vue, Watch } from "vue-property-decorator"; import { IMember } from "@/types/actor/member.model"; import { IActor, IGroup, IPerson, usernameWithDomain } from "../../types/actor"; import OrganizerPicker from "./OrganizerPicker.vue"; +import EmptyContent from "../Utils/EmptyContent.vue"; import { CURRENT_ACTOR_CLIENT, IDENTITIES, @@ -139,16 +158,17 @@ const MEMBER_ROLES = [ ]; @Component({ - components: { OrganizerPicker }, + components: { OrganizerPicker, EmptyContent }, apollo: { members: { query: GROUP_MEMBERS, variables() { return { - name: usernameWithDomain(this.selectedActor), + groupName: usernameWithDomain(this.selectedActor), page: this.membersPage, limit: 10, roles: MEMBER_ROLES.join(","), + name: this.contactFilter, }; }, update: (data) => data.group.members, @@ -161,9 +181,11 @@ const MEMBER_ROLES = [ currentActor: CURRENT_ACTOR_CLIENT, userMemberships: { query: LOGGED_USER_MEMBERSHIPS, - variables: { - page: 1, - limit: 100, + variables() { + return { + page: 1, + limit: 10, + }; }, update: (data) => data.loggedUser.memberships, }, diff --git a/js/src/graphql/actor.ts b/js/src/graphql/actor.ts index 9bbbc3b71..962611c14 100644 --- a/js/src/graphql/actor.ts +++ b/js/src/graphql/actor.ts @@ -239,10 +239,14 @@ export const LOGGED_USER_DRAFTS = gql` `; export const LOGGED_USER_MEMBERSHIPS = gql` - query LoggedUserMemberships($page: Int, $limit: Int) { + query LoggedUserMemberships( + $membershipName: String + $page: Int + $limit: Int + ) { loggedUser { id - memberships(page: $page, limit: $limit) { + memberships(name: $membershipName, page: $page, limit: $limit) { total elements { id diff --git a/js/src/graphql/member.ts b/js/src/graphql/member.ts index 672e236b9..4dc32f923 100644 --- a/js/src/graphql/member.ts +++ b/js/src/graphql/member.ts @@ -44,10 +44,16 @@ export const REJECT_INVITATION = gql` `; export const GROUP_MEMBERS = gql` - query ($name: String!, $roles: String, $page: Int, $limit: Int) { - group(preferredUsername: $name) { + query ( + $groupName: String! + $name: String + $roles: String + $page: Int + $limit: Int + ) { + group(preferredUsername: $groupName) { ...ActorFragment - members(page: $page, limit: $limit, roles: $roles) { + members(name: $name, page: $page, limit: $limit, roles: $roles) { elements { id role diff --git a/js/src/views/Group/GroupMembers.vue b/js/src/views/Group/GroupMembers.vue index b799bef15..3904299bf 100644 --- a/js/src/views/Group/GroupMembers.vue +++ b/js/src/views/Group/GroupMembers.vue @@ -275,7 +275,7 @@ import EmptyContent from "@/components/Utils/EmptyContent.vue"; query: GROUP_MEMBERS, variables() { return { - name: this.$route.params.preferredUsername, + groupName: this.$route.params.preferredUsername, page: this.page, limit: this.MEMBERS_PER_PAGE, roles: this.roles, @@ -325,7 +325,7 @@ export default class GroupMembers extends mixins(GroupMixin) { this.inviteError = ""; const { roles, MEMBERS_PER_PAGE, group, page } = this; const variables = { - name: usernameWithDomain(group), + groupName: usernameWithDomain(group), page, limit: MEMBERS_PER_PAGE, roles, @@ -393,7 +393,7 @@ export default class GroupMembers extends mixins(GroupMixin) { async removeMember(oldMember: IMember): Promise