refactor(Kue705FO): integrate chart functionality into detail view buttons

- Remove separate TDR/Schleife Messkurve buttons section
- Add direct chart opening to ISO, RSL, and TDR buttons in detail view
- ISO and RSL buttons now open Schleife chart with proper state setup
- TDR button opens TDR chart with distance calculation
- Remove unused button container but keep structure for future use
- Clean up unused imports and variables needed
This commit is contained in:
ISA
2025-07-25 11:56:46 +02:00
parent 4af7836a54
commit afdcb6b92f
6 changed files with 48 additions and 45 deletions

View File

@@ -369,13 +369,33 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
{/* ISO and RSL Buttons */}
<div className="flex space-x-2">
<button
onClick={openChartModal}
onClick={() => {
setActiveButton("Schleife");
setloopTitleText("Schleifenwiderstand [kOhm]");
setLoopDisplayValue(Number(schleifenwiderstand));
handleOpenChartModal(
setShowChartModal,
dispatch,
slotIndex,
"Schleife"
);
}}
className="bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center p-2"
>
ISO
</button>
<button
onClick={openChartModal}
onClick={() => {
setActiveButton("Schleife");
setloopTitleText("Schleifenwiderstand [kOhm]");
setLoopDisplayValue(Number(schleifenwiderstand));
handleOpenChartModal(
setShowChartModal,
dispatch,
slotIndex,
"Schleife"
);
}}
className="bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center p-2"
>
RSL
@@ -384,29 +404,6 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
{/* TDR and KVz Buttons */}
<div className="flex space-x-2 p-1">
<button
onClick={openChartModal}
className=" bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center p-2"
>
TDR
</button>
<button
onClick={openChartModal}
className="bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center p-2"
>
KVz
</button>
</div>
{/* Messkurve Button */}
<button
onClick={openChartModal}
className="w-full h-[1.863rem] bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center"
>
Messkurve
</button>
{/* TDR Messkurve und Schleife Messkurve Buttons */}
<div className="flex flex-col space-y-2 w-full">
<button
onClick={() => {
setActiveButton("TDR");
@@ -430,27 +427,22 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
"TDR"
);
}}
className="w-full h-[1.563rem] bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center"
className=" bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center p-2"
>
TDR Messkurve
TDR
</button>
<button
onClick={() => {
setActiveButton("Schleife");
setloopTitleText("Schleifenwiderstand [kOhm]");
setLoopDisplayValue(Number(schleifenwiderstand));
handleOpenChartModal(
setShowChartModal,
dispatch,
slotIndex,
"Schleife"
);
}}
className="w-full h-[1.563rem] bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center"
onClick={openChartModal}
className="bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center p-2"
>
Schleife Messkurve
KVz
</button>
</div>
{/* Messkurve Button */}
{/* TDR Messkurve und Schleife Messkurve Buttons */}
<div className="flex flex-col space-y-2 w-full"></div>
</div>
{/* Modal für Messkurve */}