Show couples on members page
This commit is contained in:
geneit_app/src
@@ -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 {
|
||||
|
Reference in New Issue
Block a user