Remove current land use class from frontend

This commit is contained in:
Maciej Ziarkowski 2020-03-19 14:41:44 +00:00
parent 914d7e56d4
commit ff027cb64b
3 changed files with 7 additions and 19 deletions

View File

@ -405,7 +405,7 @@ const BUILDING_FIELD_WHITELIST = new Set([
'building_attachment_form',
'date_change_building_use',
'current_landuse_class',
// 'current_landuse_class',
'current_landuse_group',
'current_landuse_order'
]);

View File

@ -13,23 +13,11 @@ import { CategoryViewProps } from './category-view-props';
*/
const UseView: React.FunctionComponent<CategoryViewProps> = (props) => (
<Fragment>
<MultiDataEntry
title={dataFields.current_landuse_class.title}
slug="current_landuse_class"
value={props.building.current_landuse_class}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
// tooltip={dataFields.current_landuse_class.tooltip}
placeholder="New land use class..."
autofill={true}
/>
<MultiDataEntry
title={dataFields.current_landuse_group.title}
slug="current_landuse_group"
value={props.building.current_landuse_group}
mode={props.mode}
disabled={(props.building.current_landuse_class || []).length !== 0}
copy={props.copy}
onChange={props.onChange}
// tooltip={dataFields.current_landuse_class.tooltip}
@ -44,6 +32,10 @@ const UseView: React.FunctionComponent<CategoryViewProps> = (props) => (
copy={props.copy}
onChange={props.onChange}
/>
{
props.mode != 'view' &&
<InfoBox msg="Land use order is automatically derived from the land use groups"></InfoBox>
}
</Fragment>
);
const UseContainer = withCopyEdit(UseView);

View File

@ -153,17 +153,13 @@ export const dataFields = {
title: "Longitude",
},
current_landuse_class: {
category: Category.LandUse,
title: "Current Land Use Class"
},
current_landuse_group: {
category: Category.LandUse,
title: "Current Land Use Group"
title: "Current Land Use (Group)"
},
current_landuse_order: {
category: Category.LandUse,
title: "Current Land Use Order"
title: "Current Land Use (Order)"
},
building_attachment_form: {