diff --git a/geneit_app/src/routes/family/FamilyCoupleRoute.tsx b/geneit_app/src/routes/family/FamilyCoupleRoute.tsx index 94b697a..02dc0db 100644 --- a/geneit_app/src/routes/family/FamilyCoupleRoute.tsx +++ b/geneit_app/src/routes/family/FamilyCoupleRoute.tsx @@ -24,6 +24,7 @@ import { DateInput } from "../../widgets/forms/DateInput"; import { MemberInput } from "../../widgets/forms/MemberInput"; import { PropSelect } from "../../widgets/forms/SelectInput"; import { UploadPhotoButton } from "../../widgets/forms/UploadPhotoButton"; +import { useQuery } from "../../hooks/useQuery"; /** * Create a new couple route @@ -36,6 +37,13 @@ export function FamilyCreateCoupleRoute(): React.ReactElement { const n = useNavigate(); const family = useFamily(); + const params = useQuery(); + const couple = Couple.New(family.family.family_id); + const wife = Number(params.get("wife")); + const husband = Number(params.get("husband")); + if (wife) couple.wife = wife; + if (husband) couple.husband = husband; + const create = async (m: Couple) => { try { const r = await CoupleApi.Create(m); @@ -58,7 +66,7 @@ export function FamilyCreateCoupleRoute(): React.ReactElement { return ( )) )} + + {couple.wife && couple.husband && ( +
+ + + +
+ )} )} diff --git a/geneit_app/src/routes/family/FamilyMemberRoute.tsx b/geneit_app/src/routes/family/FamilyMemberRoute.tsx index 970aed6..ead75c4 100644 --- a/geneit_app/src/routes/family/FamilyMemberRoute.tsx +++ b/geneit_app/src/routes/family/FamilyMemberRoute.tsx @@ -637,6 +637,18 @@ export function MemberPage(p: { )) )} + +
+ + + +
)}