fix: lade KUE-Daten in kabelueberwachung Seite über fetchKueDataThunk bei leerem Redux-Store

- Problem behoben, dass Module in Produktionsumgebung beim Direktaufruf nicht angezeigt wurden
- fetchKueDataThunk wird nun bei fehlenden kueIso-Daten in kabelueberwachung.tsx aufgerufen
- CGI-Pfad (/CPL?/...) bleibt erhalten für Backend-Platzhalterauflösung via kueData.js
This commit is contained in:
ISA
2025-03-27 13:41:08 +01:00
parent 139cd09a13
commit 1b02f43be7
2 changed files with 8 additions and 1 deletions

View File

@@ -5,6 +5,7 @@ import Kue705FO from "../components/main/kabelueberwachung/kue705FO/Kue705FO";
import { useDispatch, useSelector } from "react-redux";
import { AppDispatch } from "../redux/store"; // Adjust the path to your Redux store file
import { RootState } from "../redux/store"; // Adjust the path to your Redux store file
import { fetchKueDataThunk } from "../redux/thunks/fetchKueDataThunk";
function Kabelueberwachung() {
const dispatch: AppDispatch = useDispatch();
@@ -116,6 +117,12 @@ function Kabelueberwachung() {
const dia0Iso = loopData["DIA0"]?.[3];
//------------------------------------------------------------
useEffect(() => {
if (kueIso.length === 0) {
console.log("📦 Lade KUE-Daten aus fetchKueDataThunk...");
dispatch(fetchKueDataThunk());
}
}, []);
//----------------------------------------------------------------
return (