From 5aa13e0e83e6a544795a2627794523778e22c416 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 11:52:57 +0100 Subject: [PATCH 01/29] add copy tool Team fields --- app/src/frontend/building/data-containers/team.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 64ded5a3..4e3543b6 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -47,6 +47,7 @@ const TeamView: React.FunctionComponent = (props) => { slug="has_extension" value={props.building.has_extension} mode={props.mode} + copy={props.copy} onChange={props.onChange} tooltip={dataFields.has_extension.tooltip} /> @@ -189,7 +190,7 @@ const TeamView: React.FunctionComponent = (props) => { title={dataFields.designer_awards.title} tooltip={dataFields.designer_awards.tooltip} value={props.building.designer_awards} - + copy={props.copy} onChange={props.onChange} mode={props.mode} /> From 38827907067a503ad0ea9abea5aa86d1fd04d441 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 12:03:31 +0100 Subject: [PATCH 02/29] set copyable = true for MultiDataEntry --- .../data-components/multi-data-entry/multi-data-entry.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-components/multi-data-entry/multi-data-entry.tsx b/app/src/frontend/building/data-components/multi-data-entry/multi-data-entry.tsx index 50e38742..318debf1 100644 --- a/app/src/frontend/building/data-components/multi-data-entry/multi-data-entry.tsx +++ b/app/src/frontend/building/data-components/multi-data-entry/multi-data-entry.tsx @@ -16,7 +16,7 @@ interface MultiDataEntryProps extends BaseDataEntryProps, TextDataEntryInputProp export const MultiDataEntry: React.FC = ({ editableEntries = false, - copyable = false, + copyable = true, confirmOnEnter = true, ...props }) => { From aa8649f710e857fbfbb575fc71175ae717994b1f Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 13:38:32 +0100 Subject: [PATCH 03/29] add copy tool to missing community field --- app/src/frontend/building/data-containers/community.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index d074da38..05e73e27 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -150,10 +150,10 @@ const CommunityView: React.FunctionComponent = (props) => { isUrl={true} placeholder={'https://...'} editableEntries={true} - value={props.building.community_public_ownership_sources} onChange={props.onChange} mode={props.mode} + copy={props.copy} /> Date: Mon, 20 Jun 2022 15:36:26 +0100 Subject: [PATCH 04/29] attempt to set copy tool to checked by default --- .../frontend/building/header-buttons/copy-control.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/src/frontend/building/header-buttons/copy-control.tsx b/app/src/frontend/building/header-buttons/copy-control.tsx index 3d6d1e60..63dcb4bd 100644 --- a/app/src/frontend/building/header-buttons/copy-control.tsx +++ b/app/src/frontend/building/header-buttons/copy-control.tsx @@ -8,6 +8,17 @@ interface CopyControlProps { toggleCopying: () => void; } +function initCopyControlProps(options?: Partial): CopyControlProps { + const defaults = { + copying: true + }; + + return { + ...defaults, + ...options, + }; +} + const CopyControl: React.FC = props => ( props.copying ? <> From 9517553de9d30c2468206e6dc6916606428982ab Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 15:38:46 +0100 Subject: [PATCH 05/29] add blank string as default for cat --- app/src/frontend/building/header-buttons/copy-control.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/header-buttons/copy-control.tsx b/app/src/frontend/building/header-buttons/copy-control.tsx index 63dcb4bd..e8f68f51 100644 --- a/app/src/frontend/building/header-buttons/copy-control.tsx +++ b/app/src/frontend/building/header-buttons/copy-control.tsx @@ -10,6 +10,7 @@ interface CopyControlProps { function initCopyControlProps(options?: Partial): CopyControlProps { const defaults = { + cat: '', copying: true }; From 54644c36d653f7315f6a863a29eb3d9e20b46561 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 15:39:59 +0100 Subject: [PATCH 06/29] add blank string as default for data_string --- app/src/frontend/building/header-buttons/copy-control.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/header-buttons/copy-control.tsx b/app/src/frontend/building/header-buttons/copy-control.tsx index e8f68f51..4d454e36 100644 --- a/app/src/frontend/building/header-buttons/copy-control.tsx +++ b/app/src/frontend/building/header-buttons/copy-control.tsx @@ -11,6 +11,7 @@ interface CopyControlProps { function initCopyControlProps(options?: Partial): CopyControlProps { const defaults = { cat: '', + data_string: '', copying: true }; From 05ee54f5c18e426fcd3a7f62a216ce922f75e239 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 15:43:32 +0100 Subject: [PATCH 07/29] add undefined as default for toggleCopying --- app/src/frontend/building/header-buttons/copy-control.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/header-buttons/copy-control.tsx b/app/src/frontend/building/header-buttons/copy-control.tsx index 4d454e36..a804c8c0 100644 --- a/app/src/frontend/building/header-buttons/copy-control.tsx +++ b/app/src/frontend/building/header-buttons/copy-control.tsx @@ -12,7 +12,8 @@ function initCopyControlProps(options?: Partial): CopyControlP const defaults = { cat: '', data_string: '', - copying: true + copying: true, + toggleCopying: undefined }; return { From f2a7f86d929b2007b0136d9d1c0efa5cac5fd475 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 16:02:45 +0100 Subject: [PATCH 08/29] initialise CopyProps rather than CopyControlProps --- .../data-containers/category-view-props.ts | 12 ++++++++++++ .../building/header-buttons/copy-control.tsx | 14 -------------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/app/src/frontend/building/data-containers/category-view-props.ts b/app/src/frontend/building/data-containers/category-view-props.ts index 27d510f6..f8d3d256 100644 --- a/app/src/frontend/building/data-containers/category-view-props.ts +++ b/app/src/frontend/building/data-containers/category-view-props.ts @@ -7,6 +7,18 @@ interface CopyProps { copyingKey: (key: string) => boolean; } +function initCopyProps(options?: Partial): CopyProps { + const defaults = { + copying: true, + toggleCopying: undefined + }; + + return { + ...defaults, + ...options, + }; +} + interface CategoryViewProps { intro: string; building: Building; diff --git a/app/src/frontend/building/header-buttons/copy-control.tsx b/app/src/frontend/building/header-buttons/copy-control.tsx index a804c8c0..3d6d1e60 100644 --- a/app/src/frontend/building/header-buttons/copy-control.tsx +++ b/app/src/frontend/building/header-buttons/copy-control.tsx @@ -8,20 +8,6 @@ interface CopyControlProps { toggleCopying: () => void; } -function initCopyControlProps(options?: Partial): CopyControlProps { - const defaults = { - cat: '', - data_string: '', - copying: true, - toggleCopying: undefined - }; - - return { - ...defaults, - ...options, - }; -} - const CopyControl: React.FC = props => ( props.copying ? <> From 86c535d27bd9b8dc28a5f8a72b66b08e408a7582 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 20 Jun 2022 16:04:43 +0100 Subject: [PATCH 09/29] switch to a const for defaultCopyProps --- .../frontend/building/data-containers/category-view-props.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/category-view-props.ts b/app/src/frontend/building/data-containers/category-view-props.ts index f8d3d256..c80504b3 100644 --- a/app/src/frontend/building/data-containers/category-view-props.ts +++ b/app/src/frontend/building/data-containers/category-view-props.ts @@ -19,12 +19,14 @@ function initCopyProps(options?: Partial): CopyProps { }; } +const defaultCopyProps: CopyProps = initCopyProps(); + interface CategoryViewProps { intro: string; building: Building; mode: 'view' | 'edit' | 'multi-edit'; edited: boolean; - copy: CopyProps; + copy: defaultCopyProps; onChange: (key: string, value: any) => void; onVerify: (slug: string, verify: boolean, x: number, y: number) => void; From 42aa1f6ed047c0eae7312a217a80d5a004e60659 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 23 Jun 2022 10:20:25 +0100 Subject: [PATCH 10/29] import datafields --- app/src/frontend/building/data-container.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index 1d47c3bd..93c02262 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -17,6 +17,7 @@ import { CopyControl } from './header-buttons/copy-control'; import { ViewEditControl } from './header-buttons/view-edit-control'; import './data-container.css'; +import { dataFields } from '../config/data-fields-config' interface DataContainerProps { title: string; From 56db0c58df7fefcaafc18486e0f69efc51d8c97d Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 23 Jun 2022 10:38:22 +0100 Subject: [PATCH 11/29] set all copyapble keys to true by default --- app/src/frontend/building/data-container.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index 93c02262..f8b7e3fb 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -81,11 +81,15 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine static getDerivedStateFromProps(props, state): DataContainerState { const newBuildingId = props.building == undefined ? undefined : props.building.building_id; const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id; + const categoryKeys = {}; + for (let key in myDictionary) { + categoryKeys[key] = true; + } if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) { return { error: undefined, copying: false, - keys_to_copy: {}, + keys_to_copy: categoryKeys, buildingEdits: {}, currentBuildingId: newBuildingId, currentBuildingRevisionId: newBuildingRevisionId From b33335135096186bf3cdfb3aaf739c7d06232aea Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 23 Jun 2022 10:39:09 +0100 Subject: [PATCH 12/29] fix prev commit --- app/src/frontend/building/data-container.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index f8b7e3fb..0142590a 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -82,7 +82,7 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine const newBuildingId = props.building == undefined ? undefined : props.building.building_id; const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id; const categoryKeys = {}; - for (let key in myDictionary) { + for (let key in categoryKeys) { categoryKeys[key] = true; } if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) { From bfe519d7fe99f85a7830f79247d219f5da3eb732 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 23 Jun 2022 10:39:55 +0100 Subject: [PATCH 13/29] fix prev commit properly --- app/src/frontend/building/data-container.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index 0142590a..d4ed9354 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -82,7 +82,7 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine const newBuildingId = props.building == undefined ? undefined : props.building.building_id; const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id; const categoryKeys = {}; - for (let key in categoryKeys) { + for (let key in dataFields) { categoryKeys[key] = true; } if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) { From 52a5a22967c1e7691c9f6dd591b69910bd8f2130 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 23 Jun 2022 10:53:39 +0100 Subject: [PATCH 14/29] only copy keys from the chosen category by default --- app/src/frontend/building/data-container.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index d4ed9354..ce1db51b 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -82,8 +82,11 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine const newBuildingId = props.building == undefined ? undefined : props.building.building_id; const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id; const categoryKeys = {}; + for (let key in dataFields) { - categoryKeys[key] = true; + if (dataFields[key].category == props.cat){ + categoryKeys[key] = true; + } } if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) { return { From 3318f0e21d89a10a14c88fe991e79fb160976016 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Thu, 23 Jun 2022 15:51:10 +0100 Subject: [PATCH 15/29] only copy keys that are not blank --- app/src/frontend/building/data-container.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index ce1db51b..f0c1d674 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -84,7 +84,7 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine const categoryKeys = {}; for (let key in dataFields) { - if (dataFields[key].category == props.cat){ + if (dataFields[key].category == props.cat && props.building[key] != null){ categoryKeys[key] = true; } } From 3320614176b649a4ce5fb3188b2c8aff73cb18b5 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 14:19:37 +0100 Subject: [PATCH 16/29] add fieldName block var --- app/src/frontend/building/data-container.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index f0c1d674..dbe0abad 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -81,10 +81,12 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine static getDerivedStateFromProps(props, state): DataContainerState { const newBuildingId = props.building == undefined ? undefined : props.building.building_id; const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id; + const categoryKeys = {}; - for (let key in dataFields) { - if (dataFields[key].category == props.cat && props.building[key] != null){ + for (let key in dataFields) { + let fieldName = props.building == undefined ? undefined : props.building[key]; + if (dataFields[key].category == props.cat && fieldName != null){ categoryKeys[key] = true; } } From 96df75e1cb6309bbcd9eddbe89e31e88f019f364 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 14:25:43 +0100 Subject: [PATCH 17/29] handle unusual case of Team having a non ccategory field --- app/src/frontend/building/data-container.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index dbe0abad..db45a770 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -89,6 +89,9 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine if (dataFields[key].category == props.cat && fieldName != null){ categoryKeys[key] = true; } + if (props.cat == 'team' && key == 'date_year' fieldName != null){ + categoryKeys[key] = true; + } } if(newBuildingId !== state.currentBuildingId || newBuildingRevisionId > state.currentBuildingRevisionId) { return { From 455a22fc135dda9994edb3fbd221fd172260eb54 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 14:27:12 +0100 Subject: [PATCH 18/29] fix prev commit --- app/src/frontend/building/data-container.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index db45a770..c3b8d291 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -89,7 +89,7 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine if (dataFields[key].category == props.cat && fieldName != null){ categoryKeys[key] = true; } - if (props.cat == 'team' && key == 'date_year' fieldName != null){ + if (props.cat == 'team' && key == 'date_year' && fieldName != null){ categoryKeys[key] = true; } } From 8d9f319aea187c6e16227de09f6e42e8d4fd4a33 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:01:37 +0100 Subject: [PATCH 19/29] don't copy certain keys for current use --- app/src/frontend/building/data-container.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index c3b8d291..fb575fce 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -83,13 +83,15 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine const newBuildingRevisionId = props.building == undefined ? undefined : props.building.revision_id; const categoryKeys = {}; - + const blackListedKeys = ['current_landuse_order', + 'current_landuse_verified' + ] for (let key in dataFields) { let fieldName = props.building == undefined ? undefined : props.building[key]; - if (dataFields[key].category == props.cat && fieldName != null){ + if (dataFields[key].category == props.cat && fieldName != null && !blackListedKeys.includes(key)){ categoryKeys[key] = true; } - if (props.cat == 'team' && key == 'date_year' && fieldName != null){ + if (props.cat == 'team' && key == 'date_year' && fieldName != null && !blackListedKeys.includes(key)){ categoryKeys[key] = true; } } From 9885bf4b731727093ce73d9652c1e62f563f17de Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:12:13 +0100 Subject: [PATCH 20/29] add planning_in_list to blackListedKeys --- app/src/frontend/building/data-container.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index fb575fce..d94da178 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -84,7 +84,8 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine const categoryKeys = {}; const blackListedKeys = ['current_landuse_order', - 'current_landuse_verified' + 'current_landuse_verified', + 'planning_in_list' ] for (let key in dataFields) { let fieldName = props.building == undefined ? undefined : props.building[key]; From 36f86216e6fe4c0586f955c18581ab1db7ec7f28 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:15:39 +0100 Subject: [PATCH 21/29] blacklist more planning keys --- app/src/frontend/building/data-container.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index d94da178..f4f026f6 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -85,7 +85,10 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine const categoryKeys = {}; const blackListedKeys = ['current_landuse_order', 'current_landuse_verified', - 'planning_in_list' + 'planning_in_list', + 'planning_list_id', + 'planning_list_cat', + 'planning_list_grade' ] for (let key in dataFields) { let fieldName = props.building == undefined ? undefined : props.building[key]; From 63cfb8219d39b7124b5164538485582764b9aac1 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:23:17 +0100 Subject: [PATCH 22/29] add copy tool where missing from community category --- app/src/frontend/building/data-containers/community.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index 05e73e27..bacb6ef9 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -87,7 +87,7 @@ const CommunityView: React.FunctionComponent = (props) => { title={dataFields.community_activities_current.title} tooltip={dataFields.community_activities_current.tooltip} value={props.building.community_activities_current} - + copy={props.copy} onChange={props.onChange} mode={props.mode} /> @@ -96,7 +96,7 @@ const CommunityView: React.FunctionComponent = (props) => { title={dataFields.community_activities.title} tooltip={dataFields.community_activities.tooltip} value={props.building.community_activities} - + copy={props.copy} onChange={props.onChange} mode={props.mode} /> @@ -105,7 +105,7 @@ const CommunityView: React.FunctionComponent = (props) => { title={dataFields.community_activities_always.title} tooltip={dataFields.community_activities_always.tooltip} value={props.building.community_activities_always} - + copy={props.copy} onChange={props.onChange} mode={props.mode} /> From 673a59df6f11ddad13fbd3b059babd0bffbbf960 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:24:18 +0100 Subject: [PATCH 23/29] finish prev commit --- app/src/frontend/building/data-containers/community.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index bacb6ef9..12436bb1 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -64,6 +64,7 @@ const CommunityView: React.FunctionComponent = (props) => { label: definition.title })) } + copy={props.copy} mode={props.mode} /> } From f2848140e0edfa9af62d2f9071d00f88b2bd2cd1 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:32:01 +0100 Subject: [PATCH 24/29] blacklist community keys --- app/src/frontend/building/data-container.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-container.tsx b/app/src/frontend/building/data-container.tsx index f4f026f6..fb33e292 100644 --- a/app/src/frontend/building/data-container.tsx +++ b/app/src/frontend/building/data-container.tsx @@ -88,7 +88,9 @@ const withCopyEdit: (wc: React.ComponentType) => DataContaine 'planning_in_list', 'planning_list_id', 'planning_list_cat', - 'planning_list_grade' + 'planning_list_grade', + 'likes_total', + 'community_local_significance_total' ] for (let key in dataFields) { let fieldName = props.building == undefined ? undefined : props.building[key]; From cc989664d02771caa7de263347325237338e42d7 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:34:30 +0100 Subject: [PATCH 25/29] remove copt tool from community opinions --- app/src/frontend/building/data-containers/community.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index 12436bb1..90dafb31 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -35,7 +35,6 @@ const CommunityView: React.FunctionComponent = (props) => { onChange={props.onSaveChange} mode={props.mode} - copy={props.copy} /> = (props) => { onChange={props.onSaveChange} mode={props.mode} - copy={props.copy} /> { props.building.community_type_worth_keeping !== false && @@ -64,7 +62,6 @@ const CommunityView: React.FunctionComponent = (props) => { label: definition.title })) } - copy={props.copy} mode={props.mode} /> } @@ -78,7 +75,6 @@ const CommunityView: React.FunctionComponent = (props) => { onChange={props.onSaveChange} mode={props.mode} - copy={props.copy} /> From 8f4a36fbb61a7bd17a9a3c9a08e98875f54007b9 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:38:18 +0100 Subject: [PATCH 26/29] fix prev commit --- app/src/frontend/building/data-containers/community.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index 90dafb31..5ab4069c 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -35,6 +35,7 @@ const CommunityView: React.FunctionComponent = (props) => { onChange={props.onSaveChange} mode={props.mode} + /> = (props) => { onChange={props.onSaveChange} mode={props.mode} + /> { props.building.community_type_worth_keeping !== false && @@ -62,6 +64,7 @@ const CommunityView: React.FunctionComponent = (props) => { label: definition.title })) } + mode={props.mode} /> } @@ -75,6 +78,7 @@ const CommunityView: React.FunctionComponent = (props) => { onChange={props.onSaveChange} mode={props.mode} + copy={props.copy} /> From f2bc5d65aee5e146fa551b74b0b69d3e4596482e Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:40:39 +0100 Subject: [PATCH 27/29] restore copy for community_like --- app/src/frontend/building/data-containers/community.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index 5ab4069c..222d9ccc 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -35,6 +35,7 @@ const CommunityView: React.FunctionComponent = (props) => { onChange={props.onSaveChange} mode={props.mode} + copy={props.copy} /> Date: Fri, 24 Jun 2022 15:51:36 +0100 Subject: [PATCH 28/29] 2nd attempt remove copy tool from community opinions --- app/src/frontend/building/data-containers/community.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index 222d9ccc..a207c718 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -35,7 +35,7 @@ const CommunityView: React.FunctionComponent = (props) => { onChange={props.onSaveChange} mode={props.mode} - copy={props.copy} + /> = (props) => { onChange={props.onSaveChange} mode={props.mode} - copy={props.copy} + /> From 61166726c3181dd9728252960ca6323680e89e26 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 24 Jun 2022 15:54:25 +0100 Subject: [PATCH 29/29] Revert "2nd attempt remove copy tool from community opinions" This reverts commit a960bc7cb5c6418010c531ebfb0b776f241b74a9. --- app/src/frontend/building/data-containers/community.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/community.tsx b/app/src/frontend/building/data-containers/community.tsx index a207c718..222d9ccc 100644 --- a/app/src/frontend/building/data-containers/community.tsx +++ b/app/src/frontend/building/data-containers/community.tsx @@ -35,7 +35,7 @@ const CommunityView: React.FunctionComponent = (props) => { onChange={props.onSaveChange} mode={props.mode} - + copy={props.copy} /> = (props) => { onChange={props.onSaveChange} mode={props.mode} - + copy={props.copy} />