diff --git a/src/client/cypress/e2e/editor/lithologicalDescription.cy.js b/src/client/cypress/e2e/editor/lithologicalDescription.cy.js index 16b8afafc..13255ae1e 100644 --- a/src/client/cypress/e2e/editor/lithologicalDescription.cy.js +++ b/src/client/cypress/e2e/editor/lithologicalDescription.cy.js @@ -88,7 +88,7 @@ describe("Tests for the lithological description column.", () => { // delete last layer cy.get('[data-cy="description-1"] [data-testid="DeleteIcon"] ').click(); - deleteItem(); + deleteItem("description-button-box"); cy.wait("@lithological_description"); // delete request cy.wait("@lithological_description"); // updated get request cy.wait(5000); @@ -119,7 +119,7 @@ describe("Tests for the lithological description column.", () => { // assert error message cy.get('[data-cy="description-1"]').contains("You are about to delete this layer, how do you want to proceed?"); - deleteItem(); + deleteItem("description-button-box"); cy.wait("@lithological_description"); // delete request cy.wait("@lithological_description"); // updated get request cy.get('[data-cy="description-1"]').contains("There is an undefined interval in the sequence"); diff --git a/src/client/src/components/buttons/buttons.tsx b/src/client/src/components/buttons/buttons.tsx index 7d76d1c3a..21af61d5f 100644 --- a/src/client/src/components/buttons/buttons.tsx +++ b/src/client/src/components/buttons/buttons.tsx @@ -60,6 +60,6 @@ export const DeleteButton = forwardRef((props, r return } />; }); -export const DeletePrimaryButton = forwardRef((props, ref) => { - return } />; +export const SavePrimaryButton = forwardRef((props, ref) => { + return } />; }); diff --git a/src/client/src/components/legacyComponents/multiple/multipleForm.jsx b/src/client/src/components/legacyComponents/multiple/multipleForm.jsx index de6b2c2ef..540f698ab 100644 --- a/src/client/src/components/legacyComponents/multiple/multipleForm.jsx +++ b/src/client/src/components/legacyComponents/multiple/multipleForm.jsx @@ -4,16 +4,14 @@ import { connect } from "react-redux"; import { withTranslation } from "react-i18next"; import _ from "lodash"; import { produce } from "immer"; - +import { FormControl, FormControlLabel, Radio, RadioGroup } from "@mui/material"; 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.js"; +import { CancelButton, SavePrimaryButton } from "../../buttons/buttons"; class MultipleForm extends React.Component { constructor(props) { @@ -392,20 +390,14 @@ class MultipleForm extends React.Component { style={{ textAlign: "right", }}> - - + }}> ); diff --git a/src/client/src/pages/detail/attachments/table/filesTableComponent.jsx b/src/client/src/pages/detail/attachments/table/filesTableComponent.jsx index 0a697f67e..bedbf0986 100644 --- a/src/client/src/pages/detail/attachments/table/filesTableComponent.jsx +++ b/src/client/src/pages/detail/attachments/table/filesTableComponent.jsx @@ -1,9 +1,11 @@ import PropTypes from "prop-types"; import { withTranslation } from "react-i18next"; -import { Button, Checkbox, Icon, Table, TextArea } from "semantic-ui-react"; +import { Checkbox, Icon, Table, TextArea } from "semantic-ui-react"; import DateText from "../../../../components/legacyComponents/dateText.js"; import DownloadLink from "../downloadlink.jsx"; import { downloadBoreholeAttachment } from "../../../../api/fetchApiV2.js"; +import { IconButton } from "@mui/material"; +import TrashIcon from "../../../../assets/icons/trash.svg?react"; const FilesTableComponent = props => { const { t } = props; @@ -89,17 +91,14 @@ const FilesTableComponent = props => { {props.unlocked === true ? ( - + color="error"> + + ) : null} diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/infoCheckBox.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/infoCheckBox.jsx index 5b1bcb82b..e0bcecbe7 100644 --- a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/infoCheckBox.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyInfo/infoCheckBox/infoCheckBox.jsx @@ -1,7 +1,8 @@ import * as Styled from "./styles.js"; -import { Button, Checkbox, Icon, Popup } from "semantic-ui-react"; +import { Checkbox, Popup } from "semantic-ui-react"; import { copyStratigraphy, deleteStratigraphy } from "../../../../../../../api/fetchApiV2.js"; import { useTranslation } from "react-i18next"; +import { CopyButton, DeleteButton } from "../../../../../../../components/buttons/buttons"; const InfoCheckBox = props => { const { profileInfo, updateChange, isEditable, onUpdated } = props.data; @@ -24,40 +25,23 @@ const InfoCheckBox = props => { {isEditable && (
- - - - - }> + }}> + }> {t("deleteForever")}?
- + />
)} diff --git a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx index 6d786fce1..446b417da 100644 --- a/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx +++ b/src/client/src/pages/detail/form/stratigraphy/lithology/lithologyLayers/descriptionLayers/descriptionDeleteDialog.jsx @@ -22,7 +22,10 @@ const DescriptionDeleteDialog = props => { {t("deletelayerconfirmation")} - + { e.stopPropagation();