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_EXPORT_STATIC=false
|
||||||
NEXT_PUBLIC_USE_CGI=false
|
NEXT_PUBLIC_USE_CGI=false
|
||||||
# App-Versionsnummer
|
# 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)
|
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_EXPORT_STATIC=true
|
||||||
NEXT_PUBLIC_USE_CGI=true
|
NEXT_PUBLIC_USE_CGI=true
|
||||||
# App-Versionsnummer
|
# App-Versionsnummer
|
||||||
NEXT_PUBLIC_APP_VERSION=1.6.648
|
NEXT_PUBLIC_APP_VERSION=1.6.649
|
||||||
NEXT_PUBLIC_CPL_MODE=production
|
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
|
## [1.6.648] – 2025-07-24
|
||||||
|
|
||||||
- TDR und Schleife Button in KÜs wieder für die Funktionen
|
- TDR und Schleife Button in KÜs wieder für die Funktionen
|
||||||
|
|||||||
@@ -405,31 +405,8 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
|||||||
>
|
>
|
||||||
Messkurve
|
Messkurve
|
||||||
</button>
|
</button>
|
||||||
<div className="flex mt-3 space-x-[0.063rem] ">
|
{/* TDR Messkurve und Schleife Messkurve Buttons */}
|
||||||
<button
|
<div className="flex flex-col space-y-2 w-full">
|
||||||
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>
|
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setActiveButton("TDR");
|
setActiveButton("TDR");
|
||||||
@@ -446,19 +423,32 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
|||||||
(latestTdrDistanceMeters / 1000).toFixed(3)
|
(latestTdrDistanceMeters / 1000).toFixed(3)
|
||||||
);
|
);
|
||||||
setLoopDisplayValue(latestTdrDistance);
|
setLoopDisplayValue(latestTdrDistance);
|
||||||
|
handleOpenChartModal(
|
||||||
|
setShowChartModal,
|
||||||
|
dispatch,
|
||||||
|
slotIndex,
|
||||||
|
"TDR"
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
className={`w-[50%] h-[1.563rem] text-white text-[0.625rem] flex items-center justify-center ${
|
className="w-full h-[1.563rem] bg-littwin-blue 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
|
|
||||||
>
|
>
|
||||||
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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.648",
|
"version": "1.6.649",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.648",
|
"version": "1.6.649",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/roboto": "^5.1.0",
|
"@fontsource/roboto": "^5.1.0",
|
||||||
"@headlessui/react": "^2.2.4",
|
"@headlessui/react": "^2.2.4",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "cpl-v4",
|
"name": "cpl-v4",
|
||||||
"version": "1.6.648",
|
"version": "1.6.649",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user