reintroduce designers field

This commit is contained in:
Ed Chalstrey 2022-06-06 15:41:39 +01:00
parent 8fca3bc8d8
commit b3ca4fef88
5 changed files with 31 additions and 4 deletions

View File

@ -335,7 +335,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true verify: true
}, },
designers: {
edit: true,
verify: true
},
designers_source_link: { designers_source_link: {
edit: true, edit: true,
verify: true verify: true

View File

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

View File

@ -664,6 +664,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
"Other" "Other"
] ]
}, },
designers: {
category: Category.Team,
title: "Who were the main designer(s)?",
tooltip: "Free text. First name, space, then Last name",
example: ["", "", ""],
},
designers_source_link: { designers_source_link: {
category: Category.Team, category: Category.Team,
title: "Source links for designer(s)", title: "Source links for designer(s)",

View File

@ -1,7 +1,7 @@
ALTER TABLE buildings DROP COLUMN IF EXISTS has_extension; 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 extension_year;
ALTER TABLE buildings DROP COLUMN IF EXISTS developer_type; 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_source_link;
ALTER TABLE buildings DROP COLUMN IF EXISTS lead_designer_type; 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 designer_awards;

View File

@ -1,7 +1,7 @@
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS has_extension boolean null; 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 extension_year smallint;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS developer_type varchar; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS developer_type varchar;
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 designers_source_link text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS lead_designer_type 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 designer_awards boolean null;