diff --git a/.env.development b/.env.development index 5bd4645..2b33858 100644 --- a/.env.development +++ b/.env.development @@ -6,5 +6,5 @@ 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.437 +NEXT_PUBLIC_APP_VERSION=1.6.438 NEXT_PUBLIC_CPL_MODE=jsmock # json (Entwicklungsumgebung) oder jsmock (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter) \ No newline at end of file diff --git a/.env.production b/.env.production index 924de60..bc37563 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.437 +NEXT_PUBLIC_APP_VERSION=1.6.438 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index bbe42c1..799f272 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,38 +1,50 @@ +## [1.6.438] – 2025-06-21 + +- chore(tsconfig): fix moduleResolution and path aliases for Next.js project + +--- ## [1.6.437] – 2025-06-21 - chore: rename service/thunk files to follow get/fetch naming convention --- + ## [1.6.436] – 2025-06-20 - Mocks erstellt für API für Entwicklungsumgebung --- + ## [1.6.435] – 2025-06-20 - auto CHANGELOG.md --- + ## [1.6.434] – 2025-06-20 - pre-commit --- + ## [1.6.433] – 2025-06-20 - CHANGELOG auto --- + ## [1.6.432] – 2025-06-20 - feat: Statusanzeige für Eingänge implementiert --- + ## [1.6.431] – 2025-06-20 - feat: Digitale & analoge Eingänge in allen Modi (json/jsmock/production) vollständig implementiert --- + # 📦 CHANGELOG – CPLv4.0 Alle Änderungen und Versionen des CPLv4.0 Frontends chronologisch dokumentiert. @@ -145,7 +157,7 @@ Scahlter für Ein/Aus muss noch im Backend programmiert werden - In `_app.tsx` wurde ein zentrales Redux-Update-System implementiert: - Die aktuelle Seite wird automatisch erkannt (`window.location.pathname`) - - Abhängig von der Seite werden die passenden Thunks geladen (z. B. `fetchKueDataThunk`, `fetchDigitalOutputsThunk` usw.) + - Abhängig von der Seite werden die passenden Thunks geladen (z. B. `getKueDataThunk`, `getDigitalOutputsThunk` usw.) - Die Daten werden alle 10 Sekunden erneut geladen - Dadurch muss auf den Unterseiten kein separater Redux-Aufruf mehr erfolgen - Unterstützt alle Slices: digitale/analoge Ein- und Ausgänge, Meldungen, Systemstatus, Einstellungen, TDR/Loop-Daten diff --git a/README.md b/README.md index 321df2f..265a5cd 100644 --- a/README.md +++ b/README.md @@ -298,22 +298,22 @@ npm run build | Thunk Name | Zweck | | :-------------------------------------- | :-------------------------------------- | -| `fetchSystemVoltTempThunk` | Lade Systemspannungen und Temperaturen | -| `fetchDigitalOutputsThunk` | Lade Status der digitalen Ausgänge | -| `fetchDigitalInputsThunk` | Lade Status der digitalen Eingänge | +| `getSystemVoltTempThunk` | Lade Systemspannungen und Temperaturen | +| `getDigitalOutputsThunk` | Lade Status der digitalen Ausgänge | +| `getDigitalInputsThunk` | Lade Status der digitalen Eingänge | | `fetchAnalogeEingaengeThunk` | Lade analoge Eingänge | | `fetchTDRChartDataThunk` | Lade TDR-Messkurve für einen Slot | | `fetchTDRReferenceChartThunk` | Lade TDR-Referenzkurve | -| `fetchLoopChartDataThunk` | Lade Schleifen- und Isolationsmesswerte | -| `fetchLast20MessagesThunk` | Lade letzte 20 Systemmeldungen | +| `getLoopChartDataThunk` | Lade Schleifen- und Isolationsmesswerte | +| `getLast20MessagesThunk` | Lade letzte 20 Systemmeldungen | | `fetchKabelueberwachungChartThunk` | Lade Visualisierungsdaten der Slots | | `fetchTDMChartThunk` | Lade TDM (Multiple TDR) Messungen | | `fetchTDRDataByIdThunk` | Lade TDR-Daten anhand einer ID | | `fetchTdmSingleChartThunk` | Lade Einzel-TDM-Messung | | `fetchSelectedChartDataThunk` | Lade selektierte Diagrammdaten | | `fetchTDRReferenceChartDataBySlotThunk` | Lade Referenzkurven pro Slot | -| `fetchSystemSettingsThunk` | Lade Systemeinstellungen | -| `fetchOpcuaSettingsThunk` | Lade OPC UA Einstellungen und Benutzer | +| `getSystemSettingsThunk` | Lade Systemeinstellungen | +| `getOpcUaSettingsThunk` | Lade OPC UA Einstellungen und Benutzer | --- diff --git a/components/header/Header.tsx b/components/header/Header.tsx index ef5a5ba..6361476 100644 --- a/components/header/Header.tsx +++ b/components/header/Header.tsx @@ -8,7 +8,7 @@ import { RootState } from "@/redux/store"; import { useSelector, useDispatch } from "react-redux"; import { AppDispatch } from "@/redux/store"; import decodeToken from "@/utils/decodeToken"; -import { fetchSystemSettingsThunk } from "@/redux/thunks/fetchSystemSettingsThunk"; +import { getSystemSettingsThunk } from "@/redux/thunks/getSystemSettingsThunk"; function Header() { const router = useRouter(); @@ -59,7 +59,7 @@ function Header() { useEffect(() => { if (!deviceName) { - dispatch(fetchSystemSettingsThunk()); + dispatch(getSystemSettingsThunk()); } }, [deviceName, dispatch]); //---------------------------------------------------------------- diff --git a/components/main/analogInputs/AnalogInputsTable.tsx b/components/main/analogInputs/AnalogInputsTable.tsx index a13dd7d..be1e7f7 100644 --- a/components/main/analogInputs/AnalogInputsTable.tsx +++ b/components/main/analogInputs/AnalogInputsTable.tsx @@ -2,7 +2,7 @@ import React, { useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { RootState, AppDispatch } from "@/redux/store"; -import { fetchAnalogInputsThunk } from "@/redux/thunks/fetchAnalogInputsThunk"; +import { getAnalogInputsThunk } from "@/redux/thunks/getAnalogInputsThunk"; import { Icon } from "@iconify/react"; import settingsIcon from "@iconify/icons-mdi/settings"; import waveformIcon from "@iconify/icons-mdi/waveform"; @@ -20,7 +20,7 @@ export default function AnalogInputsTable({ const [activeId, setActiveId] = React.useState(null); useEffect(() => { - dispatch(fetchAnalogInputsThunk()); + dispatch(getAnalogInputsThunk()); }, [dispatch]); const analogInputs = useSelector( diff --git a/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx b/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx index 423421c..595c5ef 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx @@ -18,7 +18,7 @@ import { setSelectedChartType, } from "../../../../../redux/slices/tdrChartSlice"; import { resetBrushRange } from "../../../../../redux/slices/brushSlice"; -import { fetchTDMDataBySlotThunk } from "../../../../../redux/thunks/fetchTDMListBySlotThunk"; +import { fetchTDMDataBySlotThunk } from "../../../../../redux/thunks/getTDMListBySlotThunk"; import { useLoopChartLoader } from "./LoopMeasurementChart/LoopChartActionBar"; import { diff --git a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChart.tsx b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChart.tsx index 229382b..bd27744 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChart.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChart.tsx @@ -9,7 +9,7 @@ import { Chart, registerables } from "chart.js"; import "chartjs-adapter-date-fns"; import { getColor } from "../../../../../../utils/colors"; import TDRChartActionBar from "./TDRChartActionBar"; -import { fetchReferenceCurveBySlotThunk } from "../../../../../../redux/thunks/fetchReferenceCurveBySlotThunk"; +import { getReferenceCurveBySlotThunk } from "../../../../../../redux/thunks/getReferenceCurveBySlotThunk"; const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => { const dispatch = useDispatch(); @@ -52,7 +52,7 @@ const TDRChart: React.FC<{ isFullScreen: boolean }> = ({ isFullScreen }) => { //-------------------------------- useEffect(() => { if (selectedSlot !== null) { - dispatch(fetchReferenceCurveBySlotThunk(selectedSlot)); + dispatch(getReferenceCurveBySlotThunk(selectedSlot)); } }, [selectedSlot, dispatch]); diff --git a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartActionBar.tsx b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartActionBar.tsx index aa8173b..5d8da26 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartActionBar.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/TDRChart/TDRChartActionBar.tsx @@ -4,9 +4,9 @@ import React, { useState, useEffect } from "react"; import { useSelector } from "react-redux"; import { useAppDispatch } from "../../../../../../redux/store"; import { RootState } from "../../../../../../redux/store"; -import { fetchTDMDataBySlotThunk } from "../../../../../../redux/thunks/fetchTDMListBySlotThunk"; -import { fetchTDRChartDataByIdThunk } from "../../../../../../redux/thunks/fetchTDRChartDataByIdThunk"; -import { fetchReferenceCurveBySlotThunk } from "../../../../../../redux/thunks/fetchReferenceCurveBySlotThunk"; // ⬅ import ergänzen +import { fetchTDMDataBySlotThunk } from "../../../../../../redux/thunks/getTDMListBySlotThunk"; +import { getTDRChartDataByIdThunk } from "../../../../../../redux/thunks/getTDRChartDataByIdThunk"; +import { getReferenceCurveBySlotThunk } from "../../../../../../redux/thunks/getReferenceCurveBySlotThunk"; // ⬅ import ergänzen const TDRChartActionBar: React.FC = () => { const dispatch = useAppDispatch(); @@ -33,7 +33,7 @@ const TDRChartActionBar: React.FC = () => { const handleSelectChange = (e: React.ChangeEvent) => { const id = parseInt(e.target.value); setSelectedId(id); - dispatch(fetchTDRChartDataByIdThunk(id)); + dispatch(getTDRChartDataByIdThunk(id)); }; // 📌 Referenz setzen (nutzt Slotnummer + 1 für die API) @@ -79,7 +79,7 @@ const TDRChartActionBar: React.FC = () => { JSON.stringify(currentChartData) ); - dispatch(fetchReferenceCurveBySlotThunk(selectedSlot)); + dispatch(getReferenceCurveBySlotThunk(selectedSlot)); alert("Referenzkurve wurde erfolgreich gesetzt!"); } catch (error) { @@ -96,7 +96,7 @@ const TDRChartActionBar: React.FC = () => { if (slotData?.length > 0) { const lastId = slotData[0].id; setSelectedId(lastId); - dispatch(fetchTDRChartDataByIdThunk(lastId)); + dispatch(getTDRChartDataByIdThunk(lastId)); } }); } diff --git a/components/main/settingsPageComponents/GeneralSettings.tsx b/components/main/settingsPageComponents/GeneralSettings.tsx index 90a6d0b..58a02f0 100644 --- a/components/main/settingsPageComponents/GeneralSettings.tsx +++ b/components/main/settingsPageComponents/GeneralSettings.tsx @@ -9,7 +9,7 @@ import { useAdminAuth } from "./hooks/useAdminAuth"; import handleAdminLogin from "./handlers/handleAdminLogin"; import { useDispatch } from "react-redux"; import { AppDispatch } from "../../../redux/store"; -import { fetchSystemSettingsThunk } from "../../../redux/thunks/fetchSystemSettingsThunk"; +import { getSystemSettingsThunk } from "../../../redux/thunks/getSystemSettingsThunk"; import handleGeneralSubmit from "./handlers/handleGeneralSubmit"; const GeneralSettings: React.FC = () => { @@ -52,7 +52,7 @@ const GeneralSettings: React.FC = () => { useEffect(() => { if (!systemSettings.deviceName) { - dispatch(fetchSystemSettingsThunk()); + dispatch(getSystemSettingsThunk()); } }, []); /* diff --git a/components/main/uebersicht/Baugruppentraeger.tsx b/components/main/uebersicht/Baugruppentraeger.tsx index e38f0e9..c8636de 100644 --- a/components/main/uebersicht/Baugruppentraeger.tsx +++ b/components/main/uebersicht/Baugruppentraeger.tsx @@ -4,7 +4,7 @@ import { useSelector } from "react-redux"; import { useRouter } from "next/navigation"; import { RootState, useAppDispatch } from "../../../redux/store"; import KabelModulStatus from "./modulesStatus/KabelModulStatus"; -import { fetchKueDataThunk } from "../../../redux/thunks/fetchKueDataThunk"; +import { getKueDataThunk } from "../../../redux/thunks/getKueDataThunk"; const Baugruppentraeger: React.FC = () => { const dispatch = useAppDispatch(); @@ -83,7 +83,7 @@ const Baugruppentraeger: React.FC = () => { } //-------------------------------------------- useEffect(() => { - dispatch(fetchKueDataThunk()); + dispatch(getKueDataThunk()); }, [dispatch]); //-------------------------------------------- return <>{baugruppen}; diff --git a/components/main/uebersicht/NetworkInfo.tsx b/components/main/uebersicht/NetworkInfo.tsx index 09e8f60..8e2fb56 100644 --- a/components/main/uebersicht/NetworkInfo.tsx +++ b/components/main/uebersicht/NetworkInfo.tsx @@ -2,16 +2,16 @@ import React, { useEffect } from "react"; import { useSelector, useDispatch } from "react-redux"; import { RootState, AppDispatch } from "../../../redux/store"; -import { fetchSystemSettingsThunk } from "../../../redux/thunks/fetchSystemSettingsThunk"; -import { fetchOpcUaSettingsThunk } from "../../../redux/thunks/fetchOpcUaSettingsThunk"; +import { getSystemSettingsThunk } from "../../../redux/thunks/getSystemSettingsThunk"; +import { getOpcUaSettingsThunk } from "../../../redux/thunks/getOpcUaSettingsThunk"; const NetworkInfo: React.FC = () => { const dispatch: AppDispatch = useDispatch(); // ✅ OPC UA Daten laden, wenn Komponente angezeigt wird useEffect(() => { - dispatch(fetchSystemSettingsThunk()); - dispatch(fetchOpcUaSettingsThunk()); + dispatch(getSystemSettingsThunk()); + dispatch(getOpcUaSettingsThunk()); }, [dispatch]); // Werte direkt aus Redux holen const ip = diff --git a/docs/Architektur/README_digitalOutputs.md b/docs/Architektur/README_digitalOutputs.md index bf6412f..9a59f57 100644 --- a/docs/Architektur/README_digitalOutputs.md +++ b/docs/Architektur/README_digitalOutputs.md @@ -15,7 +15,7 @@ Dieses Dokument beschreibt die Architektur und Datenflüsse für das **Lesen** u ```mermaid flowchart TD A[DigitalOutputsWidget.tsx] --> B[useEffect] - B --> C[dispatch fetchDigitalOutputsThunk] + B --> C[dispatch getDigitalOutputsThunk] C --> D[fetchDigitalOutputsService] D --> E{Moduswahl: NEXT_PUBLIC_CPL_MODE} diff --git a/docs/Diagramme/systemVoltTemp/systemVoltTempFlow.md b/docs/Diagramme/systemVoltTemp/systemVoltTempFlow.md index bdadc0c..6d6aedc 100644 --- a/docs/Diagramme/systemVoltTemp/systemVoltTempFlow.md +++ b/docs/Diagramme/systemVoltTemp/systemVoltTempFlow.md @@ -1,7 +1,7 @@ ```mermaid flowchart TD Start([SystemPage geöffnet]) - Start --> DispatchThunk[Dispatch fetchSystemVoltTempThunk] + Start --> DispatchThunk[Dispatch getSystemVoltTempThunk] DispatchThunk --> Service[fetchSystemVoltTempService lädt Daten] Service -->|Erfolg| ReduxStore[Redux Store aktualisiert] ReduxStore --> View[Anzeige der Werte und Charts] diff --git a/docs/Diagramme/systemVoltTemp/systemVoltTempReduxFlow.md b/docs/Diagramme/systemVoltTemp/systemVoltTempReduxFlow.md index 688cd1a..4409041 100644 --- a/docs/Diagramme/systemVoltTemp/systemVoltTempReduxFlow.md +++ b/docs/Diagramme/systemVoltTemp/systemVoltTempReduxFlow.md @@ -3,7 +3,7 @@ ```mermaid flowchart LR User(User öffnet Seite) - User --> DispatchThunk(fetchSystemVoltTempThunk) + User --> DispatchThunk(getSystemVoltTempThunk) DispatchThunk --> ServiceCall(fetchSystemVoltTempService) ServiceCall --> API(API Handler / Mock Daten) API --> ScriptLoaded(Mock-Daten im window geladen) diff --git a/docs/Diagramme/systemVoltTemp/systemVoltTempSequence.md b/docs/Diagramme/systemVoltTemp/systemVoltTempSequence.md index 4a50703..03d0412 100644 --- a/docs/Diagramme/systemVoltTemp/systemVoltTempSequence.md +++ b/docs/Diagramme/systemVoltTemp/systemVoltTempSequence.md @@ -10,7 +10,7 @@ sequenceDiagram participant MockData User->>SystemPage: Öffnet System-Seite - SystemPage->>ReduxStore: dispatch(fetchSystemVoltTempThunk) + SystemPage->>ReduxStore: dispatch(getSystemVoltTempThunk) ReduxStore->>Service: fetchSystemVoltTempService() Service->>API: Anfrage an /api/cpl/systemVoltTempAPIHandler API->>MockData: Lese systemVoltTempMockData.js diff --git a/package-lock.json b/package-lock.json index d9de894..9bd03e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.437", + "version": "1.6.438", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.437", + "version": "1.6.438", "dependencies": { "@fontsource/roboto": "^5.1.0", "@iconify-icons/ri": "^1.2.10", diff --git a/package.json b/package.json index c999ae0..7a925ce 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.437", + "version": "1.6.438", "private": true, "scripts": { "dev": "next dev", diff --git a/pages/_app.tsx b/pages/_app.tsx index 975879f..1c472bb 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -3,29 +3,29 @@ import { useEffect, useState } from "react"; import { Provider } from "react-redux"; -import store, { useAppDispatch } from "../redux/store"; +import store, { useAppDispatch } from "@/redux/store"; import { AppProps } from "next/app"; -import { loadWindowVariables } from "../utils/loadWindowVariables"; +import { loadWindowVariables } from "@/utils/loadWindowVariables"; -import Header from "../components/header/Header"; -import Navigation from "../components/navigation/Navigation"; -import Footer from "../components/footer/Footer"; +import Header from "@/components/header/Header"; +import Navigation from "@/components/navigation/Navigation"; +import Footer from "@/components/footer/Footer"; // Thunks importieren -import { fetchKueDataThunk } from "../redux/thunks/fetchKueDataThunk"; -import { fetchDigitalOutputsThunk } from "../redux/thunks/fetchDigitalOutputsThunk"; -import { fetchAnalogInputsThunk } from "../redux/thunks/fetchAnalogInputsThunk"; -import { getAnalogInputsHistoryThunk } from "../redux/thunks/getAnalogInputsHistoryThunk"; -import { fetchLast20MessagesThunk } from "../redux/thunks/fetchLast20MessagesThunk"; -import { fetchOpcUaSettingsThunk } from "../redux/thunks/fetchOpcUaSettingsThunk"; -import { fetchSystemSettingsThunk } from "../redux/thunks/fetchSystemSettingsThunk"; -import { fetchSystemVoltTempThunk } from "../redux/thunks/fetchSystemVoltTempThunk"; -import { fetchReferenceCurveBySlotThunk } from "../redux/thunks/fetchReferenceCurveBySlotThunk"; +import { getKueDataThunk } from "@/redux/thunks/getKueDataThunk"; +import { getDigitalOutputsThunk } from "@/redux/thunks/getDigitalOutputsThunk"; +import { getAnalogInputsThunk } from "@/redux/thunks/getAnalogInputsThunk"; +import { getAnalogInputsHistoryThunk } from "@/redux/thunks/getAnalogInputsHistoryThunk"; +import { getLast20MessagesThunk } from "@/redux/thunks/getLast20MessagesThunk"; +import { getOpcUaSettingsThunk } from "@/redux/thunks/getOpcUaSettingsThunk"; +import { getSystemSettingsThunk } from "@/redux/thunks/getSystemSettingsThunk"; +import { getSystemVoltTempThunk } from "@/redux/thunks/getSystemVoltTempThunk"; +import { getReferenceCurveBySlotThunk } from "@/redux/thunks/getReferenceCurveBySlotThunk"; import { getAllTDRReferenceChartThunk } from "@/redux/thunks/getAllTDRReferenceChartThunk"; -import { fetchTDRChartDataByIdThunk } from "../redux/thunks/fetchTDRChartDataByIdThunk"; -import { fetchLoopChartDataThunk } from "../redux/thunks/fetchLoopChartDataThunk"; +import { getTDRChartDataByIdThunk } from "@/redux/thunks/getTDRChartDataByIdThunk"; +import { getLoopChartDataThunk } from "@/redux/thunks/getLoopChartDataThunk"; -import "../styles/globals.css"; +import "@/styles/globals.css"; function MyApp({ Component, pageProps }: AppProps) { return ( @@ -35,7 +35,13 @@ function MyApp({ Component, pageProps }: AppProps) { ); } -function AppContent({ Component, pageProps }: AppProps) { +function AppContent({ + Component, + pageProps, +}: { + Component: AppProps["Component"]; + pageProps: AppProps["pageProps"]; +}): JSX.Element { const dispatch = useAppDispatch(); const [sessionExpired, setSessionExpired] = useState(false); @@ -45,31 +51,31 @@ function AppContent({ Component, pageProps }: AppProps) { const loadAndDispatch = () => { if (pathname.includes("kabelueberwachung")) { - dispatch(fetchKueDataThunk()); + dispatch(getKueDataThunk()); } else if (pathname.includes("digitalOutputs")) { - dispatch(fetchDigitalOutputsThunk()); + dispatch(getDigitalOutputsThunk()); } else if (pathname.includes("digitalInputs")) { - dispatch(fetchDigitalOutputsThunk()); // 🟠 evtl. anpassen + dispatch(getDigitalOutputsThunk()); // 🟠 evtl. anpassen } else if (pathname.includes("analogInputs")) { - dispatch(fetchAnalogInputsThunk()); + dispatch(getAnalogInputsThunk()); } else if (pathname.includes("analogHistory")) { dispatch(getAnalogInputsHistoryThunk()); } else if (pathname.includes("dashboard")) { - dispatch(fetchLast20MessagesThunk()); + dispatch(getLast20MessagesThunk()); } else if (pathname.includes("einstellungen")) { - dispatch(fetchOpcUaSettingsThunk()); + dispatch(getOpcUaSettingsThunk()); } else if (pathname.includes("systemvolt")) { - dispatch(fetchSystemVoltTempThunk()); + dispatch(getSystemVoltTempThunk()); } else if (pathname.includes("system")) { - dispatch(fetchSystemSettingsThunk()); + dispatch(getSystemSettingsThunk()); } else if (pathname.includes("tdrRef")) { dispatch(getAllTDRReferenceChartThunk()); } else if (pathname.includes("tdrSlot")) { - dispatch(fetchReferenceCurveBySlotThunk()); + dispatch(getReferenceCurveBySlotThunk()); } else if (pathname.includes("tdrId")) { - dispatch(fetchTDRChartDataByIdThunk()); + dispatch(getTDRChartDataByIdThunk()); } else if (pathname.includes("loopChart")) { - dispatch(fetchLoopChartDataThunk()); + dispatch(getLoopChartDataThunk()); } }; diff --git a/pages/analogeEingaenge.tsx b/pages/analogeEingaenge.tsx index 4b77d37..95f3559 100644 --- a/pages/analogeEingaenge.tsx +++ b/pages/analogeEingaenge.tsx @@ -3,7 +3,7 @@ import React, { useState, useEffect } from "react"; import AnalogInputsTable from "../components/main/analogInputs/AnalogInputsTable"; import AnalogInputsChart from "../components/main/analogInputs/AnalogInputsChart"; import AnalogInputsSettingsModal from "../components/main/analogInputs/AnalogInputsSettingsModal"; -import { fetchAnalogInputsThunk } from "../redux/thunks/fetchAnalogInputsThunk"; +import { getAnalogInputsThunk } from "../redux/thunks/getAnalogInputsThunk"; import { useAppDispatch } from "../redux/store"; function AnalogInputs() { @@ -14,9 +14,9 @@ function AnalogInputs() { useEffect(() => { if (typeof window !== "undefined") { - dispatch(fetchAnalogInputsThunk()); + dispatch(getAnalogInputsThunk()); const interval = setInterval(() => { - dispatch(fetchAnalogInputsThunk()); + dispatch(getAnalogInputsThunk()); }, 10000); return () => clearInterval(interval); } diff --git a/pages/dashboard.tsx b/pages/dashboard.tsx index 659983a..ce98423 100644 --- a/pages/dashboard.tsx +++ b/pages/dashboard.tsx @@ -9,16 +9,16 @@ import Last20MessagesTable from "../components/main/uebersicht/Last20MessagesTab import NetworkInfo from "../components/main/uebersicht/NetworkInfo"; import VersionInfo from "../components/main/uebersicht/VersionInfo"; import Baugruppentraeger from "../components/main/uebersicht/Baugruppentraeger"; -import { fetchLast20MessagesThunk } from "../redux/thunks/fetchLast20MessagesThunk"; +import { getLast20MessagesThunk } from "../redux/thunks/getLast20MessagesThunk"; import { useAppDispatch } from "../redux/store"; const Dashboard: React.FC = () => { //------------------------------------- const dispatch = useAppDispatch(); useEffect(() => { - dispatch(fetchLast20MessagesThunk()); + dispatch(getLast20MessagesThunk()); const interval = setInterval(() => { - dispatch(fetchLast20MessagesThunk()); + dispatch(getLast20MessagesThunk()); }, 10000); // oder 5000 return () => clearInterval(interval); diff --git a/pages/digitalInputs.tsx b/pages/digitalInputs.tsx index 013895b..571af96 100644 --- a/pages/digitalInputs.tsx +++ b/pages/digitalInputs.tsx @@ -6,8 +6,8 @@ import { AppDispatch, RootState } from "../redux/store"; import InputModal from "../components/main/einausgaenge/modals/InputModal"; -import { fetchDigitalInputsThunk } from "@/redux/thunks/fetchDigitalInputsThunk"; -import { fetchDigitalOutputsThunk } from "../redux/thunks/fetchDigitalOutputsThunk"; +import { getDigitalInputsThunk } from "@/redux/thunks/getDigitalInputsThunk"; +import { getDigitalOutputsThunk } from "../redux/thunks/getDigitalOutputsThunk"; import DigitalInputs from "../components/main/einausgaenge/DigitalInputs"; @@ -26,12 +26,12 @@ const EinAusgaenge: React.FC = () => { const [isOutputModalOpen, setIsOutputModalOpen] = useState(false); useEffect(() => { - dispatch(fetchDigitalInputsThunk()); - dispatch(fetchDigitalOutputsThunk()); + dispatch(getDigitalInputsThunk()); + dispatch(getDigitalOutputsThunk()); const interval = setInterval(() => { - dispatch(fetchDigitalInputsThunk()); - dispatch(fetchDigitalOutputsThunk()); + dispatch(getDigitalInputsThunk()); + dispatch(getDigitalOutputsThunk()); }, 10000); return () => clearInterval(interval); diff --git a/pages/digitalOutputs.tsx b/pages/digitalOutputs.tsx index fd0ad74..0467d1f 100644 --- a/pages/digitalOutputs.tsx +++ b/pages/digitalOutputs.tsx @@ -5,8 +5,8 @@ import { AppDispatch, RootState } from "@/redux/store"; import DigitalOutputsModal from "../components/main/einausgaenge/modals/DigitalOutputsModal"; -import { fetchDigitalInputsThunk } from "@/redux/thunks/fetchDigitalInputsThunk"; -import { fetchDigitalOutputsThunk } from "@/redux/thunks/fetchDigitalOutputsThunk"; +import { getDigitalInputsThunk } from "@/redux/thunks/getDigitalInputsThunk"; +import { getDigitalOutputsThunk } from "@/redux/thunks/getDigitalOutputsThunk"; import DigitalOutputs from "../components/main/einausgaenge/DigitalOutputsWidget"; @@ -21,11 +21,11 @@ const EinAusgaenge: React.FC = () => { const [isOutputModalOpen, setIsOutputModalOpen] = useState(false); useEffect(() => { - dispatch(fetchDigitalOutputsThunk()); + dispatch(getDigitalOutputsThunk()); const interval = setInterval(() => { - dispatch(fetchDigitalInputsThunk()); - dispatch(fetchDigitalOutputsThunk()); + dispatch(getDigitalInputsThunk()); + dispatch(getDigitalOutputsThunk()); }, 500); return () => clearInterval(interval); diff --git a/pages/einstellungen.tsx b/pages/einstellungen.tsx index 4ffa0f7..5b59219 100644 --- a/pages/einstellungen.tsx +++ b/pages/einstellungen.tsx @@ -1,7 +1,7 @@ // /pages/einstellungen.tsx import React, { useState, useEffect } from "react"; import { useAppDispatch } from "../redux/store"; -import { fetchSystemSettingsThunk } from "../redux/thunks/fetchSystemSettingsThunk"; +import { getSystemSettingsThunk } from "../redux/thunks/getSystemSettingsThunk"; import GeneralSettings from "../components/main/settingsPageComponents/GeneralSettings"; import OPCUAInterfaceSettings from "../components/main/settingsPageComponents/OPCUAInterfaceSettings"; import DatabaseSettings from "../components/main/settingsPageComponents/DatabaseSettings"; @@ -13,7 +13,7 @@ export default function Settings() { const dispatch = useAppDispatch(); useEffect(() => { - dispatch(fetchSystemSettingsThunk()); + dispatch(getSystemSettingsThunk()); }, [dispatch]); return ( diff --git a/pages/kabelueberwachung.tsx b/pages/kabelueberwachung.tsx index c3f531f..dc4657b 100644 --- a/pages/kabelueberwachung.tsx +++ b/pages/kabelueberwachung.tsx @@ -5,7 +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"; +import { getKueDataThunk } from "../redux/thunks/getKueDataThunk"; function Kabelueberwachung() { const dispatch: AppDispatch = useDispatch(); @@ -119,8 +119,8 @@ function Kabelueberwachung() { //------------------------------------------------------------ useEffect(() => { if (kueIso.length === 0) { - console.log("📦 Lade KUE-Daten aus fetchKueDataThunk..."); - dispatch(fetchKueDataThunk()); + console.log("📦 Lade KUE-Daten aus getKueDataThunk..."); + dispatch(getKueDataThunk()); } }, []); //------------------------------------------------------------ diff --git a/pages/system.tsx b/pages/system.tsx index f83cc3c..9bc6bab 100644 --- a/pages/system.tsx +++ b/pages/system.tsx @@ -2,7 +2,7 @@ import React, { useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { AppDispatch, RootState } from "../redux/store"; -import { fetchSystemVoltTempThunk } from "../redux/thunks/fetchSystemVoltTempThunk"; +import { getSystemVoltTempThunk } from "../redux/thunks/getSystemVoltTempThunk"; import { Chart as ChartJS, CategoryScale, @@ -35,9 +35,9 @@ const SystemPage = () => { ); useEffect(() => { - dispatch(fetchSystemVoltTempThunk()); + dispatch(getSystemVoltTempThunk()); const interval = setInterval(() => { - dispatch(fetchSystemVoltTempThunk()); + dispatch(getSystemVoltTempThunk()); }, 5000); return () => clearInterval(interval); }, [dispatch]); diff --git a/redux/slices/loopChartSlice.ts b/redux/slices/loopChartSlice.ts index 6677fbb..3f71d19 100644 --- a/redux/slices/loopChartSlice.ts +++ b/redux/slices/loopChartSlice.ts @@ -1,6 +1,6 @@ // /redux/slices/loopChartSlice.ts import { createSlice } from "@reduxjs/toolkit"; -import { fetchLoopChartDataThunk } from "../thunks/fetchLoopChartDataThunk"; +import { getLoopChartDataThunk } from "../thunks/getLoopChartDataThunk"; interface ChartData { [mode: string]: { @@ -26,11 +26,11 @@ const loopChartSlice = createSlice({ reducers: {}, extraReducers: (builder) => { builder - .addCase(fetchLoopChartDataThunk.pending, (state) => { + .addCase(getLoopChartDataThunk.pending, (state) => { state.loading = true; state.error = null; }) - .addCase(fetchLoopChartDataThunk.fulfilled, (state, action) => { + .addCase(getLoopChartDataThunk.fulfilled, (state, action) => { state.loading = false; const { mode, type } = action.meta.arg; if (!state.data[mode]) { @@ -38,7 +38,7 @@ const loopChartSlice = createSlice({ } state.data[mode][type] = action.payload; }) - .addCase(fetchLoopChartDataThunk.rejected, (state, action) => { + .addCase(getLoopChartDataThunk.rejected, (state, action) => { state.loading = false; state.error = action.payload as string; }); diff --git a/redux/slices/tdmSingleChartSlice.ts b/redux/slices/tdmSingleChartSlice.ts index 9f201a1..167d88d 100644 --- a/redux/slices/tdmSingleChartSlice.ts +++ b/redux/slices/tdmSingleChartSlice.ts @@ -1,7 +1,7 @@ // /redux/slices/tdmSingleChartSlice.ts import { createSlice, PayloadAction } from "@reduxjs/toolkit"; -import { fetchTDMDataBySlotThunk } from "../thunks/fetchTDMListBySlotThunk"; +import { fetchTDMDataBySlotThunk } from "../thunks/getTDMListBySlotThunk"; interface TDMChartEntry { id: number; diff --git a/redux/slices/tdrDataByIdSlice.ts b/redux/slices/tdrDataByIdSlice.ts index d1596b1..876adb4 100644 --- a/redux/slices/tdrDataByIdSlice.ts +++ b/redux/slices/tdrDataByIdSlice.ts @@ -1,6 +1,6 @@ // redux/slices/tdrDataByIdSlice.ts import { createSlice, PayloadAction } from "@reduxjs/toolkit"; -import { fetchTDRChartDataByIdThunk } from "../thunks/fetchTDRChartDataByIdThunk"; +import { getTDRChartDataByIdThunk } from "../thunks/getTDRChartDataByIdThunk"; const initialState = { dataById: {} as Record, @@ -22,7 +22,7 @@ const tdrDataByIdSlice = createSlice({ }, }, extraReducers: (builder) => { - builder.addCase(fetchTDRChartDataByIdThunk.fulfilled, (state, action) => { + builder.addCase(getTDRChartDataByIdThunk.fulfilled, (state, action) => { const { id, data } = action.payload; state.dataById[id] = data; state.selectedId = id; diff --git a/redux/slices/tdrReferenceChartDataBySlotSlice.ts b/redux/slices/tdrReferenceChartDataBySlotSlice.ts index abd9bf5..8c22521 100644 --- a/redux/slices/tdrReferenceChartDataBySlotSlice.ts +++ b/redux/slices/tdrReferenceChartDataBySlotSlice.ts @@ -1,6 +1,6 @@ // /redux/slices/tdrReferenceChartDataBySlotSlice.ts import { createSlice, PayloadAction } from "@reduxjs/toolkit"; -import { fetchReferenceCurveBySlotThunk } from "../thunks/fetchReferenceCurveBySlotThunk"; +import { getReferenceCurveBySlotThunk } from "../thunks/getReferenceCurveBySlotThunk"; interface TDRReferenceChartState { referenceData: { [slot: number]: any[] }; @@ -20,18 +20,18 @@ const tdrReferenceChartDataBySlotSlice = createSlice({ reducers: {}, extraReducers: (builder) => { builder - .addCase(fetchReferenceCurveBySlotThunk.pending, (state) => { + .addCase(getReferenceCurveBySlotThunk.pending, (state) => { state.loading = true; state.error = null; }) .addCase( - fetchReferenceCurveBySlotThunk.fulfilled, + getReferenceCurveBySlotThunk.fulfilled, (state, action: PayloadAction<{ slot: number; data: any[] }>) => { state.loading = false; state.referenceData[action.payload.slot] = action.payload.data; } ) - .addCase(fetchReferenceCurveBySlotThunk.rejected, (state, action) => { + .addCase(getReferenceCurveBySlotThunk.rejected, (state, action) => { state.loading = false; state.error = action.error.message ?? "Unbekannter Fehler"; }); diff --git a/redux/thunks/fetchAnalogInputsThunk.ts b/redux/thunks/getAnalogInputsThunk.ts similarity index 88% rename from redux/thunks/fetchAnalogInputsThunk.ts rename to redux/thunks/getAnalogInputsThunk.ts index 40cf4e1..35697bb 100644 --- a/redux/thunks/fetchAnalogInputsThunk.ts +++ b/redux/thunks/getAnalogInputsThunk.ts @@ -1,4 +1,4 @@ -// /redux/thunks/fetchAnalogInputsThunk.ts +// /redux/thunks/getAnalogInputsThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchAnalogInputsService } from "@/services/fetchAnalogInputsService"; import { setAnalogInputs } from "@/redux/slices/analogInputsSlice"; @@ -6,7 +6,7 @@ import { setAnalogInputs } from "@/redux/slices/analogInputsSlice"; /** * Holt die analogen Eingänge von der API und speichert sie in Redux. */ -export const fetchAnalogInputsThunk = createAsyncThunk( +export const getAnalogInputsThunk = createAsyncThunk( "analogeInputs/fetchAnalogInputs", async (_, { dispatch }) => { if (typeof window === "undefined") return; // Server-Side Execution blockieren diff --git a/redux/thunks/fetchDigitalInputsThunk.ts b/redux/thunks/getDigitalInputsThunk.ts similarity index 86% rename from redux/thunks/fetchDigitalInputsThunk.ts rename to redux/thunks/getDigitalInputsThunk.ts index 95b26d4..4f76eda 100644 --- a/redux/thunks/fetchDigitalInputsThunk.ts +++ b/redux/thunks/getDigitalInputsThunk.ts @@ -1,4 +1,4 @@ -// @/redux/thunks/fetchDigitalInputsThunk.ts +// @/redux/thunks/getDigitalInputsThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchDigitalInputsService } from "@/services/fetchDigitalInputsService"; import { setInputs } from "@/redux/slices/digitalInputsSlice"; @@ -6,7 +6,7 @@ import { setInputs } from "@/redux/slices/digitalInputsSlice"; /** * Holt digitale Eingänge von der API und speichert sie in Redux. */ -export const fetchDigitalInputsThunk = createAsyncThunk( +export const getDigitalInputsThunk = createAsyncThunk( "digitalInputs/fetchDigitalInputs", async (_, { dispatch }) => { if (typeof window === "undefined") return; diff --git a/redux/thunks/fetchDigitalOutputsThunk.ts b/redux/thunks/getDigitalOutputsThunk.ts similarity index 76% rename from redux/thunks/fetchDigitalOutputsThunk.ts rename to redux/thunks/getDigitalOutputsThunk.ts index 75377ec..5116a97 100644 --- a/redux/thunks/fetchDigitalOutputsThunk.ts +++ b/redux/thunks/getDigitalOutputsThunk.ts @@ -1,10 +1,10 @@ -// ✅ Thunk: /redux/thunks/fetchDigitalOutputsThunk.ts +// ✅ Thunk: /redux/thunks/getDigitalOutputsThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchDigitalOutputsService } from "../../services/fetchDigitalOutputsService"; import { setDigitalOutputs } from "../slices/digitalOutputsSlice"; -export const fetchDigitalOutputsThunk = createAsyncThunk( +export const getDigitalOutputsThunk = createAsyncThunk( "digitalOutputs/fetch", async (_, { dispatch }) => { const outputs = await fetchDigitalOutputsService(); diff --git a/redux/thunks/fetchKueDataThunk.ts b/redux/thunks/getKueDataThunk.ts similarity index 77% rename from redux/thunks/fetchKueDataThunk.ts rename to redux/thunks/getKueDataThunk.ts index 00a8eb6..a4db64c 100644 --- a/redux/thunks/fetchKueDataThunk.ts +++ b/redux/thunks/getKueDataThunk.ts @@ -1,10 +1,10 @@ -// ✅ Thunk: /redux/thunks/fetchKueDataThunk.ts +// ✅ Thunk: /redux/thunks/getKueDataThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchKueDataService } from "../../services/fetchKueDataService"; import { setKueData } from "../slices/kueDataSlice"; -export const fetchKueDataThunk = createAsyncThunk( +export const getKueDataThunk = createAsyncThunk( "kueData/fetch", async (_, { dispatch }) => { const data = await fetchKueDataService(); diff --git a/redux/thunks/fetchLast20MessagesThunk.ts b/redux/thunks/getLast20MessagesThunk.ts similarity index 80% rename from redux/thunks/fetchLast20MessagesThunk.ts rename to redux/thunks/getLast20MessagesThunk.ts index 0715bdd..1b9f156 100644 --- a/redux/thunks/fetchLast20MessagesThunk.ts +++ b/redux/thunks/getLast20MessagesThunk.ts @@ -1,9 +1,9 @@ -// /redux/thunks/fetchLast20MessagesThunk.ts +// /redux/thunks/getLast20MessagesThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchLast20MessagesFromWindow } from "../../services/fetchLast20MessagesService"; import { setLast20Messages } from "../slices/last20MessagesSlice"; -export const fetchLast20MessagesThunk = createAsyncThunk( +export const getLast20MessagesThunk = createAsyncThunk( "last20Messages/fetchLast20Messages", async (_, { dispatch }) => { const messages = await fetchLast20MessagesFromWindow(); diff --git a/redux/thunks/fetchLoopChartDataThunk.ts b/redux/thunks/getLoopChartDataThunk.ts similarity index 82% rename from redux/thunks/fetchLoopChartDataThunk.ts rename to redux/thunks/getLoopChartDataThunk.ts index 4d30a59..16dd3f7 100644 --- a/redux/thunks/fetchLoopChartDataThunk.ts +++ b/redux/thunks/getLoopChartDataThunk.ts @@ -1,4 +1,4 @@ -// /redux/thunks/fetchLoopChartDataThunk.ts +// /redux/thunks/getLoopChartDataThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchLoopChartData } from "../../services/fetchLoopChartDataService"; @@ -10,7 +10,7 @@ interface FetchLoopChartDataParams { bisDatum: string; } -export const fetchLoopChartDataThunk = createAsyncThunk( +export const getLoopChartDataThunk = createAsyncThunk( "loopChart/fetchLoopChartData", async (params: FetchLoopChartDataParams, { rejectWithValue }) => { try { @@ -28,7 +28,7 @@ export const fetchLoopChartDataThunk = createAsyncThunk( return data; } catch (error: any) { - console.error("❌ Fehler in fetchLoopChartDataThunk:", error); + console.error("❌ Fehler in getLoopChartDataThunk:", error); return rejectWithValue(error.message || "Unbekannter Fehler"); } } diff --git a/redux/thunks/fetchOpcUaSettingsThunk.ts b/redux/thunks/getOpcUaSettingsThunk.ts similarity index 85% rename from redux/thunks/fetchOpcUaSettingsThunk.ts rename to redux/thunks/getOpcUaSettingsThunk.ts index 8ec545b..35b8c2e 100644 --- a/redux/thunks/fetchOpcUaSettingsThunk.ts +++ b/redux/thunks/getOpcUaSettingsThunk.ts @@ -1,4 +1,4 @@ -// ✅ 2. Thunk: /redux/thunks/fetchOpcUaSettingsThunk.ts +// ✅ 2. Thunk: /redux/thunks/getOpcUaSettingsThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchOpcUaSettingsService } from "../../services/fetchOpcUaSettingsService"; import { @@ -9,7 +9,7 @@ import { //setOpcUaUsers, } from "../slices/opcuaSettingsSlice"; -export const fetchOpcUaSettingsThunk = createAsyncThunk( +export const getOpcUaSettingsThunk = createAsyncThunk( "opcuaSettings/fetch", async (_, { dispatch }) => { const data = await fetchOpcUaSettingsService(); diff --git a/redux/thunks/fetchReferenceCurveBySlotThunk.ts b/redux/thunks/getReferenceCurveBySlotThunk.ts similarity index 76% rename from redux/thunks/fetchReferenceCurveBySlotThunk.ts rename to redux/thunks/getReferenceCurveBySlotThunk.ts index a935072..9f3ad59 100644 --- a/redux/thunks/fetchReferenceCurveBySlotThunk.ts +++ b/redux/thunks/getReferenceCurveBySlotThunk.ts @@ -1,8 +1,8 @@ -// /redux/thunks/fetchReferenceCurveBySlotThunk.ts +// /redux/thunks/getReferenceCurveBySlotThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchTDRReferenceCurveService } from "../../services/fetchTDRReferenceCurveService"; -export const fetchReferenceCurveBySlotThunk = createAsyncThunk( +export const getReferenceCurveBySlotThunk = createAsyncThunk( "tdrReferenceChart/fetchBySlot", async (slot: number) => { const data = await fetchTDRReferenceCurveService(slot); diff --git a/redux/thunks/fetchSystemSettingsThunk.ts b/redux/thunks/getSystemSettingsThunk.ts similarity index 77% rename from redux/thunks/fetchSystemSettingsThunk.ts rename to redux/thunks/getSystemSettingsThunk.ts index e176fa8..76d5401 100644 --- a/redux/thunks/fetchSystemSettingsThunk.ts +++ b/redux/thunks/getSystemSettingsThunk.ts @@ -1,9 +1,9 @@ -// /redux/thunks/fetchSystemSettingsThunk.ts +// /redux/thunks/getSystemSettingsThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchSystemService } from "../../services/fetchSystemService"; import { setSystemSettings } from "../slices/systemSettingsSlice"; -export const fetchSystemSettingsThunk = createAsyncThunk( +export const getSystemSettingsThunk = createAsyncThunk( "systemSettings/fetch", async (_, { dispatch }) => { const data = await fetchSystemService(); diff --git a/redux/thunks/fetchSystemVoltTempThunk.ts b/redux/thunks/getSystemVoltTempThunk.ts similarity index 81% rename from redux/thunks/fetchSystemVoltTempThunk.ts rename to redux/thunks/getSystemVoltTempThunk.ts index bc15901..e30042b 100644 --- a/redux/thunks/fetchSystemVoltTempThunk.ts +++ b/redux/thunks/getSystemVoltTempThunk.ts @@ -1,9 +1,9 @@ -// /redux/thunks/fetchSystemVoltTempThunk.ts +// /redux/thunks/getSystemVoltTempThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchSystemVoltTempService } from "../../services/fetchSystemVoltTempService"; import { setVoltages, addHistory } from "../slices/systemVoltTempSlice"; -export const fetchSystemVoltTempThunk = createAsyncThunk( +export const getSystemVoltTempThunk = createAsyncThunk( "systemVoltTemp/fetch", async (_, { dispatch }) => { const data = await fetchSystemVoltTempService(); diff --git a/redux/thunks/fetchTDMListBySlotThunk.ts b/redux/thunks/getTDMListBySlotThunk.ts similarity index 100% rename from redux/thunks/fetchTDMListBySlotThunk.ts rename to redux/thunks/getTDMListBySlotThunk.ts diff --git a/redux/thunks/fetchTDRChartDataByIdThunk.ts b/redux/thunks/getTDRChartDataByIdThunk.ts similarity index 76% rename from redux/thunks/fetchTDRChartDataByIdThunk.ts rename to redux/thunks/getTDRChartDataByIdThunk.ts index c20e96f..1181e72 100644 --- a/redux/thunks/fetchTDRChartDataByIdThunk.ts +++ b/redux/thunks/getTDRChartDataByIdThunk.ts @@ -1,8 +1,8 @@ -// /redux/thunks/fetchTDRChartDataByIdThunk.ts +// /redux/thunks/getTDRChartDataByIdThunk.ts import { createAsyncThunk } from "@reduxjs/toolkit"; import { fetchTDRChartDataByIdService } from "../../services/fetchTDRChartDataByIdService"; -export const fetchTDRChartDataByIdThunk = createAsyncThunk( +export const getTDRChartDataByIdThunk = createAsyncThunk( "tdrDataById/fetchById", async (id: number) => { const data = await fetchTDRChartDataByIdService(id);