Update menu when disabling some features
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Pierre HUBERT 2024-05-16 21:01:53 +02:00
parent 9c8b424759
commit a69f040181

View File

@ -132,49 +132,57 @@ export function BaseFamilyRoute(): React.ReactElement {
<FamilyLink icon={<HomeIcon />} label="Accueil" uri="" /> <FamilyLink icon={<HomeIcon />} label="Accueil" uri="" />
<Divider sx={{ my: 1 }} /> {family?.enable_genealogy && (
<ListSubheader component="div">Généalogie</ListSubheader> <>
<Divider sx={{ my: 1 }} />
<ListSubheader component="div">Généalogie</ListSubheader>
<FamilyLink <FamilyLink
icon={<HomeIcon />} icon={<HomeIcon />}
label="Accueil" label="Accueil"
uri="genealogy" uri="genealogy"
/> />
<FamilyLink <FamilyLink
icon={<Icon path={mdiCrowd} size={1} />} icon={<Icon path={mdiCrowd} size={1} />}
label="Membres" label="Membres"
uri="genealogy/members" uri="genealogy/members"
secondaryAction={ secondaryAction={
<Tooltip title="Créer une nouvelle fiche de membre"> <Tooltip title="Créer une nouvelle fiche de membre">
<RouterLink to={family!.URL("genealogy/member/create")}> <RouterLink
<IconButton> to={family!.URL("genealogy/member/create")}
<Icon path={mdiPlus} size={0.75} /> >
</IconButton> <IconButton>
</RouterLink> <Icon path={mdiPlus} size={0.75} />
</Tooltip> </IconButton>
} </RouterLink>
/> </Tooltip>
}
/>
<FamilyLink <FamilyLink
icon={<Icon path={mdiHumanMaleFemale} size={1} />} icon={<Icon path={mdiHumanMaleFemale} size={1} />}
label="Couples" label="Couples"
uri="genealogy/couples" uri="genealogy/couples"
secondaryAction={ secondaryAction={
<Tooltip title="Créer une nouvelle fiche de couple"> <Tooltip title="Créer une nouvelle fiche de couple">
<RouterLink to={family!.URL("genealogy/couple/create")}> <RouterLink
<IconButton> to={family!.URL("genealogy/couple/create")}
<Icon path={mdiPlus} size={0.75} /> >
</IconButton> <IconButton>
</RouterLink> <Icon path={mdiPlus} size={0.75} />
</Tooltip> </IconButton>
} </RouterLink>
/> </Tooltip>
}
/>
<FamilyLink <FamilyLink
icon={<Icon path={mdiFamilyTree} size={1} />} icon={<Icon path={mdiFamilyTree} size={1} />}
label="Arbre" label="Arbre"
uri="genealogy/tree" uri="genealogy/tree"
/> />
</>
)}
<Divider sx={{ my: 1 }} /> <Divider sx={{ my: 1 }} />
<ListSubheader component="div">Administration</ListSubheader> <ListSubheader component="div">Administration</ListSubheader>