Merge branch 'adb-rimo-map/fix-iconns' into 'master'

fixed not2connect markers

See merge request fronk/thetool!1791
This commit is contained in:
Luca Haid
2025-09-26 10:11:11 +00:00
2 changed files with 12 additions and 6 deletions

View File

@@ -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; }
.marker-not-to-conenct { background-color: #6c757d !important; }

View File

@@ -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: `<div class="rimo-marker ${markerIcon.class}"><i class="${markerIcon.icon} rimo-icon"></i></div>`, iconSize: [30, 30], iconAnchor: [15, 30]},
icon: {className: `custom-div-icon marker-${rimoType} ${hasFault ? 'marker-has-fault' : ''} ${isNot2Connect ? 'marker-not-to-conenct' : ''}`, html: `<div class="rimo-marker ${markerIcon.class}"><i class="${markerIcon.icon} rimo-icon"></i></div>`, iconSize: [30, 30], iconAnchor: [15, 30]},
tooltip: {content: `<div class="tooltip-content-wrapper${tooltipInnerClass}">H: ${group.wohneinheit_count}<br>B: ${group.preorder_count}</div>`, 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: `<div class="rimo-marker ${markerIconDef.class}"><i class="${markerIconDef.icon} rimo-icon"></i></div>`, 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: `<div class="rimo-marker ${markerIconDef.class}"><i class="${markerIconDef.icon} rimo-icon"></i></div>`,
iconSize: [30, 30],
iconAnchor: [15, 30]
});
marker.setIcon(newIcon);
}
}