From 1f1e532233d64a37b3190d0665f7d736c25cecc1 Mon Sep 17 00:00:00 2001 From: ISA Date: Fri, 11 Jul 2025 09:45:32 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Von/Bis-Datum=20beim=20Schlie=C3=9Fen=20?= =?UTF-8?q?des=20DetailModals=20zur=C3=BCcksetzen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Redux-State für vonDatum und bisDatum wird bei handleClose geleert - verhindert unerwünschtes Vorfiltern bei erneutem Öffnen des Modals --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 10 ++++++++++ components/main/system/DetailModal.tsx | 12 ++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 6 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index ba89a8f..482c21e 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.588 +NEXT_PUBLIC_APP_VERSION=1.6.589 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 7e3ee9c..b603bfe 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.588 +NEXT_PUBLIC_APP_VERSION=1.6.589 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index ee6d905..6d00c22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [1.6.589] – 2025-07-11 + +- feat: Zeitspanne-Funktion mit Von/Bis und Button-Trigger im DetailModal eingebaut + +- Chart-Daten werden jetzt erst bei Klick auf „Daten laden“ geladen +- Von/Bis-Zeitauswahl über Redux-State korrekt eingebunden +- Styling der Eingabefelder und Dropdowns vereinheitlicht (eine Zeile) +- Lokalen State für Zeitspanne entfernt und durch Redux ersetzt + +--- ## [1.6.588] – 2025-07-11 - fix: Messwertlinie (m) im DIA0-Modus in DetailModal sichtbar gemacht diff --git a/components/main/system/DetailModal.tsx b/components/main/system/DetailModal.tsx index d0b3205..1451d2d 100644 --- a/components/main/system/DetailModal.tsx +++ b/components/main/system/DetailModal.tsx @@ -7,6 +7,10 @@ import { RootState } from "@/redux/store"; import { Listbox } from "@headlessui/react"; import { setFullScreen } from "@/redux/slices/kabelueberwachungChartSlice"; import DateRangePicker from "@/components/common/DateRangePicker"; +import { + setVonDatum, + setBisDatum, +} from "@/redux/slices/kabelueberwachungChartSlice"; import { Chart as ChartJS, @@ -164,6 +168,8 @@ export const DetailModal = ({ const handleClose = () => { dispatch(setFullScreen(false)); + dispatch(setVonDatum("")); + dispatch(setBisDatum("")); onClose(); }; @@ -241,6 +247,12 @@ export const DetailModal = ({ chartRef.current.resetZoom(); } }, [zeitraum]); + // beim start soll der Chart einmal aufgerufen wird, also einmal der Button "Daten laden" geklickt werden + useEffect(() => { + if (isOpen && selectedKey) { + handleFetchData(); + } + }, [isOpen, selectedKey]); if (!isOpen || !selectedKey) return null; diff --git a/package-lock.json b/package-lock.json index 516dc90..390da44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.588", + "version": "1.6.589", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.588", + "version": "1.6.589", "dependencies": { "@fontsource/roboto": "^5.1.0", "@headlessui/react": "^2.2.4", diff --git a/package.json b/package.json index 45e3eee..b5b9d53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.588", + "version": "1.6.589", "private": true, "scripts": { "dev": "next dev",