Fixed profile suspension
Closes #749 Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
909a1030ef
commit
4c5eb58aa7
@ -164,7 +164,7 @@ function doMerge<T = any>(
|
||||
incoming: Array<T>,
|
||||
args: Record<string, any> | null
|
||||
): Array<T> {
|
||||
const merged = existing ? existing.slice(0) : [];
|
||||
const merged = existing && Array.isArray(existing) ? existing.slice(0) : [];
|
||||
let res;
|
||||
if (args) {
|
||||
// Assume an page of 1 if args.page omitted.
|
||||
|
@ -438,6 +438,10 @@ export default class AdminGroupProfile extends Vue {
|
||||
query: GET_GROUP,
|
||||
variables: {
|
||||
id: profileId,
|
||||
organizedEventsPage: this.organizedEventsPage,
|
||||
organizedEventsLimit: EVENTS_PER_PAGE,
|
||||
postsPage: this.postsPage,
|
||||
postsLimit: POSTS_PER_PAGE,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -275,6 +275,7 @@ import EmptyContent from "../../components/Utils/EmptyContent.vue";
|
||||
import { ApolloCache, FetchResult } from "@apollo/client/core";
|
||||
import VueRouter from "vue-router";
|
||||
import { MemberRole } from "@/types/enums";
|
||||
import cloneDeep from "lodash/cloneDeep";
|
||||
const { isNavigationFailure, NavigationFailureType } = VueRouter;
|
||||
|
||||
const EVENTS_PER_PAGE = 10;
|
||||
@ -402,6 +403,10 @@ export default class AdminProfile extends Vue {
|
||||
actorId: profileId,
|
||||
organizedEventsPage: 1,
|
||||
organizedEventsLimit: EVENTS_PER_PAGE,
|
||||
participationsPage: 1,
|
||||
participationLimit: PARTICIPATIONS_PER_PAGE,
|
||||
membershipsPage: 1,
|
||||
membershipsLimit: MEMBERSHIPS_PER_PAGE,
|
||||
},
|
||||
});
|
||||
|
||||
@ -414,7 +419,8 @@ export default class AdminProfile extends Vue {
|
||||
},
|
||||
data: {
|
||||
person: {
|
||||
...person,
|
||||
...cloneDeep(person),
|
||||
participations: { total: 0, elements: [] },
|
||||
suspended: true,
|
||||
avatar: null,
|
||||
name: "",
|
||||
|
Loading…
Reference in New Issue
Block a user