fix: POI hinzufügen funktioniert! addStationCallback und Benutzerrechte in server URL:
This commit is contained in:
@@ -281,7 +281,10 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
|||||||
// Kontextmenü Callback für "POI hinzufügen"
|
// Kontextmenü Callback für "POI hinzufügen"
|
||||||
const addStationCallback = useCallback(
|
const addStationCallback = useCallback(
|
||||||
(event) => {
|
(event) => {
|
||||||
//console.log("Benutzerrechte zum Zeitpunkt des Aufrufs:", hasRights);
|
console.log(
|
||||||
|
"Überprüfung der Berechtigung in addStationCallback: ",
|
||||||
|
hasRights
|
||||||
|
);
|
||||||
if (hasRights) {
|
if (hasRights) {
|
||||||
setPopupCoordinates(event.latlng);
|
setPopupCoordinates(event.latlng);
|
||||||
setShowPopup(true);
|
setShowPopup(true);
|
||||||
@@ -299,7 +302,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
[hasRights]
|
[hasRights]
|
||||||
); // Abhängigkeit zu hasRights hinzufügen
|
);
|
||||||
|
|
||||||
//-----Kontextmenu----ende------------
|
//-----Kontextmenu----ende------------
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// /utils/utils.js
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import circleIcon from "../components/CircleIcon";
|
import circleIcon from "../components/CircleIcon";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user