From 169271144dea0474dc95c5e962e8910b4eee6fec Mon Sep 17 00:00:00 2001 From: Ismail Ali Date: Wed, 9 Apr 2025 20:43:35 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20ChartSwitcher=20bei=20Schlie=C3=9Fen=20v?= =?UTF-8?q?ollst=C3=A4ndig=20zur=C3=BCckgesetzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Datum auf letzten 30 Tage zurückgesetzt - Dropdowns auf "Alle Messwerte" und "Isolationswiderstand" zurückgesetzt - Chart-Titel ebenfalls zurückgesetzt --- .../kue705FO/Charts/ChartSwitcher.tsx | 11 ++++++++++- config/webVersion.ts | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx b/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx index 0f8a22b..4490a0f 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx @@ -24,6 +24,8 @@ import { useLoopChartLoader } from "./LoopMeasurementChart/LoopChartActionBar"; import { setVonDatum, setBisDatum, + setSelectedMode, + setSelectedSlotType, } from "../../../../../redux/slices/kabelueberwachungChartSlice"; interface ChartSwitcherProps { @@ -52,18 +54,25 @@ const ChartSwitcher: React.FC = ({ // **Modal schließen + Redux-Status zurücksetzen** const handleClose = () => { - // Zeitbereich zurücksetzen const today = new Date(); const thirtyDaysAgo = new Date(); thirtyDaysAgo.setDate(today.getDate() - 30); const toISO = (date: Date) => date.toLocaleDateString("sv-SE"); + // Reset Datum dispatch(setVonDatum(toISO(thirtyDaysAgo))); dispatch(setBisDatum(toISO(today))); + + // Reset Dropdowns + dispatch(setSelectedMode("DIA0")); + dispatch(setSelectedSlotType("isolationswiderstand")); + + // Sonstiges Reset dispatch(setChartOpen(false)); dispatch(setFullScreen(false)); dispatch(resetBrushRange()); + onClose(); }; diff --git a/config/webVersion.ts b/config/webVersion.ts index 506ac7b..1cfb838 100644 --- a/config/webVersion.ts +++ b/config/webVersion.ts @@ -6,5 +6,5 @@ 2: Patch oder Hotfix (Bugfixes oder kleine Änderungen). */ -const webVersion = "1.6.218"; +const webVersion = "1.6.219"; export default webVersion;