Get membership status only for the current group
Closes #575 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -628,15 +628,14 @@ export default class Group extends mixins(GroupMixin) {
|
||||
}
|
||||
|
||||
get groupMember(): IMember | undefined {
|
||||
if (!this.person || !this.person.id) return undefined;
|
||||
return this.person.memberships.elements.find(
|
||||
({ parent: { id } }) => id === this.group.id
|
||||
);
|
||||
if (this.person?.memberships?.total > 0) {
|
||||
return this.person?.memberships?.elements[0];
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
|
||||
get groupMemberships(): (string | undefined)[] {
|
||||
if (!this.person || !this.person.id) return [];
|
||||
return this.person.memberships.elements
|
||||
return this.person?.memberships?.elements
|
||||
.filter(
|
||||
(membership: IMember) =>
|
||||
![
|
||||
|
||||
@@ -33,14 +33,13 @@
|
||||
</nav>
|
||||
<section
|
||||
class="container section"
|
||||
v-if="group && isCurrentActorAGroupAdmin"
|
||||
v-if="group && isCurrentActorAGroupAdmin && followers"
|
||||
>
|
||||
<h1>{{ $t("Group Followers") }} ({{ followers.total }})</h1>
|
||||
<b-field :label="$t('Status')" horizontal>
|
||||
<b-switch v-model="pending">{{ $t("Pending") }}</b-switch>
|
||||
</b-field>
|
||||
<b-table
|
||||
v-if="followers"
|
||||
:data="followers.elements"
|
||||
ref="queueTable"
|
||||
:loading="this.$apollo.loading"
|
||||
|
||||
Reference in New Issue
Block a user