From ff70fb9b19ff61348454c871199aa735e3e0187f Mon Sep 17 00:00:00 2001 From: Marie Flores <73853856+marieflorescontact@users.noreply.github.com> Date: Mon, 28 Oct 2024 18:12:07 +0100 Subject: [PATCH] [frontend] Fix delete button behaviour --- .../external_references/ExternalReference.tsx | 2 +- .../groupings/GroupingEditionContainer.jsx | 6 - .../groupings/GroupingEditionOverview.jsx | 32 +++-- .../MalwareAnalysisEditionContainer.tsx | 6 - .../MalwareAnalysisEditionOverview.tsx | 32 +++-- .../reports/ReportEditionContainer.jsx | 6 - .../reports/ReportEditionOverview.jsx | 15 +- .../analyses/reports/ReportPopover.jsx | 4 +- .../reports/ReportPopoverDeletion.tsx | 130 ++++++++++++++++++ .../CaseIncidentEditionOverview.tsx | 29 ++-- .../case_rfis/CaseRfiEditionOverview.tsx | 31 +++-- .../case_rfts/CaseRftEditionOverview.tsx | 29 ++-- .../feedbacks/FeedbackEditionOverview.tsx | 33 +++-- .../AdministrativeAreaEditionOverview.tsx | 33 +++-- .../locations/cities/CityEditionOverview.tsx | 33 +++-- .../countries/CountryEditionOverview.tsx | 33 +++-- .../positions/PositionEditionContainer.jsx | 6 - .../positions/PositionEditionOverview.jsx | 33 +++-- .../regions/RegionEditionOverview.tsx | 33 +++-- 19 files changed, 352 insertions(+), 174 deletions(-) create mode 100644 opencti-platform/opencti-front/src/private/components/analyses/reports/ReportPopoverDeletion.tsx diff --git a/opencti-platform/opencti-front/src/private/components/analyses/external_references/ExternalReference.tsx b/opencti-platform/opencti-front/src/private/components/analyses/external_references/ExternalReference.tsx index 0f7baf744cba..88da4f1f7c0d 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/external_references/ExternalReference.tsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/external_references/ExternalReference.tsx @@ -49,7 +49,7 @@ ExternalReferenceComponentProps + } EditComponent={isFABReplaced && ( diff --git a/opencti-platform/opencti-front/src/private/components/analyses/groupings/GroupingEditionContainer.jsx b/opencti-platform/opencti-front/src/private/components/analyses/groupings/GroupingEditionContainer.jsx index 9181db18f934..eba4e01c76fe 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/groupings/GroupingEditionContainer.jsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/groupings/GroupingEditionContainer.jsx @@ -5,7 +5,6 @@ import { useFormatter } from '../../../../components/i18n'; import GroupingEditionOverview from './GroupingEditionOverview'; import { useIsEnforceReference } from '../../../../utils/hooks/useEntitySettings'; import useHelper from '../../../../utils/hooks/useHelper'; -import GroupingDeletion from './GroupingDeletion'; const GroupingEditionContainer = (props) => { const { t_i18n } = useFormatter(); @@ -30,11 +29,6 @@ const GroupingEditionContainer = (props) => { context={editContext} handleClose={handleClose} /> - {isFABReplaced && ( - - )} ); diff --git a/opencti-platform/opencti-front/src/private/components/analyses/groupings/GroupingEditionOverview.jsx b/opencti-platform/opencti-front/src/private/components/analyses/groupings/GroupingEditionOverview.jsx index ed6ca1caa633..7ab9aba3576f 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/groupings/GroupingEditionOverview.jsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/groupings/GroupingEditionOverview.jsx @@ -3,6 +3,7 @@ import { createFragmentContainer, graphql } from 'react-relay'; import { Field, Form, Formik } from 'formik'; import * as Yup from 'yup'; import * as R from 'ramda'; +import GroupingDeletion from './GroupingDeletion'; import { useFormatter } from '../../../../components/i18n'; import TextField from '../../../../components/TextField'; import { SubscriptionFocus } from '../../../../components/Subscription'; @@ -19,6 +20,7 @@ import { fieldSpacingContainerStyle } from '../../../../utils/field'; import useFormEditor from '../../../../utils/hooks/useFormEditor'; import AlertConfidenceForEntity from '../../../../components/AlertConfidenceForEntity'; import { useDynamicSchemaEditionValidation, useIsMandatoryAttribute, yupShapeConditionalRequired } from '../../../../utils/hooks/useEntitySettings'; +import useHelper from '../../../../utils/hooks/useHelper'; export const groupingMutationFieldPatch = graphql` mutation GroupingEditionOverviewFieldPatchMutation( @@ -85,6 +87,8 @@ const GROUPING_TYPE = 'Grouping'; const GroupingEditionOverviewComponent = (props) => { const { grouping, enableReferences, context, handleClose } = props; const { t_i18n } = useFormatter(); + const { isFeatureEnable } = useHelper(); + const isFABReplaced = isFeatureEnable('FAB_REPLACEMENT'); const { mandatoryAttributes } = useIsMandatoryAttribute(GROUPING_TYPE); @@ -288,16 +292,24 @@ const GroupingEditionOverviewComponent = (props) => { setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/analyses/malware_analyses/MalwareAnalysisEditionContainer.tsx b/opencti-platform/opencti-front/src/private/components/analyses/malware_analyses/MalwareAnalysisEditionContainer.tsx index 41a39f56464e..a683c24ee4f4 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/malware_analyses/MalwareAnalysisEditionContainer.tsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/malware_analyses/MalwareAnalysisEditionContainer.tsx @@ -9,14 +9,12 @@ import { } from '@components/analyses/malware_analyses/__generated__/MalwareAnalysisEditionOverview_malwareAnalysis.graphql'; import { MalwareAnalysisEditionDetails_malwareAnalysis$key } from '@components/analyses/malware_analyses/__generated__/MalwareAnalysisEditionDetails_malwareAnalysis.graphql'; import useHelper from 'src/utils/hooks/useHelper'; -import { useParams } from 'react-router-dom'; import { useFormatter } from '../../../../components/i18n'; import ErrorNotFound from '../../../../components/ErrorNotFound'; import MalwareAnalysisEditionOverview from './MalwareAnalysisEditionOverview'; import { MalwareAnalysisEditionContainerQuery } from './__generated__/MalwareAnalysisEditionContainerQuery.graphql'; import MalwareAnalysisEditionDetails from './MalwareAnalysisEditionDetails'; import { useIsEnforceReference } from '../../../../utils/hooks/useEntitySettings'; -import MalwareAnalysisDeletion from './MalwareAnalysisDeletion'; interface MalwareAnalysisEditionContainerProps { queryRef: PreloadedQuery @@ -46,7 +44,6 @@ const MalwareAnalysisEditionContainer: FunctionComponent )} - {isFABReplaced && ( - - )} )} diff --git a/opencti-platform/opencti-front/src/private/components/analyses/malware_analyses/MalwareAnalysisEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/analyses/malware_analyses/MalwareAnalysisEditionOverview.tsx index de0bf242bcf8..f0714b5767ad 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/malware_analyses/MalwareAnalysisEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/malware_analyses/MalwareAnalysisEditionOverview.tsx @@ -5,6 +5,7 @@ import * as Yup from 'yup'; import { FormikConfig } from 'formik/dist/types'; import { GenericContext } from '@components/common/model/GenericContextModel'; import ObjectAssigneeField from '@components/common/form/ObjectAssigneeField'; +import MalwareAnalysisDeletion from '@components/analyses/malware_analyses/MalwareAnalysisDeletion'; import TextField from '../../../../components/TextField'; import { SubscriptionFocus } from '../../../../components/Subscription'; import CreatedByField from '../../common/form/CreatedByField'; @@ -25,6 +26,7 @@ import useFormEditor, { GenericData } from '../../../../utils/hooks/useFormEdito import AlertConfidenceForEntity from '../../../../components/AlertConfidenceForEntity'; import { parse } from '../../../../utils/Time'; import { useDynamicSchemaEditionValidation, useIsMandatoryAttribute, yupShapeConditionalRequired } from '../../../../utils/hooks/useEntitySettings'; +import useHelper from '../../../../utils/hooks/useHelper'; const malwareAnalysisMutationFieldPatch = graphql` mutation MalwareAnalysisEditionOverviewFieldPatchMutation( @@ -144,6 +146,10 @@ MalwareAnalysisEditionOverviewProps handleClose, }) => { const { t_i18n } = useFormatter(); + + const { isFeatureEnable } = useHelper(); + const isFABReplaced = isFeatureEnable('FAB_REPLACEMENT'); + const { mandatoryAttributes } = useIsMandatoryAttribute(MALWARE_ANALYSIS_TYPE); const basicShape = yupShapeConditionalRequired({ product: Yup.string(), @@ -372,16 +378,22 @@ MalwareAnalysisEditionOverviewProps setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportEditionContainer.jsx b/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportEditionContainer.jsx index bc44315be57f..0c7209080e4e 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportEditionContainer.jsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportEditionContainer.jsx @@ -5,7 +5,6 @@ import { useFormatter } from '../../../../components/i18n'; import ReportEditionOverview from './ReportEditionOverview'; import { useIsEnforceReference } from '../../../../utils/hooks/useEntitySettings'; import Drawer, { DrawerVariant } from '../../common/drawer/Drawer'; -import ReportDeletion from './ReportDeletion'; const ReportEditionContainer = (props) => { const { t_i18n } = useFormatter(); @@ -31,11 +30,6 @@ const ReportEditionContainer = (props) => { context={editContext} handleClose={handleClose} /> - {isFABReplaced && ( - - )} ); diff --git a/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportEditionOverview.jsx b/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportEditionOverview.jsx index 6ebae1daa285..c2176df73763 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportEditionOverview.jsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportEditionOverview.jsx @@ -3,6 +3,7 @@ import { createFragmentContainer, graphql } from 'react-relay'; import { Field, Form, Formik } from 'formik'; import * as Yup from 'yup'; import * as R from 'ramda'; +import ReportDeletion from './ReportDeletion'; import { buildDate, parse } from '../../../../utils/Time'; import { useFormatter } from '../../../../components/i18n'; import TextField from '../../../../components/TextField'; @@ -23,6 +24,7 @@ import useFormEditor from '../../../../utils/hooks/useFormEditor'; import ObjectParticipantField from '../../common/form/ObjectParticipantField'; import AlertConfidenceForEntity from '../../../../components/AlertConfidenceForEntity'; import { useDynamicSchemaEditionValidation, useIsMandatoryAttribute, yupShapeConditionalRequired } from '../../../../utils/hooks/useEntitySettings'; +import useHelper from '../../../../utils/hooks/useHelper'; export const reportMutationFieldPatch = graphql` mutation ReportEditionOverviewFieldPatchMutation( @@ -89,6 +91,8 @@ const REPORT_TYPE = 'Report'; const ReportEditionOverviewComponent = (props) => { const { report, enableReferences, context, handleClose } = props; const { t_i18n } = useFormatter(); + const { isFeatureEnable } = useHelper(); + const isFABReplaced = isFeatureEnable('FAB_REPLACEMENT'); const { mandatoryAttributes } = useIsMandatoryAttribute(REPORT_TYPE); const basicShape = yupShapeConditionalRequired({ @@ -347,7 +351,13 @@ const ReportEditionOverviewComponent = (props) => { onChange={editor.changeMarking} required={mandatoryAttributes.includes('objectMarking')} /> - {enableReferences && ( +
+ {isFABReplaced + ? + :
} + {enableReferences && ( { values={values.references} id={report.id} /> - )} + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportPopover.jsx b/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportPopover.jsx index f17f86a924ce..25adc7adbeb5 100644 --- a/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportPopover.jsx +++ b/opencti-platform/opencti-front/src/private/components/analyses/reports/ReportPopover.jsx @@ -3,6 +3,7 @@ import Menu from '@mui/material/Menu'; import MenuItem from '@mui/material/MenuItem'; import MoreVert from '@mui/icons-material/MoreVert'; import ToggleButton from '@mui/material/ToggleButton'; +import ReportPopoverDeletion from './ReportPopoverDeletion'; import StixCoreObjectEnrichment from '../../common/stix_core_objects/StixCoreObjectEnrichment'; import { useFormatter } from '../../../../components/i18n'; import { reportEditionQuery } from './ReportEdition'; @@ -10,7 +11,6 @@ import ReportEditionContainer from './ReportEditionContainer'; import Security from '../../../../utils/Security'; import { KNOWLEDGE_KNENRICHMENT, KNOWLEDGE_KNUPDATE_KNDELETE } from '../../../../utils/hooks/useGranted'; import { QueryRenderer } from '../../../../relay/environment'; -import ReportDeletion from './ReportDeletion'; import useHelper from '../../../../utils/hooks/useHelper'; const ReportPopover = ({ id }) => { @@ -66,7 +66,7 @@ const ReportPopover = ({ id }) => { - void; + handleCloseDelete: () => void; +} + +const ReportPopoverDeletion: FunctionComponent = ({ + reportId, + displayDelete, + handleClose, + handleCloseDelete, +}) => { + const { t_i18n } = useFormatter(); + const theme = useTheme(); + const navigate = useNavigate(); + const [purgeElements, setPurgeElements] = useState(false); + const [deleting, setDeleting] = useState(false); + const [commitMutation] = useApiMutation(reportPopoverDeletionMutation); + const submitDelete = () => { + setDeleting(true); + commitMutation({ + variables: { id: reportId, purgeElements }, + onCompleted: () => { + setDeleting(false); + handleClose(); + navigate('/dashboard/analyses/reports'); + }, + }); + }; + return ( + + + + {t_i18n('Do you want to delete this report?')} + + { + const numberOfDeletions = result.props?.report?.deleteWithElementsCount ?? 0; + if (numberOfDeletions === 0) return
; + return ( + + {t_i18n('Cascade delete')} + {t_i18n('In this report, ')}  + + {numberOfDeletions} + +   + {t_i18n( + 'element(s) are not linked to any other reports and will be orphan after the deletion.', + )} + + setPurgeElements(!purgeElements)} + /> + } + label={t_i18n('Also delete these elements')} + /> + + + ); + }} + > + + + + + +
+ ); +}; + +export default ReportPopoverDeletion; diff --git a/opencti-platform/opencti-front/src/private/components/cases/case_incidents/CaseIncidentEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/cases/case_incidents/CaseIncidentEditionOverview.tsx index d25111f0e8c5..5260fecdad13 100644 --- a/opencti-platform/opencti-front/src/private/components/cases/case_incidents/CaseIncidentEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/cases/case_incidents/CaseIncidentEditionOverview.tsx @@ -407,19 +407,22 @@ const CaseIncidentEditionOverview: FunctionComponent - {enableReferences && ( - - )} - {isFABReplaced && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/cases/case_rfis/CaseRfiEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/cases/case_rfis/CaseRfiEditionOverview.tsx index fef9373a3a3a..9737efa74e69 100644 --- a/opencti-platform/opencti-front/src/private/components/cases/case_rfis/CaseRfiEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/cases/case_rfis/CaseRfiEditionOverview.tsx @@ -272,7 +272,7 @@ const CaseRfiEditionOverview: FunctionComponent = ( dirty, }) => (
- + = ( setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} - {isFABReplaced && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/cases/case_rfts/CaseRftEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/cases/case_rfts/CaseRftEditionOverview.tsx index f80153e2eb67..29bc7f94990c 100644 --- a/opencti-platform/opencti-front/src/private/components/cases/case_rfts/CaseRftEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/cases/case_rfts/CaseRftEditionOverview.tsx @@ -402,19 +402,22 @@ const CaseRftEditionOverview: FunctionComponent = ( setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} - {isFABReplaced && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/cases/feedbacks/FeedbackEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/cases/feedbacks/FeedbackEditionOverview.tsx index 683d28d8bd6c..42f0a91be055 100644 --- a/opencti-platform/opencti-front/src/private/components/cases/feedbacks/FeedbackEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/cases/feedbacks/FeedbackEditionOverview.tsx @@ -337,21 +337,24 @@ FeedbackEditionOverviewProps setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} - {isFABReplaced && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/locations/administrative_areas/AdministrativeAreaEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/locations/administrative_areas/AdministrativeAreaEditionOverview.tsx index d22a4899aa5a..77ffd7eb3532 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/administrative_areas/AdministrativeAreaEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/administrative_areas/AdministrativeAreaEditionOverview.tsx @@ -347,21 +347,24 @@ AdministrativeAreaEditionOverviewProps setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} - {isFABReplaced && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/locations/cities/CityEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/locations/cities/CityEditionOverview.tsx index f91306d3319c..fd22f776021f 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/cities/CityEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/cities/CityEditionOverview.tsx @@ -334,21 +334,24 @@ const CityEditionOverview: FunctionComponent = ({ setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} - {isFABReplaced && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/locations/countries/CountryEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/locations/countries/CountryEditionOverview.tsx index e7e7c381d444..1a73cc32d6c0 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/countries/CountryEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/countries/CountryEditionOverview.tsx @@ -302,21 +302,24 @@ CountryEditionOverviewProps setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} - {isFABReplaced && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/locations/positions/PositionEditionContainer.jsx b/opencti-platform/opencti-front/src/private/components/locations/positions/PositionEditionContainer.jsx index 913a09f560b4..05c9bbb17e52 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/positions/PositionEditionContainer.jsx +++ b/opencti-platform/opencti-front/src/private/components/locations/positions/PositionEditionContainer.jsx @@ -5,7 +5,6 @@ import PositionEditionOverview from './PositionEditionOverview'; import { useIsEnforceReference } from '../../../../utils/hooks/useEntitySettings'; import Drawer, { DrawerVariant } from '../../common/drawer/Drawer'; import useHelper from '../../../../utils/hooks/useHelper'; -import PositionDeletion from './PositionDeletion'; const PositionEditionContainer = (props) => { const { t_i18n } = useFormatter(); @@ -29,11 +28,6 @@ const PositionEditionContainer = (props) => { context={editContext} handleClose={handleClose} /> - {isFABReplaced && ( - - )} ); diff --git a/opencti-platform/opencti-front/src/private/components/locations/positions/PositionEditionOverview.jsx b/opencti-platform/opencti-front/src/private/components/locations/positions/PositionEditionOverview.jsx index 87e42234370e..c99427b8d085 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/positions/PositionEditionOverview.jsx +++ b/opencti-platform/opencti-front/src/private/components/locations/positions/PositionEditionOverview.jsx @@ -3,6 +3,7 @@ import { createFragmentContainer, graphql } from 'react-relay'; import { Field, Form, Formik } from 'formik'; import * as Yup from 'yup'; import * as R from 'ramda'; +import PositionDeletion from './PositionDeletion'; import ConfidenceField from '../../common/form/ConfidenceField'; import { useFormatter } from '../../../../components/i18n'; import TextField from '../../../../components/TextField'; @@ -18,6 +19,7 @@ import { useSchemaEditionValidation } from '../../../../utils/hooks/useEntitySet import useFormEditor from '../../../../utils/hooks/useFormEditor'; import { fieldSpacingContainerStyle } from '../../../../utils/field'; import AlertConfidenceForEntity from '../../../../components/AlertConfidenceForEntity'; +import useHelper from '../../../../utils/hooks/useHelper'; const positionMutationFieldPatch = graphql` mutation PositionEditionOverviewFieldPatchMutation( @@ -84,6 +86,9 @@ const positionMutationRelationDelete = graphql` const PositionEditionOverviewComponent = (props) => { const { position, enableReferences, context, handleClose } = props; const { t_i18n } = useFormatter(); + const { isFeatureEnable } = useHelper(); + const isFABReplaced = isFeatureEnable('FAB_REPLACEMENT'); + const basicShape = { name: Yup.string().trim().min(2).required(t_i18n('This field is required')), description: Yup.string().nullable().max(5000, t_i18n('The value is too long')), @@ -321,16 +326,24 @@ const PositionEditionOverviewComponent = (props) => { setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)} diff --git a/opencti-platform/opencti-front/src/private/components/locations/regions/RegionEditionOverview.tsx b/opencti-platform/opencti-front/src/private/components/locations/regions/RegionEditionOverview.tsx index 9b48a24d37cd..4ff1ae3aeea4 100644 --- a/opencti-platform/opencti-front/src/private/components/locations/regions/RegionEditionOverview.tsx +++ b/opencti-platform/opencti-front/src/private/components/locations/regions/RegionEditionOverview.tsx @@ -302,21 +302,24 @@ RegionEdititionOverviewProps setFieldValue={setFieldValue} onChange={editor.changeMarking} /> - {enableReferences && ( - - )} - {isFABReplaced && ( - - )} +
+ {isFABReplaced + ? + :
+ } + {enableReferences && ( + + )} +
)}