From 8d1b5ceddc402954f7849391f4088c8f3b9e6e77 Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 11 Aug 2025 13:08:34 +0200 Subject: [PATCH] =?UTF-8?q?LoopChartActionBar=20verh=C3=A4lt=20sich=20jetz?= =?UTF-8?q?t=20wie=20im=20ISO-Modal:=20Bei=20Auswahl=20=E2=80=9EMeldungen?= =?UTF-8?q?=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 5 + components/common/DateRangePicker.tsx | 49 +++++- .../LoopChartActionBar.tsx | 157 ++++++++++-------- package-lock.json | 4 +- package.json | 2 +- 7 files changed, 137 insertions(+), 84 deletions(-) diff --git a/.env.development b/.env.development index f792e51..29d7f69 100644 --- a/.env.development +++ b/.env.development @@ -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.684 +NEXT_PUBLIC_APP_VERSION=1.6.685 NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter) diff --git a/.env.production b/.env.production index 9900ef7..627c8c1 100644 --- a/.env.production +++ b/.env.production @@ -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.684 +NEXT_PUBLIC_APP_VERSION=1.6.685 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 40e0de5..d17b259 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.6.685] – 2025-08-11 + +- Daten von 118. in mocks geholt + +--- ## [1.6.684] – 2025-08-11 - fix: KVZ Button style wie die anderen (ISO, RSL, TDR) und mit eigene Modal diff --git a/components/common/DateRangePicker.tsx b/components/common/DateRangePicker.tsx index 669c94e..e0070ce 100644 --- a/components/common/DateRangePicker.tsx +++ b/components/common/DateRangePicker.tsx @@ -6,7 +6,15 @@ import { RootState } from "@/redux/store"; import { setVonDatum, setBisDatum } from "@/redux/slices/dateRangePickerSlice"; import "react-datepicker/dist/react-datepicker.css"; -const DateRangePicker: React.FC = () => { +interface DateRangePickerProps { + compact?: boolean; // reduziert horizontale Breite + className?: string; +} + +const DateRangePicker: React.FC = ({ + compact = false, + className = "", +}) => { const dispatch = useDispatch(); const reduxVonDatum = useSelector( @@ -38,10 +46,22 @@ const DateRangePicker: React.FC = () => { // eslint-disable-next-line react-hooks/exhaustive-deps }, [dispatch, reduxVonDatum, reduxBisDatum]); + const gapClass = compact ? "space-x-2" : "space-x-4"; + const labelWidthClass = compact ? "w-6" : "w-auto"; + const inputWidthClass = compact ? "w-32" : "w-44"; // ca. 128px vs 176px + return ( -
-
- +
+
+ { @@ -57,12 +77,21 @@ const DateRangePicker: React.FC = () => { minDate={sixMonthsAgo} maxDate={today} dateFormat="dd.MM.yyyy" - className="border px-2 py-1 rounded" + className={`border px-2 py-1 rounded ${inputWidthClass} ${ + compact ? "text-xs" : "text-sm" + }`} />
- -
- +
+ { @@ -78,7 +107,9 @@ const DateRangePicker: React.FC = () => { minDate={sixMonthsAgo} maxDate={today} dateFormat="dd.MM.yyyy" - className="border px-2 py-1 rounded" + className={`border px-2 py-1 rounded ${inputWidthClass} ${ + compact ? "text-xs" : "text-sm" + }`} />
diff --git a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx index cc5ab57..5fc3752 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx @@ -214,7 +214,7 @@ const LoopChartActionBar: React.FC = () => { }; return ( -
+
- - - { - dispatch(setSelectedMode(value)); - dispatch(setBrushRange({ startIndex: 0, endIndex: 0 })); + {/* DateRangePicker – wie bei ISO nur sichtbar bei Messkurve */} +
-
- - - { - { - DIA0: "Alle Messwerte", - DIA1: "Stündliche Werte", - DIA2: "Tägliche Werte", - }[selectedMode] - } - - - - - - - {["DIA0", "DIA1", "DIA2"].map((mode) => ( - - `px-4 py-1 cursor-pointer ${ - selected - ? "bg-littwin-blue text-white" - : active - ? "bg-gray-200" - : "" - }` - } - > + +
+ + {/* DIA0/DIA1/DIA2 Dropdown – nur sichtbar bei Messkurve */} +
+ { + dispatch(setSelectedMode(value)); + dispatch(setBrushRange({ startIndex: 0, endIndex: 0 })); + }} + > +
+ + { { DIA0: "Alle Messwerte", DIA1: "Stündliche Werte", DIA2: "Tägliche Werte", - }[mode] + }[selectedMode] } - - ))} - -
-
+ + + + + + + {["DIA0", "DIA1", "DIA2"].map((mode) => ( + + `px-4 py-1 cursor-pointer ${ + selected + ? "bg-littwin-blue text-white" + : active + ? "bg-gray-200" + : "" + }` + } + > + { + { + DIA0: "Alle Messwerte", + DIA1: "Stündliche Werte", + DIA2: "Tägliche Werte", + }[mode] + } + + ))} + +
+ +
{/* Dropdown für Messkurve / Meldungen (wie ISO) */} {
- {/* Buttons nur bei Messkurve sichtbar */} - {chartTitle === "Messkurve" && ( - <> - - - - )} + {/* Buttons – nur sichtbar bei Messkurve, Platz bleibt erhalten */} +
+ + +
); diff --git a/package-lock.json b/package-lock.json index 69b7751..9ead75b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.684", + "version": "1.6.685", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.684", + "version": "1.6.685", "dependencies": { "@fontsource/roboto": "^5.1.0", "@headlessui/react": "^2.2.4", diff --git a/package.json b/package.json index 59b3d5f..33e868c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.684", + "version": "1.6.685", "private": true, "scripts": { "dev": "next dev",