From 863a807aabd7e76c9e17f9e7ddf7f190a475963d Mon Sep 17 00:00:00 2001 From: Luca Haid Date: Fri, 26 Sep 2025 12:11:04 +0200 Subject: [PATCH] fixed not2connect markers --- .../PreorderRimoTypeMap/PreorderRimoTypeMap.css | 2 +- .../PreorderRimoTypeMap/PreorderRimoTypeMap.js | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/public/js/pages/PreorderRimoTypeMap/PreorderRimoTypeMap.css b/public/js/pages/PreorderRimoTypeMap/PreorderRimoTypeMap.css index ddd526f1c..5479da9d0 100644 --- a/public/js/pages/PreorderRimoTypeMap/PreorderRimoTypeMap.css +++ b/public/js/pages/PreorderRimoTypeMap/PreorderRimoTypeMap.css @@ -348,4 +348,4 @@ div.leaflet-marker-icon.custom-div-icon { .marker-multiple-dwelling { background-color: #6f42c1; } .marker-public { background-color: #17a2b8; } .marker-other { background-color: #bf2d69; } -.marker-gross { background-color: #6c757d; } \ No newline at end of file +.marker-not-to-conenct { background-color: #6c757d !important; } \ No newline at end of file diff --git a/public/js/pages/PreorderRimoTypeMap/PreorderRimoTypeMap.js b/public/js/pages/PreorderRimoTypeMap/PreorderRimoTypeMap.js index 665229c08..11e83635b 100644 --- a/public/js/pages/PreorderRimoTypeMap/PreorderRimoTypeMap.js +++ b/public/js/pages/PreorderRimoTypeMap/PreorderRimoTypeMap.js @@ -34,7 +34,6 @@ Vue.component('PreorderRimoTypeMap', { 'multiple-dwelling': {text: 'Mehrfamilienhaus', icon: 'fas fa-city', color: '#6f42c1'}, public: {text: 'Öffentlich', icon: 'fas fa-school', color: '#17a2b8'}, other: {text: 'Andere', icon: 'fas fa-question-circle', color: '#bf2d69'}, - gross: {text: 'Großanschluss', icon: 'fas fa-industry', color: '#6c757d'} } }), computed: { @@ -186,7 +185,8 @@ Vue.component('PreorderRimoTypeMap', { groupedData[latLngKey].original_items.push(item); }); return Object.values(groupedData).map(group => { - const rimoType = group.rimo_op_state === 'Not2Connect' ? 'gross' : this.getNormalizedRimoType(group.rimo_type); + const isNot2Connect = group.rimo_op_state === 'Not2Connect'; + const rimoType = this.getNormalizedRimoType(group.rimo_type); const markerIcon = this.getMarkerIcon(rimoType); const fault = this.faults[group.hausnummer_id]; const hasFault = fault && !fault.done && (fault.reasons.length > 0 || (fault.other && fault.other.trim() !== '')); @@ -196,7 +196,7 @@ Vue.component('PreorderRimoTypeMap', { return { lat: group.gps_lat, lng: group.gps_long, rimoType, hausnummerId: group.hausnummer_id, options: { - icon: {className: `custom-div-icon marker-${rimoType} ${hasFault ? 'marker-has-fault' : ''}`, html: `
`, iconSize: [30, 30], iconAnchor: [15, 30]}, + icon: {className: `custom-div-icon marker-${rimoType} ${hasFault ? 'marker-has-fault' : ''} ${isNot2Connect ? 'marker-not-to-conenct' : ''}`, html: `
`, iconSize: [30, 30], iconAnchor: [15, 30]}, tooltip: {content: `
H: ${group.wohneinheit_count}
B: ${group.preorder_count}
`, direction: 'bottom', className: 'marker-label', permanent: true, minZoom: 18}, asyncPopupContent: async () => this.generateBuildingPopupHtml(group), }, @@ -276,11 +276,17 @@ Vue.component('PreorderRimoTypeMap', { if (marker.tt_hausnummerId == hausnummerId) { const rimoItem = this.rawRimoData.find(item => item.hausnummer_id == hausnummerId); if (rimoItem) { - const rimoType = rimoItem.rimo_op_state === 'Not2Connect' ? 'gross' : this.getNormalizedRimoType(rimoItem.rimo_type); + const isNot2Connect = rimoItem.rimo_op_state === 'Not2Connect'; + const rimoType = this.getNormalizedRimoType(rimoItem.rimo_type); const fault = this.faults[hausnummerId]; const hasFault = fault && !fault.done; const markerIconDef = this.getMarkerIcon(rimoType); - const newIcon = L.divIcon({className: `custom-div-icon marker-${rimoType} ${hasFault ? 'marker-has-fault' : ''}`, html: `
`, iconSize: [30, 30], iconAnchor: [15, 30]}); + const newIcon = L.divIcon({ + className: `custom-div-icon marker-${rimoType} ${hasFault ? 'marker-has-fault' : ''} ${isNot2Connect ? 'marker-not-to-conenct' : ''}`, + html: `
`, + iconSize: [30, 30], + iconAnchor: [15, 30] + }); marker.setIcon(newIcon); } }