Genealogy as a feature (#175)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Start our journey into turning GeneIT as afully featured family intranet by making genealogy a feature that can be disabled by family admins Reviewed-on: #175
This commit is contained in:
39
geneit_app/src/routes/family/genealogy/FamilyTreeRoute.tsx
Normal file
39
geneit_app/src/routes/family/genealogy/FamilyTreeRoute.tsx
Normal file
@ -0,0 +1,39 @@
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { useFamily } from "../../../widgets/BaseFamilyRoute";
|
||||
import { MemberInput } from "../../../widgets/forms/MemberInput";
|
||||
|
||||
export function FamilyTreeRoute(): React.ReactElement {
|
||||
const n = useNavigate();
|
||||
|
||||
const family = useFamily();
|
||||
|
||||
const onMemberSelected = (id: number | undefined) => {
|
||||
if (id) n(family.family.familyTreeURL(id));
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
style={{
|
||||
flex: "1",
|
||||
display: "flex",
|
||||
flexDirection: "column",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
}}
|
||||
>
|
||||
<div style={{ maxWidth: "450px", textAlign: "center" }}>
|
||||
<p>
|
||||
Veuillez sélectionner la personne à partir de laquelle vous souhaitez
|
||||
constuire l'arbre généalogique de votre famille :
|
||||
</p>
|
||||
|
||||
<MemberInput
|
||||
editable={true}
|
||||
onValueChange={onMemberSelected}
|
||||
label={"Membre"}
|
||||
filter={() => true}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user