Fix errors in building techs
This commit is contained in:
@@ -140,7 +140,7 @@ GIS.buildingTechs = async function () {
|
||||
techs.addLayer(marker);
|
||||
const markerLabel = `${record.coordinates[0]} ${record.coordinates[1]}`;
|
||||
marker.options.data = record;
|
||||
marker.options.site = record.site.label;
|
||||
marker.options.site = record.site?.label;
|
||||
GisState.markers.buildingTechs[markerLabel] = marker;
|
||||
}
|
||||
|
||||
|
||||
@@ -277,18 +277,28 @@ UI.imageGallery = function (galleryId, items, video = false) {
|
||||
* @returns {string}
|
||||
*/
|
||||
UI.createBuildingTechTable = function(record) {
|
||||
return html`
|
||||
let table = html`
|
||||
<table class="table is-striped is-size-6 m-2">
|
||||
<tbody>
|
||||
<tr><th>Tecnica</th><td>${record.technique}</td></tr>
|
||||
<tr><th>Descrizione</th><td>${record.description}</td></tr>
|
||||
<tr><th>Funzione</th><td>${record.function}</td></tr>
|
||||
<tr><th>Materiale</th><td>${record.material}</td></tr>
|
||||
;`
|
||||
|
||||
if (record.site) {
|
||||
table += html`
|
||||
<tr><th>Sito</th><td>${record.site.label}</td></tr>
|
||||
`;
|
||||
}
|
||||
|
||||
table += html`
|
||||
<tr><th>Comune</th><td>${record.municipality}</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
;`
|
||||
`;
|
||||
|
||||
return table;
|
||||
}
|
||||
|
||||
export default UI;
|
||||
|
||||
Reference in New Issue
Block a user