From 0611eaa9cea18cadcf6396ad27f62ccd266f23fd Mon Sep 17 00:00:00 2001 From: Ed Chalstrey Date: Fri, 10 Jun 2022 13:13:23 +0100 Subject: [PATCH] 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