Feat: KVz Bereich in EinstellungsModal in KÜs Modal

This commit is contained in:
ISA
2025-07-31 10:42:06 +02:00
parent b68eb10ad4
commit 97eb40e1c6
8 changed files with 235 additions and 19 deletions

View File

@@ -79,6 +79,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
kueOverflow: kueOverflowRaw,
kuePSTmMinus96V, // <- richtig, weil so im State vorhanden
tdrActive, // <- TDR aktiv Status hinzugefügt
win_fallSensorsActive, // <- KVz aktiv Status hinzugefügt
} = useSelector((state: RootState) => state.kueDataSlice);
//---------------------------------------------
@@ -227,6 +228,9 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
// TDR aktiv Status für diesen Slot prüfen
const isTdrActiveForSlot = tdrActive?.[slotIndex] === 1;
// KVz aktiv Status für diesen Slot prüfen
const isKvzActiveForSlot = win_fallSensorsActive?.[slotIndex] === 1;
// Removed useChartData(loopMeasurementCurveChartData) as the state was unused
//---------------------------------
@@ -401,12 +405,15 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
TDR
</button>
)}
<button
onClick={openKvzModal}
className="bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center p-2"
>
KVz
</button>
{/* KVz Button - nur anzeigen wenn KVz aktiv ist */}
{isKvzActiveForSlot && (
<button
onClick={openKvzModal}
className="bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center p-2"
>
KVz
</button>
)}
</div>
{/* Messkurve Button */}
@@ -443,8 +450,8 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
</>
)}
{/* KVz Panel - Anzeige ganz unten */}
{showKvzPanel && (
{/* KVz Panel - Anzeige ganz unten, nur wenn KVz aktiv ist */}
{showKvzPanel && isKvzActiveForSlot && (
<div className=" bg-gray-400 mt-4 border p-1">
<FallSensors />
</div>