From b46f637911321561efe950e4ab1c35768ce81342 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 12 May 2022 16:30:55 +0100 Subject: [PATCH] set up current_landuse_source like date_source --- .../frontend/building/data-containers/use.tsx | 189 +++++++++++------- app/src/frontend/config/data-fields-config.ts | 9 + 2 files changed, 129 insertions(+), 69 deletions(-) diff --git a/app/src/frontend/building/data-containers/use.tsx b/app/src/frontend/building/data-containers/use.tsx index 04090357..8535767c 100644 --- a/app/src/frontend/building/data-containers/use.tsx +++ b/app/src/frontend/building/data-containers/use.tsx @@ -14,77 +14,128 @@ import Verification from '../data-components/verification'; /** * Use view/edit section */ -const UseView: React.FunctionComponent = (props) => ( - - - - = (props) => { + if (props.building.current_landuse_source == "Expert/personal knowledge of building" || + props.building.current_landuse_source == "Online streetview image" || + props.building.current_landuse_source == null + ){ + return ( + + + + + { + props.mode != 'view' && + + } + + + + ); + }; + return ( + + + - { - props.mode != 'view' && - - } - - + { + props.mode != 'view' && + + } + - - -); + + + + ); +}; const UseContainer = withCopyEdit(UseView); export default UseContainer; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 83c9cc79..a77998c1 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -198,6 +198,15 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ title: "Source of information", tooltip: "Source for the current land use", example: "", + items: [ + "Expert/personal knowledge of building", + "Online streetview image", + "Open planning authority dataset", + "Open property tax dataset", + "Open housing dataset", + "Open address dataset", + "Other" + ], }, current_landuse_source_detail: { category: Category.LandUse,