From 8cab9bbe2c90bfd8655f3a0d7aee54a1240a8497 Mon Sep 17 00:00:00 2001 From: Mike Simpson Date: Fri, 14 Jul 2023 14:30:50 +0100 Subject: [PATCH] Add standard source types (below historical ones) #1193 --- app/src/api/config/dataFields.ts | 8 +++++ .../building/data-containers/age-history.tsx | 35 +++++++++++++++++-- app/src/frontend/config/data-fields-config.ts | 15 +++++++- migrations/041.ui_revamp_tweaks.up.sql | 5 ++- 4 files changed, 59 insertions(+), 4 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 0cf01a03..c780eb04 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -134,6 +134,14 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true, }, + date_source_type: { + edit: true, + verify: true, + }, + date_source_links: { + edit: true, + verify: true, + }, facade_year: { 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 3d0c4cb7..47d2459e 100644 --- a/app/src/frontend/building/data-containers/age-history.tsx +++ b/app/src/frontend/building/data-containers/age-history.tsx @@ -103,6 +103,7 @@ const AgeView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.facade_year} verified_count={props.building.verified.facade_year} /> +
= (props) => { /> } - + + {(props.building.date_source_type == dataFields.date_source_type.items[0] || + props.building.date_source_type == dataFields.date_source_type.items[1] || + props.building.date_source_type == null) ? <> : + <> + + + } + {/* + />*/}