fix: POI-Bearbeiten-Rechte geprüft, Kontextmenü & Modal korrigiert

- Rechteprüfung auf .some(r => r.IdRight === 56) umgestellt
- Bug in PoiUpdateModal behoben (falscher fetchLocationDevices Import)
- Modal öffnet sich nur mit gültigem Bearbeitungsrecht
- Version auf 1.1.159 erhöht
This commit is contained in:
ISA
2025-05-23 13:49:57 +02:00
parent e8f3ed3674
commit 28dd0006bc
6 changed files with 39 additions and 6 deletions

View File

@@ -43,7 +43,8 @@ export const setupPOIs = async (
try {
const { latitude, longitude } = parsePoint(location.position);
const poiTypName = poiTypMap.get(location.idPoiTyp) || "Unbekannt";
const canDrag = userRights ? userRights.includes(56) : false;
const canDrag = userRights ? userRights.some((r) => r.IdRight === 56) : false;
const matchingIcon = poiData.find((poi) => poi.idPoi === location.idPoi);
const iconUrl = matchingIcon ? `/img/icons/pois/${matchingIcon.path}` : "/img/icons/pois/default-icon.png";