From 06aa3c8f3e488e68551e6edab3aad579086db994 Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 11 Aug 2025 13:35:14 +0200 Subject: [PATCH] ISO & RSL dropdowns moved to headers like TDR; removed old dropdowns from action bars, cleaned imports, fixed TypeScript issues --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 5 ++ .../IsoMeasurementChart/IsoChartActionBar.tsx | 52 +-------------- .../IsoMeasurementChart/IsoChartView.tsx | 57 +++++++++++++++- .../LoopChartActionBar.tsx | 45 +------------ .../LoopMeasurementChart/LoopChartView.tsx | 58 ++++++++++++++++- .../kue705FO/Charts/TDRChart/TDRChartView.tsx | 65 +++++++++++++++++-- package-lock.json | 4 +- package.json | 2 +- 10 files changed, 184 insertions(+), 108 deletions(-) diff --git a/.env.development b/.env.development index 29d7f69..4cfc15d 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.685 +NEXT_PUBLIC_APP_VERSION=1.6.686 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 627c8c1..0053ffa 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.685 +NEXT_PUBLIC_APP_VERSION=1.6.686 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d17b259..77f5dd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.6.686] – 2025-08-11 + +- LoopChartActionBar verhält sich jetzt wie im ISO-Modal: Bei Auswahl „Meldungen“ + +--- ## [1.6.685] – 2025-08-11 - Daten von 118. in mocks geholt diff --git a/components/main/kabelueberwachung/kue705FO/Charts/IsoMeasurementChart/IsoChartActionBar.tsx b/components/main/kabelueberwachung/kue705FO/Charts/IsoMeasurementChart/IsoChartActionBar.tsx index e990355..b84c1b6 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/IsoMeasurementChart/IsoChartActionBar.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/IsoMeasurementChart/IsoChartActionBar.tsx @@ -9,7 +9,6 @@ import { setSelectedMode, setChartOpen, setLoading, - setChartTitle, } from "@/redux/slices/kabelueberwachungChartSlice"; import { setBrushRange } from "@/redux/slices/brushSlice"; import { Listbox } from "@headlessui/react"; @@ -173,14 +172,8 @@ export const useIsoDataLoader = () => { const IsoChartActionBar: React.FC = () => { const dispatch = useDispatch(); - const { - vonDatum, - bisDatum, - selectedMode, - slotNumber, - isLoading, - chartTitle, - } = useSelector((state: RootState) => state.kabelueberwachungChartSlice); + const { vonDatum, bisDatum, selectedMode, slotNumber, chartTitle } = + useSelector((state: RootState) => state.kabelueberwachungChartSlice); const formatDate = (dateString: string) => { const [year, month, day] = dateString.split("-"); @@ -339,46 +332,7 @@ const IsoChartActionBar: React.FC = () => { {/* Dropdown für Auswahl zwischen "Messkurve" und "Meldungen" - immer anzeigen */} - dispatch(setChartTitle(value))} - > -
- - {chartTitle} - - - - - - {["Messkurve", "Meldungen"].map((option) => ( - - `px-4 py-1 cursor-pointer ${ - selected - ? "bg-littwin-blue text-white" - : active - ? "bg-gray-200" - : "" - }` - } - > - {option} - - ))} - -
-
+ {/* Dropdown für Auswahl zwischen "Messkurve" und "Meldungen" entfernt */} {/* Daten laden Button - Platz reservieren, aber ausblenden wenn Meldungen */}
= ({ height: "100%", }} > -

- {chartTitle === "Messkurve" ? "Isolationswiderstand" : "Meldungen"} -

+
+

+ {chartTitle === "Messkurve" ? "Isolationswiderstand" : "Meldungen"} +

+ + dispatch(setChartTitle(value)) + } + > +
+ + {chartTitle} + + + + + + {(["Messkurve", "Meldungen"] as const).map((option) => ( + + `px-4 py-1 cursor-pointer ${ + selected + ? "bg-littwin-blue text-white" + : active + ? "bg-gray-200" + : "" + }` + } + > + {option} + + ))} + +
+
+
{chartTitle === "Messkurve" ? : } diff --git a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx index 5fc3752..b49f10e 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx @@ -12,7 +12,6 @@ import { } from "@/redux/slices/kabelueberwachungChartSlice"; import { setBrushRange } from "@/redux/slices/brushSlice"; import { Listbox } from "@headlessui/react"; -import { setChartTitle as setLoopChartTitle } from "@/redux/slices/loopChartTypeSlice"; //-----------------------------------------------------------------------------------useLoopChartLoader export const useLoopChartLoader = () => { @@ -295,49 +294,7 @@ const LoopChartActionBar: React.FC = () => {
- {/* Dropdown für Messkurve / Meldungen (wie ISO) */} - - dispatch(setLoopChartTitle(value)) - } - > -
- - {chartTitle} - - - - - - {(["Messkurve", "Meldungen"] as const).map((option) => ( - - `px-4 py-1 cursor-pointer ${ - selected - ? "bg-littwin-blue text-white" - : active - ? "bg-gray-200" - : "" - }` - } - > - {option} - - ))} - -
-
+ {/* Dropdown für Messkurve / Meldungen in View-Header umgezogen */} {/* Buttons – nur sichtbar bei Messkurve, Platz bleibt erhalten */}
= ({ height: "100%", }} > -

- {chartTitle === "Messkurve" ? "Schleifenwiderstand" : "Meldungen"} -

+
+

+ {chartTitle === "Messkurve" ? "Schleifenwiderstand" : "Meldungen"} +

+ + dispatch(setLoopChartTitle(value)) + } + > +
+ + {chartTitle} + + + + + + {(["Messkurve", "Meldungen"] as const).map((option) => ( + + `px-4 py-1 cursor-pointer ${ + selected + ? "bg-littwin-blue text-white" + : active + ? "bg-gray-200" + : "" + }` + } + > + {option} + + ))} + +
+
+
{chartTitle === "Messkurve" ? : } diff --git a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartView.tsx b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartView.tsx index 5d1851e..30d226a 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartView.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartView.tsx @@ -25,6 +25,9 @@ import { setSelectedSlot, setActiveMode, } from "@/redux/slices/kueChartModeSlice"; +import { Listbox } from "@headlessui/react"; +import { setChartTitle } from "@/redux/slices/kabelueberwachungChartSlice"; +import Report from "../IsoMeasurementChart/Report"; interface TDRChartViewProps { isOpen: boolean; @@ -39,8 +42,8 @@ const TDRChartView: React.FC = ({ }) => { const dispatch = useDispatch(); - const isFullScreen = useSelector( - (state: RootState) => state.kabelueberwachungChartSlice.isFullScreen + const { isFullScreen, chartTitle } = useSelector( + (state: RootState) => state.kabelueberwachungChartSlice ); // **Modal öffnen - TDR spezifische Einstellungen** @@ -169,8 +172,62 @@ const TDRChartView: React.FC = ({ height: "100%", }} > -

TDR-Messung

- +
+

+ {chartTitle === "Messkurve" ? "TDR-Messung" : "Meldungen"} +

+ {/* Dropdown Messkurve / Meldungen */} + + dispatch(setChartTitle(value)) + } + > +
+ + {chartTitle} + + + + + + {(["Messkurve", "Meldungen"] as const).map((option) => ( + + `px-4 py-1 cursor-pointer ${ + selected + ? "bg-littwin-blue text-white" + : active + ? "bg-gray-200" + : "" + }` + } + > + {option} + + ))} + +
+
+
+ {/* Chart oder Meldungen */} +
+ {chartTitle === "Messkurve" ? ( + + ) : ( + + )} +
); diff --git a/package-lock.json b/package-lock.json index 9ead75b..15484a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.685", + "version": "1.6.686", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.685", + "version": "1.6.686", "dependencies": { "@fontsource/roboto": "^5.1.0", "@headlessui/react": "^2.2.4", diff --git a/package.json b/package.json index 33e868c..369a897 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.685", + "version": "1.6.686", "private": true, "scripts": { "dev": "next dev",