Add front-end for managing group follow

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-10-25 13:18:13 +02:00
parent 244a349b7d
commit f8eda4aac5
12 changed files with 217 additions and 20 deletions

View File

@@ -5,4 +5,5 @@ export interface IFollower {
actor: IActor;
targetActor: IActor;
approved: boolean;
notify?: boolean;
}

View File

@@ -1,3 +1,4 @@
export * from "./actor.model";
export * from "./group.model";
export * from "./person.model";
export * from "./follower.model";

View File

@@ -6,12 +6,14 @@ import type { Paginate } from "../paginate";
import type { IParticipant } from "../participant.model";
import type { IMember } from "./member.model";
import type { IFeedToken } from "../feedtoken.model";
import { IFollower } from "./follower.model";
export interface IPerson extends IActor {
feedTokens: IFeedToken[];
goingToEvents: IEvent[];
participations: Paginate<IParticipant>;
memberships: Paginate<IMember>;
follows: Paginate<IFollower>;
user?: ICurrentUser;
}
@@ -31,6 +33,7 @@ export class Person extends Actor implements IPerson {
this.patch(hash);
}
follows!: Paginate<IFollower>;
patch(hash: IPerson | Record<string, unknown>): void {
Object.assign(this, hash);