Add fields to Age and History

This commit is contained in:
Mike Simpson 2023-06-28 13:16:11 +01:00
parent cc07121e08
commit 0517222670
5 changed files with 50 additions and 2 deletions

View File

@ -693,6 +693,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
age_retrofit_date_source_links : { age_retrofit_date_source_links : {
edit: true, edit: true,
verify: true verify: true
},
age_historical_raster_map_links : {
edit: true,
verify: true
},
age_historical_vectorised_footprint_links : {
edit: true,
verify: true
} }
}); });

View File

@ -432,6 +432,30 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
This section provides links to open digitised historical maps/mapping data that we are using in the Colouring Cities platform. This section provides links to open digitised historical maps/mapping data that we are using in the Colouring Cities platform.
</i> </i>
</div> </div>
<MultiDataEntry
title={dataFields.age_historical_raster_map_links.title}
slug="age_historical_raster_map_links"
value={props.building.age_historical_raster_map_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.age_historical_raster_map_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
<MultiDataEntry
title={dataFields.age_historical_vectorised_footprint_links.title}
slug="age_historical_vectorised_footprint_links"
value={props.building.age_historical_vectorised_footprint_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.age_historical_vectorised_footprint_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</DataEntryGroup> </DataEntryGroup>
</Fragment> </Fragment>
); );

View File

@ -1305,6 +1305,18 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
tooltip: "Source link(s) for street width data", tooltip: "Source link(s) for street width data",
example: ["", "", ""], example: ["", "", ""],
}, },
age_historical_raster_map_links: {
category: Category.Age,
title: "Historical maps links",
tooltip: "Links to rasterised historical maps",
example: ["", "", ""],
},
age_historical_vectorised_footprint_links: {
category: Category.Age,
title: "Extracted vectorised historical footprints links",
tooltip: "Extracted vectorised historical footprints links",
example: ["", "", ""],
}
}; };
export const allFieldsConfig = { ...dataFields, ...buildingUserFields }; export const allFieldsConfig = { ...dataFields, ...buildingUserFields };

View File

@ -1,2 +1,4 @@
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; ALTER TABLE buildings DROP COLUMN IF EXISTS location_alternative_footprint_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS age_historical_raster_map_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS age_historical_vectorised_footprint_links;

View File

@ -1,2 +1,4 @@
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[]; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_alternative_footprint_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_historical_raster_map_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_historical_vectorised_footprint_links text[];