From e137964c2e62421fb3ddc967dd2a6b33ff2137cf Mon Sep 17 00:00:00 2001 From: Sindre Moldeklev Date: Tue, 3 Dec 2024 08:12:19 +0100 Subject: [PATCH] Vis logg ut i prod for admin-flate og fjern debug-toggle --- .../administrator/AdministratorHeader.tsx | 38 ++++++++----------- .../mocks/endpoints/featureToggleHandlers.ts | 1 - .../api/endpoints/featureToggleHandlers.ts | 1 - .../src/main/resources/web/openapi.yaml | 1 - 4 files changed, 15 insertions(+), 26 deletions(-) diff --git a/frontend/mr-admin-flate/src/components/administrator/AdministratorHeader.tsx b/frontend/mr-admin-flate/src/components/administrator/AdministratorHeader.tsx index 033bf0aed1..7ae617c1c4 100644 --- a/frontend/mr-admin-flate/src/components/administrator/AdministratorHeader.tsx +++ b/frontend/mr-admin-flate/src/components/administrator/AdministratorHeader.tsx @@ -1,25 +1,19 @@ import { useHentAnsatt } from "@/api/ansatt/useHentAnsatt"; -import { useFeatureToggle } from "@/api/features/useFeatureToggle"; -import { ExternalLinkIcon, MenuGridIcon } from "@navikt/aksel-icons"; -import { Dropdown, InternalHeader, Spacer } from "@navikt/ds-react"; -import { Toggles } from "@mr/api-client"; -import { InlineErrorBoundary } from "@mr/frontend-common"; -import { useRef } from "react"; -import { Link } from "react-router-dom"; import { ENDRINGSMELDINGER_URL, LOGOUT_AND_SELECT_ACCOUNT_URL, PREVIEW_ARBEIDSMARKEDSTILTAK_URL, SANITY_STUDIO_URL, } from "@/constants"; +import { InlineErrorBoundary } from "@mr/frontend-common"; +import { ExternalLinkIcon, MenuGridIcon } from "@navikt/aksel-icons"; +import { Dropdown, InternalHeader, Spacer } from "@navikt/ds-react"; +import { useRef } from "react"; +import { Link } from "react-router-dom"; import { Notifikasjonsbjelle } from "../notifikasjoner/Notifikasjonsbjelle"; import styles from "./AdministratorHeader.module.scss"; export function AdministratorHeader() { - const { data: debugIsEnabled } = useFeatureToggle( - Toggles.MULIGHETSROMMET_ADMIN_FLATE_ENABLE_DEBUGGER, - ); - const tiltakstyperLinkRef = useRef(null); const avtalerLinkRef = useRef(null); const gjennomforingerLinkRef = useRef(null); @@ -136,18 +130,16 @@ export function AdministratorHeader() { - {debugIsEnabled ? ( - <> - - - logoutLinkRef.current?.click()}> - - Logg ut - - - - - ) : null} + <> + + + logoutLinkRef.current?.click()}> + + Logg ut + + + + diff --git a/frontend/mr-admin-flate/src/mocks/endpoints/featureToggleHandlers.ts b/frontend/mr-admin-flate/src/mocks/endpoints/featureToggleHandlers.ts index 53f7606bf3..9b632b7215 100644 --- a/frontend/mr-admin-flate/src/mocks/endpoints/featureToggleHandlers.ts +++ b/frontend/mr-admin-flate/src/mocks/endpoints/featureToggleHandlers.ts @@ -3,7 +3,6 @@ import { Features } from "@/api/features/useFeatureToggle"; import { Toggles } from "@mr/api-client"; const mockFeatures: Features = { - [Toggles.MULIGHETSROMMET_ADMIN_FLATE_ENABLE_DEBUGGER]: true, [Toggles.MULIGHETSROMMET_ADMIN_FLATE_OPPRETT_TILSAGN]: true, [Toggles.MULIGHETSROMMET_VEILEDERFLATE_VIS_TILBAKEMELDING]: true, [Toggles.MULIGHETSROMMET_TILTAKSTYPE_MIGRERING_DELTAKER]: true, diff --git a/frontend/mulighetsrommet-veileder-flate/src/mock/api/endpoints/featureToggleHandlers.ts b/frontend/mulighetsrommet-veileder-flate/src/mock/api/endpoints/featureToggleHandlers.ts index 9fc955f2c8..4c44fad839 100644 --- a/frontend/mulighetsrommet-veileder-flate/src/mock/api/endpoints/featureToggleHandlers.ts +++ b/frontend/mulighetsrommet-veileder-flate/src/mock/api/endpoints/featureToggleHandlers.ts @@ -3,7 +3,6 @@ import { Features } from "@/api/feature-toggles"; import { Toggles } from "@mr/api-client"; const mockFeatures: Features = { - [Toggles.MULIGHETSROMMET_ADMIN_FLATE_ENABLE_DEBUGGER]: true, [Toggles.MULIGHETSROMMET_ADMIN_FLATE_OPPRETT_TILSAGN]: true, [Toggles.MULIGHETSROMMET_VEILEDERFLATE_VIS_TILBAKEMELDING]: true, [Toggles.MULIGHETSROMMET_TILTAKSTYPE_MIGRERING_DELTAKER]: true, diff --git a/mulighetsrommet-api/src/main/resources/web/openapi.yaml b/mulighetsrommet-api/src/main/resources/web/openapi.yaml index 80f92acec4..0094bb90a8 100644 --- a/mulighetsrommet-api/src/main/resources/web/openapi.yaml +++ b/mulighetsrommet-api/src/main/resources/web/openapi.yaml @@ -4153,7 +4153,6 @@ components: type: string enum: - mulighetsrommet-veilederflate.vis-tilbakemelding - - mulighetsrommet.admin-flate.enableDebugger - mulighetsrommet.admin-flate.opprett-tilsagn - mulighetsrommet.tiltakstype.migrering.deltaker - mulighetsrommet.tiltakstype.pamelding-info-komet