From ada2f5e2a7714a12e5e555ac358bccd9fda4149a Mon Sep 17 00:00:00 2001 From: ISA Date: Wed, 23 Jul 2025 15:11:13 +0200 Subject: [PATCH] feat: Fallsensors --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 8 ++++++ .../fall-detection-sensors/FallSensors.tsx | 27 +++++++++++++++++++ .../KabelueberwachungView.tsx | 3 +++ .../kabelueberwachung/kue705FO/Kue705FO.tsx | 17 +++++++++--- .../SERVICE/kabelueberwachungMockData.js | 12 +++++++++ package-lock.json | 4 +-- package.json | 2 +- redux/slices/kueDataSlice.ts | 4 +++ services/fetchKueDataService.ts | 1 + types/Kue705FOProps.ts | 1 + 12 files changed, 75 insertions(+), 8 deletions(-) create mode 100644 components/main/fall-detection-sensors/FallSensors.tsx diff --git a/.env.development b/.env.development index c9a68f7..512216d 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.638 +NEXT_PUBLIC_APP_VERSION=1.6.639 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 86a5324..86c619f 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.638 +NEXT_PUBLIC_APP_VERSION=1.6.639 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e9c57a..1d9407b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## [1.6.639] – 2025-07-23 + +- feat: Add cursor wait state to AnalogInputsTable rows during data loading + +- Applied `cursor-wait` style to table rows (``) in AnalogInputsTable when loading is true. +- Ensured consistent cursor behavior across the entire table and rows + +--- ## [1.6.638] – 2025-07-23 - feat: Add cursor wait during chart data loading diff --git a/components/main/fall-detection-sensors/FallSensors.tsx b/components/main/fall-detection-sensors/FallSensors.tsx new file mode 100644 index 0000000..e2b67d9 --- /dev/null +++ b/components/main/fall-detection-sensors/FallSensors.tsx @@ -0,0 +1,27 @@ +import React from "react"; +// components/main/fall-detection-sensors/FallSensors.tsx +const FallSensors = () => { + const sensors = [ + { id: "KVZ1", status: "inactive" }, + { id: "KVZ2", status: "active" }, + { id: "KVZ3", status: "active" }, + { id: "KVZ4", status: "active" }, + ]; + + return ( +
+ {sensors.map((sensor) => ( +
+ {sensor.id} +
+
+ ))} +
+ ); +}; + +export default FallSensors; diff --git a/components/main/kabelueberwachung/KabelueberwachungView.tsx b/components/main/kabelueberwachung/KabelueberwachungView.tsx index 933be0e..c811e63 100644 --- a/components/main/kabelueberwachung/KabelueberwachungView.tsx +++ b/components/main/kabelueberwachung/KabelueberwachungView.tsx @@ -58,6 +58,7 @@ function KabelueberwachungView() { kueOnlineStatus: kueOnline[index], alarmStatus: alarmStatus[index], tdrLocation: [], // Placeholder, replace with actual tdrLocation if available + win_fallSensorsActive: kueOnline[index] ? 1 : 0, // Beispielwert, anpassen je nach Logik })); //console.log("Alle Module:", allModules); @@ -146,6 +147,7 @@ function KabelueberwachungView() { kueOnlineStatus: number; alarmStatus?: boolean; tdrLocation: number[]; + win_fallSensorsActive: number; }, index: number ) => { @@ -160,6 +162,7 @@ function KabelueberwachungView() { alarmStatus={slot.alarmStatus} slotIndex={slotIndex} tdrLocation={slot.tdrLocation} + win_fallSensorsActive={slot.win_fallSensorsActive} /> ); diff --git a/components/main/kabelueberwachung/kue705FO/Kue705FO.tsx b/components/main/kabelueberwachung/kue705FO/Kue705FO.tsx index f75423b..5c78e98 100644 --- a/components/main/kabelueberwachung/kue705FO/Kue705FO.tsx +++ b/components/main/kabelueberwachung/kue705FO/Kue705FO.tsx @@ -25,6 +25,7 @@ import handleCloseModal from "./handlers/handleCloseModal"; import handleOpenChartModal from "./handlers/handleOpenChartModal"; import handleCloseChartModal from "./handlers/handleCloseChartModal"; import handleRefreshClick from "./handlers/handleRefreshClick"; +import FallSensors from "@/components/main/fall-detection-sensors/FallSensors"; const Kue705FO: React.FC = ({ isolationswert, @@ -33,6 +34,7 @@ const Kue705FO: React.FC = ({ kueOnline, slotIndex, tdrLocation, + win_fallSensorsActive, }) => { /* console.log( `Rendering Kue705FO - SlotIndex: ${slotIndex}, ModulName: ${modulName}` @@ -167,9 +169,7 @@ const Kue705FO: React.FC = ({ return (
{kueOnline === 1 ? ( <> @@ -363,8 +363,19 @@ const Kue705FO: React.FC = ({ > Messkurve + {/* Sensoren anzeigen */} + { + /* if Kabelüberwachungsmodul online (kue_online ) */ + kueOnline === 1 && win_fallSensorsActive === 1 && ( +
+ +
+ ) + }
+ {/* Modal für Einstellungen */} + {/* Modal für Messkurve */} {showChartModal && ( { tdrOverflow: win.win_kueOverflow || [], // memoryInterval: win.win_memoryInterval || [], + win_fallSensorsActive: win.win_fallSensorsActive || [], }; } catch (error) { console.error("❌ Fehler beim Laden der KÜE-Daten:", error); diff --git a/types/Kue705FOProps.ts b/types/Kue705FOProps.ts index d9fbd98..a61a919 100644 --- a/types/Kue705FOProps.ts +++ b/types/Kue705FOProps.ts @@ -7,4 +7,5 @@ export interface Kue705FOProps { slotIndex: number; tdrLocation: number[]; alarmStatus?: boolean; + win_fallSensorsActive: number; }