From a5964220569c8244751ea947a7ea131d632494eb Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 8 Sep 2025 12:09:30 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Beim=20Aufruf=20der=20TDR-Detailseite=20?= =?UTF-8?q?erscheint=20im=20Hintergrund=20auf=20der=20K=C3=9C=20ein=20Schl?= =?UTF-8?q?eifenwiderstand=20von=200=20KOhm.=20In=20der=20Daten=20Javascri?= =?UTF-8?q?ptdatei=20steht=20jedoch=20der=20richtige=20Wert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 5 +++ .../kabelueberwachung/kue705FO/Kue705FO.tsx | 36 +++---------------- .../kue705FO/hooks/useLoopDisplay.ts | 12 +++---- package-lock.json | 4 +-- package.json | 2 +- 7 files changed, 21 insertions(+), 42 deletions(-) diff --git a/.env.development b/.env.development index 525c5c0..5d818ce 100644 --- a/.env.development +++ b/.env.development @@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false NEXT_PUBLIC_EXPORT_STATIC=false NEXT_PUBLIC_USE_CGI=false # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.6.868 +NEXT_PUBLIC_APP_VERSION=1.6.869 NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter) diff --git a/.env.production b/.env.production index a033e14..32cfc40 100644 --- a/.env.production +++ b/.env.production @@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL NEXT_PUBLIC_EXPORT_STATIC=true NEXT_PUBLIC_USE_CGI=true # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.6.868 +NEXT_PUBLIC_APP_VERSION=1.6.869 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bdd3a3a..94f3c0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.6.869] – 2025-09-08 + +- fix: Beim Ausführen einer TDR-Messung (Klick auf blauen Button in der TDR-Detailseite) erscheint keine Rückmeldung. Dort müsste ein Hinweis erscheinen “TDR-Messung wird ausgeführt und kann bis zu zwei Minuten dauern” + +--- ## [1.6.868] – 2025-09-08 - fix: Timer für jeder KÜ separate und nicht eine für alle, aktuell wird prozentzahl bei allen das gleiche angezeigt diff --git a/components/main/kabelueberwachung/kue705FO/Kue705FO.tsx b/components/main/kabelueberwachung/kue705FO/Kue705FO.tsx index f6d9f57..4659073 100644 --- a/components/main/kabelueberwachung/kue705FO/Kue705FO.tsx +++ b/components/main/kabelueberwachung/kue705FO/Kue705FO.tsx @@ -174,18 +174,6 @@ const Kue705FO: React.FC = ({ const openTdrModal = () => { setActiveButton("TDR"); setloopTitleText("Entfernung [km]"); - - const latestTdrDistanceMeters = - Array.isArray(tdmChartData?.[slotIndex]) && - tdmChartData[slotIndex].length > 0 && - typeof tdmChartData[slotIndex][0].d === "number" - ? tdmChartData[slotIndex][0].d - : 0; - - const latestTdrDistance = Number( - (latestTdrDistanceMeters / 1000).toFixed(3) - ); - setLoopDisplayValue(latestTdrDistance); setShowTdrModal(true); }; @@ -272,30 +260,16 @@ const Kue705FO: React.FC = ({ return () => window.removeEventListener("resize", measure); }, [moduleName48, scrollFeatureEnabled]); //--------------------------------- - const tdmChartData = useSelector( - (state: RootState) => state.tdmChartSlice.data - ); - const latestTdrDistanceMeters = - Array.isArray(tdmChartData?.[slotIndex]) && - tdmChartData[slotIndex].length > 0 && - typeof tdmChartData[slotIndex][0].d === "number" - ? tdmChartData[slotIndex][0].d - : 0; - - const latestTdrDistance = Number((latestTdrDistanceMeters / 1000).toFixed(3)); - //setLoopDisplayValue(latestTdrDistance); + // TDR Distanz wird im Display nicht angezeigt – Daten für Modal werden separat geladen //--------------------------------- - const loopValue = - activeButton === "TDR" - ? latestTdrDistance - : typeof schleifenwiderstand === "number" + const rslValue = + typeof schleifenwiderstand === "number" ? schleifenwiderstand : Number(schleifenwiderstand); - const { loopDisplayValue, setLoopDisplayValue } = useLoopDisplay( - loopValue, + rslValue, activeButton ); @@ -409,7 +383,7 @@ const Kue705FO: React.FC = ({ .toFixed(2) .replace(".", ",")} MOhm`} - {/* 3. Zeile: Schleifenwert, in Rot bei Schleifenfehler, sonst normal */} + {/* 3. Zeile: Schleifenwert (RSL) immer anzeigen, unabhängig von aktivem Button */} { - const [loopDisplayValue, setLoopDisplayValue] = - useState(schleifenwiderstand); + const [loopDisplayValue, setLoopDisplayValue] = useState(rslValue); useEffect(() => { if (activeButton === "Schleife") { - setLoopDisplayValue(schleifenwiderstand); + setLoopDisplayValue(rslValue); } - // For ISO and TDR, the value is set manually via setLoopDisplayValue - }, [schleifenwiderstand, activeButton]); + }, [rslValue, activeButton]); return { loopDisplayValue, setLoopDisplayValue }; }; diff --git a/package-lock.json b/package-lock.json index 62c46e8..e3499c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.868", + "version": "1.6.869", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.868", + "version": "1.6.869", "dependencies": { "@fontsource/roboto": "^5.1.0", "@headlessui/react": "^2.2.4", diff --git a/package.json b/package.json index 57ed32a..1d36c77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.868", + "version": "1.6.869", "private": true, "scripts": { "dev": "next dev -p 3000",