Add wedding and divorce inputs
This commit is contained in:
geneit_app/src
@@ -1,4 +1,5 @@
|
||||
import { APIClient } from "./ApiClient";
|
||||
import { DateValue } from "./MemberApi";
|
||||
|
||||
interface CoupleApiInterface {
|
||||
id: number;
|
||||
@@ -76,6 +77,28 @@ export class Couple implements CoupleApiInterface {
|
||||
if (!this.signed_photo_id) return null;
|
||||
return `${APIClient.backendURL()}/photo/${this.signed_photo_id}/thumbnail`;
|
||||
}
|
||||
|
||||
get dateOfWedding(): DateValue | undefined {
|
||||
if (!this.wedding_day && !this.wedding_month && !this.wedding_year)
|
||||
return undefined;
|
||||
|
||||
return {
|
||||
year: this.wedding_year,
|
||||
month: this.wedding_month,
|
||||
day: this.wedding_day,
|
||||
};
|
||||
}
|
||||
|
||||
get dateOfDivorce(): DateValue | undefined {
|
||||
if (!this.divorce_day && !this.divorce_month && !this.divorce_year)
|
||||
return undefined;
|
||||
|
||||
return {
|
||||
year: this.divorce_year,
|
||||
month: this.divorce_month,
|
||||
day: this.divorce_day,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
export class CouplesList {
|
||||
|
Reference in New Issue
Block a user