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

Commit

Permalink
Feature/incomplete zeewolde data (#4185)
Browse files Browse the repository at this point in the history
* Research commit

* Added logic for manual override

* Added logic for manual override

* Updated Lokalize key locations

* Added to GM domain

* Remove todo

* Research commit

* Added logic for manual override

* Added logic for manual override

* Updated Lokalize key locations

* Added to GM domain

* Remove todo

* add to VR

* Added selected installation and right start and end unix

* fix research leftovers

* remove unnecessary sanity move

* move lokalize from gm to shared

* Research commit

* Added logic for manual override

* Added logic for manual override

* Remove todo

* add to VR

* Added selected installation and right start and end unix

* fix research leftovers

* remove unnecessary sanity move

* move lokalize from gm to shared

* Move from GM to Shared

* Research commit

* Added logic for manual override

* Remove todo

* fix research leftovers

* move lokalize from gm to shared

* Updated according to PR feedback
  • Loading branch information
Jorrik-Klijnsma-Work authored Apr 15, 2022
1 parent 07e1959 commit 55183ca
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 4 deletions.
34 changes: 30 additions & 4 deletions packages/app/src/domain/sewer/sewer-chart/sewer-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ type SewerChartProps = {
valueAnnotation: string;
};
vrNameOrGmName?: string;
incompleteDatesAndTexts?: {
zeewolde_date_end_in_unix_time: string;
zeewolde_date_start_in_unix_time: string;
zeewolde_label: string;
zeewolde_short_label: string;
};
warning?: string;
};

Expand All @@ -55,6 +61,7 @@ export function SewerChart({
dataPerInstallation,
text,
vrNameOrGmName,
incompleteDatesAndTexts,
warning,
}: SewerChartProps) {
const {
Expand Down Expand Up @@ -83,6 +90,27 @@ export function SewerChart({

const scopedWarning = useScopedWarning(vrNameOrGmName || '', warning || '');

const dataOptions =
incompleteDatesAndTexts && selectedInstallation === 'ZEEWOLDE'
? {
valueAnnotation: text.valueAnnotation,
timespanAnnotations: [
{
start: parseInt(
incompleteDatesAndTexts.zeewolde_date_start_in_unix_time
),
end: parseInt(
incompleteDatesAndTexts.zeewolde_date_end_in_unix_time
),
label: incompleteDatesAndTexts.zeewolde_label,
shortLabel: incompleteDatesAndTexts.zeewolde_short_label,
},
],
}
: {
valueAnnotation: text.valueAnnotation,
};

const optionsWithContent = useMemo(
() =>
options
Expand Down Expand Up @@ -170,7 +198,7 @@ export function SewerChart({
return <LocationTooltip data={data} />;
}
}}
dataOptions={{ valueAnnotation: text.valueAnnotation }}
dataOptions={dataOptions}
/>
) : (
<TimeSeriesChart
Expand All @@ -185,9 +213,7 @@ export function SewerChart({
splitPoints: averageSplitPoints,
},
]}
dataOptions={{
valueAnnotation: text.valueAnnotation,
}}
dataOptions={dataOptions}
/>
)
}
Expand Down
3 changes: 3 additions & 0 deletions packages/app/src/pages/gemeente/[code]/rioolwater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ const SewerWater = (props: StaticProps<typeof getStaticProps>) => {
valueAnnotation: commonTexts.waarde_annotaties.riool_normalized,
}}
vrNameOrGmName={municipalityName}
incompleteDatesAndTexts={
textShared.zeewolde_incomplete_manualy_override
}
warning={textGm.warning_chart}
/>
</TileList>
Expand Down
3 changes: 3 additions & 0 deletions packages/app/src/pages/veiligheidsregio/[code]/rioolwater.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ const SewerWater = (props: StaticProps<typeof getStaticProps>) => {
valueAnnotation: commonTexts.waarde_annotaties.riool_normalized,
}}
vrNameOrGmName={vrName}
incompleteDatesAndTexts={
textShared.zeewolde_incomplete_manualy_override
}
warning={textVr.warning_chart}
/>
</TileList>
Expand Down
8 changes: 8 additions & 0 deletions packages/cms/src/lokalize/key-mutations.csv
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ timestamp,action,key,document_id,move_to
2022-04-14T08:55:50.896Z,move,pages.vaccinationsPage.nl.four_kpi_section.total_booster_and_third_shots.sources.href,eExb1tVTD1y5h6ShWfEAqa,pages.vaccinationsPage.nl.four_kpi_section.total_booster_shots.sources.href
2022-04-14T08:55:50.896Z,move,pages.vaccinationsPage.nl.four_kpi_section.total_booster_and_third_shots.sources.text,eExb1tVTD1y5h6ShWfEB3y,pages.vaccinationsPage.nl.four_kpi_section.total_booster_shots.sources.text
2022-04-14T08:55:50.896Z,move,pages.vaccinationsPage.nl.four_kpi_section.total_booster_and_third_shots.title,eExb1tVTD1y5h6ShWfEAB5,pages.vaccinationsPage.nl.four_kpi_section.total_booster_shots.title
2022-04-14T11:35:18.085Z,add,pages.sewerPage.gm.zeewolde_incomplete_manualy_override.zeewolde_date_start_in_unix_time,T6FOC3TDR34eMSB5nyzsA8,__
2022-04-14T11:35:19.285Z,add,pages.sewerPage.gm.zeewolde_incomplete_manualy_override.zeewolde_date_end_in_unix_time,BarLwW8hBDpE0bK0rLm9Kv,__
2022-04-14T11:35:20.492Z,add,pages.sewerPage.gm.zeewolde_incomplete_manualy_override.zeewolde_label,T6FOC3TDR34eMSB5nyztO0,__
2022-04-14T11:35:21.318Z,add,pages.sewerPage.gm.zeewolde_incomplete_manualy_override.zeewolde_short_label,T6FOC3TDR34eMSB5nyztli,__
2022-04-15T09:48:51.332Z,move,pages.sewerPage.gm.zeewolde_incomplete_manualy_override.zeewolde_date_end_in_unix_time,BarLwW8hBDpE0bK0rLm9Kv,pages.sewerPage.shared.zeewolde_incomplete_manualy_override.zeewolde_date_end_in_unix_time
2022-04-15T09:48:51.333Z,move,pages.sewerPage.gm.zeewolde_incomplete_manualy_override.zeewolde_date_start_in_unix_time,T6FOC3TDR34eMSB5nyzsA8,pages.sewerPage.shared.zeewolde_incomplete_manualy_override.zeewolde_date_start_in_unix_time
2022-04-15T09:48:51.334Z,move,pages.sewerPage.gm.zeewolde_incomplete_manualy_override.zeewolde_label,T6FOC3TDR34eMSB5nyztO0,pages.sewerPage.shared.zeewolde_incomplete_manualy_override.zeewolde_label
2022-04-15T09:48:51.336Z,move,pages.sewerPage.gm.zeewolde_incomplete_manualy_override.zeewolde_short_label,T6FOC3TDR34eMSB5nyztli,pages.sewerPage.shared.zeewolde_incomplete_manualy_override.zeewolde_short_label

0 comments on commit 55183ca

Please sign in to comment.