From 9a87456674a163df45dd34caba0fd02928d60259 Mon Sep 17 00:00:00 2001 From: Roan Paulus <123072030+RoanPaulus@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:09:28 +0100 Subject: [PATCH] MIJN-9753-BUG/parkeerontheffingen-blauwe-zone-bedrijven-wordt-niet-getoond-onder-thema-parkeren-bij-inlog-met-eh (#1697) * Turned off feature toggles, because not reflecting main * added blauwe kaart ontheffing voor bedrijven * updated snapshot --------- Co-authored-by: Tim van Oostrom --- .../__snapshots__/Parkeren.test.tsx.snap | 24 +++++++++--------- .../__snapshots__/ParkerenList.test.tsx.snap | 24 +++++++++--------- .../pages/Parkeren/useParkerenData.hook.tsx | 25 ++++++++++--------- src/universal/config/feature-toggles.ts | 4 +-- 4 files changed, 39 insertions(+), 38 deletions(-) diff --git a/src/client/pages/Parkeren/__snapshots__/Parkeren.test.tsx.snap b/src/client/pages/Parkeren/__snapshots__/Parkeren.test.tsx.snap index 0cf67e9403..2f5b62c975 100644 --- a/src/client/pages/Parkeren/__snapshots__/Parkeren.test.tsx.snap +++ b/src/client/pages/Parkeren/__snapshots__/Parkeren.test.tsx.snap @@ -211,6 +211,11 @@ exports[`Parkeren > should display the list of parkeervergunningen 1`] = ` + + Z/24/2233516 + @@ -218,14 +223,9 @@ exports[`Parkeren > should display the list of parkeervergunningen 1`] = ` class="ams-link ams-link--standalone _MaRouterLink__no-underline-fat_aa758a" href="/parkeren/gpp/Z-24-2233516" > - Z/24/2233516 + Vergunning 1 - - Vergunning 1 - @@ -235,6 +235,11 @@ exports[`Parkeren > should display the list of parkeervergunningen 1`] = ` + + Z/24/2233516 + @@ -242,14 +247,9 @@ exports[`Parkeren > should display the list of parkeervergunningen 1`] = ` class="ams-link ams-link--standalone _MaRouterLink__no-underline-fat_aa758a" href="/parkeren/gpp/Z-24-2233516" > - Z/24/2233516 + Vergunning 2 - - Vergunning 2 - diff --git a/src/client/pages/Parkeren/__snapshots__/ParkerenList.test.tsx.snap b/src/client/pages/Parkeren/__snapshots__/ParkerenList.test.tsx.snap index f69c3cf3e5..f9774f9ecf 100644 --- a/src/client/pages/Parkeren/__snapshots__/ParkerenList.test.tsx.snap +++ b/src/client/pages/Parkeren/__snapshots__/ParkerenList.test.tsx.snap @@ -108,6 +108,11 @@ exports[`ParkerenList > should display the list of parkeervergunningen 1`] = ` + + Z/24/2233516 + @@ -115,14 +120,9 @@ exports[`ParkerenList > should display the list of parkeervergunningen 1`] = ` class="ams-link ams-link--standalone _MaRouterLink__no-underline-fat_aa758a" href="/parkeren/gpp/Z-24-2233516" > - Z/24/2233516 + Vergunning 1 - - Vergunning 1 - @@ -132,6 +132,11 @@ exports[`ParkerenList > should display the list of parkeervergunningen 1`] = ` + + Z/24/2233516 + @@ -139,14 +144,9 @@ exports[`ParkerenList > should display the list of parkeervergunningen 1`] = ` class="ams-link ams-link--standalone _MaRouterLink__no-underline-fat_aa758a" href="/parkeren/gpp/Z-24-2233516" > - Z/24/2233516 + Vergunning 2 - - Vergunning 2 - diff --git a/src/client/pages/Parkeren/useParkerenData.hook.tsx b/src/client/pages/Parkeren/useParkerenData.hook.tsx index 25173cc95f..b454c69206 100644 --- a/src/client/pages/Parkeren/useParkerenData.hook.tsx +++ b/src/client/pages/Parkeren/useParkerenData.hook.tsx @@ -12,6 +12,7 @@ export const PARKEER_CASE_TYPES: Set = new Set([ CaseType.GPK, CaseType.GPP, CaseType.BZP, + CaseType.BZB, CaseType.EigenParkeerplaats, CaseType.EigenParkeerplaatsOpheffen, CaseType.TouringcarDagontheffing, @@ -21,19 +22,19 @@ export const PARKEER_CASE_TYPES: Set = new Set([ function getVergunningenFromThemaVergunningen( content: VergunningFrontendV2[] | Vergunning[] | null ) { + const vergunningen = (content ?? []) + .filter((vergunning) => { + return PARKEER_CASE_TYPES.has(vergunning.caseType as DecosCaseType); + }) + .map((vergunning) => ({ + ...vergunning, + link: { + ...vergunning.link, + to: vergunning.link.to.replace('vergunningen', 'parkeren'), + }, + })); return addLinkElementToProperty( - (content ?? []) - .filter((vergunning) => - PARKEER_CASE_TYPES.has(vergunning.caseType as DecosCaseType) - ) - .map((vergunning) => ({ - ...vergunning, - link: { - ...vergunning.link, - to: vergunning.link.to.replace('vergunningen', 'parkeren'), - }, - })), - 'identifier' + vergunningen ); } diff --git a/src/universal/config/feature-toggles.ts b/src/universal/config/feature-toggles.ts index bc014662e5..a69b89db44 100644 --- a/src/universal/config/feature-toggles.ts +++ b/src/universal/config/feature-toggles.ts @@ -107,8 +107,8 @@ export const FeatureToggle = { // Vergunningen V1 (met koppel api) vergunningenActive: true, // Vergunningen V2 met BFF integratie - vergunningenV2Active: IS_DEVELOPMENT, // TODO: Enable when working on MIJN-8914 - decosServiceActive: IS_DEVELOPMENT, // TODO: Enable when working on MIJN-8914 + vergunningenV2Active: false, // TODO: Enable when working on MIJN-8914 + decosServiceActive: false, // TODO: Enable when working on MIJN-8914 // WIOR Kaar data wiorDatasetActive: true,