diff --git a/geneit_app/src/App.tsx b/geneit_app/src/App.tsx index 6b9dcfe..afb7f0f 100644 --- a/geneit_app/src/App.tsx +++ b/geneit_app/src/App.tsx @@ -16,26 +16,26 @@ import { NewAccountRoute } from "./routes/auth/NewAccountRoute"; import { OIDCCbRoute } from "./routes/auth/OIDCCbRoute"; import { PasswordForgottenRoute } from "./routes/auth/PasswordForgottenRoute"; import { ResetPasswordRoute } from "./routes/auth/ResetPasswordRoute"; -import { FamilyHomeRoute } from "./routes/family/FamilyHomeRoute"; +import { FamilyHomeRoute } from "./routes/family/genealogy/FamilyHomeRoute"; import { FamilyCreateMemberRoute, FamilyEditMemberRoute, FamilyMemberRoute, -} from "./routes/family/FamilyMemberRoute"; +} from "./routes/family/genealogy/FamilyMemberRoute"; import { FamilySettingsRoute } from "./routes/family/FamilySettingsRoute"; import { FamilyUsersListRoute } from "./routes/family/FamilyUsersListRoute"; import { BaseAuthenticatedPage } from "./widgets/BaseAuthenticatedPage"; import { BaseFamilyRoute } from "./widgets/BaseFamilyRoute"; import { BaseLoginPage } from "./widgets/BaseLoginpage"; -import { FamilyMembersListRoute } from "./routes/family/FamilyMembersListRoute"; +import { FamilyMembersListRoute } from "./routes/family/genealogy/FamilyMembersListRoute"; import { FamilyCoupleRoute, FamilyCreateCoupleRoute, FamilyEditCoupleRoute, -} from "./routes/family/FamilyCoupleRoute"; -import { FamilyCouplesListRoute } from "./routes/family/FamilyCouplesListRoute"; -import { FamilyTreeRoute } from "./routes/family/FamilyTreeRoute"; -import { FamilyMemberTreeRoute } from "./routes/family/FamilyMemberTreeRoute"; +} from "./routes/family/genealogy/FamilyCoupleRoute"; +import { FamilyCouplesListRoute } from "./routes/family/genealogy/FamilyCouplesListRoute"; +import { FamilyTreeRoute } from "./routes/family/genealogy/FamilyTreeRoute"; +import { FamilyMemberTreeRoute } from "./routes/family/genealogy/FamilyMemberTreeRoute"; import { GenealogyHomeRoute } from "./routes/family/genealogy/GenealogyHomeRoute"; interface AuthContext { diff --git a/geneit_app/src/routes/family/FamilyCoupleRoute.tsx b/geneit_app/src/routes/family/genealogy/FamilyCoupleRoute.tsx similarity index 90% rename from geneit_app/src/routes/family/FamilyCoupleRoute.tsx rename to geneit_app/src/routes/family/genealogy/FamilyCoupleRoute.tsx index 7693feb..d6774c5 100644 --- a/geneit_app/src/routes/family/FamilyCoupleRoute.tsx +++ b/geneit_app/src/routes/family/genealogy/FamilyCoupleRoute.tsx @@ -6,26 +6,26 @@ import SaveIcon from "@mui/icons-material/Save"; import { Button, Grid, Stack } from "@mui/material"; import React from "react"; import { useNavigate, useParams } from "react-router-dom"; -import { Couple, CoupleApi } from "../../api/genealogy/CoupleApi"; -import { Member } from "../../api/genealogy/MemberApi"; -import { ServerApi } from "../../api/ServerApi"; -import { useAlert } from "../../hooks/context_providers/AlertDialogProvider"; -import { useConfirm } from "../../hooks/context_providers/ConfirmDialogProvider"; -import { useSnackbar } from "../../hooks/context_providers/SnackbarProvider"; -import { AsyncWidget } from "../../widgets/AsyncWidget"; -import { useFamily } from "../../widgets/BaseFamilyRoute"; -import { ConfirmLeaveWithoutSaveDialog } from "../../widgets/ConfirmLeaveWithoutSaveDialog"; -import { CouplePhoto } from "../../widgets/CouplePhoto"; -import { FamilyPageTitle } from "../../widgets/FamilyPageTitle"; -import { MemberItem } from "../../widgets/MemberItem"; -import { PropertiesBox } from "../../widgets/PropertiesBox"; -import { RouterLink } from "../../widgets/RouterLink"; -import { DateInput } from "../../widgets/forms/DateInput"; -import { MemberInput } from "../../widgets/forms/MemberInput"; -import { PropSelect } from "../../widgets/forms/PropSelect"; -import { UploadPhotoButton } from "../../widgets/forms/UploadPhotoButton"; -import { useQuery } from "../../hooks/useQuery"; -import { useLoadingMessage } from "../../hooks/context_providers/LoadingMessageProvider"; +import { Couple, CoupleApi } from "../../../api/genealogy/CoupleApi"; +import { Member } from "../../../api/genealogy/MemberApi"; +import { ServerApi } from "../../../api/ServerApi"; +import { useAlert } from "../../../hooks/context_providers/AlertDialogProvider"; +import { useConfirm } from "../../../hooks/context_providers/ConfirmDialogProvider"; +import { useSnackbar } from "../../../hooks/context_providers/SnackbarProvider"; +import { AsyncWidget } from "../../../widgets/AsyncWidget"; +import { useFamily } from "../../../widgets/BaseFamilyRoute"; +import { ConfirmLeaveWithoutSaveDialog } from "../../../widgets/ConfirmLeaveWithoutSaveDialog"; +import { CouplePhoto } from "../../../widgets/CouplePhoto"; +import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle"; +import { MemberItem } from "../../../widgets/MemberItem"; +import { PropertiesBox } from "../../../widgets/PropertiesBox"; +import { RouterLink } from "../../../widgets/RouterLink"; +import { DateInput } from "../../../widgets/forms/DateInput"; +import { MemberInput } from "../../../widgets/forms/MemberInput"; +import { PropSelect } from "../../../widgets/forms/PropSelect"; +import { UploadPhotoButton } from "../../../widgets/forms/UploadPhotoButton"; +import { useQuery } from "../../../hooks/useQuery"; +import { useLoadingMessage } from "../../../hooks/context_providers/LoadingMessageProvider"; /** * Create a new couple route diff --git a/geneit_app/src/routes/family/FamilyCouplesListRoute.tsx b/geneit_app/src/routes/family/genealogy/FamilyCouplesListRoute.tsx similarity index 90% rename from geneit_app/src/routes/family/FamilyCouplesListRoute.tsx rename to geneit_app/src/routes/family/genealogy/FamilyCouplesListRoute.tsx index 4878c5c..940b6bf 100644 --- a/geneit_app/src/routes/family/FamilyCouplesListRoute.tsx +++ b/geneit_app/src/routes/family/genealogy/FamilyCouplesListRoute.tsx @@ -6,17 +6,17 @@ import { Button, TextField, Tooltip } from "@mui/material"; import { DataGrid, GridActionsCellItem, GridColDef } from "@mui/x-data-grid"; import React from "react"; import { useNavigate } from "react-router-dom"; -import { Couple, CoupleApi } from "../../api/genealogy/CoupleApi"; -import { dateTimestamp, fmtDate } from "../../api/genealogy/MemberApi"; -import { ServerApi } from "../../api/ServerApi"; -import { useAlert } from "../../hooks/context_providers/AlertDialogProvider"; -import { useConfirm } from "../../hooks/context_providers/ConfirmDialogProvider"; -import { useSnackbar } from "../../hooks/context_providers/SnackbarProvider"; -import { useFamily } from "../../widgets/BaseFamilyRoute"; -import { CouplePhoto } from "../../widgets/CouplePhoto"; -import { FamilyPageTitle } from "../../widgets/FamilyPageTitle"; -import { MemberPhoto } from "../../widgets/MemberPhoto"; -import { RouterLink } from "../../widgets/RouterLink"; +import { Couple, CoupleApi } from "../../../api/genealogy/CoupleApi"; +import { dateTimestamp, fmtDate } from "../../../api/genealogy/MemberApi"; +import { ServerApi } from "../../../api/ServerApi"; +import { useAlert } from "../../../hooks/context_providers/AlertDialogProvider"; +import { useConfirm } from "../../../hooks/context_providers/ConfirmDialogProvider"; +import { useSnackbar } from "../../../hooks/context_providers/SnackbarProvider"; +import { useFamily } from "../../../widgets/BaseFamilyRoute"; +import { CouplePhoto } from "../../../widgets/CouplePhoto"; +import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle"; +import { MemberPhoto } from "../../../widgets/MemberPhoto"; +import { RouterLink } from "../../../widgets/RouterLink"; export function FamilyCouplesListRoute(): React.ReactElement { const alert = useAlert(); diff --git a/geneit_app/src/routes/family/FamilyHomeRoute.tsx b/geneit_app/src/routes/family/genealogy/FamilyHomeRoute.tsx similarity index 76% rename from geneit_app/src/routes/family/FamilyHomeRoute.tsx rename to geneit_app/src/routes/family/genealogy/FamilyHomeRoute.tsx index 3be1b65..4a66382 100644 --- a/geneit_app/src/routes/family/FamilyHomeRoute.tsx +++ b/geneit_app/src/routes/family/genealogy/FamilyHomeRoute.tsx @@ -1,5 +1,5 @@ -import { useFamily } from "../../widgets/BaseFamilyRoute"; -import { FamilyPageTitle } from "../../widgets/FamilyPageTitle"; +import { useFamily } from "../../../widgets/BaseFamilyRoute"; +import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle"; export function FamilyHomeRoute(): React.ReactElement { return ( diff --git a/geneit_app/src/routes/family/FamilyMemberRoute.tsx b/geneit_app/src/routes/family/genealogy/FamilyMemberRoute.tsx similarity index 92% rename from geneit_app/src/routes/family/FamilyMemberRoute.tsx rename to geneit_app/src/routes/family/genealogy/FamilyMemberRoute.tsx index 1e87d32..6d02ee6 100644 --- a/geneit_app/src/routes/family/FamilyMemberRoute.tsx +++ b/geneit_app/src/routes/family/genealogy/FamilyMemberRoute.tsx @@ -14,32 +14,32 @@ import { import * as EmailValidator from "email-validator"; import React from "react"; import { useNavigate, useParams } from "react-router-dom"; -import { Couple } from "../../api/genealogy/CoupleApi"; -import { Member, MemberApi, fmtDate } from "../../api/genealogy/MemberApi"; -import { ServerApi } from "../../api/ServerApi"; -import { useAlert } from "../../hooks/context_providers/AlertDialogProvider"; -import { useConfirm } from "../../hooks/context_providers/ConfirmDialogProvider"; -import { useSnackbar } from "../../hooks/context_providers/SnackbarProvider"; -import { AsyncWidget } from "../../widgets/AsyncWidget"; -import { useFamily } from "../../widgets/BaseFamilyRoute"; -import { ConfirmLeaveWithoutSaveDialog } from "../../widgets/ConfirmLeaveWithoutSaveDialog"; -import { CouplePhoto } from "../../widgets/CouplePhoto"; -import { FamilyPageTitle } from "../../widgets/FamilyPageTitle"; -import { MemberItem } from "../../widgets/MemberItem"; -import { MemberPhoto } from "../../widgets/MemberPhoto"; -import { PropertiesBox } from "../../widgets/PropertiesBox"; -import { RouterLink } from "../../widgets/RouterLink"; -import { DateInput } from "../../widgets/forms/DateInput"; -import { MemberInput } from "../../widgets/forms/MemberInput"; -import { PropCheckbox } from "../../widgets/forms/PropCheckbox"; -import { PropEdit } from "../../widgets/forms/PropEdit"; -import { PropSelect } from "../../widgets/forms/PropSelect"; -import { SexSelection } from "../../widgets/forms/SexSelection"; -import { UploadPhotoButton } from "../../widgets/forms/UploadPhotoButton"; -import { useQuery } from "../../hooks/useQuery"; +import { Couple } from "../../../api/genealogy/CoupleApi"; +import { Member, MemberApi, fmtDate } from "../../../api/genealogy/MemberApi"; +import { ServerApi } from "../../../api/ServerApi"; +import { useAlert } from "../../../hooks/context_providers/AlertDialogProvider"; +import { useConfirm } from "../../../hooks/context_providers/ConfirmDialogProvider"; +import { useSnackbar } from "../../../hooks/context_providers/SnackbarProvider"; +import { AsyncWidget } from "../../../widgets/AsyncWidget"; +import { useFamily } from "../../../widgets/BaseFamilyRoute"; +import { ConfirmLeaveWithoutSaveDialog } from "../../../widgets/ConfirmLeaveWithoutSaveDialog"; +import { CouplePhoto } from "../../../widgets/CouplePhoto"; +import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle"; +import { MemberItem } from "../../../widgets/MemberItem"; +import { MemberPhoto } from "../../../widgets/MemberPhoto"; +import { PropertiesBox } from "../../../widgets/PropertiesBox"; +import { RouterLink } from "../../../widgets/RouterLink"; +import { DateInput } from "../../../widgets/forms/DateInput"; +import { MemberInput } from "../../../widgets/forms/MemberInput"; +import { PropCheckbox } from "../../../widgets/forms/PropCheckbox"; +import { PropEdit } from "../../../widgets/forms/PropEdit"; +import { PropSelect } from "../../../widgets/forms/PropSelect"; +import { SexSelection } from "../../../widgets/forms/SexSelection"; +import { UploadPhotoButton } from "../../../widgets/forms/UploadPhotoButton"; +import { useQuery } from "../../../hooks/useQuery"; import { mdiFamilyTree } from "@mdi/js"; import Icon from "@mdi/react"; -import { useLoadingMessage } from "../../hooks/context_providers/LoadingMessageProvider"; +import { useLoadingMessage } from "../../../hooks/context_providers/LoadingMessageProvider"; /** * Create a new member route diff --git a/geneit_app/src/routes/family/FamilyMemberTreeRoute.tsx b/geneit_app/src/routes/family/genealogy/FamilyMemberTreeRoute.tsx similarity index 91% rename from geneit_app/src/routes/family/FamilyMemberTreeRoute.tsx rename to geneit_app/src/routes/family/genealogy/FamilyMemberTreeRoute.tsx index 5949f6b..ac3be15 100644 --- a/geneit_app/src/routes/family/FamilyMemberTreeRoute.tsx +++ b/geneit_app/src/routes/family/genealogy/FamilyMemberTreeRoute.tsx @@ -21,12 +21,12 @@ import { buildAscendingTree, buildDescendingTree, treeHeight, -} from "../../utils/family_tree"; -import { useFamily } from "../../widgets/BaseFamilyRoute"; -import { BasicFamilyTree } from "../../widgets/BasicFamilyTree"; -import { MemberItem } from "../../widgets/MemberItem"; -import { RouterLink } from "../../widgets/RouterLink"; -import { SimpleFamilyTree } from "../../widgets/simple_family_tree/SimpleFamilyTree"; +} from "../../../utils/family_tree"; +import { useFamily } from "../../../widgets/BaseFamilyRoute"; +import { BasicFamilyTree } from "../../../widgets/BasicFamilyTree"; +import { MemberItem } from "../../../widgets/MemberItem"; +import { RouterLink } from "../../../widgets/RouterLink"; +import { SimpleFamilyTree } from "../../../widgets/simple_family_tree/SimpleFamilyTree"; enum CurrTab { BasicTree, diff --git a/geneit_app/src/routes/family/FamilyMembersListRoute.tsx b/geneit_app/src/routes/family/genealogy/FamilyMembersListRoute.tsx similarity index 91% rename from geneit_app/src/routes/family/FamilyMembersListRoute.tsx rename to geneit_app/src/routes/family/genealogy/FamilyMembersListRoute.tsx index db7a48a..425ddb4 100644 --- a/geneit_app/src/routes/family/FamilyMembersListRoute.tsx +++ b/geneit_app/src/routes/family/genealogy/FamilyMembersListRoute.tsx @@ -13,14 +13,14 @@ import { MemberApi, dateTimestamp, fmtDate, -} from "../../api/genealogy/MemberApi"; -import { useAlert } from "../../hooks/context_providers/AlertDialogProvider"; -import { useConfirm } from "../../hooks/context_providers/ConfirmDialogProvider"; -import { useSnackbar } from "../../hooks/context_providers/SnackbarProvider"; -import { useFamily } from "../../widgets/BaseFamilyRoute"; -import { FamilyPageTitle } from "../../widgets/FamilyPageTitle"; -import { MemberPhoto } from "../../widgets/MemberPhoto"; -import { RouterLink } from "../../widgets/RouterLink"; +} from "../../../api/genealogy/MemberApi"; +import { useAlert } from "../../../hooks/context_providers/AlertDialogProvider"; +import { useConfirm } from "../../../hooks/context_providers/ConfirmDialogProvider"; +import { useSnackbar } from "../../../hooks/context_providers/SnackbarProvider"; +import { useFamily } from "../../../widgets/BaseFamilyRoute"; +import { FamilyPageTitle } from "../../../widgets/FamilyPageTitle"; +import { MemberPhoto } from "../../../widgets/MemberPhoto"; +import { RouterLink } from "../../../widgets/RouterLink"; export function FamilyMembersListRoute(): React.ReactElement { const alert = useAlert(); diff --git a/geneit_app/src/routes/family/FamilyTreeRoute.tsx b/geneit_app/src/routes/family/genealogy/FamilyTreeRoute.tsx similarity index 87% rename from geneit_app/src/routes/family/FamilyTreeRoute.tsx rename to geneit_app/src/routes/family/genealogy/FamilyTreeRoute.tsx index 86bda38..0e0a98e 100644 --- a/geneit_app/src/routes/family/FamilyTreeRoute.tsx +++ b/geneit_app/src/routes/family/genealogy/FamilyTreeRoute.tsx @@ -1,6 +1,6 @@ import { useNavigate } from "react-router-dom"; -import { useFamily } from "../../widgets/BaseFamilyRoute"; -import { MemberInput } from "../../widgets/forms/MemberInput"; +import { useFamily } from "../../../widgets/BaseFamilyRoute"; +import { MemberInput } from "../../../widgets/forms/MemberInput"; export function FamilyTreeRoute(): React.ReactElement { const n = useNavigate();