From 283547d9bd14e65a8e0c415a47c9ea910340fdea Mon Sep 17 00:00:00 2001 From: Ismail Ali Date: Thu, 1 May 2025 14:30:29 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20Modal=20nach=20Speichern=20der=20TDR-Ein?= =?UTF-8?q?stellungen=20automatisch=20schlie=C3=9Fen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - onClose-Callback in TdrEinstellung korrekt übergeben und genutzt - Modal schließt sich nach erfolgreichem Speichern (Alert bestätigt oder direkt) - Nutzerführung verbessert und Verhalten vereinheitlicht --- .../kue705FO/modals/SettingsModalWrapper.tsx | 4 +++- .../kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx | 6 +++++- config/webVersion.ts | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/components/main/kabelueberwachung/kue705FO/modals/SettingsModalWrapper.tsx b/components/main/kabelueberwachung/kue705FO/modals/SettingsModalWrapper.tsx index a5f3e22..2527814 100644 --- a/components/main/kabelueberwachung/kue705FO/modals/SettingsModalWrapper.tsx +++ b/components/main/kabelueberwachung/kue705FO/modals/SettingsModalWrapper.tsx @@ -108,7 +108,9 @@ export default function KueModal({ showModal, onClose, slot }: KueModalProps) { /> - {activeTab === "tdr" && } + {activeTab === "tdr" && ( + + )} {activeTab === "knoten" && } diff --git a/components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx b/components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx index 9ab98cc..072292e 100644 --- a/components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx +++ b/components/main/kabelueberwachung/kue705FO/modals/TdrEinstellung.tsx @@ -6,9 +6,10 @@ import { RootState } from "../../../../../redux/store"; interface Props { slot: number; + onClose?: () => void; // ← NEU } -export default function TdrEinstellung({ slot }: Props) { +export default function TdrEinstellung({ slot, onClose }: Props) { const tdrSlice = useSelector((state: RootState) => state.kueDataSlice); const cacheKey = `slot_${slot}`; @@ -67,12 +68,14 @@ export default function TdrEinstellung({ slot }: Props) { .then((res) => res.json()) .then(() => { alert("TDR-Werte erfolgreich gespeichert."); + if (typeof onClose === "function") onClose(); // ← MODAL SCHLIESSEN }) .catch((err) => { console.error("Fehler beim Speichern:", err); alert("Speichern fehlgeschlagen."); }); } else { + // Originaler Webservice-Teil... const base = `${window.location.origin}/CPL?/kabelueberwachung.html`; const urls = [ @@ -91,6 +94,7 @@ export default function TdrEinstellung({ slot }: Props) { ) .then(() => { alert("TDR-Einstellungen erfolgreich gesendet."); + if (typeof onClose === "function") onClose(); // ← MODAL SCHLIESSEN }) .catch((err) => { console.error("Fehler beim Senden:", err); diff --git a/config/webVersion.ts b/config/webVersion.ts index cdde7bc..6d4e25b 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.324"; +const webVersion = "1.6.325"; export default webVersion;