diff --git a/package-lock.json b/package-lock.json index 20fc68070..29272ebb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@amsterdam/design-system-tokens": "^0.13.0", "@amsterdam/piwik-tracker": "^2.0.3", "@amsterdam/react-maps": "^1.1.1", + "@esbuild/win32-x64": "^0.24.0", "@microsoft/applicationinsights-react-js": "^17.3.4", "@microsoft/applicationinsights-web": "^3.3.4", "@react-spring/web": "^9.7.5", @@ -856,6 +857,81 @@ "kuler": "^2.0.0" } }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/darwin-x64": { "version": "0.21.5", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", @@ -871,6 +947,260 @@ "node": ">=12" } }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.0.tgz", + "integrity": "sha512-7IAFPrjSQIJrGsK6flwg7NFmwBoSTyF3rl7If0hNUFQU4ilTsEPL6GuMuU9BfIWVVGuRnuIidkSMC+c0Otu8IA==", + "cpu": [ + "x64" + ], + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -7449,6 +7779,21 @@ "@esbuild/win32-x64": "0.21.5" } }, + "node_modules/esbuild/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/escalade": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", diff --git a/src/client/config/routes.ts b/src/client/config/routes.ts index 86e46c18c..75f049ee8 100644 --- a/src/client/config/routes.ts +++ b/src/client/config/routes.ts @@ -6,15 +6,15 @@ import { Match } from '../../universal/types'; export const AppRoutesRedirect = [ { from: '/burgerzaken/document/:id', - to: AppRoutes['BURGERZAKEN/ID-KAART'], + to: AppRoutes['BURGERZAKEN/IDENTITEITSBEWIJS'], }, { from: '/stadspas', - to: AppRoutes['HLI'], + to: AppRoutes.HLI, }, { from: '/stadspas/saldo/:pasnummer', - to: AppRoutes['HLI'], + to: AppRoutes.HLI, }, { from: '/inkomen-en-stadspas/bijstandsuitkering/:id', @@ -90,7 +90,8 @@ export const CustomTrackingUrls: CustomTrackingUrlMap = { }, [AppRoutes['INKOMEN/TONK']]: () => `/inkomen/tonk`, - [AppRoutes['BURGERZAKEN/ID-KAART']]: () => '/burgerzaken/id-kaart', + [AppRoutes['BURGERZAKEN/IDENTITEITSBEWIJS']]: () => + '/burgerzaken/identiteitsbewijs', [AppRoutes['ZORG/VOORZIENING']]: () => '/zorg-en-ondersteuning/voorziening', diff --git a/src/client/config/thema.ts b/src/client/config/thema.ts index 1f41b2dbb..b611ebb19 100644 --- a/src/client/config/thema.ts +++ b/src/client/config/thema.ts @@ -7,6 +7,10 @@ import { AppState, BagThema, LinkProps } from '../../universal/types/App.types'; import { DecosCaseType } from '../../universal/types/vergunningen'; import { getThemaTitleWithAppState } from '../pages/HLI/helpers'; import { PARKEER_CASE_TYPES } from '../pages/Parkeren/useParkerenData.hook'; +import { + getThemaTitleBurgerzakenWithAppState, + getThemaUrlBurgerzakenWithAppState, +} from '../pages/Burgerzaken/helpers'; export const BagThemas: Record = Object.fromEntries( Object.entries(Themas).map(([key, key2]) => { @@ -23,7 +27,7 @@ export const ThemaTitles: { [thema in Thema]: string } = { BEZWAREN: 'Bezwaren', BODEM: 'Bodem', BRP: 'Mijn gegevens', - BURGERZAKEN: 'Burgerzaken', + BURGERZAKEN: 'Paspoort en ID-kaart', BUURT: 'Mijn buurt', ERFPACHT: 'Erfpacht', ERFPACHTv2: 'Erfpacht V2', @@ -237,9 +241,11 @@ export const myThemasMenuItems: ThemaMenuItem[] = [ isAlwaysVisible: true, }, { - title: ThemaTitles.BURGERZAKEN, + title: (appState: AppState) => { + return getThemaTitleBurgerzakenWithAppState(appState); + }, id: Themas.BURGERZAKEN, - to: AppRoutes.BURGERZAKEN, + to: (appState) => getThemaUrlBurgerzakenWithAppState(appState), profileTypes: ['private'], }, { diff --git a/src/client/pages/Burgerzaken/__snapshots__/Burgerzaken.test.tsx.snap b/src/client/pages/Burgerzaken/__snapshots__/Burgerzaken.test.tsx.snap index 7a90cbe86..8baa3d2dd 100644 --- a/src/client/pages/Burgerzaken/__snapshots__/Burgerzaken.test.tsx.snap +++ b/src/client/pages/Burgerzaken/__snapshots__/Burgerzaken.test.tsx.snap @@ -13,7 +13,7 @@ exports[` > Renders without crashing 1`] = ` class="_Icon_3b337d" > > Renders without crashing 1`] = `

- Burgerzaken + Paspoort en ID-kaart

@@ -116,7 +116,7 @@ exports[` > Renders without crashing 1`] = `

- Paspoort en ID-kaart + Mijn reisdocumenten

true, listPageRoute: generatePath(AppRoutes['BURGERZAKEN/LIST'], { kind: listPageParamKind.identiteitsbewijzen, }), diff --git a/src/client/pages/Burgerzaken/helpers.test.ts b/src/client/pages/Burgerzaken/helpers.test.ts new file mode 100644 index 000000000..3d752ce14 --- /dev/null +++ b/src/client/pages/Burgerzaken/helpers.test.ts @@ -0,0 +1,138 @@ +import { generatePath } from 'react-router-dom'; +import { describe, it, expect } from 'vitest'; + +import { + getThemaTitleBurgerzaken, + getThemaTitleBurgerzakenWithAppState, + getThemaUrlBurgerzakenWithAppState, +} from './helpers'; +import { AppRoutes } from '../../../universal/config/routes'; +import { AppState } from '../../../universal/types/App.types'; +import { ThemaTitles } from '../../config/thema'; + +describe('helpers', () => { + describe('getThemaTitleBurgerzaken', () => { + it('should return BURGERZAKEN when both hasIDKaart and hasPaspoort are true', () => { + const result = getThemaTitleBurgerzaken(true, true); + expect(result).toBe(ThemaTitles.BURGERZAKEN); + }); + + it('should return ID-kaart when only hasIDKaart is true', () => { + const result = getThemaTitleBurgerzaken(true, false); + expect(result).toBe('ID-kaart'); + }); + + it('should return Paspoort when only hasPaspoort is true', () => { + const result = getThemaTitleBurgerzaken(false, true); + expect(result).toBe('Paspoort'); + }); + + it('should return Paspoort when both hasIDKaart and hasPaspoort are false', () => { + const result = getThemaTitleBurgerzaken(false, false); + expect(result).toBe(ThemaTitles.BURGERZAKEN); + }); + }); + + describe('getThemaTitleBurgerzakenWithAppState', () => { + it('should return BURGERZAKEN when appState has both ID-kaart and Paspoort', () => { + const appState = { + BRP: { + content: { + identiteitsbewijzen: [ + { documentType: 'europese identiteitskaart', id: '1' }, + { documentType: 'paspoort', id: '2' }, + ], + }, + }, + } as unknown as AppState; + const result = getThemaTitleBurgerzakenWithAppState(appState); + expect(result).toBe(ThemaTitles.BURGERZAKEN); + }); + + it('should return ID-kaart when appState has only ID-kaart', () => { + const appState = { + BRP: { + content: { + identiteitsbewijzen: [ + { documentType: 'europese identiteitskaart', id: '1' }, + ], + }, + }, + } as unknown as AppState; + const result = getThemaTitleBurgerzakenWithAppState(appState); + expect(result).toBe('ID-kaart'); + }); + + it('should return Paspoort when appState has only Paspoort', () => { + const appState = { + BRP: { + content: { + identiteitsbewijzen: [{ documentType: 'paspoort', id: '1' }], + }, + }, + } as unknown as AppState; + const result = getThemaTitleBurgerzakenWithAppState(appState); + expect(result).toBe('Paspoort'); + }); + + it('should return Paspoort when appState has neither ID-kaart nor Paspoort', () => { + const appState = { + BRP: { + content: { + identiteitsbewijzen: [], + }, + }, + } as unknown as AppState; + const result = getThemaTitleBurgerzakenWithAppState(appState); + expect(result).toBe(ThemaTitles.BURGERZAKEN); + }); + }); + + describe('getThemaUrlBurgerzakenWithAppState', () => { + it('should return the URL for a single identiteitsbewijs', () => { + const appState = { + BRP: { + content: { + identiteitsbewijzen: [ + { documentType: 'europese identiteitskaart', id: '1' }, + ], + }, + }, + } as unknown as AppState; + const result = getThemaUrlBurgerzakenWithAppState(appState); + expect(result).toBe( + generatePath(AppRoutes['BURGERZAKEN/IDENTITEITSBEWIJS'], { + documentType: 'europese identiteitskaart', + id: '1', + }) + ); + }); + + it('should return the BURGERZAKEN route when there are multiple identiteitsbewijzen', () => { + const appState = { + BRP: { + content: { + identiteitsbewijzen: [ + { documentType: 'europese identiteitskaart', id: '1' }, + { documentType: 'paspoort', id: '2' }, + ], + }, + }, + } as unknown as AppState; + const result = getThemaUrlBurgerzakenWithAppState(appState); + expect(result).toBe(AppRoutes.BURGERZAKEN); + }); + + it('should return the BURGERZAKEN route when there are no identiteitsbewijzen', () => { + const appState = { + BRP: { + content: { + identiteitsbewijzen: [], + }, + }, + } as unknown as AppState; + const result = getThemaUrlBurgerzakenWithAppState(appState); + expect(result).toBe(AppRoutes.BURGERZAKEN); + }); + }); +}); diff --git a/src/client/pages/Burgerzaken/helpers.ts b/src/client/pages/Burgerzaken/helpers.ts new file mode 100644 index 000000000..27ebc0817 --- /dev/null +++ b/src/client/pages/Burgerzaken/helpers.ts @@ -0,0 +1,43 @@ +import { generatePath } from 'react-router-dom'; + +import { AppRoutes } from '../../../universal/config/routes'; +import { AppState } from '../../../universal/types/App.types'; +import { ThemaTitles } from '../../config/thema'; + +export function getThemaTitleBurgerzaken( + hasIDKaart: boolean, + hasPaspoort: boolean +) { + switch (true) { + default: + case hasIDKaart && hasPaspoort: + return ThemaTitles.BURGERZAKEN; + case hasIDKaart: + return 'ID-kaart'; + case hasPaspoort: + return 'Paspoort'; + } +} + +export function getThemaTitleBurgerzakenWithAppState(appState: AppState) { + const hasIDKaart = !!appState.BRP?.content?.identiteitsbewijzen?.some( + (x) => x.documentType == 'europese identiteitskaart' + ); + const hasPaspoort = !!appState.BRP?.content?.identiteitsbewijzen?.some( + (x) => x.documentType == 'paspoort' + ); + + return getThemaTitleBurgerzaken(hasIDKaart, hasPaspoort); +} + +export function getThemaUrlBurgerzakenWithAppState(appState: AppState) { + const identiteitsbewijzen = appState.BRP?.content?.identiteitsbewijzen ?? []; + const identiteitsbewijs = identiteitsbewijzen[0]; + + return identiteitsbewijzen.length === 1 && identiteitsbewijs + ? generatePath(AppRoutes['BURGERZAKEN/IDENTITEITSBEWIJS'], { + documentType: identiteitsbewijs.documentType, + id: identiteitsbewijs.id, + }) + : AppRoutes.BURGERZAKEN; +} diff --git a/src/server/services/__snapshots__/brp.test.ts.snap b/src/server/services/__snapshots__/brp.test.ts.snap index 143429b2b..454a891a2 100644 --- a/src/server/services/__snapshots__/brp.test.ts.snap +++ b/src/server/services/__snapshots__/brp.test.ts.snap @@ -53,7 +53,7 @@ exports[`BRP data api + transformation > should transform the source data 1`] = "id": "een-hash-van-documentnummer-1", "link": { "title": "paspoort", - "to": "/burgerzaken/paspoort/een-hash-van-documentnummer-1", + "to": "/paspoort-en-id-kaart/paspoort/een-hash-van-documentnummer-1", }, "steps": [], "title": "paspoort", @@ -68,7 +68,7 @@ exports[`BRP data api + transformation > should transform the source data 1`] = "id": "een-hash-van-documentnummer-2", "link": { "title": "europese identiteitskaart", - "to": "/burgerzaken/europese-identiteitskaart/een-hash-van-documentnummer-2", + "to": "/paspoort-en-id-kaart/europese-identiteitskaart/een-hash-van-documentnummer-2", }, "steps": [], "title": "ID-kaart", diff --git a/src/server/services/brp.ts b/src/server/services/brp.ts index fcb482c61..537835c34 100644 --- a/src/server/services/brp.ts +++ b/src/server/services/brp.ts @@ -34,17 +34,12 @@ const ID_BEWIJS_PEAK_DATE_END = new Date('2024-10-01'); const BrpDocumentTitles: Record = { paspoort: 'paspoort', 'europese identiteitskaart': 'ID-kaart', - 'nederlandse identiteitskaart': 'ID-kaart', - rijbewijs: 'rijbewijs', }; const BrpDocumentCallToAction: Record = { paspoort: 'https://www.amsterdam.nl/burgerzaken/paspoort-id-kaart-aanvragen/', 'europese identiteitskaart': 'https://www.amsterdam.nl/burgerzaken/paspoort-id-kaart-aanvragen/', - 'nederlandse identiteitskaart': - 'https://www.amsterdam.nl/burgerzaken/paspoort-id-kaart-aanvragen/', - rijbewijs: 'https://www.amsterdam.nl/burgerzaken/rijbewijs/', }; export function transformBRPNotifications(data: BRPData, compareDate: Date) { @@ -116,7 +111,7 @@ export function transformBRPNotifications(data: BRPData, compareDate: Date) { thema: Themas.BURGERZAKEN, datePublished: compareDate.toISOString(), isAlert: true, - id: `${document.documentType}-datum-afloop-binnekort`, + id: `${document.documentType}-datum-afloop-binnenkort`, title: `Voorkom vertraging en verleng uw ${docTitle} op tijd`, description: `Vanaf maart tot de zomervakantie wordt het erg druk op het Stadsloket. Uw huidige ${docTitle} verloopt op ${defaultDateFormat( document.datumAfloop diff --git a/src/universal/config/routes.ts b/src/universal/config/routes.ts index e0765d667..572826789 100644 --- a/src/universal/config/routes.ts +++ b/src/universal/config/routes.ts @@ -1,9 +1,9 @@ export const AppRoutes = { ROOT: '/', HOME: '/', - BURGERZAKEN: '/burgerzaken', - 'BURGERZAKEN/LIST': '/burgerzaken/lijst/:kind/:page?', - 'BURGERZAKEN/IDENTITEITSBEWIJS': '/burgerzaken/:documentType/:id', + BURGERZAKEN: '/paspoort-en-id-kaart', + 'BURGERZAKEN/LIST': '/paspoort-en-id-kaart/lijst/:kind/:page?', + 'BURGERZAKEN/IDENTITEITSBEWIJS': '/paspoort-en-id-kaart/:documentType/:id', ZORG: '/zorg-en-ondersteuning', 'ZORG/VOORZIENING': '/zorg-en-ondersteuning/voorziening/:id', diff --git a/src/universal/types/brp.ts b/src/universal/types/brp.ts index 8b9c6a609..168071c5b 100644 --- a/src/universal/types/brp.ts +++ b/src/universal/types/brp.ts @@ -3,7 +3,7 @@ import { LinkProps, ZaakDetail } from './App.types'; export interface IdentiteitsbewijsFromSource { id: string; documentNummer: string; - documentType: 'europese identiteitskaart' | 'paspoort' | string; + documentType: 'europese identiteitskaart' | 'paspoort'; datumUitgifte: string; datumAfloop: string; }