add developer_source_link

This commit is contained in:
Ed Chalstrey 2022-06-10 11:14:45 +01:00
parent 3cf2827f27
commit d73e49a538
4 changed files with 27 additions and 0 deletions

View File

@ -91,6 +91,25 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
user_verified_as={props.user_verified.developer_type}
verified_count={props.building.verified.developer_type}
/>
<MultiDataEntry
title={dataFields.developer_source_link.title}
slug="developer_source_link"
value={props.building.developer_source_link}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.developer_source_link.tooltip}
placeholder="https://..."
editableEntries={true}
/>
<Verification
slug="developer_source_link"
allow_verify={props.user !== undefined && props.building.developer_source_link !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("developer_source_link")}
user_verified_as={props.user_verified.developer_source_link}
verified_count={props.building.verified.developer_source_link}
/>
<MultiDataEntry
title={dataFields.designers.title}
slug="designers"

View File

@ -665,6 +665,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
"Other"
]
},
developer_source_link: {
category: Category.Team,
title: "Source links for developer(s)",
tooltip: "URL for source for developer(s)",
example: ["", "", ""],
},
designers: {
category: Category.Team,
title: "Who were the main designer(s)?",

View File

@ -1,6 +1,7 @@
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 developer_source_link;
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;

View File

@ -1,6 +1,7 @@
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 developer_source_link text[];
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;