fix: analoge Eingänge Modal Label /Bezeichnung anzeigen
This commit is contained in:
@@ -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)
|
||||
@@ -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
|
||||
@@ -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({
|
||||
<input
|
||||
type="text"
|
||||
className="w-full border rounded px-3 py-1 mb-4"
|
||||
value={name}
|
||||
onChange={(e) => setName(e.target.value)}
|
||||
value={label}
|
||||
onChange={(e) => setLabel(e.target.value)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.422",
|
||||
"version": "1.6.423",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
Reference in New Issue
Block a user