Mit Alias @ arbeiten für die Pfade
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.409
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.410
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@ NEXT_PUBLIC_CPL_API_PATH=/CPL
|
||||
NEXT_PUBLIC_EXPORT_STATIC=true
|
||||
NEXT_PUBLIC_USE_CGI=true
|
||||
# App-Versionsnummer
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.409
|
||||
NEXT_PUBLIC_APP_VERSION=1.6.410
|
||||
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||
}
|
||||
@@ -1,2 +1,2 @@
|
||||
win_da_state = [0, 0, 1, 0];
|
||||
win_da_state = [1, 0, 1, 0];
|
||||
win_da_bezeichnung = ["Ausgang1", "Ausgang2", "Ausgang3", "Ausgang4"];
|
||||
|
||||
@@ -3,12 +3,12 @@ import React, { useState, useEffect } from "react";
|
||||
import Image from "next/image";
|
||||
import { useRouter } from "next/router";
|
||||
import "bootstrap-icons/font/bootstrap-icons.css";
|
||||
import SettingsModal from "./settingsModal/SettingsModal";
|
||||
import { RootState } from "../../redux/store";
|
||||
import SettingsModal from "@/components/header/settingsModal/SettingsModal";
|
||||
import { RootState } from "@/redux/store";
|
||||
import { useSelector, useDispatch } from "react-redux";
|
||||
import { AppDispatch } from "../../redux/store";
|
||||
import decodeToken from "../../utils/decodeToken";
|
||||
import { fetchSystemSettingsThunk } from "../../redux/thunks/fetchSystemSettingsThunk";
|
||||
import { AppDispatch } from "@/redux/store";
|
||||
import decodeToken from "@/utils/decodeToken";
|
||||
import { fetchSystemSettingsThunk } from "@/redux/thunks/fetchSystemSettingsThunk";
|
||||
|
||||
function Header() {
|
||||
const router = useRouter();
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Icon } from "@iconify/react";
|
||||
import settingsIcon from "@iconify/icons-mdi/settings";
|
||||
import outputIcon from "@iconify/icons-mdi/output";
|
||||
import switchIcon from "@iconify/icons-ion/switch";
|
||||
import { setDigitalOutputs } from "../../../redux/slices/digitalOutputsSlice";
|
||||
import { setDigitalOutputs } from "@/redux/slices/digitalOutputsSlice";
|
||||
|
||||
export default function DigitalOutputsWidget({ openOutputModal }) {
|
||||
const dispatch = useDispatch<AppDispatch>();
|
||||
@@ -25,11 +25,11 @@ export default function DigitalOutputsWidget({ openOutputModal }) {
|
||||
|
||||
try {
|
||||
if (isCPL) {
|
||||
window.location.href = `/CPL?digitalOutputs.html&DAS0${id}=${
|
||||
window.location.href = `/CPL?digitalOutputs.html&RC${id}=${
|
||||
updatedOutputs[id - 1].status ? 1 : 0
|
||||
}`;
|
||||
} else {
|
||||
await fetch("/api/cpl/updateDigitalOutputs", {
|
||||
await fetch("/api/cpl/updateDigitalOutputsHandler", {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({ outputs: updatedOutputs }),
|
||||
|
||||
23
jsconfig.json
Normal file
23
jsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["*"],
|
||||
"@/redux/*": ["redux/*"],
|
||||
"@/utils/*": ["utils/*"],
|
||||
"@/components/*": ["components/*"]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"components/**/*",
|
||||
"redux/**/*",
|
||||
"utils/**/*",
|
||||
"*.js",
|
||||
"*.ts",
|
||||
"*.jsx",
|
||||
"*.tsx"
|
||||
],
|
||||
|
||||
"extends": "./tsconfig.json"
|
||||
}
|
||||
14
mock-api-json/SERVICE/digitaleAusgaengeMockData.json
Normal file
14
mock-api-json/SERVICE/digitaleAusgaengeMockData.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"win_da_state": [
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0
|
||||
],
|
||||
"win_da_bezeichnung": [
|
||||
"Ausgang1",
|
||||
"Ausgang2",
|
||||
"Ausgang3",
|
||||
"Ausgang4"
|
||||
]
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"win_da_state": [0, 0, 1, 0],
|
||||
"win_da_state": [1, 0, 1, 0],
|
||||
"win_da_bezeichnung": ["Ausgang1", "Ausgang2", "Ausgang3", "Ausgang4"]
|
||||
}
|
||||
|
||||
2688
package-lock.json
generated
2688
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.409",
|
||||
"version": "1.6.410",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// /pages/api/cpl/updateDigitalOutputs.ts
|
||||
// /pages/api/cpl/updateDigitalOutputsHandler.ts
|
||||
|
||||
import { NextApiRequest, NextApiResponse } from "next";
|
||||
import path from "path";
|
||||
@@ -14,7 +14,7 @@ export default async function handler(
|
||||
|
||||
const filePath = path.join(
|
||||
process.cwd(),
|
||||
"apiMockData",
|
||||
"apiMockdata",
|
||||
"SERVICE",
|
||||
"digitaleAusgaengeMockData.js"
|
||||
);
|
||||
@@ -14,8 +14,15 @@
|
||||
"types": ["cypress", "node"],
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"incremental": true
|
||||
"incremental": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["*"],
|
||||
"@/redux/*": ["redux/*"],
|
||||
"@/utils/*": ["utils/*"],
|
||||
"@/components/*": ["components/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src", "**/*.test.ts", "**/*.test.tsx", "types/global.d.ts"],
|
||||
"include": [".", "**/*.test.ts", "**/*.test.tsx", "types/global.d.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user