fix: nach variablesslice gelöscht, war noch paar Abhängigkeite
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// components/modales/kueModal/handlers/handleSave.ts
|
// components/modales/kueModal/handlers/handleSave.ts
|
||||||
import { setVariables } from "../../../../../redux/slices/variablesSlice";
|
import { setKueData } from "../../../../../redux/slices/kueDataSlice";
|
||||||
|
|
||||||
export interface OriginalValues {
|
export interface OriginalValues {
|
||||||
kueID: string[];
|
kueID: string[];
|
||||||
@@ -95,7 +95,7 @@ const handleSave = ({
|
|||||||
onModulNameChange(ids[slot]);
|
onModulNameChange(ids[slot]);
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
setVariables({
|
setKueData({
|
||||||
kueID: [...ids],
|
kueID: [...ids],
|
||||||
kueBezeichnungen: [...bezeichnungen],
|
kueBezeichnungen: [...bezeichnungen],
|
||||||
isolationsgrenzwerte: [...isolationsgrenzwerte],
|
isolationsgrenzwerte: [...isolationsgrenzwerte],
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import { setSelectedChartData } from "../../../../../redux/slices/variablesSlice";
|
import { setSelectedChartData } from "../../../../../redux/slices/selectedChartDataSlice";
|
||||||
|
|
||||||
const useChartData = (loopMeasurementCurveChartData: any) => {
|
const useChartData = (loopMeasurementCurveChartData: any) => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
|
|||||||
@@ -6,5 +6,5 @@
|
|||||||
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
2: Patch oder Hotfix (Bugfixes oder kleine Änderungen).
|
||||||
|
|
||||||
*/
|
*/
|
||||||
const webVersion = "1.6.172";
|
const webVersion = "1.6.173";
|
||||||
export default webVersion;
|
export default webVersion;
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import Footer from "../components/footer/Footer";
|
|||||||
import WindowVariablesInitializer from "../components/WindowVariablesInitializer";
|
import WindowVariablesInitializer from "../components/WindowVariablesInitializer";
|
||||||
import "../styles/globals.css";
|
import "../styles/globals.css";
|
||||||
import { AppProps } from "next/app";
|
import { AppProps } from "next/app";
|
||||||
import { setVariables } from "../redux/slices/variablesSlice";
|
|
||||||
|
|
||||||
function MyApp({ Component, pageProps }: AppProps) {
|
function MyApp({ Component, pageProps }: AppProps) {
|
||||||
return (
|
return (
|
||||||
@@ -35,8 +34,6 @@ function AppContent({ Component, pageProps }: AppProps) {
|
|||||||
|
|
||||||
const { ...restVariables } = variables;
|
const { ...restVariables } = variables;
|
||||||
|
|
||||||
dispatch(setVariables(restVariables));
|
|
||||||
|
|
||||||
setSessionExpired(false);
|
setSessionExpired(false);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("❌ Fehler beim Laden der Sitzung:", error);
|
console.error("❌ Fehler beim Laden der Sitzung:", error);
|
||||||
|
|||||||
@@ -2,6 +2,18 @@
|
|||||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||||
|
|
||||||
interface KueDataState {
|
interface KueDataState {
|
||||||
|
//---------------------
|
||||||
|
kueBezeichnungen: string[];
|
||||||
|
isolationsgrenzwerte: number[];
|
||||||
|
verzoegerung: number[];
|
||||||
|
untereSchleifenGrenzwerte: number[];
|
||||||
|
obereSchleifenGrenzwerte: number[];
|
||||||
|
schleifenintervall: number[];
|
||||||
|
//---------------
|
||||||
|
counter: number | null;
|
||||||
|
flutter: string | null;
|
||||||
|
//-----------------------
|
||||||
|
//-----------------------
|
||||||
kueOnline: number[];
|
kueOnline: number[];
|
||||||
kueID: string[];
|
kueID: string[];
|
||||||
kuePSTmMinus96V: number[];
|
kuePSTmMinus96V: number[];
|
||||||
@@ -30,6 +42,18 @@ interface KueDataState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const initialState: KueDataState = {
|
const initialState: KueDataState = {
|
||||||
|
//---------------------
|
||||||
|
kueBezeichnungen: [],
|
||||||
|
isolationsgrenzwerte: [],
|
||||||
|
verzoegerung: [],
|
||||||
|
untereSchleifenGrenzwerte: [],
|
||||||
|
obereSchleifenGrenzwerte: [],
|
||||||
|
schleifenintervall: [],
|
||||||
|
//---------------
|
||||||
|
counter: null,
|
||||||
|
flutter: null,
|
||||||
|
//-----------------------
|
||||||
|
//-----------------------
|
||||||
kueOnline: [],
|
kueOnline: [],
|
||||||
kueID: [],
|
kueID: [],
|
||||||
kuePSTmMinus96V: [],
|
kuePSTmMinus96V: [],
|
||||||
|
|||||||
@@ -1,110 +0,0 @@
|
|||||||
// redux/slices/variablesSlice.ts
|
|
||||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
|
||||||
|
|
||||||
// Typ für den State
|
|
||||||
export interface VariablesState {
|
|
||||||
selectedChartData: any;
|
|
||||||
kueBezeichnungen: string[];
|
|
||||||
isolationsgrenzwerte: number[];
|
|
||||||
verzoegerung: number[];
|
|
||||||
untereSchleifenGrenzwerte: number[];
|
|
||||||
obereSchleifenGrenzwerte: number[];
|
|
||||||
schleifenintervall: number[];
|
|
||||||
//---------------
|
|
||||||
counter: number | null;
|
|
||||||
flutter: string | null;
|
|
||||||
kueOnline: string[] | number[];
|
|
||||||
kueID: string[];
|
|
||||||
kueIso: string[];
|
|
||||||
kuePSTmMinus96V: number[];
|
|
||||||
kueAlarm1: number[];
|
|
||||||
kueAlarm2: number[];
|
|
||||||
kueResidence: string[];
|
|
||||||
kueCableBreak: string[];
|
|
||||||
kueGroundFault: string[];
|
|
||||||
kueLimit1: number | null;
|
|
||||||
kueLimit2Low: number | null;
|
|
||||||
kueDelay1: number | null;
|
|
||||||
kueLoopInterval: number | null;
|
|
||||||
kueVersion: number[] | string[];
|
|
||||||
tdrAtten: number | null;
|
|
||||||
tdrPulse: number | null;
|
|
||||||
tdrSpeed: number | null;
|
|
||||||
tdrAmp: number | null;
|
|
||||||
tdrTrigger: number | null;
|
|
||||||
tdrLocation: number | null;
|
|
||||||
tdrActive: boolean | null;
|
|
||||||
kueOverflow: number[] | null;
|
|
||||||
tdrLast: string | null;
|
|
||||||
appVersion: string | null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialer Zustand
|
|
||||||
const initialState: VariablesState = {
|
|
||||||
selectedChartData: null,
|
|
||||||
kueBezeichnungen: [],
|
|
||||||
isolationsgrenzwerte: [],
|
|
||||||
verzoegerung: [],
|
|
||||||
untereSchleifenGrenzwerte: [],
|
|
||||||
obereSchleifenGrenzwerte: [],
|
|
||||||
schleifenintervall: [],
|
|
||||||
counter: null,
|
|
||||||
flutter: null,
|
|
||||||
kueOnline: [],
|
|
||||||
kueID: [],
|
|
||||||
kueIso: [],
|
|
||||||
kuePSTmMinus96V: [],
|
|
||||||
kueAlarm1: [],
|
|
||||||
kueAlarm2: [],
|
|
||||||
kueResidence: [],
|
|
||||||
kueCableBreak: [],
|
|
||||||
kueGroundFault: [],
|
|
||||||
kueLimit1: null,
|
|
||||||
kueLimit2Low: null,
|
|
||||||
kueDelay1: null,
|
|
||||||
kueLoopInterval: null,
|
|
||||||
kueVersion: [],
|
|
||||||
tdrAtten: null,
|
|
||||||
tdrPulse: null,
|
|
||||||
tdrSpeed: null,
|
|
||||||
tdrAmp: null,
|
|
||||||
tdrTrigger: null,
|
|
||||||
tdrLocation: null,
|
|
||||||
tdrActive: null,
|
|
||||||
kueOverflow: null,
|
|
||||||
tdrLast: null,
|
|
||||||
appVersion: null,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Slice erstellen
|
|
||||||
const variablesSlice = createSlice({
|
|
||||||
name: "variables",
|
|
||||||
initialState,
|
|
||||||
reducers: {
|
|
||||||
setSelectedChartData(state, action: PayloadAction<any>) {
|
|
||||||
state.selectedChartData = action.payload;
|
|
||||||
},
|
|
||||||
setVariable(
|
|
||||||
state,
|
|
||||||
action: PayloadAction<{
|
|
||||||
key: keyof VariablesState;
|
|
||||||
value: VariablesState[keyof VariablesState];
|
|
||||||
}>
|
|
||||||
) {
|
|
||||||
const { key, value } = action.payload;
|
|
||||||
(state[key] as VariablesState[keyof VariablesState]) = value;
|
|
||||||
},
|
|
||||||
setVariables(state, action: PayloadAction<Partial<VariablesState>>) {
|
|
||||||
Object.entries(action.payload).forEach(([key, value]) => {
|
|
||||||
(state[
|
|
||||||
key as keyof VariablesState
|
|
||||||
] as VariablesState[keyof VariablesState]) = value!;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export const { setSelectedChartData, setVariable, setVariables } =
|
|
||||||
variablesSlice.actions;
|
|
||||||
|
|
||||||
export default variablesSlice.reducer;
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
import { configureStore } from "@reduxjs/toolkit";
|
import { configureStore } from "@reduxjs/toolkit";
|
||||||
import { useDispatch } from "react-redux";
|
import { useDispatch } from "react-redux";
|
||||||
import authReducer from "./slices/authSlice";
|
import authReducer from "./slices/authSlice";
|
||||||
import variablesReducer from "./slices/variablesSlice";
|
|
||||||
import kueChartModeReducer from "./slices/kueChartModeSlice";
|
import kueChartModeReducer from "./slices/kueChartModeSlice";
|
||||||
import webVersionReducer from "./slices/webVersionSlice";
|
import webVersionReducer from "./slices/webVersionSlice";
|
||||||
import kabelueberwachungChartReducer from "./slices/kabelueberwachungChartSlice";
|
import kabelueberwachungChartReducer from "./slices/kabelueberwachungChartSlice";
|
||||||
@@ -24,7 +23,6 @@ import selectedChartDataReducer from "./slices/selectedChartDataSlice";
|
|||||||
const store = configureStore({
|
const store = configureStore({
|
||||||
reducer: {
|
reducer: {
|
||||||
auth: authReducer,
|
auth: authReducer,
|
||||||
variables: variablesReducer,
|
|
||||||
kueChartMode: kueChartModeReducer,
|
kueChartMode: kueChartModeReducer,
|
||||||
webVersion: webVersionReducer,
|
webVersion: webVersionReducer,
|
||||||
digitalInputs: digitalInputsReducer,
|
digitalInputs: digitalInputsReducer,
|
||||||
|
|||||||
Reference in New Issue
Block a user