Show couples on members page

This commit is contained in:
2023-08-16 14:29:22 +02:00
parent ec856b5cb4
commit 23fb77b152
4 changed files with 84 additions and 11 deletions

@@ -1,5 +1,5 @@
import { APIClient } from "./ApiClient";
import { DateValue } from "./MemberApi";
import { DateValue, Member } from "./MemberApi";
interface CoupleApiInterface {
id: number;
@@ -129,6 +129,10 @@ export class CouplesList {
get(id: number): Couple | undefined {
return this.map.get(id);
}
getAllOf(m: Member): Couple[] {
return this.filter((c) => c.husband === m.id || c.wife === m.id);
}
}
export class CoupleApi {