Add alternative building footprint links (Location)

This commit is contained in:
Mike Simpson 2023-06-27 19:47:40 +01:00
parent 35611f87da
commit 91eb5aeef8
6 changed files with 26 additions and 8 deletions

View File

@ -107,6 +107,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true verify: true
}, },
location_alternative_footprint_links: {
edit: true,
verify: true
},
date_year: { date_year: {
edit: true, edit: true,
verify: true, verify: true,

View File

@ -315,12 +315,17 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
</> </>
} }
<hr/> <hr/>
<DataEntry <MultiDataEntry
title="Alternative open building footprint ID(s)" title={dataFields.location_alternative_footprint_links.title}
slug="" slug="location_alternative_footprint_links"
value="" value={props.building.location_alternative_footprint_links}
mode='view' mode={props.mode}
tooltip="Under Development.<br><br>Please enter links to any additional data sources for open building footprint IDs." copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.location_alternative_footprint_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/> />
</DataEntryGroup> </DataEntryGroup>
</Fragment> </Fragment>

View File

@ -203,6 +203,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
tooltip: "Ordnance Survey Topography Layer ID (TOID)", tooltip: "Ordnance Survey Topography Layer ID (TOID)",
example: "", example: "",
}, },
location_alternative_footprint_links: {
category: Category.Location,
title: "Alternative open building footprint links",
tooltip: "Links to alternative building footprint datasets (include the direct link to the footprint of this building where possible).",
example: ["", "", ""],
},
/** /**
* UPRNs is not part of the buildings table, but the string fields * UPRNs is not part of the buildings table, but the string fields

View File

@ -14,6 +14,7 @@ COPY (SELECT
location_address_links, location_address_links,
location_latitude, location_latitude,
location_longitude, location_longitude,
location_alternative_footprint_links
current_landuse_group, current_landuse_group,
current_landuse_order, current_landuse_order,
building_attachment_form, building_attachment_form,

View File

@ -1 +1,2 @@
ALTER TABLE buildings DROP COLUMN IF EXISTS location_name_link; ALTER TABLE buildings DROP COLUMN IF EXISTS location_name_link;
ALTER TABLE buildings DROP COLUMN IF EXISTS location_alternative_footprint_links;

View File

@ -1 +1,2 @@
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_name_link text; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_name_link text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_alternative_footprint_links text[];