Team update

- Remove unused data from "General info"
- Fix logic of boolean question
- Update hints etc.
This commit is contained in:
Mike Simpson 2023-06-29 14:29:23 +01:00
parent 64969ecb7e
commit 8b38f7a076
2 changed files with 12 additions and 60 deletions

View File

@ -22,56 +22,6 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
return (
<form>
<DataEntryGroup name="General info">
<NumericDataEntry
slug='date_year'
title={dataFields.date_year.title}
value={currentBuildingConstructionYear}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
step={1}
min={1}
max={currentYear}
tooltip={dataFields.extension_year.tooltip}
/>
<Verification
slug="date_year"
allow_verify={props.user !== undefined && props.building.date_year !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("date_year")}
user_verified_as={props.user_verified.date_year}
verified_count={props.building.verified.date_year}
/>
<SelectDataEntry
title={dataFields.date_source.title}
slug="date_source"
value={props.building.date_source}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.date_source.tooltip}
options={dataFields.date_source.items}
placeholder={dataFields.date_source.example}
/>
{(props.building.date_source == dataFields.date_source.items[0] ||
props.building.date_source == dataFields.date_source.items[1] ||
props.building.date_source == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.date_link.title}
slug="date_link"
value={props.building.date_link}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.date_link.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<LogicalDataEntry
title={dataFields.has_extension.title}
slug="has_extension"
@ -81,7 +31,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
onChange={props.onChange}
tooltip={dataFields.has_extension.tooltip}
/>
{props.building.has_extension ? (
{props.building.has_extension!=null && !props.building.has_extension ? (
<>
<NumericDataEntry
slug='extension_year'
@ -366,6 +316,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.builder.tooltip}
placeholder=""
editableEntries={true}
disabled={true}

View File

@ -909,8 +909,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
},
has_extension: {
category: Category.Team,
title: "Was a later extension added?",
tooltip: "",
title: "Does this information relate to the original main building?",
tooltip: "If the data in this section relates to the original main building, select \"yes\". If the data relates to a later extension/ redevelopment, select \"no\".",
example: false
},
extension_year: {
@ -951,13 +951,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
developer_name: {
category: Category.Team,
title: "Who were the developer(s)?",
tooltip: "Free text. First name, space, then Last name",
tooltip: "Name(s) of the building's developers.<br/><br/>Free-text entry disabled for security reasons.",
example: ["", "", ""],
},
developer_links: {
category: Category.Team,
title: "Developer link(s)",
tooltip: "A link to a webpage explaining who the developer of the building was.",
tooltip: "Link(s) to webpage(s) explaining who developed the building.",
example: ["", "", ""],
},
developer_source_type: {
@ -982,7 +982,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
landowner_links: {
category: Category.Team,
title: "Landowner link(s)",
tooltip: "A link to a webpage explaining who the land owner was when the building was built.",
tooltip: "Link(s) to webpage(s) explaining who owned the land when when the building was built.",
example: ["", "", ""],
},
landowner_source_type: {
@ -1001,13 +1001,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
designers: {
category: Category.Team,
title: "Who were the main designer(s)?",
tooltip: "First name, space, then Last name.<br/><br/>Free-text entry disabled for security reasons.",
tooltip: "Free-text entry disabled for security reasons.",
example: ["", "", ""],
},
designers_links: {
category: Category.Team,
title: "Designer link(s)",
tooltip: "A link to webpage(s) explaining who the designer of the building was.",
tooltip: "Link(s) to webpage(s) explaining who designed the building.",
example: ["", "", ""],
},
designers_source_type: {
@ -1050,13 +1050,14 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
},
builder: {
category: Category.Team,
title: "Name of builder/construction team.<br/><br/>Free-text entry disabled for security reasons.",
title: "Name of builder/construction team.",
tooltip: "Free-text entry disabled for security reasons.",
example: ["", "", ""],
},
builder_links: {
category: Category.Team,
title: "Builder link(s)",
tooltip: "A link to webpage(s) explaining who built the building was.",
tooltip: "Link(s) to webpage(s) explaining who built the building.",
example: ["", "", ""],
},
builder_source_type: {