Merge pull request #1180 from colouring-cities/feature/ui-refactor
Feature/UI refactor
This commit is contained in:
commit
6edd9b06bf
@ -913,6 +913,32 @@
|
||||
<LineSymbolizer stroke="#888" stroke-width="3.0"/>
|
||||
</Rule>
|
||||
</Style>
|
||||
<Style name="disaster_severity">
|
||||
<Rule>
|
||||
<Filter>[disaster_severity] = "Building destroyed"</Filter>
|
||||
<PolygonSymbolizer fill="#bd0026" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[disaster_severity] = "Very severe"</Filter>
|
||||
<PolygonSymbolizer fill="#e31a1c" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[disaster_severity] = "Severe"</Filter>
|
||||
<PolygonSymbolizer fill="#fc4e2a" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[disaster_severity] = "Moderate"</Filter>
|
||||
<PolygonSymbolizer fill="#fd8d3c" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[disaster_severity] = "Minimal"</Filter>
|
||||
<PolygonSymbolizer fill="#feb24c" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[disaster_severity] = "No damage visible"</Filter>
|
||||
<PolygonSymbolizer fill="#fed976" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<Style name="dynamics_demolished_count">
|
||||
<Rule>
|
||||
<Filter>[dynamics_has_demolished_buildings] = false</Filter>
|
||||
|
170
app/package-lock.json
generated
170
app/package-lock.json
generated
@ -33,6 +33,7 @@
|
||||
"pg-promise": "^10.11.1",
|
||||
"query-string": "^6.13.1",
|
||||
"react": "^17.0.2",
|
||||
"react-datepicker": "^4.11.0",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-leaflet": "^3.1.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
@ -2646,6 +2647,15 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@popperjs/core": {
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
|
||||
"integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/popperjs"
|
||||
}
|
||||
},
|
||||
"node_modules/@react-leaflet/core": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-1.1.1.tgz",
|
||||
@ -4709,14 +4719,24 @@
|
||||
}
|
||||
},
|
||||
"node_modules/caniuse-lite": {
|
||||
"version": "1.0.30001301",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001301.tgz",
|
||||
"integrity": "sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA==",
|
||||
"version": "1.0.30001487",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001487.tgz",
|
||||
"integrity": "sha512-83564Z3yWGqXsh2vaH/mhXfEM0wX+NlBCm1jYHOb97TrTWJEmPTccZgeLTPBUUb0PNVo+oomb7wkimZBIERClA==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
}
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/browserslist"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/caniuse-lite"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/canvas-confetti": {
|
||||
"version": "1.4.0",
|
||||
@ -4897,6 +4917,11 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/classnames": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
|
||||
"integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw=="
|
||||
},
|
||||
"node_modules/clean-css": {
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz",
|
||||
@ -5940,6 +5965,18 @@
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/date-fns": {
|
||||
"version": "2.29.3",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz",
|
||||
"integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA==",
|
||||
"engines": {
|
||||
"node": ">=0.11"
|
||||
},
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/date-fns"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
@ -14834,6 +14871,23 @@
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/react-datepicker": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-4.11.0.tgz",
|
||||
"integrity": "sha512-50n93o7mQwBEhg05tbopjFKgs8qgi8VBCAOMC4VqrKut72eAjESc/wXS/k5hRtnP0oe2FCGw7MJuIwh37wuXOw==",
|
||||
"dependencies": {
|
||||
"@popperjs/core": "^2.9.2",
|
||||
"classnames": "^2.2.6",
|
||||
"date-fns": "^2.24.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-onclickoutside": "^6.12.2",
|
||||
"react-popper": "^2.3.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^16.9.0 || ^17 || ^18",
|
||||
"react-dom": "^16.9.0 || ^17 || ^18"
|
||||
}
|
||||
},
|
||||
"node_modules/react-dev-utils": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.4.tgz",
|
||||
@ -15244,6 +15298,11 @@
|
||||
"integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/react-fast-compare": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.1.tgz",
|
||||
"integrity": "sha512-xTYf9zFim2pEif/Fw16dBiXpe0hoy5PxcD8+OwBnTtNLfIm3g6WxhKNurY+6OmdH1u6Ta/W/Vl6vjbYP1MFnDg=="
|
||||
},
|
||||
"node_modules/react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
@ -15262,6 +15321,33 @@
|
||||
"react-dom": "^17.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/react-onclickoutside": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.13.0.tgz",
|
||||
"integrity": "sha512-ty8So6tcUpIb+ZE+1HAhbLROvAIJYyJe/1vRrrcmW+jLsaM+/powDRqxzo6hSh9CuRZGSL1Q8mvcF5WRD93a0A==",
|
||||
"funding": {
|
||||
"type": "individual",
|
||||
"url": "https://github.com/Pomax/react-onclickoutside/blob/master/FUNDING.md"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "^15.5.x || ^16.x || ^17.x || ^18.x",
|
||||
"react-dom": "^15.5.x || ^16.x || ^17.x || ^18.x"
|
||||
}
|
||||
},
|
||||
"node_modules/react-popper": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.3.0.tgz",
|
||||
"integrity": "sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q==",
|
||||
"dependencies": {
|
||||
"react-fast-compare": "^3.0.1",
|
||||
"warning": "^4.0.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@popperjs/core": "^2.0.0",
|
||||
"react": "^16.8.0 || ^17 || ^18",
|
||||
"react-dom": "^16.8.0 || ^17 || ^18"
|
||||
}
|
||||
},
|
||||
"node_modules/react-refresh": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.9.0.tgz",
|
||||
@ -18822,6 +18908,14 @@
|
||||
"makeerror": "1.0.12"
|
||||
}
|
||||
},
|
||||
"node_modules/warning": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
|
||||
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
|
||||
"dependencies": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/watchpack": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
|
||||
@ -22102,6 +22196,11 @@
|
||||
"rimraf": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"@popperjs/core": {
|
||||
"version": "2.11.7",
|
||||
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.7.tgz",
|
||||
"integrity": "sha512-Cr4OjIkipTtcXKjAsm8agyleBuDHvxzeBoa1v543lbv1YaIwQjESsVcmjiWiPEbC1FIeHOG/Op9kdCmAmiS3Kw=="
|
||||
},
|
||||
"@react-leaflet/core": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@react-leaflet/core/-/core-1.1.1.tgz",
|
||||
@ -23785,9 +23884,9 @@
|
||||
}
|
||||
},
|
||||
"caniuse-lite": {
|
||||
"version": "1.0.30001301",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001301.tgz",
|
||||
"integrity": "sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA==",
|
||||
"version": "1.0.30001487",
|
||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001487.tgz",
|
||||
"integrity": "sha512-83564Z3yWGqXsh2vaH/mhXfEM0wX+NlBCm1jYHOb97TrTWJEmPTccZgeLTPBUUb0PNVo+oomb7wkimZBIERClA==",
|
||||
"dev": true
|
||||
},
|
||||
"canvas-confetti": {
|
||||
@ -23929,6 +24028,11 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"classnames": {
|
||||
"version": "2.3.2",
|
||||
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.2.tgz",
|
||||
"integrity": "sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw=="
|
||||
},
|
||||
"clean-css": {
|
||||
"version": "4.2.4",
|
||||
"resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.4.tgz",
|
||||
@ -24753,6 +24857,11 @@
|
||||
"whatwg-url": "^8.0.0"
|
||||
}
|
||||
},
|
||||
"date-fns": {
|
||||
"version": "2.29.3",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.3.tgz",
|
||||
"integrity": "sha512-dDCnyH2WnnKusqvZZ6+jA1O51Ibt8ZMRNkDZdyAyK4YfbDwa/cEmuztzG5pk6hqlp9aSBPYcjOlktquahGwGeA=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.3.3",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
|
||||
@ -31508,6 +31617,19 @@
|
||||
"object-assign": "^4.1.1"
|
||||
}
|
||||
},
|
||||
"react-datepicker": {
|
||||
"version": "4.11.0",
|
||||
"resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-4.11.0.tgz",
|
||||
"integrity": "sha512-50n93o7mQwBEhg05tbopjFKgs8qgi8VBCAOMC4VqrKut72eAjESc/wXS/k5hRtnP0oe2FCGw7MJuIwh37wuXOw==",
|
||||
"requires": {
|
||||
"@popperjs/core": "^2.9.2",
|
||||
"classnames": "^2.2.6",
|
||||
"date-fns": "^2.24.0",
|
||||
"prop-types": "^15.7.2",
|
||||
"react-onclickoutside": "^6.12.2",
|
||||
"react-popper": "^2.3.0"
|
||||
}
|
||||
},
|
||||
"react-dev-utils": {
|
||||
"version": "11.0.4",
|
||||
"resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-11.0.4.tgz",
|
||||
@ -31839,6 +31961,11 @@
|
||||
"integrity": "sha512-mKR90fX7Pm5seCOfz8q9F+66VCc1PGsWSBxKbITjfKVQHMNF2zudxHnMdJiB1fRCb+XsbQV9sO9DCkgsMQgBIA==",
|
||||
"dev": true
|
||||
},
|
||||
"react-fast-compare": {
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.1.tgz",
|
||||
"integrity": "sha512-xTYf9zFim2pEif/Fw16dBiXpe0hoy5PxcD8+OwBnTtNLfIm3g6WxhKNurY+6OmdH1u6Ta/W/Vl6vjbYP1MFnDg=="
|
||||
},
|
||||
"react-is": {
|
||||
"version": "16.13.1",
|
||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
|
||||
@ -31852,6 +31979,21 @@
|
||||
"@react-leaflet/core": "^1.1.1"
|
||||
}
|
||||
},
|
||||
"react-onclickoutside": {
|
||||
"version": "6.13.0",
|
||||
"resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.13.0.tgz",
|
||||
"integrity": "sha512-ty8So6tcUpIb+ZE+1HAhbLROvAIJYyJe/1vRrrcmW+jLsaM+/powDRqxzo6hSh9CuRZGSL1Q8mvcF5WRD93a0A==",
|
||||
"requires": {}
|
||||
},
|
||||
"react-popper": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/react-popper/-/react-popper-2.3.0.tgz",
|
||||
"integrity": "sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q==",
|
||||
"requires": {
|
||||
"react-fast-compare": "^3.0.1",
|
||||
"warning": "^4.0.2"
|
||||
}
|
||||
},
|
||||
"react-refresh": {
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.9.0.tgz",
|
||||
@ -34711,6 +34853,14 @@
|
||||
"makeerror": "1.0.12"
|
||||
}
|
||||
},
|
||||
"warning": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz",
|
||||
"integrity": "sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==",
|
||||
"requires": {
|
||||
"loose-envify": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz",
|
||||
|
@ -37,6 +37,7 @@
|
||||
"pg-promise": "^10.11.1",
|
||||
"query-string": "^6.13.1",
|
||||
"react": "^17.0.2",
|
||||
"react-datepicker": "^4.11.0",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-leaflet": "^3.1.0",
|
||||
"react-router-dom": "^5.2.0",
|
||||
|
@ -79,6 +79,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
location_address_source: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
location_address_links: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
location_latitude: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
@ -87,6 +95,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
location_coordinates_source: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
location_coordinates_links: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
date_year: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
@ -138,10 +154,38 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_storeys_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_storeys_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_height_apex: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_height_apex_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_height_apex_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_height_eaves: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_height_eaves_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_height_eaves_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_floor_area_ground: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
@ -150,10 +194,62 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_floor_area_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_floor_area_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_width_frontage: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_width_frontage_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_width_frontage_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_far_ratio: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_far_ratio_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_far_ratio_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_plot_area_total: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_plot_area_total_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_plot_area_total_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_parcel_geometry: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_parcel_geometry_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
size_parcel_geometry_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
construction_core_material: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
@ -244,6 +340,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
sust_retrofit_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
sust_retrofit_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
sust_life_expectancy: {
|
||||
edit: false,
|
||||
},
|
||||
@ -284,18 +388,24 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
|
||||
demolished_buildings: {
|
||||
edit: true,
|
||||
verify: false,
|
||||
asJson: true,
|
||||
sqlCast: 'jsonb',
|
||||
},
|
||||
|
||||
is_domestic: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
is_domestic_source: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
is_domestic_links: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
survival_status: {
|
||||
edit: true,
|
||||
verify: true
|
||||
@ -304,6 +414,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
survival_source_links: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
likes_total: {
|
||||
edit: false,
|
||||
derivedEdit: true,
|
||||
@ -352,6 +466,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
extension_source_type: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
extension_source_links: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
developer_type: {
|
||||
edit: true,
|
||||
verify: true
|
||||
@ -360,6 +482,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
developer_source_type: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
developer_source_link: {
|
||||
edit: true,
|
||||
verify: true
|
||||
@ -368,6 +494,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
landowner_source_type: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
landowner_source_link: {
|
||||
edit: true,
|
||||
verify: true
|
||||
@ -376,6 +506,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
designers_source_type: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
designers_source_link: {
|
||||
edit: true,
|
||||
verify: true
|
||||
@ -396,6 +530,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
builder_source_type: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
builder_source_link: {
|
||||
edit: true,
|
||||
verify: true
|
||||
@ -407,8 +545,147 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
other_team_source_link: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
disaster_type: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
disaster_severity: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
disaster_assessment_method: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
disaster_source_link: {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
disaster_start_date : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
disaster_end_date : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_front_garden : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_back_garden : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_flats_garden : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_garden_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_garden_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_street_width : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_street_width_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_street_width_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_pavement_width : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_pavement_width_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_pavement_width_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_street_geometry : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_street_geometry_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_street_geometry_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_green_space_distance : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_green_space_distance_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_green_space_distance_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_tree_distance : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_tree_distance_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
context_tree_distance_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_cladding_date : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_cladding_date_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_cladding_date_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_extension_date : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_extension_date_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_extension_date_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_retrofit_date : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_retrofit_date_source_type : {
|
||||
edit: true,
|
||||
verify: true
|
||||
},
|
||||
age_retrofit_date_source_links : {
|
||||
edit: true,
|
||||
verify: true
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
@ -5,5 +5,8 @@
|
||||
"privacyStatement": "{Privacy statement goes here}",
|
||||
|
||||
"initialMapPosition": [ 51.5245255, -0.1338422 ],
|
||||
"initialZoomLevel": 16
|
||||
"initialZoomLevel": 16,
|
||||
|
||||
"postcode": "Postcode",
|
||||
"energy_rating": "Building Research Establishment Environmental Assessment Method (BREEAM) rating"
|
||||
}
|
||||
|
@ -1,11 +1,14 @@
|
||||
export interface CCConfig
|
||||
{
|
||||
cityName: string;
|
||||
projectBlurb: string;
|
||||
githubURL: string;
|
||||
privacyStatement: string;
|
||||
cityName: string; // City name (i.e. "Colouring {City Name}")
|
||||
projectBlurb: string; // Description used on homepage
|
||||
githubURL: string; // URL of the project's GitHub repository
|
||||
privacyStatement: string; // Privacy statement, including where data is stored
|
||||
|
||||
initialMapPosition: [number, number];
|
||||
initialZoomLevel: number;
|
||||
initialMapPosition: [number, number]; // Initial location of the map [latitude, longitude]
|
||||
initialZoomLevel: number; // Initial Zoom Level
|
||||
|
||||
postcode: string; // Alternative for "Postcode" text (i.e. "Zip Code")
|
||||
energy_rating: string; // Official Environmental Energy Rating (BREEAM Rating in UK)
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,12 @@
|
||||
.data-category-list {
|
||||
margin: 0;
|
||||
margin-bottom: 10px;
|
||||
padding: 2px;
|
||||
margin-bottom: 25px;
|
||||
padding-top: 12px;
|
||||
padding-left: 12px;
|
||||
padding-right: 12px;
|
||||
padding-bottom: 12px;
|
||||
width: 100%;
|
||||
min-height: 340px;
|
||||
height: 340px;
|
||||
max-height: 340px;
|
||||
max-width: 470px;
|
||||
@ -14,6 +18,10 @@
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.welcome .data-category-list {
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
.data-category-list li {
|
||||
box-sizing: border-box;
|
||||
flex-basis: 7rem;
|
||||
|
@ -17,6 +17,6 @@
|
||||
text-align: center;
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
padding: 0.25em;
|
||||
padding: 0.3em;
|
||||
}
|
||||
|
@ -3,6 +3,8 @@
|
||||
position: relative;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 410;
|
||||
padding-top: 3px;
|
||||
padding-bottom: 3px;
|
||||
}
|
||||
.data-entry-group-header .data-entry-group-title {
|
||||
padding-left: 0.6rem;
|
||||
@ -17,3 +19,8 @@
|
||||
padding-left: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
.data-entry-group-body hr {
|
||||
margin: 1.5em 0 1.5em 0;
|
||||
border: 1px dashed #ccc;
|
||||
}
|
||||
|
@ -63,6 +63,7 @@ class YearDataEntry extends Component<YearDataEntryProps, any> {
|
||||
onChange={props.onChange}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.date_year.tooltip}
|
||||
// "type": "year_estimator"
|
||||
/>
|
||||
<Verification
|
||||
|
@ -1,7 +1,8 @@
|
||||
.edit-bar {
|
||||
position: sticky;
|
||||
top: 53px; /* match section-header height */
|
||||
padding: 12px 0; /* match info-container-inner margin-top*/
|
||||
top: 53.5px; /* match section-header height */
|
||||
margin-top: 5px;
|
||||
padding: 0px 0 0 0; /* match info-container-inner margin-top*/
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
z-index: 1000;
|
||||
@ -9,5 +10,5 @@
|
||||
|
||||
.edit-bar .buttons-container {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
padding: 10px 0 0 0;
|
||||
}
|
@ -355,6 +355,10 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
|
||||
}
|
||||
</ContainerHeader>
|
||||
<div className="section-body">
|
||||
<InfoBox>
|
||||
{this.props.intro}
|
||||
Can you help us capture and verify this information?
|
||||
</InfoBox>
|
||||
<EditHistoryLatest
|
||||
building={this.props.building}
|
||||
/>
|
||||
@ -410,10 +414,12 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
|
||||
null
|
||||
}
|
||||
</div>
|
||||
|
||||
}
|
||||
</div>
|
||||
: null
|
||||
}
|
||||
<hr/>
|
||||
<WrappedComponent
|
||||
intro={this.props.intro}
|
||||
building={currentBuilding}
|
||||
@ -432,7 +438,9 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
|
||||
</form> :
|
||||
<InfoBox msg="Select a building to view data"></InfoBox>
|
||||
}
|
||||
<hr/>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
);
|
||||
}
|
||||
|
@ -41,13 +41,26 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
|
||||
const { historicData, historicDataSwitchOnClick, darkLightTheme } = useDisplayPreferences();
|
||||
|
||||
const switchToSurvivalMapStyle = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (props.mapColourScale == "survival_status") {
|
||||
props.onMapColourScale('date_year');
|
||||
historicDataSwitchOnClick(e);
|
||||
}
|
||||
else {
|
||||
props.onMapColourScale('survival_status');
|
||||
historicDataSwitchOnClick(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (props.building.date_source == "Expert knowledge of building" ||
|
||||
props.building.date_source == "Expert estimate from image" ||
|
||||
props.building.date_source == null
|
||||
){
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Building Age" collapsed={true} >
|
||||
<DataEntryGroup name="Building age">
|
||||
<YearDataEntry
|
||||
year={props.building.date_year}
|
||||
upper={props.building.date_upper}
|
||||
@ -106,41 +119,181 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
placeholder={dataFields.date_source.example}
|
||||
options={dataFields.date_source.items}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_source"
|
||||
allow_verify={props.user !== undefined && props.building.date_source !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_source")}
|
||||
user_verified_as={props.user_verified.date_source}
|
||||
verified_count={props.building.verified.date_source}
|
||||
{(props.building.date_source == dataFields.date_source.items[0] ||
|
||||
props.building.date_source == dataFields.date_source.items[1] ||
|
||||
props.building.date_source == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.date_link.title}
|
||||
slug="date_link"
|
||||
value={props.building.date_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.date_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<InfoBox>
|
||||
This section is under development.
|
||||
</InfoBox>
|
||||
<DataEntry
|
||||
title="Cladding Date"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Date of Significant Extensions"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Date of Significant Retrofits"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Lifespan and Site History" collapsed={true} >
|
||||
<button className={`map-switcher-inline ${historicData}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={historicDataSwitchOnClick}>
|
||||
{(historicData === 'enabled')?'Click here to hide historical maps':'Click here to show historical maps'}
|
||||
<DataEntryGroup name="Cladding, extensions and retrofits">
|
||||
<NumericDataEntry
|
||||
slug='age_cladding_date'
|
||||
title={dataFields.age_cladding_date.title}
|
||||
value={props.building.age_cladding_date}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="age_cladding_date"
|
||||
allow_verify={props.user !== undefined && props.building.age_cladding_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("age_cladding_date")}
|
||||
user_verified_as={props.user_verified.age_cladding_date}
|
||||
verified_count={props.building.verified.age_cladding_date}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.age_cladding_date_source_type.title}
|
||||
slug="age_cladding_date_source_type"
|
||||
value={props.building.age_cladding_date_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_cladding_date_source_type.tooltip}
|
||||
options={dataFields.age_cladding_date_source_type.items}
|
||||
placeholder={dataFields.age_cladding_date_source_type.example}
|
||||
/>
|
||||
{(props.building.age_cladding_date_source_type == dataFields.age_cladding_date_source_type.items[0] ||
|
||||
props.building.age_cladding_date_source_type == dataFields.age_cladding_date_source_type.items[1] ||
|
||||
props.building.age_cladding_date_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.age_cladding_date_source_links.title}
|
||||
slug="age_cladding_date_source_links"
|
||||
value={props.building.age_cladding_date_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_cladding_date_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<NumericDataEntry
|
||||
slug='age_extension_date'
|
||||
title={dataFields.age_extension_date.title}
|
||||
value={props.building.age_extension_date}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="age_extension_date"
|
||||
allow_verify={props.user !== undefined && props.building.age_extension_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("age_extension_date")}
|
||||
user_verified_as={props.user_verified.age_extension_date}
|
||||
verified_count={props.building.verified.age_extension_date}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.age_extension_date_source_type.title}
|
||||
slug="age_extension_date_source_type"
|
||||
value={props.building.age_extension_date_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_extension_date_source_type.tooltip}
|
||||
options={dataFields.age_extension_date_source_type.items}
|
||||
placeholder={dataFields.age_extension_date_source_type.example}
|
||||
/>
|
||||
{(props.building.age_extension_date_source_type == dataFields.age_extension_date_source_type.items[0] ||
|
||||
props.building.age_extension_date_source_type == dataFields.age_extension_date_source_type.items[1] ||
|
||||
props.building.age_extension_date_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.age_extension_date_source_links.title}
|
||||
slug="age_extension_date_source_links"
|
||||
value={props.building.age_extension_date_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_extension_date_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<NumericDataEntry
|
||||
slug='age_retrofit_date'
|
||||
title={dataFields.age_retrofit_date.title}
|
||||
value={props.building.age_retrofit_date}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="age_retrofit_date"
|
||||
allow_verify={props.user !== undefined && props.building.age_retrofit_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("age_retrofit_date")}
|
||||
user_verified_as={props.user_verified.age_retrofit_date}
|
||||
verified_count={props.building.verified.age_retrofit_date}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.age_retrofit_date_source_type.title}
|
||||
slug="age_retrofit_date_source_type"
|
||||
value={props.building.age_retrofit_date_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_retrofit_date_source_type.tooltip}
|
||||
options={dataFields.age_retrofit_date_source_type.items}
|
||||
placeholder={dataFields.age_retrofit_date_source_type.example}
|
||||
/>
|
||||
{(props.building.age_retrofit_date_source_type == dataFields.age_retrofit_date_source_type.items[0] ||
|
||||
props.building.age_retrofit_date_source_type == dataFields.age_retrofit_date_source_type.items[1] ||
|
||||
props.building.age_retrofit_date_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.age_retrofit_date_source_links.title}
|
||||
slug="age_retrofit_date_source_links"
|
||||
value={props.building.age_retrofit_date_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_retrofit_date_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Lifespan and site history">
|
||||
<button className={`map-switcher-inline ${props.mapColourScale == "survival_status" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToSurvivalMapStyle}>
|
||||
{(props.mapColourScale == "is_domestic")? 'Click here to hide historical maps':'Click here to show historical maps'}
|
||||
</button>
|
||||
<DataEntryGroup collapsed={false} name="Constructions and demolitions on this site" showCount={false}>
|
||||
<DataEntryGroup name="Constructions and demolitions on this site" showCount={false}>
|
||||
<DynamicsBuildingPane>
|
||||
<label>Current building (age data <Link to={ageLinkUrl}>editable here</Link>)</label>
|
||||
<FieldRow>
|
||||
@ -221,18 +374,20 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<InfoBox>
|
||||
<InfoBox type='warning'>
|
||||
This section is under development in collaboration with the historic environment sector.
|
||||
Please let us know your suggestions on the <a href="https://discuss.colouring.london/t/dynamics-category-discussion/107">discussion forum</a>! (external link - save your edits first)
|
||||
</InfoBox>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Survival and Loss tracked using Historical Maps" collapsed={true} >
|
||||
<InfoBox>
|
||||
Can you help us create a map that shows how many buildings in London have survived since the 1890s?
|
||||
Choose a colour to indicate whether the building has survived.
|
||||
</InfoBox>
|
||||
<button className={`map-switcher-inline ${historicData}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={historicDataSwitchOnClick}>
|
||||
{(historicData === 'enabled')?'Click here to hide historical maps':'Click here to show historical maps'}
|
||||
<DataEntryGroup name="Survival and loss tracked using historical maps" collapsed={true} >
|
||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||
<i>
|
||||
Can you help us create a map that shows how many buildings in London have survived since the 1890s?
|
||||
Choose a colour to indicate whether the building has survived.
|
||||
</i>
|
||||
</div>
|
||||
<button className={`map-switcher-inline ${props.mapColourScale == "survival_status" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToSurvivalMapStyle}>
|
||||
{(props.mapColourScale == "is_domestic")? 'Click here to hide historical maps':'Click here to show historical maps'}
|
||||
</button>
|
||||
<SelectDataEntry
|
||||
title={dataFields.survival_status.title}
|
||||
@ -255,13 +410,30 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
placeholder={dataFields.survival_source.example}
|
||||
options={dataFields.survival_source.items}
|
||||
/>
|
||||
{(props.building.survival_source == dataFields.survival_source_links[0] ||
|
||||
props.building.survival_source == dataFields.survival_source_links[1] ||
|
||||
props.building.survival_source == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.survival_source_links.title}
|
||||
slug="survival_source_links"
|
||||
value={props.building.survival_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.survival_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Building Age" collapsed={true} >
|
||||
<DataEntryGroup name="Building age">
|
||||
<YearDataEntry
|
||||
year={props.building.date_year}
|
||||
upper={props.building.date_upper}
|
||||
@ -319,103 +491,181 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
options={dataFields.date_source.items}
|
||||
placeholder={dataFields.date_source.example}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_source"
|
||||
allow_verify={props.user !== undefined && props.building.date_source !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_source")}
|
||||
user_verified_as={props.user_verified.date_source}
|
||||
verified_count={props.building.verified.date_source}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.date_link.title}
|
||||
slug="date_link"
|
||||
value={props.building.date_link}
|
||||
{(props.building.date_source == dataFields.date_source.items[0] ||
|
||||
props.building.date_source == dataFields.date_source.items[1] ||
|
||||
props.building.date_source == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.date_link.title}
|
||||
slug="date_link"
|
||||
value={props.building.date_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.date_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Cladding, extensions and retrofits">
|
||||
<NumericDataEntry
|
||||
slug='age_cladding_date'
|
||||
title={dataFields.age_cladding_date.title}
|
||||
value={props.building.age_cladding_date}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.date_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_link"
|
||||
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
|
||||
slug="age_cladding_date"
|
||||
allow_verify={props.user !== undefined && props.building.age_cladding_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_link")}
|
||||
user_verified_as={props.user_verified.date_link}
|
||||
verified_count={props.building.verified.date_link}
|
||||
user_verified={props.user_verified.hasOwnProperty("age_cladding_date")}
|
||||
user_verified_as={props.user_verified.age_cladding_date}
|
||||
verified_count={props.building.verified.age_cladding_date}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.age_cladding_date_source_type.title}
|
||||
slug="age_cladding_date_source_type"
|
||||
value={props.building.age_cladding_date_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_cladding_date_source_type.tooltip}
|
||||
options={dataFields.age_cladding_date_source_type.items}
|
||||
placeholder={dataFields.age_cladding_date_source_type.example}
|
||||
/>
|
||||
{(props.building.age_cladding_date_source_type == dataFields.age_cladding_date_source_type.items[0] ||
|
||||
props.building.age_cladding_date_source_type == dataFields.age_cladding_date_source_type.items[1] ||
|
||||
props.building.age_cladding_date_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.age_cladding_date_source_links.title}
|
||||
slug="age_cladding_date_source_links"
|
||||
value={props.building.age_cladding_date_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_cladding_date_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<NumericDataEntry
|
||||
slug='age_extension_date'
|
||||
title={dataFields.age_extension_date.title}
|
||||
value={props.building.age_extension_date}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip}
|
||||
/>
|
||||
<InfoBox>
|
||||
This section is under development.
|
||||
</InfoBox>
|
||||
<DataEntry
|
||||
title="Cladding Date"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<Verification
|
||||
slug="date_link"
|
||||
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
|
||||
slug="age_extension_date"
|
||||
allow_verify={props.user !== undefined && props.building.age_extension_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_link")}
|
||||
user_verified_as={props.user_verified.date_link}
|
||||
verified_count={props.building.verified.date_link}
|
||||
user_verified={props.user_verified.hasOwnProperty("age_extension_date")}
|
||||
user_verified_as={props.user_verified.age_extension_date}
|
||||
verified_count={props.building.verified.age_extension_date}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.age_extension_date_source_type.title}
|
||||
slug="age_extension_date_source_type"
|
||||
value={props.building.age_extension_date_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_extension_date_source_type.tooltip}
|
||||
options={dataFields.age_extension_date_source_type.items}
|
||||
placeholder={dataFields.age_extension_date_source_type.example}
|
||||
/>
|
||||
{(props.building.age_extension_date_source_type == dataFields.age_extension_date_source_type.items[0] ||
|
||||
props.building.age_extension_date_source_type == dataFields.age_extension_date_source_type.items[1] ||
|
||||
props.building.age_extension_date_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.age_extension_date_source_links.title}
|
||||
slug="age_extension_date_source_links"
|
||||
value={props.building.age_extension_date_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_extension_date_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<NumericDataEntry
|
||||
slug='age_retrofit_date'
|
||||
title={dataFields.age_retrofit_date.title}
|
||||
value={props.building.age_retrofit_date}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Date of Significant Extensions"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<Verification
|
||||
slug="date_link"
|
||||
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
|
||||
slug="age_retrofit_date"
|
||||
allow_verify={props.user !== undefined && props.building.age_retrofit_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_link")}
|
||||
user_verified_as={props.user_verified.date_link}
|
||||
verified_count={props.building.verified.date_link}
|
||||
user_verified={props.user_verified.hasOwnProperty("age_retrofit_date")}
|
||||
user_verified_as={props.user_verified.age_retrofit_date}
|
||||
verified_count={props.building.verified.age_retrofit_date}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Date of Significant Retrofits"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<Verification
|
||||
slug="date_link"
|
||||
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_link")}
|
||||
user_verified_as={props.user_verified.date_link}
|
||||
verified_count={props.building.verified.date_link}
|
||||
<SelectDataEntry
|
||||
title={dataFields.age_retrofit_date_source_type.title}
|
||||
slug="age_retrofit_date_source_type"
|
||||
value={props.building.age_retrofit_date_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_retrofit_date_source_type.tooltip}
|
||||
options={dataFields.age_retrofit_date_source_type.items}
|
||||
placeholder={dataFields.age_retrofit_date_source_type.example}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
{(props.building.age_retrofit_date_source_type == dataFields.age_retrofit_date_source_type.items[0] ||
|
||||
props.building.age_retrofit_date_source_type == dataFields.age_retrofit_date_source_type.items[1] ||
|
||||
props.building.age_retrofit_date_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.age_retrofit_date_source_links.title}
|
||||
slug="age_retrofit_date_source_links"
|
||||
value={props.building.age_retrofit_date_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.age_retrofit_date_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Lifespan and Site History" collapsed={true} >
|
||||
<button className={`map-switcher-inline ${historicData} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={historicDataSwitchOnClick}>
|
||||
{(historicData === 'enabled')?'Click here to hide historical maps':'Click here to show historical maps'}
|
||||
<DataEntryGroup name="Lifespan and site history">
|
||||
<button className={`map-switcher-inline ${props.mapColourScale == "survival_status" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToSurvivalMapStyle}>
|
||||
{(props.mapColourScale == "is_domestic")? 'Click here to hide historical maps':'Click here to show historical maps'}
|
||||
</button>
|
||||
<DataEntryGroup collapsed={false} name="Constructions and demolitions on this site" showCount={false}>
|
||||
<DataEntryGroup name="Constructions and demolitions on this site" showCount={false}>
|
||||
<DynamicsBuildingPane>
|
||||
<label>Current building (age data <Link to={ageLinkUrl}>editable here</Link>)</label>
|
||||
<FieldRow>
|
||||
@ -496,18 +746,20 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<InfoBox>
|
||||
<InfoBox type='warning'>
|
||||
This section is under development in collaboration with the historic environment sector.
|
||||
Please let us know your suggestions on the <a href="https://discuss.colouring.london/t/dynamics-category-discussion/107">discussion forum</a>! (external link - save your edits first)
|
||||
</InfoBox>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Survival and Loss tracked using Historical Maps" collapsed={true} >
|
||||
<InfoBox>
|
||||
Can you help us create a map that shows how many buildings in London have survived since the 1890s?
|
||||
Choose a colour to indicate whether the building has survived.
|
||||
</InfoBox>
|
||||
<button className={`map-switcher-inline ${historicData}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={historicDataSwitchOnClick}>
|
||||
{(historicData === 'enabled')?'Click here to hide historical maps':'Click here to show historical maps'}
|
||||
<DataEntryGroup name="Survival and loss tracked using historical maps" collapsed={true} >
|
||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||
<i>
|
||||
Can you help us create a map that shows how many buildings in London have survived since the 1890s?
|
||||
Choose a colour to indicate whether the building has survived.
|
||||
</i>
|
||||
</div>
|
||||
<button className={`map-switcher-inline ${props.mapColourScale == "survival_status" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToSurvivalMapStyle}>
|
||||
{(props.mapColourScale == "is_domestic")? 'Click here to hide historical maps':'Click here to show historical maps'}
|
||||
</button>
|
||||
<SelectDataEntry
|
||||
title={dataFields.survival_status.title}
|
||||
@ -529,7 +781,24 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
tooltip={dataFields.survival_source.tooltip}
|
||||
placeholder={dataFields.survival_source.example}
|
||||
options={dataFields.survival_source.items}
|
||||
/>
|
||||
/>
|
||||
{(props.building.survival_source == dataFields.survival_source.items[0] ||
|
||||
props.building.survival_source == dataFields.survival_source.items[1] ||
|
||||
props.building.survival_source == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.survival_source_links.title}
|
||||
slug="survival_source_links"
|
||||
value={props.building.survival_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.survival_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
@ -7,7 +7,6 @@ import { MultiSelectDataEntry } from '../data-components/multi-select-data-entry
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { LogicalDataEntry, LogicalDataEntryYesOnlyWithExplanation } from '../data-components/logical-data-entry/logical-data-entry';
|
||||
import { buildingUserFields, dataFields } from '../../config/data-fields-config';
|
||||
|
||||
@ -40,13 +39,13 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
const { darkLightTheme } = useDisplayPreferences();
|
||||
const worthKeepingReasonsNonEmpty = Object.values(props.building.community_type_worth_keeping_reasons ?? {}).some(x => x);
|
||||
return <>
|
||||
<DataEntryGroup name="Community views on building types" collapsed={false} >
|
||||
<DataEntryGroup name="Community views on building types">
|
||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||
<i>
|
||||
Note: We are currently only collecting data on non-residential buildings.
|
||||
</i>
|
||||
</div>
|
||||
<div className='community-opinion-pane'>
|
||||
<InfoBox>
|
||||
Here we are collecting data on how well you think specific types of building work (rather than individual buildings), to help ensure we save and reuse all useful buildings and to help improve urban design quality in future.
|
||||
</InfoBox>
|
||||
{
|
||||
/*
|
||||
{(props.building.is_domestic === "no" || props.building.is_domestic === "mixed domestic/non-domestic") ?
|
||||
<>
|
||||
<UserOpinionEntry
|
||||
@ -59,12 +58,9 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<button className={`map-switcher-inline ${props.mapColourScale == "likes" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLikesMapStyle}>
|
||||
{(props.mapColourScale == "likes")? 'Showing likes for specific buildings' : 'Click to see likes for specific buildings mapped'}
|
||||
</button>
|
||||
</>
|
||||
: <></>}
|
||||
*/
|
||||
:
|
||||
<></>
|
||||
}
|
||||
<LogicalDataEntryYesOnlyWithExplanation
|
||||
slug='community_type_worth_keeping'
|
||||
@ -78,6 +74,15 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
mode={props.mode}
|
||||
|
||||
/>
|
||||
{(props.mapColourScale == "typology_likes") ?
|
||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
||||
{'Click here to change map to buildings of local interest.'}
|
||||
</button>
|
||||
:
|
||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||
{"Click to return to liked typologies mapped."}
|
||||
</button>
|
||||
}
|
||||
{
|
||||
props.building.community_type_worth_keeping === true &&
|
||||
<MultiSelectDataEntry
|
||||
@ -97,16 +102,7 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
mode={props.mode}
|
||||
/>
|
||||
}
|
||||
{
|
||||
/*
|
||||
<button className={`map-switcher-inline ${props.mapColourScale == "typology_likes" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||
{(props.mapColourScale == "typology_likes")? 'Showing likes for typologies (not about specific buildings)' : 'Click to see views on building typologies'}
|
||||
</button>
|
||||
*/
|
||||
}
|
||||
<hr />
|
||||
|
||||
|
||||
<UserOpinionEntry
|
||||
slug='community_local_significance'
|
||||
title={buildingUserFields.community_local_significance.title}
|
||||
@ -118,15 +114,14 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
copy={props.copy}
|
||||
/>
|
||||
{(props.mapColourScale == "community_local_significance_total") ?
|
||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||
{'Click to return to liked typologies mapped.'}
|
||||
</button>
|
||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||
{'Click to return to liked typologies mapped.'}
|
||||
</button>
|
||||
:
|
||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
||||
{"Click here to change map to buildings of local interest."}
|
||||
</button>
|
||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
||||
{"Click here to change map to buildings of local interest."}
|
||||
</button>
|
||||
}
|
||||
|
||||
<hr />
|
||||
<UserOpinionEntry
|
||||
slug='community_expected_planning_application'
|
||||
@ -139,22 +134,22 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
copy={props.copy}
|
||||
/>
|
||||
{(props.mapColourScale == "community_expected_planning_application_total") ?
|
||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||
{'Click to return to liked typologies mapped.'}
|
||||
</button>
|
||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||
{'Click to return to liked typologies mapped.'}
|
||||
</button>
|
||||
:
|
||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
|
||||
{"Click here to change map to planning applications expected by community."}
|
||||
</button>
|
||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
|
||||
{"Click here to change map to planning applications expected by community."}
|
||||
</button>
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Building use for community activities" collapsed={false} >
|
||||
<InfoBox>
|
||||
Here we are collecting information on the location of buildings used for community activities so we can track loss of/additions to community space over time
|
||||
</InfoBox>
|
||||
<DataEntryGroup name="Building use for community activities">
|
||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||
<i>
|
||||
Here we are collecting information on the location of buildings used for community activities so we can track loss of/additions to community space over time.
|
||||
</i>
|
||||
</div>
|
||||
<LogicalDataEntry
|
||||
slug='community_activities_current'
|
||||
title={dataFields.community_activities_current.title}
|
||||
@ -182,41 +177,23 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
/>
|
||||
{/* TODO: dates */}
|
||||
{
|
||||
// props.building.community_activities === true &&
|
||||
// <FieldRow>
|
||||
// <div>
|
||||
// </div>
|
||||
// <div>
|
||||
// </div>
|
||||
// </FieldRow>
|
||||
}
|
||||
|
||||
<SelectDataEntry
|
||||
slug='community_public_ownership'
|
||||
title={dataFields.community_public_ownership.title}
|
||||
value={props.building.community_public_ownership}
|
||||
options={[
|
||||
'Government-owned',
|
||||
'Charity-owned',
|
||||
'Community-owned/cooperative',
|
||||
'Owned by other non-profit body',
|
||||
'Not in public/community ownership',
|
||||
]}
|
||||
|
||||
options={dataFields.community_public_ownership.items}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="community_public_ownership"
|
||||
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership")}
|
||||
user_verified_as={props.user_verified.community_public_ownership}
|
||||
verified_count={props.building.verified.community_public_ownership}
|
||||
/>
|
||||
slug="community_public_ownership"
|
||||
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership")}
|
||||
user_verified_as={props.user_verified.community_public_ownership}
|
||||
verified_count={props.building.verified.community_public_ownership}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
slug='community_public_ownership_sources'
|
||||
title={dataFields.community_public_ownership_sources.title}
|
||||
@ -229,21 +206,21 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="community_public_ownership_sources"
|
||||
allow_verify={props.user !== undefined && props.building.community_public_ownership_sources !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership_sources")}
|
||||
user_verified_as={props.user_verified.community_public_ownership_sources}
|
||||
verified_count={props.building.verified.community_public_ownership_sources}
|
||||
/>
|
||||
slug="community_public_ownership_sources"
|
||||
allow_verify={props.user !== undefined && props.building.community_public_ownership_sources !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership_sources")}
|
||||
user_verified_as={props.user_verified.community_public_ownership_sources}
|
||||
verified_count={props.building.verified.community_public_ownership_sources}
|
||||
/>
|
||||
{(props.mapColourScale == "community_in_public_ownership") ?
|
||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||
{'Click to return to liked typologies mapped.'}
|
||||
</button>
|
||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||
{'Click to return to liked typologies mapped.'}
|
||||
</button>
|
||||
:
|
||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToPublicOwnershipMapStyle}>
|
||||
{"Click here to see ownership type mapped."}
|
||||
</button>
|
||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToPublicOwnershipMapStyle}>
|
||||
{"Click here to see ownership type mapped."}
|
||||
</button>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
</>
|
||||
|
@ -7,6 +7,8 @@ import withCopyEdit from '../data-container';
|
||||
import Verification from '../data-components/verification';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
|
||||
const ConstructionMaterialsOptions = [
|
||||
'Wood',
|
||||
@ -36,59 +38,63 @@ const RoofCoveringOptions = [
|
||||
const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
return (
|
||||
<Fragment>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_core_material.title}
|
||||
slug="construction_core_material"
|
||||
value={props.building.construction_core_material}
|
||||
tooltip={dataFields.construction_core_material.tooltip}
|
||||
options={ConstructionMaterialsOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="construction_core_material"
|
||||
allow_verify={props.user !== undefined && props.building.construction_core_material !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("construction_core_material")}
|
||||
user_verified_as={props.user_verified.construction_core_material}
|
||||
verified_count={props.building.verified.construction_core_material}
|
||||
<DataEntryGroup name="Materials">
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_core_material.title}
|
||||
slug="construction_core_material"
|
||||
value={props.building.construction_core_material}
|
||||
tooltip={dataFields.construction_core_material.tooltip}
|
||||
options={ConstructionMaterialsOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_secondary_materials.title}
|
||||
disabled={true}
|
||||
slug="construction_secondary_materials"
|
||||
value={props.building.construction_secondary_materials}
|
||||
tooltip={dataFields.construction_secondary_materials.tooltip}
|
||||
options={ConstructionMaterialsOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_roof_covering.title}
|
||||
slug="construction_roof_covering"
|
||||
value={props.building.construction_roof_covering}
|
||||
tooltip={dataFields.construction_roof_covering.tooltip}
|
||||
options={RoofCoveringOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="construction_roof_covering"
|
||||
allow_verify={props.user !== undefined && props.building.construction_roof_covering !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("construction_roof_covering")}
|
||||
user_verified_as={props.user_verified.construction_roof_covering}
|
||||
verified_count={props.building.verified.construction_roof_covering}
|
||||
<Verification
|
||||
slug="construction_core_material"
|
||||
allow_verify={props.user !== undefined && props.building.construction_core_material !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("construction_core_material")}
|
||||
user_verified_as={props.user_verified.construction_core_material}
|
||||
verified_count={props.building.verified.construction_core_material}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_secondary_materials.title}
|
||||
disabled={true}
|
||||
slug="construction_secondary_materials"
|
||||
value={props.building.construction_secondary_materials}
|
||||
tooltip={dataFields.construction_secondary_materials.tooltip}
|
||||
options={ConstructionMaterialsOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Construction system type"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_roof_covering.title}
|
||||
slug="construction_roof_covering"
|
||||
value={props.building.construction_roof_covering}
|
||||
tooltip={dataFields.construction_roof_covering.tooltip}
|
||||
options={RoofCoveringOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="construction_roof_covering"
|
||||
allow_verify={props.user !== undefined && props.building.construction_roof_covering !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("construction_roof_covering")}
|
||||
user_verified_as={props.user_verified.construction_roof_covering}
|
||||
verified_count={props.building.verified.construction_roof_covering}
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Construction sectors">
|
||||
<DataEntry
|
||||
title="Construction system type"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
|
172
app/src/frontend/building/data-containers/energy-performance.tsx
Normal file
172
app/src/frontend/building/data-containers/energy-performance.tsx
Normal file
@ -0,0 +1,172 @@
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import Verification from '../data-components/verification';
|
||||
import withCopyEdit from '../data-container';
|
||||
import InfoBox from '../../components/info-box';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||
|
||||
const EnergyCategoryOptions = ["A", "B", "C", "D", "E", "F", "G"];
|
||||
const BreeamRatingOptions = [
|
||||
'Outstanding',
|
||||
'Excellent',
|
||||
'Very good',
|
||||
'Good',
|
||||
'Pass',
|
||||
'Unclassified'
|
||||
];
|
||||
/**
|
||||
* Sustainability view/edit section
|
||||
*/
|
||||
const SustainabilityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Energy rating data">
|
||||
<SelectDataEntry
|
||||
title={dataFields.sust_breeam_rating.title}
|
||||
slug="sust_breeam_rating"
|
||||
value={props.building.sust_breeam_rating}
|
||||
tooltip={dataFields.sust_breeam_rating.tooltip}
|
||||
options={BreeamRatingOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="sust_breeam_rating"
|
||||
allow_verify={props.user !== undefined && props.building.sust_breeam_rating !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("sust_breeam_rating")}
|
||||
user_verified_as={props.user_verified.sust_breeam_rating}
|
||||
verified_count={props.building.verified.sust_breeam_rating}
|
||||
/>
|
||||
|
||||
<SelectDataEntry
|
||||
title={dataFields.sust_dec.title}
|
||||
slug="sust_dec"
|
||||
value={props.building.sust_dec}
|
||||
tooltip={dataFields.sust_dec.tooltip}
|
||||
options={EnergyCategoryOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="sust_dec"
|
||||
allow_verify={props.user !== undefined && props.building.sust_dec !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("sust_dec")}
|
||||
user_verified_as={props.user_verified.sust_dec}
|
||||
verified_count={props.building.verified.sust_dec}
|
||||
/>
|
||||
|
||||
<SelectDataEntry
|
||||
title={dataFields.sust_aggregate_estimate_epc.title}
|
||||
slug="sust_aggregate_estimate_epc"
|
||||
value={props.building.sust_aggregate_estimate_epc}
|
||||
tooltip={dataFields.sust_aggregate_estimate_epc.tooltip}
|
||||
options={EnergyCategoryOptions}
|
||||
disabled={true}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Retrofit Data">
|
||||
<NumericDataEntry
|
||||
title={dataFields.sust_retrofit_date.title}
|
||||
slug="sust_retrofit_date"
|
||||
value={props.building.sust_retrofit_date}
|
||||
tooltip={dataFields.sust_retrofit_date.tooltip}
|
||||
step={1}
|
||||
min={1086}
|
||||
max={new Date().getFullYear()}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="sust_retrofit_date"
|
||||
allow_verify={props.user !== undefined && props.building.sust_retrofit_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("sust_retrofit_date")}
|
||||
user_verified_as={props.user_verified.sust_retrofit_date}
|
||||
verified_count={props.building.verified.sust_retrofit_date}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.sust_retrofit_source_type.title}
|
||||
slug="sust_retrofit_source_type"
|
||||
value={props.building.sust_retrofit_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.sust_retrofit_source_type.tooltip}
|
||||
options={dataFields.sust_retrofit_source_type.items}
|
||||
placeholder={dataFields.sust_retrofit_source_type.example}
|
||||
/>
|
||||
{(props.building.sust_retrofit_source_type == dataFields.sust_retrofit_source_type.items[0] ||
|
||||
props.building.sust_retrofit_source_type == dataFields.sust_retrofit_source_type.items[1] ||
|
||||
props.building.sust_retrofit_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.sust_retrofit_source_links.title}
|
||||
slug="sust_retrofit_source_links"
|
||||
value={props.building.sust_retrofit_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.sust_retrofit_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
{/* <hr/>
|
||||
<DataEntry
|
||||
title="Date of Significant Retrofits"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<Verification
|
||||
slug="date_link"
|
||||
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_link")}
|
||||
user_verified_as={props.user_verified.date_link}
|
||||
verified_count={props.building.verified.date_link}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/> */}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Other sustainability features">
|
||||
<DataEntry
|
||||
title="Does the building have Solar Panels?"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Does the building have Green Walls / Green Roof"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
const SustainabilityContainer = withCopyEdit(SustainabilityView);
|
||||
|
||||
export default SustainabilityContainer;
|
167
app/src/frontend/building/data-containers/land-use.tsx
Normal file
167
app/src/frontend/building/data-containers/land-use.tsx
Normal file
@ -0,0 +1,167 @@
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry';
|
||||
import TextboxDataEntry from '../data-components/textbox-data-entry';
|
||||
import withCopyEdit from '../data-container';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import Verification from '../data-components/verification';
|
||||
import { useDisplayPreferences } from '../../displayPreferences-context';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
|
||||
/**
|
||||
* Use view/edit section
|
||||
*/
|
||||
const UseView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
const switchToIsDomesticMapStyle = (e) => {
|
||||
e.preventDefault();
|
||||
|
||||
if (props.mapColourScale == "is_domestic") {
|
||||
props.onMapColourScale('landuse');
|
||||
}
|
||||
else {
|
||||
props.onMapColourScale('is_domestic');
|
||||
}
|
||||
}
|
||||
|
||||
const { darkLightTheme } = useDisplayPreferences();
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Residential/non-residential land use data (general)">
|
||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||
<i>
|
||||
The vast majority of properties are residential (93% in the UK), so we have set 'residential' as the default value. Can you help us identify non-residential and mixed use buildings (and verify residential buildings too)?
|
||||
</i>
|
||||
</div>
|
||||
<button className={`map-switcher-inline ${props.mapColourScale == "is_domestic" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToIsDomesticMapStyle}>
|
||||
{(props.mapColourScale == "is_domestic")? 'Showing domestic, non-domestic and mixed-use buildings (click to hide)' : 'Click to see domestic, non-domestic and mixed-use buildings on the map.'}
|
||||
</button>
|
||||
<SelectDataEntry
|
||||
title={dataFields.is_domestic.title}
|
||||
slug="is_domestic"
|
||||
value={props.building.is_domestic}
|
||||
options={dataFields.is_domestic.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.is_domestic.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="is_domestic"
|
||||
allow_verify={props.user !== undefined && props.building.is_domestic !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("is_domestic")}
|
||||
user_verified_as={props.user_verified.is_domestic}
|
||||
verified_count={props.building.verified.is_domestic}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.is_domestic_source.title}
|
||||
slug="is_domestic_source"
|
||||
value={props.building.is_domestic_source}
|
||||
options={dataFields.is_domestic_source.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.is_domestic_source.tooltip}
|
||||
/>
|
||||
{(props.building.is_domestic_source == commonSourceTypes[0] ||
|
||||
props.building.is_domestic_source == commonSourceTypes[1] ||
|
||||
props.building.is_domestic_source == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.is_domestic_links.title}
|
||||
slug="is_domestic_links"
|
||||
value={props.building.is_domestic_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.is_domestic_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Specific land use data">
|
||||
<MultiDataEntry
|
||||
title={dataFields.current_landuse_group.title}
|
||||
slug="current_landuse_group"
|
||||
value={props.building.current_landuse_group}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
confirmOnEnter={true}
|
||||
tooltip={dataFields.current_landuse_group.tooltip}
|
||||
placeholder="Type new land use group here"
|
||||
copyable={true}
|
||||
autofill={true}
|
||||
showAllOptionsOnEmpty={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="current_landuse_group"
|
||||
allow_verify={props.user !== undefined && props.building.current_landuse_group !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("current_landuse_group")}
|
||||
user_verified_as={props.user_verified.current_landuse_group && props.user_verified.current_landuse_group.join(", ")}
|
||||
verified_count={props.building.verified.current_landuse_group}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.current_landuse_source.title}
|
||||
slug="current_landuse_source"
|
||||
value={props.building.current_landuse_source}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.current_landuse_source.tooltip}
|
||||
placeholder={dataFields.current_landuse_source.example}
|
||||
options={dataFields.current_landuse_source.items}
|
||||
/>
|
||||
{(props.building.current_landuse_source == "Expert/personal knowledge of building" ||
|
||||
props.building.current_landuse_source == "Online streetview image" ||
|
||||
props.building.current_landuse_source == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.current_landuse_link.title}
|
||||
slug="current_landuse_link"
|
||||
value={props.building.current_landuse_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.current_landuse_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
{
|
||||
props.mode != 'view' &&
|
||||
<div>
|
||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||
<i>
|
||||
Below is a more general classification for the land use of this building, automatically derived from the information above.
|
||||
</i>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<DataEntry
|
||||
title={dataFields.current_landuse_order.title}
|
||||
tooltip={dataFields.current_landuse_order.tooltip}
|
||||
slug="current_landuse_order"
|
||||
value={props.building.current_landuse_order}
|
||||
mode={props.mode}
|
||||
disabled={true}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
const UseContainer = withCopyEdit(UseView);
|
||||
|
||||
export default UseContainer;
|
@ -1,206 +1,283 @@
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
import UPRNsDataEntry from '../data-components/uprns-data-entry';
|
||||
import Verification from '../data-components/verification';
|
||||
import withCopyEdit from '../data-container';
|
||||
import { PatternDataEntry } from '../data-components/pattern-data-entry';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||
|
||||
const locationNumberPattern = "[1-9]\\d*[a-z]?(-([1-9]\\d*))?"; ///[1-9]\d*[a-z]?(-([1-9]\d*))?/;
|
||||
|
||||
const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
<Fragment>
|
||||
<DataEntry
|
||||
title={dataFields.location_name.title}
|
||||
slug="location_name"
|
||||
value={props.building.location_name}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.location_name.tooltip}
|
||||
placeholder="https://..."
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_name"
|
||||
allow_verify={props.user !== undefined && props.building.location_name !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_name")}
|
||||
user_verified_as={props.user_verified.location_name}
|
||||
verified_count={props.building.verified.location_name}
|
||||
/>
|
||||
|
||||
<PatternDataEntry
|
||||
title={dataFields.location_number.title}
|
||||
slug="location_number"
|
||||
value={props.building.location_number}
|
||||
pattern={locationNumberPattern}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.location_number.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_number"
|
||||
allow_verify={props.user !== undefined && props.building.location_number !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_number")}
|
||||
user_verified_as={props.user_verified.location_number}
|
||||
verified_count={props.building.verified.location_number}
|
||||
/>
|
||||
|
||||
<DataEntry
|
||||
title={dataFields.location_street.title}
|
||||
slug="location_street"
|
||||
value={props.building.location_street}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
maxLength={30}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_street"
|
||||
allow_verify={props.user !== undefined && props.building.location_street !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_street")}
|
||||
user_verified_as={props.user_verified.location_street}
|
||||
verified_count={props.building.verified.location_street}
|
||||
/>
|
||||
|
||||
<DataEntry
|
||||
title={dataFields.location_line_two.title}
|
||||
slug="location_line_two"
|
||||
value={props.building.location_line_two}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
maxLength={30}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_line_two"
|
||||
allow_verify={props.user !== undefined && props.building.location_line_two !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_line_two")}
|
||||
user_verified_as={props.user_verified.location_line_two}
|
||||
verified_count={props.building.verified.location_line_two}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.location_town.title}
|
||||
slug="location_town"
|
||||
value={props.building.location_town}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
|
||||
/>
|
||||
<Verification
|
||||
slug="location_town"
|
||||
allow_verify={props.user !== undefined && props.building.location_town !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_town")}
|
||||
user_verified_as={props.user_verified.location_town}
|
||||
verified_count={props.building.verified.location_town}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.location_postcode.title}
|
||||
slug="location_postcode"
|
||||
value={props.building.location_postcode}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
maxLength={8}
|
||||
valueTransform={x=>x.toUpperCase()}
|
||||
|
||||
/>
|
||||
<Verification
|
||||
slug="location_postcode"
|
||||
allow_verify={props.user !== undefined && props.building.location_postcode !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_postcode")}
|
||||
user_verified_as={props.user_verified.location_postcode}
|
||||
verified_count={props.building.verified.location_postcode}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.ref_toid.title}
|
||||
slug="ref_toid"
|
||||
value={props.building.ref_toid}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
tooltip={dataFields.ref_toid.tooltip}
|
||||
onChange={props.onChange}
|
||||
|
||||
/>
|
||||
<UPRNsDataEntry
|
||||
title={dataFields.uprns.title}
|
||||
slug="ref_uprns"
|
||||
value={props.building.uprns}
|
||||
tooltip={dataFields.uprns.tooltip}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.ref_osm_id.title}
|
||||
slug="ref_osm_id"
|
||||
value={props.building.ref_osm_id}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
tooltip={dataFields.ref_osm_id.tooltip}
|
||||
maxLength={20}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="ref_osm_id"
|
||||
allow_verify={props.user !== undefined && props.building.ref_osm_id !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("ref_osm_id")}
|
||||
user_verified_as={props.user_verified.ref_osm_id}
|
||||
verified_count={props.building.verified.ref_osm_id}
|
||||
/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.location_latitude.title}
|
||||
slug="location_latitude"
|
||||
value={props.building.location_latitude}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
step={0.00001}
|
||||
min={-90}
|
||||
max={90}
|
||||
placeholder="Latitude, e.g. 51.5467"
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_latitude"
|
||||
allow_verify={props.user !== undefined && props.building.location_latitude !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_latitude")}
|
||||
user_verified_as={props.user_verified.location_latitude}
|
||||
verified_count={props.building.verified.location_latitude}
|
||||
/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.location_longitude.title}
|
||||
slug="location_longitude"
|
||||
value={props.building.location_longitude}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
step={0.00001}
|
||||
min={-180}
|
||||
max={180}
|
||||
placeholder="Longitude, e.g. -0.0586"
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_longitude"
|
||||
allow_verify={props.user !== undefined && props.building.location_longitude !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_longitude")}
|
||||
user_verified_as={props.user_verified.location_longitude}
|
||||
verified_count={props.building.verified.location_longitude}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
const osm_url = "https://www.openstreetmap.org/way/"+props.building.ref_osm_id;
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Address data">
|
||||
<DataEntry
|
||||
title={dataFields.location_name.title}
|
||||
slug="location_name"
|
||||
value={props.building.location_name}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.location_name.tooltip}
|
||||
placeholder="https://..."
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_name"
|
||||
allow_verify={props.user !== undefined && props.building.location_name !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_name")}
|
||||
user_verified_as={props.user_verified.location_name}
|
||||
verified_count={props.building.verified.location_name}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Building name (domestic)"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip="Not yet activated.<br><br>For security reasons, we do not allow the use of free text boxes and are currently looking into alternative ways to collect this data."
|
||||
/>
|
||||
<hr/>
|
||||
<PatternDataEntry
|
||||
title={dataFields.location_number.title}
|
||||
slug="location_number"
|
||||
value={props.building.location_number}
|
||||
pattern={locationNumberPattern}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.location_number.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_number"
|
||||
allow_verify={props.user !== undefined && props.building.location_number !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_number")}
|
||||
user_verified_as={props.user_verified.location_number}
|
||||
verified_count={props.building.verified.location_number}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.location_street.title}
|
||||
slug="location_street"
|
||||
value={props.building.location_street}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
maxLength={30}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_street"
|
||||
allow_verify={props.user !== undefined && props.building.location_street !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_street")}
|
||||
user_verified_as={props.user_verified.location_street}
|
||||
verified_count={props.building.verified.location_street}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.location_line_two.title}
|
||||
slug="location_line_two"
|
||||
value={props.building.location_line_two}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
maxLength={30}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_line_two"
|
||||
allow_verify={props.user !== undefined && props.building.location_line_two !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_line_two")}
|
||||
user_verified_as={props.user_verified.location_line_two}
|
||||
verified_count={props.building.verified.location_line_two}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.location_town.title}
|
||||
slug="location_town"
|
||||
value={props.building.location_town}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_town"
|
||||
allow_verify={props.user !== undefined && props.building.location_town !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_town")}
|
||||
user_verified_as={props.user_verified.location_town}
|
||||
verified_count={props.building.verified.location_town}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.location_postcode.title}
|
||||
slug="location_postcode"
|
||||
value={props.building.location_postcode}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
maxLength={8}
|
||||
valueTransform={x=>x.toUpperCase()}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_postcode"
|
||||
allow_verify={props.user !== undefined && props.building.location_postcode !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_postcode")}
|
||||
user_verified_as={props.user_verified.location_postcode}
|
||||
verified_count={props.building.verified.location_postcode}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.location_address_source.title}
|
||||
slug="location_address_source"
|
||||
value={props.building.location_address_source}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.location_address_source.tooltip}
|
||||
placeholder={dataFields.location_address_source.example}
|
||||
options={dataFields.location_address_source.items}
|
||||
/>
|
||||
{(props.building.location_address_source == commonSourceTypes[0] ||
|
||||
props.building.location_address_source == commonSourceTypes[1] ||
|
||||
props.building.location_address_source == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.location_address_links.title}
|
||||
slug="location_address_links"
|
||||
value={props.building.location_address_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.location_address_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Property/footprint IDs and coordinate data">
|
||||
<DataEntry
|
||||
title={dataFields.ref_toid.title}
|
||||
slug="ref_toid"
|
||||
value={props.building.ref_toid}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
tooltip={dataFields.ref_toid.tooltip}
|
||||
onChange={props.onChange}
|
||||
disabled={true}
|
||||
/>
|
||||
<UPRNsDataEntry
|
||||
title={dataFields.uprns.title}
|
||||
slug="ref_uprns"
|
||||
value={props.building.uprns}
|
||||
tooltip={dataFields.uprns.tooltip}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.ref_osm_id.title}
|
||||
slug="ref_osm_id"
|
||||
value={props.building.ref_osm_id}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
tooltip={dataFields.ref_osm_id.tooltip}
|
||||
maxLength={20}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
{
|
||||
(props.building.ref_osm_id == null) ? <></> :
|
||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
|
||||
<i className="source-url">Source: <a href={osm_url} target={"_blank"}>{osm_url}</a></i>
|
||||
</div>
|
||||
}
|
||||
<Verification
|
||||
slug="ref_osm_id"
|
||||
allow_verify={props.user !== undefined && props.building.ref_osm_id !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("ref_osm_id")}
|
||||
user_verified_as={props.user_verified.ref_osm_id}
|
||||
verified_count={props.building.verified.ref_osm_id}
|
||||
/>
|
||||
<hr/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.location_latitude.title}
|
||||
slug="location_latitude"
|
||||
value={props.building.location_latitude}
|
||||
tooltip={dataFields.location_latitude.tooltip}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
step={0.00001}
|
||||
min={-90}
|
||||
max={90}
|
||||
placeholder="Latitude, e.g. 51.5467"
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_latitude"
|
||||
allow_verify={props.user !== undefined && props.building.location_latitude !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_latitude")}
|
||||
user_verified_as={props.user_verified.location_latitude}
|
||||
verified_count={props.building.verified.location_latitude}
|
||||
/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.location_longitude.title}
|
||||
slug="location_longitude"
|
||||
value={props.building.location_longitude}
|
||||
tooltip={dataFields.location_latitude.tooltip}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
step={0.00001}
|
||||
min={-180}
|
||||
max={180}
|
||||
placeholder="Longitude, e.g. -0.0586"
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="location_longitude"
|
||||
allow_verify={props.user !== undefined && props.building.location_longitude !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("location_longitude")}
|
||||
user_verified_as={props.user_verified.location_longitude}
|
||||
verified_count={props.building.verified.location_longitude}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.location_coordinates_source.title}
|
||||
slug="location_coordinates_source"
|
||||
value={props.building.location_coordinates_source}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.location_coordinates_source.tooltip}
|
||||
placeholder={dataFields.location_coordinates_source.example}
|
||||
options={dataFields.location_coordinates_source.items}
|
||||
/>
|
||||
{(props.building.location_coordinates_source == commonSourceTypes[0] ||
|
||||
props.building.location_coordinates_source == commonSourceTypes[1] ||
|
||||
props.building.location_coordinates_source == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.location_coordinates_links.title}
|
||||
slug="location_coordinates_links"
|
||||
value={props.building.location_coordinates_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.location_coordinates_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
const LocationContainer = withCopyEdit(LocationView);
|
||||
|
||||
export default LocationContainer;
|
||||
|
@ -66,7 +66,7 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Planning application information" collapsed={true} >
|
||||
<DataEntryGroup name="Current/active applications (official data)" collapsed={false} >
|
||||
<DataEntryGroup name="Current/active applications (official data)">
|
||||
<InfoBox>
|
||||
This section provides data on active applications. We define these as applications with any activity in the last year.
|
||||
<br />
|
||||
|
@ -1,102 +1,213 @@
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import React, { useState } from 'react';
|
||||
import InfoBox from '../../components/info-box';
|
||||
|
||||
import { Category } from '../../config/categories-config';
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
import { DynamicsBuildingPane, DynamicsDataEntry } from './dynamics/dynamics-data-entry';
|
||||
import { FieldRow } from '../data-components/field-row';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import withCopyEdit from '../data-container';
|
||||
|
||||
import Verification from '../data-components/verification';
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry';
|
||||
import { useDisplayPreferences } from '../../displayPreferences-context';
|
||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||
import DatePicker from "react-datepicker";
|
||||
|
||||
import "react-datepicker/dist/react-datepicker.css";
|
||||
|
||||
/**
|
||||
* Dynamics view/edit section
|
||||
*/
|
||||
const ResilienceView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
|
||||
const [ startDate, setStartDate ] = useState(null);
|
||||
const [ endDate, setEndDate ] = useState(null);
|
||||
|
||||
return (<>
|
||||
<InfoBox>
|
||||
This section is under development.
|
||||
</InfoBox>
|
||||
<DataEntry
|
||||
title="Building age"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Typical typology lifespan"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Typology adaptability rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Physical adaptability rating - within plot"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Landuse adaptability rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Structural material lifespan rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Protection from demolition rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Flood risk rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Surface geology type"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Average community value rating for typology"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Other rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Total resilience rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntryGroup name="Building damage assessment tool" collapsed={true}>
|
||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||
<i>
|
||||
This feature is designed as an assessment tool to help communities capture data on the state of buildings following major disasters.
|
||||
It is intended to help support emergency services, to record damage, and to aid reconstruction programmes.
|
||||
</i>
|
||||
</div>
|
||||
<label>Date of disaster</label>
|
||||
<div>
|
||||
<DatePicker
|
||||
showIcon
|
||||
dateFormat="dd/MM/yyyy"
|
||||
slug="disaster_start_date"
|
||||
selected={startDate}
|
||||
onChange={(date) => setStartDate(date)}
|
||||
title={dataFields.disaster_start_date.title}
|
||||
//value={props.building.disaster_start_date}
|
||||
isClearable
|
||||
placeholderText="Select start date"
|
||||
maxDate={new Date()}
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<DatePicker
|
||||
showIcon
|
||||
dateFormat="dd/MM/yyyy"
|
||||
slug="disaster_end_date"
|
||||
selected={endDate}
|
||||
onChange={(date) => setEndDate(date)}
|
||||
title={dataFields.disaster_end_date.title}
|
||||
//value={props.building.disaster_end_date}
|
||||
isClearable
|
||||
placeholderText="Select end date"
|
||||
maxDate={new Date()}
|
||||
/>
|
||||
</div>
|
||||
<Verification
|
||||
slug="disaster_end_date"
|
||||
allow_verify={props.user !== undefined && props.building.disaster_end_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("disaster_end_date")}
|
||||
user_verified_as={props.user_verified.disaster_end_date}
|
||||
verified_count={props.building.verified.disaster_end_date}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
slug='disaster_type'
|
||||
title={dataFields.disaster_type.title}
|
||||
value={props.building.disaster_type}
|
||||
options={dataFields.disaster_type.items}
|
||||
tooltip={dataFields.disaster_type.tooltip}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="disaster_type"
|
||||
allow_verify={props.user !== undefined && props.building.disaster_type !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("disaster_type")}
|
||||
user_verified_as={props.user_verified.disaster_type}
|
||||
verified_count={props.building.verified.disaster_type}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
slug='disaster_severity'
|
||||
title={dataFields.disaster_severity.title}
|
||||
value={props.building.disaster_severity}
|
||||
options={dataFields.disaster_severity.items}
|
||||
tooltip={dataFields.disaster_severity.tooltip}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="disaster_severity"
|
||||
allow_verify={props.user !== undefined && props.building.disaster_severity !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("disaster_severity")}
|
||||
user_verified_as={props.user_verified.disaster_severity}
|
||||
verified_count={props.building.verified.disaster_severity}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
slug='disaster_assessment_method'
|
||||
title={dataFields.disaster_assessment_method.title}
|
||||
value={props.building.disaster_assessment_method}
|
||||
options={dataFields.disaster_assessment_method.items}
|
||||
tooltip={dataFields.disaster_assessment_method.tooltip}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
{(props.building.disaster_assessment_method == dataFields.disaster_assessment_method.items[0] ||
|
||||
props.building.disaster_assessment_method == dataFields.disaster_assessment_method.items[1] ||
|
||||
props.building.disaster_assessment_method == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.disaster_source_link.title}
|
||||
slug="disaster_source_link"
|
||||
value={props.building.disaster_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.disaster_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Resilience indicators and risk assessment" collapsed={true} >
|
||||
<InfoBox type='warning'>
|
||||
This section is under development.
|
||||
</InfoBox>
|
||||
<DataEntry
|
||||
title="Building age"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Typical typology lifespan"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Typology adaptability rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Physical adaptability rating - within plot"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Landuse adaptability rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Structural material lifespan rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Protection from demolition rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Flood risk rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Surface geology type"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Average community value rating for typology"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Other rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Total resilience rating"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
</>)
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
@ -9,13 +9,15 @@ import Verification from '../data-components/verification';
|
||||
import withCopyEdit from '../data-container';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||
|
||||
/**
|
||||
* Size view/edit section
|
||||
*/
|
||||
const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Floors">
|
||||
<DataEntryGroup name="Number of floors/storeys">
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_storeys_core.title}
|
||||
slug="size_storeys_core"
|
||||
@ -35,7 +37,6 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.size_storeys_core}
|
||||
verified_count={props.building.verified.size_storeys_core}
|
||||
/>
|
||||
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_storeys_attic.title}
|
||||
slug="size_storeys_attic"
|
||||
@ -55,7 +56,6 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.size_storeys_attic}
|
||||
verified_count={props.building.verified.size_storeys_attic}
|
||||
/>
|
||||
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_storeys_basement.title}
|
||||
slug="size_storeys_basement"
|
||||
@ -75,9 +75,35 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.size_storeys_basement}
|
||||
verified_count={props.building.verified.size_storeys_basement}
|
||||
/>
|
||||
|
||||
<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}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.size_storeys_source_type.tooltip}
|
||||
/>
|
||||
{(props.building.size_storeys_source_type == commonSourceTypes[0] ||
|
||||
props.building.size_storeys_source_type == commonSourceTypes[1] ||
|
||||
props.building.size_storeys_source_type == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.size_storeys_source_links.title}
|
||||
slug="size_storeys_source_links"
|
||||
value={props.building.size_storeys_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.size_storeys_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Height" collapsed={false}>
|
||||
<DataEntryGroup name="Building height data">
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_height_apex.title}
|
||||
slug="size_height_apex"
|
||||
@ -96,11 +122,37 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.size_height_apex}
|
||||
verified_count={props.building.verified.size_height_apex}
|
||||
/>
|
||||
|
||||
<SelectDataEntry
|
||||
title={dataFields.size_height_apex_source_type.title}
|
||||
slug="size_height_apex_source_type"
|
||||
value={props.building.size_height_apex_source_type}
|
||||
options={dataFields.size_height_apex_source_type.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.size_height_apex_source_type.tooltip}
|
||||
/>
|
||||
{(props.building.size_height_apex_source_type == commonSourceTypes[0] ||
|
||||
props.building.size_height_apex_source_type == commonSourceTypes[1] ||
|
||||
props.building.size_height_apex_source_type == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.size_height_apex_source_links.title}
|
||||
slug="size_height_apex_source_links"
|
||||
value={props.building.size_height_apex_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.size_height_apex_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_height_eaves.title}
|
||||
slug="size_height_eaves"
|
||||
disabled={true}
|
||||
value={props.building.size_height_eaves}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
@ -108,8 +160,43 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
step={0.1}
|
||||
min={0}
|
||||
/>
|
||||
<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}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.size_height_eaves_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Floor area">
|
||||
<DataEntryGroup name="Floor area data">
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_floor_area_ground.title}
|
||||
slug="size_floor_area_ground"
|
||||
@ -128,7 +215,6 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.size_floor_area_ground}
|
||||
verified_count={props.building.verified.size_floor_area_ground}
|
||||
/>
|
||||
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_floor_area_total.title}
|
||||
slug="size_floor_area_total"
|
||||
@ -147,33 +233,221 @@ const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
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}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.size_floor_area_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<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}
|
||||
<DataEntryGroup name="Plot size data">
|
||||
<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}
|
||||
/>
|
||||
<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}
|
||||
{(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}
|
||||
/>
|
||||
|
||||
<DataEntry
|
||||
title="Total opening area"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<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://..."
|
||||
isUrl={true}
|
||||
/>
|
||||
<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}
|
||||
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);
|
||||
|
349
app/src/frontend/building/data-containers/street-context.tsx
Normal file
349
app/src/frontend/building/data-containers/street-context.tsx
Normal file
@ -0,0 +1,349 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
|
||||
import withCopyEdit from '../data-container';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import Verification from '../data-components/verification';
|
||||
|
||||
/**
|
||||
* Streetscape view/edit section
|
||||
*/
|
||||
const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Does the building have a garden?">
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_front_garden.title}
|
||||
slug="context_front_garden"
|
||||
value={props.building.context_front_garden}
|
||||
options={dataFields.context_front_garden.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_front_garden.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="context_front_garden"
|
||||
allow_verify={props.user !== undefined && props.building.context_front_garden !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("context_front_garden")}
|
||||
user_verified_as={props.user_verified.context_front_garden}
|
||||
verified_count={props.building.verified.context_front_garden}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_back_garden.title}
|
||||
slug="context_back_garden"
|
||||
value={props.building.context_back_garden}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_back_garden.tooltip}
|
||||
//placeholder={dataFields.context_back_garden.example}
|
||||
options={dataFields.context_back_garden.items}
|
||||
/>
|
||||
<Verification
|
||||
slug="context_back_garden"
|
||||
allow_verify={props.user !== undefined && props.building.context_back_garden !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("context_back_garden")}
|
||||
user_verified_as={props.user_verified.context_back_garden}
|
||||
verified_count={props.building.verified.context_back_garden}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_flats_garden.title}
|
||||
slug="context_flats_garden"
|
||||
value={props.building.context_flats_garden}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_flats_garden.tooltip}
|
||||
//placeholder={dataFields.context_flats_garden.example}
|
||||
options={dataFields.context_flats_garden.items}
|
||||
/>
|
||||
<Verification
|
||||
slug="context_flats_garden"
|
||||
allow_verify={props.user !== undefined && props.building.context_flats_garden !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("context_flats_garden")}
|
||||
user_verified_as={props.user_verified.context_flats_garden}
|
||||
verified_count={props.building.verified.context_flats_garden}
|
||||
/>
|
||||
<hr/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_garden_source_type.title}
|
||||
slug="context_garden_source_type"
|
||||
value={props.building.context_garden_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_garden_source_type.tooltip}
|
||||
placeholder={dataFields.context_garden_source_type.example}
|
||||
options={dataFields.context_garden_source_type.items}
|
||||
/>
|
||||
{(props.building.context_garden_source_type == commonSourceTypes[0] ||
|
||||
props.building.context_garden_source_type == commonSourceTypes[1] ||
|
||||
props.building.context_garden_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.context_garden_source_links.title}
|
||||
slug="context_garden_source_links"
|
||||
value={props.building.context_garden_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_garden_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Street/pavement properties">
|
||||
<NumericDataEntry
|
||||
title={dataFields.context_street_width.title}
|
||||
value={props.building.context_street_width}
|
||||
slug="context_street_width"
|
||||
tooltip={dataFields.context_street_width.tooltip}
|
||||
//placeholder={dataFields.context_street_width.example}
|
||||
mode={props.mode}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={0}
|
||||
/>
|
||||
<Verification
|
||||
slug="context_street_width"
|
||||
allow_verify={props.user !== undefined && props.building.context_street_width !== null}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("context_street_width")}
|
||||
user_verified_as={props.user_verified.context_street_width}
|
||||
verified_count={props.building.verified.context_street_width}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_street_width_source_type.title}
|
||||
slug="context_street_width_source_type"
|
||||
value={props.building.context_street_width_source_type}
|
||||
options={dataFields.context_street_width_source_type.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_street_width_source_type.tooltip}
|
||||
/>
|
||||
{(props.building.context_street_width_source_type == commonSourceTypes[0] ||
|
||||
props.building.context_street_width_source_type == commonSourceTypes[1] ||
|
||||
props.building.context_street_width_source_type == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.context_street_width_source_links.title}
|
||||
slug="context_street_width_source_links"
|
||||
value={props.building.context_street_width_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_street_width_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.context_pavement_width.title}
|
||||
value={props.building.context_pavement_width}
|
||||
slug="context_pavement_width"
|
||||
tooltip={dataFields.context_pavement_width.tooltip}
|
||||
//placeholder={dataFields.context_pavement_width.example}
|
||||
mode={props.mode}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={0}
|
||||
/>
|
||||
<Verification
|
||||
slug="context_pavement_width"
|
||||
allow_verify={props.user !== undefined && props.building.context_pavement_width !== null}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("context_pavement_width")}
|
||||
user_verified_as={props.user_verified.context_pavement_width}
|
||||
verified_count={props.building.verified.context_pavement_width}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_pavement_width_source_type.title}
|
||||
slug="context_pavement_width_source_type"
|
||||
value={props.building.context_pavement_width_source_type}
|
||||
options={dataFields.context_pavement_width_source_type.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_pavement_width_source_type.tooltip}
|
||||
/>
|
||||
{(props.building.context_pavement_width_source_type == commonSourceTypes[0] ||
|
||||
props.building.context_pavement_width_source_type == commonSourceTypes[1] ||
|
||||
props.building.context_pavement_width_source_type == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.context_pavement_width_source_links.title}
|
||||
slug="context_pavement_width_source_links"
|
||||
value={props.building.context_pavement_width_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_pavement_width_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<DataEntry
|
||||
title={dataFields.context_street_geometry.title}
|
||||
slug="context_street_geometry"
|
||||
value={props.building.context_street_geometry}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_street_geometry.tooltip}
|
||||
placeholder="https://..."
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="context_street_geometry"
|
||||
allow_verify={props.user !== undefined && props.building.context_street_geometry !== null}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("context_street_geometry")}
|
||||
user_verified_as={props.user_verified.context_street_geometry}
|
||||
verified_count={props.building.verified.context_street_geometry}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_street_geometry_source_type.title}
|
||||
slug="context_street_geometry_source_type"
|
||||
value={props.building.context_street_geometry_source_type}
|
||||
options={dataFields.context_street_geometry_source_type.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_street_geometry_source_type.tooltip}
|
||||
/>
|
||||
{(props.building.context_street_geometry_source_type == commonSourceTypes[0] ||
|
||||
props.building.context_street_geometry_source_type == commonSourceTypes[1] ||
|
||||
props.building.context_street_geometry_source_type == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.context_street_geometry_source_links.title}
|
||||
slug="context_street_geometry_source_links"
|
||||
value={props.building.context_street_geometry_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_street_geometry_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Access to green space">
|
||||
<NumericDataEntry
|
||||
title={dataFields.context_green_space_distance.title}
|
||||
value={props.building.context_green_space_distance}
|
||||
slug="context_green_space_distance"
|
||||
tooltip={dataFields.context_green_space_distance.tooltip}
|
||||
//placeholder={dataFields.context_green_space_distance.example}
|
||||
mode={props.mode}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={0}
|
||||
/>
|
||||
<Verification
|
||||
slug="context_green_space_distance"
|
||||
allow_verify={props.user !== undefined && props.building.context_green_space_distance !== null}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("context_green_space_distance")}
|
||||
user_verified_as={props.user_verified.context_green_space_distance}
|
||||
verified_count={props.building.verified.context_green_space_distance}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_green_space_distance_source_type.title}
|
||||
slug="context_green_space_distance_source_type"
|
||||
value={props.building.context_green_space_distance_source_type}
|
||||
options={dataFields.context_green_space_distance_source_type.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_green_space_distance_source_type.tooltip}
|
||||
/>
|
||||
{(props.building.context_green_space_distance_source_type == commonSourceTypes[0] ||
|
||||
props.building.context_green_space_distance_source_type == commonSourceTypes[1] ||
|
||||
props.building.context_green_space_distance_source_type == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.context_green_space_distance_source_links.title}
|
||||
slug="context_green_space_distance_source_links"
|
||||
value={props.building.context_green_space_distance_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_green_space_distance_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.context_tree_distance.title}
|
||||
value={props.building.context_tree_distance}
|
||||
slug="context_tree_distance"
|
||||
tooltip={dataFields.context_tree_distance.tooltip}
|
||||
//placeholder={dataFields.context_tree_distance.example}
|
||||
mode={props.mode}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={0}
|
||||
/>
|
||||
<Verification
|
||||
slug="context_tree_distance"
|
||||
allow_verify={props.user !== undefined && props.building.context_tree_distance !== null}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("context_tree_distance")}
|
||||
user_verified_as={props.user_verified.context_tree_distance}
|
||||
verified_count={props.building.verified.context_tree_distance}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.context_tree_distance_source_type.title}
|
||||
slug="context_tree_distance_source_type"
|
||||
value={props.building.context_tree_distance_source_type}
|
||||
options={dataFields.context_tree_distance_source_type.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_tree_distance_source_type.tooltip}
|
||||
/>
|
||||
{(props.building.context_tree_distance_source_type == commonSourceTypes[0] ||
|
||||
props.building.context_tree_distance_source_type == commonSourceTypes[1] ||
|
||||
props.building.context_tree_distance_source_type == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.context_tree_distance_source_links.title}
|
||||
slug="context_tree_distance_source_links"
|
||||
value={props.building.context_tree_distance_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.context_tree_distance_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
||||
const StreetscapeContainer = withCopyEdit(StreetscapeView);
|
||||
|
||||
export default StreetscapeContainer;
|
@ -1,91 +0,0 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
|
||||
import withCopyEdit from '../data-container';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
|
||||
/**
|
||||
* Streetscape view/edit section
|
||||
*/
|
||||
const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
<Fragment>
|
||||
<InfoBox type='warning' msg="This is what we're planning to collect on the building's context" />
|
||||
<ul className="data-list">
|
||||
<li>Gardens</li>
|
||||
<li>Trees</li>
|
||||
<li>Green walls</li>
|
||||
<li>Green roof</li>
|
||||
<li>Proximity to parks and open greenspace</li>
|
||||
<li>Building shading</li>
|
||||
</ul>
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_plot_area_total.title}
|
||||
slug="size_plot_area_total"
|
||||
mode='view'
|
||||
step={0.1}
|
||||
min={0}
|
||||
/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.size_far_ratio.title}
|
||||
slug="size_far_ratio"
|
||||
mode='view'
|
||||
step={0.1}
|
||||
min={0}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Plot dimensions"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Plot geometry link"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Does the building have a garden?"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Street width"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Pavement width"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Street network geometry link"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Distance from Public Green Space"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Distance from front door to nearest tree"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
const StreetscapeContainer = withCopyEdit(StreetscapeView);
|
||||
|
||||
export default StreetscapeContainer;
|
@ -1,132 +0,0 @@
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import Verification from '../data-components/verification';
|
||||
import withCopyEdit from '../data-container';
|
||||
import InfoBox from '../../components/info-box';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
|
||||
const EnergyCategoryOptions = ["A", "B", "C", "D", "E", "F", "G"];
|
||||
const BreeamRatingOptions = [
|
||||
'Outstanding',
|
||||
'Excellent',
|
||||
'Very good',
|
||||
'Good',
|
||||
'Pass',
|
||||
'Unclassified'
|
||||
];
|
||||
/**
|
||||
* Sustainability view/edit section
|
||||
*/
|
||||
const SustainabilityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
return (
|
||||
<Fragment>
|
||||
<SelectDataEntry
|
||||
title={dataFields.sust_breeam_rating.title}
|
||||
slug="sust_breeam_rating"
|
||||
value={props.building.sust_breeam_rating}
|
||||
tooltip={dataFields.sust_breeam_rating.tooltip}
|
||||
options={BreeamRatingOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="sust_breeam_rating"
|
||||
allow_verify={props.user !== undefined && props.building.sust_breeam_rating !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("sust_breeam_rating")}
|
||||
user_verified_as={props.user_verified.sust_breeam_rating}
|
||||
verified_count={props.building.verified.sust_breeam_rating}
|
||||
/>
|
||||
|
||||
<SelectDataEntry
|
||||
title={dataFields.sust_dec.title}
|
||||
slug="sust_dec"
|
||||
value={props.building.sust_dec}
|
||||
tooltip={dataFields.sust_dec.tooltip}
|
||||
options={EnergyCategoryOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="sust_dec"
|
||||
allow_verify={props.user !== undefined && props.building.sust_dec !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("sust_dec")}
|
||||
user_verified_as={props.user_verified.sust_dec}
|
||||
verified_count={props.building.verified.sust_dec}
|
||||
/>
|
||||
|
||||
<SelectDataEntry
|
||||
title={dataFields.sust_aggregate_estimate_epc.title}
|
||||
slug="sust_aggregate_estimate_epc"
|
||||
value={props.building.sust_aggregate_estimate_epc}
|
||||
tooltip={dataFields.sust_aggregate_estimate_epc.tooltip}
|
||||
options={EnergyCategoryOptions}
|
||||
disabled={true}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
|
||||
<NumericDataEntry
|
||||
title={dataFields.sust_retrofit_date.title}
|
||||
slug="sust_retrofit_date"
|
||||
value={props.building.sust_retrofit_date}
|
||||
tooltip={dataFields.sust_retrofit_date.tooltip}
|
||||
step={1}
|
||||
min={1086}
|
||||
max={new Date().getFullYear()}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="sust_retrofit_date"
|
||||
allow_verify={props.user !== undefined && props.building.sust_retrofit_date !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("sust_retrofit_date")}
|
||||
user_verified_as={props.user_verified.sust_retrofit_date}
|
||||
verified_count={props.building.verified.sust_retrofit_date}
|
||||
/>
|
||||
<InfoBox>
|
||||
This section is under development.
|
||||
</InfoBox>
|
||||
<DataEntry
|
||||
title="Date of Significant Retrofits"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<Verification
|
||||
slug="date_link"
|
||||
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_link")}
|
||||
user_verified_as={props.user_verified.date_link}
|
||||
verified_count={props.building.verified.date_link}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Green Walls / Green Roof / Shading"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
const SustainabilityContainer = withCopyEdit(SustainabilityView);
|
||||
|
||||
export default SustainabilityContainer;
|
@ -1,6 +1,6 @@
|
||||
import React, { Fragment } from 'react';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
import Verification from '../data-components/verification';
|
||||
@ -21,327 +21,396 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
const currentBuildingConstructionYear = building.date_year || undefined;
|
||||
return (
|
||||
<form>
|
||||
<InfoBox msg="Can you help us capture information on who built the current building?"></InfoBox>
|
||||
<MultiDataEntry
|
||||
title={dataFields.landowner.title}
|
||||
slug="landowner"
|
||||
value={props.building.landowner}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.landowner.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="landowner"
|
||||
allow_verify={props.user !== undefined && props.building.landowner !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("landowner")}
|
||||
user_verified_as={props.user_verified.landowner}
|
||||
verified_count={props.building.verified.landowner}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.landowner_source_link.title}
|
||||
slug="landowner_source_link"
|
||||
value={props.building.landowner_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.landowner_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="landowner_source_link"
|
||||
allow_verify={props.user !== undefined && props.building.landowner_source_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("landowner_source_link")}
|
||||
user_verified_as={props.user_verified.landowner_source_link}
|
||||
verified_count={props.building.verified.landowner_source_link}
|
||||
/>
|
||||
<NumericDataEntry
|
||||
slug='date_year'
|
||||
title={dataFields.date_year.title}
|
||||
value={currentBuildingConstructionYear}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_year"
|
||||
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}
|
||||
/>
|
||||
<LogicalDataEntry
|
||||
title={dataFields.has_extension.title}
|
||||
slug="has_extension"
|
||||
value={props.building.has_extension}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.has_extension.tooltip}
|
||||
/>
|
||||
{props.building.has_extension ? (
|
||||
<>
|
||||
<NumericDataEntry
|
||||
slug='extension_year'
|
||||
title={dataFields.extension_year.title}
|
||||
value={props.building.extension_year}
|
||||
<DataEntryGroup name="Data relating to original building or extension?">
|
||||
<NumericDataEntry
|
||||
slug='date_year'
|
||||
title={dataFields.date_year.title}
|
||||
value={currentBuildingConstructionYear}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_year"
|
||||
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}
|
||||
/>
|
||||
<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}
|
||||
options={dataFields.date_source.items}
|
||||
placeholder={dataFields.date_source.example}
|
||||
/>
|
||||
{(props.building.date_source == dataFields.date_source.items[0] ||
|
||||
props.building.date_source == dataFields.date_source.items[1] ||
|
||||
props.building.date_source == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.date_link.title}
|
||||
slug="date_link"
|
||||
value={props.building.date_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.date_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<LogicalDataEntry
|
||||
title={dataFields.has_extension.title}
|
||||
slug="has_extension"
|
||||
value={props.building.has_extension}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.has_extension.tooltip}
|
||||
/>
|
||||
{props.building.has_extension ? (
|
||||
<>
|
||||
<NumericDataEntry
|
||||
slug='extension_year'
|
||||
title={dataFields.extension_year.title}
|
||||
value={props.building.extension_year}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip_extension}
|
||||
/>
|
||||
<Verification
|
||||
slug="extension_year"
|
||||
allow_verify={props.user !== undefined && props.building.extension_year !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("extension_year")}
|
||||
user_verified_as={props.user_verified.extension_year}
|
||||
verified_count={props.building.verified.extension_year}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.extension_source_type.title}
|
||||
slug="extension_source_type"
|
||||
value={props.building.extension_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.extension_source_type.tooltip}
|
||||
options={dataFields.extension_source_type.items}
|
||||
placeholder={dataFields.extension_source_type.example}
|
||||
/>
|
||||
{(props.building.extension_source_type == dataFields.extension_source_type.items[0] ||
|
||||
props.building.extension_source_type == dataFields.extension_source_type.items[1] ||
|
||||
props.building.extension_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.extension_source_links.title}
|
||||
slug="extension_source_links"
|
||||
value={props.building.extension_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.extension_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</>
|
||||
) : (null)}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Land ownership data">
|
||||
<MultiDataEntry
|
||||
title={dataFields.landowner.title}
|
||||
slug="landowner"
|
||||
value={props.building.landowner}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.landowner.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="landowner"
|
||||
allow_verify={props.user !== undefined && props.building.landowner !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("landowner")}
|
||||
user_verified_as={props.user_verified.landowner}
|
||||
verified_count={props.building.verified.landowner}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.landowner_source_type.title}
|
||||
slug="landowner_source_type"
|
||||
value={props.building.landowner_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.landowner_source_type.tooltip}
|
||||
options={dataFields.landowner_source_type.items}
|
||||
placeholder={dataFields.landowner_source_type.example}
|
||||
/>
|
||||
{(props.building.landowner_source_type == commonSourceTypes[0] ||
|
||||
props.building.landowner_source_type == commonSourceTypes[1] ||
|
||||
props.building.landowner_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.landowner_source_link.title}
|
||||
slug="landowner_source_link"
|
||||
value={props.building.landowner_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.landowner_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Developer data">
|
||||
<SelectDataEntry
|
||||
slug='developer_type'
|
||||
title={dataFields.developer_type.title}
|
||||
value={props.building.developer_type}
|
||||
options={dataFields.developer_type.items}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="developer_type"
|
||||
allow_verify={props.user !== undefined && props.building.developer_type !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("developer_type")}
|
||||
user_verified_as={props.user_verified.developer_type}
|
||||
verified_count={props.building.verified.developer_type}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.developer_name.title}
|
||||
slug="developer_name"
|
||||
value={props.building.developer_name}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.developer_name.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="developer_name"
|
||||
allow_verify={props.user !== undefined && props.building.developer_name !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("developer_name")}
|
||||
user_verified_as={props.user_verified.developer_name}
|
||||
verified_count={props.building.verified.developer_name}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.developer_source_type.title}
|
||||
slug="developer_source_type"
|
||||
value={props.building.developer_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.developer_source_type.tooltip}
|
||||
options={dataFields.developer_source_type.items}
|
||||
placeholder={dataFields.developer_source_type.example}
|
||||
/>
|
||||
{(props.building.developer_source_type == commonSourceTypes[0] ||
|
||||
props.building.developer_source_type == commonSourceTypes[1] ||
|
||||
props.building.developer_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.developer_source_link.title}
|
||||
slug="developer_source_link"
|
||||
value={props.building.developer_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.developer_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Designer data">
|
||||
<MultiDataEntry
|
||||
title={dataFields.designers.title}
|
||||
slug="designers"
|
||||
value={props.building.designers}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.designers.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="designers"
|
||||
allow_verify={props.user !== undefined && props.building.designers !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("designers")}
|
||||
user_verified_as={props.user_verified.designers}
|
||||
verified_count={props.building.verified.designers}
|
||||
/>
|
||||
|
||||
<SelectDataEntry
|
||||
slug='lead_designer_type'
|
||||
title={dataFields.lead_designer_type.title}
|
||||
value={props.building.lead_designer_type}
|
||||
options={dataFields.lead_designer_type.items}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="lead_designer_type"
|
||||
allow_verify={props.user !== undefined && props.building.lead_designer_type !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("lead_designer_type")}
|
||||
user_verified_as={props.user_verified.lead_designer_type}
|
||||
verified_count={props.building.verified.lead_designer_type}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.designers_source_type.title}
|
||||
slug="designers_source_type"
|
||||
value={props.building.designers_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.designers_source_type.tooltip}
|
||||
options={dataFields.designers_source_type.items}
|
||||
placeholder={dataFields.designers_source_type.example}
|
||||
/>
|
||||
{(props.building.designers_source_type == commonSourceTypes[0] ||
|
||||
props.building.designers_source_type == commonSourceTypes[1] ||
|
||||
props.building.designers_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.designers_source_link.title}
|
||||
slug="designers_source_link"
|
||||
value={props.building.designers_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.designers_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
<hr/>
|
||||
<LogicalDataEntryYesOnly
|
||||
slug='designer_awards'
|
||||
title={dataFields.designer_awards.title}
|
||||
tooltip={dataFields.designer_awards.tooltip}
|
||||
value={props.building.designer_awards}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
/>
|
||||
<Verification
|
||||
slug="designer_awards"
|
||||
allow_verify={props.user !== undefined && props.building.designer_awards !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("designer_awards")}
|
||||
user_verified_as={props.user_verified.designer_awards}
|
||||
verified_count={props.building.verified.designer_awards}
|
||||
/>
|
||||
{props.building.designer_awards ? (
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.awards_source_link.title}
|
||||
slug="awards_source_link"
|
||||
value={props.building.awards_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.awards_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="awards_source_link"
|
||||
allow_verify={props.user !== undefined && props.building.awards_source_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("awards_source_link")}
|
||||
user_verified_as={props.user_verified.awards_source_link}
|
||||
verified_count={props.building.verified.awards_source_link}
|
||||
/>
|
||||
</>
|
||||
) : (null)
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Builder data">
|
||||
<MultiDataEntry
|
||||
title={dataFields.builder.title}
|
||||
slug="builder"
|
||||
value={props.building.builder}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
step={1}
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.extension_year.tooltip_extension}
|
||||
/>
|
||||
<Verification
|
||||
slug="extension_year"
|
||||
allow_verify={props.user !== undefined && props.building.extension_year !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("extension_year")}
|
||||
user_verified_as={props.user_verified.extension_year}
|
||||
verified_count={props.building.verified.extension_year}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
</>
|
||||
) : (null)}
|
||||
<SelectDataEntry
|
||||
slug='developer_type'
|
||||
title={dataFields.developer_type.title}
|
||||
value={props.building.developer_type}
|
||||
options={dataFields.developer_type.items}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="developer_type"
|
||||
allow_verify={props.user !== undefined && props.building.developer_type !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("developer_type")}
|
||||
user_verified_as={props.user_verified.developer_type}
|
||||
verified_count={props.building.verified.developer_type}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.developer_name.title}
|
||||
slug="developer_name"
|
||||
value={props.building.developer_name}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.developer_name.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="developer_name"
|
||||
allow_verify={props.user !== undefined && props.building.developer_name !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("developer_name")}
|
||||
user_verified_as={props.user_verified.developer_name}
|
||||
verified_count={props.building.verified.developer_name}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.developer_source_link.title}
|
||||
slug="developer_source_link"
|
||||
value={props.building.developer_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.developer_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="developer_source_link"
|
||||
allow_verify={props.user !== undefined && props.building.developer_source_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("developer_source_link")}
|
||||
user_verified_as={props.user_verified.developer_source_link}
|
||||
verified_count={props.building.verified.developer_source_link}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.designers.title}
|
||||
slug="designers"
|
||||
value={props.building.designers}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.designers.tooltip}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="designers"
|
||||
allow_verify={props.user !== undefined && props.building.designers !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("designers")}
|
||||
user_verified_as={props.user_verified.designers}
|
||||
verified_count={props.building.verified.designers}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.designers_source_link.title}
|
||||
slug="designers_source_link"
|
||||
value={props.building.designers_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.designers_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="designers_source_link"
|
||||
allow_verify={props.user !== undefined && props.building.designers_source_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("designers_source_link")}
|
||||
user_verified_as={props.user_verified.designers_source_link}
|
||||
verified_count={props.building.verified.designers_source_link}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
slug='lead_designer_type'
|
||||
title={dataFields.lead_designer_type.title}
|
||||
value={props.building.lead_designer_type}
|
||||
options={dataFields.lead_designer_type.items}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="lead_designer_type"
|
||||
allow_verify={props.user !== undefined && props.building.lead_designer_type !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("lead_designer_type")}
|
||||
user_verified_as={props.user_verified.lead_designer_type}
|
||||
verified_count={props.building.verified.lead_designer_type}
|
||||
/>
|
||||
<LogicalDataEntryYesOnly
|
||||
slug='designer_awards'
|
||||
title={dataFields.designer_awards.title}
|
||||
tooltip={dataFields.designer_awards.tooltip}
|
||||
value={props.building.designer_awards}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
/>
|
||||
<Verification
|
||||
slug="designer_awards"
|
||||
allow_verify={props.user !== undefined && props.building.designer_awards !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("designer_awards")}
|
||||
user_verified_as={props.user_verified.designer_awards}
|
||||
verified_count={props.building.verified.designer_awards}
|
||||
/>
|
||||
{props.building.designer_awards ? (
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.awards_source_link.title}
|
||||
slug="awards_source_link"
|
||||
value={props.building.awards_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.awards_source_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="awards_source_link"
|
||||
allow_verify={props.user !== undefined && props.building.awards_source_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("awards_source_link")}
|
||||
user_verified_as={props.user_verified.awards_source_link}
|
||||
verified_count={props.building.verified.awards_source_link}
|
||||
/>
|
||||
</>
|
||||
) : (null)
|
||||
}
|
||||
<MultiDataEntry
|
||||
title={dataFields.builder.title}
|
||||
slug="builder"
|
||||
value={props.building.builder}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="builder"
|
||||
allow_verify={props.user !== undefined && props.building.builder !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("builder")}
|
||||
user_verified_as={props.user_verified.builder}
|
||||
verified_count={props.building.verified.builder}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.builder_source_link.title}
|
||||
slug="builder_source_link"
|
||||
value={props.building.builder_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="builder_source_link"
|
||||
allow_verify={props.user !== undefined && props.building.builder_source_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("builder_source_link")}
|
||||
user_verified_as={props.user_verified.builder_source_link}
|
||||
verified_count={props.building.verified.builder_source_link}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.other_team.title}
|
||||
slug="other_team"
|
||||
value={props.building.other_team}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder=""
|
||||
editableEntries={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="other_team"
|
||||
allow_verify={props.user !== undefined && props.building.other_team !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("other_team")}
|
||||
user_verified_as={props.user_verified.other_team}
|
||||
verified_count={props.building.verified.other_team}
|
||||
/>
|
||||
<MultiDataEntry
|
||||
title={dataFields.other_team_source_link.title}
|
||||
slug="other_team_source_link"
|
||||
value={props.building.other_team_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="other_team_source_link"
|
||||
allow_verify={props.user !== undefined && props.building.other_team_source_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("other_team_source_link")}
|
||||
user_verified_as={props.user_verified.other_team_source_link}
|
||||
verified_count={props.building.verified.other_team_source_link}
|
||||
/>
|
||||
<Verification
|
||||
slug="builder"
|
||||
allow_verify={props.user !== undefined && props.building.builder !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("builder")}
|
||||
user_verified_as={props.user_verified.builder}
|
||||
verified_count={props.building.verified.builder}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.builder_source_type.title}
|
||||
slug="builder_source_type"
|
||||
value={props.building.builder_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.builder_source_type.tooltip}
|
||||
options={dataFields.builder_source_type.items}
|
||||
placeholder={dataFields.builder_source_type.example}
|
||||
/>
|
||||
{(props.building.builder_source_type == commonSourceTypes[0] ||
|
||||
props.building.builder_source_type == commonSourceTypes[1] ||
|
||||
props.building.builder_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.builder_source_link.title}
|
||||
slug="builder_source_link"
|
||||
value={props.building.builder_source_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
</form>
|
||||
);
|
||||
};
|
||||
|
@ -1,115 +0,0 @@
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import Verification from '../data-components/verification';
|
||||
import withCopyEdit from '../data-container';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
|
||||
const AttachmentFormOptions = [
|
||||
"Detached",
|
||||
"Semi-Detached",
|
||||
"End-Terrace",
|
||||
"Mid-Terrace"
|
||||
];
|
||||
|
||||
/**
|
||||
* Type view/edit section
|
||||
*/
|
||||
const TypeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntry
|
||||
title="Base type classification"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Local typology/architectural style"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.original_building_use.title}
|
||||
slug="original_building_use" // doesn't exist in database yet
|
||||
tooltip={dataFields.original_building_use.tooltip}
|
||||
value={undefined}
|
||||
copy={props.copy}
|
||||
mode={props.mode}
|
||||
onChange={props.onChange}
|
||||
disabled={true}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.size_roof_shape.title}
|
||||
slug="size_roof_shape"
|
||||
value={props.building.size_roof_shape}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
disabled={true}
|
||||
options={[
|
||||
"Flat",
|
||||
"Pitched",
|
||||
"Other"
|
||||
]}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.building_attachment_form.title}
|
||||
slug="building_attachment_form"
|
||||
value={props.building.building_attachment_form}
|
||||
tooltip={dataFields.building_attachment_form.tooltip}
|
||||
options={AttachmentFormOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="building_attachment_form"
|
||||
allow_verify={props.user !== undefined && props.building.building_attachment_form !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("building_attachment_form")}
|
||||
user_verified_as={props.user_verified.building_attachment_form}
|
||||
verified_count={props.building.verified.building_attachment_form}
|
||||
/>
|
||||
|
||||
<DataEntry
|
||||
title="Local typology mutations"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="3D procedural model classifications"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Dynamic tissue type classification"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
{/* <NumericDataEntry
|
||||
title={dataFields.date_change_building_use.title}
|
||||
slug="date_change_building_use"
|
||||
value={props.building.date_change_building_use}
|
||||
tooltip={dataFields.date_change_building_use.tooltip}
|
||||
min={1086}
|
||||
max={new Date().getFullYear()}
|
||||
step={1}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/> */}
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
const TypeContainer = withCopyEdit(TypeView);
|
||||
|
||||
export default TypeContainer;
|
157
app/src/frontend/building/data-containers/typology.tsx
Normal file
157
app/src/frontend/building/data-containers/typology.tsx
Normal file
@ -0,0 +1,157 @@
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import Verification from '../data-components/verification';
|
||||
import withCopyEdit from '../data-container';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
|
||||
const AttachmentFormOptions = [
|
||||
"Detached",
|
||||
"Semi-Detached",
|
||||
"End-Terrace",
|
||||
"Mid-Terrace"
|
||||
];
|
||||
|
||||
/**
|
||||
* Type view/edit section
|
||||
*/
|
||||
const TypeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Adjacency and building use data">
|
||||
<SelectDataEntry
|
||||
title={dataFields.building_attachment_form.title}
|
||||
slug="building_attachment_form"
|
||||
value={props.building.building_attachment_form}
|
||||
tooltip={dataFields.building_attachment_form.tooltip}
|
||||
options={AttachmentFormOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="building_attachment_form"
|
||||
allow_verify={props.user !== undefined && props.building.building_attachment_form !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("building_attachment_form")}
|
||||
user_verified_as={props.user_verified.building_attachment_form}
|
||||
verified_count={props.building.verified.building_attachment_form}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source type"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip="Coming Soon"
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source link"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip="Coming Soon"
|
||||
/>
|
||||
<hr/>
|
||||
<DataEntry
|
||||
title={dataFields.original_building_use.title}
|
||||
slug="original_building_use" // doesn't exist in database yet
|
||||
tooltip={dataFields.original_building_use.tooltip}
|
||||
value={undefined}
|
||||
copy={props.copy}
|
||||
mode={props.mode}
|
||||
onChange={props.onChange}
|
||||
disabled={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="building_attachment_form"
|
||||
allow_verify={props.user !== undefined && props.building.building_attachment_form !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("building_attachment_form")}
|
||||
user_verified_as={props.user_verified.building_attachment_form}
|
||||
verified_count={props.building.verified.building_attachment_form}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source type"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip="Coming Soon"
|
||||
/>
|
||||
<DataEntry
|
||||
title="Source link"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip="Coming Soon"
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Building typology and classification data">
|
||||
<DataEntry
|
||||
title="Local typology/architectural style"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Base type classification"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.size_roof_shape.title}
|
||||
slug="size_roof_shape"
|
||||
value={props.building.size_roof_shape}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
disabled={true}
|
||||
options={[
|
||||
"Flat",
|
||||
"Pitched",
|
||||
"Other"
|
||||
]}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Local typology mutations"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="3D procedural model classifications"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<DataEntry
|
||||
title="Dynamic tissue type classification"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
{/* <NumericDataEntry
|
||||
title={dataFields.date_change_building_use.title}
|
||||
slug="date_change_building_use"
|
||||
value={props.building.date_change_building_use}
|
||||
tooltip={dataFields.date_change_building_use.tooltip}
|
||||
min={1086}
|
||||
max={new Date().getFullYear()}
|
||||
step={1}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/> */}
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
const TypeContainer = withCopyEdit(TypeView);
|
||||
|
||||
export default TypeContainer;
|
@ -1,135 +0,0 @@
|
||||
import React, { Fragment } from 'react';
|
||||
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { dataFields } from '../../config/data-fields-config';
|
||||
import DataEntry from '../data-components/data-entry';
|
||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||
import SelectDataEntry from '../data-components/select-data-entry';
|
||||
import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry';
|
||||
import TextboxDataEntry from '../data-components/textbox-data-entry';
|
||||
import withCopyEdit from '../data-container';
|
||||
|
||||
import { CategoryViewProps } from './category-view-props';
|
||||
import Verification from '../data-components/verification';
|
||||
import { useDisplayPreferences } from '../../displayPreferences-context';
|
||||
|
||||
/**
|
||||
* Use view/edit section
|
||||
*/
|
||||
const UseView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
const switchToIsDomesticMapStyle = (e) => {
|
||||
e.preventDefault();
|
||||
props.onMapColourScale('is_domestic')
|
||||
}
|
||||
const { darkLightTheme } = useDisplayPreferences();
|
||||
return (
|
||||
<Fragment>
|
||||
<SelectDataEntry
|
||||
title={dataFields.is_domestic.title}
|
||||
slug="is_domestic"
|
||||
value={props.building.is_domestic}
|
||||
options={["yes", "no", "mixed domestic/non-domestic"]}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.is_domestic.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="is_domestic"
|
||||
allow_verify={props.user !== undefined && props.building.is_domestic !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("is_domestic")}
|
||||
user_verified_as={props.user_verified.is_domestic}
|
||||
verified_count={props.building.verified.is_domestic}
|
||||
/>
|
||||
Work from home does not count as office and does not make building non-domestic.
|
||||
<button className={`map-switcher-inline ${props.mapColourScale == "is_domestic" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToIsDomesticMapStyle}>
|
||||
{(props.mapColourScale == "is_domestic")? 'Showing domestic status for specific buildings' : 'Click to see domestic status for specific buildings mapped'}
|
||||
</button>
|
||||
<InfoBox msg="93% of properties in UK are dwellings so we have set this as the default colour. Can you help us colour-in all non-residential and mixed use buildings, and verify residential buildings too?"></InfoBox>
|
||||
<MultiDataEntry
|
||||
title={dataFields.current_landuse_group.title}
|
||||
slug="current_landuse_group"
|
||||
value={props.building.current_landuse_group}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
confirmOnEnter={true}
|
||||
tooltip={dataFields.current_landuse_group.tooltip}
|
||||
placeholder="Type new land use group here"
|
||||
copyable={true}
|
||||
autofill={true}
|
||||
showAllOptionsOnEmpty={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="current_landuse_group"
|
||||
allow_verify={props.user !== undefined && props.building.current_landuse_group !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("current_landuse_group")}
|
||||
user_verified_as={props.user_verified.current_landuse_group && props.user_verified.current_landuse_group.join(", ")}
|
||||
verified_count={props.building.verified.current_landuse_group}
|
||||
/>
|
||||
{
|
||||
props.mode != 'view' &&
|
||||
<InfoBox msg="Land use order, shown below, is automatically derived from the land use groups"></InfoBox>
|
||||
}
|
||||
<DataEntry
|
||||
title={dataFields.current_landuse_order.title}
|
||||
tooltip={dataFields.current_landuse_order.tooltip}
|
||||
slug="current_landuse_order"
|
||||
value={props.building.current_landuse_order}
|
||||
mode={props.mode}
|
||||
disabled={true}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.current_landuse_source.title}
|
||||
slug="current_landuse_source"
|
||||
value={props.building.current_landuse_source}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.current_landuse_source.tooltip}
|
||||
placeholder={dataFields.current_landuse_source.example}
|
||||
options={dataFields.current_landuse_source.items}
|
||||
/>
|
||||
<Verification
|
||||
slug="current_landuse_source"
|
||||
allow_verify={props.user !== undefined && props.building.current_landuse_source !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("current_landuse_source")}
|
||||
user_verified_as={props.user_verified.current_landuse_source}
|
||||
verified_count={props.building.verified.current_landuse_source}
|
||||
/>
|
||||
{(props.building.current_landuse_source == "Expert/personal knowledge of building" ||
|
||||
props.building.current_landuse_source == "Online streetview image" ||
|
||||
props.building.current_landuse_source == null) ? <></> :
|
||||
<><MultiDataEntry
|
||||
title={dataFields.current_landuse_link.title}
|
||||
slug="current_landuse_link"
|
||||
value={props.building.current_landuse_link}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.current_landuse_link.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
<Verification
|
||||
slug="current_landuse_link"
|
||||
allow_verify={props.user !== undefined && props.building.current_landuse_link !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("current_landuse_link")}
|
||||
user_verified_as={props.user_verified.current_landuse_link}
|
||||
verified_count={props.building.verified.current_landuse_link}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</Fragment>
|
||||
);
|
||||
};
|
||||
const UseContainer = withCopyEdit(UseView);
|
||||
|
||||
export default UseContainer;
|
@ -100,8 +100,8 @@
|
||||
*/
|
||||
.section-body {
|
||||
margin-top: 0.75em;
|
||||
padding: 0 0.75em 5em 0.75em;
|
||||
min-height: 80vh;
|
||||
padding: 0 0.75em 1em 0.75em;
|
||||
/*min-height: 80vh;*/
|
||||
}
|
||||
.data-section .h3 {
|
||||
margin: 0;
|
||||
@ -178,4 +178,9 @@
|
||||
|
||||
.data-entry-list-button {
|
||||
width: 2.5em;
|
||||
}
|
||||
|
||||
.source-url {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 5px;
|
||||
}
|
@ -30,19 +30,19 @@ const LogoGrid: React.FunctionComponent = () => (
|
||||
<div className="grid">
|
||||
<div className="row">
|
||||
<div className="cell background-location"></div>
|
||||
<div className="cell background-use"></div>
|
||||
<div className="cell background-type"></div>
|
||||
<div className="cell background-age"></div>
|
||||
<div className="cell background-land-use"></div>
|
||||
<div className="cell background-typology"></div>
|
||||
<div className="cell background-size"></div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="cell background-size"></div>
|
||||
<div className="cell background-construction"></div>
|
||||
<div className="cell background-streetscape"></div>
|
||||
<div className="cell background-age"></div>
|
||||
<div className="cell background-street-context"></div>
|
||||
<div className="cell background-team"></div>
|
||||
</div>
|
||||
<div className="row">
|
||||
<div className="cell background-sustainability"></div>
|
||||
<div className="cell background-planning"></div>
|
||||
<div className="cell background-energy-performance"></div>
|
||||
<div className="cell background-resilience"></div>
|
||||
<div className="cell background-community"></div>
|
||||
</div>
|
||||
|
@ -4,15 +4,15 @@
|
||||
*/
|
||||
export enum Category {
|
||||
Location = 'location',
|
||||
LandUse = 'use',
|
||||
Type = 'type',
|
||||
Age = 'age',
|
||||
LandUse = 'land-use',
|
||||
Typology = 'typology',
|
||||
Size = 'size',
|
||||
Construction = 'construction',
|
||||
Streetscape = 'streetscape',
|
||||
Age = 'age',
|
||||
StreetContext = 'street-context',
|
||||
Team = 'team',
|
||||
Planning = 'planning',
|
||||
Sustainability = 'sustainability',
|
||||
EnergyPerformance = 'energy-performance',
|
||||
Resilience = 'resilience',
|
||||
Community = 'community',
|
||||
}
|
||||
@ -25,14 +25,14 @@ export enum Category {
|
||||
export const categoriesOrder: Category[] = [
|
||||
Category.Location,
|
||||
Category.LandUse,
|
||||
Category.Type,
|
||||
Category.Typology,
|
||||
Category.Size,
|
||||
Category.Construction,
|
||||
Category.Age,
|
||||
Category.Streetscape,
|
||||
Category.StreetContext,
|
||||
Category.Team,
|
||||
Category.Planning,
|
||||
Category.Sustainability,
|
||||
Category.EnergyPerformance,
|
||||
Category.Resilience,
|
||||
Category.Community,
|
||||
];
|
||||
@ -50,73 +50,72 @@ export const categoriesConfig: {[key in Category]: CategoryDefinition} = {
|
||||
slug: 'age',
|
||||
name: 'Age & History',
|
||||
aboutUrl: 'https://pages.colouring.london/age',
|
||||
intro: 'Building age data can support energy analysis and help predict long-term change.',
|
||||
intro: 'This section provides open data on the age of buildings and the history of buildings and sites.',
|
||||
},
|
||||
[Category.Size]: {
|
||||
slug: 'size',
|
||||
name: 'Size',
|
||||
aboutUrl: 'https://pages.colouring.london/shapeandsize',
|
||||
intro: 'How big are buildings?',
|
||||
intro: 'This section provides open data on the dimensions of buildings.',
|
||||
},
|
||||
[Category.Team]: {
|
||||
slug: 'team',
|
||||
name: 'Team',
|
||||
aboutUrl: 'https://pages.colouring.london/team',
|
||||
intro: 'Who built the buildings?',
|
||||
intro: 'This section provides open data on the teams designing and constructing the buildings.',
|
||||
},
|
||||
[Category.Construction]: {
|
||||
slug: 'construction',
|
||||
name: 'Construction',
|
||||
aboutUrl: 'https://pages.colouring.london/construction',
|
||||
intro: 'How are buildings built?',
|
||||
intro: 'This section provides open data on building materials and construction systems.',
|
||||
},
|
||||
[Category.Location]: {
|
||||
slug: 'location',
|
||||
name: 'Location',
|
||||
aboutUrl: 'https://pages.colouring.london/location',
|
||||
intro: 'Where are the buildings? Address, location and cross-references.',
|
||||
intro: 'This section provides open data on building locations and building IDs.',
|
||||
},
|
||||
[Category.Community]: {
|
||||
slug: 'community',
|
||||
name: 'Community',
|
||||
aboutUrl: 'https://pages.colouring.london/community',
|
||||
intro: 'How does this building work for the local community?',
|
||||
intro: 'This section collects data on how well citizens think specific *types* of building work. This will help us save/reuse as many useful buildings as possible, and help improve urban design quality in future.',
|
||||
},
|
||||
[Category.Planning]: {
|
||||
slug: 'planning',
|
||||
name: 'Planning Controls',
|
||||
aboutUrl: 'https://pages.colouring.london/planning',
|
||||
intro: 'Planning controls relating to protection and reuse.',
|
||||
intro: 'This section provides open data on current and anticipated planning applications for buildings, planning zones and whether the building is protected.',
|
||||
},
|
||||
[Category.Sustainability]: {
|
||||
slug: 'sustainability',
|
||||
[Category.EnergyPerformance]: {
|
||||
slug: 'energy-performance',
|
||||
name: 'Energy Performance',
|
||||
aboutUrl: 'https://pages.colouring.london/sustainability',
|
||||
intro: 'Are buildings energy efficient?',
|
||||
intro: 'This section provides open data on the energy performance of buildings, and on retrofit.',
|
||||
},
|
||||
[Category.Type]: {
|
||||
slug: 'type',
|
||||
[Category.Typology]: {
|
||||
slug: 'typology',
|
||||
name: 'Typology',
|
||||
aboutUrl: 'https://pages.colouring.london/buildingtypology',
|
||||
intro: 'How were buildings previously used?',
|
||||
intro: 'Note: This section is currently under development, we are working to activate it as soon as possible. This section provides open data on the typology of the building.',
|
||||
},
|
||||
[Category.LandUse]: {
|
||||
slug: 'use',
|
||||
slug: 'land-use',
|
||||
name: 'Land Use',
|
||||
aboutUrl: 'https://pages.colouring.london/use',
|
||||
intro: 'How are buildings used, and how does use change over time?',
|
||||
},
|
||||
[Category.Streetscape]: {
|
||||
inactive: true,
|
||||
slug: 'streetscape',
|
||||
[Category.StreetContext]: {
|
||||
slug: 'street-context',
|
||||
name: 'Street Context',
|
||||
aboutUrl: 'https://pages.colouring.london/greenery',
|
||||
intro: "What's the building's context? Coming soon…",
|
||||
intro: "This section provides open data, and links to open data on streets, pavements, street blocks, land parcels and greenery/green spaces.",
|
||||
},
|
||||
[Category.Resilience]: {
|
||||
slug: 'resilience',
|
||||
name: 'Resilience',
|
||||
aboutUrl: 'https://pages.colouring.london/dynamics',
|
||||
intro: 'How has the site of this building changed over time?'
|
||||
intro: 'This section provides a tool that allows for live collection of data in disaster situations and collates data relating to building resilience.'
|
||||
},
|
||||
};
|
||||
|
@ -144,7 +144,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
|
||||
{
|
||||
mapStyle: 'typology_likes',
|
||||
legend: {
|
||||
title: 'Liked typologies',
|
||||
title: 'Liked non-residential buildings',
|
||||
elements: [
|
||||
{ color: '#bd0026', text: '👍👍👍👍 100+' },
|
||||
{ color: '#e31a1c', text: '👍👍👍 50–99' },
|
||||
@ -283,7 +283,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
|
||||
},
|
||||
}
|
||||
],
|
||||
[Category.Sustainability]: [{
|
||||
[Category.EnergyPerformance]: [{
|
||||
mapStyle: 'sust_dec',
|
||||
legend: {
|
||||
title: 'Sustainability',
|
||||
@ -299,7 +299,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
|
||||
]
|
||||
},
|
||||
}],
|
||||
[Category.Type]: [{
|
||||
[Category.Typology]: [{
|
||||
mapStyle: 'building_attachment_form',
|
||||
legend: {
|
||||
title: 'Adjacency/Configuration',
|
||||
@ -347,46 +347,76 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
|
||||
}
|
||||
}
|
||||
],
|
||||
[Category.Streetscape]: [{
|
||||
[Category.StreetContext]: [{
|
||||
mapStyle: undefined,
|
||||
legend: {
|
||||
title: 'Street Context',
|
||||
elements: []
|
||||
},
|
||||
}],
|
||||
[Category.Resilience]: [{
|
||||
mapStyle: 'dynamics_demolished_count',
|
||||
legend: {
|
||||
title: 'Resilience',
|
||||
description: 'Demolished buildings on the same site',
|
||||
elements: [
|
||||
{
|
||||
text: '7+',
|
||||
color: '#bd0026',
|
||||
}, {
|
||||
text: '6',
|
||||
color: '#e31a1c',
|
||||
}, {
|
||||
text: '5',
|
||||
color: '#fc4e2a',
|
||||
}, {
|
||||
text: '4',
|
||||
color: '#fd8d3c',
|
||||
}, {
|
||||
text: '3',
|
||||
color: '#feb24c',
|
||||
}, {
|
||||
text: '2',
|
||||
color: '#fed976',
|
||||
}, {
|
||||
text: '1',
|
||||
color: '#ffe8a9',
|
||||
}, {
|
||||
text: 'None',
|
||||
color: '#0C7BDC'
|
||||
}
|
||||
],
|
||||
[Category.Resilience]: [
|
||||
{
|
||||
mapStyle: 'disaster_severity',
|
||||
legend: {
|
||||
title: 'Severity of damage',
|
||||
description: 'Severity of damage to building',
|
||||
elements: [
|
||||
{
|
||||
text: 'Building destroyed',
|
||||
color: '#bd0026',
|
||||
}, {
|
||||
text: 'Very severe',
|
||||
color: '#e31a1c',
|
||||
}, {
|
||||
text: 'Severe',
|
||||
color: '#fc4e2a',
|
||||
}, {
|
||||
text: 'Moderate',
|
||||
color: '#fd8d3c',
|
||||
}, {
|
||||
text: 'Minimal ',
|
||||
color: '#feb24c',
|
||||
}, {
|
||||
text: 'No damage visible',
|
||||
color: '#fed976',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}]
|
||||
{
|
||||
mapStyle: 'dynamics_demolished_count',
|
||||
legend: {
|
||||
title: 'Resilience',
|
||||
description: 'Demolished buildings on the same site',
|
||||
elements: [
|
||||
{
|
||||
text: '7+',
|
||||
color: '#bd0026',
|
||||
}, {
|
||||
text: '6',
|
||||
color: '#e31a1c',
|
||||
}, {
|
||||
text: '5',
|
||||
color: '#fc4e2a',
|
||||
}, {
|
||||
text: '4',
|
||||
color: '#fd8d3c',
|
||||
}, {
|
||||
text: '3',
|
||||
color: '#feb24c',
|
||||
}, {
|
||||
text: '2',
|
||||
color: '#fed976',
|
||||
}, {
|
||||
text: '1',
|
||||
color: '#ffe8a9',
|
||||
}, {
|
||||
text: 'None',
|
||||
color: '#0C7BDC'
|
||||
}
|
||||
],
|
||||
},
|
||||
}
|
||||
]
|
||||
|
||||
};
|
||||
|
@ -1,31 +1,31 @@
|
||||
import { Category } from './categories-config';
|
||||
|
||||
import AgeContainer from '../building/data-containers/age';
|
||||
import AgeContainer from '../building/data-containers/age-history';
|
||||
import CommunityContainer from '../building/data-containers/community';
|
||||
import ConstructionContainer from '../building/data-containers/construction';
|
||||
import ResilienceContainer from '../building/data-containers/resilience';
|
||||
import LocationContainer from '../building/data-containers/location';
|
||||
import PlanningContainer from '../building/data-containers/planning';
|
||||
import SizeContainer from '../building/data-containers/size';
|
||||
import StreetscapeContainer from '../building/data-containers/streetscape';
|
||||
import SustainabilityContainer from '../building/data-containers/sustainability';
|
||||
import StreetscapeContainer from '../building/data-containers/street-context';
|
||||
import SustainabilityContainer from '../building/data-containers/energy-performance';
|
||||
import TeamContainer from '../building/data-containers/team';
|
||||
import TypeContainer from '../building/data-containers/type';
|
||||
import UseContainer from '../building/data-containers/use';
|
||||
import TypeContainer from '../building/data-containers/typology';
|
||||
import UseContainer from '../building/data-containers/land-use';
|
||||
|
||||
import { DataContainerType } from '../building/data-container';
|
||||
|
||||
export const categoryUiConfig: {[key in Category]: DataContainerType} = {
|
||||
[Category.Location]: LocationContainer,
|
||||
[Category.LandUse]: UseContainer,
|
||||
[Category.Type]: TypeContainer,
|
||||
[Category.Typology]: TypeContainer,
|
||||
[Category.Age]: AgeContainer,
|
||||
[Category.Size]: SizeContainer,
|
||||
[Category.Construction]: ConstructionContainer,
|
||||
[Category.Streetscape]: StreetscapeContainer,
|
||||
[Category.StreetContext]: StreetscapeContainer,
|
||||
[Category.Team]: TeamContainer,
|
||||
[Category.Planning]: PlanningContainer,
|
||||
[Category.Sustainability]: SustainabilityContainer,
|
||||
[Category.EnergyPerformance]: SustainabilityContainer,
|
||||
[Category.Resilience]: ResilienceContainer,
|
||||
[Category.Community]: CommunityContainer,
|
||||
};
|
||||
|
@ -1,5 +1,21 @@
|
||||
import { Category } from './categories-config';
|
||||
import { CCConfig } from '../../cc-config';
|
||||
let ccconfig: CCConfig = require('../../cc-config.json')
|
||||
|
||||
/*
|
||||
* Common list of Source Types, used in multiple menus
|
||||
*/
|
||||
export const commonSourceTypes = [
|
||||
"Assessed by eye",
|
||||
"Assessed using expert knowledge of building or building type",
|
||||
"Assessed using streetview photographs or satellite imagery",
|
||||
"Assessed by specialist emergency group",
|
||||
"Live streamed from a government source",
|
||||
"Current government record/dataset",
|
||||
"Independently managed public database",
|
||||
"Commercial database",
|
||||
"Inferred computationally using existing open attribute data",
|
||||
];
|
||||
|
||||
/**
|
||||
* This interface is used only in code which uses dataFields, not in the dataFields definition itself
|
||||
@ -14,7 +30,7 @@ export interface DataFieldDefinition {
|
||||
* A field could be displayed in several categories, but this value will be used
|
||||
* when a single category needs to be shown in the context of a field, e.g.
|
||||
* in the case of edit history or the copy-paste tool (multi-edit)
|
||||
* */
|
||||
* */
|
||||
category: Category;
|
||||
|
||||
/**
|
||||
@ -40,7 +56,7 @@ export interface DataFieldDefinition {
|
||||
/**
|
||||
* If the defined type is a dictionary, this describes the types of the dictionary's fields
|
||||
*/
|
||||
fields?: { [key: string]: Omit<DataFieldDefinition, 'category'>}
|
||||
fields?: { [key: string]: Omit<DataFieldDefinition, 'category'> }
|
||||
|
||||
/**
|
||||
* The example is used to determine the runtime type in which the attribute data is stored (e.g. number, string, object)
|
||||
@ -73,7 +89,7 @@ export const buildingUserFields = {
|
||||
community_type_worth_keeping: {
|
||||
perUser: true,
|
||||
category: Category.Community,
|
||||
title: "Do you think this **type** of building is contributes to the city?",
|
||||
title: "Do you think this **type** of building contributes to the city?",
|
||||
example: true,
|
||||
},
|
||||
community_type_worth_keeping_reasons: {
|
||||
@ -109,7 +125,7 @@ export const buildingUserFields = {
|
||||
other: false
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
community_local_significance: {
|
||||
perUser: true,
|
||||
category: Category.Community,
|
||||
@ -128,8 +144,8 @@ export const buildingUserFields = {
|
||||
export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
location_name: {
|
||||
category: Category.Location,
|
||||
title: "Building Name (Information link)",
|
||||
tooltip: "Link to a website with information on the building, not needed for most.",
|
||||
title: "Building name (non-domestic)",
|
||||
tooltip: "Link to a website with the name of the building.<br/><br/>(For security reasons, we currently only collect the names of non-residential buildings).",
|
||||
example: "https://en.wikipedia.org/wiki/Palace_of_Westminster",
|
||||
},
|
||||
location_number: {
|
||||
@ -152,23 +168,36 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
location_town: {
|
||||
category: Category.Location,
|
||||
title: "Town",
|
||||
title: "Town/City",
|
||||
example: "London",
|
||||
//tooltip: ,
|
||||
},
|
||||
location_postcode: {
|
||||
category: Category.Location,
|
||||
title: "Postcode",
|
||||
title: "Area code/"+ccconfig.postcode,
|
||||
example: "W1W 6TR",
|
||||
//tooltip: ,
|
||||
},
|
||||
location_address_source: {
|
||||
category: Category.Location,
|
||||
title: "Source type",
|
||||
example: "",
|
||||
tooltip: "Source of address data.",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
location_address_links: {
|
||||
category: Category.Location,
|
||||
title: "Source link(s)",
|
||||
tooltip: "URL(s) for building address data source(s).",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
ref_toid: {
|
||||
category: Category.Location,
|
||||
title: "Building Footprint ID",
|
||||
title: "Building footprint ID",
|
||||
tooltip: "Ordnance Survey Topography Layer ID (TOID) [<a href='https://www.ordnancesurvey.co.uk/business-government/products/open-toid'>link</a>]",
|
||||
example: "",
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* UPRNs is not part of the buildings table, but the string fields
|
||||
* are included here for completeness
|
||||
@ -176,17 +205,17 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
uprns: {
|
||||
category: Category.Location,
|
||||
title: "Unique Property Reference Number(s) (UPRN)",
|
||||
tooltip: "Unique Property Reference Numbers (to be filled automatically)",
|
||||
example: [{uprn: "", parent_uprn: "" }, {uprn: "", parent_uprn: "" }],
|
||||
tooltip: "Unique Property Reference Numbers (to be filled automatically) [<a href='https://beta.ordnancesurvey.co.uk/products/os-open-uprn'>LINK</a>]",
|
||||
example: [{ uprn: "", parent_uprn: "" }, { uprn: "", parent_uprn: "" }],
|
||||
},
|
||||
|
||||
planning_data: {
|
||||
category: Category.Location,
|
||||
title: "PLANNING DATA",
|
||||
tooltip: "PLANNING DATA",
|
||||
example: [{uprn: "", building_id: 1, data_source: ""},
|
||||
{uprn: "", building_id: 1, data_source: "", status: "", status_before_aliasing: "", decision_date: "", description: "", planning_application_link: "", registered_with_local_authority_date: "", last_synced_date: "", data_source_link: "", address: ""},
|
||||
],
|
||||
example: [{ uprn: "", building_id: 1, data_source: "" },
|
||||
{ uprn: "", building_id: 1, data_source: "", status: "", status_before_aliasing: "", decision_date: "", description: "", planning_application_link: "", registered_with_local_authority_date: "", last_synced_date: "", data_source_link: "", address: "" },
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
@ -198,30 +227,44 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
location_latitude: {
|
||||
category: Category.Location,
|
||||
title: "Latitude",
|
||||
title: "Centroid latitude",
|
||||
tooltip: "Latitude of building centroid",
|
||||
example: 12.4564,
|
||||
},
|
||||
location_longitude: {
|
||||
category: Category.Location,
|
||||
title: "Longitude",
|
||||
title: "Centroid longitude",
|
||||
tooltip: "Longitude of building centroid",
|
||||
example: 0.12124,
|
||||
},
|
||||
|
||||
location_coordinates_source: {
|
||||
category: Category.Location,
|
||||
title: "Source type",
|
||||
example: "",
|
||||
tooltip: "Source of lcoordinate data.",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
location_coordinates_links: {
|
||||
category: Category.Location,
|
||||
title: "Source link(s)",
|
||||
tooltip: "URL(s) for building coordinate data source(s).",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
current_landuse_group: {
|
||||
category: Category.LandUse,
|
||||
title: "Current Land Use (Group)",
|
||||
title: "Current land use(s)",
|
||||
tooltip: "Land use Groups as classified by [NLUD](https://www.gov.uk/government/statistics/national-land-use-database-land-use-and-land-cover-classification)",
|
||||
example: ["", ""],
|
||||
},
|
||||
current_landuse_order: {
|
||||
category: Category.LandUse,
|
||||
title: "Current Land Use (Order)",
|
||||
title: "Current land use (order)",
|
||||
tooltip: "Land use Order as classified by [NLUD](https://www.gov.uk/government/statistics/national-land-use-database-land-use-and-land-cover-classification)",
|
||||
example: "",
|
||||
},
|
||||
current_landuse_source: {
|
||||
category: Category.LandUse,
|
||||
title: "Source of information",
|
||||
title: "Source type",
|
||||
tooltip: "Source for the current land use",
|
||||
example: "",
|
||||
items: [
|
||||
@ -242,8 +285,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
current_landuse_link: {
|
||||
category: Category.LandUse,
|
||||
title: "Source Links",
|
||||
tooltip: "URL for current land use reference",
|
||||
title: "Source link(s)",
|
||||
tooltip: "URL(s) for current land use reference",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
current_landuse_verified: {
|
||||
@ -252,14 +295,14 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
example: true,
|
||||
},
|
||||
building_attachment_form: {
|
||||
category: Category.Type,
|
||||
title: "Adjacency/configuration",
|
||||
category: Category.Typology,
|
||||
title: "Attachment type/adjacency",
|
||||
tooltip: "We have prepopulated these based on their current attachment. A building can either be detached, semi-detached or part of a terrace (middle or end)",
|
||||
example: "",
|
||||
},
|
||||
date_change_building_use: {
|
||||
category: Category.Type,
|
||||
title:"When did use change?",
|
||||
category: Category.Typology,
|
||||
title: "When did use change?",
|
||||
tooltip: "This is the date the building stopped being used for for the function it was built for. I.e. if it was Victorian warehouse which is now an office this would be when it became an office or if it was something before that, maybe a garage then the date that happened",
|
||||
example: 1920,
|
||||
},
|
||||
@ -268,28 +311,27 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
* Slug needs to be adjusted if the db column will be named differently
|
||||
*/
|
||||
original_building_use: {
|
||||
category: Category.Type,
|
||||
category: Category.Typology,
|
||||
title: "Original building use",
|
||||
tooltip: "What was the building originally used for when it was built? I.e. If it was Victorian warehouse which is now an office this would be warehouse",
|
||||
tooltip: "What was the building <u><i>originally</i></u> used for when it was built?",
|
||||
example: "",
|
||||
},
|
||||
|
||||
size_roof_shape: {
|
||||
category: Category.Type,
|
||||
category: Category.Typology,
|
||||
title: "Roof type",
|
||||
example: "",
|
||||
//tooltip: ,
|
||||
},
|
||||
|
||||
date_year: {
|
||||
category: Category.Age,
|
||||
title: "Year built (best estimate)",
|
||||
title: "Year of construction of main building (best estimate)",
|
||||
tooltip: "Best estimate for construction of main body of the building.",
|
||||
example: 1924,
|
||||
},
|
||||
date_lower : {
|
||||
date_lower: {
|
||||
category: Category.Age,
|
||||
title: "Earliest possible start year",
|
||||
tooltip: "This should be the earliest year in which building could have started.",
|
||||
tooltip: "This should be the earliest year in which construction could have started.",
|
||||
example: 1900,
|
||||
},
|
||||
date_upper: {
|
||||
@ -300,14 +342,14 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
facade_year: {
|
||||
category: Category.Age,
|
||||
title: "Date of Front of Building",
|
||||
title: "Date of front of building",
|
||||
tooltip: "Best estimate",
|
||||
example: 1900,
|
||||
},
|
||||
date_source: {
|
||||
category: Category.Age,
|
||||
title: "Source of information",
|
||||
tooltip: "Source for the main start date",
|
||||
title: "Source type",
|
||||
tooltip: "Source type for the building dates above",
|
||||
items: [
|
||||
"Expert knowledge of building",
|
||||
"Expert estimate from image",
|
||||
@ -334,40 +376,79 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
date_link: {
|
||||
category: Category.Age,
|
||||
title: "Text and Image Links",
|
||||
title: "Source link(s)",
|
||||
tooltip: "URL for age and date reference",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
|
||||
size_storeys_core: {
|
||||
category: Category.Size,
|
||||
title: "Core Number of Floors",
|
||||
title: "Core number of floors",
|
||||
tooltip: "How many floors are there between the pavement and start of roof?",
|
||||
example: 10,
|
||||
},
|
||||
size_storeys_attic: {
|
||||
category: Category.Size,
|
||||
title: "Number of Floors within Roof Space",
|
||||
title: "Number of floors within roof space",
|
||||
tooltip: "How many floors above start of roof?",
|
||||
example: 1,
|
||||
},
|
||||
size_storeys_basement: {
|
||||
category: Category.Size,
|
||||
title: "Number of Floors beneath Ground Level",
|
||||
title: "Number of floors beneath ground Level",
|
||||
tooltip: "How many floors below pavement level?",
|
||||
example: 1,
|
||||
},
|
||||
size_storeys_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of building floors data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
size_storeys_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for building floors data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
size_height_apex: {
|
||||
category: Category.Size,
|
||||
title: "Height to apex (m)",
|
||||
example: 100.5,
|
||||
//tooltip: ,
|
||||
tooltip: "i.e. the highest part of the roof.",
|
||||
},
|
||||
size_height_apex_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of building height (apex) data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
size_height_apex_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for building height (apex) source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
size_height_eaves: {
|
||||
category: Category.Size,
|
||||
title: "Height to eaves (m)",
|
||||
example: 20.33,
|
||||
//tooltip: ,
|
||||
tooltip: "i.e. to where the top of the wall meets the roof",
|
||||
},
|
||||
size_height_eaves_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of building height (eaves) data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
size_height_eaves_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for building height (eaves) source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
size_floor_area_ground: {
|
||||
category: Category.Size,
|
||||
@ -381,12 +462,38 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
example: 2001.7,
|
||||
//tooltip: ,
|
||||
},
|
||||
size_floor_area_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of floor area data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
size_floor_area_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for floor area data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
size_width_frontage: {
|
||||
category: Category.Size,
|
||||
title: "Frontage Width (m)",
|
||||
title: "Frontage width (m)",
|
||||
example: 12.2,
|
||||
//tooltip: ,
|
||||
},
|
||||
size_width_frontage_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of building frontage data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
size_width_frontage_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for building frontage source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
|
||||
size_configuration: {
|
||||
category: Category.Size,
|
||||
@ -396,65 +503,123 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
|
||||
size_plot_area_total: {
|
||||
category: Category.Streetscape,
|
||||
category: Category.StreetContext,
|
||||
title: "Total area of plot (m²)",
|
||||
example: 123.02,
|
||||
//tooltip: ,
|
||||
tooltip: "Total area of plot (m²)",
|
||||
},
|
||||
size_plot_area_total_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of plot area data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
size_plot_area_total_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for plot area data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
size_far_ratio: {
|
||||
category: Category.Streetscape,
|
||||
category: Category.StreetContext,
|
||||
title: "FAR ratio (percentage of plot covered by building)",
|
||||
example: 0.1,
|
||||
//tooltip: ,
|
||||
example: 1.0,
|
||||
tooltip: "boobs",
|
||||
},
|
||||
size_far_ratio_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of FAR ratio data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
size_far_ratio_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for FAR ratio data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
size_parcel_geometry: {
|
||||
category: Category.StreetContext,
|
||||
title: "Land parcel geometry link",
|
||||
example: "https://",
|
||||
tooltip: "INSPIRE Polygons",
|
||||
},
|
||||
size_parcel_geometry_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of parcel geometry data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
size_parcel_geometry_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for parcel geometry data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
|
||||
construction_core_material: {
|
||||
category: Category.Construction,
|
||||
title: "Core Material",
|
||||
tooltip:"The main structural material",
|
||||
title: "Core material",
|
||||
tooltip: "The main structural material",
|
||||
example: "",
|
||||
},
|
||||
|
||||
construction_secondary_materials: {
|
||||
category: Category.Construction,
|
||||
title: "Main Secondary Construction Material/s",
|
||||
tooltip:"Other construction materials",
|
||||
title: "Main secondary construction material/s",
|
||||
tooltip: "Other construction materials",
|
||||
example: "",
|
||||
},
|
||||
|
||||
construction_roof_covering: {
|
||||
category: Category.Construction,
|
||||
title: "Main Roof Covering",
|
||||
tooltip:'Main roof covering material',
|
||||
title: "Main roof covering",
|
||||
tooltip: 'Main roof covering material',
|
||||
example: "",
|
||||
},
|
||||
|
||||
sust_breeam_rating: {
|
||||
category: Category.Sustainability,
|
||||
title: "Official Environmental Quality Rating",
|
||||
tooltip: "Building Research Establishment Environmental Assessment Method (BREEAM) May not be present for many buildings",
|
||||
category: Category.EnergyPerformance,
|
||||
title: "Official environmental quality rating",
|
||||
tooltip: ccconfig.energy_rating,
|
||||
example: "",
|
||||
},
|
||||
sust_dec: {
|
||||
category: Category.Sustainability,
|
||||
category: Category.EnergyPerformance,
|
||||
title: "Non-domestic Building Energy Rating",
|
||||
tooltip: "Display Energy Certificate (DEC) Any public building should have (and display) a DEC. Showing how the energy use for that building compares to other buildings with same use",
|
||||
example: "G",
|
||||
},
|
||||
sust_aggregate_estimate_epc: {
|
||||
category: Category.Sustainability,
|
||||
category: Category.EnergyPerformance,
|
||||
title: "Domestic Building Energy Rating",
|
||||
tooltip: "Energy Performance Certificate (EPC) Any premises sold or rented is required to have an EPC to show how energy efficient it is. Only buildings rate grade E or higher may be rented",
|
||||
example: "",
|
||||
},
|
||||
sust_retrofit_date: {
|
||||
category: Category.Sustainability,
|
||||
category: Category.EnergyPerformance,
|
||||
title: "Last significant retrofit",
|
||||
tooltip: "Date of last major building refurbishment",
|
||||
example: 1920,
|
||||
},
|
||||
sust_retrofit_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of last significant retrofit data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
sust_retrofit_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for last significant retrofit data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
sust_life_expectancy: {
|
||||
category: Category.Sustainability,
|
||||
category: Category.EnergyPerformance,
|
||||
title: "Expected lifespan for typology",
|
||||
example: 123,
|
||||
//tooltip: ,
|
||||
@ -475,7 +640,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
|
||||
survival_source: {
|
||||
category: Category.Age,
|
||||
title: "Source of survival information",
|
||||
title: "Source type",
|
||||
tooltip: "Source for the survival status",
|
||||
items: [
|
||||
"Matched by comparing maps",
|
||||
@ -486,10 +651,10 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
example: "",
|
||||
},
|
||||
|
||||
survival_link: {
|
||||
survival_source_links: {
|
||||
category: Category.Age,
|
||||
title: "Please add any additional text or image links providing historical information on this building",
|
||||
tooltip: "URL for age and date reference",
|
||||
title: "Source link(s)",
|
||||
tooltip: "Links to sources of survival/historical information on this building",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
|
||||
@ -597,12 +762,29 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
example: true,
|
||||
//tooltip: ,
|
||||
},
|
||||
|
||||
is_domestic: {
|
||||
category: Category.Team,
|
||||
title: "Is the building a home/domestic building?",
|
||||
tooltip: "",
|
||||
example: "mixed domestic/non-domestic"
|
||||
tooltip: "Note: Homes used as offices for working from home should be classified as domestic.",
|
||||
example: "mixed domestic/non-domestic",
|
||||
items: [
|
||||
"Yes",
|
||||
"No",
|
||||
"Mixed domestic/non-domestic"
|
||||
]
|
||||
},
|
||||
is_domestic_source: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source of domestic/non-domestic data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
is_domestic_links: {
|
||||
category: Category.Team,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for domestic/non-domestic data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
likes_total: {
|
||||
category: Category.Community,
|
||||
@ -612,7 +794,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
community_type_worth_keeping_total: {
|
||||
category: Category.Community,
|
||||
title: "People who think this type of building is contributes to the city.",
|
||||
title: "People who think this type of building contributes to the city.",
|
||||
example: 100,
|
||||
},
|
||||
community_local_significance_total: {
|
||||
@ -650,13 +832,18 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
// title: "When was this building used for community activities?"
|
||||
// },
|
||||
|
||||
|
||||
community_public_ownership: {
|
||||
category: Category.Community,
|
||||
title: "Is the building in public/community ownership?",
|
||||
example: "Not in public/community ownership"
|
||||
example: "Privately owned (non-corporate)",
|
||||
items: [
|
||||
'Government-owned',
|
||||
'Charity-owned',
|
||||
'Community-owned/cooperative',
|
||||
'Owned by other non-profit body',
|
||||
'Not in public/community ownership'
|
||||
]
|
||||
},
|
||||
|
||||
community_public_ownership_sources: {
|
||||
category: Category.Community,
|
||||
title: "Community ownership source link",
|
||||
@ -699,12 +886,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
{
|
||||
year_constructed: { min: 1989, max: 1991 },
|
||||
year_demolished: { min: 1993, max: 1994 },
|
||||
lifespan: "2-5", overlap_present: "50%", links: ["", ""]}
|
||||
lifespan: "2-5", overlap_present: "50%", links: ["", ""]
|
||||
}
|
||||
]
|
||||
},
|
||||
has_extension: {
|
||||
category: Category.Team,
|
||||
title: "Is there an extension?",
|
||||
title: "Was a later extension added?",
|
||||
tooltip: "",
|
||||
example: false
|
||||
},
|
||||
@ -715,6 +903,19 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
tooltip_extension: "This should be the year the extension was built, not the original building",
|
||||
example: 2020
|
||||
},
|
||||
extension_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for extension data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
extension_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for extension data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
developer_type: {
|
||||
category: Category.Team,
|
||||
title: "What type of developer built the building?",
|
||||
@ -736,6 +937,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
tooltip: "Free text. First name, space, then Last name",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
developer_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for developer data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
developer_source_link: {
|
||||
category: Category.Team,
|
||||
title: "Source links for developer(s)",
|
||||
@ -748,10 +956,17 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
tooltip: "Free text. First name, space, then Last name",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
landowner_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for landowner data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
landowner_source_link: {
|
||||
category: Category.Team,
|
||||
title: "Source links for landowner(s)",
|
||||
tooltip: "URL for source for landowner(s)",
|
||||
title: "Source link(s)",
|
||||
tooltip: "URL(s) for source for landowner data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
designers: {
|
||||
@ -760,6 +975,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
tooltip: "Free text. First name, space, then Last name",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
designers_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for designer data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
designers_source_link: {
|
||||
category: Category.Team,
|
||||
title: "Source links for designer(s)",
|
||||
@ -768,7 +990,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
lead_designer_type: {
|
||||
category: Category.Team,
|
||||
title: "Which best describes the lead designer?",
|
||||
title: "Which title best describes the lead designer?",
|
||||
example: "",
|
||||
items: [
|
||||
"Landowner",
|
||||
@ -787,18 +1009,25 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
},
|
||||
awards_source_link: {
|
||||
category: Category.Team,
|
||||
title: "Source links for designer award(s)",
|
||||
title: "Source link(s) for designer award(s)",
|
||||
tooltip: "URL for source for designer award(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
builder: {
|
||||
category: Category.Team,
|
||||
title: "Name of builder/ construction team",
|
||||
title: "Name of builder/construction team",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
builder_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for builder data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
builder_source_link: {
|
||||
category: Category.Team,
|
||||
title: "Source builder/ construction team",
|
||||
title: "Source for builder/construction team",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
other_team: {
|
||||
@ -811,6 +1040,255 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
title: "Source other significant team members",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
disaster_type: {
|
||||
category: Category.Resilience,
|
||||
title: "Disaster type",
|
||||
tooltip: "What type of disaster management do you wish to collect data for?",
|
||||
example: "Flood",
|
||||
items: [
|
||||
'Flood',
|
||||
'Earthquake',
|
||||
'Hurricane',
|
||||
'Fire',
|
||||
'Extreme heat',
|
||||
'Political/war damage',
|
||||
'Other human (blast damage/spills etc.)',
|
||||
'Other'
|
||||
]
|
||||
},
|
||||
disaster_severity: {
|
||||
category: Category.Resilience,
|
||||
title: "How severe do you assess the damage to be?",
|
||||
tooltip: "Best estimate for the severity of damage to the building",
|
||||
example: "Building destroyed",
|
||||
items: [
|
||||
'Building destroyed',
|
||||
'Very severe',
|
||||
'Severe',
|
||||
'Moderate',
|
||||
'Minimal',
|
||||
'No damage visible',
|
||||
]
|
||||
},
|
||||
disaster_assessment_method: {
|
||||
category: Category.Resilience,
|
||||
title: "Source Type",
|
||||
tooltip: "Please add a Best estimate for the severity of damage to the building",
|
||||
example: "Citizen/Passerby by eye",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
disaster_source_link: {
|
||||
category: Category.Resilience,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Please add a source link(s) to official documentation/photographic evidence where applicable",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
disaster_start_date: {
|
||||
category: Category.Resilience,
|
||||
title: "What was the start date of the disaster?",
|
||||
example: "01/04/2023"
|
||||
},
|
||||
disaster_end_date: {
|
||||
category: Category.Resilience,
|
||||
title: "What was the end date of the disaster? (if applicable)",
|
||||
example: "03/04/2023"
|
||||
},
|
||||
|
||||
context_front_garden: {
|
||||
category: Category.StreetContext,
|
||||
title: "Does the building have a front garden?",
|
||||
tooltip: "Is the front garden mainly green/planted?",
|
||||
example: "",
|
||||
items: [
|
||||
"Yes",
|
||||
"No"
|
||||
]
|
||||
},
|
||||
context_back_garden: {
|
||||
category: Category.StreetContext,
|
||||
title: "Does the building have a back garden?",
|
||||
tooltip: "Is the back garden mainly green/planted?",
|
||||
example: "",
|
||||
items: [
|
||||
"Yes",
|
||||
"No"
|
||||
]
|
||||
},
|
||||
context_flats_garden: {
|
||||
category: Category.StreetContext,
|
||||
title: "Is the building flats with a dedicated green space?",
|
||||
tooltip: "If the building is a block of flats, does it have a dedicated garden area/green space?",
|
||||
example: "",
|
||||
items: [
|
||||
"Yes",
|
||||
"No"
|
||||
]
|
||||
},
|
||||
context_garden_source_type: {
|
||||
category: Category.StreetContext,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for garden data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
context_garden_source_links: {
|
||||
category: Category.StreetContext,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for garden data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
context_street_width: {
|
||||
category: Category.Team,
|
||||
title: "Street width (m)",
|
||||
tooltip: "Width of the street in metres.",
|
||||
example: 10
|
||||
},
|
||||
context_street_width_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for street width data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
context_street_width_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for street width data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
context_pavement_width: {
|
||||
category: Category.Team,
|
||||
title: "Pavement width (m)",
|
||||
tooltip: "Width of the pavement in metres.",
|
||||
example: 10
|
||||
},
|
||||
context_pavement_width_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for pavement width data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
context_pavement_width_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for pavement width data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
context_green_space_distance: {
|
||||
category: Category.Team,
|
||||
title: "Distance to nearest green space (m)",
|
||||
tooltip: "Approximate distance from the front door of the building to the nearest public green space.",
|
||||
example: 10
|
||||
},
|
||||
context_green_space_distance_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for green space data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
context_green_space_distance_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for green space data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
context_tree_distance: {
|
||||
category: Category.Team,
|
||||
title: "Distance to nearest tree (m)",
|
||||
tooltip: "Approximate distance from the front door of the building to the nearest tree.",
|
||||
example: 10
|
||||
},
|
||||
context_tree_distance_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for tree data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
context_tree_distance_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for tree data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
context_street_geometry: {
|
||||
category: Category.Team,
|
||||
title: "Street network geometry link",
|
||||
tooltip: "Link to a website with the name of the building..",
|
||||
example: "https://en.wikipedia.org/",
|
||||
},
|
||||
context_street_geometry_source_type: {
|
||||
category: Category.Team,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for tree data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
context_street_geometry_source_links: {
|
||||
category: Category.Team,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for tree data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
age_cladding_date: {
|
||||
category: Category.Age,
|
||||
title: "Cladding date",
|
||||
tooltip: "Width of the street in metres.",
|
||||
example: 1970
|
||||
},
|
||||
age_cladding_date_source_type: {
|
||||
category: Category.Age,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for street width data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
age_cladding_date_source_links: {
|
||||
category: Category.Age,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for street width data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
age_extension_date: {
|
||||
category: Category.Age,
|
||||
title: "Date of significant extensions",
|
||||
tooltip: "Width of the street in metres.",
|
||||
example: 1970
|
||||
},
|
||||
age_extension_date_source_type: {
|
||||
category: Category.Age,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for street width data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
age_extension_date_source_links: {
|
||||
category: Category.Age,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for street width data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
age_retrofit_date: {
|
||||
category: Category.Age,
|
||||
title: "Date of significant retrofits",
|
||||
tooltip: "Width of the street in metres.",
|
||||
example: 1970
|
||||
},
|
||||
age_retrofit_date_source_type: {
|
||||
category: Category.Age,
|
||||
title: "Source type",
|
||||
tooltip: "Source type for street width data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
age_retrofit_date_source_links: {
|
||||
category: Category.Age,
|
||||
title: "Source link(s)",
|
||||
tooltip: "Source link(s) for street width data",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
};
|
||||
|
||||
export const allFieldsConfig = {...dataFields, ...buildingUserFields};
|
||||
export const allFieldsConfig = { ...dataFields, ...buildingUserFields };
|
@ -3,7 +3,8 @@
|
||||
* Adjust the values here if modifying the list of styles in the tileserver.
|
||||
*/
|
||||
|
||||
export type BuildingMapTileset = 'date_year' |
|
||||
export type BuildingMapTileset =
|
||||
'date_year' |
|
||||
'size_height' |
|
||||
'construction_core_material' |
|
||||
'location' |
|
||||
@ -21,6 +22,7 @@ export type BuildingMapTileset = 'date_year' |
|
||||
'building_attachment_form' |
|
||||
'landuse' |
|
||||
'dynamics_demolished_count' |
|
||||
'disaster_severity' |
|
||||
'team' |
|
||||
'survival_status';
|
||||
|
||||
|
@ -37,12 +37,12 @@
|
||||
.map-switcher-inline.disabled-state,
|
||||
.map-button.disabled-state,
|
||||
.map-button.disabled-state .btn{
|
||||
background-color: #df7474;
|
||||
background-color: #8c8fd9;
|
||||
}
|
||||
.map-switcher-inline.night.disabled-state,
|
||||
.map-button.night.disabled-state,
|
||||
.map-button.night.disabled-state .btn{
|
||||
background-color: #b03f3f;
|
||||
background-color: #333699;
|
||||
}
|
||||
.map-button.enabled-state {
|
||||
color: #75e775;
|
||||
|
@ -59,10 +59,10 @@
|
||||
.background-location {
|
||||
background-color: #f7c625;
|
||||
}
|
||||
.background-use {
|
||||
.background-land-use {
|
||||
background-color: #f7ec25;
|
||||
}
|
||||
.background-type {
|
||||
.background-typology {
|
||||
background-color: #f77d11;
|
||||
}
|
||||
.background-age {
|
||||
@ -74,7 +74,7 @@
|
||||
.background-construction {
|
||||
background-color: #f2a2b9;
|
||||
}
|
||||
.background-streetscape {
|
||||
.background-street-context {
|
||||
background-color: #718899;
|
||||
}
|
||||
.background-team {
|
||||
@ -83,7 +83,7 @@
|
||||
.background-planning {
|
||||
background-color: #57c28e;
|
||||
}
|
||||
.background-sustainability {
|
||||
.background-energy-performance {
|
||||
background-color: #6bb1e3;
|
||||
}
|
||||
.background-resilience {
|
||||
|
@ -49,10 +49,9 @@ article .color-block {
|
||||
}
|
||||
hr {
|
||||
display: block;
|
||||
height: 1px;
|
||||
border: 0;
|
||||
background: #000;
|
||||
height: 0px;
|
||||
border: 1px solid #ccc;
|
||||
width: 100%;
|
||||
margin: 2em 0;
|
||||
margin: 1.0em 0 0.8em 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -266,6 +266,13 @@ const LAYER_QUERIES = {
|
||||
buildings
|
||||
WHERE
|
||||
current_landuse_order IS NOT NULL`,
|
||||
disaster_severity: `
|
||||
SELECT
|
||||
geometry_id,
|
||||
disaster_severity
|
||||
FROM
|
||||
buildings
|
||||
WHERE disaster_severity IS NOT NULL`,
|
||||
dynamics_demolished_count: `
|
||||
SELECT
|
||||
geometry_id,
|
||||
|
@ -39,8 +39,12 @@ This is the main table, containing almost all data collected by Colouring London
|
||||
- `location_line_two`: additional address line
|
||||
- `location_town`: town
|
||||
- `location_postcode`: postcode
|
||||
- `location_address_source`: type of source used for address data
|
||||
- `location_address_links`: link to source used for address data
|
||||
- `location_latitude`: latitude
|
||||
- `location_longitude`: longitude
|
||||
- `location_coordinates_source`: source type of coordinate data
|
||||
- `location_coordinates_links`: source links for coordinate data
|
||||
- `current_landuse_group`: current land use group
|
||||
- `current_landuse_order`: current land use order
|
||||
- `building_attachment_form`: building attachment form
|
||||
@ -59,9 +63,18 @@ This is the main table, containing almost all data collected by Colouring London
|
||||
- `size_storeys_attic`: number of attic storeys
|
||||
- `size_storeys_core`: number of core storeys
|
||||
- `size_storeys_basement`: number of basement storeys
|
||||
- `size_storeys_source_type`: source type for number of storeys
|
||||
- `size_storeys_source_links`: source links for number of storeys
|
||||
- `size_height_apex`: height in metres to the building apex
|
||||
- `size_height_apex_source_type`: source of apex height data
|
||||
- `size_height_apex_source_links`: links to apex height data
|
||||
- `size_height_eaves`: height in metres to the building eaves
|
||||
- `size_height_eaves_source_type`: source of eaves height data
|
||||
- `size_height_eaves_source_links`: links to eaves height data
|
||||
- `size_floor_area_ground`: ground floor floor area in square metres
|
||||
- `size_floor_area_total`: total floor area in square metres
|
||||
- `size_floor_area_source_type`: source of floor area data
|
||||
- `size_floor_area_source_links`: link(s) to floor area data
|
||||
- `size_width_frontage`: width of frontage in metres
|
||||
- `construction_core_material`: main structural material
|
||||
- `construction_secondary_materials`: other structural materials
|
||||
@ -85,6 +98,12 @@ This is the main table, containing almost all data collected by Colouring London
|
||||
- `planning_local_list_url`: local list reference link
|
||||
- `planning_historic_area_assessment_url`: historic area assessment reference link
|
||||
- `likes_total`: number of times the building has been liked by Colouring London users
|
||||
- `is_domestic`: is the building domestic/non-domestic/mixed
|
||||
- `is_domestic_source`: domestic data source type,
|
||||
- `is_domestic_links`: domestic data source links,
|
||||
- `survival_status`: survival status compared to historical maps,
|
||||
- `survival_source`: source of survival data,
|
||||
- `survival_links`: link(s) to survival data source,
|
||||
|
||||
|
||||
## Building UPRNs
|
||||
|
@ -9,6 +9,8 @@ COPY (SELECT
|
||||
location_line_two,
|
||||
location_town,
|
||||
location_postcode,
|
||||
location_address_source,
|
||||
location_address_links,
|
||||
location_latitude,
|
||||
location_longitude,
|
||||
current_landuse_group,
|
||||
@ -29,9 +31,18 @@ COPY (SELECT
|
||||
size_storeys_attic,
|
||||
size_storeys_core,
|
||||
size_storeys_basement,
|
||||
size_storeys_source_type,
|
||||
size_storeys_source_links,
|
||||
size_height_apex,
|
||||
size_height_apex_source_type,
|
||||
size_height_apex_source_links,
|
||||
size_height_eaves,
|
||||
size_height_eaves_source_type,
|
||||
size_height_eaves_source_links,
|
||||
size_floor_area_ground,
|
||||
size_floor_area_total,
|
||||
size_floor_area_source_type,
|
||||
size_floor_area_source_links,
|
||||
size_width_frontage,
|
||||
sust_breeam_rating,
|
||||
sust_dec,
|
||||
@ -55,10 +66,57 @@ COPY (SELECT
|
||||
planning_local_list_url,
|
||||
planning_historic_area_assessment_url,
|
||||
is_domestic,
|
||||
is_domestic_source,
|
||||
is_domestic_links,
|
||||
community_type_worth_keeping_total,
|
||||
likes_total,
|
||||
survival_status,
|
||||
survival_source
|
||||
survival_source,
|
||||
survival_source_links,
|
||||
disaster_type,
|
||||
disaster_severity,
|
||||
disaster_assessment_method,
|
||||
disaster_source_link,
|
||||
disaster_start_date,
|
||||
disaster_end_date,
|
||||
size_far_ratio,
|
||||
size_far_ratio_source_type,
|
||||
size_far_ratio_source_links,
|
||||
size_plot_area_total,
|
||||
size_plot_area_total_source_type,
|
||||
size_plot_area_total_source_links,
|
||||
size_parcel_geometry,
|
||||
size_parcel_geometry_source_type,
|
||||
size_parcel_geometry_source_links,
|
||||
context_front_garden,
|
||||
context_back_garden,
|
||||
context_flats_garden,
|
||||
context_garden_source_type,
|
||||
context_garden_source_type,
|
||||
context_street_width,
|
||||
context_street_width_source_type,
|
||||
context_street_width_source_links,
|
||||
context_pavement_width,
|
||||
context_pavement_width_source_type,
|
||||
context_pavement_width_source_links,
|
||||
context_street_geometry,
|
||||
context_street_geometry_source_type,
|
||||
context_street_geometry_source_links,
|
||||
context_green_space_distance,
|
||||
context_green_space_distance,
|
||||
context_green_space_distance_source_links,
|
||||
context_tree_distance,
|
||||
context_tree_distance_source_type,
|
||||
context_tree_distance_source_links,
|
||||
age_cladding_date,
|
||||
age_cladding_date_source_type,
|
||||
age_cladding_date_source_links,
|
||||
age_extension_date,
|
||||
age_extension_date_source_type,
|
||||
age_extension_date_source_links,
|
||||
age_retrofit_date,
|
||||
age_retrofit_date_source_type,
|
||||
age_retrofit_date_source_links,
|
||||
FROM buildings)
|
||||
TO '/tmp/building_attributes.csv'
|
||||
WITH CSV HEADER
|
||||
|
6
migrations/039.disaster_status.down.sql
Normal file
6
migrations/039.disaster_status.down.sql
Normal file
@ -0,0 +1,6 @@
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS disaster_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS disaster_severity;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS disaster_assessment_method;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS disaster_source_link;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS disaster_start_date;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS disaster_end_date;
|
6
migrations/039.disaster_status.up.sql
Normal file
6
migrations/039.disaster_status.up.sql
Normal file
@ -0,0 +1,6 @@
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS disaster_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS disaster_severity text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS disaster_assessment_method text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS disaster_source_link text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS disaster_start_date date;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS disaster_end_date date;
|
59
migrations/040.ui_revamp_sources.down.sql
Normal file
59
migrations/040.ui_revamp_sources.down.sql
Normal file
@ -0,0 +1,59 @@
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS location_address_source;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS location_address_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS location_coordinates_source;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS location_coordinates_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS is_domestic_source;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS is_domestic_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_storeys_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_storeys_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_apex_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_apex_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_eaves_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_eaves_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_height_eaves;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_width_frontage_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_width_frontage_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS survival_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS landowner_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS designers_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS builder_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS extension_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS extension_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_far_ratio;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_far_ratio_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_far_ratio_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_plot_area_total;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_plot_area_total_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_plot_area_total_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_parcel_geometry;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_parcel_geometry_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS size_parcel_geometry_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_front_garden;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_back_garden;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_flats_garden;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_garden_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_garden_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_street_width;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_street_width_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_street_width_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_pavement_width;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_pavement_width_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_pavement_width_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_green_space_distance;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_green_space_distance_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_green_space_distance_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_tree_distance;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_tree_distance_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_tree_distance_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_street_geometry;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_street_geometry_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS context_street_geometry_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_cladding_date;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_cladding_date_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_cladding_date_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_extension_date;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_extension_date_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_extension_date_source_links;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_retrofit_date;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_retrofit_date_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS age_retrofit_date_source_links;
|
61
migrations/040.ui_revamp_sources.up.sql
Normal file
61
migrations/040.ui_revamp_sources.up.sql
Normal file
@ -0,0 +1,61 @@
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_address_source text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_address_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_coordinates_source text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_coordinates_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS is_domestic_source text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS is_domestic_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_storeys_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_storeys_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_apex_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_apex_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_eaves_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_eaves_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_height_eaves text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_floor_area_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_floor_area_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_width_frontage_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_width_frontage_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS survival_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS landowner_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS builder_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS extension_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS extension_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_far_ratio text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_far_ratio_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_far_ratio_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_plot_area_total text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_plot_area_total_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_plot_area_total_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_parcel_geometry text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_parcel_geometry_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS size_parcel_geometry_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_front_garden text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_back_garden text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_flats_garden text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_garden_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_garden_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_street_width text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_street_width_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_street_width_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_pavement_width text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_pavement_width_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_pavement_width_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_green_space_distance text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_green_space_distance_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_green_space_distance_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_tree_distance text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_tree_distance_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_tree_distance_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_street_geometry text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_street_geometry_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_street_geometry_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_cladding_date text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_cladding_date_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_cladding_date_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_extension_date text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_extension_date_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_extension_date_source_links text[];
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_retrofit_date text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_retrofit_date_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_retrofit_date_source_links text[];
|
Loading…
Reference in New Issue
Block a user