TDR Modal Slot Nummer anzeigen

This commit is contained in:
ISA
2025-03-25 12:22:07 +01:00
parent fe5403efc4
commit d59027dc17
4 changed files with 26 additions and 9 deletions

View File

@@ -58,6 +58,13 @@ const TDRChartActionBar: React.FC = () => {
//--------------------------------
return (
<div className="flex justify-between items-center p-2 bg-gray-100 rounded-lg space-x-4">
{/* Ausgewählte Slot Nummer anzeigen */}
<div className="text-sm font-semibold">
{selectedSlot !== null
? `Slot ${selectedSlot + 1}`
: "Kein Slot gewählt"}
</div>
{/* 🔵 Linke Seite: Reset-Button */}
<button
className="border border-gray-300 bg-white rounded px-3 py-1 text-sm hover:bg-gray-200"

View File

@@ -148,13 +148,19 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
modulName
);
const { loopDisplayValue, setLoopDisplayValue } = useLoopDisplay(
typeof schleifenwiderstand === "number"
const loopValue =
activeButton === "TDR"
? Array.isArray(tdrLocation) && typeof tdrLocation[slotIndex] === "number"
? tdrLocation[slotIndex]
: 0
: typeof schleifenwiderstand === "number"
? schleifenwiderstand
: Number(schleifenwiderstand),
: Number(schleifenwiderstand);
const { loopDisplayValue, setLoopDisplayValue } = useLoopDisplay(
loopValue,
activeButton
);
const zoomPlugin = useChartPlugin();
useChartData(loopMeasurementCurveChartData);
const { chartInstance } = useTDRChart(selectedChartData);