diff --git a/app/src/frontend/building/data-containers/age.tsx b/app/src/frontend/building/data-containers/age.tsx index 7175d54d..15ff3c70 100644 --- a/app/src/frontend/building/data-containers/age.tsx +++ b/app/src/frontend/building/data-containers/age.tsx @@ -16,7 +16,61 @@ import { CategoryViewProps } from './category-view-props'; */ const AgeView: React.FunctionComponent = (props) => { const currentYear = new Date().getFullYear(); + if (props.building.date_source == "Expert knowledge of building" || + props.building.date_source == "Expert estimate from image" || + props.building.date_source == null + ){ + return ( + + + + + + + + ); + }; return ( = (props) => { copy={props.copy} onChange={props.onChange} tooltip={dataFields.date_source.tooltip} - placeholder="" - options={[ - "Expert knowledge of building", - "Expert estimate from image", - "Survey of London", - "Pevsner Guides", - "Victoria County History", - "Local history publication", - "Other publication", - "National Heritage List for England", - "Other database or gazetteer", - "Historical map", - "Other archive document", - "Film/Video", - "Other website", - "Other" - ]} - /> - = (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 828c8c5b..f808f000 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, @@ -269,6 +278,22 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ category: Category.Age, title: "Source of information", tooltip: "Source for the main start date", + items: [ + "Expert knowledge of building", + "Expert estimate from image", + "Survey of London", + "Pevsner Guides", + "Victoria County History", + "Local history publication", + "Other publication", + "National Heritage List for England", + "Other database or gazetteer", + "Historical map", + "Other archive document", + "Film/Video", + "Other website", + "Other" + ], example: "", }, date_source_detail: {