From 91242f3584fe9e4119664d200104f98cf5165355 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 09:48:11 +0100 Subject: [PATCH 01/98] remove msg --- app/src/frontend/building/data-containers/team.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index e0d6956c..9c5708f8 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -10,7 +10,6 @@ import { CategoryViewProps } from './category-view-props'; */ const TeamView: React.FunctionComponent = (props) => ( -
  • Construction and design team (original building)
  • From d0782053df6923cce8249b797c4f61e12bbedbf9 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 10:05:53 +0100 Subject: [PATCH 02/98] fix mistake on use --- app/src/frontend/building/data-containers/use.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/use.tsx b/app/src/frontend/building/data-containers/use.tsx index d7588231..9d9a6c20 100644 --- a/app/src/frontend/building/data-containers/use.tsx +++ b/app/src/frontend/building/data-containers/use.tsx @@ -66,7 +66,7 @@ const UseView: React.FunctionComponent = (props) => { copy={props.copy} onChange={props.onChange} tooltip={dataFields.current_landuse_source.tooltip} - placeholder={dataFields.date_source.example} + placeholder={dataFields.current_landuse_source.example} options={dataFields.current_landuse_source.items} /> = (props) => { copy={props.copy} onChange={props.onChange} tooltip={dataFields.current_landuse_source.tooltip} - placeholder={dataFields.date_source.example} + placeholder={dataFields.current_landuse_source.example} options={dataFields.current_landuse_source.items} /> Date: Wed, 1 Jun 2022 10:27:35 +0100 Subject: [PATCH 03/98] change categories intro --- app/src/frontend/config/categories-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/config/categories-config.ts b/app/src/frontend/config/categories-config.ts index e053b19c..b603cbc9 100644 --- a/app/src/frontend/config/categories-config.ts +++ b/app/src/frontend/config/categories-config.ts @@ -63,7 +63,7 @@ export const categoriesConfig: {[key in Category]: CategoryDefinition} = { slug: 'team', name: 'Team', aboutUrl: 'https://pages.colouring.london/team', - intro: 'Who built the buildings? Coming soon…', + intro: 'Who built the buildings?', }, [Category.Construction]: { slug: 'construction', From 562d17c3edeefdb64d7dca7b379dd38564f54bb3 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 10:29:57 +0100 Subject: [PATCH 04/98] add is_extension --- app/src/frontend/building/data-containers/team.tsx | 11 +++++++++++ app/src/frontend/config/data-fields-config.ts | 10 ++++++++++ 2 files changed, 21 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 9c5708f8..035ddd0c 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -26,6 +26,17 @@ const TeamView: React.FunctionComponent = (props) => ( }
  • Awards
+
); const TeamContainer = withCopyEdit(TeamView); diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 95a46238..a1c93c58 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -636,6 +636,16 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ year_demolished: { min: 1993, max: 1994 }, lifespan: "2-5", overlap_present: "50%", links: ["", ""]} ] + }, + is_extension: { + category: Category.Team, + title: "Do you wish to add information on:", + tooltip: "", + example: "The main building", + items: [ + "The main building", + "A major extension" + ], } }; From 3c18b98740503ef4e5402104f434add34961c7d1 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 10:35:35 +0100 Subject: [PATCH 05/98] import datafields team --- app/src/frontend/building/data-containers/team.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 035ddd0c..f98e57c1 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -1,5 +1,6 @@ import React, { Fragment } from 'react'; import InfoBox from '../../components/info-box'; +import { dataFields } from '../../config/data-fields-config'; import withCopyEdit from '../data-container'; From 7f6becafc2449b2476906c253ca8bea02ac63ee4 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 10:36:47 +0100 Subject: [PATCH 06/98] import SelectDataEntry --- app/src/frontend/building/data-containers/team.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index f98e57c1..a07dc027 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -1,6 +1,7 @@ import React, { Fragment } from 'react'; import InfoBox from '../../components/info-box'; import { dataFields } from '../../config/data-fields-config'; +import SelectDataEntry from '../data-components/select-data-entry'; import withCopyEdit from '../data-container'; From 47ea1440cab925cb8992b9755975721adedc9819 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 10:51:24 +0100 Subject: [PATCH 07/98] remove bullet points --- .../frontend/building/data-containers/team.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index a07dc027..badbbee9 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -13,21 +13,6 @@ import { CategoryViewProps } from './category-view-props'; const TeamView: React.FunctionComponent = (props) => ( -
    -
  • Construction and design team (original building)
  • - { - // "disabled": true, - // "slug": "team_original", - // "type": "text" - } -
  • Construction and design team (significant additional works)
  • - { - // "disabled": true, - // "slug": "team_after_original", - // "type": "text_multi" - } -
  • Awards
  • -
Date: Wed, 1 Jun 2022 10:55:46 +0100 Subject: [PATCH 08/98] activate --- app/src/frontend/config/categories-config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/frontend/config/categories-config.ts b/app/src/frontend/config/categories-config.ts index b603cbc9..aba1f4d9 100644 --- a/app/src/frontend/config/categories-config.ts +++ b/app/src/frontend/config/categories-config.ts @@ -59,7 +59,6 @@ export const categoriesConfig: {[key in Category]: CategoryDefinition} = { intro: 'How big are buildings?', }, [Category.Team]: { - inactive: true, slug: 'team', name: 'Team', aboutUrl: 'https://pages.colouring.london/team', From 3b42d1b8ef6bca46aee78ad373bfc383ee8d7286 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 10:59:26 +0100 Subject: [PATCH 09/98] just one additional item --- app/src/frontend/config/data-fields-config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index a1c93c58..639f8e7d 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -643,7 +643,6 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ tooltip: "", example: "The main building", items: [ - "The main building", "A major extension" ], } From 8923213f7c5db78d1c65edf5517108b6dc8db286 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 11:12:49 +0100 Subject: [PATCH 10/98] add work_carried_out field --- .../building/data-containers/team.tsx | 40 ++++++++++++------- app/src/frontend/config/data-fields-config.ts | 5 +++ 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index badbbee9..801b6d47 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -10,22 +10,32 @@ import { CategoryViewProps } from './category-view-props'; /** * Team view/edit section */ -const TeamView: React.FunctionComponent = (props) => ( - - - = (props) => { + const building = props.building; + const currentBuildingConstructionYear = building.date_year || undefined; + return ( + + + + + - -); + + ); +}; const TeamContainer = withCopyEdit(TeamView); export default TeamContainer; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 639f8e7d..d5dd2d6c 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -645,6 +645,11 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ items: [ "A major extension" ], + }, + work_carried_out: { + category: Category.Team, + title: "When was the work carried out?", + tooltip: "Best estimate" } }; From 63eb2c3bb72ad514a6b2eb4902d384877c83d3de Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 11:15:19 +0100 Subject: [PATCH 11/98] import NumericDataEntry --- app/src/frontend/building/data-containers/team.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 801b6d47..2a0b2508 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -2,6 +2,7 @@ import React, { Fragment } from 'react'; import InfoBox from '../../components/info-box'; import { dataFields } from '../../config/data-fields-config'; import SelectDataEntry from '../data-components/select-data-entry'; +import NumericDataEntry from '../data-components/numeric-data-entry'; import withCopyEdit from '../data-container'; From 1adfc5f106eeb6efc354a1c28bb6ded5036871ee Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 11:27:25 +0100 Subject: [PATCH 12/98] upddate work_carried_out --- app/src/frontend/building/data-containers/team.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 2a0b2508..19d950f2 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -33,6 +33,13 @@ const TeamView: React.FunctionComponent = (props) => { slug='work_carried_out' title={dataFields.work_carried_out.title} value={currentBuildingConstructionYear} + mode={props.mode} + copy={props.copy} + onChange={props.onChange} + step={1} + min={1} + max={currentYear} + tooltip={dataFields.work_carried_out.tooltip} />
); From 1dbd4f2964f2322284ca3074a595a19c7c2983fe Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 11:29:59 +0100 Subject: [PATCH 13/98] addd currentYear var --- app/src/frontend/building/data-containers/team.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 19d950f2..16e4fa56 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -13,6 +13,7 @@ import { CategoryViewProps } from './category-view-props'; */ const TeamView: React.FunctionComponent = (props) => { const building = props.building; + const currentYear = new Date().getFullYear(); const currentBuildingConstructionYear = building.date_year || undefined; return ( From 92fcc44fc91387ed4ad15bf05307eb798174f832 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 11:35:58 +0100 Subject: [PATCH 14/98] enable date_year to be edited via Planning --- app/src/frontend/building/data-containers/team.tsx | 6 +++--- app/src/frontend/config/data-fields-config.ts | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 16e4fa56..eeea9d21 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -31,8 +31,8 @@ const TeamView: React.FunctionComponent = (props) => { /> = (props) => { step={1} min={1} max={currentYear} - tooltip={dataFields.work_carried_out.tooltip} + tooltip={dataFields.date_year.tooltip} /> ); diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index d5dd2d6c..639f8e7d 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -645,11 +645,6 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ items: [ "A major extension" ], - }, - work_carried_out: { - category: Category.Team, - title: "When was the work carried out?", - tooltip: "Best estimate" } }; From 7e5df0a8505fa56494b842de3d2557bb658b920e Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 11:37:39 +0100 Subject: [PATCH 15/98] remove tooltip --- app/src/frontend/building/data-containers/team.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index eeea9d21..4598473d 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -40,7 +40,6 @@ const TeamView: React.FunctionComponent = (props) => { step={1} min={1} max={currentYear} - tooltip={dataFields.date_year.tooltip} /> ); From 6a7bfdf5e79c5c0768167ea07a16dde0f5299511 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 11:40:52 +0100 Subject: [PATCH 16/98] add tooltip for work_carried_out --- app/src/frontend/building/data-containers/team.tsx | 3 ++- app/src/frontend/config/data-fields-config.ts | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 4598473d..d835ee3d 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -32,7 +32,7 @@ const TeamView: React.FunctionComponent = (props) => { = (props) => { step={1} min={1} max={currentYear} + tooltip={dataFields.work_carried_out.tooltip} /> ); diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 639f8e7d..71aa3dfb 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -645,6 +645,11 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ items: [ "A major extension" ], + }, + work_carried_out: { + category: Category.Team, + title: "When was the work carried out?", + tooltip: "This field is the same as 'Year built (best estimate)' in the Age category'" } }; From 2d65372a56d016d40041448fff95bc9e4de4032e Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 14:08:46 +0100 Subject: [PATCH 17/98] add logic based on is_extension --- .../building/data-containers/team.tsx | 58 ++++++++++--------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index d835ee3d..014875e5 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -15,35 +15,37 @@ const TeamView: React.FunctionComponent = (props) => { const building = props.building; const currentYear = new Date().getFullYear(); const currentBuildingConstructionYear = building.date_year || undefined; - return ( - - - + if (props.building.is_extension == "The main building"){ + return ( + + + - - - ); + + + ); + }; }; const TeamContainer = withCopyEdit(TeamView); From 14fd83b7eebb4c9225f3b48da8ac0daec385cf08 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 14:17:17 +0100 Subject: [PATCH 18/98] add extension logic --- .../building/data-containers/team.tsx | 29 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 3 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 014875e5..ce2faf0e 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -46,6 +46,35 @@ const TeamView: React.FunctionComponent = (props) => { ); }; + return ( // This is what gets used when is_extension == "A major extension" + + + + + + +); }; const TeamContainer = withCopyEdit(TeamView); diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 71aa3dfb..da889f53 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -649,7 +649,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ work_carried_out: { category: Category.Team, title: "When was the work carried out?", - tooltip: "This field is the same as 'Year built (best estimate)' in the Age category'" + tooltip: "This field is the same as 'Year built (best estimate)' in the Age category'", + tooltip_extension: "This should be the year the extension was built, not the original building" } }; From 3716e0fc958f2ea33327b5d9115c6652d6aab4ed Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 14:19:42 +0100 Subject: [PATCH 19/98] rename work_carried_out to year_work_carried_out --- app/src/frontend/building/data-containers/team.tsx | 12 ++++++------ app/src/frontend/config/data-fields-config.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index ce2faf0e..9f8d255c 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -33,7 +33,7 @@ const TeamView: React.FunctionComponent = (props) => { = (props) => { step={1} min={1} max={currentYear} - tooltip={dataFields.work_carried_out.tooltip} + tooltip={dataFields.year_work_carried_out.tooltip} /> ); @@ -62,16 +62,16 @@ const TeamView: React.FunctionComponent = (props) => { /> ); diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index da889f53..2de3e609 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -646,7 +646,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ "A major extension" ], }, - work_carried_out: { + year_work_carried_out: { category: Category.Team, title: "When was the work carried out?", tooltip: "This field is the same as 'Year built (best estimate)' in the Age category'", From e0cdfb5664bf3bc21706899e51da7740e8f727a1 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 14:21:23 +0100 Subject: [PATCH 20/98] add example value to year_work_carried_out --- app/src/frontend/config/data-fields-config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 2de3e609..e11d674d 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -650,7 +650,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ category: Category.Team, title: "When was the work carried out?", tooltip: "This field is the same as 'Year built (best estimate)' in the Age category'", - tooltip_extension: "This should be the year the extension was built, not the original building" + tooltip_extension: "This should be the year the extension was built, not the original building", + example: 2020 } }; From bacaf77686218c929ddd791aca460dbc70c99e2e Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 14:25:13 +0100 Subject: [PATCH 21/98] move is_extension example to items --- app/src/frontend/config/data-fields-config.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index e11d674d..5f473679 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -641,8 +641,9 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ category: Category.Team, title: "Do you wish to add information on:", tooltip: "", - example: "The main building", + example: "", items: [ + "The main building", "A major extension" ], }, From e80d19a27c105fdc2d4fcdcf1368917ffa2d90f8 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 14:29:06 +0100 Subject: [PATCH 22/98] add verification buttons --- .../frontend/building/data-containers/team.tsx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 9f8d255c..6cc562cf 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -3,6 +3,7 @@ import InfoBox from '../../components/info-box'; import { dataFields } from '../../config/data-fields-config'; import SelectDataEntry from '../data-components/select-data-entry'; import NumericDataEntry from '../data-components/numeric-data-entry'; +import Verification from '../data-components/verification'; import withCopyEdit from '../data-container'; @@ -43,6 +44,14 @@ const TeamView: React.FunctionComponent = (props) => { max={currentYear} tooltip={dataFields.year_work_carried_out.tooltip} /> + ); }; @@ -73,6 +82,14 @@ const TeamView: React.FunctionComponent = (props) => { max={currentYear} tooltip={dataFields.year_work_carried_out.tooltip_extension} /> + ); }; From d2c725859cbc93a6d8da0338b8c76452a84980d9 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 14:30:31 +0100 Subject: [PATCH 23/98] rename year_work_carried_out to extension_year --- .../building/data-containers/team.tsx | 22 +++++++++---------- app/src/frontend/config/data-fields-config.ts | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 6cc562cf..169c8a18 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -34,7 +34,7 @@ const TeamView: React.FunctionComponent = (props) => { = (props) => { step={1} min={1} max={currentYear} - tooltip={dataFields.year_work_carried_out.tooltip} + tooltip={dataFields.extension_year.tooltip} /> = (props) => { /> ); diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 5f473679..27340709 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -647,7 +647,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ "A major extension" ], }, - year_work_carried_out: { + extension_year: { category: Category.Team, title: "When was the work carried out?", tooltip: "This field is the same as 'Year built (best estimate)' in the Age category'", From 50621b48b0bf58638ebdf8814c763652ca14a239 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 15:01:22 +0100 Subject: [PATCH 24/98] add developer_type --- .../frontend/building/data-containers/team.tsx | 18 ++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 15 ++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 169c8a18..e320acc9 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -52,6 +52,15 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> + ); }; @@ -90,6 +99,15 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.extension_year} verified_count={props.building.verified.extension_year} /> + ); }; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 27340709..9f1150c0 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -653,7 +653,20 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ tooltip: "This field is the same as 'Year built (best estimate)' in the Age category'", tooltip_extension: "This should be the year the extension was built, not the original building", example: 2020 - } + }, + developer_type: { + category: Category.Community, + title: "What type of developer built the building?", + items: [ + "State", + "Charity", + "Community/Cooperative", + "Other non-profit body", + "Private (individual)", + "Private (company/estate)", + "Other" + ] + }, }; export const allFieldsConfig = {...dataFields, ...buildingUserFields}; \ No newline at end of file From d2f315716ef9caf6d5d8edc6fd8bed619ff74d55 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 15:03:57 +0100 Subject: [PATCH 25/98] add blank example developer_type --- app/src/frontend/config/data-fields-config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 9f1150c0..1e71f8c2 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -657,6 +657,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ developer_type: { category: Category.Community, title: "What type of developer built the building?", + example: "", items: [ "State", "Charity", From 29a0eb191992713588a1700ae3ffce299ddde810 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 15:49:27 +0100 Subject: [PATCH 26/98] fix category --- app/src/frontend/config/data-fields-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 1e71f8c2..25d80c6f 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -655,7 +655,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ example: 2020 }, developer_type: { - category: Category.Community, + category: Category.Team, title: "What type of developer built the building?", example: "", items: [ @@ -667,7 +667,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ "Private (company/estate)", "Other" ] - }, + } }; export const allFieldsConfig = {...dataFields, ...buildingUserFields}; \ No newline at end of file From 663a910cc19b468082770774c477bf0d4ab1bc4d Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 15:54:01 +0100 Subject: [PATCH 27/98] add designers --- .../building/data-containers/team.tsx | 20 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 6 ++++++ 2 files changed, 26 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index e320acc9..165cc9d9 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -61,6 +61,16 @@ const TeamView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} /> + ); }; @@ -108,6 +118,16 @@ const TeamView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} /> + ); }; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 25d80c6f..71d58dc0 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -667,6 +667,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ "Private (company/estate)", "Other" ] + }, + designers: { + category: Category.Team, + title: "Who were the main designer(s)?", + tooltip: "Free text. First name, space, then Last name.", + example: ["", "", ""], } }; From 61b2a4034546e0def04cad13d84462066d5be131 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:01:09 +0100 Subject: [PATCH 28/98] add a maxLength designers --- app/src/frontend/building/data-containers/team.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 165cc9d9..3e01a472 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -70,6 +70,7 @@ const TeamView: React.FunctionComponent = (props) => { onChange={props.onChange} tooltip={dataFields.designers.tooltip} editableEntries={true} + maxLength={10} /> ); @@ -127,6 +128,7 @@ const TeamView: React.FunctionComponent = (props) => { onChange={props.onChange} tooltip={dataFields.designers.tooltip} editableEntries={true} + maxLength={10} /> ); From fa9bf39450f2f33b12067227f874c4ac327d3ec2 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:02:11 +0100 Subject: [PATCH 29/98] import MultiDataEntry --- app/src/frontend/building/data-containers/team.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 3e01a472..c688437e 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -4,6 +4,7 @@ import { dataFields } from '../../config/data-fields-config'; import SelectDataEntry from '../data-components/select-data-entry'; import NumericDataEntry from '../data-components/numeric-data-entry'; import Verification from '../data-components/verification'; +import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry'; import withCopyEdit from '../data-container'; From 095561106148ead17531b337bde31e44687524b9 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:12:19 +0100 Subject: [PATCH 30/98] set max length as longest human name --- app/src/frontend/building/data-containers/team.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index c688437e..0338a8ff 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -71,7 +71,7 @@ const TeamView: React.FunctionComponent = (props) => { onChange={props.onChange} tooltip={dataFields.designers.tooltip} editableEntries={true} - maxLength={10} + maxLength={747} /> ); @@ -129,7 +129,7 @@ const TeamView: React.FunctionComponent = (props) => { onChange={props.onChange} tooltip={dataFields.designers.tooltip} editableEntries={true} - maxLength={10} + maxLength={747} /> ); From 5e23f7b98d7d4bcc98587bb4dabbb93c6c0e6ca3 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:17:23 +0100 Subject: [PATCH 31/98] add verification button designers --- .../frontend/building/data-containers/team.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 0338a8ff..d3287ec1 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -73,6 +73,14 @@ const TeamView: React.FunctionComponent = (props) => { editableEntries={true} maxLength={747} /> + ); }; @@ -131,6 +139,14 @@ const TeamView: React.FunctionComponent = (props) => { editableEntries={true} maxLength={747} /> + ); }; From ee70071ce50961555d01f40e27858c973b24e29b Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:25:20 +0100 Subject: [PATCH 32/98] add designers_source_link --- .../building/data-containers/team.tsx | 22 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 6 +++++ 2 files changed, 28 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index d3287ec1..5af243a6 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -81,6 +81,17 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.designers} verified_count={props.building.verified.designers} /> + ); }; @@ -147,6 +158,17 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.designers} verified_count={props.building.verified.designers} /> + ); }; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 71d58dc0..e1c7d376 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -673,6 +673,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ title: "Who were the main designer(s)?", tooltip: "Free text. First name, space, then Last name.", example: ["", "", ""], + }, + designers_source_link: { + category: Category.Team, + title: "Source links for designers", + tooltip: "URL for source for designers", + example: ["", "", ""], } }; From 24f153db4e98fc0289c14bb2bfc7869f3cb83e9e Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:27:08 +0100 Subject: [PATCH 33/98] finish prev commit --- app/src/frontend/config/data-fields-config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index e1c7d376..3ca2f0df 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -676,8 +676,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ }, designers_source_link: { category: Category.Team, - title: "Source links for designers", - tooltip: "URL for source for designers", + title: "Source links for designer(s)", + tooltip: "URL for source for designer(s)", example: ["", "", ""], } }; From 226910d3d600943d71433af69f95935bd50eb814 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:32:39 +0100 Subject: [PATCH 34/98] add lead_designer_type --- .../frontend/building/data-containers/team.tsx | 18 ++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 13 +++++++++++++ 2 files changed, 31 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 5af243a6..a45a945d 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -92,6 +92,15 @@ const TeamView: React.FunctionComponent = (props) => { placeholder="https://..." editableEntries={true} /> + ); }; @@ -169,6 +178,15 @@ const TeamView: React.FunctionComponent = (props) => { placeholder="https://..." editableEntries={true} /> + ); }; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 3ca2f0df..71b0aaf0 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -679,6 +679,19 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ title: "Source links for designer(s)", tooltip: "URL for source for designer(s)", example: ["", "", ""], + }, + lead_designer_type: { + category: Category.Team, + title: "Which best describes the lead designer?", + example: "", + items: [ + "Landowner", + "Speculative builder", + "Government architecture department", + "Architectural firm", + "Engineering firm", + "Other" + ] } }; From 3c02aa16522eec87a5c8ad2f4569336765d3d0cb Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:39:08 +0100 Subject: [PATCH 35/98] add designer_awards yes/no --- .../building/data-containers/team.tsx | 19 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 8 +++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index a45a945d..c9c6785f 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -5,6 +5,7 @@ import SelectDataEntry from '../data-components/select-data-entry'; import NumericDataEntry from '../data-components/numeric-data-entry'; import Verification from '../data-components/verification'; import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry'; +import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry'; import withCopyEdit from '../data-container'; @@ -101,6 +102,15 @@ const TeamView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} /> + ); }; @@ -187,6 +197,15 @@ const TeamView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} /> + ); }; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 71b0aaf0..1801004e 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -692,7 +692,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ "Engineering firm", "Other" ] - } + }, + designer_awards: { + category: Category.Team, + title: "Did the team win any awards for this building?", + tooltip: "", + example: false + }, }; export const allFieldsConfig = {...dataFields, ...buildingUserFields}; \ No newline at end of file From 2b24d493334a4c7c1bf4428ecbf36dbccf595c58 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Wed, 1 Jun 2022 16:41:10 +0100 Subject: [PATCH 36/98] clarification suggestion --- app/src/frontend/config/data-fields-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 1801004e..7fc2209e 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -695,7 +695,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ }, designer_awards: { category: Category.Team, - title: "Did the team win any awards for this building?", + title: "Did the design team win any awards for this building?", tooltip: "", example: false }, From e48414d647187e5c9588384ee19efcfc63ab0ad2 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 09:52:50 +0100 Subject: [PATCH 37/98] refactor logic to use
--- .../building/data-containers/team.tsx | 187 +++++++++--------- 1 file changed, 94 insertions(+), 93 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index c9c6785f..276184ab 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -18,8 +18,9 @@ const TeamView: React.FunctionComponent = (props) => { const building = props.building; const currentYear = new Date().getFullYear(); const currentBuildingConstructionYear = building.date_year || undefined; - if (props.building.is_extension == "The main building"){ return ( + + {this.props.building.is_extension == "The main building" ? ( = (props) => { mode={props.mode} /> - ); - }; - return ( // This is what gets used when is_extension == "A major extension" - - - + + + + - - - + - - + + + - - - - - -); + onChange={props.onChange} + mode={props.mode} + /> + + )} + + ); }; const TeamContainer = withCopyEdit(TeamView); From e2448264224717b49f859b61eb2d0007f95431cc Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 09:53:47 +0100 Subject: [PATCH 38/98] fix last commit dont use "this" --- app/src/frontend/building/data-containers/team.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 276184ab..e1994aeb 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -20,7 +20,7 @@ const TeamView: React.FunctionComponent = (props) => { const currentBuildingConstructionYear = building.date_year || undefined; return (
- {this.props.building.is_extension == "The main building" ? ( + {props.building.is_extension == "The main building" ? ( Date: Mon, 6 Jun 2022 09:57:10 +0100 Subject: [PATCH 39/98] split Fragments --- app/src/frontend/building/data-containers/team.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index e1994aeb..83a1a9bd 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -55,6 +55,8 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> + + = (props) => { user_verified_as={props.user_verified.extension_year} verified_count={props.building.verified.extension_year} /> + + Date: Mon, 6 Jun 2022 09:59:20 +0100 Subject: [PATCH 40/98] Revert "split Fragments" This reverts commit 0ab06f6f5d86314cc992f925464039a0dfb23c50. --- app/src/frontend/building/data-containers/team.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 83a1a9bd..e1994aeb 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -55,8 +55,6 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> - - = (props) => { user_verified_as={props.user_verified.extension_year} verified_count={props.building.verified.extension_year} /> - - Date: Mon, 6 Jun 2022 10:11:30 +0100 Subject: [PATCH 41/98] single fragment with internal logic --- .../building/data-containers/team.tsx | 115 +++--------------- 1 file changed, 17 insertions(+), 98 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index e1994aeb..58483ab5 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -20,9 +20,8 @@ const TeamView: React.FunctionComponent = (props) => { const currentBuildingConstructionYear = building.date_year || undefined; return ( - {props.building.is_extension == "The main building" ? ( - - + + = (props) => { placeholder={dataFields.is_extension.example} options={dataFields.is_extension.items} /> - + {props.building.is_extension == "The main building" ? ( = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> - - - - - - - ) : ( - - - - - - + + )} = (props) => { onChange={props.onChange} mode={props.mode} /> - - )} + ); }; From c126400cdc066f164866e33b03c5400fac2a36ab Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 10:14:27 +0100 Subject: [PATCH 42/98] remove entirely --- app/src/frontend/building/data-containers/team.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 58483ab5..5e3ba786 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -20,7 +20,6 @@ const TeamView: React.FunctionComponent = (props) => { const currentBuildingConstructionYear = building.date_year || undefined; return (
- = (props) => { onChange={props.onChange} mode={props.mode} /> -
); }; From 77140ae01978de8ce9a6eb3453c98c3313f3e590 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 10:16:08 +0100 Subject: [PATCH 43/98] remove conditional logic --- .../building/data-containers/team.tsx | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 5e3ba786..a438aaab 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -32,7 +32,7 @@ const TeamView: React.FunctionComponent = (props) => { placeholder={dataFields.is_extension.example} options={dataFields.is_extension.items} /> - {props.building.is_extension == "The main building" ? ( + // {props.building.is_extension == "The main building" ? ( = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> - ) : ( - - )} + // ) : ( + // + // )} Date: Mon, 6 Jun 2022 10:17:05 +0100 Subject: [PATCH 44/98] remove commented code last commit --- .../frontend/building/data-containers/team.tsx | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index a438aaab..7bc97037 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -32,7 +32,6 @@ const TeamView: React.FunctionComponent = (props) => { placeholder={dataFields.is_extension.example} options={dataFields.is_extension.items} /> - // {props.building.is_extension == "The main building" ? ( = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> - // ) : ( - // - // )} Date: Mon, 6 Jun 2022 10:19:24 +0100 Subject: [PATCH 45/98] revert last 2 commits --- .../frontend/building/data-containers/team.tsx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 7bc97037..5e3ba786 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -32,6 +32,7 @@ const TeamView: React.FunctionComponent = (props) => { placeholder={dataFields.is_extension.example} options={dataFields.is_extension.items} /> + {props.building.is_extension == "The main building" ? ( = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> + ) : ( + + )} Date: Mon, 6 Jun 2022 10:20:44 +0100 Subject: [PATCH 46/98] add Fragment inside extension logic --- app/src/frontend/building/data-containers/team.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 5e3ba786..fc036f42 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -33,6 +33,7 @@ const TeamView: React.FunctionComponent = (props) => { options={dataFields.is_extension.items} /> {props.building.is_extension == "The main building" ? ( + = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> + ) : ( + = (props) => { max={currentYear} tooltip={dataFields.extension_year.tooltip_extension} /> + )} Date: Mon, 6 Jun 2022 10:22:40 +0100 Subject: [PATCH 47/98] Revert "add Fragment inside extension logic" This reverts commit f748948e958ee412c736600708becba22b8f8d82. --- app/src/frontend/building/data-containers/team.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index fc036f42..5e3ba786 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -33,7 +33,6 @@ const TeamView: React.FunctionComponent = (props) => { options={dataFields.is_extension.items} /> {props.building.is_extension == "The main building" ? ( - = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> - ) : ( - = (props) => { max={currentYear} tooltip={dataFields.extension_year.tooltip_extension} /> - )} Date: Mon, 6 Jun 2022 10:29:09 +0100 Subject: [PATCH 48/98] remove logic --- .../frontend/building/data-containers/team.tsx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 5e3ba786..c45c9356 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -32,7 +32,7 @@ const TeamView: React.FunctionComponent = (props) => { placeholder={dataFields.is_extension.example} options={dataFields.is_extension.items} /> - {props.building.is_extension == "The main building" ? ( + = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> - ) : ( - - )} Date: Mon, 6 Jun 2022 10:30:11 +0100 Subject: [PATCH 49/98] 2nd container test --- app/src/frontend/building/data-containers/team.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index c45c9356..3be35644 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -114,5 +114,7 @@ const TeamView: React.FunctionComponent = (props) => { ); }; const TeamContainer = withCopyEdit(TeamView); +const TeamContainer2 = withCopyEdit(TeamView); export default TeamContainer; +export default TeamContainer2; From 7aa7f81ffe8ffef3aa422b2cefb1678232de846e Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 10:31:43 +0100 Subject: [PATCH 50/98] Revert "2nd container test" This reverts commit a2d1ec41cf7f032a0d61324afb1ade464fc91f48. --- app/src/frontend/building/data-containers/team.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 3be35644..c45c9356 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -114,7 +114,5 @@ const TeamView: React.FunctionComponent = (props) => { ); }; const TeamContainer = withCopyEdit(TeamView); -const TeamContainer2 = withCopyEdit(TeamView); export default TeamContainer; -export default TeamContainer2; From d639006da4038fd7a359e7290dc58b4043af8a65 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 10:40:01 +0100 Subject: [PATCH 51/98] restore logic --- .../building/data-containers/team.tsx | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index c45c9356..2268e6f2 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -32,7 +32,7 @@ const TeamView: React.FunctionComponent = (props) => { placeholder={dataFields.is_extension.example} options={dataFields.is_extension.items} /> - + {props.building.is_extension == "The main building" ? ( = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> + ) : ( + + + )} Date: Mon, 6 Jun 2022 10:41:31 +0100 Subject: [PATCH 52/98] remove
--- app/src/frontend/building/data-containers/team.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 2268e6f2..49a1619e 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -19,7 +19,6 @@ const TeamView: React.FunctionComponent = (props) => { const currentYear = new Date().getFullYear(); const currentBuildingConstructionYear = building.date_year || undefined; return ( - = (props) => { onChange={props.onChange} mode={props.mode} /> - ); }; const TeamContainer = withCopyEdit(TeamView); From 3ed3d6f689dfc300d8693d42d8ffe6963b436236 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 10:45:03 +0100 Subject: [PATCH 53/98] Revert "remove
" This reverts commit 7d0889cc4b7576b447ab31f8b64eff4f5f4aed7b. --- app/src/frontend/building/data-containers/team.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 49a1619e..2268e6f2 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -19,6 +19,7 @@ const TeamView: React.FunctionComponent = (props) => { const currentYear = new Date().getFullYear(); const currentBuildingConstructionYear = building.date_year || undefined; return ( + = (props) => { onChange={props.onChange} mode={props.mode} /> + ); }; const TeamContainer = withCopyEdit(TeamView); From e47d1fa691d601e88a5e47382d72b7bf42fc3a2d Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 10:46:34 +0100 Subject: [PATCH 54/98] add extra tags --- app/src/frontend/building/data-containers/team.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 2268e6f2..88edf290 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -33,6 +33,7 @@ const TeamView: React.FunctionComponent = (props) => { options={dataFields.is_extension.items} /> {props.building.is_extension == "The main building" ? ( + <> = (props) => { user_verified_as={props.user_verified.date_year} verified_count={props.building.verified.date_year} /> + ) : ( + <> = (props) => { user_verified_as={props.user_verified.extension_year} verified_count={props.building.verified.extension_year} /> + )} Date: Mon, 6 Jun 2022 10:53:17 +0100 Subject: [PATCH 55/98] add awards_source_link --- .../frontend/building/data-containers/team.tsx | 16 ++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 88edf290..f82ac893 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -136,6 +136,22 @@ const TeamView: React.FunctionComponent = (props) => { onChange={props.onChange} mode={props.mode} /> + {props.building.designer_awards ? ( + <> + + + ) : (null) + } ); }; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 7fc2209e..e3b3c3ec 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -699,6 +699,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ tooltip: "", example: false }, + awards_source_link: { + category: Category.Team, + title: "Source links for designer award(s)", + tooltip: "URL for source for designer award(s)", + example: ["", "", ""], + }, }; export const allFieldsConfig = {...dataFields, ...buildingUserFields}; \ No newline at end of file From 43a6cff4dafc2643e0bee36bcef75d934ab1cdb9 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 11:14:21 +0100 Subject: [PATCH 56/98] add extra verify buttons --- .../building/data-containers/team.tsx | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index f82ac893..6926a404 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -88,6 +88,14 @@ const TeamView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} /> + = (props) => { placeholder="https://..." editableEntries={true} /> + = (props) => { mode={props.mode} copy={props.copy} /> + = (props) => { onChange={props.onChange} mode={props.mode} /> + {props.building.designer_awards ? ( <> = (props) => { placeholder="https://..." editableEntries={true} /> + ) : (null) } From 147fcd0253187ef8335541a06f47e90a7ae56914 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 11:22:01 +0100 Subject: [PATCH 57/98] fix mistake --- app/src/frontend/building/data-containers/team.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 6926a404..17b086c5 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -184,7 +184,7 @@ const TeamView: React.FunctionComponent = (props) => { Date: Mon, 6 Jun 2022 11:48:39 +0100 Subject: [PATCH 58/98] add team migrations --- migrations/029.team.down.sql | 8 ++++++++ migrations/029.team.up.sql | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 migrations/029.team.down.sql create mode 100644 migrations/029.team.up.sql diff --git a/migrations/029.team.down.sql b/migrations/029.team.down.sql new file mode 100644 index 00000000..cdeb0385 --- /dev/null +++ b/migrations/029.team.down.sql @@ -0,0 +1,8 @@ +ALTER TABLE buildings DROP COLUMN IF EXISTS extension_year; +ALTER TABLE buildings DROP COLUMN IF EXISTS developer_type; +ALTER TABLE buildings DROP COLUMN IF EXISTS designers; +ALTER TABLE buildings DROP COLUMN IF EXISTS designers_source_link; +ALTER TABLE buildings DROP COLUMN IF EXISTS designers; +ALTER TABLE buildings DROP COLUMN IF EXISTS lead_designer_type; +ALTER TABLE buildings DROP COLUMN IF EXISTS designer_awards; +ALTER TABLE buildings DROP COLUMN IF EXISTS awards_source_link; \ No newline at end of file diff --git a/migrations/029.team.up.sql b/migrations/029.team.up.sql new file mode 100644 index 00000000..b9dcf467 --- /dev/null +++ b/migrations/029.team.up.sql @@ -0,0 +1,8 @@ +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS extension_year smallint; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS developer_type varchar; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers varchar; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers_source_link text[]; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers varchar; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS lead_designer_type varchar; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designer_awards boolean null; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS awards_source_link text[]; \ No newline at end of file From be00d24bfa3e69902f09f1f47aee23aeab2d8b83 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 12:01:20 +0100 Subject: [PATCH 59/98] add exception to validation --- app/src/api/services/domainLogic/validateUpdate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/api/services/domainLogic/validateUpdate.ts b/app/src/api/services/domainLogic/validateUpdate.ts index b9e35d3a..fa7b8485 100644 --- a/app/src/api/services/domainLogic/validateUpdate.ts +++ b/app/src/api/services/domainLogic/validateUpdate.ts @@ -29,7 +29,9 @@ export function validateFieldChange(field: string, value: any, isExternal: boole const allowDerived = !isExternal; if(!canEdit(field, allowDerived)) { - throw new InvalidFieldError('Field is not editable', field); + if(field != 'is_extension'){ + throw new InvalidFieldError('Field is not editable', field); + } } if(field in compiledSchemas) { From ff283f2ea1d8f18c5b16c0dac8b44079f2ff3e9d Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 12:03:54 +0100 Subject: [PATCH 60/98] Revert "add exception to validation" This reverts commit be00d24bfa3e69902f09f1f47aee23aeab2d8b83. --- app/src/api/services/domainLogic/validateUpdate.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/api/services/domainLogic/validateUpdate.ts b/app/src/api/services/domainLogic/validateUpdate.ts index fa7b8485..b9e35d3a 100644 --- a/app/src/api/services/domainLogic/validateUpdate.ts +++ b/app/src/api/services/domainLogic/validateUpdate.ts @@ -29,9 +29,7 @@ export function validateFieldChange(field: string, value: any, isExternal: boole const allowDerived = !isExternal; if(!canEdit(field, allowDerived)) { - if(field != 'is_extension'){ - throw new InvalidFieldError('Field is not editable', field); - } + throw new InvalidFieldError('Field is not editable', field); } if(field in compiledSchemas) { From 631bcc78aa887e746ffa01e97a38515da63002c5 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 12:04:31 +0100 Subject: [PATCH 61/98] add exception to validation in right place --- app/src/api/services/domainLogic/validateUpdate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/api/services/domainLogic/validateUpdate.ts b/app/src/api/services/domainLogic/validateUpdate.ts index b9e35d3a..83d9c22a 100644 --- a/app/src/api/services/domainLogic/validateUpdate.ts +++ b/app/src/api/services/domainLogic/validateUpdate.ts @@ -24,7 +24,9 @@ function canEdit(key: string, allowDerived: boolean = false) { export function validateFieldChange(field: string, value: any, isExternal: boolean = true) { if(!isDefined(field)) { - throw new InvalidFieldError('Field does not exist', field); + if(field != 'is_extension'){ + throw new InvalidFieldError('Field does not exist', field); + } } const allowDerived = !isExternal; From 87e93cd1933ebc80ab609de71648bcaf05ffebf2 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 13:16:53 +0100 Subject: [PATCH 62/98] update dataFields --- app/src/api/config/dataFields.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 146ae8d5..5ad3f1eb 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -322,6 +322,38 @@ export const buildingAttributesConfig = valueType()({ /* eslint community_public_ownership_sources: { edit: true, verify: true + }, + extension_year: { + edit: true, + verify: true + }, + developer_type: { + edit: true, + verify: true + }, + designers: { + edit: true, + verify: true + }, + designers_source_link: { + edit: true, + verify: true + }, + designers: { + edit: true, + verify: true + }, + lead_designer_type: { + edit: true, + verify: true + }, + designer_awards: { + edit: true, + verify: true + }, + awards_source_link: { + edit: true, + verify: true } }); From 7dae80e73a1f4daeb3cf2a76cda4c727ba38a2ae Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 13:27:33 +0100 Subject: [PATCH 63/98] remove breaking logic --- app/src/api/services/domainLogic/validateUpdate.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/api/services/domainLogic/validateUpdate.ts b/app/src/api/services/domainLogic/validateUpdate.ts index 83d9c22a..b9e35d3a 100644 --- a/app/src/api/services/domainLogic/validateUpdate.ts +++ b/app/src/api/services/domainLogic/validateUpdate.ts @@ -24,9 +24,7 @@ function canEdit(key: string, allowDerived: boolean = false) { export function validateFieldChange(field: string, value: any, isExternal: boolean = true) { if(!isDefined(field)) { - if(field != 'is_extension'){ - throw new InvalidFieldError('Field does not exist', field); - } + throw new InvalidFieldError('Field does not exist', field); } const allowDerived = !isExternal; From 40fbc1d2230f6cc965e692b27d16a135434c8229 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 13:32:31 +0100 Subject: [PATCH 64/98] restore exception validation logic with proper operator --- app/src/api/services/domainLogic/validateUpdate.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/api/services/domainLogic/validateUpdate.ts b/app/src/api/services/domainLogic/validateUpdate.ts index b9e35d3a..9910a898 100644 --- a/app/src/api/services/domainLogic/validateUpdate.ts +++ b/app/src/api/services/domainLogic/validateUpdate.ts @@ -24,7 +24,9 @@ function canEdit(key: string, allowDerived: boolean = false) { export function validateFieldChange(field: string, value: any, isExternal: boolean = true) { if(!isDefined(field)) { - throw new InvalidFieldError('Field does not exist', field); + if(field !== 'is_extension'){ + throw new InvalidFieldError('Field does not exist', field); + } } const allowDerived = !isExternal; From 0dcad9d36ff121c7544b6747191f5b15b33d7301 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:02:11 +0100 Subject: [PATCH 65/98] Revert "restore exception validation logic with proper operator" This reverts commit 40fbc1d2230f6cc965e692b27d16a135434c8229. --- app/src/api/services/domainLogic/validateUpdate.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/api/services/domainLogic/validateUpdate.ts b/app/src/api/services/domainLogic/validateUpdate.ts index 9910a898..b9e35d3a 100644 --- a/app/src/api/services/domainLogic/validateUpdate.ts +++ b/app/src/api/services/domainLogic/validateUpdate.ts @@ -24,9 +24,7 @@ function canEdit(key: string, allowDerived: boolean = false) { export function validateFieldChange(field: string, value: any, isExternal: boolean = true) { if(!isDefined(field)) { - if(field !== 'is_extension'){ - throw new InvalidFieldError('Field does not exist', field); - } + throw new InvalidFieldError('Field does not exist', field); } const allowDerived = !isExternal; From 0cf4660952f1a7d71dcb1b9f186f05a32b8079fa Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:03:02 +0100 Subject: [PATCH 66/98] add is_extension to dataFields --- app/src/api/config/dataFields.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 5ad3f1eb..33346505 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -323,6 +323,10 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, + is_extension: { + edit: false, + verify: false + }, extension_year: { edit: true, verify: true From a01a5673afe38eb0dbe20149adc1a6e8adb9185a Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:04:00 +0100 Subject: [PATCH 67/98] make is_extension editable --- app/src/api/config/dataFields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 33346505..f89b3d3e 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -324,7 +324,7 @@ export const buildingAttributesConfig = valueType()({ /* eslint verify: true }, is_extension: { - edit: false, + edit: true, verify: false }, extension_year: { From b59e811412a93e0325994cce2aee2435ee7faa0d Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:20:27 +0100 Subject: [PATCH 68/98] change to has_extension bool --- app/src/api/config/dataFields.ts | 2 +- .../frontend/building/data-containers/team.tsx | 15 ++++++++------- app/src/frontend/config/data-fields-config.ts | 10 +++------- migrations/029.team.up.sql | 1 + 4 files changed, 13 insertions(+), 15 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index f89b3d3e..d9816cfd 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -325,7 +325,7 @@ export const buildingAttributesConfig = valueType()({ /* eslint }, is_extension: { edit: true, - verify: false + verify: true }, extension_year: { edit: true, diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 17b086c5..1d2b5984 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -6,6 +6,7 @@ import NumericDataEntry from '../data-components/numeric-data-entry'; import Verification from '../data-components/verification'; import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry'; import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry'; +import { DataEntryGroup } from '../data-components/data-entry-group'; import withCopyEdit from '../data-container'; @@ -22,17 +23,17 @@ const TeamView: React.FunctionComponent = (props) => {
- {props.building.is_extension == "The main building" ? ( + {props.building.has_extension == "The main building" ? ( <> Date: Mon, 6 Jun 2022 14:24:16 +0100 Subject: [PATCH 69/98] change logic to use has_extension --- .../building/data-containers/team.tsx | 48 +++++++++---------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 1d2b5984..c44b617b 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -33,30 +33,7 @@ const TeamView: React.FunctionComponent = (props) => { placeholder={dataFields.has_extension.example} options={dataFields.has_extension.items} /> - {props.building.has_extension == "The main building" ? ( - <> - - - - ) : ( + {props.building.has_extension ? ( <> = (props) => { verified_count={props.building.verified.extension_year} /> + ) : ( + <> + + + )} Date: Mon, 6 Jun 2022 14:29:35 +0100 Subject: [PATCH 70/98] switch has_extension to LogicalDataEntry --- app/src/frontend/building/data-containers/team.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index c44b617b..abb2dcc9 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -22,16 +22,13 @@ const TeamView: React.FunctionComponent = (props) => { return ( - {props.building.has_extension ? ( <> From 38744273c9d35e4be78cd496de50e233c80ddeab Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:31:14 +0100 Subject: [PATCH 71/98] change title for has_extension --- app/src/frontend/config/data-fields-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 1d9695c5..a6c1c20b 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -639,7 +639,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ }, has_extension: { category: Category.Team, - title: "Is there an extension?", + title: "Year extension built (best estimate)", tooltip: "", example: false }, From ee530502fffb886432a5b83723e25fb5fa23c721 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:33:02 +0100 Subject: [PATCH 72/98] rearrange so date_year --- .../building/data-containers/team.tsx | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index abb2dcc9..06b068a4 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -22,6 +22,26 @@ const TeamView: React.FunctionComponent = (props) => { return ( + + = (props) => { verified_count={props.building.verified.extension_year} /> - ) : ( - <> - - - - )} + ) : (null)} Date: Mon, 6 Jun 2022 14:34:00 +0100 Subject: [PATCH 73/98] Revert "change title for has_extension" This reverts commit 38744273c9d35e4be78cd496de50e233c80ddeab. --- app/src/frontend/config/data-fields-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index a6c1c20b..1d9695c5 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -639,7 +639,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ }, has_extension: { category: Category.Team, - title: "Year extension built (best estimate)", + title: "Is there an extension?", tooltip: "", example: false }, From ce340d7d54b7a6d209bb3fd4ac77abd3df74e53d Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:35:19 +0100 Subject: [PATCH 74/98] change title for extension_year --- app/src/frontend/config/data-fields-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 1d9695c5..d294013f 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -645,7 +645,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ }, extension_year: { category: Category.Team, - title: "When was the work carried out?", + title: "Year extension built (best estimate)", tooltip: "This field is the same as 'Year built (best estimate)' in the Age category'", tooltip_extension: "This should be the year the extension was built, not the original building", example: 2020 From fc515f09bcbdeb9a4118686bae8e2577b463b9d2 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:38:33 +0100 Subject: [PATCH 75/98] add has_extension to down migration --- migrations/029.team.down.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/migrations/029.team.down.sql b/migrations/029.team.down.sql index cdeb0385..069aa3bc 100644 --- a/migrations/029.team.down.sql +++ b/migrations/029.team.down.sql @@ -1,3 +1,4 @@ +ALTER TABLE buildings DROP COLUMN IF EXISTS has_extension; ALTER TABLE buildings DROP COLUMN IF EXISTS extension_year; ALTER TABLE buildings DROP COLUMN IF EXISTS developer_type; ALTER TABLE buildings DROP COLUMN IF EXISTS designers; From 2b53dbabe90ff129a0ba4fe48923cc384baff43c Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:40:51 +0100 Subject: [PATCH 76/98] rename to has_extension in dataFields --- app/src/api/config/dataFields.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index d9816cfd..8367dc14 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -323,7 +323,7 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, - is_extension: { + has_extension: { edit: true, verify: true }, From 6ff10ee32773857bf09a6ba4d9d836e01fc1bff7 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:42:28 +0100 Subject: [PATCH 77/98] fix has_extension type as bool --- migrations/029.team.up.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/029.team.up.sql b/migrations/029.team.up.sql index ce6ad363..c260de5f 100644 --- a/migrations/029.team.up.sql +++ b/migrations/029.team.up.sql @@ -1,4 +1,4 @@ -ALTER TABLE buildings ADD COLUMN IF NOT EXISTS has_extension smallint; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS has_extension boolean null; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS extension_year smallint; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS developer_type varchar; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers varchar; From a34a2c6d660b98dbddfc24f548be7faf4a0b37a6 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 14:54:45 +0100 Subject: [PATCH 78/98] remove duplications --- app/src/api/config/dataFields.ts | 4 ---- migrations/029.team.down.sql | 1 - migrations/029.team.up.sql | 1 - 3 files changed, 6 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 8367dc14..742daab1 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -343,10 +343,6 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, - designers: { - edit: true, - verify: true - }, lead_designer_type: { edit: true, verify: true diff --git a/migrations/029.team.down.sql b/migrations/029.team.down.sql index 069aa3bc..52edb1e2 100644 --- a/migrations/029.team.down.sql +++ b/migrations/029.team.down.sql @@ -3,7 +3,6 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS extension_year; ALTER TABLE buildings DROP COLUMN IF EXISTS developer_type; ALTER TABLE buildings DROP COLUMN IF EXISTS designers; ALTER TABLE buildings DROP COLUMN IF EXISTS designers_source_link; -ALTER TABLE buildings DROP COLUMN IF EXISTS designers; ALTER TABLE buildings DROP COLUMN IF EXISTS lead_designer_type; ALTER TABLE buildings DROP COLUMN IF EXISTS designer_awards; ALTER TABLE buildings DROP COLUMN IF EXISTS awards_source_link; \ No newline at end of file diff --git a/migrations/029.team.up.sql b/migrations/029.team.up.sql index c260de5f..2e14a130 100644 --- a/migrations/029.team.up.sql +++ b/migrations/029.team.up.sql @@ -3,7 +3,6 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS extension_year smallint; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS developer_type varchar; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers varchar; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers_source_link text[]; -ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers varchar; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS lead_designer_type varchar; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designer_awards boolean null; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS awards_source_link text[]; \ No newline at end of file From 0a9d4c3ba88861044bfb04459a7def34747e1484 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Mon, 6 Jun 2022 15:02:16 +0100 Subject: [PATCH 79/98] rename designers to building_designers --- app/src/api/config/dataFields.ts | 2 +- .../frontend/building/data-containers/team.tsx | 18 +++++++++--------- app/src/frontend/config/data-fields-config.ts | 2 +- migrations/029.team.down.sql | 2 +- migrations/029.team.up.sql | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 742daab1..e37dec29 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -335,7 +335,7 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, - designers: { + building_designers: { edit: true, verify: true }, diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 06b068a4..8f49bc17 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -92,23 +92,23 @@ const TeamView: React.FunctionComponent = (props) => { verified_count={props.building.verified.developer_type} /> Date: Mon, 6 Jun 2022 15:23:00 +0100 Subject: [PATCH 80/98] try again building_designers MultiDataEntry --- app/src/frontend/building/data-containers/team.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 8f49bc17..fc92219e 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -100,7 +100,6 @@ const TeamView: React.FunctionComponent = (props) => { onChange={props.onChange} tooltip={dataFields.building_designers.tooltip} editableEntries={true} - maxLength={747} /> Date: Mon, 6 Jun 2022 15:33:30 +0100 Subject: [PATCH 81/98] completely remove problematic field --- app/src/api/config/dataFields.ts | 5 +---- .../building/data-containers/team.tsx | 19 +------------------ app/src/frontend/config/data-fields-config.ts | 6 ------ migrations/029.team.down.sql | 2 +- migrations/029.team.up.sql | 2 +- 5 files changed, 4 insertions(+), 30 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index e37dec29..ee240079 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -335,10 +335,7 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, - building_designers: { - edit: true, - verify: true - }, + designers_source_link: { edit: true, verify: true diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index fc92219e..ca7d648e 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -91,24 +91,7 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.developer_type} verified_count={props.building.verified.developer_type} /> - - + Date: Mon, 6 Jun 2022 15:41:39 +0100 Subject: [PATCH 82/98] reintroduce designers field --- app/src/api/config/dataFields.ts | 5 ++++- .../building/data-containers/team.tsx | 20 ++++++++++++++++++- app/src/frontend/config/data-fields-config.ts | 6 ++++++ migrations/029.team.down.sql | 2 +- migrations/029.team.up.sql | 2 +- 5 files changed, 31 insertions(+), 4 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index ee240079..742daab1 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -335,7 +335,10 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, - + designers: { + edit: true, + verify: true + }, designers_source_link: { edit: true, verify: true diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index ca7d648e..21db14a7 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -91,7 +91,25 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.developer_type} verified_count={props.building.verified.developer_type} /> - + + Date: Fri, 10 Jun 2022 11:06:20 +0100 Subject: [PATCH 83/98] religious body --- app/src/frontend/config/data-fields-config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index c8b46dbc..8687ce7c 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -661,6 +661,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ "Other non-profit body", "Private (individual)", "Private (company/estate)", + "Religious body", "Other" ] }, From 3cf2827f271725c5a341a2414c61481b8f93a43d Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 10 Jun 2022 11:07:08 +0100 Subject: [PATCH 84/98] Architect/ architectural firm --- app/src/frontend/config/data-fields-config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 8687ce7c..16b92e36 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -685,7 +685,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ "Landowner", "Speculative builder", "Government architecture department", - "Architectural firm", + "Architect/ architectural firm", "Engineering firm", "Other" ] From d73e49a538124893ee7702f54e20f3643830c00f Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 10 Jun 2022 11:14:45 +0100 Subject: [PATCH 85/98] add developer_source_link --- .../building/data-containers/team.tsx | 19 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 6 ++++++ migrations/029.team.down.sql | 1 + migrations/029.team.up.sql | 1 + 4 files changed, 27 insertions(+) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 21db14a7..5b26b9a1 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -91,6 +91,25 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.developer_type} verified_count={props.building.verified.developer_type} /> + + Date: Fri, 10 Jun 2022 11:16:42 +0100 Subject: [PATCH 86/98] finish prev commit --- app/src/api/config/dataFields.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 742daab1..69742af7 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -335,6 +335,10 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, + developer_source_link: { + edit: true, + verify: true + }, designers: { edit: true, verify: true From e5c0e4e0c0035ca4db682faebf99bd2f5b4b1192 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 10 Jun 2022 11:37:52 +0100 Subject: [PATCH 87/98] add builder and builder_source_link --- app/src/api/config/dataFields.ts | 8 ++++ .../building/data-containers/team.tsx | 38 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 10 +++++ migrations/029.team.down.sql | 4 +- migrations/029.team.up.sql | 4 +- 5 files changed, 62 insertions(+), 2 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 69742af7..3dd6d1cc 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -358,6 +358,14 @@ export const buildingAttributesConfig = valueType()({ /* eslint awards_source_link: { edit: true, verify: true + }, + builder: { + edit: true, + verify: true + }, + builder_source_link: { + edit: true, + verify: true } }); diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 5b26b9a1..c21fe74d 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -206,6 +206,44 @@ const TeamView: React.FunctionComponent = (props) => { ) : (null) } + + + + ); }; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index acbf756d..4b9c6679 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -708,6 +708,16 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ tooltip: "URL for source for designer award(s)", example: ["", "", ""], }, + builder: { + category: Category.Team, + title: "Name of builder/ construction team", + example: ["", "", ""], + }, + builder_source_link: { + category: Category.Team, + title: "Source builder/ construction team", + example: ["", "", ""], + }, }; export const allFieldsConfig = {...dataFields, ...buildingUserFields}; \ No newline at end of file diff --git a/migrations/029.team.down.sql b/migrations/029.team.down.sql index 214b0939..08c3b521 100644 --- a/migrations/029.team.down.sql +++ b/migrations/029.team.down.sql @@ -6,4 +6,6 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS designers; ALTER TABLE buildings DROP COLUMN IF EXISTS designers_source_link; ALTER TABLE buildings DROP COLUMN IF EXISTS lead_designer_type; ALTER TABLE buildings DROP COLUMN IF EXISTS designer_awards; -ALTER TABLE buildings DROP COLUMN IF EXISTS awards_source_link; \ No newline at end of file +ALTER TABLE buildings DROP COLUMN IF EXISTS awards_source_link; +ALTER TABLE buildings DROP COLUMN IF EXISTS builder; +ALTER TABLE buildings DROP COLUMN IF EXISTS builder_source_link; \ No newline at end of file diff --git a/migrations/029.team.up.sql b/migrations/029.team.up.sql index fc351130..30ccae92 100644 --- a/migrations/029.team.up.sql +++ b/migrations/029.team.up.sql @@ -6,4 +6,6 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers text[]; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers_source_link text[]; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS lead_designer_type varchar; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designer_awards boolean null; -ALTER TABLE buildings ADD COLUMN IF NOT EXISTS awards_source_link text[]; \ No newline at end of file +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS awards_source_link text[]; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS builder text[]; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS builder_source_link text[]; \ No newline at end of file From 69f470552f0fe95c58fb3086d558d4aa79824aac Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 10 Jun 2022 11:39:30 +0100 Subject: [PATCH 88/98] remove non-existant tooltips --- app/src/frontend/building/data-containers/team.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index c21fe74d..08344a14 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -213,7 +213,6 @@ const TeamView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} onChange={props.onChange} - tooltip={dataFields.builder.tooltip} placeholder="" editableEntries={true} /> @@ -232,7 +231,6 @@ const TeamView: React.FunctionComponent = (props) => { mode={props.mode} copy={props.copy} onChange={props.onChange} - tooltip={dataFields.builder_source_link.tooltip} placeholder="https://..." editableEntries={true} /> From 0611eaa9cea18cadcf6396ad27f62ccd266f23fd Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 10 Jun 2022 13:13:23 +0100 Subject: [PATCH 89/98] add other_team and other_team_source_link --- app/src/api/config/dataFields.ts | 8 +++++ .../building/data-containers/team.tsx | 36 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 10 ++++++ migrations/029.team.down.sql | 4 ++- migrations/029.team.up.sql | 4 ++- 5 files changed, 60 insertions(+), 2 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 3dd6d1cc..9f32ec02 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -366,6 +366,14 @@ export const buildingAttributesConfig = valueType()({ /* eslint builder_source_link: { edit: true, verify: true + }, + other_team: { + edit: true, + verify: true + }, + other_team_source_link: { + edit: true, + verify: true } }); diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 08344a14..f52d717b 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -242,6 +242,42 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.builder_source_link} verified_count={props.building.verified.builder_source_link} /> + + + + ); }; diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 4b9c6679..259ec7d4 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -718,6 +718,16 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ title: "Source builder/ construction team", example: ["", "", ""], }, + other_team: { + category: Category.Team, + title: "Other significant members of the team", + example: ["", "", ""], + }, + other_team_source_link: { + category: Category.Team, + title: "Source other significant team members", + example: ["", "", ""], + }, }; export const allFieldsConfig = {...dataFields, ...buildingUserFields}; \ No newline at end of file diff --git a/migrations/029.team.down.sql b/migrations/029.team.down.sql index 08c3b521..a9a6fc88 100644 --- a/migrations/029.team.down.sql +++ b/migrations/029.team.down.sql @@ -8,4 +8,6 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS lead_designer_type; ALTER TABLE buildings DROP COLUMN IF EXISTS designer_awards; ALTER TABLE buildings DROP COLUMN IF EXISTS awards_source_link; ALTER TABLE buildings DROP COLUMN IF EXISTS builder; -ALTER TABLE buildings DROP COLUMN IF EXISTS builder_source_link; \ No newline at end of file +ALTER TABLE buildings DROP COLUMN IF EXISTS builder_source_link; +ALTER TABLE buildings DROP COLUMN IF EXISTS other_team; +ALTER TABLE buildings DROP COLUMN IF EXISTS other_team_source_link; \ No newline at end of file diff --git a/migrations/029.team.up.sql b/migrations/029.team.up.sql index 30ccae92..442cf252 100644 --- a/migrations/029.team.up.sql +++ b/migrations/029.team.up.sql @@ -8,4 +8,6 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS lead_designer_type varchar; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designer_awards boolean null; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS awards_source_link text[]; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS builder text[]; -ALTER TABLE buildings ADD COLUMN IF NOT EXISTS builder_source_link text[]; \ No newline at end of file +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS builder_source_link text[]; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS other_team text[]; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS other_team_source_link text[]; \ No newline at end of file From 68abacc685ac2bb48d001b886c73a7c001663f78 Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 10 Jun 2022 13:32:46 +0100 Subject: [PATCH 90/98] add developer_name --- app/src/api/config/dataFields.ts | 4 ++++ .../frontend/building/data-containers/team.tsx | 17 +++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 6 ++++++ migrations/029.team.down.sql | 1 + migrations/029.team.up.sql | 1 + 5 files changed, 29 insertions(+) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 9f32ec02..9ad4f97d 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -335,6 +335,10 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, + developer_name: { + edit: true, + verify: true + }, developer_source_link: { edit: true, verify: true diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index f52d717b..1e494464 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -91,6 +91,23 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.developer_type} verified_count={props.building.verified.developer_type} /> + + Date: Fri, 10 Jun 2022 13:34:24 +0100 Subject: [PATCH 91/98] fix prev commit --- app/src/frontend/building/data-containers/team.tsx | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 1e494464..64ded5a3 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -91,15 +91,17 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.developer_type} verified_count={props.building.verified.developer_type} /> - + onChange={props.onChange} + tooltip={dataFields.developer_name.tooltip} + placeholder="" + editableEntries={true} + /> Date: Fri, 10 Jun 2022 13:36:12 +0100 Subject: [PATCH 92/98] revert 68abacc685ac2bb48d001b886c73a7c001663f78 --- app/src/api/config/dataFields.ts | 4 ---- .../building/data-containers/team.tsx | 19 ------------------- app/src/frontend/config/data-fields-config.ts | 6 ------ migrations/029.team.down.sql | 1 - migrations/029.team.up.sql | 1 - 5 files changed, 31 deletions(-) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 9ad4f97d..9f32ec02 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -335,10 +335,6 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, - developer_name: { - edit: true, - verify: true - }, developer_source_link: { edit: true, verify: true diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index 64ded5a3..f52d717b 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -91,25 +91,6 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.developer_type} verified_count={props.building.verified.developer_type} /> - - Date: Fri, 10 Jun 2022 13:38:54 +0100 Subject: [PATCH 93/98] add developer_name 2nd attempt --- app/src/api/config/dataFields.ts | 4 ++++ .../building/data-containers/team.tsx | 19 +++++++++++++++++++ app/src/frontend/config/data-fields-config.ts | 6 ++++++ migrations/029.team.down.sql | 1 + migrations/029.team.up.sql | 1 + 5 files changed, 31 insertions(+) diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 9f32ec02..9ad4f97d 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -335,6 +335,10 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true }, + developer_name: { + edit: true, + verify: true + }, developer_source_link: { edit: true, verify: true diff --git a/app/src/frontend/building/data-containers/team.tsx b/app/src/frontend/building/data-containers/team.tsx index f52d717b..64ded5a3 100644 --- a/app/src/frontend/building/data-containers/team.tsx +++ b/app/src/frontend/building/data-containers/team.tsx @@ -91,6 +91,25 @@ const TeamView: React.FunctionComponent = (props) => { user_verified_as={props.user_verified.developer_type} verified_count={props.building.verified.developer_type} /> + + Date: Fri, 10 Jun 2022 14:04:46 +0100 Subject: [PATCH 94/98] test team colour scale (but using location vals for now) --- app/map_styles/polygon.xml | 33 +++++++++++++++++++ .../frontend/config/category-maps-config.ts | 11 +++++-- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/app/map_styles/polygon.xml b/app/map_styles/polygon.xml index 2a1043b9..3cf4a41a 100644 --- a/app/map_styles/polygon.xml +++ b/app/map_styles/polygon.xml @@ -79,6 +79,39 @@ +