diff --git a/.env.development b/.env.development index a241818..cdf4ba9 100644 --- a/.env.development +++ b/.env.development @@ -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.422 +NEXT_PUBLIC_APP_VERSION=1.6.423 NEXT_PUBLIC_CPL_MODE=jsmock # json (Entwicklungsumgebung) oder jsmock (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter) \ No newline at end of file diff --git a/.env.production b/.env.production index 681a922..829d3da 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.422 +NEXT_PUBLIC_APP_VERSION=1.6.423 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/components/main/analogInputs/AnalogInputsSettingsModal.tsx b/components/main/analogInputs/AnalogInputsSettingsModal.tsx index 7560b01..29774ae 100644 --- a/components/main/analogInputs/AnalogInputsSettingsModal.tsx +++ b/components/main/analogInputs/AnalogInputsSettingsModal.tsx @@ -12,7 +12,7 @@ export default function AnalogInputSettingsModal({ isOpen, onClose, }: Props) { - const [name, setName] = useState(""); + const [label, setLabel] = useState(""); const [offset, setOffset] = useState("0.000"); const [factor, setFactor] = useState("1.000"); const [loggerInterval, setLoggerInterval] = useState("10"); @@ -21,7 +21,7 @@ export default function AnalogInputSettingsModal({ useEffect(() => { if (selectedInput && isOpen) { - setName(selectedInput.name || ""); + setLabel(selectedInput.label || ""); setOffset( typeof selectedInput.offset === "number" ? selectedInput.offset.toFixed(3) @@ -51,7 +51,7 @@ export default function AnalogInputSettingsModal({ const offsetParam = offset.replace(",", "."); const factorParam = factor.replace(",", "."); const loggerParam = loggerInterval; - const acn = encodeURIComponent(name); + const acn = encodeURIComponent(label); const acu = encodeURIComponent(unit); const url = `/CPL?/Service/ae.ACP&ACN${slot}=${acn}&ACO${slot}=${offsetParam}&ACF${slot}=${factorParam}&ACL${slot}=${loggerParam}&ACU${slot}=${acu}`; @@ -63,7 +63,7 @@ export default function AnalogInputSettingsModal({ headers: { "Content-Type": "application/json" }, body: JSON.stringify({ updates: [ - { key: "win_analogInputsNames", index: slot - 1, value: name }, + { key: "win_analogInputsNames", index: slot - 1, value: label }, { key: "win_analogInputsOffset", index: slot - 1, @@ -125,8 +125,8 @@ export default function AnalogInputSettingsModal({ setName(e.target.value)} + value={label} + onChange={(e) => setLabel(e.target.value)} /> diff --git a/package-lock.json b/package-lock.json index 92cc37f..fba7009 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.422", + "version": "1.6.423", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.422", + "version": "1.6.423", "dependencies": { "@fontsource/roboto": "^5.1.0", "@iconify-icons/ri": "^1.2.10", diff --git a/package.json b/package.json index b12e2c9..226bf3a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.422", + "version": "1.6.423", "private": true, "scripts": { "dev": "next dev",