Alle TDM und TDR in Mock speichern

This commit is contained in:
ISA
2025-03-28 10:42:54 +01:00
parent 35c9c1e486
commit e2d8bb0f05
527 changed files with 1415548 additions and 7099 deletions

View File

@@ -2,14 +2,13 @@
import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchTDMDataBySlot } from "../../services/fetchSingleTDMData";
import { setLoopMeasurementCurveChartData } from "../slices/kabelueberwachungChartSlice";
export const fetchTDMDataBySlotThunk = createAsyncThunk(
"tdmChart/fetchSlotData",
async (slot: number, { dispatch }) => {
"tdmSingleChart/fetchSlotData",
async (slot: number) => {
const data = await fetchTDMDataBySlot(slot);
if (data) {
dispatch(setLoopMeasurementCurveChartData(data));
}
if (!data) throw new Error("Keine TDM-Daten für diesen Slot gefunden");
return { slot, data }; // ✅ das erwartet der Slice!
}
);