diff --git a/.env.development b/.env.development index 53c6d57ea..7f83d8928 100644 --- a/.env.development +++ b/.env.development @@ -23,4 +23,4 @@ NEXT_PUBLIC_USE_MOCKS=true # z.B. http://10.10.0.13/xyz/index.aspx -> basePath in config.json auf /xyz setzen # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.359 +NEXT_PUBLIC_APP_VERSION=1.1.360 diff --git a/.env.production b/.env.production index e0a571d44..269a7b105 100644 --- a/.env.production +++ b/.env.production @@ -24,4 +24,4 @@ NEXT_PUBLIC_USE_MOCKS=false # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.359 +NEXT_PUBLIC_APP_VERSION=1.1.360 diff --git a/components/mainComponent/MapComponent.js b/components/mainComponent/MapComponent.js index 383d94916..e3fba6abb 100644 --- a/components/mainComponent/MapComponent.js +++ b/components/mainComponent/MapComponent.js @@ -39,6 +39,8 @@ import { setSelectedPoi } from "@/redux/slices/database/pois/selectedPoiSlice.js import { setDisabled } from "@/redux/slices/database/polylines/polylineEventsDisabledSlice.js"; import { setMapId, setUserId } from "@/redux/slices/urlParameterSlice"; import { selectMapLayersState, setLayerVisibility } from "@/redux/slices/mapLayersSlice"; +import { setSelectedArea } from "@/redux/slices/selectedAreaSlice"; +import { incrementZoomTrigger } from "@/redux/slices/zoomTriggerSlice"; import { setCurrentPoi } from "@/redux/slices/database/pois/currentPoiSlice.js"; import { selectGisLines } from "@/redux/slices/database/polylines/gisLinesSlice"; import { selectGisLinesStatus } from "@/redux/slices/webservice/gisLinesStatusSlice"; @@ -206,6 +208,14 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { const [popupCoordinates, setPopupCoordinates] = useState(null); const [popupVisible, setPopupVisible] = useState(false); const [poiData, setPoiData] = useState([]); + // Edit mode state mirrors MapLayersControlPanel's behavior + const [editMode, setEditMode] = useState(() => { + try { + return localStorage.getItem("editMode") === "true"; + } catch (_) { + return false; + } + }); const openVersionInfoModal = () => { setShowVersionInfoModal(true); @@ -1012,6 +1022,29 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { }, [GisSystemStatic, mapLayersVisibility, dispatch]); //--------------------------------------------- + //-------------------------------------------- + // Expand handler (same behavior as MapLayersControlPanel expand icon) + const handleExpandClick = () => { + dispatch(setSelectedArea("Station wählen")); + dispatch(incrementZoomTrigger()); + }; + + // Toggle edit mode (same logic as EditModeToggle component) + const hasEditRight = Array.isArray(userRights) + ? userRights.includes?.(56) || userRights.some?.(r => r?.IdRight === 56) + : false; + const toggleEditMode = () => { + if (!hasEditRight) return; + const next = !editMode; + setEditMode(next); + try { + localStorage.setItem("editMode", String(next)); + } catch (_) {} + if (typeof window !== "undefined") { + window.location.reload(); + } + }; + //-------------------------------------------- return ( <> @@ -1099,6 +1132,36 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { title={showAppInfoCard ? "Info ausblenden" : "Info einblenden"} /> + + diff --git a/components/uiWidgets/mapLayersControlPanel/MapLayersControlPanel.js b/components/uiWidgets/mapLayersControlPanel/MapLayersControlPanel.js index 2304e1b86..7153f1ca2 100644 --- a/components/uiWidgets/mapLayersControlPanel/MapLayersControlPanel.js +++ b/components/uiWidgets/mapLayersControlPanel/MapLayersControlPanel.js @@ -275,6 +275,7 @@ function MapLayersControlPanel({ handlePolylineCheckboxChange }) { ))} + {/*
+ */} {/* Checkboxen mit Untermenüs */} diff --git a/docs/TODO.md b/docs/TODO.md index 295696c74..2e8d3f1c8 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -102,3 +102,4 @@ Station suchen​ Hamburger-Menü - [ ] TODO: Info Karte: VersionInfoModal.js Modal soll über einem Icon 'Info' oben rechts eingeblendet und ausgeblendet um mehr von der Karte zu sehen ℹ️ Info + https://www.openstreetmap.org/#map=13/51.80097/9.33495&layers=P diff --git a/package-lock.json b/package-lock.json index b3aee1158..1b92df5a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nodemap", - "version": "1.1.359", + "version": "1.1.360", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nodemap", - "version": "1.1.359", + "version": "1.1.360", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/package.json b/package.json index 62ef9433d..9aa88fd8d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodemap", - "version": "1.1.359", + "version": "1.1.360", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0",