diff --git a/src/api-legacy/main.py b/src/api-legacy/main.py index 2e0763037..aaf5f536e 100644 --- a/src/api-legacy/main.py +++ b/src/api-legacy/main.py @@ -151,7 +151,7 @@ async def close(application): (r'/api/v1/borehole/stratigraphy/layer', LayerViewerHandler), (r'/api/v1/borehole/stratigraphy/layer/edit', LayerProducerHandler), - # Profile Layer handlers + # Lithology Layer handlers (r'/api/v1/borehole/profile/layer', ProfileLayerViewerHandler), # Other handlers diff --git a/src/client/cypress/e2e/boreholeList.cy.js b/src/client/cypress/e2e/boreholeList.cy.js index f1f556e96..138a36409 100644 --- a/src/client/cypress/e2e/boreholeList.cy.js +++ b/src/client/cypress/e2e/boreholeList.cy.js @@ -139,6 +139,7 @@ describe("Borehole list tests", () => { returnToOverview(); // verify current page is still 4 + cy.get('[data-cy="showTableButton"]').click(); cy.get("a").should("have.class", "active item").contains("4"); cy.get("tbody").children().eq(0).contains("td", "Christine Schuster"); cy.get("tbody").children().eq(1).contains("td", "Christine Wilderman"); diff --git a/src/client/cypress/e2e/editor/boreholeEditorTable.cy.js b/src/client/cypress/e2e/editor/boreholeEditorTable.cy.js index ed500606a..6a6a28e4e 100644 --- a/src/client/cypress/e2e/editor/boreholeEditorTable.cy.js +++ b/src/client/cypress/e2e/editor/boreholeEditorTable.cy.js @@ -27,6 +27,7 @@ describe("Borehole editor table tests", () => { returnToOverview(); // verify current page is 2 + cy.get('[data-cy="showTableButton"]').click(); cy.get("a").should("have.class", "active item").contains("2"); cy.get("tbody").children().eq(0).contains("td", "Andres Miller"); cy.get("tbody").children().eq(1).contains("td", "Andres Renner"); diff --git a/src/client/src/App.tsx b/src/client/src/App.tsx index 10a290fdd..088461255 100644 --- a/src/client/src/App.tsx +++ b/src/client/src/App.tsx @@ -4,17 +4,17 @@ import { QueryClient, QueryClientProvider } from "react-query"; import { ReactQueryDevtools } from "react-query/devtools"; import { ThemeProvider } from "@mui/material/styles"; import { theme } from "./AppTheme"; -import EditorComponent from "./pages/editor/editorComponent"; -import SettingCmp from "./pages/settings/settingCmp"; +import OverviewPage from "./pages/overview/overviewPage"; +import SettingCmp from "./pages/settings/settingsPage"; import { DataLoader } from "./pages/settings/dataLoader"; -import AcceptTerms from "./pages/term/accept"; +import AcceptTerms from "./term/accept"; import { AlertProvider } from "./components/alert/alertContext"; import { AlertBanner } from "./components/alert/alertBanner"; import { DataCardProvider } from "./components/dataCard/dataCardContext.jsx"; import { PromptProvider } from "./components/prompt/promptContext.tsx"; import { Prompt } from "./components/prompt/prompt.tsx"; import { BasemapProvider } from "./components/basemapSelector/basemapContext.tsx"; -import { FilterProvider } from "./components/filter/filterContext.tsx"; +import { FilterProvider } from "./pages/overview/sidePanelContent/filter/filterContext.tsx"; const queryClient = new QueryClient(); @@ -53,7 +53,7 @@ class App extends React.Component { } key={1} path={"/setting"} /> { - return ; + return ; }} exact={false} key={0} diff --git a/src/client/src/commons/auth/AuthOverlay.tsx b/src/client/src/auth/AuthOverlay.tsx similarity index 94% rename from src/client/src/commons/auth/AuthOverlay.tsx rename to src/client/src/auth/AuthOverlay.tsx index dcd12f1c8..979556f18 100644 --- a/src/client/src/commons/auth/AuthOverlay.tsx +++ b/src/client/src/auth/AuthOverlay.tsx @@ -3,8 +3,8 @@ import { useAuth } from "react-oidc-context"; import { useTranslation } from "react-i18next"; import { useDispatch, useSelector } from "react-redux"; import { Alert, Button, CircularProgress } from "@mui/material"; -import { loadUser } from "../../api-lib"; -import { SplashScreen } from "./SplashScreen"; +import { loadUser } from "../api-lib"; +import { SplashScreen } from "./SplashScreen.tsx"; interface AuthOverlayProps { children?: React.ReactNode; diff --git a/src/client/src/commons/auth/AuthenticationStoreSync.js b/src/client/src/auth/AuthenticationStoreSync.js similarity index 91% rename from src/client/src/commons/auth/AuthenticationStoreSync.js rename to src/client/src/auth/AuthenticationStoreSync.js index e54b857e9..b5f7cff1c 100644 --- a/src/client/src/commons/auth/AuthenticationStoreSync.js +++ b/src/client/src/auth/AuthenticationStoreSync.js @@ -1,7 +1,7 @@ import { useEffect, useState } from "react"; import { useAuth } from "react-oidc-context"; import { useDispatch } from "react-redux"; -import { setAuthentication, unsetAuthentication } from "../../api-lib"; +import { setAuthentication, unsetAuthentication } from "../api-lib"; export const AuthenticationStoreSync = () => { const auth = useAuth(); diff --git a/src/client/src/commons/auth/BdmsAuthProvider.jsx b/src/client/src/auth/BdmsAuthProvider.jsx similarity index 100% rename from src/client/src/commons/auth/BdmsAuthProvider.jsx rename to src/client/src/auth/BdmsAuthProvider.jsx diff --git a/src/client/src/commons/auth/CognitoUserManager.tsx b/src/client/src/auth/CognitoUserManager.tsx similarity index 100% rename from src/client/src/commons/auth/CognitoUserManager.tsx rename to src/client/src/auth/CognitoUserManager.tsx diff --git a/src/client/src/commons/auth/SplashScreen.tsx b/src/client/src/auth/SplashScreen.tsx similarity index 95% rename from src/client/src/commons/auth/SplashScreen.tsx rename to src/client/src/auth/SplashScreen.tsx index 147b12a3c..0cd634146 100644 --- a/src/client/src/commons/auth/SplashScreen.tsx +++ b/src/client/src/auth/SplashScreen.tsx @@ -1,9 +1,9 @@ import React from "react"; import { Stack, Typography } from "@mui/material"; import styled from "@mui/material/styles/styled"; -import TranslationKeys from "../translationKeys"; +import TranslationKeys from "./translationKeys"; import { useTranslation } from "react-i18next"; -import { theme } from "../../AppTheme"; +import { theme } from "../AppTheme.ts"; interface AuthOverlayProps { children?: React.ReactNode; diff --git a/src/client/src/auth/translationKeys/index.js b/src/client/src/auth/translationKeys/index.js new file mode 100644 index 000000000..d97ec103a --- /dev/null +++ b/src/client/src/auth/translationKeys/index.js @@ -0,0 +1 @@ +export { default } from "./translationKeys.jsx"; diff --git a/src/client/src/commons/translationKeys/styles.js b/src/client/src/auth/translationKeys/styles.js similarity index 100% rename from src/client/src/commons/translationKeys/styles.js rename to src/client/src/auth/translationKeys/styles.js diff --git a/src/client/src/commons/translationKeys/translationKeys.jsx b/src/client/src/auth/translationKeys/translationKeys.jsx similarity index 97% rename from src/client/src/commons/translationKeys/translationKeys.jsx rename to src/client/src/auth/translationKeys/translationKeys.jsx index 8d11485fa..716e2b5bf 100644 --- a/src/client/src/commons/translationKeys/translationKeys.jsx +++ b/src/client/src/auth/translationKeys/translationKeys.jsx @@ -1,5 +1,5 @@ import { useState, useEffect } from "react"; -import * as Styled from "./styles"; +import * as Styled from "./styles.js"; import { withTranslation } from "react-i18next"; const TranslationKeys = prop => { diff --git a/src/client/src/commons/form/profile/components/profileAttributes/index.js b/src/client/src/commons/form/profile/components/profileAttributes/index.js deleted file mode 100644 index 15a9365ff..000000000 --- a/src/client/src/commons/form/profile/components/profileAttributes/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profileAttributes"; diff --git a/src/client/src/commons/form/profile/components/profileHeader/components/profileHeaderList/index.js b/src/client/src/commons/form/profile/components/profileHeader/components/profileHeaderList/index.js deleted file mode 100644 index 9f0828a79..000000000 --- a/src/client/src/commons/form/profile/components/profileHeader/components/profileHeaderList/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profileHeaderList"; diff --git a/src/client/src/commons/form/profile/components/profileHeader/index.js b/src/client/src/commons/form/profile/components/profileHeader/index.js deleted file mode 100644 index 7414937a4..000000000 --- a/src/client/src/commons/form/profile/components/profileHeader/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profileHeader"; diff --git a/src/client/src/commons/form/profile/components/profileInfo/components/infoCheckBox/index.js b/src/client/src/commons/form/profile/components/profileInfo/components/infoCheckBox/index.js deleted file mode 100644 index 8d4908ebc..000000000 --- a/src/client/src/commons/form/profile/components/profileInfo/components/infoCheckBox/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./infoCheckBox"; diff --git a/src/client/src/commons/form/profile/components/profileInfo/components/infoList/index.js b/src/client/src/commons/form/profile/components/profileInfo/components/infoList/index.js deleted file mode 100644 index 1b9e8ff63..000000000 --- a/src/client/src/commons/form/profile/components/profileInfo/components/infoList/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./InfoList"; diff --git a/src/client/src/commons/form/profile/components/profileInfo/index.js b/src/client/src/commons/form/profile/components/profileInfo/index.js deleted file mode 100644 index 625f61d3b..000000000 --- a/src/client/src/commons/form/profile/components/profileInfo/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profileInfo"; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/index.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/index.js deleted file mode 100644 index 9b5ccc8e1..000000000 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profileLayersError"; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/index.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/index.js deleted file mode 100644 index 79c540c88..000000000 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profileLayersList"; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersValidation/index.js b/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersValidation/index.js deleted file mode 100644 index e8ae02764..000000000 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersValidation/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profileLayersValidation"; diff --git a/src/client/src/commons/form/profile/components/profileLayers/index.js b/src/client/src/commons/form/profile/components/profileLayers/index.js deleted file mode 100644 index 992693dcf..000000000 --- a/src/client/src/commons/form/profile/components/profileLayers/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profileLayers"; diff --git a/src/client/src/commons/form/profile/index.js b/src/client/src/commons/form/profile/index.js deleted file mode 100644 index 3914086b1..000000000 --- a/src/client/src/commons/form/profile/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./profile"; diff --git a/src/client/src/commons/menu/mainView/menuComponents/menuComponentInterfaces.ts b/src/client/src/commons/menu/mainView/menuComponents/menuComponentInterfaces.ts deleted file mode 100644 index c135dc73e..000000000 --- a/src/client/src/commons/menu/mainView/menuComponents/menuComponentInterfaces.ts +++ /dev/null @@ -1,45 +0,0 @@ -import React from "react"; -import { Boreholes, Workgroup } from "../../../../api-lib/ReduxStateInterfaces"; -import { DrawerContentTypes } from "../../../../pages/editor/editorComponentInterfaces"; - -export interface BoreholeNumbersPreviewProps { - boreholes: Boreholes; -} - -export interface ErrorResponse { - detail: string; - errors: object; - message: string; -} - -export interface ImportErrorModalProps { - errorResponse: ErrorResponse | null; - setValidationErrorModal: React.Dispatch>; - validationErrorModal: boolean; -} - -export interface MenuItemsProps { - reset: () => void; -} - -export interface SideDrawerProps { - drawerContent: React.JSX.Element; - drawerOpen: boolean; -} - -export interface BottomBarProps { - toggleBottomDrawer: (open: boolean) => void; - bottomDrawerOpen: boolean; - boreholes: Boreholes; -} - -export interface MainSideNavProps { - toggleDrawer: (open: boolean) => void; - drawerOpen: boolean; - workgroup: number | null; - setWorkgroup: React.Dispatch>; - enabledWorkgroups: Workgroup[]; - setEnabledWorkgroups: React.Dispatch>; - setSideDrawerContent: React.Dispatch>; - sideDrawerContent: DrawerContentTypes; -} diff --git a/src/client/src/commons/search/editor/filterStyles.js b/src/client/src/commons/search/editor/filterStyles.js deleted file mode 100644 index 556fb2871..000000000 --- a/src/client/src/commons/search/editor/filterStyles.js +++ /dev/null @@ -1,44 +0,0 @@ -import styled, { keyframes } from "styled-components"; - -export const Container = styled.div` - display: flex; - flex-direction: column; - flex: 1 1 auto; - overflow: auto; - max-height: 75vh; -`; -export const SearchFilterLabel = styled.div` - font-size: 17px; - font-weight: bold; - margin-bottom: 0.75em; -`; -export const FilterContainer = styled.div` - display: flex; - flex-direction: column; - cursor: pointer; -`; -const ButtonSelected = keyframes` - 0% {background-color:lightslategray; } - 50% {background-color:lightgrey; } - 100% {background-color:#e0e0e0; } -`; - -export const FilterButton = styled.div` - display: flex; - flex-direction: row; - justify-content: space-between; - padding: 7px; - cursor: pointer; - border: 1px solid #e0e0e0; - border-bottom-width: ${props => (props.isLast ? "1px" : "0px")}; - background-color: ${props => props.isSelected && "#e0e0e0"}; - animation-name: ${props => props.isSelected && ButtonSelected}; - animation-duration: 3s; - animation-iteration-count: 1; -`; - -export const FormFilterContainer = styled.div` - padding: 7px; - padding-right: 15px; - border: 1px solid #e0e0e0; -`; diff --git a/src/client/src/commons/translationKeys/index.js b/src/client/src/commons/translationKeys/index.js deleted file mode 100644 index ce6f9d9e1..000000000 --- a/src/client/src/commons/translationKeys/index.js +++ /dev/null @@ -1 +0,0 @@ -export { default } from "./translationKeys"; diff --git a/src/client/src/components/buttons/buttons.tsx b/src/client/src/components/buttons/buttons.tsx index ec8ef874e..7e3e6d2bc 100644 --- a/src/client/src/components/buttons/buttons.tsx +++ b/src/client/src/components/buttons/buttons.tsx @@ -1,5 +1,5 @@ import { forwardRef } from "react"; -import TranslationText from "../../commons/form/translationText"; +import TranslationText from "../legacyComponents/translationText"; import { Button } from "@mui/material"; import AddIcon from "@mui/icons-material/Add"; import EditIcon from "../../assets/icons/edit.svg?react"; diff --git a/src/client/src/components/dataCard/dataCards.jsx b/src/client/src/components/dataCard/dataCards.jsx index e1e4095b9..fc63c7eff 100644 --- a/src/client/src/components/dataCard/dataCards.jsx +++ b/src/client/src/components/dataCard/dataCards.jsx @@ -4,7 +4,7 @@ import { CircularProgress, Typography } from "@mui/material"; import { DataCard, DataCardButtonContainer, DataCardContainer, DataCardItem } from "./dataCard"; import { DataCardContext, DataCardSwitchContext } from "./dataCardContext"; import { AddButton } from "../buttons/buttons.tsx"; -import { FullPage, FullPageCentered } from "../styledComponents"; +import { FullPage, FullPageCentered } from "../styledComponents.js"; const DataCardsContainer = props => { return {props.children()}; diff --git a/src/client/src/components/dataCard/dataDisplayCard.jsx b/src/client/src/components/dataCard/dataDisplayCard.jsx index 53b5a05d9..c465d1774 100644 --- a/src/client/src/components/dataCard/dataDisplayCard.jsx +++ b/src/client/src/components/dataCard/dataDisplayCard.jsx @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"; import { DataCardButtonContainer } from "./dataCard.jsx"; import { DataCardContext, DataCardSwitchContext } from "./dataCardContext"; import { PromptContext } from "../prompt/promptContext.tsx"; -import { StackFullWidth } from "../styledComponents"; +import { StackFullWidth } from "../styledComponents.js"; import { DeleteButton, EditButton } from "../buttons/buttons.tsx"; import TrashIcon from "../../assets/icons/trash.svg?react"; diff --git a/src/client/src/components/dataCard/dataInputCard.jsx b/src/client/src/components/dataCard/dataInputCard.jsx index 670cde8ea..fce3095fc 100644 --- a/src/client/src/components/dataCard/dataInputCard.jsx +++ b/src/client/src/components/dataCard/dataInputCard.jsx @@ -3,7 +3,7 @@ import { useTranslation } from "react-i18next"; import { FormProvider, useForm } from "react-hook-form"; import { DataCardButtonContainer } from "./dataCard.jsx"; import { DataCardContext, DataCardSwitchContext } from "./dataCardContext.jsx"; -import { StackFullWidth } from "../styledComponents"; +import { StackFullWidth } from "../styledComponents.js"; import { CancelButton, SaveButton } from "../buttons/buttons.tsx"; import { PromptContext } from "../prompt/promptContext.tsx"; diff --git a/src/client/src/components/form/formResultTableDisplay.tsx b/src/client/src/components/form/formResultTableDisplay.tsx index 74b1bf616..4545c8c37 100644 --- a/src/client/src/components/form/formResultTableDisplay.tsx +++ b/src/client/src/components/form/formResultTableDisplay.tsx @@ -1,8 +1,8 @@ import React, { ReactNode } from "react"; import { useTranslation } from "react-i18next"; -import { Table, TableHead, TableBody, TableContainer, TableRow, Typography } from "@mui/material"; -import { FieldMeasurementResult } from "../../commons/form/borehole/hydrogeology/FieldMeasurementInterface"; -import { HydrotestResult } from "../../commons/form/borehole/hydrogeology/HydrotestInterface"; +import { Table, TableBody, TableContainer, TableHead, TableRow, Typography } from "@mui/material"; +import { FieldMeasurementResult } from "../../pages/detail/form/hydrogeology/FieldMeasurementInterface.ts"; +import { HydrotestResult } from "../../pages/detail/form/hydrogeology/HydrotestInterface.ts"; interface FormResultTableDisplayProps { title: string; diff --git a/src/client/src/commons/menu/headerComponent.tsx b/src/client/src/components/header/headerComponent.tsx similarity index 86% rename from src/client/src/commons/menu/headerComponent.tsx rename to src/client/src/components/header/headerComponent.tsx index ea2a4c7b0..50925744c 100644 --- a/src/client/src/commons/menu/headerComponent.tsx +++ b/src/client/src/components/header/headerComponent.tsx @@ -1,8 +1,8 @@ import { Box, Stack } from "@mui/material"; -import { theme } from "../../AppTheme"; -import { VersionTag } from "./versionTag"; -import { ProfilePopup } from "./profilePopup"; -import { ReduxRootState, User } from "../../api-lib/ReduxStateInterfaces"; +import { theme } from "../../AppTheme.ts"; +import { VersionTag } from "./versionTag.tsx"; +import { ProfilePopup } from "./profilePopup.tsx"; +import { ReduxRootState, User } from "../../api-lib/ReduxStateInterfaces.ts"; import { useSelector } from "react-redux"; import { LanguagePopup } from "./languagePopup.tsx"; diff --git a/src/client/src/commons/menu/languagePopup.tsx b/src/client/src/components/header/languagePopup.tsx similarity index 100% rename from src/client/src/commons/menu/languagePopup.tsx rename to src/client/src/components/header/languagePopup.tsx diff --git a/src/client/src/commons/menu/profilePopup.tsx b/src/client/src/components/header/profilePopup.tsx similarity index 96% rename from src/client/src/commons/menu/profilePopup.tsx rename to src/client/src/components/header/profilePopup.tsx index e9b7d2364..f93025b07 100644 --- a/src/client/src/commons/menu/profilePopup.tsx +++ b/src/client/src/components/header/profilePopup.tsx @@ -2,7 +2,7 @@ import { useAuth } from "react-oidc-context"; import { Button, IconButton, Popover, Stack, Typography } from "@mui/material"; import { theme } from "../../AppTheme.ts"; import ProfileIcon from "../../assets/icons/profile.svg?react"; -import { UserData } from "../../api-lib/ReduxStateInterfaces"; +import { UserData } from "../../api-lib/ReduxStateInterfaces.ts"; import { MouseEvent, useState } from "react"; export function ProfilePopup({ user }: { user: UserData }) { diff --git a/src/client/src/commons/menu/versionTag.tsx b/src/client/src/components/header/versionTag.tsx similarity index 89% rename from src/client/src/commons/menu/versionTag.tsx rename to src/client/src/components/header/versionTag.tsx index 5ade5e932..7943ef4b1 100644 --- a/src/client/src/commons/menu/versionTag.tsx +++ b/src/client/src/components/header/versionTag.tsx @@ -1,5 +1,5 @@ import { Box, Typography } from "@mui/material"; -import { theme } from "../../AppTheme"; +import { theme } from "../../AppTheme.ts"; const shortenedVersion = import.meta.env.VITE_APP_VERSION.split("+")[0]; diff --git a/src/client/src/commons/form/dateField.css b/src/client/src/components/legacyComponents/dateField.css similarity index 100% rename from src/client/src/commons/form/dateField.css rename to src/client/src/components/legacyComponents/dateField.css diff --git a/src/client/src/commons/form/dateField.jsx b/src/client/src/components/legacyComponents/dateField.jsx similarity index 100% rename from src/client/src/commons/form/dateField.jsx rename to src/client/src/components/legacyComponents/dateField.jsx diff --git a/src/client/src/commons/form/dateText.js b/src/client/src/components/legacyComponents/dateText.js similarity index 100% rename from src/client/src/commons/form/dateText.js rename to src/client/src/components/legacyComponents/dateText.js diff --git a/src/client/src/commons/form/domain/domainInterface.ts b/src/client/src/components/legacyComponents/domain/domainInterface.ts similarity index 100% rename from src/client/src/commons/form/domain/domainInterface.ts rename to src/client/src/components/legacyComponents/domain/domainInterface.ts diff --git a/src/client/src/commons/form/domain/domainText.jsx b/src/client/src/components/legacyComponents/domain/domainText.jsx similarity index 97% rename from src/client/src/commons/form/domain/domainText.jsx rename to src/client/src/components/legacyComponents/domain/domainText.jsx index a2bf47516..cb24e1881 100644 --- a/src/client/src/commons/form/domain/domainText.jsx +++ b/src/client/src/components/legacyComponents/domain/domainText.jsx @@ -3,7 +3,7 @@ import PropTypes from "prop-types"; import { connect } from "react-redux"; import { withTranslation } from "react-i18next"; -import { loadDomains } from "../../../api-lib/index"; +import { loadDomains } from "../../../api-lib/index.js"; class DomainText extends React.Component { componentDidMount() { diff --git a/src/client/src/commons/form/domain/dropdown/domainDropdown.jsx b/src/client/src/components/legacyComponents/domain/dropdown/domainDropdown.jsx similarity index 98% rename from src/client/src/commons/form/domain/dropdown/domainDropdown.jsx rename to src/client/src/components/legacyComponents/domain/dropdown/domainDropdown.jsx index 317e77c72..efa44b5e0 100644 --- a/src/client/src/commons/form/domain/dropdown/domainDropdown.jsx +++ b/src/client/src/components/legacyComponents/domain/dropdown/domainDropdown.jsx @@ -4,10 +4,10 @@ import { connect } from "react-redux"; import { withTranslation } from "react-i18next"; import _ from "lodash"; -import { loadDomains } from "../../../../api-lib/index"; +import { loadDomains } from "../../../../api-lib/index.js"; import { Form, Header } from "semantic-ui-react"; -import TranslationText from "../../translationText"; +import TranslationText from "../../translationText.jsx"; class DomainDropdown extends React.Component { constructor(props) { diff --git a/src/client/src/commons/form/domain/tree/domainTree.jsx b/src/client/src/components/legacyComponents/domain/tree/domainTree.jsx similarity index 99% rename from src/client/src/commons/form/domain/tree/domainTree.jsx rename to src/client/src/components/legacyComponents/domain/tree/domainTree.jsx index 133c32e90..01bb50345 100644 --- a/src/client/src/commons/form/domain/tree/domainTree.jsx +++ b/src/client/src/components/legacyComponents/domain/tree/domainTree.jsx @@ -3,10 +3,10 @@ import PropTypes from "prop-types"; import { connect } from "react-redux"; import { withTranslation } from "react-i18next"; import _ from "lodash"; -import { loadDomains } from "../../../../api-lib/index"; +import { loadDomains } from "../../../../api-lib/index.js"; import { Dropdown, Form, Header, Icon, Input, List, Modal } from "semantic-ui-react"; -import TranslationText from "../../translationText"; -import DomainText from "../domainText"; +import TranslationText from "../../translationText.jsx"; +import DomainText from "../domainText.jsx"; class DomainTree extends React.Component { constructor(props) { diff --git a/src/client/src/commons/form/formUtils.ts b/src/client/src/components/legacyComponents/formUtils.ts similarity index 100% rename from src/client/src/commons/form/formUtils.ts rename to src/client/src/components/legacyComponents/formUtils.ts diff --git a/src/client/src/commons/menu/components/listItem/index.js b/src/client/src/components/legacyComponents/listItem/index.js similarity index 100% rename from src/client/src/commons/menu/components/listItem/index.js rename to src/client/src/components/legacyComponents/listItem/index.js diff --git a/src/client/src/commons/menu/components/listItem/listItem.jsx b/src/client/src/components/legacyComponents/listItem/listItem.jsx similarity index 100% rename from src/client/src/commons/menu/components/listItem/listItem.jsx rename to src/client/src/components/legacyComponents/listItem/listItem.jsx diff --git a/src/client/src/commons/menu/components/listItem/styles.js b/src/client/src/components/legacyComponents/listItem/styles.js similarity index 100% rename from src/client/src/commons/menu/components/listItem/styles.js rename to src/client/src/components/legacyComponents/listItem/styles.js diff --git a/src/client/src/commons/form/multiple/multipleForm.jsx b/src/client/src/components/legacyComponents/multiple/multipleForm.jsx similarity index 97% rename from src/client/src/commons/form/multiple/multipleForm.jsx rename to src/client/src/components/legacyComponents/multiple/multipleForm.jsx index 1e170c949..1d5bbea38 100644 --- a/src/client/src/commons/form/multiple/multipleForm.jsx +++ b/src/client/src/components/legacyComponents/multiple/multipleForm.jsx @@ -5,15 +5,15 @@ import { withTranslation } from "react-i18next"; import _ from "lodash"; import { produce } from "immer"; -import DomainDropdown from "../domain/dropdown/domainDropdown"; -import DomainTree from "../domain/tree/domainTree"; -import DateField from "../dateField"; -import TranslationText from "../translationText"; +import DomainDropdown from "../domain/dropdown/domainDropdown.jsx"; +import DomainTree from "../domain/tree/domainTree.jsx"; +import DateField from "../dateField.jsx"; +import TranslationText from "../translationText.jsx"; import { Button, Form, Header, Input } from "semantic-ui-react"; import { FormControl, FormControlLabel, Radio, RadioGroup } from "@mui/material"; -import { patchBoreholes } from "../../../api-lib/index"; +import { patchBoreholes } from "../../../api-lib/index.js"; class MultipleForm extends React.Component { constructor(props) { diff --git a/src/client/src/commons/form/translationText.jsx b/src/client/src/components/legacyComponents/translationText.jsx similarity index 100% rename from src/client/src/commons/form/translationText.jsx rename to src/client/src/components/legacyComponents/translationText.jsx diff --git a/src/client/src/commons/map/mapComponent.jsx b/src/client/src/components/map/mapComponent.jsx similarity index 97% rename from src/client/src/commons/map/mapComponent.jsx rename to src/client/src/components/map/mapComponent.jsx index aebc1c106..cf6629e8d 100644 --- a/src/client/src/commons/map/mapComponent.jsx +++ b/src/client/src/components/map/mapComponent.jsx @@ -18,16 +18,16 @@ import { createEmpty, extend } from "ol/extent"; import { get as getProjection } from "ol/proj"; import { register } from "ol/proj/proj4"; import proj4 from "proj4"; -import { getGeojson } from "../../api-lib/index"; +import { getGeojson } from "../../api-lib"; import { Box } from "@mui/material"; -import ZoomControls from "./zoomControls"; -import NamePopup from "./namePopup"; -import { BasemapSelector } from "../../components/basemapSelector/basemapSelector"; -import { swissExtent, updateBasemap } from "../../components/basemapSelector/basemaps"; -import { BasemapContext } from "../../components/basemapSelector/basemapContext"; -import { clusterStyleFunction, drawStyle, styleFunction } from "./mapStyleFunctions"; -import { projections } from "./mapProjections"; -import { theme } from "../../AppTheme"; +import ZoomControls from "./zoomControls.jsx"; +import NamePopup from "./namePopup.jsx"; +import { BasemapSelector } from "../basemapSelector/basemapSelector.tsx"; +import { swissExtent, updateBasemap } from "../basemapSelector/basemaps.ts"; +import { BasemapContext } from "../basemapSelector/basemapContext.tsx"; +import { clusterStyleFunction, drawStyle, styleFunction } from "./mapStyleFunctions.js"; +import { projections } from "./mapProjections.js"; +import { theme } from "../../AppTheme.ts"; import Draw from "ol/interaction/Draw.js"; import { withTranslation } from "react-i18next"; diff --git a/src/client/src/commons/map/mapProjections.js b/src/client/src/components/map/mapProjections.js similarity index 100% rename from src/client/src/commons/map/mapProjections.js rename to src/client/src/components/map/mapProjections.js diff --git a/src/client/src/commons/map/mapState.js b/src/client/src/components/map/mapState.js similarity index 100% rename from src/client/src/commons/map/mapState.js rename to src/client/src/components/map/mapState.js diff --git a/src/client/src/commons/map/mapStyleFunctions.js b/src/client/src/components/map/mapStyleFunctions.js similarity index 100% rename from src/client/src/commons/map/mapStyleFunctions.js rename to src/client/src/components/map/mapStyleFunctions.js diff --git a/src/client/src/commons/map/namePopup.jsx b/src/client/src/components/map/namePopup.jsx similarity index 100% rename from src/client/src/commons/map/namePopup.jsx rename to src/client/src/components/map/namePopup.jsx diff --git a/src/client/src/commons/map/pointComponent.jsx b/src/client/src/components/map/pointComponent.jsx similarity index 95% rename from src/client/src/commons/map/pointComponent.jsx rename to src/client/src/components/map/pointComponent.jsx index 57fc9f09c..f91144c86 100644 --- a/src/client/src/commons/map/pointComponent.jsx +++ b/src/client/src/components/map/pointComponent.jsx @@ -14,14 +14,14 @@ import { register } from "ol/proj/proj4"; import proj4 from "proj4"; import { Button, Icon, Label, Segment } from "semantic-ui-react"; import { Box } from "@mui/material"; -import { getHeight } from "../../api-lib/index"; -import { fetchApiV2 } from "../../api/fetchApiV2"; -import ZoomControls from "./zoomControls"; -import { BasemapSelector } from "../../components/basemapSelector/basemapSelector"; -import { attributions, crossOrigin, swissExtent, updateBasemap } from "../../components/basemapSelector/basemaps"; -import { BasemapContext } from "../../components/basemapSelector/basemapContext"; -import { projections } from "../../commons/map/mapProjections"; -import { detailMapStyleFunction } from "../../commons/map/mapStyleFunctions"; +import { getHeight } from "../../api-lib"; +import { fetchApiV2 } from "../../api/fetchApiV2.js"; +import ZoomControls from "./zoomControls.jsx"; +import { BasemapSelector } from "../basemapSelector/basemapSelector.tsx"; +import { attributions, crossOrigin, swissExtent, updateBasemap } from "../basemapSelector/basemaps.ts"; +import { BasemapContext } from "../basemapSelector/basemapContext.tsx"; +import { projections } from "./mapProjections.js"; +import { detailMapStyleFunction } from "./mapStyleFunctions.js"; import TileLayer from "ol/layer/Tile.js"; import XYZ from "ol/source/XYZ.js"; diff --git a/src/client/src/commons/map/zoomControls.jsx b/src/client/src/components/map/zoomControls.jsx similarity index 93% rename from src/client/src/commons/map/zoomControls.jsx rename to src/client/src/components/map/zoomControls.jsx index fe04c3028..7447e8d13 100644 --- a/src/client/src/commons/map/zoomControls.jsx +++ b/src/client/src/components/map/zoomControls.jsx @@ -1,9 +1,9 @@ -import { Button, Box } from "@mui/material"; +import { Box, Button } from "@mui/material"; import Add from "@mui/icons-material/Add"; import Remove from "@mui/icons-material/Remove"; import TripOriginIcon from "@mui/icons-material/TripOrigin"; import styled from "@mui/material/styles/styled"; -import { theme } from "../../AppTheme"; +import { theme } from "../../AppTheme.ts"; const ZoomControls = ({ onZoomIn, onZoomOut, onFitToExtent }) => { const NoMarginButton = styled(Button)({ diff --git a/src/client/src/components/styledComponents.js b/src/client/src/components/styledComponents.js index 83c8a14d2..d24018b6e 100644 --- a/src/client/src/components/styledComponents.js +++ b/src/client/src/components/styledComponents.js @@ -1,5 +1,6 @@ -import { Stack, Typography } from "@mui/material"; +import { Box, Stack, Typography } from "@mui/material"; import { styled } from "@mui/system"; +import { theme } from "../AppTheme"; export const FullPage = styled(Stack)({ flex: "1 0 0", @@ -22,3 +23,19 @@ export const StackHalfWidth = styled(Stack)(() => ({ export const TypographyWithBottomMargin = styled(Typography)(() => ({ marginBottom: "1em", })); + +export const LayoutBox = styled(Box)({ flex: "1 1 100%", display: "flex", flexDirection: "row", overflow: "hidden" }); + +export const SidebarBox = styled(Box)(() => ({ + flexShrink: 0, + borderRight: "1px solid " + theme.palette.boxShadow, + position: "relative", +})); + +export const MainContentBox = styled(Box)({ + flex: "1 1 0%", + display: "flex", + flexDirection: "column", + overflow: "hidden", + position: "relative", +}); diff --git a/src/client/src/index.jsx b/src/client/src/index.jsx index 040da1acb..e2ca26da4 100644 --- a/src/client/src/index.jsx +++ b/src/client/src/index.jsx @@ -6,7 +6,7 @@ import i18n from "./i18n"; import "./index.css"; import "ol/ol.css"; import App from "./App"; -import { BdmsAuthProvider } from "./commons/auth/BdmsAuthProvider.jsx"; +import { BdmsAuthProvider } from "./auth/BdmsAuthProvider.jsx"; import "semantic-ui-css/semantic.css"; diff --git a/src/client/src/commons/files/downloadlink.jsx b/src/client/src/pages/detail/attachments/downloadlink.jsx similarity index 100% rename from src/client/src/commons/files/downloadlink.jsx rename to src/client/src/pages/detail/attachments/downloadlink.jsx diff --git a/src/client/src/commons/files/fileDropzone.jsx b/src/client/src/pages/detail/attachments/fileDropzone.jsx similarity index 99% rename from src/client/src/commons/files/fileDropzone.jsx rename to src/client/src/pages/detail/attachments/fileDropzone.jsx index c14baa217..fe93bdd68 100644 --- a/src/client/src/commons/files/fileDropzone.jsx +++ b/src/client/src/pages/detail/attachments/fileDropzone.jsx @@ -2,7 +2,7 @@ import { useCallback, useEffect, useState } from "react"; import { useDropzone } from "react-dropzone"; import { useTranslation } from "react-i18next"; import { Box, Chip } from "@mui/material"; -import { theme } from "../../AppTheme"; +import { theme } from "../../../AppTheme.ts"; /** * A component that provides a file dropzone for selecting and uploading files. diff --git a/src/client/src/commons/files/fileInterfaces.ts b/src/client/src/pages/detail/attachments/fileInterfaces.ts similarity index 81% rename from src/client/src/commons/files/fileInterfaces.ts rename to src/client/src/pages/detail/attachments/fileInterfaces.ts index 60718d931..bc365b9a3 100644 --- a/src/client/src/commons/files/fileInterfaces.ts +++ b/src/client/src/pages/detail/attachments/fileInterfaces.ts @@ -1,4 +1,4 @@ -import { Borehole } from "../../api-lib/ReduxStateInterfaces.ts"; +import { Borehole } from "../../../api-lib/ReduxStateInterfaces.ts"; export interface File { id: number; diff --git a/src/client/src/commons/files/table/editorBoreholeFilesTable.tsx b/src/client/src/pages/detail/attachments/table/editorBoreholeFilesTable.tsx similarity index 97% rename from src/client/src/commons/files/table/editorBoreholeFilesTable.tsx rename to src/client/src/pages/detail/attachments/table/editorBoreholeFilesTable.tsx index d299081ac..3c81dc3c8 100644 --- a/src/client/src/commons/files/table/editorBoreholeFilesTable.tsx +++ b/src/client/src/pages/detail/attachments/table/editorBoreholeFilesTable.tsx @@ -5,12 +5,12 @@ import { getBoreholeAttachments, updateBoreholeAttachment, uploadBoreholeAttachment, -} from "../../../api/fetchApiV2"; +} from "../../../../api/fetchApiV2"; import FilesTableComponent from "./filesTableComponent"; import { Box, Button, Input } from "@mui/material"; import UploadFileIcon from "@mui/icons-material/UploadFile"; -import { AlertContext } from "../../../components/alert/alertContext"; +import { AlertContext } from "../../../../components/alert/alertContext.tsx"; import { FileResponse } from "../fileInterfaces.ts"; import { useTranslation } from "react-i18next"; diff --git a/src/client/src/commons/files/table/filesTableComponent.jsx b/src/client/src/pages/detail/attachments/table/filesTableComponent.jsx similarity index 93% rename from src/client/src/commons/files/table/filesTableComponent.jsx rename to src/client/src/pages/detail/attachments/table/filesTableComponent.jsx index 0b79d216f..d03ca1f3e 100644 --- a/src/client/src/commons/files/table/filesTableComponent.jsx +++ b/src/client/src/pages/detail/attachments/table/filesTableComponent.jsx @@ -1,10 +1,10 @@ import PropTypes from "prop-types"; import { withTranslation } from "react-i18next"; import { Button, Checkbox, Icon, Table, TextArea } from "semantic-ui-react"; -import DateText from "../../form/dateText"; -import DownloadLink from "../downloadlink"; -import TranslationText from "../../form/translationText"; -import { downloadBoreholeAttachment } from "../../../api/fetchApiV2"; +import DateText from "../../../../components/legacyComponents/dateText.js"; +import DownloadLink from "../downloadlink.jsx"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; +import { downloadBoreholeAttachment } from "../../../../api/fetchApiV2.js"; const FilesTableComponent = props => { return ( diff --git a/src/client/src/commons/menu/detailView/detailHeader.tsx b/src/client/src/pages/detail/detailHeader.tsx similarity index 89% rename from src/client/src/commons/menu/detailView/detailHeader.tsx rename to src/client/src/pages/detail/detailHeader.tsx index 64579ffa1..d9964754f 100644 --- a/src/client/src/commons/menu/detailView/detailHeader.tsx +++ b/src/client/src/pages/detail/detailHeader.tsx @@ -1,16 +1,16 @@ import { useContext, useEffect, useState } from "react"; import { Chip, IconButton, Stack, Typography } from "@mui/material"; -import { theme } from "../../../AppTheme"; -import ArrowLeftIcon from "../../../assets/icons/arrow_left.svg?react"; -import CheckmarkIcon from "../../../assets/icons/checkmark.svg?react"; -import TrashIcon from "../../../assets/icons/trash.svg?react"; +import { theme } from "../../AppTheme.ts"; +import ArrowLeftIcon from "../../assets/icons/arrow_left.svg?react"; +import CheckmarkIcon from "../../assets/icons/checkmark.svg?react"; +import TrashIcon from "../../assets/icons/trash.svg?react"; import { useHistory, useLocation } from "react-router-dom"; -import { DeleteButton, EditButton, EndEditButton } from "../../../components/buttons/buttons"; +import { DeleteButton, EditButton, EndEditButton } from "../../components/buttons/buttons.tsx"; import { useDispatch, useSelector } from "react-redux"; -import { Borehole, ReduxRootState } from "../../../api-lib/ReduxStateInterfaces"; -import { deleteBorehole, lockBorehole, unlockBorehole } from "../../../api-lib"; +import { Borehole, ReduxRootState } from "../../api-lib/ReduxStateInterfaces.ts"; +import { deleteBorehole, lockBorehole, unlockBorehole } from "../../api-lib"; import { useTranslation } from "react-i18next"; -import { PromptContext } from "../../../components/prompt/promptContext"; +import { PromptContext } from "../../components/prompt/promptContext.tsx"; const DetailHeader = () => { const [editingEnabled, setEditingEnabled] = useState(false); diff --git a/src/client/src/pages/detail/detailPage.tsx b/src/client/src/pages/detail/detailPage.tsx new file mode 100644 index 000000000..dd67926cf --- /dev/null +++ b/src/client/src/pages/detail/detailPage.tsx @@ -0,0 +1,21 @@ +import { LayoutBox, MainContentBox, SidebarBox } from "../../components/styledComponents.js"; +import { FC } from "react"; +import DetailSideNav from "./detailSideNav"; +import BoreholeForm from "./form/borehole/boreholeForm"; +import DetailHeader from "./detailHeader.tsx"; + +export const DetailPage: FC = () => { + return ( + <> + + + + + + + + + + + ); +}; diff --git a/src/client/src/commons/menu/detailView/detailSideNav.jsx b/src/client/src/pages/detail/detailSideNav.jsx similarity index 98% rename from src/client/src/commons/menu/detailView/detailSideNav.jsx rename to src/client/src/pages/detail/detailSideNav.jsx index 660731743..e3f6b5a42 100644 --- a/src/client/src/commons/menu/detailView/detailSideNav.jsx +++ b/src/client/src/pages/detail/detailSideNav.jsx @@ -6,8 +6,8 @@ import { List } from "semantic-ui-react"; import ListItem from "@mui/material/ListItem"; import Box from "@mui/material/Box"; import { styled } from "@mui/material/styles"; -import TranslationText from "../../form/translationText.jsx"; -import { theme } from "../../../AppTheme.ts"; +import TranslationText from "../../components/legacyComponents/translationText.jsx"; +import { theme } from "../../AppTheme.ts"; import { Typography } from "@mui/material"; /** diff --git a/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.jsx b/src/client/src/pages/detail/form/borehole/boreholeDetailSegment.jsx similarity index 95% rename from src/client/src/commons/form/borehole/segments/boreholeDetailSegment.jsx rename to src/client/src/pages/detail/form/borehole/boreholeDetailSegment.jsx index 5cd602352..f347aba37 100644 --- a/src/client/src/commons/form/borehole/segments/boreholeDetailSegment.jsx +++ b/src/client/src/pages/detail/form/borehole/boreholeDetailSegment.jsx @@ -1,14 +1,14 @@ import _ from "lodash"; -import DomainDropdown from "../../domain/dropdown/domainDropdown"; -import DomainTree from "../../domain/tree/domainTree"; -import TranslationText from "../../translationText"; +import DomainDropdown from "../../../../components/legacyComponents/domain/dropdown/domainDropdown.jsx"; +import DomainTree from "../../../../components/legacyComponents/domain/tree/domainTree.jsx"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; import { NumericFormat } from "react-number-format"; import { Form, Segment } from "semantic-ui-react"; import { FormControl, FormControlLabel, RadioGroup } from "@mui/material"; -import { parseIfString } from "../../formUtils.ts"; -import { DisabledRadio } from "./styledComponents"; -import { getBoreholeGeometryDepthTVD } from "../../../../api/fetchApiV2"; +import { parseIfString } from "../../../../components/legacyComponents/formUtils.ts"; +import { DisabledRadio } from "../styledComponents.jsx"; +import { getBoreholeGeometryDepthTVD } from "../../../../api/fetchApiV2.js"; import { useCallback, useEffect, useState } from "react"; const BoreholeDetailSegment = props => { diff --git a/src/client/src/commons/form/borehole/boreholeForm.jsx b/src/client/src/pages/detail/form/borehole/boreholeForm.jsx similarity index 91% rename from src/client/src/commons/form/borehole/boreholeForm.jsx rename to src/client/src/pages/detail/form/borehole/boreholeForm.jsx index 61e71b926..c9e4ed9da 100644 --- a/src/client/src/commons/form/borehole/boreholeForm.jsx +++ b/src/client/src/pages/detail/form/borehole/boreholeForm.jsx @@ -4,26 +4,26 @@ import { connect } from "react-redux"; import { withTranslation } from "react-i18next"; import _ from "lodash"; import { Redirect, Route, Switch, withRouter } from "react-router-dom"; -import { loadBorehole, patchBorehole, updateBorehole } from "../../../api-lib/index"; -import EditorBoreholeFilesTable from "../../files/table/editorBoreholeFilesTable.tsx"; -import TranslationText from "../translationText"; +import { loadBorehole, patchBorehole, updateBorehole } from "../../../../api-lib"; +import EditorBoreholeFilesTable from "../../attachments/table/editorBoreholeFilesTable.tsx"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; import { Dimmer, Loader } from "semantic-ui-react"; -import Profile from "../profile"; -import IdentifierSegment from "./segments/indentifierSegment"; -import NameSegment from "./segments/nameSegment"; -import RestrictionSegment from "./segments/restrictionSegment"; -import BoreholePanel from "./borehole/boreholePanel"; -import LocationSegment from "./segments/locationSegment"; -import WaterIngress from "./hydrogeology/waterIngress"; -import GroundwaterLevelMeasurement from "./hydrogeology/groundwaterLevelMeasurement"; -import Hydrotest from "./hydrogeology/hydrotest"; -import { AlertContext } from "../../../components/alert/alertContext"; -import FieldMeasurement from "./hydrogeology/fieldMeasurement"; -import ChronostratigraphyPanel from "./stratigraphy/chronostratigraphyPanel"; -import LithostratigraphyPanel from "./stratigraphy/lithostratigraphyPanel"; -import Completion from "./completion/completion"; +import Lithology from "../stratigraphy/lithology"; +import IdentifierSegment from "../location/indentifierSegment.jsx"; +import NameSegment from "../location/nameSegment.jsx"; +import RestrictionSegment from "../location/restrictionSegment.jsx"; +import BoreholePanel from "./boreholePanel.jsx"; +import LocationSegment from "../location/locationSegment.jsx"; +import WaterIngress from "../hydrogeology/waterIngress.jsx"; +import GroundwaterLevelMeasurement from "../hydrogeology/groundwaterLevelMeasurement.jsx"; +import Hydrotest from "../hydrogeology/hydrotest.jsx"; +import FieldMeasurement from "../hydrogeology/fieldMeasurement.jsx"; +import ChronostratigraphyPanel from "../stratigraphy/chronostratigraphy/chronostratigraphyPanel.jsx"; +import LithostratigraphyPanel from "../stratigraphy/lithostratigraphy/lithostratigraphyPanel.jsx"; +import Completion from "../completion/completion.jsx"; import { Box } from "@mui/material"; import WorkflowForm from "../workflow/workflowForm.jsx"; +import { AlertContext } from "../../../../components/alert/alertContext"; class BoreholeForm extends React.Component { static contextType = AlertContext; @@ -338,7 +338,7 @@ class BoreholeForm extends React.Component { } + render={() => } /> { diff --git a/src/client/src/commons/form/borehole/borehole/boreholePanel.jsx b/src/client/src/pages/detail/form/borehole/boreholePanel.jsx similarity index 91% rename from src/client/src/commons/form/borehole/borehole/boreholePanel.jsx rename to src/client/src/pages/detail/form/borehole/boreholePanel.jsx index e785f59ce..3f4ca26ff 100644 --- a/src/client/src/commons/form/borehole/borehole/boreholePanel.jsx +++ b/src/client/src/pages/detail/form/borehole/boreholePanel.jsx @@ -1,10 +1,10 @@ -import BoreholeGeneralSegment from "../segments/boreholeGeneralSegment"; -import BoreholeDetailSegment from "../segments/boreholeDetailSegment"; +import BoreholeGeneralSegment from "./boreholeGeneralSegment.jsx"; +import BoreholeDetailSegment from "./boreholeDetailSegment.jsx"; import { useTranslation } from "react-i18next"; import { useEffect, useState } from "react"; -import Sections from "./sections"; -import Geometry from "./geometry"; -import { BdmsTab, BdmsTabContentBox, BdmsTabs } from "../../../../components/styledTabComponents"; +import Sections from "./sections.jsx"; +import Geometry from "./geometry.jsx"; +import { BdmsTab, BdmsTabContentBox, BdmsTabs } from "../../../../components/styledTabComponents.jsx"; import { useHistory, useLocation } from "react-router-dom"; const BoreholePanel = ({ size, boreholeId, borehole, updateChange, updateNumber, isEditable }) => { diff --git a/src/client/src/commons/form/borehole/borehole/geometry.jsx b/src/client/src/pages/detail/form/borehole/geometry.jsx similarity index 93% rename from src/client/src/commons/form/borehole/borehole/geometry.jsx rename to src/client/src/pages/detail/form/borehole/geometry.jsx index 0a9e0fc8e..f4f724c24 100644 --- a/src/client/src/commons/form/borehole/borehole/geometry.jsx +++ b/src/client/src/pages/detail/form/borehole/geometry.jsx @@ -1,11 +1,11 @@ import { useTranslation } from "react-i18next"; -import GeometryImport from "./geometryImport"; -import GeometryTable from "./geometryTable"; -import GeometryChartNE from "./geometryChartNE"; -import { GeometryChartZE, GeometryChartZInteractive, GeometryChartZN } from "./geometryChartZ"; +import GeometryImport from "./geometryImport.jsx"; +import GeometryTable from "./geometryTable.jsx"; +import GeometryChartNE from "./geometryChartNE.jsx"; +import { GeometryChartZE, GeometryChartZInteractive, GeometryChartZN } from "./geometryChartZ.jsx"; import { Card, CardActions, CardContent, CircularProgress, Grid, Typography } from "@mui/material/"; -import { FullPageCentered } from "../../../../components/styledComponents"; -import { useBoreholeGeometry, useBoreholeGeometryMutations } from "../../../../api/fetchApiV2"; +import { FullPageCentered } from "../../../../components/styledComponents.js"; +import { useBoreholeGeometry, useBoreholeGeometryMutations } from "../../../../api/fetchApiV2.js"; import { DeleteButton } from "../../../../components/buttons/buttons.tsx"; /** diff --git a/src/client/src/commons/form/borehole/borehole/geometryChartNE.jsx b/src/client/src/pages/detail/form/borehole/geometryChartNE.jsx similarity index 100% rename from src/client/src/commons/form/borehole/borehole/geometryChartNE.jsx rename to src/client/src/pages/detail/form/borehole/geometryChartNE.jsx diff --git a/src/client/src/commons/form/borehole/borehole/geometryChartZ.jsx b/src/client/src/pages/detail/form/borehole/geometryChartZ.jsx similarity index 100% rename from src/client/src/commons/form/borehole/borehole/geometryChartZ.jsx rename to src/client/src/pages/detail/form/borehole/geometryChartZ.jsx diff --git a/src/client/src/commons/form/borehole/borehole/geometryImport.jsx b/src/client/src/pages/detail/form/borehole/geometryImport.jsx similarity index 96% rename from src/client/src/commons/form/borehole/borehole/geometryImport.jsx rename to src/client/src/pages/detail/form/borehole/geometryImport.jsx index 07300ef4f..af46ec1bd 100644 --- a/src/client/src/commons/form/borehole/borehole/geometryImport.jsx +++ b/src/client/src/pages/detail/form/borehole/geometryImport.jsx @@ -1,6 +1,6 @@ import { useTranslation } from "react-i18next"; import { useContext, useEffect, useState } from "react"; -import { FileDropzone } from "../../../files/fileDropzone.jsx"; +import { FileDropzone } from "../../attachments/fileDropzone.jsx"; import { AddButton } from "../../../../components/buttons/buttons.tsx"; import { Card, @@ -18,11 +18,11 @@ import { getBoreholeGeometryFormats, useBoreholeGeometry, useBoreholeGeometryMutations, -} from "../../../../api/fetchApiV2"; +} from "../../../../api/fetchApiV2.js"; import { Controller, FormProvider, useForm, useWatch } from "react-hook-form"; -import { FormSelect } from "../../../../components/form/form"; +import { FormSelect } from "../../../../components/form/form.js"; import ContentCopyIcon from "@mui/icons-material/ContentCopy"; -import { AlertContext } from "../../../../components/alert/alertContext"; +import { AlertContext } from "../../../../components/alert/alertContext.tsx"; import { StackHalfWidth } from "../../../../components/styledComponents.js"; import { DevTool } from "../../../../../hookformDevtools.ts"; diff --git a/src/client/src/commons/form/borehole/borehole/geometryTable.jsx b/src/client/src/pages/detail/form/borehole/geometryTable.jsx similarity index 99% rename from src/client/src/commons/form/borehole/borehole/geometryTable.jsx rename to src/client/src/pages/detail/form/borehole/geometryTable.jsx index 6d062bcb1..b8c5c470f 100644 --- a/src/client/src/commons/form/borehole/borehole/geometryTable.jsx +++ b/src/client/src/pages/detail/form/borehole/geometryTable.jsx @@ -9,7 +9,7 @@ import { TableRow, Typography, } from "@mui/material/"; -import { FullPageCentered } from "../../../../components/styledComponents"; +import { FullPageCentered } from "../../../../components/styledComponents.js"; const GeometryTable = ({ data }) => { const { t } = useTranslation(); diff --git a/src/client/src/commons/form/borehole/borehole/sectionDisplay.jsx b/src/client/src/pages/detail/form/borehole/sectionDisplay.jsx similarity index 98% rename from src/client/src/commons/form/borehole/borehole/sectionDisplay.jsx rename to src/client/src/pages/detail/form/borehole/sectionDisplay.jsx index 63b81a4b3..7328a7d18 100644 --- a/src/client/src/commons/form/borehole/borehole/sectionDisplay.jsx +++ b/src/client/src/pages/detail/form/borehole/sectionDisplay.jsx @@ -1,7 +1,7 @@ -import { StackFullWidth } from "../../../../components/styledComponents"; -import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; -import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard"; -import { deleteSection, useDomains } from "../../../../api/fetchApiV2"; +import { StackFullWidth } from "../../../../components/styledComponents.js"; +import { FormDisplay, FormDisplayType } from "../../../../components/form/form.js"; +import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard.jsx"; +import { deleteSection, useDomains } from "../../../../api/fetchApiV2.js"; import { Divider } from "@mui/material"; const SectionDisplay = ({ item, isEditable }) => { diff --git a/src/client/src/commons/form/borehole/borehole/sectionInput.jsx b/src/client/src/pages/detail/form/borehole/sectionInput.jsx similarity index 99% rename from src/client/src/commons/form/borehole/borehole/sectionInput.jsx rename to src/client/src/pages/detail/form/borehole/sectionInput.jsx index 91c04bedc..30cfa70d6 100644 --- a/src/client/src/commons/form/borehole/borehole/sectionInput.jsx +++ b/src/client/src/pages/detail/form/borehole/sectionInput.jsx @@ -1,13 +1,13 @@ import { useTranslation } from "react-i18next"; import { Checkbox, Divider, FormControlLabel, IconButton } from "@mui/material"; -import { StackFullWidth } from "../../../../components/styledComponents"; -import { FormDisplayType, FormInput, FormSelect } from "../../../../components/form/form"; -import { addSection, updateSection, useDomains } from "../../../../api/fetchApiV2"; +import { StackFullWidth } from "../../../../components/styledComponents.js"; +import { FormDisplayType, FormInput, FormSelect } from "../../../../components/form/form.js"; +import { addSection, updateSection, useDomains } from "../../../../api/fetchApiV2.js"; import { useContext, useEffect } from "react"; import { FormProvider, useFieldArray, useForm } from "react-hook-form"; -import { DataCardButtonContainer } from "../../../../components/dataCard/dataCard"; +import { DataCardButtonContainer } from "../../../../components/dataCard/dataCard.jsx"; import { AddButton, CancelButton, SaveButton } from "../../../../components/buttons/buttons.tsx"; -import { DataCardContext } from "../../../../components/dataCard/dataCardContext"; +import { DataCardContext } from "../../../../components/dataCard/dataCardContext.jsx"; import Delete from "@mui/icons-material/Delete"; import { DevTool } from "../../../../../hookformDevtools.ts"; diff --git a/src/client/src/commons/form/borehole/borehole/sections.jsx b/src/client/src/pages/detail/form/borehole/sections.jsx similarity index 85% rename from src/client/src/commons/form/borehole/borehole/sections.jsx rename to src/client/src/pages/detail/form/borehole/sections.jsx index dff6479da..3b012ec2a 100644 --- a/src/client/src/commons/form/borehole/borehole/sections.jsx +++ b/src/client/src/pages/detail/form/borehole/sections.jsx @@ -1,7 +1,7 @@ -import { getSectionsByBoreholeId } from "../../../../api/fetchApiV2"; -import DataCards from "../../../../components/dataCard/dataCards"; -import SectionDisplay from "./sectionDisplay"; -import SectionInput from "./sectionInput"; +import { getSectionsByBoreholeId } from "../../../../api/fetchApiV2.js"; +import DataCards from "../../../../components/dataCard/dataCards.jsx"; +import SectionDisplay from "./sectionDisplay.jsx"; +import SectionInput from "./sectionInput.jsx"; const Sections = ({ isEditable, boreholeId }) => { return ( diff --git a/src/client/src/commons/form/borehole/completion/backfill.jsx b/src/client/src/pages/detail/form/completion/backfill.jsx similarity index 78% rename from src/client/src/commons/form/borehole/completion/backfill.jsx rename to src/client/src/pages/detail/form/completion/backfill.jsx index b5250952b..1fa82d4f1 100644 --- a/src/client/src/commons/form/borehole/completion/backfill.jsx +++ b/src/client/src/pages/detail/form/completion/backfill.jsx @@ -1,8 +1,8 @@ -import { getBackfills } from "../../../../api/fetchApiV2"; -import DataCards from "../../../../components/dataCard/dataCards"; -import BackfillInput from "./backfillInput"; -import BackfillDisplay from "./backfillDisplay"; -import { sortByDepth } from "../../../sorter.jsx"; +import { getBackfills } from "../../../../api/fetchApiV2.js"; +import DataCards from "../../../../components/dataCard/dataCards.jsx"; +import BackfillInput from "./backfillInput.jsx"; +import BackfillDisplay from "./backfillDisplay.jsx"; +import { sortByDepth } from "../sorter.jsx"; const Backfill = ({ isEditable, completionId }) => { return ( diff --git a/src/client/src/commons/form/borehole/completion/backfillDisplay.jsx b/src/client/src/pages/detail/form/completion/backfillDisplay.jsx similarity index 94% rename from src/client/src/commons/form/borehole/completion/backfillDisplay.jsx rename to src/client/src/pages/detail/form/completion/backfillDisplay.jsx index 38dcc8360..81f975728 100644 --- a/src/client/src/commons/form/borehole/completion/backfillDisplay.jsx +++ b/src/client/src/pages/detail/form/completion/backfillDisplay.jsx @@ -1,6 +1,6 @@ -import { StackFullWidth, StackHalfWidth } from "../../../../components/styledComponents"; -import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; -import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard"; +import { StackFullWidth, StackHalfWidth } from "../../../../components/styledComponents.js"; +import { FormDisplay, FormDisplayType } from "../../../../components/form/form.js"; +import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard.jsx"; import { useGetCasingName } from "./casingUtils"; import { deleteBackfill } from "../../../../api/fetchApiV2"; diff --git a/src/client/src/commons/form/borehole/completion/backfillInput.jsx b/src/client/src/pages/detail/form/completion/backfillInput.jsx similarity index 99% rename from src/client/src/commons/form/borehole/completion/backfillInput.jsx rename to src/client/src/pages/detail/form/completion/backfillInput.jsx index 2d00ed9a4..8e5f06d21 100644 --- a/src/client/src/commons/form/borehole/completion/backfillInput.jsx +++ b/src/client/src/pages/detail/form/completion/backfillInput.jsx @@ -4,7 +4,7 @@ import { addBackfill, getCasings, updateBackfill, useDomains } from "../../../.. import { completionSchemaConstants } from "./completionSchemaConstants"; import { FormInput, FormSelect } from "../../../../components/form/form"; import { DataInputCard } from "../../../../components/dataCard/dataInputCard"; -import { StackFullWidth, StackHalfWidth } from "../../../../components/styledComponents.js"; +import { StackFullWidth, StackHalfWidth } from "../../../../components/styledComponents"; import { prepareCasingDataForSubmit, useGetCasingOptions } from "./casingUtils"; const BackfillInput = ({ item, parentId }) => { diff --git a/src/client/src/commons/form/borehole/completion/casing.jsx b/src/client/src/pages/detail/form/completion/casing.jsx similarity index 77% rename from src/client/src/commons/form/borehole/completion/casing.jsx rename to src/client/src/pages/detail/form/completion/casing.jsx index 858a80682..dc13602f1 100644 --- a/src/client/src/commons/form/borehole/completion/casing.jsx +++ b/src/client/src/pages/detail/form/completion/casing.jsx @@ -1,9 +1,9 @@ -import { getCasings } from "../../../../api/fetchApiV2"; -import DataCards from "../../../../components/dataCard/dataCards"; -import CasingInput from "./casingInput"; -import CasingDisplay from "./casingDisplay"; +import { getCasings } from "../../../../api/fetchApiV2.js"; +import DataCards from "../../../../components/dataCard/dataCards.jsx"; +import CasingInput from "./casingInput.jsx"; +import CasingDisplay from "./casingDisplay.jsx"; import { extractCasingDepth } from "./casingUtils.jsx"; -import { sortByDepth } from "../../../sorter.jsx"; +import { sortByDepth } from "../sorter.jsx"; const Casing = ({ isEditable, completionId }) => { return ( diff --git a/src/client/src/commons/form/borehole/completion/casingDisplay.jsx b/src/client/src/pages/detail/form/completion/casingDisplay.jsx similarity index 100% rename from src/client/src/commons/form/borehole/completion/casingDisplay.jsx rename to src/client/src/pages/detail/form/completion/casingDisplay.jsx diff --git a/src/client/src/commons/form/borehole/completion/casingInput.jsx b/src/client/src/pages/detail/form/completion/casingInput.jsx similarity index 98% rename from src/client/src/commons/form/borehole/completion/casingInput.jsx rename to src/client/src/pages/detail/form/completion/casingInput.jsx index 899964a20..e2b5ed90e 100644 --- a/src/client/src/commons/form/borehole/completion/casingInput.jsx +++ b/src/client/src/pages/detail/form/completion/casingInput.jsx @@ -1,7 +1,7 @@ import { useContext, useEffect } from "react"; import { FormProvider, useFieldArray, useForm } from "react-hook-form"; import { Box, Divider, IconButton, Stack, Typography } from "@mui/material"; -import { StackFullWidth } from "../../../../components/styledComponents"; +import { StackFullWidth } from "../../../../components/styledComponents.js"; import Delete from "@mui/icons-material/Delete"; import { useTranslation } from "react-i18next"; import { addCasing, updateCasing, useDomains } from "../../../../api/fetchApiV2"; @@ -9,8 +9,8 @@ import { completionSchemaConstants } from "./completionSchemaConstants"; import { FormInput, FormSelect } from "../../../../components/form/form"; import { DataCardButtonContainer } from "../../../../components/dataCard/dataCard"; import { AddButton, CancelButton, SaveButton } from "../../../../components/buttons/buttons.tsx"; -import { extractCasingDepth } from "./casingUtils"; -import { DataCardContext, DataCardSwitchContext } from "../../../../components/dataCard/dataCardContext"; +import { extractCasingDepth } from "./casingUtils.jsx"; +import { DataCardContext, DataCardSwitchContext } from "../../../../components/dataCard/dataCardContext.jsx"; import { PromptContext } from "../../../../components/prompt/promptContext.tsx"; const CasingInput = props => { diff --git a/src/client/src/commons/form/borehole/completion/casingUtils.jsx b/src/client/src/pages/detail/form/completion/casingUtils.jsx similarity index 100% rename from src/client/src/commons/form/borehole/completion/casingUtils.jsx rename to src/client/src/pages/detail/form/completion/casingUtils.jsx diff --git a/src/client/src/commons/form/borehole/completion/completion.jsx b/src/client/src/pages/detail/form/completion/completion.jsx similarity index 97% rename from src/client/src/commons/form/borehole/completion/completion.jsx rename to src/client/src/pages/detail/form/completion/completion.jsx index db309e6b4..f1d62b909 100644 --- a/src/client/src/commons/form/borehole/completion/completion.jsx +++ b/src/client/src/pages/detail/form/completion/completion.jsx @@ -2,20 +2,20 @@ import { useContext, useEffect, useRef, useState } from "react"; import { useHistory, useLocation, useParams } from "react-router-dom"; import { useTranslation } from "react-i18next"; import { CircularProgress, Stack, Typography } from "@mui/material"; -import { BdmsTab, BdmsTabContentBox, BdmsTabs } from "../../../../components/styledTabComponents"; +import { BdmsTab, BdmsTabContentBox, BdmsTabs } from "../../../../components/styledTabComponents.jsx"; import { addCompletion, copyCompletion, deleteCompletion, getCompletions, updateCompletion, -} from "../../../../api/fetchApiV2"; -import CompletionContent from "./completionContent"; -import CompletionHeaderInput from "./completionHeaderInput"; -import CompletionHeaderDisplay from "./completionHeaderDisplay"; +} from "../../../../api/fetchApiV2.js"; +import CompletionContent from "./completionContent.jsx"; +import CompletionHeaderInput from "./completionHeaderInput.jsx"; +import CompletionHeaderDisplay from "./completionHeaderDisplay.jsx"; import { AddButton } from "../../../../components/buttons/buttons.tsx"; -import { FullPage } from "../../../../components/styledComponents"; -import { DataCardExternalContext } from "../../../../components/dataCard/dataCardContext"; +import { FullPage } from "../../../../components/styledComponents.js"; +import { DataCardExternalContext } from "../../../../components/dataCard/dataCardContext.jsx"; import { PromptContext } from "../../../../components/prompt/promptContext.tsx"; import TrashIcon from "../../../../assets/icons/trash.svg?react"; diff --git a/src/client/src/commons/form/borehole/completion/completionContent.jsx b/src/client/src/pages/detail/form/completion/completionContent.jsx similarity index 91% rename from src/client/src/commons/form/borehole/completion/completionContent.jsx rename to src/client/src/pages/detail/form/completion/completionContent.jsx index 48976d857..1667feb0f 100644 --- a/src/client/src/commons/form/borehole/completion/completionContent.jsx +++ b/src/client/src/pages/detail/form/completion/completionContent.jsx @@ -1,12 +1,12 @@ -import React, { useState, useEffect, useContext, useCallback } from "react"; +import React, { useCallback, useContext, useEffect, useState } from "react"; import { useHistory, useLocation } from "react-router-dom"; -import Casing from "./casing"; -import Backfill from "./backfill"; -import Instrumentation from "./instrumentation"; +import Casing from "./casing.jsx"; +import Backfill from "./backfill.jsx"; +import Instrumentation from "./instrumentation.jsx"; import { Stack } from "@mui/material"; -import { BdmsTabContentBox, BdmsTabs, BdmsTab } from "../../../../components/styledTabComponents"; +import { BdmsTab, BdmsTabContentBox, BdmsTabs } from "../../../../components/styledTabComponents.jsx"; import { useTranslation } from "react-i18next"; -import { DataCardExternalContext } from "../../../../components/dataCard/dataCardContext"; +import { DataCardExternalContext } from "../../../../components/dataCard/dataCardContext.jsx"; const CompletionContentTabBox = props => { return {props.children()}; diff --git a/src/client/src/commons/form/borehole/completion/completionHeaderDisplay.jsx b/src/client/src/pages/detail/form/completion/completionHeaderDisplay.jsx similarity index 98% rename from src/client/src/commons/form/borehole/completion/completionHeaderDisplay.jsx rename to src/client/src/pages/detail/form/completion/completionHeaderDisplay.jsx index 5a558270c..623bb0b5f 100644 --- a/src/client/src/commons/form/borehole/completion/completionHeaderDisplay.jsx +++ b/src/client/src/pages/detail/form/completion/completionHeaderDisplay.jsx @@ -1,8 +1,8 @@ import { useState } from "react"; import { IconButton, Stack } from "@mui/material"; -import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; +import { FormDisplay, FormDisplayType } from "../../../../components/form/form.js"; import { CopyButton, DeleteButton, EditButton } from "../../../../components/buttons/buttons.tsx"; -import { DataCardButtonContainer } from "../../../../components/dataCard/dataCard"; +import { DataCardButtonContainer } from "../../../../components/dataCard/dataCard.jsx"; import ExpandMoreIcon from "@mui/icons-material/ExpandMore"; import ExpandLessIcon from "@mui/icons-material/ExpandLess"; diff --git a/src/client/src/commons/form/borehole/completion/completionHeaderInput.jsx b/src/client/src/pages/detail/form/completion/completionHeaderInput.jsx similarity index 97% rename from src/client/src/commons/form/borehole/completion/completionHeaderInput.jsx rename to src/client/src/pages/detail/form/completion/completionHeaderInput.jsx index 0cd64e2f5..3b414fe41 100644 --- a/src/client/src/commons/form/borehole/completion/completionHeaderInput.jsx +++ b/src/client/src/pages/detail/form/completion/completionHeaderInput.jsx @@ -2,10 +2,10 @@ import { useContext, useEffect, useState } from "react"; import { FormProvider, useForm } from "react-hook-form"; import { useTranslation } from "react-i18next"; import { Stack } from "@mui/material"; -import { fetchApiV2 } from "../../../../api/fetchApiV2"; -import { completionSchemaConstants } from "./completionSchemaConstants"; -import { DataCardButtonContainer } from "../../../../components/dataCard/dataCard"; -import { FormCheckbox, FormInput, FormSelect } from "../../../../components/form/form"; +import { fetchApiV2 } from "../../../../api/fetchApiV2.js"; +import { completionSchemaConstants } from "./completionSchemaConstants.js"; +import { DataCardButtonContainer } from "../../../../components/dataCard/dataCard.jsx"; +import { FormCheckbox, FormInput, FormSelect } from "../../../../components/form/form.js"; import { CancelButton, SaveButton } from "../../../../components/buttons/buttons.tsx"; import { PromptContext } from "../../../../components/prompt/promptContext.tsx"; diff --git a/src/client/src/commons/form/borehole/completion/completionSchemaConstants.js b/src/client/src/pages/detail/form/completion/completionSchemaConstants.js similarity index 100% rename from src/client/src/commons/form/borehole/completion/completionSchemaConstants.js rename to src/client/src/pages/detail/form/completion/completionSchemaConstants.js diff --git a/src/client/src/commons/form/borehole/completion/instrumentation.jsx b/src/client/src/pages/detail/form/completion/instrumentation.jsx similarity index 71% rename from src/client/src/commons/form/borehole/completion/instrumentation.jsx rename to src/client/src/pages/detail/form/completion/instrumentation.jsx index b11482920..0f445af31 100644 --- a/src/client/src/commons/form/borehole/completion/instrumentation.jsx +++ b/src/client/src/pages/detail/form/completion/instrumentation.jsx @@ -1,8 +1,8 @@ -import { getInstrumentation } from "../../../../api/fetchApiV2"; -import DataCards from "../../../../components/dataCard/dataCards"; -import InstrumentationInput from "./instrumentationInput"; -import InstrumentationDisplay from "./instrumentationDisplay"; -import { sortByDepth } from "../../../sorter.jsx"; +import { getInstrumentation } from "../../../../api/fetchApiV2.js"; +import DataCards from "../../../../components/dataCard/dataCards.jsx"; +import InstrumentationInput from "./instrumentationInput.jsx"; +import InstrumentationDisplay from "./instrumentationDisplay.jsx"; +import { sortByDepth } from "../sorter.jsx"; const Instrumentation = ({ isEditable, completionId }) => { return ( diff --git a/src/client/src/commons/form/borehole/completion/instrumentationDisplay.jsx b/src/client/src/pages/detail/form/completion/instrumentationDisplay.jsx similarity index 92% rename from src/client/src/commons/form/borehole/completion/instrumentationDisplay.jsx rename to src/client/src/pages/detail/form/completion/instrumentationDisplay.jsx index 5a9deca7a..c826c7dea 100644 --- a/src/client/src/commons/form/borehole/completion/instrumentationDisplay.jsx +++ b/src/client/src/pages/detail/form/completion/instrumentationDisplay.jsx @@ -1,8 +1,8 @@ -import { StackFullWidth } from "../../../../components/styledComponents"; -import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; -import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard"; -import { useGetCasingName } from "./casingUtils"; -import { deleteInstrumentation } from "../../../../api/fetchApiV2"; +import { StackFullWidth } from "../../../../components/styledComponents.js"; +import { FormDisplay, FormDisplayType } from "../../../../components/form/form.js"; +import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard.jsx"; +import { useGetCasingName } from "./casingUtils.jsx"; +import { deleteInstrumentation } from "../../../../api/fetchApiV2.js"; const InstrumentationDisplay = props => { const { item, isEditable } = props; diff --git a/src/client/src/commons/form/borehole/completion/instrumentationInput.jsx b/src/client/src/pages/detail/form/completion/instrumentationInput.jsx similarity index 91% rename from src/client/src/commons/form/borehole/completion/instrumentationInput.jsx rename to src/client/src/pages/detail/form/completion/instrumentationInput.jsx index ae07caf73..3768e3cd8 100644 --- a/src/client/src/commons/form/borehole/completion/instrumentationInput.jsx +++ b/src/client/src/pages/detail/form/completion/instrumentationInput.jsx @@ -1,11 +1,11 @@ import { useEffect, useState } from "react"; import { Stack } from "@mui/material"; import { useTranslation } from "react-i18next"; -import { useDomains, getCasings, addInstrumentation, updateInstrumentation } from "../../../../api/fetchApiV2"; -import { completionSchemaConstants } from "./completionSchemaConstants"; -import { FormInput, FormSelect } from "../../../../components/form/form"; -import { DataInputCard } from "../../../../components/dataCard/dataInputCard"; -import { useGetCasingOptions, prepareCasingDataForSubmit } from "./casingUtils"; +import { addInstrumentation, getCasings, updateInstrumentation, useDomains } from "../../../../api/fetchApiV2.js"; +import { completionSchemaConstants } from "./completionSchemaConstants.js"; +import { FormInput, FormSelect } from "../../../../components/form/form.js"; +import { DataInputCard } from "../../../../components/dataCard/dataInputCard.jsx"; +import { prepareCasingDataForSubmit, useGetCasingOptions } from "./casingUtils.jsx"; const InstrumentationInput = ({ item, parentId }) => { const domains = useDomains(); diff --git a/src/client/src/commons/form/borehole/hydrogeology/FieldMeasurementInterface.ts b/src/client/src/pages/detail/form/hydrogeology/FieldMeasurementInterface.ts similarity index 100% rename from src/client/src/commons/form/borehole/hydrogeology/FieldMeasurementInterface.ts rename to src/client/src/pages/detail/form/hydrogeology/FieldMeasurementInterface.ts diff --git a/src/client/src/commons/form/borehole/hydrogeology/HydrotestInterface.ts b/src/client/src/pages/detail/form/hydrogeology/HydrotestInterface.ts similarity index 69% rename from src/client/src/commons/form/borehole/hydrogeology/HydrotestInterface.ts rename to src/client/src/pages/detail/form/hydrogeology/HydrotestInterface.ts index ccc3b665b..d334f4ea1 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/HydrotestInterface.ts +++ b/src/client/src/pages/detail/form/hydrogeology/HydrotestInterface.ts @@ -1,4 +1,4 @@ -import { Codelist } from "../../domain/domainInterface"; +import { Codelist } from "../../../../components/legacyComponents/domain/domainInterface.ts"; export interface Hydrotest { hydrotestResults: HydrotestResult[]; diff --git a/src/client/src/commons/form/borehole/hydrogeology/fieldMeasurement.jsx b/src/client/src/pages/detail/form/hydrogeology/fieldMeasurement.jsx similarity index 93% rename from src/client/src/commons/form/borehole/hydrogeology/fieldMeasurement.jsx rename to src/client/src/pages/detail/form/hydrogeology/fieldMeasurement.jsx index 030b9d3f6..fc59f53fe 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/fieldMeasurement.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/fieldMeasurement.jsx @@ -1,8 +1,8 @@ -import { getFieldMeasurements } from "../../../../api/fetchApiV2"; import FieldMeasurementInput from "./fieldMeasurementInput"; import FieldMeasurementDisplay from "./fieldMeasurementDisplay"; -import DataCards from "../../../../components/dataCard/dataCards"; -import { sortByDepth } from "../../../sorter.jsx"; +import { getFieldMeasurements } from "../../../../api/fetchApiV2.js"; +import DataCards from "../../../../components/dataCard/dataCards.jsx"; +import { sortByDepth } from "../sorter.jsx"; const FieldMeasurement = ({ isEditable, boreholeId }) => { return ( diff --git a/src/client/src/commons/form/borehole/hydrogeology/fieldMeasurementDisplay.jsx b/src/client/src/pages/detail/form/hydrogeology/fieldMeasurementDisplay.jsx similarity index 97% rename from src/client/src/commons/form/borehole/hydrogeology/fieldMeasurementDisplay.jsx rename to src/client/src/pages/detail/form/hydrogeology/fieldMeasurementDisplay.jsx index e20543824..0cb7b48a1 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/fieldMeasurementDisplay.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/fieldMeasurementDisplay.jsx @@ -1,10 +1,10 @@ -import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard"; import ObservationDisplay from "./observationDisplay"; import { useTranslation } from "react-i18next"; import { TableCell } from "@mui/material"; -import { FormResultTableDisplay } from "../../../../components/form/formResultTableDisplay"; import { getFieldMeasurementParameterUnits } from "./parameterUnits"; -import { deleteFieldMeasurement, useDomains } from "../../../../api/fetchApiV2"; +import { deleteFieldMeasurement, useDomains } from "../../../../api/fetchApiV2.js"; +import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard.jsx"; +import { FormResultTableDisplay } from "../../../../components/form/formResultTableDisplay.tsx"; const FieldMeasurementDisplay = props => { const { item, isEditable } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/fieldMeasurementInput.jsx b/src/client/src/pages/detail/form/hydrogeology/fieldMeasurementInput.jsx similarity index 99% rename from src/client/src/commons/form/borehole/hydrogeology/fieldMeasurementInput.jsx rename to src/client/src/pages/detail/form/hydrogeology/fieldMeasurementInput.jsx index 2d2951204..313f153d1 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/fieldMeasurementInput.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/fieldMeasurementInput.jsx @@ -13,7 +13,7 @@ import { ObservationType } from "./observationType"; import { hydrogeologySchemaConstants } from "./hydrogeologySchemaConstants"; import { getFieldMeasurementParameterUnits } from "./parameterUnits"; import Delete from "@mui/icons-material/Delete"; -import { prepareCasingDataForSubmit } from "../completion/casingUtils"; +import { prepareCasingDataForSubmit } from "../completion/casingUtils.jsx"; const FieldMeasurementInput = props => { const { item, parentId } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurement.jsx b/src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurement.jsx similarity index 93% rename from src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurement.jsx rename to src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurement.jsx index edc5bc551..679e56320 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurement.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurement.jsx @@ -1,8 +1,8 @@ -import { getGroundwaterLevelMeasurements } from "../../../../api/fetchApiV2"; import GroundwaterLevelMeasurementInput from "./groundwaterLevelMeasurementInput"; import GroundwaterLevelMeasurementDisplay from "./groundwaterLevelMeasurementDisplay"; -import DataCards from "../../../../components/dataCard/dataCards"; -import { sortByDepth } from "../../../sorter.jsx"; +import DataCards from "../../../../components/dataCard/dataCards.jsx"; +import { getGroundwaterLevelMeasurements } from "../../../../api/fetchApiV2.js"; +import { sortByDepth } from "../sorter.jsx"; const GroundwaterLevelMeasurement = ({ isEditable, boreholeId }) => { return ( diff --git a/src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurementDisplay.jsx b/src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurementDisplay.jsx similarity index 95% rename from src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurementDisplay.jsx rename to src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurementDisplay.jsx index 53ae6f4a0..3a78997bf 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurementDisplay.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurementDisplay.jsx @@ -1,8 +1,8 @@ -import { StackFullWidth } from "../../../../components/styledComponents"; import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; -import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard"; import ObservationDisplay from "./observationDisplay"; -import { deleteGroundwaterLevelMeasurement } from "../../../../api/fetchApiV2"; +import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard.jsx"; +import { deleteGroundwaterLevelMeasurement } from "../../../../api/fetchApiV2.js"; +import { StackFullWidth } from "../../../../components/styledComponents.js"; const GroundwaterLevelMeasurementDisplay = props => { const { item, isEditable } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurementInput.jsx b/src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurementInput.jsx similarity index 96% rename from src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurementInput.jsx rename to src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurementInput.jsx index 7538eaa6a..2b5bc3006 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/groundwaterLevelMeasurementInput.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/groundwaterLevelMeasurementInput.jsx @@ -1,6 +1,6 @@ import { Stack } from "@mui/material"; import { FormInput, FormSelect } from "../../../../components/form/form"; -import { DataInputCard } from "../../../../components/dataCard/dataInputCard"; + import { addGroundwaterLevelMeasurement, updateGroundwaterLevelMeasurement, @@ -10,7 +10,8 @@ import { useTranslation } from "react-i18next"; import ObservationInput from "./observationInput"; import { ObservationType } from "./observationType"; import { hydrogeologySchemaConstants } from "./hydrogeologySchemaConstants"; -import { prepareCasingDataForSubmit } from "../completion/casingUtils"; +import { prepareCasingDataForSubmit } from "../completion/casingUtils.jsx"; +import DataInputCard from "../../../../components/dataCard/dataInputCard.jsx"; const GroundwaterLevelMeasurementInput = props => { const { item, parentId } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/hydrogeologySchemaConstants.js b/src/client/src/pages/detail/form/hydrogeology/hydrogeologySchemaConstants.js similarity index 100% rename from src/client/src/commons/form/borehole/hydrogeology/hydrogeologySchemaConstants.js rename to src/client/src/pages/detail/form/hydrogeology/hydrogeologySchemaConstants.js diff --git a/src/client/src/commons/form/borehole/hydrogeology/hydrotest.jsx b/src/client/src/pages/detail/form/hydrogeology/hydrotest.jsx similarity index 85% rename from src/client/src/commons/form/borehole/hydrogeology/hydrotest.jsx rename to src/client/src/pages/detail/form/hydrogeology/hydrotest.jsx index c7e7c0c0b..ed5f718c1 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/hydrotest.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/hydrotest.jsx @@ -1,8 +1,8 @@ -import { getHydrotests } from "../../../../api/fetchApiV2"; import HydrotestInput from "./hydrotestInput"; import HydrotestDisplay from "./hydrotestDisplay"; -import DataCards from "../../../../components/dataCard/dataCards"; -import { sortByDepth } from "../../../sorter.jsx"; +import { getHydrotests } from "../../../../api/fetchApiV2.js"; +import { sortByDepth } from "../sorter.jsx"; +import DataCards from "../../../../components/dataCard/dataCards.jsx"; const Hydrotest = ({ isEditable, boreholeId }) => { return ( diff --git a/src/client/src/commons/form/borehole/hydrogeology/hydrotestDisplay.jsx b/src/client/src/pages/detail/form/hydrogeology/hydrotestDisplay.jsx similarity index 97% rename from src/client/src/commons/form/borehole/hydrogeology/hydrotestDisplay.jsx rename to src/client/src/pages/detail/form/hydrogeology/hydrotestDisplay.jsx index 1b764cf25..36a37731c 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/hydrotestDisplay.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/hydrotestDisplay.jsx @@ -1,12 +1,12 @@ import { useTranslation } from "react-i18next"; import { TableCell } from "@mui/material"; -import { FormResultTableDisplay } from "../../../../components/form/formResultTableDisplay"; -import { StackFullWidth } from "../../../../components/styledComponents"; -import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; -import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard"; import ObservationDisplay from "./observationDisplay"; import { getHydrotestParameterUnits } from "./parameterUnits"; -import { deleteHydrotest, useDomains } from "../../../../api/fetchApiV2"; +import { deleteHydrotest, useDomains } from "../../../../api/fetchApiV2.js"; +import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard.jsx"; +import { StackFullWidth } from "../../../../components/styledComponents.js"; +import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; +import { FormResultTableDisplay } from "../../../../components/form/formResultTableDisplay.tsx"; const HydrotestDisplay = props => { const { item, isEditable } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/hydrotestInput.jsx b/src/client/src/pages/detail/form/hydrogeology/hydrotestInput.jsx similarity index 99% rename from src/client/src/commons/form/borehole/hydrogeology/hydrotestInput.jsx rename to src/client/src/pages/detail/form/hydrogeology/hydrotestInput.jsx index d1728b128..2ad7d1b19 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/hydrotestInput.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/hydrotestInput.jsx @@ -2,7 +2,7 @@ import { useContext, useEffect, useState } from "react"; import { FormProvider, useFieldArray, useForm } from "react-hook-form"; import { Box, IconButton, InputAdornment, Stack, Typography } from "@mui/material"; import { FormInput, FormMultiSelect, FormSelect } from "../../../../components/form/form"; -import { StackHalfWidth } from "../../../../components/styledComponents"; +import { StackHalfWidth } from "../../../../components/styledComponents.js"; import { DataCardButtonContainer } from "../../../../components/dataCard/dataCard"; import { AddButton, CancelButton, SaveButton } from "../../../../components/buttons/buttons.tsx"; import ObservationInput from "./observationInput"; @@ -14,7 +14,7 @@ import { getHydrotestParameterUnits } from "./parameterUnits"; import Delete from "@mui/icons-material/Delete"; import { DataCardContext, DataCardSwitchContext } from "../../../../components/dataCard/dataCardContext"; import { PromptContext } from "../../../../components/prompt/promptContext.tsx"; -import { prepareCasingDataForSubmit } from "../completion/casingUtils"; +import { prepareCasingDataForSubmit } from "../completion/casingUtils.jsx"; const HydrotestInput = props => { const { item, parentId } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/observationDisplay.jsx b/src/client/src/pages/detail/form/hydrogeology/observationDisplay.jsx similarity index 97% rename from src/client/src/commons/form/borehole/hydrogeology/observationDisplay.jsx rename to src/client/src/pages/detail/form/hydrogeology/observationDisplay.jsx index db4798905..53fae2d23 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/observationDisplay.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/observationDisplay.jsx @@ -1,7 +1,7 @@ import { useTranslation } from "react-i18next"; -import { StackFullWidth } from "../../../../components/styledComponents"; import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; -import { useGetCasingName } from "../completion/casingUtils"; +import { StackFullWidth } from "../../../../components/styledComponents.js"; +import { useGetCasingName } from "../completion/casingUtils.jsx"; const ObservationDisplay = props => { const { observation } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/observationInput.jsx b/src/client/src/pages/detail/form/hydrogeology/observationInput.jsx similarity index 96% rename from src/client/src/commons/form/borehole/hydrogeology/observationInput.jsx rename to src/client/src/pages/detail/form/hydrogeology/observationInput.jsx index d33437b30..268391a09 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/observationInput.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/observationInput.jsx @@ -1,11 +1,11 @@ import { useEffect, useState } from "react"; import { Stack } from "@mui/material"; import { FormInput, FormSelect } from "../../../../components/form/form"; -import { getCasingsByBoreholeId, useDomains } from "../../../../api/fetchApiV2"; import { useTranslation } from "react-i18next"; import { hydrogeologySchemaConstants } from "./hydrogeologySchemaConstants"; -import { StackHalfWidth } from "../../../../components/styledComponents"; -import { useGetCasingOptions } from "../completion/casingUtils"; +import { useGetCasingOptions } from "../completion/casingUtils.jsx"; +import { getCasingsByBoreholeId, useDomains } from "../../../../api/fetchApiV2.js"; +import { StackHalfWidth } from "../../../../components/styledComponents.js"; const ObservationInput = props => { const { observation, boreholeId } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/observationType.js b/src/client/src/pages/detail/form/hydrogeology/observationType.js similarity index 100% rename from src/client/src/commons/form/borehole/hydrogeology/observationType.js rename to src/client/src/pages/detail/form/hydrogeology/observationType.js diff --git a/src/client/src/commons/form/borehole/hydrogeology/parameterUnits.tsx b/src/client/src/pages/detail/form/hydrogeology/parameterUnits.tsx similarity index 96% rename from src/client/src/commons/form/borehole/hydrogeology/parameterUnits.tsx rename to src/client/src/pages/detail/form/hydrogeology/parameterUnits.tsx index 319172948..96d5d42f2 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/parameterUnits.tsx +++ b/src/client/src/pages/detail/form/hydrogeology/parameterUnits.tsx @@ -1,4 +1,4 @@ -import { Codelist } from "../../domain/domainInterface"; +import { Codelist } from "../../../../components/legacyComponents/domain/domainInterface.ts"; interface Units { [key: number]: string; diff --git a/src/client/src/commons/form/borehole/hydrogeology/waterIngress.jsx b/src/client/src/pages/detail/form/hydrogeology/waterIngress.jsx similarity index 78% rename from src/client/src/commons/form/borehole/hydrogeology/waterIngress.jsx rename to src/client/src/pages/detail/form/hydrogeology/waterIngress.jsx index db272c191..a4925515f 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/waterIngress.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/waterIngress.jsx @@ -1,8 +1,8 @@ -import { getWaterIngress } from "../../../../api/fetchApiV2"; import WaterIngressInput from "./waterIngressInput"; -import WaterIngressDisplay from "./waterIngressDisplay"; -import DataCards from "../../../../components/dataCard/dataCards"; -import { sortByDepth } from "../../../sorter.jsx"; +import DataCards from "../../../../components/dataCard/dataCards.jsx"; +import WaterIngressDisplay from "./waterIngressDisplay.jsx"; +import { getWaterIngress } from "../../../../api/fetchApiV2.js"; +import { sortByDepth } from "../sorter.jsx"; const WaterIngress = ({ isEditable, boreholeId }) => { return ( diff --git a/src/client/src/commons/form/borehole/hydrogeology/waterIngressDisplay.jsx b/src/client/src/pages/detail/form/hydrogeology/waterIngressDisplay.jsx similarity index 98% rename from src/client/src/commons/form/borehole/hydrogeology/waterIngressDisplay.jsx rename to src/client/src/pages/detail/form/hydrogeology/waterIngressDisplay.jsx index 2846ac0a1..9ba5f74c0 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/waterIngressDisplay.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/waterIngressDisplay.jsx @@ -1,8 +1,8 @@ -import { StackFullWidth } from "../../../../components/styledComponents"; import { FormDisplay, FormDisplayType } from "../../../../components/form/form"; import DataDisplayCard from "../../../../components/dataCard/dataDisplayCard"; import ObservationDisplay from "./observationDisplay"; import { deleteWaterIngress } from "../../../../api/fetchApiV2"; +import { StackFullWidth } from "../../../../components/styledComponents.js"; const WaterIngressDisplay = props => { const { item, isEditable } = props; diff --git a/src/client/src/commons/form/borehole/hydrogeology/waterIngressInput.jsx b/src/client/src/pages/detail/form/hydrogeology/waterIngressInput.jsx similarity index 92% rename from src/client/src/commons/form/borehole/hydrogeology/waterIngressInput.jsx rename to src/client/src/pages/detail/form/hydrogeology/waterIngressInput.jsx index 949a4b7af..3a104194a 100644 --- a/src/client/src/commons/form/borehole/hydrogeology/waterIngressInput.jsx +++ b/src/client/src/pages/detail/form/hydrogeology/waterIngressInput.jsx @@ -1,12 +1,12 @@ import { Stack } from "@mui/material"; -import { FormSelect } from "../../../../components/form/form"; -import { DataInputCard } from "../../../../components/dataCard/dataInputCard"; -import { addWaterIngress, updateWaterIngress, useDomains } from "../../../../api/fetchApiV2"; import { useTranslation } from "react-i18next"; import ObservationInput from "./observationInput"; import { ObservationType } from "./observationType"; import { hydrogeologySchemaConstants } from "./hydrogeologySchemaConstants"; -import { prepareCasingDataForSubmit } from "../completion/casingUtils"; +import { prepareCasingDataForSubmit } from "../completion/casingUtils.jsx"; +import DataInputCard from "../../../../components/dataCard/dataInputCard.jsx"; +import { FormSelect } from "../../../../components/form/form.js"; +import { addWaterIngress, updateWaterIngress, useDomains } from "../../../../api/fetchApiV2.js"; const WaterIngressInput = props => { const { item, parentId } = props; diff --git a/src/client/src/commons/form/borehole/segments/cantonMunicipalitySegment.jsx b/src/client/src/pages/detail/form/location/cantonMunicipalitySegment.jsx similarity index 88% rename from src/client/src/commons/form/borehole/segments/cantonMunicipalitySegment.jsx rename to src/client/src/pages/detail/form/location/cantonMunicipalitySegment.jsx index b55252dcc..a17e4f08b 100644 --- a/src/client/src/commons/form/borehole/segments/cantonMunicipalitySegment.jsx +++ b/src/client/src/pages/detail/form/location/cantonMunicipalitySegment.jsx @@ -1,6 +1,6 @@ -import TranslationText from "../../translationText"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; -import { Form, Segment, Input, Icon } from "semantic-ui-react"; +import { Form, Icon, Input, Segment } from "semantic-ui-react"; const CantonMunicipalitySegment = props => { const { size, country, canton, municipality, isEditable } = props; diff --git a/src/client/src/commons/form/borehole/segments/coordinateSegmentConstants.ts b/src/client/src/pages/detail/form/location/coordinateSegmentConstants.ts similarity index 96% rename from src/client/src/commons/form/borehole/segments/coordinateSegmentConstants.ts rename to src/client/src/pages/detail/form/location/coordinateSegmentConstants.ts index 25eaeb7d2..b0875fbbe 100644 --- a/src/client/src/commons/form/borehole/segments/coordinateSegmentConstants.ts +++ b/src/client/src/pages/detail/form/location/coordinateSegmentConstants.ts @@ -4,7 +4,7 @@ import { ReferenceSystem, ReferenceSystemCode, ReferenceSystemKey, -} from "./coordinateSegmentInterfaces"; +} from "./coordinateSegmentInterfaces.ts"; export const webApilv95tolv03 = "https://geodesy.geo.admin.ch/reframe/lv95tolv03"; export const webApilv03tolv95 = "https://geodesy.geo.admin.ch/reframe/lv03tolv95"; diff --git a/src/client/src/commons/form/borehole/segments/coordinateSegmentInterfaces.ts b/src/client/src/pages/detail/form/location/coordinateSegmentInterfaces.ts similarity index 99% rename from src/client/src/commons/form/borehole/segments/coordinateSegmentInterfaces.ts rename to src/client/src/pages/detail/form/location/coordinateSegmentInterfaces.ts index 152ef528f..2cb57f0e0 100644 --- a/src/client/src/commons/form/borehole/segments/coordinateSegmentInterfaces.ts +++ b/src/client/src/pages/detail/form/location/coordinateSegmentInterfaces.ts @@ -1,4 +1,4 @@ -import { Borehole, User } from "../../../../api-lib/ReduxStateInterfaces"; +import { Borehole, User } from "../../../../api-lib/ReduxStateInterfaces.ts"; export enum ReferenceSystemCode { LV95 = 20104001, diff --git a/src/client/src/commons/form/borehole/segments/coordinatesSegment.tsx b/src/client/src/pages/detail/form/location/coordinatesSegment.tsx similarity index 98% rename from src/client/src/commons/form/borehole/segments/coordinatesSegment.tsx rename to src/client/src/pages/detail/form/location/coordinatesSegment.tsx index 8101453e2..174036891 100644 --- a/src/client/src/commons/form/borehole/segments/coordinatesSegment.tsx +++ b/src/client/src/pages/detail/form/location/coordinatesSegment.tsx @@ -4,11 +4,14 @@ import { Controller, useForm } from "react-hook-form"; import { Form, Segment } from "semantic-ui-react"; import { NumericFormat } from "react-number-format"; import { useTranslation } from "react-i18next"; -import DomainDropdown from "../../domain/dropdown/domainDropdown.jsx"; -import DomainText from "../../domain/domainText.jsx"; -import { getPrecisionFromString, parseFloatWithThousandsSeparator } from "../../formUtils.js"; +import DomainDropdown from "../../../../components/legacyComponents/domain/dropdown/domainDropdown.jsx"; +import DomainText from "../../../../components/legacyComponents/domain/domainText.jsx"; +import { + getPrecisionFromString, + parseFloatWithThousandsSeparator, +} from "../../../../components/legacyComponents/formUtils.js"; import { fetchApiV2 } from "../../../../api/fetchApiV2.js"; -import { DisabledRadio } from "./styledComponents.jsx"; +import { DisabledRadio } from "../styledComponents.jsx"; import { CoordinatePrecisions, Coordinates, diff --git a/src/client/src/commons/form/borehole/segments/indentifierSegment.jsx b/src/client/src/pages/detail/form/location/indentifierSegment.jsx similarity index 95% rename from src/client/src/commons/form/borehole/segments/indentifierSegment.jsx rename to src/client/src/pages/detail/form/location/indentifierSegment.jsx index 1fcf2d3a1..f67e57313 100644 --- a/src/client/src/commons/form/borehole/segments/indentifierSegment.jsx +++ b/src/client/src/pages/detail/form/location/indentifierSegment.jsx @@ -1,13 +1,13 @@ import { useContext } from "react"; import _ from "lodash"; -import DomainDropdown from "../../domain/dropdown/domainDropdown"; -import DomainText from "../../domain/domainText"; -import TranslationText from "../../translationText"; -import { AlertContext } from "../../../../components/alert/alertContext"; +import DomainDropdown from "../../../../components/legacyComponents/domain/dropdown/domainDropdown.jsx"; +import DomainText from "../../../../components/legacyComponents/domain/domainText.jsx"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; import { Form, Icon, Input, Segment } from "semantic-ui-react"; import { addIdentifier, removeIdentifier } from "../../../../api-lib"; import { useTranslation } from "react-i18next"; +import { AlertContext } from "../../../../components/alert/alertContext.tsx"; const IdentifierSegment = props => { const { borehole, identifier, identifierValue, updateBorehole, setState, user } = props; diff --git a/src/client/src/commons/form/borehole/segments/locationSegment.jsx b/src/client/src/pages/detail/form/location/locationSegment.jsx similarity index 92% rename from src/client/src/commons/form/borehole/segments/locationSegment.jsx rename to src/client/src/pages/detail/form/location/locationSegment.jsx index 5886fae7c..e88b15f2f 100644 --- a/src/client/src/commons/form/borehole/segments/locationSegment.jsx +++ b/src/client/src/pages/detail/form/location/locationSegment.jsx @@ -1,8 +1,8 @@ import { useState } from "react"; -import CoordinatesSegment from "./coordinatesSegment"; -import CantonMunicipalitySegment from "./cantonMunicipalitySegment"; -import PointComponent from "../../../map/pointComponent"; +import CantonMunicipalitySegment from "./cantonMunicipalitySegment.jsx"; +import PointComponent from "../../../../components/map/pointComponent.jsx"; import _ from "lodash"; +import CoordinatesSegment from "./coordinatesSegment.tsx"; const LocationSegment = props => { const { size, borehole, user, updateChange, checkLock, updateNumber } = props; diff --git a/src/client/src/commons/form/borehole/segments/nameSegment.jsx b/src/client/src/pages/detail/form/location/nameSegment.jsx similarity index 95% rename from src/client/src/commons/form/borehole/segments/nameSegment.jsx rename to src/client/src/pages/detail/form/location/nameSegment.jsx index 27bb61d44..d20d7e906 100644 --- a/src/client/src/commons/form/borehole/segments/nameSegment.jsx +++ b/src/client/src/pages/detail/form/location/nameSegment.jsx @@ -1,4 +1,4 @@ -import TranslationText from "../../translationText"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; import { Form, Input, Segment } from "semantic-ui-react"; const NameSegment = props => { diff --git a/src/client/src/commons/form/borehole/segments/restrictionSegment.jsx b/src/client/src/pages/detail/form/location/restrictionSegment.jsx similarity index 89% rename from src/client/src/commons/form/borehole/segments/restrictionSegment.jsx rename to src/client/src/pages/detail/form/location/restrictionSegment.jsx index da2696439..12ba32dbd 100644 --- a/src/client/src/commons/form/borehole/segments/restrictionSegment.jsx +++ b/src/client/src/pages/detail/form/location/restrictionSegment.jsx @@ -1,14 +1,14 @@ -import TranslationText from "../../translationText"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; import { Form, Segment } from "semantic-ui-react"; -import { FormControl, RadioGroup, FormControlLabel } from "@mui/material"; -import { DisabledRadio } from "./styledComponents"; +import { FormControl, FormControlLabel, RadioGroup } from "@mui/material"; +import { DisabledRadio } from "../styledComponents.jsx"; import _ from "lodash"; import moment from "moment"; -import DomainDropdown from "../../domain/dropdown/domainDropdown"; +import DomainDropdown from "../../../../components/legacyComponents/domain/dropdown/domainDropdown.jsx"; -import DateField from "../../dateField"; +import DateField from "../../../../components/legacyComponents/dateField.jsx"; const RestrictionSegment = props => { const { size, borehole, updateChange, user } = props; diff --git a/src/client/src/commons/sorter.jsx b/src/client/src/pages/detail/form/sorter.jsx similarity index 100% rename from src/client/src/commons/sorter.jsx rename to src/client/src/pages/detail/form/sorter.jsx diff --git a/src/client/src/commons/form/borehole/stratigraphy/chronostratigraphyEditProfile.jsx b/src/client/src/pages/detail/form/stratigraphy/chronostratigraphy/chronostratigraphyEditProfile.jsx similarity index 90% rename from src/client/src/commons/form/borehole/stratigraphy/chronostratigraphyEditProfile.jsx rename to src/client/src/pages/detail/form/stratigraphy/chronostratigraphy/chronostratigraphyEditProfile.jsx index a203199bf..a4cc7e85d 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/chronostratigraphyEditProfile.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/chronostratigraphy/chronostratigraphyEditProfile.jsx @@ -1,5 +1,5 @@ -import { useChronostratigraphies, useChronostratigraphyMutations } from "../../../../api/fetchApiV2"; -import HierarchicalDataEditProfile from "./hierarchicalDataEditProfile"; +import { useChronostratigraphies, useChronostratigraphyMutations } from "../../../../../api/fetchApiV2.js"; +import HierarchicalDataEditProfile from "../hierarchicalDataEditProfile.jsx"; import { useTranslation } from "react-i18next"; /** diff --git a/src/client/src/commons/form/borehole/stratigraphy/chronostratigraphyPanel.jsx b/src/client/src/pages/detail/form/stratigraphy/chronostratigraphy/chronostratigraphyPanel.jsx similarity index 86% rename from src/client/src/commons/form/borehole/stratigraphy/chronostratigraphyPanel.jsx rename to src/client/src/pages/detail/form/stratigraphy/chronostratigraphy/chronostratigraphyPanel.jsx index fd7e15f35..0b536b0f7 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/chronostratigraphyPanel.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/chronostratigraphy/chronostratigraphyPanel.jsx @@ -1,13 +1,13 @@ import { Typography } from "@mui/material"; import { useTranslation } from "react-i18next"; -import NavigationContainer from "./navigationContainer"; -import NavigationLens from "./navigationLens"; -import LithologyViewProfile from "./lithologyViewProfile"; -import LithostratigraphyViewProfile from "./lithostratigraphyViewProfile"; -import ChronostratigraphyEditProfile from "./chronostratigraphyEditProfile"; -import NavigationChild from "./navigationChild"; -import Scale from "./scale"; -import StratigraphySelection from "./stratigraphySelection"; +import NavigationContainer from "../navigationContainer.jsx"; +import NavigationLens from "../navigationLens.jsx"; +import LithologyViewProfile from "../lithologyViewProfile.jsx"; +import LithostratigraphyViewProfile from "../lithostratigraphy/lithostratigraphyViewProfile.jsx"; +import ChronostratigraphyEditProfile from "./chronostratigraphyEditProfile.jsx"; +import NavigationChild from "../navigationChild.jsx"; +import Scale from "../scale.jsx"; +import StratigraphySelection from "../stratigraphySelection.jsx"; const ChronostratigraphyPanel = ({ id: selectedBoreholeId, isEditable }) => { const { t } = useTranslation(); diff --git a/src/client/src/commons/form/borehole/stratigraphy/clamp.js b/src/client/src/pages/detail/form/stratigraphy/clamp.js similarity index 100% rename from src/client/src/commons/form/borehole/stratigraphy/clamp.js rename to src/client/src/pages/detail/form/stratigraphy/clamp.js diff --git a/src/client/src/commons/form/borehole/stratigraphy/hierarchicalDataEditProfile.jsx b/src/client/src/pages/detail/form/stratigraphy/hierarchicalDataEditProfile.jsx similarity index 95% rename from src/client/src/commons/form/borehole/stratigraphy/hierarchicalDataEditProfile.jsx rename to src/client/src/pages/detail/form/stratigraphy/hierarchicalDataEditProfile.jsx index 2f87647f2..262ec2963 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/hierarchicalDataEditProfile.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/hierarchicalDataEditProfile.jsx @@ -1,23 +1,23 @@ -import { useState, useEffect } from "react"; +import { useEffect, useState } from "react"; import { Box, Button, - Stack, + ButtonGroup, + IconButton, LinearProgress, + Stack, Table, TableBody, - TableRow, TableCell, + TableRow, Typography, - IconButton, - ButtonGroup, } from "@mui/material"; -import LayerCard from "./layerCard"; -import LayerGap from "./layerGap"; -import { AddCircle, VisibilityOff, Visibility } from "@mui/icons-material"; +import LayerCard from "./layerCard.jsx"; +import LayerGap from "./layerGap.jsx"; +import { AddCircle, Visibility, VisibilityOff } from "@mui/icons-material"; import { useTranslation } from "react-i18next"; -import NavigationChild from "./navigationChild"; -import { useDomainSchema } from "../../../../api/fetchApiV2"; +import NavigationChild from "./navigationChild.jsx"; +import { useDomainSchema } from "../../../../api/fetchApiV2.js"; /** * Component for editing hierarchical layer data. diff --git a/src/client/src/commons/form/borehole/stratigraphy/hierarchicalDataSearch.jsx b/src/client/src/pages/detail/form/stratigraphy/hierarchicalDataSearch.jsx similarity index 94% rename from src/client/src/commons/form/borehole/stratigraphy/hierarchicalDataSearch.jsx rename to src/client/src/pages/detail/form/stratigraphy/hierarchicalDataSearch.jsx index 7e03b4a40..e8347b243 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/hierarchicalDataSearch.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/hierarchicalDataSearch.jsx @@ -1,9 +1,9 @@ import { useCallback, useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { useDomainSchema } from "../../../../api/fetchApiV2"; +import { useDomainSchema } from "../../../../api/fetchApiV2.js"; import { Form, Header } from "semantic-ui-react"; -import * as Styled from "../../../search/components/listFilterStyles.js"; -import TranslationText from "../../translationText"; +import * as Styled from "../../../overview/sidePanelContent/filter/listFilterStyles.js"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; const HierarchicalDataSearch = ({ schema, labels, selected, onSelected }) => { const { i18n } = useTranslation(); diff --git a/src/client/src/commons/form/borehole/stratigraphy/layerCard.jsx b/src/client/src/pages/detail/form/stratigraphy/layerCard.jsx similarity index 100% rename from src/client/src/commons/form/borehole/stratigraphy/layerCard.jsx rename to src/client/src/pages/detail/form/stratigraphy/layerCard.jsx diff --git a/src/client/src/commons/form/borehole/stratigraphy/layerGap.jsx b/src/client/src/pages/detail/form/stratigraphy/layerGap.jsx similarity index 94% rename from src/client/src/commons/form/borehole/stratigraphy/layerGap.jsx rename to src/client/src/pages/detail/form/stratigraphy/layerGap.jsx index f99b7fc15..fcaddf240 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/layerGap.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/layerGap.jsx @@ -1,7 +1,7 @@ -import { Card, Stack, Typography, CardActionArea } from "@mui/material"; +import { Card, CardActionArea, Stack, Typography } from "@mui/material"; import { useTranslation } from "react-i18next"; -import { ArrowDownward, ArrowUpward, AddCircle, Warning } from "@mui/icons-material"; -import { theme } from "../../../../AppTheme"; +import { AddCircle, ArrowDownward, ArrowUpward, Warning } from "@mui/icons-material"; +import { theme } from "../../../../AppTheme.ts"; const IconTypography = ({ icon, text }) => { return ( diff --git a/src/client/src/commons/form/profile/data/stratigraphydata.js b/src/client/src/pages/detail/form/stratigraphy/lithology/data/stratigraphydata.js similarity index 100% rename from src/client/src/commons/form/profile/data/stratigraphydata.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/data/stratigraphydata.js diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/index.js new file mode 100644 index 000000000..0bb58e63a --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/index.js @@ -0,0 +1 @@ +export { default } from "./lithology.jsx"; diff --git a/src/client/src/commons/form/profile/profile.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithology.jsx similarity index 88% rename from src/client/src/commons/form/profile/profile.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithology.jsx index a9882e884..d4500cfcc 100644 --- a/src/client/src/commons/form/profile/profile.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithology.jsx @@ -1,15 +1,15 @@ -import { useState, useEffect, useCallback } from "react"; -import * as Styled from "./styles"; +import { useCallback, useEffect, useState } from "react"; +import * as Styled from "./styles.js"; import { useSelector } from "react-redux"; -import ProfileHeader from "./components/profileHeader"; -import ProfileInfo from "./components/profileInfo"; -import ProfileLayers from "./components/profileLayers"; -import ProfileAttributes from "./components/profileAttributes"; -import { stratigraphyData } from "./data/stratigraphydata"; -import TranslationText from "../translationText"; +import ProfileHeader from "./lithologyHeader"; +import LithologyInfo from "./lithologyInfo"; +import ProfileLayers from "./lithologyLayers"; +import LithologyAttributes from "./lithologyAttributes"; +import { stratigraphyData } from "./data/stratigraphydata.js"; +import TranslationText from "../../../../../components/legacyComponents/translationText.jsx"; import { Loader } from "semantic-ui-react"; -const Profile = () => { +const Lithology = () => { const { user, borehole } = useSelector(state => ({ borehole: state.core_borehole, user: state.core_user, @@ -101,7 +101,7 @@ const Profile = () => { {!isLoadingData && selectedStratigraphy && ( - { {selectedLayer !== null && ( - { ); }; -export default Profile; +export default Lithology; diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/index.js new file mode 100644 index 000000000..8556735db --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/index.js @@ -0,0 +1 @@ +export { default } from "./lithologyAttributes.jsx"; diff --git a/src/client/src/commons/form/profile/components/profileAttributes/components/profileAttributeList/profileAttributeList.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/lithologyAttributeList/lithologyAttributeList.jsx similarity index 91% rename from src/client/src/commons/form/profile/components/profileAttributes/components/profileAttributeList/profileAttributeList.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/lithologyAttributeList/lithologyAttributeList.jsx index 7229b2783..e4d1957ae 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/components/profileAttributeList/profileAttributeList.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/lithologyAttributeList/lithologyAttributeList.jsx @@ -1,16 +1,16 @@ -import { useCallback, useState, useMemo } from "react"; -import * as Styled from "./styles"; -import { Input, TextArea, Form } from "semantic-ui-react"; -import TranslationText from "../../../../../translationText"; -import DomainDropdown from "../../../../../domain/dropdown/domainDropdown"; -import DomainTree from "../../../../../domain/tree/domainTree"; -import DateField from "../../../../../dateField"; +import { useCallback, useMemo, useState } from "react"; +import * as Styled from "./styles.js"; +import { Form, Input, TextArea } from "semantic-ui-react"; +import TranslationText from "../../../../../../../components/legacyComponents/translationText.jsx"; +import DomainDropdown from "../../../../../../../components/legacyComponents/domain/dropdown/domainDropdown.jsx"; +import DomainTree from "../../../../../../../components/legacyComponents/domain/tree/domainTree.jsx"; +import DateField from "../../../../../../../components/legacyComponents/dateField.jsx"; import { NumericFormat } from "react-number-format"; import _ from "lodash"; import { useTranslation } from "react-i18next"; -import { parseIfString } from "../../../../../formUtils.ts"; +import { parseIfString } from "../../../../../../../components/legacyComponents/formUtils.ts"; -const ProfileAttributeList = props => { +const LithologyAttributeList = props => { const { attribute, showAll, updateChange, layer, isVisibleFunction } = props.data; const { t } = useTranslation(); @@ -195,4 +195,4 @@ const ProfileAttributeList = props => { ); }; -export default ProfileAttributeList; +export default LithologyAttributeList; diff --git a/src/client/src/commons/form/profile/components/profileAttributes/components/profileAttributeList/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/lithologyAttributeList/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileAttributes/components/profileAttributeList/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/lithologyAttributeList/styles.js diff --git a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/lithologyAttributes.jsx similarity index 91% rename from src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/lithologyAttributes.jsx index 9bf23414b..8969fb21c 100644 --- a/src/client/src/commons/form/profile/components/profileAttributes/profileAttributes.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/lithologyAttributes.jsx @@ -1,16 +1,16 @@ import { useCallback, useContext, useEffect, useRef, useState } from "react"; -import * as Styled from "./styles"; +import * as Styled from "./styles.js"; import { Checkbox } from "semantic-ui-react"; -import TranslationText from "../../../translationText"; +import TranslationText from "../../../../../../components/legacyComponents/translationText.jsx"; import _ from "lodash"; import { useTranslation } from "react-i18next"; -import ProfileAttributeList from "./components/profileAttributeList/profileAttributeList"; +import LithologyAttributeList from "./lithologyAttributeList/lithologyAttributeList.jsx"; import { useSelector } from "react-redux"; import { useQueryClient } from "react-query"; -import { AlertContext } from "../../../../../components/alert/alertContext"; -import { fetchLayerById, layerQueryKey, updateLayer } from "../../../../../api/fetchApiV2"; +import { AlertContext } from "../../../../../../components/alert/alertContext.tsx"; +import { fetchLayerById, layerQueryKey, updateLayer } from "../../../../../../api/fetchApiV2.js"; -const ProfileAttributes = props => { +const LithologyAttributes = props => { const { id, isEditable, onUpdated, attribute, reloadAttribute, selectedStratigraphyID } = props.data; const { codes, geocode } = useSelector(state => ({ @@ -162,7 +162,7 @@ const ProfileAttributes = props => { )} {attribute && ( - { ); }; -export default ProfileAttributes; +export default LithologyAttributes; diff --git a/src/client/src/commons/form/profile/components/profileAttributes/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileAttributes/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyAttributes/styles.js diff --git a/src/client/src/commons/form/profile/components/profileHeader/api/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/api/index.js similarity index 77% rename from src/client/src/commons/form/profile/components/profileHeader/api/index.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/api/index.js index b4427a53d..a6c7eaf40 100644 --- a/src/client/src/commons/form/profile/components/profileHeader/api/index.js +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/api/index.js @@ -1,4 +1,4 @@ -import { createStratigraphy } from "../../../../../../api/fetchApiV2"; +import { createStratigraphy } from "../../../../../../../api/fetchApiV2.js"; let createdNewStratigraphy = false; export const createNewStratigraphy = async boreholeId => { diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/index.js new file mode 100644 index 000000000..ec18351f9 --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/index.js @@ -0,0 +1 @@ +export { default } from "./profileHeader.jsx"; diff --git a/src/client/src/commons/form/profile/components/profileHeader/profileHeader.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeader.jsx similarity index 84% rename from src/client/src/commons/form/profile/components/profileHeader/profileHeader.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeader.jsx index 84414cb08..8615bc603 100644 --- a/src/client/src/commons/form/profile/components/profileHeader/profileHeader.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeader.jsx @@ -1,10 +1,10 @@ -import { useState, useEffect, useCallback } from "react"; -import * as Styled from "./styles"; +import { useCallback, useEffect, useState } from "react"; +import * as Styled from "./styles.js"; import { Button } from "semantic-ui-react"; -import TranslationText from "./../../../translationText"; +import TranslationText from "../../../../../../components/legacyComponents/translationText.jsx"; import { createNewStratigraphy } from "./api"; -import { fetchStratigraphyByBoreholeId } from "../../../../../api/fetchApiV2"; -import ProfileHeaderList from "./components/profileHeaderList"; +import { fetchStratigraphyByBoreholeId } from "../../../../../../api/fetchApiV2.js"; +import ProfileHeaderList from "./profileHeaderList"; const ProfileHeader = props => { const { boreholeID, isEditable, reloadHeader, selectedStratigraphy, setSelectedStratigraphy, setIsLoadingData } = diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeaderList/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeaderList/index.js new file mode 100644 index 000000000..206822541 --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeaderList/index.js @@ -0,0 +1 @@ +export { default } from "./profileHeaderList.jsx"; diff --git a/src/client/src/commons/form/profile/components/profileHeader/components/profileHeaderList/profileHeaderList.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeaderList/profileHeaderList.jsx similarity index 89% rename from src/client/src/commons/form/profile/components/profileHeader/components/profileHeaderList/profileHeaderList.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeaderList/profileHeaderList.jsx index 05228f26b..4ccdb0a84 100644 --- a/src/client/src/commons/form/profile/components/profileHeader/components/profileHeaderList/profileHeaderList.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeaderList/profileHeaderList.jsx @@ -1,5 +1,5 @@ -import * as Styled from "./styles"; -import DateText from "../../../../../dateText"; +import * as Styled from "./styles.js"; +import DateText from "../../../../../../../components/legacyComponents/dateText.js"; import { Icon } from "semantic-ui-react"; import { useTranslation } from "react-i18next"; diff --git a/src/client/src/commons/form/profile/components/profileHeader/components/profileHeaderList/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeaderList/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileHeader/components/profileHeaderList/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/profileHeaderList/styles.js diff --git a/src/client/src/commons/form/profile/components/profileHeader/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileHeader/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyHeader/styles.js diff --git a/src/client/src/commons/form/profile/components/profileInfo/api/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/api/index.js similarity index 94% rename from src/client/src/commons/form/profile/components/profileInfo/api/index.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/api/index.js index efe64ac75..7a9e0db8a 100644 --- a/src/client/src/commons/form/profile/components/profileInfo/api/index.js +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/api/index.js @@ -1,4 +1,4 @@ -import { fetchStratigraphy, updateStratigraphy } from "../../../../../../api/fetchApiV2"; +import { fetchStratigraphy, updateStratigraphy } from "../../../../../../../api/fetchApiV2.js"; export const sendProfile = async (id, attribute, value) => { let success = false; diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/index.js new file mode 100644 index 000000000..732fe1b2e --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/index.js @@ -0,0 +1 @@ +export { default } from "./lithologyInfo.jsx"; diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/index.js new file mode 100644 index 000000000..abdf7ac2f --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/index.js @@ -0,0 +1 @@ +export { default } from "./infoCheckBox.jsx"; diff --git a/src/client/src/commons/form/profile/components/profileInfo/components/infoCheckBox/infoCheckBox.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/infoCheckBox.jsx similarity index 88% rename from src/client/src/commons/form/profile/components/profileInfo/components/infoCheckBox/infoCheckBox.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/infoCheckBox.jsx index 937a6e496..56c449400 100644 --- a/src/client/src/commons/form/profile/components/profileInfo/components/infoCheckBox/infoCheckBox.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/infoCheckBox.jsx @@ -1,7 +1,7 @@ -import * as Styled from "./styles"; -import { Checkbox, Popup, Button, Icon } from "semantic-ui-react"; -import TranslationText from "../../../../../translationText"; -import { copyStratigraphy, deleteStratigraphy } from "../../../../../../../api/fetchApiV2"; +import * as Styled from "./styles.js"; +import { Button, Checkbox, Icon, Popup } from "semantic-ui-react"; +import TranslationText from "../../../../../../../components/legacyComponents/translationText.jsx"; +import { copyStratigraphy, deleteStratigraphy } from "../../../../../../../api/fetchApiV2.js"; const InfoCheckBox = props => { const { profileInfo, updateChange, isEditable, onUpdated } = props.data; diff --git a/src/client/src/commons/form/profile/components/profileInfo/components/infoCheckBox/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileInfo/components/infoCheckBox/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/styles.js diff --git a/src/client/src/commons/form/profile/components/profileInfo/components/infoList/InfoList.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoList/InfoList.jsx similarity index 89% rename from src/client/src/commons/form/profile/components/profileInfo/components/infoList/InfoList.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoList/InfoList.jsx index 4176116db..c7454dd72 100644 --- a/src/client/src/commons/form/profile/components/profileInfo/components/infoList/InfoList.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoList/InfoList.jsx @@ -1,8 +1,8 @@ -import * as Styled from "./styles"; -import { Input, Form } from "semantic-ui-react"; -import TranslationText from "../../../../../translationText"; -import DomainDropdown from "../../../../../domain/dropdown/domainDropdown"; -import DateField from "../../../../../dateField"; +import * as Styled from "./styles.js"; +import { Form, Input } from "semantic-ui-react"; +import TranslationText from "../../../../../../../components/legacyComponents/translationText.jsx"; +import DomainDropdown from "../../../../../../../components/legacyComponents/domain/dropdown/domainDropdown.jsx"; +import DateField from "../../../../../../../components/legacyComponents/dateField.jsx"; import _ from "lodash"; import { useCallback, useMemo, useState } from "react"; diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoList/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoList/index.js new file mode 100644 index 000000000..6fb17594c --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoList/index.js @@ -0,0 +1 @@ +export { default } from "./InfoList.jsx"; diff --git a/src/client/src/commons/form/profile/components/profileInfo/components/infoList/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoList/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileInfo/components/infoList/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoList/styles.js diff --git a/src/client/src/commons/form/profile/components/profileInfo/profileInfo.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/lithologyInfo.jsx similarity index 88% rename from src/client/src/commons/form/profile/components/profileInfo/profileInfo.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/lithologyInfo.jsx index ef5782db1..88c3677f7 100644 --- a/src/client/src/commons/form/profile/components/profileInfo/profileInfo.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/lithologyInfo.jsx @@ -1,14 +1,14 @@ import { useCallback, useContext, useEffect, useRef, useState } from "react"; -import * as Styled from "./styles"; -import InfoList from "./components/infoList"; -import InfoCheckBox from "./components/infoCheckBox"; +import * as Styled from "./styles.js"; +import InfoList from "./infoList"; +import InfoCheckBox from "./infoCheckBox"; import { useTranslation } from "react-i18next"; import { sendProfile } from "./api"; -import { fetchStratigraphy } from "../../../../../api/fetchApiV2"; +import { fetchStratigraphy } from "../../../../../../api/fetchApiV2.js"; import _ from "lodash"; -import { AlertContext } from "../../../../../components/alert/alertContext"; +import { AlertContext } from "../../../../../../components/alert/alertContext.tsx"; -const ProfileInfo = props => { +const LithologyInfo = props => { const { selectedStratigraphyID: id, isEditable, onUpdated, attribute } = props.data; const mounted = useRef(false); @@ -106,4 +106,4 @@ const ProfileInfo = props => { ); }; -export default ProfileInfo; +export default LithologyInfo; diff --git a/src/client/src/commons/form/profile/components/profileInfo/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileInfo/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/styles.js diff --git a/src/client/src/commons/form/profile/components/profileLayers/api/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/api/index.js similarity index 89% rename from src/client/src/commons/form/profile/components/profileLayers/api/index.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/api/index.js index 19810fcee..b9bd49cd2 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/api/index.js +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/api/index.js @@ -1,4 +1,4 @@ -import { getProfileLayers, createLayer } from "../../../../../../api-lib/index"; +import { createLayer, getProfileLayers } from "../../../../../../../api-lib"; let data = []; export const getData = async id => { diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/actionButtons.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/actionButtons.jsx similarity index 97% rename from src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/actionButtons.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/actionButtons.jsx index 19cdd0845..f19d96a15 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/actionButtons.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/actionButtons.jsx @@ -4,7 +4,7 @@ import ClearIcon from "@mui/icons-material/Clear"; import ModeEditIcon from "@mui/icons-material/ModeEdit"; import DeleteIcon from "@mui/icons-material/Delete"; import AddCircleIcon from "@mui/icons-material/AddCircle"; -import { theme } from "../../../../../../../AppTheme"; +import { theme } from "../../../../../../../AppTheme.ts"; const ActionButtons = props => { const { diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDeleteDialog.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx similarity index 96% rename from src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDeleteDialog.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx index 0b630355e..6d786fce1 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDeleteDialog.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx @@ -2,7 +2,7 @@ import { Box, Stack, Typography } from "@mui/material"; import WarningIcon from "@mui/icons-material/Warning"; import { useTranslation } from "react-i18next"; import { CancelButton, DeleteButton } from "../../../../../../../components/buttons/buttons.tsx"; -import { theme } from "../../../../../../../AppTheme"; +import { theme } from "../../../../../../../AppTheme.ts"; const DescriptionDeleteDialog = props => { const { item, setDescriptionIdSelectedForDelete, deleteMutation } = props; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDisplay.jsx similarity index 100% rename from src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionDisplay.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDisplay.jsx diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionInput.jsx similarity index 97% rename from src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionInput.jsx index cc7cc26bd..f1f400309 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionInput.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionInput.jsx @@ -1,6 +1,6 @@ -import { useEffect, useState, useCallback } from "react"; +import { useCallback, useEffect, useState } from "react"; import { MenuItem, Stack, TextField } from "@mui/material"; -import { useDomains } from "../../../../../../../api/fetchApiV2"; +import { useDomains } from "../../../../../../../api/fetchApiV2.js"; import { useTranslation } from "react-i18next"; const DescriptionInput = props => { diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionLayers.jsx similarity index 97% rename from src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionLayers.jsx index 294f7b853..c852dc78c 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/descriptionLayers/descriptionLayers.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionLayers.jsx @@ -3,11 +3,11 @@ import { Box, Stack, Typography } from "@mui/material"; import WarningIcon from "@mui/icons-material/Warning"; import { produce } from "immer"; import { useTranslation } from "react-i18next"; -import DescriptionInput from "./descriptionInput"; -import DescriptionDisplay from "./descriptionDisplay"; -import DescriptionDeleteDialog from "./descriptionDeleteDialog"; -import ActionButtons from "./actionButtons"; -import { theme } from "../../../../../../../AppTheme"; +import DescriptionInput from "./descriptionInput.jsx"; +import DescriptionDisplay from "./descriptionDisplay.jsx"; +import DescriptionDeleteDialog from "./descriptionDeleteDialog.jsx"; +import ActionButtons from "./actionButtons.jsx"; +import { theme } from "../../../../../../../AppTheme.ts"; const DescriptionLayers = props => { const { diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/index.js new file mode 100644 index 000000000..cbe876c1f --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/index.js @@ -0,0 +1 @@ +export { default } from "./profileLayers.jsx"; diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/index.js new file mode 100644 index 000000000..7a6c41ea2 --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/index.js @@ -0,0 +1 @@ +export { default } from "./lithologyLayersList.jsx"; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/lithologyLayersList.jsx similarity index 96% rename from src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/lithologyLayersList.jsx index 1dee6cf9f..1b749f851 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/profileLayersList.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/lithologyLayersList.jsx @@ -1,16 +1,16 @@ -import { useCallback, useEffect, useState, useMemo } from "react"; +import { useCallback, useEffect, useMemo, useState } from "react"; import { Icon, Popup } from "semantic-ui-react"; import DeleteIcon from "@mui/icons-material/Delete"; import ModeEditIcon from "@mui/icons-material/ModeEdit"; import ClearIcon from "@mui/icons-material/Clear"; import { Stack, Tooltip } from "@mui/material"; -import TranslationText from "../../../../../translationText"; +import TranslationText from "../../../../../../../components/legacyComponents/translationText.jsx"; import { NumericFormat } from "react-number-format"; import { withTranslation } from "react-i18next"; -import * as Styled from "./styles"; -import { useLithostratigraphies } from "../../../../../../../api/fetchApiV2"; +import * as Styled from "./styles.js"; +import { useLithostratigraphies } from "../../../../../../../api/fetchApiV2.js"; -const ProfileLayersList = props => { +const LithologyLayersList = props => { const { isEditable, selectedLayer, showDelete, setShowDelete, setSelectedLayer, itemWithValidation, item } = props.data; const { t, i18n } = props; @@ -274,5 +274,5 @@ const ProfileLayersList = props => { ); }; -const ProfileLayersListWithTranslation = withTranslation()(ProfileLayersList); +const ProfileLayersListWithTranslation = withTranslation()(LithologyLayersList); export default ProfileLayersListWithTranslation; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/styles.js similarity index 93% rename from src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/styles.js index 3e90117e6..60a100c66 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersList/styles.js +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersList/styles.js @@ -1,5 +1,5 @@ import styled from "styled-components"; -import DomainText from "../../../../../domain/domainText"; +import DomainText from "../../../../../../../components/legacyComponents/domain/domainText.jsx"; import { Button } from "semantic-ui-react"; export const Layer = styled.div` diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersValidation/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersValidation/index.js new file mode 100644 index 000000000..d3172e5d8 --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersValidation/index.js @@ -0,0 +1 @@ +export { default } from "./lithologyLayersValidation.jsx"; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersValidation/profileLayersValidation.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersValidation/lithologyLayersValidation.jsx similarity index 91% rename from src/client/src/commons/form/profile/components/profileLayers/components/profileLayersValidation/profileLayersValidation.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersValidation/lithologyLayersValidation.jsx index 4a2aa5783..6cbf232f7 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersValidation/profileLayersValidation.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersValidation/lithologyLayersValidation.jsx @@ -1,10 +1,10 @@ import { createRef, useEffect, useMemo, useState } from "react"; -import ProfileLayersError from "../profileLayersError"; -import ProfileLayersList from "../profileLayersList"; -import * as Styled from "./styles"; +import LithologyLayersError from "../../lithologyLayersError"; +import LithologyLayersList from "../lithologyLayersList"; +import * as Styled from "./styles.js"; import { Box } from "@mui/material"; -export const ProfileLayersValidation = props => { +export const LithologyLayersValidation = props => { const { layers, layersWithValidation, @@ -47,7 +47,7 @@ export const ProfileLayersValidation = props => { {/* validation before all layers */} {layersWithValidation?.validation && layersWithValidation?.validation?.missingLayers && (
- { key !== "bedrockChronoWrong", ) .map((key, index) => ( - { /> ))} - l.id === item.id), @@ -105,7 +105,7 @@ export const ProfileLayersValidation = props => { {/* validation before each layer */} {showDelete === item.id && ( - { .filter(key => key !== "missingLayers") .map((key, index) => (
- { ); }; -export default ProfileLayersValidation; +export default LithologyLayersValidation; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersValidation/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersValidation/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileLayers/components/profileLayersValidation/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/lithologyLayersValidation/styles.js diff --git a/src/client/src/commons/form/profile/components/profileLayers/profileLayers.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/profileLayers.jsx similarity index 96% rename from src/client/src/commons/form/profile/components/profileLayers/profileLayers.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/profileLayers.jsx index 79e6dbd71..1b9473f81 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/profileLayers.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/profileLayers.jsx @@ -1,8 +1,7 @@ import { useCallback, useContext, useEffect, useRef, useState } from "react"; -import * as Styled from "./styles"; -import TranslationText from "../../../translationText"; -import ProfileLayersValidation from "./components/profileLayersValidation"; -import DescriptionLayers from "./components/descriptionLayers/descriptionLayers"; +import * as Styled from "./styles.js"; +import TranslationText from "../../../../../../components/legacyComponents/translationText.jsx"; +import ProfileLayersValidation from "./lithologyLayersValidation"; import { createLayerApi, getData } from "./api"; import { Box, @@ -29,12 +28,13 @@ import { useFaciesDescription, useLayers, useLithoDescription, -} from "../../../../../api/fetchApiV2"; +} from "../../../../../../api/fetchApiV2.js"; import AddCircleIcon from "@mui/icons-material/AddCircle"; import { withTranslation } from "react-i18next"; import { useMutation, useQueryClient } from "react-query"; -import { AlertContext } from "../../../../../components/alert/alertContext"; +import { AlertContext } from "../../../../../../components/alert/alertContext.tsx"; +import DescriptionLayers from "./descriptionLayers/descriptionLayers.jsx"; const ProfileLayers = props => { const { isEditable, selectedStratigraphyID, selectedLayer, setSelectedLayer, reloadLayer, onUpdated } = props.data; diff --git a/src/client/src/commons/form/profile/components/profileLayers/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileLayers/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/styles.js diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/errorTypes/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/errorTypes/index.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/errorTypes/index.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/errorTypes/index.js diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/index.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/index.js new file mode 100644 index 000000000..a8727f3c1 --- /dev/null +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/index.js @@ -0,0 +1 @@ +export { default } from "./lithologyLayersError.jsx"; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/profileLayersError.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/lithologyLayersError.jsx similarity index 94% rename from src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/profileLayersError.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/lithologyLayersError.jsx index 2c3955fe0..edd56b2d1 100644 --- a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/profileLayersError.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/lithologyLayersError.jsx @@ -1,13 +1,13 @@ import { useContext, useEffect, useState } from "react"; -import * as Styled from "./styles"; +import * as Styled from "./styles.js"; import { Icon, Radio } from "semantic-ui-react"; -import TranslationText from "../../../../../translationText"; -import { deleteLayer, gapLayer } from "../../../../../../../api-lib/index"; -import { addBedrock, fetchLayerById } from "../../../../../../../api/fetchApiV2"; +import TranslationText from "../../../../../../components/legacyComponents/translationText.jsx"; +import { deleteLayer, gapLayer } from "../../../../../../api-lib"; +import { addBedrock, fetchLayerById } from "../../../../../../api/fetchApiV2.js"; import ErrorTypes from "./errorTypes"; -import { AlertContext } from "../../../../../../../components/alert/alertContext"; +import { AlertContext } from "../../../../../../components/alert/alertContext.tsx"; -const ProfileLayersError = props => { +const LithologyLayersError = props => { const { title, isEditable, id, isInside, onUpdated, layerIndex, layerLength, closeDelete } = props.data; const { setDeleteParams } = props; const [showSolution, setShowSolution] = useState(); @@ -253,4 +253,4 @@ const ProfileLayersError = props => { ); }; -export default ProfileLayersError; +export default LithologyLayersError; diff --git a/src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/styles.js similarity index 100% rename from src/client/src/commons/form/profile/components/profileLayers/components/profileLayersError/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayersError/styles.js diff --git a/src/client/src/commons/form/profile/styles.js b/src/client/src/pages/detail/form/stratigraphy/lithology/styles.js similarity index 100% rename from src/client/src/commons/form/profile/styles.js rename to src/client/src/pages/detail/form/stratigraphy/lithology/styles.js diff --git a/src/client/src/commons/form/borehole/stratigraphy/lithologyViewProfile.jsx b/src/client/src/pages/detail/form/stratigraphy/lithologyViewProfile.jsx similarity index 92% rename from src/client/src/commons/form/borehole/stratigraphy/lithologyViewProfile.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithologyViewProfile.jsx index 91ec92390..19788cd19 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/lithologyViewProfile.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithologyViewProfile.jsx @@ -1,8 +1,8 @@ import { useEffect } from "react"; import { NumericFormat } from "react-number-format"; -import { useLayers } from "../../../../api/fetchApiV2"; -import { LinearProgress, Box } from "@mui/material"; -import { theme } from "../../../../AppTheme"; +import { useLayers } from "../../../../api/fetchApiV2.js"; +import { Box, LinearProgress } from "@mui/material"; +import { theme } from "../../../../AppTheme.ts"; const handlePattern = layer => `url(/img/lit/${JSON.parse(layer?.lithology?.conf ?? null)?.image})`; diff --git a/src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyEditProfile.jsx b/src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyEditProfile.jsx similarity index 90% rename from src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyEditProfile.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyEditProfile.jsx index 383d29001..1c71ee306 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyEditProfile.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyEditProfile.jsx @@ -1,5 +1,5 @@ -import { useLithostratigraphies, useLithostratigraphyMutations } from "../../../../api/fetchApiV2"; -import HierarchicalDataEditProfile from "./hierarchicalDataEditProfile"; +import { useLithostratigraphies, useLithostratigraphyMutations } from "../../../../../api/fetchApiV2.js"; +import HierarchicalDataEditProfile from "../hierarchicalDataEditProfile.jsx"; import { useTranslation } from "react-i18next"; /** diff --git a/src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyPanel.jsx b/src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyPanel.jsx similarity index 89% rename from src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyPanel.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyPanel.jsx index daf8a2479..df42adc58 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyPanel.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyPanel.jsx @@ -1,13 +1,13 @@ import { Typography } from "@mui/material"; import { useTranslation } from "react-i18next"; -import NavigationContainer from "./navigationContainer"; -import NavigationLens from "./navigationLens"; -import LithologyViewProfile from "./lithologyViewProfile"; -import LithostratigraphyViewProfile from "./lithostratigraphyViewProfile"; -import LithostratigraphyEditProfile from "./lithostratigraphyEditProfile"; -import NavigationChild from "./navigationChild"; -import Scale from "./scale"; -import StratigraphySelection from "./stratigraphySelection"; +import NavigationContainer from "../navigationContainer.jsx"; +import NavigationLens from "../navigationLens.jsx"; +import LithologyViewProfile from "../lithologyViewProfile.jsx"; +import LithostratigraphyViewProfile from "./lithostratigraphyViewProfile.jsx"; +import LithostratigraphyEditProfile from "./lithostratigraphyEditProfile.jsx"; +import NavigationChild from "../navigationChild.jsx"; +import Scale from "../scale.jsx"; +import StratigraphySelection from "../stratigraphySelection.jsx"; const LithostratigraphyPanel = ({ id: selectedBoreholeId, isEditable }) => { const { t } = useTranslation(); diff --git a/src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyViewProfile.jsx b/src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyViewProfile.jsx similarity index 90% rename from src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyViewProfile.jsx rename to src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyViewProfile.jsx index de8d7998b..883f3d53f 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/lithostratigraphyViewProfile.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithostratigraphy/lithostratigraphyViewProfile.jsx @@ -1,6 +1,6 @@ import { useEffect } from "react"; -import { useLithostratigraphies } from "../../../../api/fetchApiV2"; -import { LinearProgress, Box } from "@mui/material"; +import { useLithostratigraphies } from "../../../../../api/fetchApiV2.js"; +import { Box, LinearProgress } from "@mui/material"; const handleColor = layer => `rgb(${(JSON.parse(layer?.lithostratigraphy?.conf ?? null)?.color ?? [255, 255, 255]).join()})`; diff --git a/src/client/src/commons/form/borehole/stratigraphy/navigationChild.jsx b/src/client/src/pages/detail/form/stratigraphy/navigationChild.jsx similarity index 100% rename from src/client/src/commons/form/borehole/stratigraphy/navigationChild.jsx rename to src/client/src/pages/detail/form/stratigraphy/navigationChild.jsx diff --git a/src/client/src/commons/form/borehole/stratigraphy/navigationContainer.jsx b/src/client/src/pages/detail/form/stratigraphy/navigationContainer.jsx similarity index 99% rename from src/client/src/commons/form/borehole/stratigraphy/navigationContainer.jsx rename to src/client/src/pages/detail/form/stratigraphy/navigationContainer.jsx index 4f1c0ed3c..88e67c877 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/navigationContainer.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/navigationContainer.jsx @@ -1,7 +1,7 @@ import { useState, useRef } from "react"; import { Stack } from "@mui/material"; import useResizeObserver from "@react-hook/resize-observer"; -import { clamp } from "./clamp"; +import { clamp } from "./clamp.js"; const getMax = obj => { const childValues = Object.values(obj); diff --git a/src/client/src/commons/form/borehole/stratigraphy/navigationLens.jsx b/src/client/src/pages/detail/form/stratigraphy/navigationLens.jsx similarity index 94% rename from src/client/src/commons/form/borehole/stratigraphy/navigationLens.jsx rename to src/client/src/pages/detail/form/stratigraphy/navigationLens.jsx index e3eb63242..dbc6377d3 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/navigationLens.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/navigationLens.jsx @@ -1,13 +1,13 @@ -import { useEffect, useState, useRef } from "react"; +import { useEffect, useRef, useState } from "react"; import { Box, Button, ButtonGroup } from "@mui/material"; -import { NavState } from "./navigationContainer"; -import { clamp } from "./clamp"; -import { KeyboardArrowUp, KeyboardArrowDown } from "@mui/icons-material"; +import { NavState } from "./navigationContainer.jsx"; +import { clamp } from "./clamp.js"; +import { KeyboardArrowDown, KeyboardArrowUp } from "@mui/icons-material"; import DraggableCore from "react-draggable"; import { NumericFormat } from "react-number-format"; import useResizeObserver from "@react-hook/resize-observer"; import { styled } from "@mui/material/styles"; -import { theme } from "../../../../AppTheme"; +import { theme } from "../../../../AppTheme.ts"; const BackgroundShade = styled(Box)(() => ({ position: "absolute", diff --git a/src/client/src/commons/form/borehole/stratigraphy/scale.jsx b/src/client/src/pages/detail/form/stratigraphy/scale.jsx similarity index 100% rename from src/client/src/commons/form/borehole/stratigraphy/scale.jsx rename to src/client/src/pages/detail/form/stratigraphy/scale.jsx diff --git a/src/client/src/commons/form/borehole/stratigraphy/stratigraphySelection.jsx b/src/client/src/pages/detail/form/stratigraphy/stratigraphySelection.jsx similarity index 86% rename from src/client/src/commons/form/borehole/stratigraphy/stratigraphySelection.jsx rename to src/client/src/pages/detail/form/stratigraphy/stratigraphySelection.jsx index b9547938d..e57a3b6a6 100644 --- a/src/client/src/commons/form/borehole/stratigraphy/stratigraphySelection.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/stratigraphySelection.jsx @@ -1,9 +1,9 @@ -import { useState, useEffect } from "react"; -import { Stack, CircularProgress, TextField, MenuItem } from "@mui/material"; +import { useEffect, useState } from "react"; +import { CircularProgress, MenuItem, Stack, TextField } from "@mui/material"; import { useTranslation } from "react-i18next"; -import { useLithologyStratigraphies } from "../../../../api/fetchApiV2"; -import TranslationText from "../../translationText"; -import * as Styled from "../../profile/styles"; +import { useLithologyStratigraphies } from "../../../../api/fetchApiV2.js"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; +import * as Styled from "./lithology/styles.js"; /** * Provides a stratigraphy selection. The selected stratigraphy is available through the `renderItem` render prop. diff --git a/src/client/src/commons/form/borehole/segments/styledComponents.jsx b/src/client/src/pages/detail/form/styledComponents.jsx similarity index 100% rename from src/client/src/commons/form/borehole/segments/styledComponents.jsx rename to src/client/src/pages/detail/form/styledComponents.jsx diff --git a/src/client/src/commons/form/workflow/commentArea.jsx b/src/client/src/pages/detail/form/workflow/commentArea.jsx similarity index 94% rename from src/client/src/commons/form/workflow/commentArea.jsx rename to src/client/src/pages/detail/form/workflow/commentArea.jsx index 4a92ee1d1..b9317b473 100644 --- a/src/client/src/commons/form/workflow/commentArea.jsx +++ b/src/client/src/pages/detail/form/workflow/commentArea.jsx @@ -1,7 +1,7 @@ import PropTypes from "prop-types"; import { connect } from "react-redux"; import { withTranslation } from "react-i18next"; -import CommentComponent from "./commentComponent"; +import CommentComponent from "./commentComponent.jsx"; const CommentArea = props => { const { readOnly, height, onChange, value, border } = props; diff --git a/src/client/src/commons/form/workflow/commentComponent.jsx b/src/client/src/pages/detail/form/workflow/commentComponent.jsx similarity index 96% rename from src/client/src/commons/form/workflow/commentComponent.jsx rename to src/client/src/pages/detail/form/workflow/commentComponent.jsx index 1da75f336..684975f91 100644 --- a/src/client/src/commons/form/workflow/commentComponent.jsx +++ b/src/client/src/pages/detail/form/workflow/commentComponent.jsx @@ -1,7 +1,7 @@ import React from "react"; import PropTypes from "prop-types"; import _ from "lodash"; -import { defaultStyle } from "./defaultStyle"; +import { defaultStyle } from "./defaultStyle.js"; class CommentComponent extends React.Component { constructor(props) { diff --git a/src/client/src/commons/form/workflow/defaultStyle.js b/src/client/src/pages/detail/form/workflow/defaultStyle.js similarity index 87% rename from src/client/src/commons/form/workflow/defaultStyle.js rename to src/client/src/pages/detail/form/workflow/defaultStyle.js index 6ee82ea16..5c15a010e 100644 --- a/src/client/src/commons/form/workflow/defaultStyle.js +++ b/src/client/src/pages/detail/form/workflow/defaultStyle.js @@ -1,4 +1,4 @@ -import { theme } from "../../../AppTheme"; +import { theme } from "../../../../AppTheme.ts"; export const defaultStyle = { control: { diff --git a/src/client/src/commons/form/workflow/workflowForm.jsx b/src/client/src/pages/detail/form/workflow/workflowForm.jsx similarity index 98% rename from src/client/src/commons/form/workflow/workflowForm.jsx rename to src/client/src/pages/detail/form/workflow/workflowForm.jsx index c166f550b..6bba4b694 100644 --- a/src/client/src/commons/form/workflow/workflowForm.jsx +++ b/src/client/src/pages/detail/form/workflow/workflowForm.jsx @@ -15,12 +15,12 @@ import { submitWorkflow, updateBorehole, updateWorkflow, -} from "../../../api-lib/index"; -import { AlertContext } from "../../../components/alert/alertContext"; -import CommentArea from "./commentArea"; -import DateText from "../dateText"; -import TranslationText from "../../form/translationText"; -import { theme } from "../../../AppTheme"; +} from "../../../../api-lib"; +import { AlertContext } from "../../../../components/alert/alertContext.tsx"; +import CommentArea from "./commentArea.jsx"; +import DateText from "../../../../components/legacyComponents/dateText.js"; +import TranslationText from "../../../../components/legacyComponents/translationText.jsx"; +import { theme } from "../../../../AppTheme.ts"; import { Stack } from "@mui/material"; class WorkflowForm extends React.Component { diff --git a/src/client/src/commons/menu/mainView/menuComponents/boreholeNumbersPreview.tsx b/src/client/src/pages/overview/layout/boreholeNumbersPreview.tsx similarity index 73% rename from src/client/src/commons/menu/mainView/menuComponents/boreholeNumbersPreview.tsx rename to src/client/src/pages/overview/layout/boreholeNumbersPreview.tsx index b842bc71f..fd3a424dc 100644 --- a/src/client/src/commons/menu/mainView/menuComponents/boreholeNumbersPreview.tsx +++ b/src/client/src/pages/overview/layout/boreholeNumbersPreview.tsx @@ -1,7 +1,11 @@ import { NumericFormat } from "react-number-format"; -import TranslationText from "../../../form/translationText"; +import TranslationText from "../../../components/legacyComponents/translationText"; import { Icon } from "semantic-ui-react"; -import { BoreholeNumbersPreviewProps } from "./menuComponentInterfaces"; +import { Boreholes } from "../../../api-lib/ReduxStateInterfaces.ts"; + +interface BoreholeNumbersPreviewProps { + boreholes: Boreholes; +} export const BoreholeNumbersPreview: React.FC = ({ boreholes }) => { return ( diff --git a/src/client/src/commons/menu/mainView/bottomBar.tsx b/src/client/src/pages/overview/layout/bottomBar.tsx similarity index 78% rename from src/client/src/commons/menu/mainView/bottomBar.tsx rename to src/client/src/pages/overview/layout/bottomBar.tsx index b8eae14f5..39f873437 100644 --- a/src/client/src/commons/menu/mainView/bottomBar.tsx +++ b/src/client/src/pages/overview/layout/bottomBar.tsx @@ -1,10 +1,16 @@ import { Box, Button } from "@mui/material"; import ArrowDownIcon from "../../../assets/icons/arrow_down.svg?react"; import ArrowUpIcon from "../../../assets/icons/arrow_up.svg?react"; -import { BottomBarProps } from "./menuComponents/menuComponentInterfaces"; -import { BoreholeNumbersPreview } from "./menuComponents/boreholeNumbersPreview"; +import { BoreholeNumbersPreview } from "./boreholeNumbersPreview.tsx"; import { useTranslation } from "react-i18next"; -import { theme } from "../../../AppTheme"; +import { theme } from "../../../AppTheme.ts"; +import { Boreholes } from "../../../api-lib/ReduxStateInterfaces.ts"; + +interface BottomBarProps { + toggleBottomDrawer: (open: boolean) => void; + bottomDrawerOpen: boolean; + boreholes: Boreholes; +} const BottomBar = ({ toggleBottomDrawer, bottomDrawerOpen, boreholes }: BottomBarProps) => { const { t } = useTranslation(); diff --git a/src/client/src/commons/menu/mainView/bottomDrawer.tsx b/src/client/src/pages/overview/layout/bottomDrawer.tsx similarity index 93% rename from src/client/src/commons/menu/mainView/bottomDrawer.tsx rename to src/client/src/pages/overview/layout/bottomDrawer.tsx index 46c194ae2..ef3659d8d 100644 --- a/src/client/src/commons/menu/mainView/bottomDrawer.tsx +++ b/src/client/src/pages/overview/layout/bottomDrawer.tsx @@ -1,5 +1,5 @@ import { Box, Collapse, Paper } from "@mui/material"; -import { theme } from "../../../AppTheme"; +import { theme } from "../../../AppTheme.ts"; export const BottomDrawer = ({ drawerOpen, children }: { drawerOpen: boolean; children?: React.ReactNode }) => { return ( diff --git a/src/client/src/commons/menu/mainView/mainSideNav.tsx b/src/client/src/pages/overview/layout/mainSideNav.tsx similarity index 85% rename from src/client/src/commons/menu/mainView/mainSideNav.tsx rename to src/client/src/pages/overview/layout/mainSideNav.tsx index 07fe27265..4f1693e12 100644 --- a/src/client/src/commons/menu/mainView/mainSideNav.tsx +++ b/src/client/src/pages/overview/layout/mainSideNav.tsx @@ -1,22 +1,33 @@ -import { useContext, useEffect, useRef, useState } from "react"; +import React, { useContext, useEffect, useRef, useState } from "react"; import { useDispatch, useSelector } from "react-redux"; import { useHistory } from "react-router-dom"; import { Badge, Stack } from "@mui/material"; -import { ImportErrorModal } from "./menuComponents/importErrorModal"; +import { ImportErrorModal } from "../sidePanelContent/importer/importErrorModal.tsx"; import FilterIcon from "../../../assets/icons/filter.svg?react"; import AddIcon from "../../../assets/icons/add.svg?react"; import UploadIcon from "../../../assets/icons/upload.svg?react"; import SettingsIcon from "../../../assets/icons/settings.svg?react"; import HelpIcon from "../../../assets/icons/help.svg?react"; import LayersIcon from "../../../assets/icons/layers.svg?react"; -import { theme } from "../../../AppTheme"; -import ImportModal from "./actions/importModal"; -import { DrawerContentTypes } from "../../../pages/editor/editorComponentInterfaces"; -import { ErrorResponse, MainSideNavProps } from "./menuComponents/menuComponentInterfaces"; -import { ReduxRootState, User } from "../../../api-lib/ReduxStateInterfaces"; -import { FilterContext } from "../../../components/filter/filterContext"; +import { theme } from "../../../AppTheme.ts"; +import ImportModal from "../sidePanelContent/importer/importModal.tsx"; +import { DrawerContentTypes } from "../overviewPageInterfaces.ts"; +import { ReduxRootState, User, Workgroup } from "../../../api-lib/ReduxStateInterfaces.ts"; +import { FilterContext } from "../sidePanelContent/filter/filterContext.tsx"; import { useTranslation } from "react-i18next"; -import { NavButton } from "../../../components/buttons/navButton"; +import { NavButton } from "../../../components/buttons/navButton.tsx"; +import { ErrorResponse } from "../sidePanelContent/commons/actionsInterfaces.ts"; + +export interface MainSideNavProps { + toggleDrawer: (open: boolean) => void; + drawerOpen: boolean; + workgroup: number | null; + setWorkgroup: React.Dispatch>; + enabledWorkgroups: Workgroup[]; + setEnabledWorkgroups: React.Dispatch>; + setSideDrawerContent: React.Dispatch>; + sideDrawerContent: DrawerContentTypes; +} const MainSideNav = ({ toggleDrawer, diff --git a/src/client/src/commons/menu/mainView/mapView.jsx b/src/client/src/pages/overview/layout/mapView.jsx similarity index 90% rename from src/client/src/commons/menu/mainView/mapView.jsx rename to src/client/src/pages/overview/layout/mapView.jsx index 0d236fcf8..23d834511 100644 --- a/src/client/src/commons/menu/mainView/mapView.jsx +++ b/src/client/src/pages/overview/layout/mapView.jsx @@ -3,14 +3,14 @@ import { connect } from "react-redux"; import PropTypes from "prop-types"; import { withRouter } from "react-router-dom"; import { Modal } from "semantic-ui-react"; -import { loadEditingBoreholes } from "../../../api-lib/index.js"; +import { loadEditingBoreholes } from "../../../api-lib"; import _ from "lodash"; -import MapComponent from "../../map/mapComponent.jsx"; -import BoreholeEditorTable from "../../table/boreholeEditorTable.jsx"; -import MultipleForm from "../../form/multiple/multipleForm.jsx"; +import MapComponent from "../../../components/map/mapComponent.jsx"; +import BoreholeEditorTable from "../table/boreholeEditorTable.jsx"; +import MultipleForm from "../../../components/legacyComponents/multiple/multipleForm.jsx"; import { BottomDrawer } from "./bottomDrawer.tsx"; import BottomBar from "./bottomBar.tsx"; -import { FilterContext } from "../../../components/filter/filterContext.tsx"; +import { FilterContext } from "../sidePanelContent/filter/filterContext.tsx"; class MapView extends React.Component { static contextType = FilterContext; @@ -57,7 +57,7 @@ class MapView extends React.Component { }}> { - loadEditingBoreholes(boreholes.page, search.filter, boreholes.direction); + loadEditingBoreholes(boreholes.page, search.filter, boreholes.orderby, boreholes.direction); }} open={Array.isArray(store.mselected)}> @@ -199,8 +199,8 @@ const mapDispatchToProps = (dispatch, ownprops) => { filter: filter, }); }, - loadEditingBoreholes: (page, filter = {}, direction = null) => { - dispatch(loadEditingBoreholes(page, 100, filter, "creation", direction)); + loadEditingBoreholes: (page, filter = {}, orderby = "creation", direction = null) => { + dispatch(loadEditingBoreholes(page, 100, filter, orderby, direction)); }, }; }; diff --git a/src/client/src/commons/menu/mainView/sideDrawer.tsx b/src/client/src/pages/overview/layout/sideDrawer.tsx similarity index 82% rename from src/client/src/commons/menu/mainView/sideDrawer.tsx rename to src/client/src/pages/overview/layout/sideDrawer.tsx index 0e790413a..89ad0d100 100644 --- a/src/client/src/commons/menu/mainView/sideDrawer.tsx +++ b/src/client/src/pages/overview/layout/sideDrawer.tsx @@ -1,6 +1,11 @@ import { Box, Collapse, Paper } from "@mui/material"; -import { SideDrawerProps } from "./menuComponents/menuComponentInterfaces"; -import { theme } from "../../../AppTheme"; +import { theme } from "../../../AppTheme.ts"; +import React from "react"; + +interface SideDrawerProps { + drawerContent: React.JSX.Element; + drawerOpen: boolean; +} export const SideDrawer = ({ drawerOpen, drawerContent }: SideDrawerProps) => { return ( diff --git a/src/client/src/commons/menu/mainView/sideDrawerHeader.tsx b/src/client/src/pages/overview/layout/sideDrawerHeader.tsx similarity index 93% rename from src/client/src/commons/menu/mainView/sideDrawerHeader.tsx rename to src/client/src/pages/overview/layout/sideDrawerHeader.tsx index b2cb99b52..c6653eb20 100644 --- a/src/client/src/commons/menu/mainView/sideDrawerHeader.tsx +++ b/src/client/src/pages/overview/layout/sideDrawerHeader.tsx @@ -1,5 +1,5 @@ import { Box, IconButton, Typography } from "@mui/material"; -import { theme } from "../../../AppTheme"; +import { theme } from "../../../AppTheme.ts"; import CloseIcon from "@mui/icons-material/Close"; export function SideDrawerHeader({ title, toggleDrawer }: { title: string; toggleDrawer: (open: boolean) => void }) { diff --git a/src/client/src/pages/editor/editorComponent.jsx b/src/client/src/pages/overview/overviewPage.jsx similarity index 69% rename from src/client/src/pages/editor/editorComponent.jsx rename to src/client/src/pages/overview/overviewPage.jsx index 66db15e7b..7142e9bf5 100644 --- a/src/client/src/pages/editor/editorComponent.jsx +++ b/src/client/src/pages/overview/overviewPage.jsx @@ -1,20 +1,20 @@ import { useContext, useEffect, useState } from "react"; import { Route, Switch, useLocation, withRouter } from "react-router-dom"; -import BoreholeForm from "../../commons/form/borehole/boreholeForm"; -import MainSideNav from "../../commons/menu/mainView/mainSideNav.tsx"; -import DetailSideNav from "../../commons/menu/detailView/detailSideNav.jsx"; -import HeaderComponent from "../../commons/menu/headerComponent"; -import MapView from "../../commons/menu/mainView/mapView.jsx"; -import { SideDrawer } from "../../commons/menu/mainView/sideDrawer.tsx"; -import { Box } from "@mui/material"; -import { styled } from "@mui/material/styles"; -import { theme } from "../../AppTheme"; -import FilterComponent from "../../commons/search/editor/filterComponent.jsx"; -import NewBoreholePanel from "../../commons/menu/mainView/sidePanelContent/newBoreholePanel.tsx"; -import { DrawerContentTypes } from "./editorComponentInterfaces.ts"; +import MainSideNav from "./layout/mainSideNav.tsx"; +import MapView from "./layout/mapView.jsx"; +import { SideDrawer } from "./layout/sideDrawer.tsx"; +import FilterComponent from "./sidePanelContent/filter/filterComponent.jsx"; +import NewBoreholePanel from "./sidePanelContent/newBoreholePanel.tsx"; +import { DrawerContentTypes } from "./overviewPageInterfaces.ts"; import { AlertContext } from "../../components/alert/alertContext.tsx"; -import CustomLayersPanel from "../../commons/menu/mainView/sidePanelContent/customLayers/customLayersPanel.jsx"; -import DetailHeader from "../../commons/menu/detailView/detailHeader.tsx"; +import CustomLayersPanel from "./sidePanelContent/customLayers/customLayersPanel.jsx"; +import { LayoutBox, MainContentBox, SidebarBox } from "../../components/styledComponents.js"; +import HeaderComponent from "../../components/header/headerComponent"; +import DetailHeader from "../detail/detailHeader"; +import { styled } from "@mui/material/styles"; +import { Box } from "@mui/material"; +import DetailSideNav from "../detail/detailSideNav"; +import BoreholeForm from "../detail/form/borehole/boreholeForm"; const AppBox = styled(Box)({ display: "flex", @@ -22,23 +22,7 @@ const AppBox = styled(Box)({ height: "100%", }); -const LayoutBox = styled(Box)({ flex: "1 1 100%", display: "flex", flexDirection: "row", overflow: "hidden" }); - -const SidebarBox = styled(Box)(() => ({ - flexShrink: 0, - borderRight: "1px solid " + theme.palette.boxShadow, - position: "relative", -})); - -const MainContentBox = styled(Box)({ - flex: "1 1 0%", - display: "flex", - flexDirection: "column", - overflow: "hidden", - position: "relative", -}); - -const EditorComponent = props => { +const OverviewPage = props => { const [sort, setSort] = useState(null); const [sideDrawerOpen, setSideDrawerOpen] = useState(false); const [bottomDrawerOpen, setBottomDrawerOpen] = useState(false); @@ -127,5 +111,5 @@ const EditorComponent = props => { ); }; -const EditorComponentWithRouter = withRouter(EditorComponent); -export default EditorComponentWithRouter; +const OverviewPageWithRouter = withRouter(OverviewPage); +export default OverviewPageWithRouter; diff --git a/src/client/src/pages/editor/editorComponentInterfaces.ts b/src/client/src/pages/overview/overviewPageInterfaces.ts similarity index 100% rename from src/client/src/pages/editor/editorComponentInterfaces.ts rename to src/client/src/pages/overview/overviewPageInterfaces.ts diff --git a/src/client/src/pages/editor/editorState.js b/src/client/src/pages/overview/overviewPageState.js similarity index 100% rename from src/client/src/pages/editor/editorState.js rename to src/client/src/pages/overview/overviewPageState.js diff --git a/src/client/src/commons/menu/mainView/actions/actionsInterfaces.ts b/src/client/src/pages/overview/sidePanelContent/commons/actionsInterfaces.ts similarity index 94% rename from src/client/src/commons/menu/mainView/actions/actionsInterfaces.ts rename to src/client/src/pages/overview/sidePanelContent/commons/actionsInterfaces.ts index 635fd7ea1..350e63088 100644 --- a/src/client/src/commons/menu/mainView/actions/actionsInterfaces.ts +++ b/src/client/src/pages/overview/sidePanelContent/commons/actionsInterfaces.ts @@ -1,7 +1,12 @@ import React from "react"; -import { ErrorResponse } from "../menuComponents/menuComponentInterfaces"; import { Workgroup } from "../../../../api-lib/ReduxStateInterfaces"; +export interface ErrorResponse { + detail: string; + errors: object; + message: string; +} + export interface WorkgroupSelectProps { workgroup: number | null; enabledWorkgroups: Workgroup[]; diff --git a/src/client/src/commons/menu/mainView/actions/workgroupSelect.tsx b/src/client/src/pages/overview/sidePanelContent/commons/workgroupSelect.tsx similarity index 91% rename from src/client/src/commons/menu/mainView/actions/workgroupSelect.tsx rename to src/client/src/pages/overview/sidePanelContent/commons/workgroupSelect.tsx index ba09c864a..e362f1e7d 100644 --- a/src/client/src/commons/menu/mainView/actions/workgroupSelect.tsx +++ b/src/client/src/pages/overview/sidePanelContent/commons/workgroupSelect.tsx @@ -1,6 +1,6 @@ -import TranslationText from "../../../form/translationText"; +import TranslationText from "../../../../components/legacyComponents/translationText"; import { Box, FormControl, MenuItem, Select } from "@mui/material/"; -import { WorkgroupSelectProps } from "./actionsInterfaces"; +import { WorkgroupSelectProps } from "./actionsInterfaces.ts"; const WorkgroupSelect = ({ workgroup, enabledWorkgroups, setWorkgroup }: WorkgroupSelectProps) => { return ( diff --git a/src/client/src/commons/menu/mainView/sidePanelContent/customLayers/customLayersComponent.jsx b/src/client/src/pages/overview/sidePanelContent/customLayers/customLayersComponent.jsx similarity index 97% rename from src/client/src/commons/menu/mainView/sidePanelContent/customLayers/customLayersComponent.jsx rename to src/client/src/pages/overview/sidePanelContent/customLayers/customLayersComponent.jsx index daf6039f1..97c1c82bd 100644 --- a/src/client/src/commons/menu/mainView/sidePanelContent/customLayers/customLayersComponent.jsx +++ b/src/client/src/pages/overview/sidePanelContent/customLayers/customLayersComponent.jsx @@ -1,5 +1,5 @@ import { Button, Checkbox, Icon } from "semantic-ui-react"; -import { SideDrawerHeader } from "../../sideDrawerHeader.tsx"; +import { SideDrawerHeader } from "../../layout/sideDrawerHeader.tsx"; import { useTranslation } from "react-i18next"; import { Box, Stack } from "@mui/material"; diff --git a/src/client/src/commons/menu/mainView/sidePanelContent/customLayers/customLayersPanel.jsx b/src/client/src/pages/overview/sidePanelContent/customLayers/customLayersPanel.jsx similarity index 96% rename from src/client/src/commons/menu/mainView/sidePanelContent/customLayers/customLayersPanel.jsx rename to src/client/src/pages/overview/sidePanelContent/customLayers/customLayersPanel.jsx index 1af4ecce9..f9374fa46 100644 --- a/src/client/src/commons/menu/mainView/sidePanelContent/customLayers/customLayersPanel.jsx +++ b/src/client/src/pages/overview/sidePanelContent/customLayers/customLayersPanel.jsx @@ -2,7 +2,7 @@ import { connect } from "react-redux"; import PropTypes from "prop-types"; import { CustomLayersComponent } from "./customLayersComponent.jsx"; -import { patchSettings } from "../../../../../api-lib/index.js"; +import { patchSettings } from "../../../../api-lib"; const CustomLayersPanel = props => { return ( diff --git a/src/client/src/commons/search/editor/FilterChips.tsx b/src/client/src/pages/overview/sidePanelContent/filter/FilterChips.tsx similarity index 84% rename from src/client/src/commons/search/editor/FilterChips.tsx rename to src/client/src/pages/overview/sidePanelContent/filter/FilterChips.tsx index e23cdc03c..31ed8b60c 100644 --- a/src/client/src/commons/search/editor/FilterChips.tsx +++ b/src/client/src/pages/overview/sidePanelContent/filter/FilterChips.tsx @@ -1,10 +1,15 @@ import { Box, Chip, Tooltip } from "@mui/material"; -import { Filter, FilterChipsProps } from "./FilterInterfaces"; +import { Filter } from "./FilterInterface.ts"; import { useTranslation } from "react-i18next"; -import DeleteIcon from "../../../assets/icons/delete.svg?react"; -import PolygonIcon from "../../../assets/icons/polygon.svg?react"; +import DeleteIcon from "../../../../assets/icons/delete.svg?react"; +import PolygonIcon from "../../../../assets/icons/polygon.svg?react"; import { useContext } from "react"; -import { FilterContext } from "../../../components/filter/filterContext"; +import { FilterContext } from "./filterContext.tsx"; + +interface FilterChipsProps { + activeFilters: Filter[]; + setFilter: (key: string, value: string | boolean | number | null) => void; +} const FilterChips = ({ activeFilters, setFilter }: FilterChipsProps) => { const { t } = useTranslation(); diff --git a/src/client/src/commons/search/editor/FilterInterfaces.ts b/src/client/src/pages/overview/sidePanelContent/filter/FilterInterface.ts similarity index 100% rename from src/client/src/commons/search/editor/FilterInterfaces.ts rename to src/client/src/pages/overview/sidePanelContent/filter/FilterInterface.ts diff --git a/src/client/src/commons/form/cantons/dropdown/cantonDropdown.jsx b/src/client/src/pages/overview/sidePanelContent/filter/cantonDropdown.jsx similarity index 96% rename from src/client/src/commons/form/cantons/dropdown/cantonDropdown.jsx rename to src/client/src/pages/overview/sidePanelContent/filter/cantonDropdown.jsx index 4eb25a6e4..6a426ff2a 100644 --- a/src/client/src/commons/form/cantons/dropdown/cantonDropdown.jsx +++ b/src/client/src/pages/overview/sidePanelContent/filter/cantonDropdown.jsx @@ -2,7 +2,7 @@ import React from "react"; import PropTypes from "prop-types"; import { Form, Header } from "semantic-ui-react"; -import { fetchApiV2 } from "../../../../api/fetchApiV2"; +import { fetchApiV2 } from "../../../../api/fetchApiV2.js"; class CantonDropdown extends React.Component { constructor(props) { diff --git a/src/client/src/commons/search/editor/filterComponent.jsx b/src/client/src/pages/overview/sidePanelContent/filter/filterComponent.jsx similarity index 91% rename from src/client/src/commons/search/editor/filterComponent.jsx rename to src/client/src/pages/overview/sidePanelContent/filter/filterComponent.jsx index a7ab37fc1..5ef171b40 100644 --- a/src/client/src/commons/search/editor/filterComponent.jsx +++ b/src/client/src/pages/overview/sidePanelContent/filter/filterComponent.jsx @@ -3,24 +3,24 @@ import PropTypes from "prop-types"; import { connect } from "react-redux"; import { withTranslation } from "react-i18next"; import _ from "lodash"; -import WorkgroupRadioGroup from "../../form/workgroup/radio"; -import StatusFilter from "../components/statusFilter"; -import { LocationSearchData } from "../data/LocationSearchData"; -import { boreholeSearchData } from "../data/boreholeSearchData"; -import { lithologySearchData } from "../data/lithologySearchData"; -import { registrationSearchData } from "../data/registrationSearchData"; -import { chronostratigraphySearchData } from "../data/chronostratigraphySearchData"; -import { lithostratigraphySearchData } from "../data/lithostratigraphySearchData"; -import { MenuItems } from "../../menu/mainView/menuComponents/menuItems"; +import WorkgroupRadioGroup from "./workgroupRadioGroup.jsx"; +import StatusFilter from "./statusFilter.jsx"; +import { LocationSearchData } from "./filterData/LocationSearchData.js"; +import { boreholeSearchData } from "./filterData/boreholeSearchData.js"; +import { lithologySearchData } from "./filterData/lithologySearchData.js"; +import { registrationSearchData } from "./filterData/registrationSearchData.js"; +import { chronostratigraphySearchData } from "./filterData/chronostratigraphySearchData.js"; +import { lithostratigraphySearchData } from "./filterData/lithostratigraphySearchData.js"; +import { FilterReset } from "./filterReset.tsx"; import { Accordion, AccordionDetails, AccordionSummary, Badge, Box, Button, Stack, Typography } from "@mui/material"; import { styled } from "@mui/material/styles"; -import ArrowDownIcon from "../../../assets/icons/arrow_down.svg?react"; -import ListFilter from "../components/listFilter.jsx"; -import { SideDrawerHeader } from "../../menu/mainView/sideDrawerHeader.tsx"; -import Polygon from "../../../assets/icons/polygon.svg?react"; -import { theme } from "../../../AppTheme.ts"; +import ArrowDownIcon from "../../../../assets/icons/arrow_down.svg?react"; +import ListFilter from "./listFilter.jsx"; +import { SideDrawerHeader } from "../../layout/sideDrawerHeader.tsx"; +import Polygon from "../../../../assets/icons/polygon.svg?react"; +import { theme } from "../../../../AppTheme.ts"; import FilterChips from "./FilterChips.tsx"; -import { FilterContext } from "../../../components/filter/filterContext.tsx"; +import { FilterContext } from "./filterContext.tsx"; class FilterComponent extends React.Component { static contextType = FilterContext; @@ -302,7 +302,7 @@ class FilterComponent extends React.Component { ); })} - + ); } diff --git a/src/client/src/components/filter/filterContext.tsx b/src/client/src/pages/overview/sidePanelContent/filter/filterContext.tsx similarity index 100% rename from src/client/src/components/filter/filterContext.tsx rename to src/client/src/pages/overview/sidePanelContent/filter/filterContext.tsx diff --git a/src/client/src/commons/search/data/LocationSearchData.js b/src/client/src/pages/overview/sidePanelContent/filter/filterData/LocationSearchData.js similarity index 100% rename from src/client/src/commons/search/data/LocationSearchData.js rename to src/client/src/pages/overview/sidePanelContent/filter/filterData/LocationSearchData.js diff --git a/src/client/src/commons/search/data/boreholeSearchData.js b/src/client/src/pages/overview/sidePanelContent/filter/filterData/boreholeSearchData.js similarity index 100% rename from src/client/src/commons/search/data/boreholeSearchData.js rename to src/client/src/pages/overview/sidePanelContent/filter/filterData/boreholeSearchData.js diff --git a/src/client/src/commons/search/data/chronostratigraphySearchData.js b/src/client/src/pages/overview/sidePanelContent/filter/filterData/chronostratigraphySearchData.js similarity index 100% rename from src/client/src/commons/search/data/chronostratigraphySearchData.js rename to src/client/src/pages/overview/sidePanelContent/filter/filterData/chronostratigraphySearchData.js diff --git a/src/client/src/commons/search/data/lithologySearchData.js b/src/client/src/pages/overview/sidePanelContent/filter/filterData/lithologySearchData.js similarity index 100% rename from src/client/src/commons/search/data/lithologySearchData.js rename to src/client/src/pages/overview/sidePanelContent/filter/filterData/lithologySearchData.js diff --git a/src/client/src/commons/search/data/lithostratigraphySearchData.js b/src/client/src/pages/overview/sidePanelContent/filter/filterData/lithostratigraphySearchData.js similarity index 100% rename from src/client/src/commons/search/data/lithostratigraphySearchData.js rename to src/client/src/pages/overview/sidePanelContent/filter/filterData/lithostratigraphySearchData.js diff --git a/src/client/src/commons/search/data/registrationSearchData.js b/src/client/src/pages/overview/sidePanelContent/filter/filterData/registrationSearchData.js similarity index 100% rename from src/client/src/commons/search/data/registrationSearchData.js rename to src/client/src/pages/overview/sidePanelContent/filter/filterData/registrationSearchData.js diff --git a/src/client/src/commons/menu/mainView/menuComponents/menuItems.tsx b/src/client/src/pages/overview/sidePanelContent/filter/filterReset.tsx similarity index 68% rename from src/client/src/commons/menu/mainView/menuComponents/menuItems.tsx rename to src/client/src/pages/overview/sidePanelContent/filter/filterReset.tsx index ff0ac0007..4d2b01b53 100644 --- a/src/client/src/commons/menu/mainView/menuComponents/menuItems.tsx +++ b/src/client/src/pages/overview/sidePanelContent/filter/filterReset.tsx @@ -1,8 +1,11 @@ -import TranslationText from "../../../form/translationText"; -import { MenuItemsProps } from "./menuComponentInterfaces"; +import TranslationText from "../../../../components/legacyComponents/translationText"; import { Button, Stack } from "@mui/material"; -export const MenuItems = ({ reset }: MenuItemsProps) => { +interface FilterResetProps { + reset: () => void; +} + +export const FilterReset = ({ reset }: FilterResetProps) => { return (