Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

revert-4734-feature/COR-1548-tests-page #4740

Merged
merged 2 commits into from
Apr 17, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/app/src/domain/layout/logic/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
7 changes: 3 additions & 4 deletions packages/app/src/domain/layout/logic/use-sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<T extends Layout> = {
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/domain/layout/nl-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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']],
Expand Down
34 changes: 34 additions & 0 deletions packages/app/src/pages/landelijk/positief-geteste-mensen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ export const getStaticProps = createGetStaticProps(
function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
const { pageText, selectedNlData: data, choropleth, content, lastGenerated } = props;

const [confirmedCasesSelfTestedTimeframe, setConfirmedCasesSelfTestedTimeframe] = useState<TimeframeOption>(TimeframeOption.SIX_MONTHS);

const [confirmedCasesInfectedTimeframe, setConfirmedCasesInfectedTimeframe] = useState<TimeframeOption>(TimeframeOption.SIX_MONTHS);

const [confirmedCasesInfectedPercentageTimeframe, setConfirmedCasesInfectedPercentageTimeframe] = useState<TimeframeOption>(TimeframeOption.ALL);
Expand Down Expand Up @@ -143,6 +145,38 @@ function PositivelyTestedPeople(props: StaticProps<typeof getStaticProps>) {
articles={content.articles}
/>

<ChartTile
title={textNl.linechart_self_test_titel}
description={textNl.linechart_self_test_toelichting}
metadata={{
source: textNl.bronnen.self_test,
}}
timeframeOptions={TimeframeOptionsList}
timeframeInitialValue={confirmedCasesSelfTestedTimeframe}
onSelectTimeframe={setConfirmedCasesSelfTestedTimeframe}
>
<TimeSeriesChart
accessibility={{
key: 'confirmed_cases_self_tested_over_time_chart',
}}
values={data.self_test_overall.values}
timeframe={confirmedCasesSelfTestedTimeframe}
seriesConfig={[
{
type: 'line',
metricProperty: 'infected_percentage',
label: textNl.linechart_self_test_tooltip_label,
color: colors.primary,
},
]}
dataOptions={{
isPercentage: true,
timelineEvents: getTimelineEvents(content.elements.timeSeries, 'self_test_overall'),
}}
forceLegend
/>
</ChartTile>

<ChartTile
title={textNl.linechart_titel}
description={replaceVariablesInText(textNl.linechart_toelichting, {
Expand Down
131 changes: 0 additions & 131 deletions packages/app/src/pages/landelijk/testen.tsx

This file was deleted.

21 changes: 10 additions & 11 deletions packages/app/src/types/cms.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
25 changes: 0 additions & 25 deletions packages/cms/src/lokalize/key-mutations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,3 @@ timestamp,action,key,document_id,move_to
2023-03-21T10:35:31.653Z,delete,pages.vaccinations_page.shared.vaccination_grade_tile.autumn_labels.description_footer,u6z14vWwH5lzTVbDpRg06r,__
2023-03-21T10:35:31.653Z,delete,pages.vaccinations_page.shared.vaccination_grade_tile.fully_vaccinated_labels.description_footer,772MCeNIooHnNdtyUIs7TE,__
2023-03-21T10:35:31.653Z,delete,pages.vaccinations_page.vr.vaccination_grade_toggle_tile.description_footer,qjZwg5QUJcN8JoCoxxDHxs,__
2023-04-11T15:39:11.176Z,add,common.sidebar.metrics.tests.title,CsCcyhU6YSJUj7yolLoyBL,__
2023-04-11T15:39:14.357Z,add,pages.tests_page.nl.metadata.description,CsCcyhU6YSJUj7yolLoyIy,__
2023-04-11T15:39:16.050Z,add,pages.tests_page.nl.metadata.title,sV6BHv8iu7DuHPF8JxKZSk,__
2023-04-11T15:39:17.408Z,add,pages.tests_page.nl.sources.rivm.aria_text,CsCcyhU6YSJUj7yolLoyQb,__
2023-04-11T15:39:19.304Z,add,pages.tests_page.nl.sources.rivm.download,sV6BHv8iu7DuHPF8JxKaSq,__
2023-04-11T15:39:21.493Z,add,pages.tests_page.nl.sources.rivm.href,sV6BHv8iu7DuHPF8JxKbQ7,__
2023-04-11T15:39:26.183Z,add,pages.tests_page.nl.sources.rivm.text,CsCcyhU6YSJUj7yolLoyre,__
2023-04-11T15:39:29.664Z,add,pages.tests_page.nl.sources.self_test.aria_text,jw0M9D1FUbTPkflikzUdd8,__
2023-04-11T15:39:33.508Z,add,pages.tests_page.nl.sources.self_test.download,sV6BHv8iu7DuHPF8JxKd3j,__
2023-04-11T15:39:35.057Z,add,pages.tests_page.nl.sources.self_test.href,jw0M9D1FUbTPkflikzUdmw,__
2023-04-11T15:39:37.338Z,add,pages.tests_page.nl.sources.self_test.text,sV6BHv8iu7DuHPF8JxKdYm,__
2023-04-11T15:39:38.574Z,add,pages.tests_page.nl.reference.href,jw0M9D1FUbTPkflikzUdsS,__
2023-04-11T15:39:42.269Z,add,pages.tests_page.nl.dates,CsCcyhU6YSJUj7yolLozOw,__
2023-04-11T15:39:45.361Z,add,pages.tests_page.nl.description,sV6BHv8iu7DuHPF8JxKesd,__
2023-04-11T15:39:47.349Z,add,pages.tests_page.nl.title,sV6BHv8iu7DuHPF8JxKfCO,__
2023-04-11T15:39:49.307Z,add,pages.tests_page.nl.chart_self_tests.title,CsCcyhU6YSJUj7yolLp0IQ,__
2023-04-11T15:39:51.003Z,add,pages.tests_page.nl.chart_self_tests.description,CsCcyhU6YSJUj7yolLp0Of,__
2023-04-11T15:39:52.678Z,add,pages.tests_page.nl.chart_self_tests.tooltip_label,jw0M9D1FUbTPkflikzUeTE,__
2023-04-11T15:39:52.682Z,delete,pages.positive_tests_page.nl.bronnen.self_test.aria_text,PKXdxxxKAnTg0F1ZCsSm7v,__
2023-04-11T15:39:52.694Z,delete,pages.positive_tests_page.nl.bronnen.self_test.download,KoLyCpXIGU95m7jfEPMPhh,__
2023-04-11T15:39:52.702Z,delete,pages.positive_tests_page.nl.bronnen.self_test.href,KoLyCpXIGU95m7jfEPMPlH,__
2023-04-11T15:39:52.711Z,delete,pages.positive_tests_page.nl.bronnen.self_test.text,0iJeil5hiqRr6jTKtbFGx7,__
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,__
39 changes: 19 additions & 20 deletions packages/common/src/data/reverse-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down