feat(kabelname): Anzeige des Kabelnamens statt Bezeichnung unter jedem Modul (Änderungswunsch)

This commit is contained in:
ISA
2025-06-16 14:03:19 +02:00
parent 860ab1d7c2
commit ad73dcf054
7 changed files with 39 additions and 10 deletions

View File

@@ -1,8 +1,6 @@
// KueEinstellung.tsx final überarbeitet: formData wird direkt nach dem Speichern aktualisiert
"use client";
import { useState } from "react";
import { useState, useEffect } from "react";
import { useDispatch, useSelector } from "react-redux";
import type { RootState } from "../../../../../redux/store";
import handleSave from "../handlers/handleSave";
@@ -78,8 +76,11 @@ export default function KueEinstellung({
const handleSaveWrapper = async () => {
const updatedKueID = [...kueID];
updatedKueID[slot] = formData.kueID;
//updatedKueID[slot] = formData.kueID;
/* if (Object.isFrozen(kueID)) {
console.warn("kueID ist readonly!");
}
*/
const updatedKueName = [...kueName];
updatedKueName[slot] = formData.kueName;
@@ -116,7 +117,7 @@ export default function KueEinstellung({
// 🔧 handleSave aufrufen mit allen Daten
await handleSave({
slot,
ids: updatedKueID,
ids: kueID,
kueName: updatedKueName,
isolationsgrenzwerte: updatedLimit1,
verzoegerung: updatedDelay1,
@@ -135,7 +136,7 @@ export default function KueEinstellung({
speicherintervall: memoryInterval,
},
dispatch,
onModulNameChange,
onModulNameChange: onModulNameChange ?? (() => {}),
onClose,
});
};