Show couple state in basic family tree

This commit is contained in:
2023-08-22 11:55:57 +02:00
parent 365b71ba2d
commit 51dbd04f7d
2 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,6 @@
import { APIClient } from "./ApiClient";
import { DateValue, Member } from "./MemberApi";
import { ServerApi } from "./ServerApi";
interface CoupleApiInterface {
id: number;
@ -103,6 +104,13 @@ export class Couple implements CoupleApiInterface {
otherPersonID(id: number): number | undefined {
return id === this.wife ? this.husband : this.wife;
}
get stateFr(): string {
return (
ServerApi.Config.couples_states.find((c) => c.code === this.state)?.fr ??
""
);
}
}
export class CouplesList {