fix: Bezeichnung in analoge Eingänge anzeigen

This commit is contained in:
ISA
2025-06-19 13:47:10 +02:00
parent b804fb88c1
commit a62c7d10b9
6 changed files with 13 additions and 10 deletions

View File

@@ -6,5 +6,5 @@ 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.421
NEXT_PUBLIC_APP_VERSION=1.6.422
NEXT_PUBLIC_CPL_MODE=jsmock # json (Entwicklungsumgebung) oder jsmock (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter)

View File

@@ -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.421
NEXT_PUBLIC_APP_VERSION=1.6.422
NEXT_PUBLIC_CPL_MODE=production

View File

@@ -54,7 +54,10 @@ export default function AnalogInputsTable({
</thead>
<tbody>
{Object.values(analogInputs)
.filter((e) => e?.id !== null && e?.id !== undefined)
.filter(
(e) =>
e && typeof e.id === "number" && typeof e.label === "string"
)
.map((e, index) => (
<tr
key={index}
@@ -86,7 +89,7 @@ export default function AnalogInputsTable({
className="border p-2"
onClick={() => handleSelect(e.id!)}
>
{e.name || "----"}
{e.label || "----"}
</td>
<td className="border p-2 text-center">

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "cpl-v4",
"version": "1.6.421",
"version": "1.6.422",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "cpl-v4",
"version": "1.6.421",
"version": "1.6.422",
"dependencies": {
"@fontsource/roboto": "^5.1.0",
"@iconify-icons/ri": "^1.2.10",

View File

@@ -1,6 +1,6 @@
{
"name": "cpl-v4",
"version": "1.6.421",
"version": "1.6.422",
"private": true,
"scripts": {
"dev": "next dev",

View File

@@ -4,7 +4,7 @@ import { createSlice, PayloadAction, createAsyncThunk } from "@reduxjs/toolkit";
export interface AnalogInput {
id: number | null;
value: number | null;
name: string;
label: string;
uW: boolean;
uG: boolean;
oW: boolean;
@@ -19,7 +19,7 @@ export interface AnalogInputsState {
const defaultAnalogInput: AnalogInput = {
id: null,
value: null,
name: "",
label: "",
uW: false,
uG: false,
oW: false,
@@ -52,7 +52,7 @@ export const loadFromWindow = createAsyncThunk(
data[key] = {
id: value[0],
value: value[1],
name: value[2],
label: value[2],
uW: value[3] === 1,
uG: value[4] === 1,
oW: value[5] === 1,