feat(Kue705FO): replace switch buttons with direct chart access buttons
- Remove Schleife/TDR switch buttons and separate Messkurve button - Add "TDR Messkurve" and "Schleife Messkurve" buttons for direct chart access - Each button opens the corresponding chart type directly - Improve user experience by reducing clicks needed to access specific charts - Clean up unused imports (handleButtonClick, tdrLocation, tdrActive)
This commit is contained in:
@@ -6,6 +6,6 @@ NEXT_PUBLIC_USE_MOCK_BACKEND_LOOP_START=false
|
||||
NEXT_PUBLIC_EXPORT_STATIC=false
|
||||
NEXT_PUBLIC_USE_CGI=false
|
||||
# App-Versionsnummer
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.648
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.649
|
||||
NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||
NEXT_PUBLIC_USE_CGI=true
|
||||
# App-Versionsnummer
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.648
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.649
|
||||
NEXT_PUBLIC_CPL_MODE=production
|
||||
@@ -1,3 +1,8 @@
|
||||
## [1.6.649] – 2025-07-25
|
||||
|
||||
- TDR und Schleife Button in KÜs wieder für die Funktionen
|
||||
|
||||
---
|
||||
## [1.6.648] – 2025-07-24
|
||||
|
||||
- TDR und Schleife Button in KÜs wieder für die Funktionen
|
||||
|
||||
@@ -405,31 +405,8 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
>
|
||||
Messkurve
|
||||
</button>
|
||||
<div className="flex mt-3 space-x-[0.063rem] ">
|
||||
<button
|
||||
onClick={() =>
|
||||
handleButtonClick(
|
||||
"Schleife",
|
||||
setActiveButton,
|
||||
setloopTitleText,
|
||||
(value) =>
|
||||
setLoopDisplayValue(
|
||||
typeof value === "number" ? value : Number(value)
|
||||
), // Hier sicherstellen, dass nur number übergeben wird
|
||||
Number(schleifenwiderstand), // <- Stelle sicher, dass es eine Zahl ist
|
||||
tdrLocation,
|
||||
dispatch,
|
||||
slotIndex
|
||||
)
|
||||
}
|
||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
||||
activeButton === "Schleife"
|
||||
? "bg-littwin-blue"
|
||||
: "bg-gray-400"
|
||||
}`}
|
||||
>
|
||||
Schleife
|
||||
</button>
|
||||
{/* TDR Messkurve und Schleife Messkurve Buttons */}
|
||||
<div className="flex flex-col space-y-2 w-full">
|
||||
<button
|
||||
onClick={() => {
|
||||
setActiveButton("TDR");
|
||||
@@ -446,19 +423,32 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
(latestTdrDistanceMeters / 1000).toFixed(3)
|
||||
);
|
||||
setLoopDisplayValue(latestTdrDistance);
|
||||
handleOpenChartModal(
|
||||
setShowChartModal,
|
||||
dispatch,
|
||||
slotIndex,
|
||||
"TDR"
|
||||
);
|
||||
}}
|
||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
||||
Array.isArray(tdrActive) && tdrActive[slotIndex] === 0
|
||||
? "bg-gray-200 cursor-not-allowed" // Deaktiviert: Hellgrau
|
||||
: activeButton === "TDR"
|
||||
? "bg-littwin-blue" // Aktiviert: Littwin Blau
|
||||
: "bg-gray-400" // Nicht geklickt: Dunkelgrau
|
||||
}`}
|
||||
disabled={
|
||||
Array.isArray(tdrActive) && tdrActive[slotIndex] === 0
|
||||
} // Button deaktiviert, wenn TDR für diesen Slot nicht aktiv ist
|
||||
className="w-full h-[1.563rem] bg-littwin-blue text-white text-[0.625rem] flex items-center justify-center"
|
||||
>
|
||||
TDR
|
||||
TDR Messkurve
|
||||
</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"
|
||||
>
|
||||
Schleife Messkurve
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.648",
|
||||
"version": "1.6.649",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.648",
|
||||
"version": "1.6.649",
|
||||
"dependencies": {
|
||||
"@fontsource/roboto": "^5.1.0",
|
||||
"@headlessui/react": "^2.2.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.648",
|
||||
"version": "1.6.649",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
Reference in New Issue
Block a user