Merge branch 'source-details-edits-2' into source-details-edits-3
This commit is contained in:
parent
394266cf2c
commit
a82918d7a1
@ -16,7 +16,7 @@ import { CategoryViewProps } from './category-view-props';
|
|||||||
*/
|
*/
|
||||||
const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||||
const currentYear = new Date().getFullYear();
|
const currentYear = new Date().getFullYear();
|
||||||
|
if (props.building.date_source == "Expert knowledge of building" || "Expert estimate from image"){
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<YearDataEntry
|
<YearDataEntry
|
||||||
@ -65,14 +65,56 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
placeholder=""
|
placeholder=""
|
||||||
options={dataFields.date_source.items}
|
options={dataFields.date_source.items}
|
||||||
/>
|
/>
|
||||||
<TextboxDataEntry
|
</Fragment>
|
||||||
title={dataFields.date_source_detail.title}
|
);
|
||||||
slug="date_source_detail"
|
};
|
||||||
value={props.building.date_source_detail}
|
return (
|
||||||
|
<Fragment>
|
||||||
|
<YearDataEntry
|
||||||
|
year={props.building.date_year}
|
||||||
|
upper={props.building.date_upper}
|
||||||
|
lower={props.building.date_lower}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.date_source_detail.tooltip}
|
|
||||||
|
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}
|
||||||
|
/>
|
||||||
|
<NumericDataEntry
|
||||||
|
title={dataFields.facade_year.title}
|
||||||
|
slug="facade_year"
|
||||||
|
value={props.building.facade_year}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
step={1}
|
||||||
|
min={1}
|
||||||
|
max={currentYear}
|
||||||
|
tooltip={dataFields.facade_year.tooltip}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="facade_year"
|
||||||
|
allow_verify={props.user !== undefined && props.building.facade_year !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("facade_year")}
|
||||||
|
user_verified_as={props.user_verified.facade_year}
|
||||||
|
verified_count={props.building.verified.facade_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}
|
||||||
|
placeholder=""
|
||||||
|
options={dataFields.date_source.items}
|
||||||
/>
|
/>
|
||||||
<MultiDataEntry
|
<MultiDataEntry
|
||||||
title={dataFields.date_link.title}
|
title={dataFields.date_link.title}
|
||||||
|
Loading…
Reference in New Issue
Block a user