diff --git a/packages/app/src/domain/layout/logic/types.ts b/packages/app/src/domain/layout/logic/types.ts index 3e50f9b23e..5ae320cd55 100644 --- a/packages/app/src/domain/layout/logic/types.ts +++ b/packages/app/src/domain/layout/logic/types.ts @@ -27,15 +27,14 @@ export type NlItemKeys = | 'elderly_at_home' | 'general_practitioner_suspicions' | 'hospitals_and_care' + | 'patients' | 'infectious_people' | 'mortality' | 'nursing_home_care' - | 'patients' | 'positive_tests' | 'reproduction_number' | 'sewage_measurement' | 'source_investigation' - | 'tests' | 'vaccinations' | 'variants'; diff --git a/packages/app/src/domain/layout/logic/use-sidebar.tsx b/packages/app/src/domain/layout/logic/use-sidebar.tsx index 65c6f7a87b..d668581000 100644 --- a/packages/app/src/domain/layout/logic/use-sidebar.tsx +++ b/packages/app/src/domain/layout/logic/use-sidebar.tsx @@ -15,25 +15,24 @@ const mapCategoriesToIcons = { const mapKeysToReverseRouter = { compliance: 'gedrag', coronamelder_app: 'coronamelder', - current_advices: 'geldendeAdviezen', disabled_care: 'gehandicaptenzorg', elderly_at_home: 'thuiswonendeOuderen', general_practitioner_suspicions: 'verdenkingenHuisartsen', hospital_admissions: 'ziekenhuisopnames', hospitals_and_care: 'ziekenhuizenEnZorg', + patients: 'patientenInBeeld', infectious_people: 'besmettelijkeMensen', intensive_care_admissions: 'intensiveCareOpnames', + current_advices: 'geldendeAdviezen', mortality: 'sterfte', // Still the nursing home care name is used because of legacy naming inside of sanity's lokalize texts. nursing_home_care: 'kwetsbareGroepen', - patients: 'patientenInBeeld', positive_tests: 'positiefGetesteMensen', - reproduction_number: 'reproductiegetal', sewage_measurement: 'rioolwater', source_investigation: 'brononderzoek', - tests: 'testen', vaccinations: 'vaccinaties', variants: 'varianten', + reproduction_number: 'reproductiegetal', } as const; type UseSidebarArgs = { diff --git a/packages/app/src/domain/layout/nl-layout.tsx b/packages/app/src/domain/layout/nl-layout.tsx index 9f84227b10..ada788b9e1 100644 --- a/packages/app/src/domain/layout/nl-layout.tsx +++ b/packages/app/src/domain/layout/nl-layout.tsx @@ -37,7 +37,7 @@ export function NlLayout(props: NlLayoutProps) { const items = useSidebar({ layout: 'nl', map: [ - ['development_of_the_virus', ['sewage_measurement', 'positive_tests', 'tests', 'reproduction_number', 'variants', 'mortality']], + ['development_of_the_virus', ['sewage_measurement', 'positive_tests', 'reproduction_number', 'variants', 'mortality']], ['consequences_for_healthcare', ['hospitals_and_care', 'patients', 'nursing_home_care']], ['actions_to_take', ['vaccinations', 'compliance']], ['archived_metrics', ['disabled_care', 'elderly_at_home', 'source_investigation', 'coronamelder_app', 'infectious_people', 'general_practitioner_suspicions']], diff --git a/packages/app/src/pages/landelijk/positief-geteste-mensen.tsx b/packages/app/src/pages/landelijk/positief-geteste-mensen.tsx index c6d16854be..2822f01bfd 100644 --- a/packages/app/src/pages/landelijk/positief-geteste-mensen.tsx +++ b/packages/app/src/pages/landelijk/positief-geteste-mensen.tsx @@ -84,6 +84,8 @@ export const getStaticProps = createGetStaticProps( function PositivelyTestedPeople(props: StaticProps) { const { pageText, selectedNlData: data, choropleth, content, lastGenerated } = props; + const [confirmedCasesSelfTestedTimeframe, setConfirmedCasesSelfTestedTimeframe] = useState(TimeframeOption.SIX_MONTHS); + const [confirmedCasesInfectedTimeframe, setConfirmedCasesInfectedTimeframe] = useState(TimeframeOption.SIX_MONTHS); const [confirmedCasesInfectedPercentageTimeframe, setConfirmedCasesInfectedPercentageTimeframe] = useState(TimeframeOption.ALL); @@ -143,6 +145,38 @@ function PositivelyTestedPeople(props: StaticProps) { articles={content.articles} /> + + + + ({ - metadataTexts: siteText.pages.topical_page.nl.nationaal_metadata, - textNl: siteText.pages.tests_page.nl, -}); - -type LokalizeTexts = ReturnType; - -export const getStaticProps = createGetStaticProps( - ({ locale }: { locale: keyof Languages }) => getLokalizeTexts(selectLokalizeTexts, locale), - getLastGeneratedDate, - selectNlData('self_test_overall'), - async (context: GetStaticPropsContext) => { - const { content } = await createGetContent<{ - parts: PagePartQueryResult; - elements: ElementsQueryResult; - }>((context) => { - const { locale } = context; - return `{ - "parts": ${getPagePartsQuery('tests_page')}, - "elements": ${getElementsQuery('nl', ['self_test_overall'], locale)} - }`; - })(context); - return { - content: { - articles: getArticleParts(content.parts.pageParts, 'testsPageArticles'), - elements: content.elements, - }, - }; - } -); - -const Tests = (props: StaticProps) => { - const { pageText, selectedNlData: data, content, lastGenerated } = props; - - const [confirmedCasesSelfTestedTimeframe, setConfirmedCasesSelfTestedTimeframe] = useState(TimeframeOption.SIX_MONTHS); - - const { commonTexts } = useIntl(); - - const { metadataTexts, textNl } = useDynamicLokalizeTexts(pageText, selectLokalizeTexts); - - const metadata = { - ...metadataTexts, - title: textNl.metadata.title, - description: textNl.metadata.description, - }; - - const lastInsertionDateOfPage = getLastInsertionDateOfPage(data, pageMetrics); - - return ( - - - - - - - ); -}; - -export default Tests; diff --git a/packages/app/src/types/cms.d.ts b/packages/app/src/types/cms.d.ts index 160dc4f715..a44aeb9972 100644 --- a/packages/app/src/types/cms.d.ts +++ b/packages/app/src/types/cms.d.ts @@ -3,23 +3,22 @@ import { ArticleSummary } from '~/components/article-teaser'; import { CategoriesTypes } from '~/domain/topical/common/categories'; export type PageIdentifier = - | 'behavior_page' - | 'deceased_page' - | 'disability_care_page' - | 'elderly_at_home_page' | 'hospital_page' | 'hospitals_and_care_page' + | 'behavior_page' + | 'situations_page' + | 'reproduction_page' | 'infectious_people_page' - | 'nursing_home_page' - | 'patients_page' + | 'topical_page' + | 'elderly_at_home_page' + | 'disability_care_page' | 'positive_tests_page' - | 'reproduction_page' + | 'variants_page' | 'sewer_page' - | 'situations_page' - | 'tests_page' - | 'topical_page' + | 'patients_page' | 'vaccinations_page' - | 'variants_page'; + | 'nursing_home_page' + | 'deceased_page'; export type PageBasePart = { pageDataKind: string; diff --git a/packages/cms/src/lokalize/key-mutations.csv b/packages/cms/src/lokalize/key-mutations.csv index 6c3efbcfde..6c4b92ae96 100644 --- a/packages/cms/src/lokalize/key-mutations.csv +++ b/packages/cms/src/lokalize/key-mutations.csv @@ -46,3 +46,10 @@ timestamp,action,key,document_id,move_to 2023-04-11T15:39:52.717Z,delete,pages.positive_tests_page.nl.linechart_self_test_titel,PKXdxxxKAnTg0F1ZCghMkN,__ 2023-04-11T15:39:52.725Z,delete,pages.positive_tests_page.nl.linechart_self_test_toelichting,PKXdxxxKAnTg0F1ZCghMnz,__ 2023-04-11T15:39:52.730Z,delete,pages.positive_tests_page.nl.linechart_self_test_tooltip_label,KoLyCpXIGU95m7jfEHZKIf,__ +2023-04-17T09:54:53.417Z,add,pages.positive_tests_page.nl.bronnen.self_test.aria_text,eamHKzD43YGGBYDBdLwkJN,__ +2023-04-17T09:54:55.806Z,add,pages.positive_tests_page.nl.bronnen.self_test.download,eamHKzD43YGGBYDBdLwkSZ,__ +2023-04-17T09:54:57.376Z,add,pages.positive_tests_page.nl.bronnen.self_test.href,oB32MHoi5k0LjWD2RooOOv,__ +2023-04-17T09:54:58.827Z,add,pages.positive_tests_page.nl.bronnen.self_test.text,oB32MHoi5k0LjWD2RooOrr,__ +2023-04-17T09:54:59.852Z,add,pages.positive_tests_page.nl.linechart_self_test_titel,oB32MHoi5k0LjWD2RooPFy,__ +2023-04-17T09:55:01.863Z,add,pages.positive_tests_page.nl.linechart_self_test_toelichting,eamHKzD43YGGBYDBdLwkvz,__ +2023-04-17T09:55:02.863Z,add,pages.positive_tests_page.nl.linechart_self_test_tooltip_label,eamHKzD43YGGBYDBdLwl5B,__ diff --git a/packages/common/src/data/reverse-router.ts b/packages/common/src/data/reverse-router.ts index 01f44daf1c..9a8070599e 100644 --- a/packages/common/src/data/reverse-router.ts +++ b/packages/common/src/data/reverse-router.ts @@ -15,26 +15,25 @@ export function getReverseRouter(isMobile: boolean) { }, nl: { - index: () => (isMobile ? '/landelijk' : reverseRouter.nl.rioolwater()), - vaccinaties: () => '/landelijk/vaccinaties', - positiefGetesteMensen: () => '/landelijk/positief-geteste-mensen', - testen: () => '/landelijk/testen', - besmettelijkeMensen: () => '/landelijk/besmettelijke-mensen', - reproductiegetal: () => '/landelijk/reproductiegetal', - sterfte: () => '/landelijk/sterfte', - ziekenhuisopnames: () => '/landelijk/ziekenhuis-opnames', - intensiveCareOpnames: () => '/landelijk/intensive-care-opnames', - ziekenhuizenEnZorg: () => '/landelijk/ziekenhuizen-en-zorg', - patientenInBeeld: () => '/landelijk/patienten-in-beeld', - kwetsbareGroepen: () => '/landelijk/kwetsbare-groepen-70-plussers', - gehandicaptenzorg: () => '/landelijk/gehandicaptenzorg', - thuiswonendeOuderen: () => '/landelijk/thuiswonende-ouderen', - rioolwater: () => '/landelijk/rioolwater', - verdenkingenHuisartsen: () => '/landelijk/verdenkingen-huisartsen', - gedrag: () => '/landelijk/gedrag', - coronamelder: () => '/landelijk/coronamelder', - brononderzoek: () => '/landelijk/brononderzoek', - varianten: () => '/landelijk/varianten', + index: () => (isMobile ? `/landelijk` : reverseRouter.nl.rioolwater()), + vaccinaties: () => `/landelijk/vaccinaties`, + positiefGetesteMensen: () => `/landelijk/positief-geteste-mensen`, + besmettelijkeMensen: () => `/landelijk/besmettelijke-mensen`, + reproductiegetal: () => `/landelijk/reproductiegetal`, + sterfte: () => `/landelijk/sterfte`, + ziekenhuisopnames: () => `/landelijk/ziekenhuis-opnames`, + intensiveCareOpnames: () => `/landelijk/intensive-care-opnames`, + ziekenhuizenEnZorg: () => `/landelijk/ziekenhuizen-en-zorg`, + patientenInBeeld: () => `/landelijk/patienten-in-beeld`, + kwetsbareGroepen: () => `/landelijk/kwetsbare-groepen-70-plussers`, + gehandicaptenzorg: () => `/landelijk/gehandicaptenzorg`, + thuiswonendeOuderen: () => `/landelijk/thuiswonende-ouderen`, + rioolwater: () => `/landelijk/rioolwater`, + verdenkingenHuisartsen: () => `/landelijk/verdenkingen-huisartsen`, + gedrag: () => `/landelijk/gedrag`, + coronamelder: () => `/landelijk/coronamelder`, + brononderzoek: () => `/landelijk/brononderzoek`, + varianten: () => `/landelijk/varianten`, }, vr: {