Fix errors in building techs

This commit is contained in:
2026-05-25 14:40:02 +02:00
parent c7c6ff2224
commit bfdcab8be3
2 changed files with 13 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -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;