From 0517222670b5828dc4f01126c449c9883fcbec92 Mon Sep 17 00:00:00 2001 From: Mike Simpson Date: Wed, 28 Jun 2023 13:16:11 +0100 Subject: [PATCH] Add fields to Age and History --- app/src/api/config/dataFields.ts | 8 +++++++ .../building/data-containers/age-history.tsx | 24 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 12 ++++++++++ migrations/041.ui_revamp_tweaks.down.sql | 4 +++- migrations/041.ui_revamp_tweaks.up.sql | 4 +++- 5 files changed, 50 insertions(+), 2 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index f632688d..4349fe86 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -693,6 +693,14 @@ export const buildingAttributesConfig = valueType()({ /* eslint age_retrofit_date_source_links : { edit: true, verify: true + }, + age_historical_raster_map_links : { + edit: true, + verify: true + }, + age_historical_vectorised_footprint_links : { + edit: true, + verify: true } }); diff --git a/app/src/frontend/building/data-containers/age-history.tsx b/app/src/frontend/building/data-containers/age-history.tsx index 7d5fab07..5d8d1e57 100644 --- a/app/src/frontend/building/data-containers/age-history.tsx +++ b/app/src/frontend/building/data-containers/age-history.tsx @@ -432,6 +432,30 @@ const AgeView: React.FunctionComponent = (props) => { This section provides links to open digitised historical maps/mapping data that we are using in the Colouring Cities platform. + + ); diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index d4eea902..6838613d 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -1305,6 +1305,18 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ tooltip: "Source link(s) for street width data", example: ["", "", ""], }, + age_historical_raster_map_links: { + category: Category.Age, + title: "Historical maps links", + tooltip: "Links to rasterised historical maps", + example: ["", "", ""], + }, + age_historical_vectorised_footprint_links: { + category: Category.Age, + title: "Extracted vectorised historical footprints links", + tooltip: "Extracted vectorised historical footprints links", + example: ["", "", ""], + } }; export const allFieldsConfig = { ...dataFields, ...buildingUserFields }; \ No newline at end of file diff --git a/migrations/041.ui_revamp_tweaks.down.sql b/migrations/041.ui_revamp_tweaks.down.sql index dc30b17f..34132357 100644 --- a/migrations/041.ui_revamp_tweaks.down.sql +++ b/migrations/041.ui_revamp_tweaks.down.sql @@ -1,2 +1,4 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS location_name_link; -ALTER TABLE buildings DROP COLUMN IF EXISTS location_alternative_footprint_links; \ No newline at end of file +ALTER TABLE buildings DROP COLUMN IF EXISTS location_alternative_footprint_links; +ALTER TABLE buildings DROP COLUMN IF EXISTS age_historical_raster_map_links; +ALTER TABLE buildings DROP COLUMN IF EXISTS age_historical_vectorised_footprint_links; \ No newline at end of file diff --git a/migrations/041.ui_revamp_tweaks.up.sql b/migrations/041.ui_revamp_tweaks.up.sql index bb1d12b7..549dee4b 100644 --- a/migrations/041.ui_revamp_tweaks.up.sql +++ b/migrations/041.ui_revamp_tweaks.up.sql @@ -1,2 +1,4 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_name_link text; -ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_alternative_footprint_links text[]; \ No newline at end of file +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_alternative_footprint_links text[]; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_historical_raster_map_links text[]; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_historical_vectorised_footprint_links text[]; \ No newline at end of file