- Externe Webservices von TALAS V5 integriert und geprüft (Statuscode + Antwortstruktur) - Eigene API-Endpunkte wie /api/talas_v5_DB/getDevices hinzugefügt und validiert - Prüfung von NEXT_PUBLIC_USE_MOCKS zur Vermeidung von Mockdaten in Produktion - Validierung der Umgebungsvariablen wie DB_HOST, DB_NAME und NODE_ENV ergänzt - Response-Status 200 bei vollständigem Erfolg, 207 bei Teilfehlern - Verbesserung der JSON-Antwortstruktur zur einfacheren Analyse
20 lines
682 B
JavaScript
20 lines
682 B
JavaScript
// utils/polylines/polylineSubscription.js
|
|
import { store } from "../../redux/store";
|
|
import { closePolylineContextMenu } from "../../redux/slices/polylineContextMenuSlice";
|
|
|
|
export function subscribeToPolylineContextMenu() {
|
|
store.subscribe(() => {
|
|
const state = store.getState(); // Redux-Toolkit empfohlene Methode
|
|
if (state.polylineContextMenu.forceClose) {
|
|
if (process.env.NEXT_PUBLIC_DEBUG_LOG === "true") {
|
|
console.log("🚀 Redux-Event erkannt - Kontextmenü wird geschlossen.");
|
|
}
|
|
store.dispatch(closePolylineContextMenu());
|
|
|
|
if (window.map && window.map.contextmenu) {
|
|
window.map.contextmenu.hide();
|
|
}
|
|
}
|
|
});
|
|
}
|