2 Commits

Author SHA1 Message Date
433f8384a0 Emphasis missing mother and father
All checks were successful
continuous-integration/drone/push Build is passing
2023-08-31 20:39:17 +02:00
2c0b6356b6 Fix bug 2023-08-31 20:36:33 +02:00
2 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import EditIcon from "@mui/icons-material/Edit";
import FemaleIcon from "@mui/icons-material/Female";
import MaleIcon from "@mui/icons-material/Male";
import VisibilityIcon from "@mui/icons-material/Visibility";
import { Button, TextField, Tooltip } from "@mui/material";
import { Button, TextField, Tooltip, Typography } from "@mui/material";
import { DataGrid, GridActionsCellItem, GridColDef } from "@mui/x-data-grid";
import React from "react";
import { useNavigate } from "react-router-dom";
@@ -165,7 +165,8 @@ function MembersTable(p: {
headerName: "Père",
flex: 5,
renderCell(params) {
if (!params.row.father) return <></>;
if (!params.row.father)
return <Typography color="red">Non renseigné</Typography>;
return family.members.get(params.row.father)!.fullName;
},
},
@@ -174,7 +175,8 @@ function MembersTable(p: {
headerName: "Mère",
flex: 5,
renderCell(params) {
if (!params.row.mother) return <></>;
if (!params.row.mother)
return <Typography color="red">Non renseignée</Typography>;
return family.members.get(params.row.mother)!.fullName;
},
},

View File

@@ -307,7 +307,7 @@ function NodeArea(p: {
}
// If the mother is the mother of all the children, while the
// father is not the father of any of the children
if (
else if (
pers2 &&
p.node.down.every(
(n) => n.member.father !== pers1.id && n.member.mother === pers2!.id