Calculate total floors

#1192
This commit is contained in:
Mike Simpson 2023-06-29 11:09:12 +01:00
parent 1708d6e5f0
commit ff8618beb8

View File

@ -15,441 +15,469 @@ import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-e
/** /**
* Size view/edit section * Size view/edit section
*/ */
const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => ( const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => {
<Fragment>
<DataEntryGroup name="Number of floors/storeys"> // Calculate the total number of floors
<NumericDataEntry let total_floors = 0;
title={dataFields.size_storeys_core.title}
slug="size_storeys_core" if (props.building.size_storeys_attic != null) {
value={props.building.size_storeys_core} total_floors += props.building.size_storeys_attic;
mode={props.mode} }
copy={props.copy} if (props.building.size_storeys_core != null) {
tooltip={dataFields.size_storeys_core.tooltip} total_floors += props.building.size_storeys_core;
onChange={props.onChange} }
step={1} if (props.building.size_storeys_basement != null) {
min={0} total_floors += props.building.size_storeys_basement;
/> }
<Verification
slug="size_storeys_core" return (
allow_verify={props.user !== undefined && props.building.size_storeys_core !== null} <Fragment>
onVerify={props.onVerify} <DataEntryGroup name="Number of floors/storeys">
user_verified={props.user_verified.hasOwnProperty("size_storeys_core")} <NumericDataEntry
user_verified_as={props.user_verified.size_storeys_core} title={dataFields.size_storeys_core.title}
verified_count={props.building.verified.size_storeys_core} slug="size_storeys_core"
/> value={props.building.size_storeys_core}
<NumericDataEntry mode={props.mode}
title={dataFields.size_storeys_attic.title} copy={props.copy}
slug="size_storeys_attic" tooltip={dataFields.size_storeys_core.tooltip}
value={props.building.size_storeys_attic} onChange={props.onChange}
mode={props.mode} step={1}
copy={props.copy} min={0}
tooltip={dataFields.size_storeys_attic.tooltip} />
onChange={props.onChange} <Verification
step={1} slug="size_storeys_core"
min={0} allow_verify={props.user !== undefined && props.building.size_storeys_core !== null}
/> onVerify={props.onVerify}
<Verification user_verified={props.user_verified.hasOwnProperty("size_storeys_core")}
slug="size_storeys_attic" user_verified_as={props.user_verified.size_storeys_core}
allow_verify={props.user !== undefined && props.building.size_storeys_attic !== null} verified_count={props.building.verified.size_storeys_core}
onVerify={props.onVerify} />
user_verified={props.user_verified.hasOwnProperty("size_storeys_attic")} <NumericDataEntry
user_verified_as={props.user_verified.size_storeys_attic} title={dataFields.size_storeys_attic.title}
verified_count={props.building.verified.size_storeys_attic} slug="size_storeys_attic"
/> value={props.building.size_storeys_attic}
<NumericDataEntry mode={props.mode}
title={dataFields.size_storeys_basement.title} copy={props.copy}
slug="size_storeys_basement" tooltip={dataFields.size_storeys_attic.tooltip}
value={props.building.size_storeys_basement} onChange={props.onChange}
mode={props.mode} step={1}
copy={props.copy} min={0}
tooltip={dataFields.size_storeys_basement.tooltip} />
onChange={props.onChange} <Verification
step={1} slug="size_storeys_attic"
min={0} allow_verify={props.user !== undefined && props.building.size_storeys_attic !== null}
/> onVerify={props.onVerify}
<Verification user_verified={props.user_verified.hasOwnProperty("size_storeys_attic")}
slug="size_storeys_basement" user_verified_as={props.user_verified.size_storeys_attic}
allow_verify={props.user !== undefined && props.building.size_storeys_basement !== null} verified_count={props.building.verified.size_storeys_attic}
onVerify={props.onVerify} />
user_verified={props.user_verified.hasOwnProperty("size_storeys_basement")} <NumericDataEntry
user_verified_as={props.user_verified.size_storeys_basement} title={dataFields.size_storeys_basement.title}
verified_count={props.building.verified.size_storeys_basement} slug="size_storeys_basement"
/> value={props.building.size_storeys_basement}
<SelectDataEntry mode={props.mode}
title={dataFields.size_storeys_source_type.title} copy={props.copy}
slug="size_storeys_source_type" tooltip={dataFields.size_storeys_basement.tooltip}
value={props.building.size_storeys_source_type} onChange={props.onChange}
options={dataFields.size_storeys_source_type.items} step={1}
mode={props.mode} min={0}
copy={props.copy} />
onChange={props.onChange} <Verification
tooltip={dataFields.size_storeys_source_type.tooltip} slug="size_storeys_basement"
/> allow_verify={props.user !== undefined && props.building.size_storeys_basement !== null}
{(props.building.size_storeys_source_type == commonSourceTypes[0] || onVerify={props.onVerify}
props.building.size_storeys_source_type == commonSourceTypes[1] || user_verified={props.user_verified.hasOwnProperty("size_storeys_basement")}
props.building.size_storeys_source_type == null) ? <></> : user_verified_as={props.user_verified.size_storeys_basement}
<><MultiDataEntry verified_count={props.building.verified.size_storeys_basement}
title={dataFields.size_storeys_source_links.title} />
slug="size_storeys_source_links" <NumericDataEntry
value={props.building.size_storeys_source_links} title="Total number of floors"
slug="size_total_floors"
value={total_floors}
mode={props.mode}
copy={props.copy}
tooltip="Total number of floors, calculated from other values."
onChange={props.onChange}
step={1}
min={0}
disabled={true}
/>
<SelectDataEntry
title={dataFields.size_storeys_source_type.title}
slug="size_storeys_source_type"
value={props.building.size_storeys_source_type}
options={dataFields.size_storeys_source_type.items}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.size_storeys_source_links.tooltip} tooltip={dataFields.size_storeys_source_type.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup>
<DataEntryGroup name="Height">
<NumericDataEntry
title={dataFields.size_height_apex.title}
slug="size_height_apex"
value={props.building.size_height_apex}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
step={0.1}
min={0}
/> />
<Verification {(props.building.size_storeys_source_type == commonSourceTypes[0] ||
slug="size_height_apex" props.building.size_storeys_source_type == commonSourceTypes[1] ||
allow_verify={props.user !== undefined && props.building.size_height_apex !== null} props.building.size_storeys_source_type == null) ? <></> :
onVerify={props.onVerify} <><MultiDataEntry
user_verified={props.user_verified.hasOwnProperty("size_height_apex")} title={dataFields.size_storeys_source_links.title}
user_verified_as={props.user_verified.size_height_apex} slug="size_storeys_source_links"
verified_count={props.building.verified.size_height_apex} value={props.building.size_storeys_source_links}
/> mode={props.mode}
<SelectDataEntry copy={props.copy}
title={dataFields.size_height_apex_source_type.title} onChange={props.onChange}
slug="size_height_apex_source_type" tooltip={dataFields.size_storeys_source_links.tooltip}
value={props.building.size_height_apex_source_type} placeholder="https://..."
options={dataFields.size_height_apex_source_type.items} editableEntries={true}
mode={props.mode} isUrl={true}
copy={props.copy} />
onChange={props.onChange} </>
tooltip={dataFields.size_height_apex_source_type.tooltip} }
/> </DataEntryGroup>
{(props.building.size_height_apex_source_type == commonSourceTypes[0] || <DataEntryGroup name="Height">
props.building.size_height_apex_source_type == commonSourceTypes[1] || <NumericDataEntry
props.building.size_height_apex_source_type == null) ? <></> : title={dataFields.size_height_apex.title}
<><MultiDataEntry slug="size_height_apex"
title={dataFields.size_height_apex_source_links.title} value={props.building.size_height_apex}
slug="size_height_apex_source_links"
value={props.building.size_height_apex_source_links}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.size_height_apex_source_links.tooltip} step={0.1}
placeholder="https://..." min={0}
editableEntries={true}
isUrl={true}
/> />
</> <Verification
} slug="size_height_apex"
<hr/> allow_verify={props.user !== undefined && props.building.size_height_apex !== null}
<NumericDataEntry onVerify={props.onVerify}
title={dataFields.size_height_eaves.title} user_verified={props.user_verified.hasOwnProperty("size_height_apex")}
slug="size_height_eaves" user_verified_as={props.user_verified.size_height_apex}
value={props.building.size_height_eaves} verified_count={props.building.verified.size_height_apex}
mode={props.mode} />
copy={props.copy} <SelectDataEntry
onChange={props.onChange} title={dataFields.size_height_apex_source_type.title}
step={0.1} slug="size_height_apex_source_type"
min={0} value={props.building.size_height_apex_source_type}
/> options={dataFields.size_height_apex_source_type.items}
<Verification
slug="size_height_eaves"
allow_verify={props.user !== undefined && props.building.size_height_eaves !== null}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("size_height_eaves")}
user_verified_as={props.user_verified.size_height_eaves}
verified_count={props.building.verified.size_height_eaves}
/>
<SelectDataEntry
title={dataFields.size_height_eaves_source_type.title}
slug="size_height_eaves_source_type"
value={props.building.size_height_eaves_source_type}
options={dataFields.size_height_eaves_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_height_eaves_source_type.tooltip}
/>
{(props.building.size_height_eaves_source_type == commonSourceTypes[0] ||
props.building.size_height_eaves_source_type == commonSourceTypes[1] ||
props.building.size_height_eaves_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_height_eaves_source_links.title}
slug="size_height_eaves_source_links"
value={props.building.size_height_eaves_source_links}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.size_height_eaves_source_links.tooltip} tooltip={dataFields.size_height_apex_source_type.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup>
<DataEntryGroup name="Floor area">
<NumericDataEntry
title={dataFields.size_floor_area_ground.title}
slug="size_floor_area_ground"
value={props.building.size_floor_area_ground}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
step={0.1}
min={0}
/> />
<Verification {(props.building.size_height_apex_source_type == commonSourceTypes[0] ||
slug="size_floor_area_ground" props.building.size_height_apex_source_type == commonSourceTypes[1] ||
allow_verify={props.user !== undefined && props.building.size_floor_area_ground !== null} props.building.size_height_apex_source_type == null) ? <></> :
onVerify={props.onVerify} <><MultiDataEntry
user_verified={props.user_verified.hasOwnProperty("size_floor_area_ground")} title={dataFields.size_height_apex_source_links.title}
user_verified_as={props.user_verified.size_floor_area_ground} slug="size_height_apex_source_links"
verified_count={props.building.verified.size_floor_area_ground} value={props.building.size_height_apex_source_links}
/> mode={props.mode}
<NumericDataEntry copy={props.copy}
title={dataFields.size_floor_area_total.title} onChange={props.onChange}
slug="size_floor_area_total" tooltip={dataFields.size_height_apex_source_links.tooltip}
value={props.building.size_floor_area_total} placeholder="https://..."
mode={props.mode} editableEntries={true}
copy={props.copy} isUrl={true}
onChange={props.onChange} />
step={0.1} </>
min={0} }
/> <hr/>
<Verification <NumericDataEntry
slug="size_floor_area_total" title={dataFields.size_height_eaves.title}
allow_verify={props.user !== undefined && props.building.size_floor_area_total !== null} slug="size_height_eaves"
onVerify={props.onVerify} value={props.building.size_height_eaves}
user_verified={props.user_verified.hasOwnProperty("size_floor_area_total")}
user_verified_as={props.user_verified.size_floor_area_total}
verified_count={props.building.verified.size_floor_area_total}
/>
<SelectDataEntry
title={dataFields.size_floor_area_source_type.title}
slug="size_floor_area_source_type"
value={props.building.size_floor_area_source_type}
options={dataFields.size_floor_area_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_floor_area_source_type.tooltip}
/>
{(props.building.size_floor_area_source_type == commonSourceTypes[0] ||
props.building.size_floor_area_source_type == commonSourceTypes[1] ||
props.building.size_floor_area_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_floor_area_source_links.title}
slug="size_floor_area_source_links"
value={props.building.size_floor_area_source_links}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.size_floor_area_source_links.tooltip} step={0.1}
placeholder="https://..." min={0}
editableEntries={true}
isUrl={true}
/> />
</> <Verification
} slug="size_height_eaves"
</DataEntryGroup> allow_verify={props.user !== undefined && props.building.size_height_eaves !== null}
<DataEntryGroup name="Plot size"> onVerify={props.onVerify}
<NumericDataEntry user_verified={props.user_verified.hasOwnProperty("size_height_eaves")}
title={dataFields.size_width_frontage.title} user_verified_as={props.user_verified.size_height_eaves}
slug="size_width_frontage" verified_count={props.building.verified.size_height_eaves}
value={props.building.size_width_frontage} />
mode={props.mode} <SelectDataEntry
copy={props.copy} title={dataFields.size_height_eaves_source_type.title}
onChange={props.onChange} slug="size_height_eaves_source_type"
step={0.1} value={props.building.size_height_eaves_source_type}
min={0} options={dataFields.size_height_eaves_source_type.items}
/>
<Verification
slug="size_width_frontage"
allow_verify={props.user !== undefined && props.building.size_width_frontage !== null}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("size_width_frontage")}
user_verified_as={props.user_verified.size_width_frontage}
verified_count={props.building.verified.size_width_frontage}
/>
<SelectDataEntry
title={dataFields.size_width_frontage_source_type.title}
slug="size_width_frontage_source_type"
value={props.building.size_width_frontage_source_type}
options={dataFields.size_width_frontage_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_width_frontage_source_type.tooltip}
/>
{(props.building.size_width_frontage_source_type == commonSourceTypes[0] ||
props.building.size_width_frontage_source_type == commonSourceTypes[1] ||
props.building.size_width_frontage_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_width_frontage_source_links.title}
slug="size_width_frontage_source_links"
value={props.building.size_width_frontage_source_links}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.size_width_frontage_source_links.tooltip} tooltip={dataFields.size_height_eaves_source_type.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<NumericDataEntry
title={dataFields.size_plot_area_total.title}
slug="size_plot_area_total"
tooltip={dataFields.size_plot_area_total.tooltip}
value={props.building.size_plot_area_total}
mode={props.mode}
onChange={props.onChange}
step={0.1}
min={0}
/>
<Verification
slug="size_plot_area_total"
allow_verify={props.user !== undefined && props.building.size_plot_area_total !== null}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("size_plot_area_total")}
user_verified_as={props.user_verified.size_plot_area_total}
verified_count={props.building.verified.size_plot_area_total}
/> />
<SelectDataEntry {(props.building.size_height_eaves_source_type == commonSourceTypes[0] ||
title={dataFields.size_plot_area_total_source_type.title} props.building.size_height_eaves_source_type == commonSourceTypes[1] ||
slug="size_plot_area_total_source_type" props.building.size_height_eaves_source_type == null) ? <></> :
value={props.building.size_plot_area_total_source_type} <><MultiDataEntry
options={dataFields.size_plot_area_total_source_type.items} title={dataFields.size_height_eaves_source_links.title}
mode={props.mode} slug="size_height_eaves_source_links"
copy={props.copy} value={props.building.size_height_eaves_source_links}
onChange={props.onChange} mode={props.mode}
tooltip={dataFields.size_plot_area_total_source_type.tooltip} copy={props.copy}
/> onChange={props.onChange}
{(props.building.size_plot_area_total_source_type == commonSourceTypes[0] || tooltip={dataFields.size_height_eaves_source_links.tooltip}
props.building.size_plot_area_total_source_type == commonSourceTypes[1] || placeholder="https://..."
props.building.size_far_ratio_source_type == null) ? <></> : editableEntries={true}
<><MultiDataEntry isUrl={true}
title={dataFields.size_plot_area_total_source_links.title} />
slug="size_plot_area_total_source_links" </>
value={props.building.size_plot_area_total_source_links} }
</DataEntryGroup>
<DataEntryGroup name="Floor area">
<NumericDataEntry
title={dataFields.size_floor_area_ground.title}
slug="size_floor_area_ground"
value={props.building.size_floor_area_ground}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.size_plot_area_total_source_links.tooltip} step={0.1}
placeholder="https://..." min={0}
editableEntries={true}
isUrl={true}
/> />
</> <Verification
} slug="size_floor_area_ground"
<hr/> allow_verify={props.user !== undefined && props.building.size_floor_area_ground !== null}
<NumericDataEntry onVerify={props.onVerify}
title={dataFields.size_far_ratio.title} user_verified={props.user_verified.hasOwnProperty("size_floor_area_ground")}
value={props.building.size_far_ratio} user_verified_as={props.user_verified.size_floor_area_ground}
slug="size_far_ratio" verified_count={props.building.verified.size_floor_area_ground}
tooltip={dataFields.size_far_ratio.tooltip} />
//placeholder={dataFields.size_far_ratio.example} <NumericDataEntry
mode={props.mode} title={dataFields.size_floor_area_total.title}
onChange={props.onChange} slug="size_floor_area_total"
step={1} value={props.building.size_floor_area_total}
min={0}
/>
<Verification
slug="size_far_ratio"
allow_verify={props.user !== undefined && props.building.size_far_ratio !== null}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("size_far_ratio")}
user_verified_as={props.user_verified.size_far_ratio}
verified_count={props.building.verified.size_far_ratio}
/>
<SelectDataEntry
title={dataFields.size_far_ratio_source_type.title}
slug="size_far_ratio_source_type"
value={props.building.size_far_ratio_source_type}
options={dataFields.size_far_ratio_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_far_ratio_source_type.tooltip}
/>
{(props.building.size_far_ratio_source_type == commonSourceTypes[0] ||
props.building.size_far_ratio_source_type == commonSourceTypes[1] ||
props.building.size_far_ratio_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_far_ratio_source_links.title}
slug="size_far_ratio_source_links"
value={props.building.size_far_ratio_source_links}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.size_far_ratio_source_links.tooltip} step={0.1}
placeholder="https://..." min={0}
editableEntries={true}
isUrl={true}
/> />
</> <Verification
} slug="size_floor_area_total"
<hr/> allow_verify={props.user !== undefined && props.building.size_floor_area_total !== null}
<DataEntry onVerify={props.onVerify}
title={dataFields.size_parcel_geometry.title} user_verified={props.user_verified.hasOwnProperty("size_floor_area_total")}
slug="size_parcel_geometry" user_verified_as={props.user_verified.size_floor_area_total}
value={props.building.size_parcel_geometry} verified_count={props.building.verified.size_floor_area_total}
mode={props.mode} />
copy={props.copy} <SelectDataEntry
onChange={props.onChange} title={dataFields.size_floor_area_source_type.title}
tooltip={dataFields.size_parcel_geometry.tooltip} slug="size_floor_area_source_type"
placeholder="https://..." value={props.building.size_floor_area_source_type}
isUrl={true} options={dataFields.size_floor_area_source_type.items}
/>
<Verification
slug="size_parcel_geometry"
allow_verify={props.user !== undefined && props.building.size_parcel_geometry !== null}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("size_parcel_geometry")}
user_verified_as={props.user_verified.size_parcel_geometry}
verified_count={props.building.verified.size_parcel_geometry}
/>
<SelectDataEntry
title={dataFields.size_parcel_geometry_source_type.title}
slug="size_parcel_geometry_source_type"
value={props.building.size_parcel_geometry_source_type}
options={dataFields.size_parcel_geometry_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_parcel_geometry_source_type.tooltip}
/>
{(props.building.size_parcel_geometry_source_type == commonSourceTypes[0] ||
props.building.size_parcel_geometry_source_type == commonSourceTypes[1] ||
props.building.size_parcel_geometry_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_parcel_geometry_source_links.title}
slug="size_parcel_geometry_source_links"
value={props.building.size_parcel_geometry_source_links}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.size_parcel_geometry_source_links.tooltip} tooltip={dataFields.size_floor_area_source_type.tooltip}
/>
{(props.building.size_floor_area_source_type == commonSourceTypes[0] ||
props.building.size_floor_area_source_type == commonSourceTypes[1] ||
props.building.size_floor_area_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_floor_area_source_links.title}
slug="size_floor_area_source_links"
value={props.building.size_floor_area_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_floor_area_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup>
<DataEntryGroup name="Plot size">
<NumericDataEntry
title={dataFields.size_width_frontage.title}
slug="size_width_frontage"
value={props.building.size_width_frontage}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
step={0.1}
min={0}
/>
<Verification
slug="size_width_frontage"
allow_verify={props.user !== undefined && props.building.size_width_frontage !== null}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("size_width_frontage")}
user_verified_as={props.user_verified.size_width_frontage}
verified_count={props.building.verified.size_width_frontage}
/>
<SelectDataEntry
title={dataFields.size_width_frontage_source_type.title}
slug="size_width_frontage_source_type"
value={props.building.size_width_frontage_source_type}
options={dataFields.size_width_frontage_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_width_frontage_source_type.tooltip}
/>
{(props.building.size_width_frontage_source_type == commonSourceTypes[0] ||
props.building.size_width_frontage_source_type == commonSourceTypes[1] ||
props.building.size_width_frontage_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_width_frontage_source_links.title}
slug="size_width_frontage_source_links"
value={props.building.size_width_frontage_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_width_frontage_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<NumericDataEntry
title={dataFields.size_plot_area_total.title}
slug="size_plot_area_total"
tooltip={dataFields.size_plot_area_total.tooltip}
value={props.building.size_plot_area_total}
mode={props.mode}
onChange={props.onChange}
step={0.1}
min={0}
/>
<Verification
slug="size_plot_area_total"
allow_verify={props.user !== undefined && props.building.size_plot_area_total !== null}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("size_plot_area_total")}
user_verified_as={props.user_verified.size_plot_area_total}
verified_count={props.building.verified.size_plot_area_total}
/>
<SelectDataEntry
title={dataFields.size_plot_area_total_source_type.title}
slug="size_plot_area_total_source_type"
value={props.building.size_plot_area_total_source_type}
options={dataFields.size_plot_area_total_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_plot_area_total_source_type.tooltip}
/>
{(props.building.size_plot_area_total_source_type == commonSourceTypes[0] ||
props.building.size_plot_area_total_source_type == commonSourceTypes[1] ||
props.building.size_far_ratio_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_plot_area_total_source_links.title}
slug="size_plot_area_total_source_links"
value={props.building.size_plot_area_total_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_plot_area_total_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<NumericDataEntry
title={dataFields.size_far_ratio.title}
value={props.building.size_far_ratio}
slug="size_far_ratio"
tooltip={dataFields.size_far_ratio.tooltip}
//placeholder={dataFields.size_far_ratio.example}
mode={props.mode}
onChange={props.onChange}
step={1}
min={0}
/>
<Verification
slug="size_far_ratio"
allow_verify={props.user !== undefined && props.building.size_far_ratio !== null}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("size_far_ratio")}
user_verified_as={props.user_verified.size_far_ratio}
verified_count={props.building.verified.size_far_ratio}
/>
<SelectDataEntry
title={dataFields.size_far_ratio_source_type.title}
slug="size_far_ratio_source_type"
value={props.building.size_far_ratio_source_type}
options={dataFields.size_far_ratio_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_far_ratio_source_type.tooltip}
/>
{(props.building.size_far_ratio_source_type == commonSourceTypes[0] ||
props.building.size_far_ratio_source_type == commonSourceTypes[1] ||
props.building.size_far_ratio_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_far_ratio_source_links.title}
slug="size_far_ratio_source_links"
value={props.building.size_far_ratio_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_far_ratio_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<DataEntry
title={dataFields.size_parcel_geometry.title}
slug="size_parcel_geometry"
value={props.building.size_parcel_geometry}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_parcel_geometry.tooltip}
placeholder="https://..." placeholder="https://..."
editableEntries={true}
isUrl={true} isUrl={true}
/> />
</> <Verification
} slug="size_parcel_geometry"
</DataEntryGroup> allow_verify={props.user !== undefined && props.building.size_parcel_geometry !== null}
</Fragment> onVerify={props.onVerify}
); user_verified={props.user_verified.hasOwnProperty("size_parcel_geometry")}
user_verified_as={props.user_verified.size_parcel_geometry}
verified_count={props.building.verified.size_parcel_geometry}
/>
<SelectDataEntry
title={dataFields.size_parcel_geometry_source_type.title}
slug="size_parcel_geometry_source_type"
value={props.building.size_parcel_geometry_source_type}
options={dataFields.size_parcel_geometry_source_type.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_parcel_geometry_source_type.tooltip}
/>
{(props.building.size_parcel_geometry_source_type == commonSourceTypes[0] ||
props.building.size_parcel_geometry_source_type == commonSourceTypes[1] ||
props.building.size_parcel_geometry_source_type == null) ? <></> :
<><MultiDataEntry
title={dataFields.size_parcel_geometry_source_links.title}
slug="size_parcel_geometry_source_links"
value={props.building.size_parcel_geometry_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.size_parcel_geometry_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup>
</Fragment>
)
};
const SizeContainer = withCopyEdit(SizeView); const SizeContainer = withCopyEdit(SizeView);
export default SizeContainer; export default SizeContainer;