Letzte TDR-Messung anzeigen für ausgewählte Slot

This commit is contained in:
ISA
2025-03-28 12:26:43 +01:00
parent e2d8bb0f05
commit 37af5702fa
14 changed files with 61 additions and 163 deletions

View File

@@ -1,7 +1,7 @@
// /redux/thunks/fetchTDMDataBySlotThunk.ts
import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchTDMDataBySlot } from "../../services/fetchSingleTDMData";
import { fetchTDMDataBySlot } from "../../services/fetchTDMListBySlot";
export const fetchTDMDataBySlotThunk = createAsyncThunk(
"tdmSingleChart/fetchSlotData",

View File

@@ -0,0 +1,12 @@
// /redux/thunks/fetchTDRChartDataByIdThunk.ts
import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchTDRChartDataById } from "../../services/fetchTDRChartDataById";
export const fetchTDRChartDataByIdThunk = createAsyncThunk(
"tdrDataById/fetchById",
async (id: number) => {
const data = await fetchTDRChartDataById(id);
if (!data) throw new Error(`Keine TDR-Daten für ID ${id}`);
return { id, data };
}
);

View File

@@ -1,13 +0,0 @@
// /redux/thunks/fetchTDRChartDataBySlotThunk.ts
import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchTDRChartDataBySlot } from "../../services/fetchSingleTDRChartData";
export const fetchTDRChartDataBySlotThunk = createAsyncThunk(
"tdrChart/fetchSlotData",
async (slot: number) => {
const data = await fetchTDRChartDataBySlot(slot);
if (!data) throw new Error(`Daten für Slot ${slot} nicht gefunden`);
return { slot, data };
}
);