From 603c01eca12b3db3a3d026903ba84de2fa940b25 Mon Sep 17 00:00:00 2001 From: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:41:12 +0100 Subject: [PATCH 1/5] fix(COR-1951): Fixed default date for infectieradar timeseries charts --- packages/app/src/pages/landelijk/infectieradar.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/pages/landelijk/infectieradar.tsx b/packages/app/src/pages/landelijk/infectieradar.tsx index 537020d8e1..b3f260c964 100644 --- a/packages/app/src/pages/landelijk/infectieradar.tsx +++ b/packages/app/src/pages/landelijk/infectieradar.tsx @@ -67,10 +67,10 @@ const InfectionRadar = (props: StaticProps) => { const reverseRouter = useReverseRouter(); - const [confirmedCasesSelfTestedTimeframe, setConfirmedCasesSelfTestedTimeframe] = useState(TimeframeOption.SIX_MONTHS); + const [confirmedCasesSelfTestedTimeframe, setConfirmedCasesSelfTestedTimeframe] = useState(TimeframeOption.ALL); const [confirmedCasesSelfTestedTimeframePeriod, setConfirmedCasesSelfTestedTimeframePeriod] = useState({ start: 0, end: 0 }); - const [confirmedCasesCovidSymptomsPerAgeTimeFrame, setConfirmedCasesCovidSymptomsPerAgeTimeFrame] = useState(TimeframeOption.THREE_MONTHS); + const [confirmedCasesCovidSymptomsPerAgeTimeFrame, setConfirmedCasesCovidSymptomsPerAgeTimeFrame] = useState(TimeframeOption.ALL); const [confirmedCasesCovidSymptomsPerAgeTimeframePeriod, setConfirmedCasesCovidSymptomsPerAgeTimeframePeriod] = useState({ start: 0, end: 0 }); const { commonTexts } = useIntl(); From 0e6565eb5dfc43a2eae4e5c8cb18016b25d0cfcc Mon Sep 17 00:00:00 2001 From: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:16:16 +0100 Subject: [PATCH 2/5] feature(COR-1956): Removed obtainedAt and changed to dateOfInsertion --- .../components/tile-footer-metadata.tsx | 42 ++++--------------- .../app/src/components/metadata/metadata.tsx | 2 - packages/app/src/components/metadata/types.ts | 2 - .../domain/variants/variants-table-tile.tsx | 2 +- .../app/src/pages/landelijk/de-coronaprik.tsx | 2 +- .../src/pages/landelijk/reproductiegetal.tsx | 2 +- packages/app/src/pages/landelijk/sterfte.tsx | 4 +- 7 files changed, 14 insertions(+), 42 deletions(-) diff --git a/packages/app/src/components/metadata/components/tile-footer-metadata.tsx b/packages/app/src/components/metadata/components/tile-footer-metadata.tsx index 3d575a6778..27806cde2e 100644 --- a/packages/app/src/components/metadata/components/tile-footer-metadata.tsx +++ b/packages/app/src/components/metadata/components/tile-footer-metadata.tsx @@ -28,22 +28,11 @@ interface TileFooterMetadataProps extends MetadataProps { * @param {number} props.dateOfInsertion - Unix timestamp of when the metadata was inserted. * @param {string} props.disclaimer - Disclaimer text for the metadata. * @param {boolean} props.isArchived - Flag indicating whether the metadata is for an archived KPI / Graph / Choropleth. - * @param {number} props.obtainedAt - Unix timestamp of when the metadata was obtained. * @param {string} [props.referenceLink] - Reference link for the metadata. * @param {Source} props.source - Source of the metadata. * @returns {ReactElement} A React element that contains the tile footer with metadata items. */ -export function TileFooterMetadata({ - dateString, - marginBottom, - dataSources = [], - dateOfInsertion, - disclaimer, - isArchived, - obtainedAt, - referenceLink, - source, -}: TileFooterMetadataProps) { +export function TileFooterMetadata({ dateString, marginBottom, dataSources = [], dateOfInsertion, disclaimer, isArchived, referenceLink, source }: TileFooterMetadataProps) { const { commonTexts, formatDateFromSeconds } = useIntl(); const metadataText = commonTexts.common.metadata; @@ -51,8 +40,14 @@ export function TileFooterMetadata({ <> + {disclaimer && ( + + + + )} + {dateString && ( - + @@ -61,7 +56,7 @@ export function TileFooterMetadata({ )} {dateOfInsertion && ( - + @@ -75,19 +70,6 @@ export function TileFooterMetadata({ )} - {obtainedAt && ( - - - - - - {replaceVariablesInText(commonTexts.common.metadata.obtained, { - date: formatDateFromSeconds(obtainedAt, 'weekday-long'), - })} - - - )} - {source ? ( } items={[source]} label={commonTexts.common.metadata.source} /> ) : dataSources && dataSources.length > 0 ? ( @@ -97,12 +79,6 @@ export function TileFooterMetadata({ label={referenceLink ? commonTexts.informatie_header.bron : metadataText.source} /> ) : null} - - {disclaimer && ( - - - - )} diff --git a/packages/app/src/components/metadata/metadata.tsx b/packages/app/src/components/metadata/metadata.tsx index 3569ab4b8b..a818109ec8 100644 --- a/packages/app/src/components/metadata/metadata.tsx +++ b/packages/app/src/components/metadata/metadata.tsx @@ -34,7 +34,6 @@ export function Metadata({ marginBottom, moreInformationLabel, moreInformationLink, - obtainedAt, referenceLink, source, timeframePeriod, @@ -106,7 +105,6 @@ export function Metadata({ dataSources={dataSources} referenceLink={referenceLink} disclaimer={disclaimer} - obtainedAt={obtainedAt} intervalString={intervalString} isTimeframePeriodKpi={isTimeframePeriodKpi} /> diff --git a/packages/app/src/components/metadata/types.ts b/packages/app/src/components/metadata/types.ts index 9af76c42a1..005bf15347 100644 --- a/packages/app/src/components/metadata/types.ts +++ b/packages/app/src/components/metadata/types.ts @@ -41,7 +41,6 @@ export interface DateRange { * @property {number|DateRange|string} [date] - Date of the metadata item. It can be a number, a DateRange object, or a string. * @property {Source} [source] - Source of the metadata. * @property {Source[]} [dataSources] - Array of data sources for the metadata. - * @property {number} [obtainedAt] - Unix timestamp of when the metadata was obtained. * @property {boolean} [isTileFooter] - Flag indicating whether the metadata is for a tile footer. * @property {boolean} [isPageInformationBlock] - Flag indicating whether the metadata is for a page information block. * @property {string} [datumsText] - Textual representation of the metadata date. @@ -61,7 +60,6 @@ export interface DateRange { export type MetadataProps = { source?: Source; dataSources?: Source[]; - obtainedAt?: number; isTileFooter?: boolean; isPageInformationBlock?: boolean; datumsText?: string; diff --git a/packages/app/src/domain/variants/variants-table-tile.tsx b/packages/app/src/domain/variants/variants-table-tile.tsx index be6d944288..cd7efaf8fb 100644 --- a/packages/app/src/domain/variants/variants-table-tile.tsx +++ b/packages/app/src/domain/variants/variants-table-tile.tsx @@ -81,7 +81,7 @@ function VariantsTableTileWithData({ text, sampleThresholdPassed, source, data, const metadata: MetadataProps = { timeframePeriod: { start: dates.date_start_unix, end: dates.date_end_unix }, source, - obtainedAt: dates.date_of_report_unix, + dateOfInsertion: dates.date_of_report_unix, isTimeframePeriodKpi: true, }; diff --git a/packages/app/src/pages/landelijk/de-coronaprik.tsx b/packages/app/src/pages/landelijk/de-coronaprik.tsx index 4fd4cace24..b341eed965 100644 --- a/packages/app/src/pages/landelijk/de-coronaprik.tsx +++ b/packages/app/src/pages/landelijk/de-coronaprik.tsx @@ -231,7 +231,7 @@ function VaccinationPage(props: StaticProps) { start: archivedData.vaccine_administered_last_timeframe_archived_20240117.date_start_unix, end: archivedData.vaccine_administered_last_timeframe_archived_20240117.date_end_unix, }, - obtainedAt: archivedData.vaccine_administered_last_timeframe_archived_20240117.date_of_insertion_unix, + dateOfInsertion: archivedData.vaccine_administered_last_timeframe_archived_20240117.date_of_insertion_unix, }} /> diff --git a/packages/app/src/pages/landelijk/reproductiegetal.tsx b/packages/app/src/pages/landelijk/reproductiegetal.tsx index 88286765e0..9f5b47403f 100644 --- a/packages/app/src/pages/landelijk/reproductiegetal.tsx +++ b/packages/app/src/pages/landelijk/reproductiegetal.tsx @@ -114,7 +114,7 @@ const ReproductionIndex = (props: StaticProps) => { title={textNl.barscale_titel} metadata={{ timeframePeriod: reproductionLastValue.date_unix, - obtainedAt: reproductionLastValue.date_of_insertion_unix, + dateOfInsertion: reproductionLastValue.date_of_insertion_unix, source: textNl.bronnen.rivm, }} hasNoBorder diff --git a/packages/app/src/pages/landelijk/sterfte.tsx b/packages/app/src/pages/landelijk/sterfte.tsx index 229c428487..1ad39e3f31 100644 --- a/packages/app/src/pages/landelijk/sterfte.tsx +++ b/packages/app/src/pages/landelijk/sterfte.tsx @@ -219,7 +219,7 @@ const DeceasedNationalPage = (props: StaticProps) => { title={textNl.section_deceased_rivm.kpi_covid_daily_title} metadata={{ timeframePeriod: dataRivm.last_value.date_unix, - obtainedAt: dataRivm.last_value.date_of_insertion_unix, + dateOfInsertion: dataRivm.last_value.date_of_insertion_unix, source: textNl.section_deceased_rivm.bronnen.rivm, isTimeframePeriodKpi: true, }} @@ -231,7 +231,7 @@ const DeceasedNationalPage = (props: StaticProps) => { title={textNl.section_deceased_rivm.kpi_covid_total_title} metadata={{ timeframePeriod: dataRivm.last_value.date_unix, - obtainedAt: dataRivm.last_value.date_of_insertion_unix, + dateOfInsertion: dataRivm.last_value.date_of_insertion_unix, source: textNl.section_deceased_rivm.bronnen.rivm, isTimeframePeriodKpi: true, }} From b9be59a564b741f59e8db727d09ae6b4fdccbfdb Mon Sep 17 00:00:00 2001 From: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> Date: Mon, 25 Mar 2024 11:49:11 +0100 Subject: [PATCH 3/5] feature(COR-1956): Fixed issue with all metadata pointing to external link --- .../metadata/components/tile-footer-metadata.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/app/src/components/metadata/components/tile-footer-metadata.tsx b/packages/app/src/components/metadata/components/tile-footer-metadata.tsx index 27806cde2e..27d094816c 100644 --- a/packages/app/src/components/metadata/components/tile-footer-metadata.tsx +++ b/packages/app/src/components/metadata/components/tile-footer-metadata.tsx @@ -70,8 +70,13 @@ export function TileFooterMetadata({ dateString, marginBottom, dataSources = [], )} + {/** + * Since all components of a specific page use the same lokalize key, the refactored version of the metadata + * component will transform all sources to external links. In order to avoid that, we reset the .href property + * when we pass the items to the MetadataItem component. + */} {source ? ( - } items={[source]} label={commonTexts.common.metadata.source} /> + } items={[{ ...source, href: '' }]} label={commonTexts.common.metadata.source} /> ) : dataSources && dataSources.length > 0 ? ( } From 107d8b65a38f5fff0dcc7732ff4f07a2219dc52c Mon Sep 17 00:00:00 2001 From: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:03:07 +0100 Subject: [PATCH 4/5] feature(COR-1956): Adjusted archival status for all components --- .../app/src/components/kpi/components/kpi-content.tsx | 1 + .../app/src/domain/sewer/sewer-chart/sewer-chart.tsx | 1 + .../app/src/domain/tested/reproduction-chart-tile.tsx | 2 +- .../app/src/domain/variants/variants-table-tile.tsx | 1 + packages/app/src/pages/landelijk/de-coronaprik.tsx | 5 +++++ .../app/src/pages/landelijk/gehandicaptenzorg.tsx | 11 ++++++++++- packages/app/src/pages/landelijk/infectieradar.tsx | 3 +++ .../app/src/pages/landelijk/patienten-in-beeld.tsx | 4 ++++ packages/app/src/pages/landelijk/reproductiegetal.tsx | 2 ++ packages/app/src/pages/landelijk/rioolwater.tsx | 2 ++ packages/app/src/pages/landelijk/sterfte.tsx | 10 +++++++++- .../src/pages/landelijk/thuiswonende-70-plussers.tsx | 2 +- packages/app/src/pages/landelijk/varianten.tsx | 2 ++ .../app/src/pages/landelijk/ziekenhuizen-in-beeld.tsx | 11 ++++++++++- 14 files changed, 52 insertions(+), 5 deletions(-) diff --git a/packages/app/src/components/kpi/components/kpi-content.tsx b/packages/app/src/components/kpi/components/kpi-content.tsx index 85df192c63..2c972c996d 100644 --- a/packages/app/src/components/kpi/components/kpi-content.tsx +++ b/packages/app/src/components/kpi/components/kpi-content.tsx @@ -19,6 +19,7 @@ export const KpiContent = ({ title, description, value, bar, birthyear, differen source: source, isTimeframePeriodKpi: true, dateOfInsertion: dateOfInsertion, + isArchived: true, }; return ( diff --git a/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx b/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx index 911276a591..09386ef389 100644 --- a/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx +++ b/packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx @@ -152,6 +152,7 @@ export const SewerChart = ({ accessibility, dataAverages, dataPerInstallation, t source: text.source, timeframePeriod: sewerChartTimeframePeriod, dateOfInsertion: metadataLastInsertionDate, + isArchived: true, }} description={text.description} > diff --git a/packages/app/src/domain/tested/reproduction-chart-tile.tsx b/packages/app/src/domain/tested/reproduction-chart-tile.tsx index c6827b2d6e..af646c1589 100644 --- a/packages/app/src/domain/tested/reproduction-chart-tile.tsx +++ b/packages/app/src/domain/tested/reproduction-chart-tile.tsx @@ -34,7 +34,7 @@ export const ReproductionChartTile = ({ data, timelineEvents, text }: Reproducti metadata={{ source: text.bronnen.rivm, dateOfInsertion: metadataDateOfInsertion, - timeframePeriod: last_value.date_of_insertion_unix, + timeframePeriod: { start: values[0].date_unix, end: last_value.date_unix }, isArchived: true, }} > diff --git a/packages/app/src/domain/variants/variants-table-tile.tsx b/packages/app/src/domain/variants/variants-table-tile.tsx index cd7efaf8fb..007ee881ba 100644 --- a/packages/app/src/domain/variants/variants-table-tile.tsx +++ b/packages/app/src/domain/variants/variants-table-tile.tsx @@ -83,6 +83,7 @@ function VariantsTableTileWithData({ text, sampleThresholdPassed, source, data, source, dateOfInsertion: dates.date_of_report_unix, isTimeframePeriodKpi: true, + isArchived: true, }; const [date_start, date_end] = formatDateSpan({ seconds: dates.date_start_unix }, { seconds: dates.date_end_unix }); diff --git a/packages/app/src/pages/landelijk/de-coronaprik.tsx b/packages/app/src/pages/landelijk/de-coronaprik.tsx index b341eed965..2000b1a26f 100644 --- a/packages/app/src/pages/landelijk/de-coronaprik.tsx +++ b/packages/app/src/pages/landelijk/de-coronaprik.tsx @@ -232,6 +232,8 @@ function VaccinationPage(props: StaticProps) { end: archivedData.vaccine_administered_last_timeframe_archived_20240117.date_end_unix, }, dateOfInsertion: archivedData.vaccine_administered_last_timeframe_archived_20240117.date_of_insertion_unix, + isArchived: true, + isTimeframePeriodKpi: true, }} /> @@ -254,6 +256,7 @@ function VaccinationPage(props: StaticProps) { source={textShared.vaccination_grade_tile.fully_vaccinated_labels.source} timeframePeriod={vaccineCoverageEstimatedFullyVaccinated.date_unix} isTimeframePeriodKpi={true} + isArchived={true} dateOfInsertion={vaccineCoverageEstimatedFullyVaccinated.date_of_insertion_unix} tilesData={[ { @@ -291,6 +294,7 @@ function VaccinationPage(props: StaticProps) { ageGroupLabel: commonTexts.choropleth.vaccination_coverage.shared.dropdown_label_age_group_select, }} isPrimarySeries + isArchived /> ) { isTimeframePeriodKpi: true, dateOfInsertion: archivedData.vaccine_coverage_per_age_group_archived_20231004.values[0].date_of_insertion_unix, source: textNl.vaccination_coverage.bronnen.rivm, + isArchived: true, }} values={archivedData.vaccine_coverage_per_age_group_archived_20231004.values} /> diff --git a/packages/app/src/pages/landelijk/gehandicaptenzorg.tsx b/packages/app/src/pages/landelijk/gehandicaptenzorg.tsx index 6c1c908b50..ef8bde45b4 100644 --- a/packages/app/src/pages/landelijk/gehandicaptenzorg.tsx +++ b/packages/app/src/pages/landelijk/gehandicaptenzorg.tsx @@ -263,7 +263,16 @@ function DisabilityCare(props: StaticProps) { referenceLink={textNl.oversterfte.reference.href} /> - + ) => { dateOfInsertion: data.self_test_overall.last_value.date_of_insertion_unix, source: textNl.sources.self_test, isTimeframePeriodKpi: true, + isArchived: true, }} description={replaceVariablesInText(textNl.kpi_tile.infected_participants_percentage.description, { infectedPercentage: totalInfectedPercentage, @@ -144,6 +145,7 @@ const InfectionRadar = (props: StaticProps) => { dateOfInsertion: data.self_test_overall.last_value.date_of_insertion_unix, source: textNl.sources.self_test, isTimeframePeriodKpi: true, + isArchived: true, }} description={textNl.kpi_tile.total_participants.description} > @@ -158,6 +160,7 @@ const InfectionRadar = (props: StaticProps) => { source: textNl.sources.self_test, timeframePeriod: confirmedCasesSelfTestedTimeframePeriod, dateOfInsertion: getLastInsertionDateOfPage(data, ['self_test_overall']), + isArchived: true, }} timeframeOptions={TimeframeOptionsList} timeframeInitialValue={confirmedCasesSelfTestedTimeframe} diff --git a/packages/app/src/pages/landelijk/patienten-in-beeld.tsx b/packages/app/src/pages/landelijk/patienten-in-beeld.tsx index 10edad43d1..222c3220b2 100644 --- a/packages/app/src/pages/landelijk/patienten-in-beeld.tsx +++ b/packages/app/src/pages/landelijk/patienten-in-beeld.tsx @@ -203,6 +203,7 @@ const PatientsPage = (props: StaticProps) => { source: textNl.sources.nice, dateOfInsertion: lastInsertionDateHospitalAdmissionsPerAgeGroupOverTime, timeframePeriod: hospitalAdmissionsPerAgeGroupOverTimeTimeframePeriod, + isArchived: true, }} onSelectTimeframe={setHospitalAdmissionsPerAgeGroupOverTimeTimeframe} toggle={{ @@ -233,6 +234,7 @@ const PatientsPage = (props: StaticProps) => { source: textNl.sources.nice, dateOfInsertion: lastInsertionDateIntensiveCareAdmissionsPerAgeGroupOverTime, timeframePeriod: intensiveCareAdmissionsPerAgeGroupOverTimeTimeframePeriod, + isArchived: true, }} onSelectTimeframe={setIntensiveCareAdmissionsPerAgeGroupOverTimeTimeframe} toggle={{ @@ -263,6 +265,7 @@ const PatientsPage = (props: StaticProps) => { source: textNl.sources.nice, dateOfInsertion: lastInsertionDateHospitalAdmissionsOverTime, timeframePeriod: hospitalAdmissionsOverTimeTimeframePeriod, + isArchived: true, }} timeframeOptions={TimeframeOptionsList} timeframeInitialValue={TimeframeOption.ALL} @@ -318,6 +321,7 @@ const PatientsPage = (props: StaticProps) => { source: textNl.sources.nice, dateOfInsertion: lastInsertionDateIntensiveCareAdmissionsOverTime, timeframePeriod: intensiveCareAdmissionsOverTimeTimeframePeriod, + isArchived: true, }} timeframeOptions={TimeframeOptionsList} timeframeInitialValue={TimeframeOption.ALL} diff --git a/packages/app/src/pages/landelijk/reproductiegetal.tsx b/packages/app/src/pages/landelijk/reproductiegetal.tsx index 9f5b47403f..1ebb5d015a 100644 --- a/packages/app/src/pages/landelijk/reproductiegetal.tsx +++ b/packages/app/src/pages/landelijk/reproductiegetal.tsx @@ -116,6 +116,8 @@ const ReproductionIndex = (props: StaticProps) => { timeframePeriod: reproductionLastValue.date_unix, dateOfInsertion: reproductionLastValue.date_of_insertion_unix, source: textNl.bronnen.rivm, + isTimeframePeriodKpi: true, + isArchived: true, }} hasNoBorder description={textNl.barscale_toelichting} diff --git a/packages/app/src/pages/landelijk/rioolwater.tsx b/packages/app/src/pages/landelijk/rioolwater.tsx index bdf71e8292..1e874036d5 100644 --- a/packages/app/src/pages/landelijk/rioolwater.tsx +++ b/packages/app/src/pages/landelijk/rioolwater.tsx @@ -125,6 +125,7 @@ const SewerWater = (props: StaticProps) => { dateOfInsertion: sewerAverages.last_value.date_of_insertion_unix, source: textNl.bronnen.rivm, isTimeframePeriodKpi: true, + isArchived: true, }} > ) => { dateOfInsertion: choropleth.gm.sewer[0].date_of_insertion_unix, source: textNl.bronnen.rivm, isTimeframePeriodKpi: true, + isArchived: true, }} valueAnnotation={commonTexts.waarde_annotaties.riool_normalized} legend={{ diff --git a/packages/app/src/pages/landelijk/sterfte.tsx b/packages/app/src/pages/landelijk/sterfte.tsx index 1ad39e3f31..ce535cc9b7 100644 --- a/packages/app/src/pages/landelijk/sterfte.tsx +++ b/packages/app/src/pages/landelijk/sterfte.tsx @@ -132,7 +132,12 @@ const DeceasedNationalPage = (props: StaticProps) => { {hasActiveWarningTile && } @@ -222,6 +227,7 @@ const DeceasedNationalPage = (props: StaticProps) => { dateOfInsertion: dataRivm.last_value.date_of_insertion_unix, source: textNl.section_deceased_rivm.bronnen.rivm, isTimeframePeriodKpi: true, + isArchived: true, }} description={textNl.section_deceased_rivm.kpi_covid_daily_description} > @@ -234,6 +240,7 @@ const DeceasedNationalPage = (props: StaticProps) => { dateOfInsertion: dataRivm.last_value.date_of_insertion_unix, source: textNl.section_deceased_rivm.bronnen.rivm, isTimeframePeriodKpi: true, + isArchived: true, }} description={textNl.section_deceased_rivm.kpi_covid_total_description} > @@ -282,6 +289,7 @@ const DeceasedNationalPage = (props: StaticProps) => { title={textNl.age_groups.title} description={textNl.age_groups.description} metadata={{ + timeframePeriod: dataDeceasedPerAgeGroup.values[dataDeceasedPerAgeGroup.values.length - 1].date_unix, dateOfInsertion: lastdeceasedPerAgeGroupInsertionDate, source: textNl.age_groups.bronnen.rivm, isArchived: true, diff --git a/packages/app/src/pages/landelijk/thuiswonende-70-plussers.tsx b/packages/app/src/pages/landelijk/thuiswonende-70-plussers.tsx index bd674039a6..cc18103bd2 100644 --- a/packages/app/src/pages/landelijk/thuiswonende-70-plussers.tsx +++ b/packages/app/src/pages/landelijk/thuiswonende-70-plussers.tsx @@ -205,7 +205,7 @@ function ElderlyAtHomeNationalPage(props: StaticProps) { /> {variantChart && variantLabels && ( @@ -205,6 +206,7 @@ export default function CovidVariantenPage(props: StaticProps diff --git a/packages/app/src/pages/landelijk/ziekenhuizen-in-beeld.tsx b/packages/app/src/pages/landelijk/ziekenhuizen-in-beeld.tsx index 5c0a5b23dd..b5c9f7fa07 100644 --- a/packages/app/src/pages/landelijk/ziekenhuizen-in-beeld.tsx +++ b/packages/app/src/pages/landelijk/ziekenhuizen-in-beeld.tsx @@ -173,6 +173,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { description={textNl.kpi_tiles.occupancies.description} source={textNl.sources.lnaz} timeframePeriod={{ start: hospitalLastValue.date_start_unix, end: hospitalLastValue.date_end_unix }} + isTimeframePeriodKpi={true} dateOfInsertion={hospitalLastValue.date_of_insertion_unix} tilesData={[ { @@ -188,6 +189,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { description: textNl.kpi_tiles.occupancies.icu.description, }, ]} + isArchived /> @@ -200,6 +202,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { source: textNl.sources.lnaz, timeframePeriod: hospitalBedsOccupiedOverTimeTimeframePeriod, dateOfInsertion: lastInsertionDateHospitalBedsOccupiedOverTime, + isArchived: true, }} timeframeInitialValue={hospitalBedsOccupiedOverTimeTimeframe} onSelectTimeframe={setHospitalBedsOccupiedOverTimeTimeframe} @@ -252,7 +255,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { ) => { title={textNl.kpi_tiles.influxes.title} description={textNl.kpi_tiles.influxes.description} source={textNl.sources.lnaz} + timeframePeriod={{ start: hospitalLastValue.date_start_unix, end: hospitalLastValue.date_end_unix }} + dateOfInsertion={hospitalLastValue.date_of_insertion_unix} + isTimeframePeriodKpi={true} + isArchived={true} tilesData={[ { value: hospitalLastValue.influx_covid_patients, @@ -330,6 +337,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { source: textNl.sources.lnaz, timeframePeriod: hospitalPatientInfluxOverTimeTimeframePeriod, dateOfInsertion: lastInsertionDateHospitalPatientInfluxOverTime, + isArchived: true, }} timeframeInitialValue={hospitalPatientInfluxOverTimeTimeframe} onSelectTimeframe={setHospitalPatientInfluxOverTimeTimeframe} @@ -377,6 +385,7 @@ const HospitalsAndCarePage = (props: StaticProps) => { source: textNl.sources.lnaz, timeframePeriod: intensiveCarePatientInfluxOverTimeTimeframePeriod, dateOfInsertion: lastInsertionDateIntensiveCarePatientInfluxOverTimeTimeframePeriod, + isArchived: true, }} timeframeInitialValue={intensiveCarePatientInfluxOverTimeTimeframe} onSelectTimeframe={setIntensiveCarePatientInfluxOverTimeTimeframe} From a9d42c8ae191a79bc3d7ac4bd183102407cdd475 Mon Sep 17 00:00:00 2001 From: M <120020483+VWSCoronaDashboard30@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:43:55 +0100 Subject: [PATCH 5/5] feature(COR-1956): Changed date_of_report to date_of_insertion_unix --- packages/app/src/domain/variants/variants-table-tile.tsx | 6 +++--- packages/app/src/pages/landelijk/varianten.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app/src/domain/variants/variants-table-tile.tsx b/packages/app/src/domain/variants/variants-table-tile.tsx index 007ee881ba..620df87e55 100644 --- a/packages/app/src/domain/variants/variants-table-tile.tsx +++ b/packages/app/src/domain/variants/variants-table-tile.tsx @@ -28,7 +28,7 @@ interface VariantsTableTileProps { dates: { date_start_unix: number; date_end_unix: number; - date_of_report_unix: number; + date_of_insertion_unix: number; }; children?: ReactNode; } @@ -70,7 +70,7 @@ interface VariantsTableTileWithDataProps { dates: { date_start_unix: number; date_end_unix: number; - date_of_report_unix: number; + date_of_insertion_unix: number; }; children?: ReactNode; } @@ -81,7 +81,7 @@ function VariantsTableTileWithData({ text, sampleThresholdPassed, source, data, const metadata: MetadataProps = { timeframePeriod: { start: dates.date_start_unix, end: dates.date_end_unix }, source, - dateOfInsertion: dates.date_of_report_unix, + dateOfInsertion: dates.date_of_insertion_unix, isTimeframePeriodKpi: true, isArchived: true, }; diff --git a/packages/app/src/pages/landelijk/varianten.tsx b/packages/app/src/pages/landelijk/varianten.tsx index 27783d400b..07f71a7bbb 100644 --- a/packages/app/src/pages/landelijk/varianten.tsx +++ b/packages/app/src/pages/landelijk/varianten.tsx @@ -220,7 +220,7 @@ export default function CovidVariantenPage(props: StaticProps