From 5a24ef258671035b19fc28716191d6a7a3c83005 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9line=20S=C3=A8be?= <87119259+CelineSebe@users.noreply.github.com> Date: Thu, 19 Sep 2024 12:43:12 +0200 Subject: [PATCH] [front] add missing breadcrumbs in customization+ fix(#8274) --- .../components/settings/decay/DecayRule.tsx | 8 ++++++++ .../components/settings/groups/Root.tsx | 4 ++-- .../settings/organizations/Root.tsx | 4 ++-- .../components/settings/roles/Root.tsx | 4 ++-- .../components/settings/sub_types/Root.tsx | 19 ++++++++++++++++--- 5 files changed, 30 insertions(+), 9 deletions(-) diff --git a/opencti-platform/opencti-front/src/private/components/settings/decay/DecayRule.tsx b/opencti-platform/opencti-front/src/private/components/settings/decay/DecayRule.tsx index ce8163737d94..0ad27d6b6bb7 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/decay/DecayRule.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/decay/DecayRule.tsx @@ -20,6 +20,7 @@ import CustomizationMenu from '../CustomizationMenu'; import { DecayRule_decayRule$key } from './__generated__/DecayRule_decayRule.graphql'; import useQueryLoading from '../../../../utils/hooks/useQueryLoading'; import Loader, { LoaderVariant } from '../../../../components/Loader'; +import Breadcrumbs from '../../../../components/Breadcrumbs'; // Deprecated - https://mui.com/system/styles/basics/ // Do not use it for new code. @@ -108,6 +109,13 @@ const DecayRuleComponent = ({ queryRef }: DecayRuleComponentProps) => { return (
+ {!decayRule.built_in && ( diff --git a/opencti-platform/opencti-front/src/private/components/settings/groups/Root.tsx b/opencti-platform/opencti-front/src/private/components/settings/groups/Root.tsx index 195321e41193..74282dd357d5 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/groups/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/groups/Root.tsx @@ -63,7 +63,7 @@ const RootGroupComponent: FunctionComponent = ({ queryR return ( {group ? ( -
+ <> = ({ queryR } /> -
+ ) : ( )} diff --git a/opencti-platform/opencti-front/src/private/components/settings/organizations/Root.tsx b/opencti-platform/opencti-front/src/private/components/settings/organizations/Root.tsx index 9adee08e2bce..051c708d5356 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/organizations/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/organizations/Root.tsx @@ -58,7 +58,7 @@ const RootSettingsOrganizationComponent: FunctionComponent {organization ? ( -
+ <> -
+ ) : ( )} diff --git a/opencti-platform/opencti-front/src/private/components/settings/roles/Root.tsx b/opencti-platform/opencti-front/src/private/components/settings/roles/Root.tsx index 05f6ea148be2..7ca688345b62 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/roles/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/roles/Root.tsx @@ -47,7 +47,7 @@ const RootRoleComponent: FunctionComponent = ({ queryRef return ( {role ? ( -
+ <> = ({ queryRef ) } -
+ ) : ( )} diff --git a/opencti-platform/opencti-front/src/private/components/settings/sub_types/Root.tsx b/opencti-platform/opencti-front/src/private/components/settings/sub_types/Root.tsx index 0391fa3f925c..be5fcdfeb2f7 100644 --- a/opencti-platform/opencti-front/src/private/components/settings/sub_types/Root.tsx +++ b/opencti-platform/opencti-front/src/private/components/settings/sub_types/Root.tsx @@ -5,6 +5,8 @@ import { RootSubTypeQuery } from '@components/settings/sub_types/__generated__/R import Loader from '../../../../components/Loader'; import ErrorNotFound from '../../../../components/ErrorNotFound'; import SubType from './SubType'; +import Breadcrumbs from '../../../../components/Breadcrumbs'; +import { useFormatter } from '../../../../components/i18n'; export const subTypeQuery = graphql` query RootSubTypeQuery($id: String!) { @@ -16,14 +18,25 @@ export const subTypeQuery = graphql` const RootSubType = () => { const { subTypeId } = useParams() as { subTypeId: string }; - + const { t_i18n } = useFormatter(); const data = useLazyLoadQuery(subTypeQuery, { id: subTypeId }); return ( }> { - data.subType ? : - } + data.subType ? ( + <> + + + + ) : ( + + )} ); };