From c026bed54d53bcb38543d202a354797fb6a9350b Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Tue, 5 Jul 2022 16:16:25 +0100 Subject: [PATCH 1/5] allow edits location fields --- app/src/api/config/dataFields.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index faaea8be..a47ae630 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -56,7 +56,7 @@ export const buildingAttributesConfig = valueType()({ /* eslint verify: true, }, location_name: { - edit: false, + edit: true, verify: true, }, location_number: { @@ -64,17 +64,17 @@ export const buildingAttributesConfig = valueType()({ /* eslint verify: true, }, location_street: { - edit: false, + edit: true, verify: true, }, location_line_two: { - edit: false, + edit: true, }, location_town: { - edit: false, + edit: true, }, location_postcode: { - edit: false, + edit: true, }, location_latitude: { edit: true, From e97b94bded3564e0bc6cb1723004a9b2eb30eba7 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Tue, 5 Jul 2022 16:22:49 +0100 Subject: [PATCH 2/5] remove info box --- app/src/frontend/building/data-containers/location.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/location.tsx b/app/src/frontend/building/data-containers/location.tsx index d94011f9..6be0c41a 100644 --- a/app/src/frontend/building/data-containers/location.tsx +++ b/app/src/frontend/building/data-containers/location.tsx @@ -15,7 +15,6 @@ const locationNumberPattern = "[1-9]\\d*[a-z]?(-([1-9]\\d*))?"; ///[1-9]\d*[a-z] const LocationView: React.FunctionComponent = (props) => ( - Date: Tue, 5 Jul 2022 16:29:30 +0100 Subject: [PATCH 3/5] un-disable --- .../frontend/building/data-containers/location.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/frontend/building/data-containers/location.tsx b/app/src/frontend/building/data-containers/location.tsx index 6be0c41a..892d3d6f 100644 --- a/app/src/frontend/building/data-containers/location.tsx +++ b/app/src/frontend/building/data-containers/location.tsx @@ -24,7 +24,7 @@ const LocationView: React.FunctionComponent = (props) => ( onChange={props.onChange} tooltip={dataFields.location_name.tooltip} placeholder="Building name (if any)" - disabled={true} + /> = (props) => ( mode={props.mode} copy={props.copy} onChange={props.onChange} - disabled={true} + /> = (props) => ( mode={props.mode} copy={props.copy} onChange={props.onChange} - disabled={true} + /> = (props) => ( mode={props.mode} copy={props.copy} onChange={props.onChange} - disabled={true} + /> = (props) => ( onChange={props.onChange} maxLength={8} valueTransform={x=>x.toUpperCase()} - disabled={true} + /> = (props) => ( copy={props.copy} tooltip={dataFields.ref_toid.tooltip} onChange={props.onChange} - disabled={true} + /> Date: Tue, 5 Jul 2022 16:32:00 +0100 Subject: [PATCH 4/5] add verification --- app/src/api/config/dataFields.ts | 3 +++ .../building/data-containers/location.tsx | 25 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index a47ae630..a17f0fa8 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -69,12 +69,15 @@ export const buildingAttributesConfig = valueType()({ /* eslint }, location_line_two: { edit: true, + verify: true }, location_town: { edit: true, + verify: true }, location_postcode: { edit: true, + verify: true }, location_latitude: { edit: true, diff --git a/app/src/frontend/building/data-containers/location.tsx b/app/src/frontend/building/data-containers/location.tsx index 892d3d6f..3497ed12 100644 --- a/app/src/frontend/building/data-containers/location.tsx +++ b/app/src/frontend/building/data-containers/location.tsx @@ -79,6 +79,15 @@ const LocationView: React.FunctionComponent = (props) => ( mode={props.mode} copy={props.copy} onChange={props.onChange} + /> + /> = (props) => ( copy={props.copy} onChange={props.onChange} + /> + = (props) => ( maxLength={8} valueTransform={x=>x.toUpperCase()} + /> + Date: Tue, 5 Jul 2022 16:35:48 +0100 Subject: [PATCH 5/5] fix error --- app/src/frontend/building/data-containers/location.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/location.tsx b/app/src/frontend/building/data-containers/location.tsx index 3497ed12..e19ca1a3 100644 --- a/app/src/frontend/building/data-containers/location.tsx +++ b/app/src/frontend/building/data-containers/location.tsx @@ -88,8 +88,6 @@ const LocationView: React.FunctionComponent = (props) => ( user_verified_as={props.user_verified.location_line_two} verified_count={props.building.verified.location_line_two} /> - - />