diff --git a/.env.development b/.env.development index f1eadb417..9aa05bfb3 100644 --- a/.env.development +++ b/.env.development @@ -25,4 +25,4 @@ NEXT_PUBLIC_USE_MOCKS=true NEXT_PUBLIC_BASE_PATH=/talas5 # Oder leer lassen für direkten Zugriff -> NEXT_PUBLIC_BASE_PATH= # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.296 +NEXT_PUBLIC_APP_VERSION=1.1.297 diff --git a/.env.production b/.env.production index 0ab757789..748e94ec2 100644 --- a/.env.production +++ b/.env.production @@ -26,4 +26,4 @@ NEXT_PUBLIC_BASE_PATH=/talas5 # Oder leer lassen für direkten Zugriff -> NEXT_PUBLIC_BASE_PATH= # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.296 \ No newline at end of file +NEXT_PUBLIC_APP_VERSION=1.1.297 \ No newline at end of file diff --git a/components/gisPolylines/tooltip/generateLineTooltipContent.js b/components/gisPolylines/tooltip/generateLineTooltipContent.js new file mode 100644 index 000000000..aa3033779 --- /dev/null +++ b/components/gisPolylines/tooltip/generateLineTooltipContent.js @@ -0,0 +1,35 @@ +export function generateLineTooltipContent(statis, matchingLine, values) { + const messageDisplay = values.messages + .map( + msg => + ` + + ${msg.message} +
` + ) + .join(""); + + return ` +
+ ${statis.ModulName || "Unknown"}
+ ${statis.ModulTyp || "N/A"}
+ Slot: ${statis.Modul || "N/A"}
+ Station: ${ + matchingLine.name || "N/A" + }
+
+ ${messageDisplay} +

+ ${ + values.messwert + ? `Messwert: ${values.messwert}
` + : "" + } + ${ + values.schleifenwert + ? `Schleifenwert: ${values.schleifenwert}` + : "" + } +
+ `; +} diff --git a/components/gisPolylines/tooltip/useLineData.js b/components/gisPolylines/tooltip/useLineData.js index 6c5471357..1f1e787c5 100644 --- a/components/gisPolylines/tooltip/useLineData.js +++ b/components/gisPolylines/tooltip/useLineData.js @@ -1,9 +1,10 @@ -// hooks/useLineData.js //fix v1.0.8.1 +// /components/gisPolylines/tooltip/useLineData.js import { useEffect, useState } from "react"; import { useSelector, useDispatch } from "react-redux"; import { selectGisLinesStatusFromWebservice } from "@/redux/slices/webservice/gisLinesStatusSlice"; import { fetchGisLinesThunk } from "@/redux/thunks/database/polylines/fetchGisLinesThunk"; import { fetchGisLinesStatusThunk } from "@/../redux/thunks/webservice/fetchGisLinesStatusThunk"; +import { generateLineTooltipContent } from "./generateLineTooltipContent"; const useLineData = () => { const dispatch = useDispatch(); @@ -66,45 +67,10 @@ const useLineData = () => { if (matchingLine) { const values = valueMap[key]; - const messageDisplay = values.messages - .map( - msg => - `${msg.message}
` - ) - .join(""); colorsByModule[key] = values.messages.length > 0 ? values.messages[0].prioColor : "green"; - newTooltipContents[key] = ` -
- ${ - statis.ModulName || "Unknown" - } -
- ${statis.ModulTyp || "N/A"} -
- Slot: ${statis.Modul || "N/A"} -
- Station: ${ - matchingLine.name || "N/A" - } -
-
- ${messageDisplay} -
-
- ${ - values.messwert - ? `Messwert: ${values.messwert}
` - : "" - } - ${ - values.schleifenwert - ? `Schleifenwert: ${values.schleifenwert}` - : "" - } -
- `; + newTooltipContents[key] = generateLineTooltipContent(statis, matchingLine, values); } }); diff --git a/components/mapLayersControlPanel/hooks/useLayerVisibility.js b/components/uiWidgets/mapLayersControlPanel/hooks/useLayerVisibility.js similarity index 100% rename from components/mapLayersControlPanel/hooks/useLayerVisibility.js rename to components/uiWidgets/mapLayersControlPanel/hooks/useLayerVisibility.js diff --git a/package-lock.json b/package-lock.json index 8c4672df4..333ce296f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nodemap", - "version": "1.1.296", + "version": "1.1.297", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nodemap", - "version": "1.1.296", + "version": "1.1.297", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/package.json b/package.json index b500bda66..0eaf2fbb1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodemap", - "version": "1.1.296", + "version": "1.1.297", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0",