feat: Fallsensors
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.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)
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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 (`<tr>`) 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
|
||||
|
||||
27
components/main/fall-detection-sensors/FallSensors.tsx
Normal file
27
components/main/fall-detection-sensors/FallSensors.tsx
Normal file
@@ -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 (
|
||||
<div className="flex gap-1 p-1 border rounded bg-gray-200">
|
||||
{sensors.map((sensor) => (
|
||||
<div key={sensor.id} className="flex flex-col items-center gap-1">
|
||||
<span className="text-[0.5rem]">{sensor.id}</span>
|
||||
<div
|
||||
className={`w-4 h-4 flex items-center justify-center rounded-full border ${
|
||||
sensor.status === "active" ? "bg-green-400" : "bg-red-400"
|
||||
}`}
|
||||
></div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default FallSensors;
|
||||
@@ -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}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -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<Kue705FOProps> = ({
|
||||
isolationswert,
|
||||
@@ -33,6 +34,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
kueOnline,
|
||||
slotIndex,
|
||||
tdrLocation,
|
||||
win_fallSensorsActive,
|
||||
}) => {
|
||||
/* console.log(
|
||||
`Rendering Kue705FO - SlotIndex: ${slotIndex}, ModulName: ${modulName}`
|
||||
@@ -167,9 +169,7 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
return (
|
||||
<div
|
||||
className="relative bg-gray-300 w-[7.25rem] h-[24.375rem] border border-gray-400 transform laptop:-translate-y-12 2xl:-translate-y-0
|
||||
scale-100 sm:scale-95 md:scale-100 lg:scale-105 xl:scale-90 2xl:scale-125 top-3 qhd:scale-150 qhd:-translate-y-0
|
||||
|
||||
"
|
||||
scale-100 sm:scale-95 md:scale-100 lg:scale-105 xl:scale-90 2xl:scale-125 top-3 qhd:scale-150 qhd:-translate-y-0"
|
||||
>
|
||||
{kueOnline === 1 ? (
|
||||
<>
|
||||
@@ -363,7 +363,18 @@ const Kue705FO: React.FC<Kue705FOProps> = ({
|
||||
>
|
||||
Messkurve
|
||||
</button>
|
||||
{/* Sensoren anzeigen */}
|
||||
{
|
||||
/* if Kabelüberwachungsmodul online (kue_online ) */
|
||||
kueOnline === 1 && win_fallSensorsActive === 1 && (
|
||||
<div className="mt-4 w-full flex justify-center">
|
||||
<FallSensors />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
|
||||
{/* Modal für Einstellungen */}
|
||||
|
||||
{/* Modal für Messkurve */}
|
||||
{showChartModal && (
|
||||
|
||||
@@ -245,3 +245,15 @@ var win_memoryInterval = [
|
||||
15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0,
|
||||
];
|
||||
//Speicherintervall (Kein, 1 MInute, 5 Minuten, 10 Minuten, 15 Minuten, 30 Minuten, 60 Minuten, 360 Minuten (6h), 720 Minuten (12h)
|
||||
|
||||
// Fall Sensoren Mock Data existing in the system for 32 cables
|
||||
var win_fallSensorsActive = [
|
||||
0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1,
|
||||
];
|
||||
var win_fallSensors = [
|
||||
{ id: "KVZ1", status: 0 },
|
||||
{ id: "KVZ2", status: 1 },
|
||||
{ id: "KVZ3", status: 1 },
|
||||
{ id: "KVZ4", status: 1 },
|
||||
];
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.638",
|
||||
"version": "1.6.639",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.638",
|
||||
"version": "1.6.639",
|
||||
"dependencies": {
|
||||
"@fontsource/roboto": "^5.1.0",
|
||||
"@headlessui/react": "^2.2.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.638",
|
||||
"version": "1.6.639",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -42,6 +42,8 @@ interface KueDataState {
|
||||
tdrOverflow: number[];
|
||||
kueLimit2High: number[];
|
||||
memoryInterval: number[];
|
||||
// Fallsensors
|
||||
win_fallSensorsActive: number[];
|
||||
}
|
||||
|
||||
const initialState: KueDataState = {
|
||||
@@ -85,6 +87,8 @@ const initialState: KueDataState = {
|
||||
tdrOverflow: [],
|
||||
kueLimit2High: [],
|
||||
memoryInterval: [],
|
||||
// Fallsensors
|
||||
win_fallSensorsActive: [], // Fallsensors aktiv
|
||||
};
|
||||
|
||||
const kueDataSlice = createSlice({
|
||||
|
||||
@@ -54,6 +54,7 @@ export const fetchKueDataService = async () => {
|
||||
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);
|
||||
|
||||
@@ -7,4 +7,5 @@ export interface Kue705FOProps {
|
||||
slotIndex: number;
|
||||
tdrLocation: number[];
|
||||
alarmStatus?: boolean;
|
||||
win_fallSensorsActive: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user