From 70f842a3922743ac2de97941bea365a083d08ef1 Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 30 Jun 2025 15:35:09 +0200 Subject: [PATCH] feat: handleKueFirmwareUpdate --- .env.development | 2 +- .env.production | 2 +- CHANGELOG.md | 10 +++++ .../GeneralSettings.tsx | 11 +++++ .../handlers/handleKueFirmwareUpdate.ts | 21 +++++++++ .../settings/kueFirmwareUpdateLog.json | 7 +++ package-lock.json | 4 +- package.json | 2 +- pages/api/cpl/kueFirmwareUpdateMock.ts | 43 +++++++++++++++++++ 9 files changed, 97 insertions(+), 5 deletions(-) create mode 100644 components/main/settingsPageComponents/handlers/handleKueFirmwareUpdate.ts create mode 100644 mocks/device-cgi-simulator/settings/kueFirmwareUpdateLog.json create mode 100644 pages/api/cpl/kueFirmwareUpdateMock.ts diff --git a/.env.development b/.env.development index f4ae242..f55b980 100644 --- a/.env.development +++ b/.env.development @@ -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.507 +NEXT_PUBLIC_APP_VERSION=1.6.509 NEXT_PUBLIC_CPL_MODE=json # json (Entwicklungsumgebung) oder jsSimulatedProd (CPL ->CGI-Interface-Simulator) oder production (CPL-> CGI-Interface Platzhalter) diff --git a/.env.production b/.env.production index 4ae26fa..0b17c5c 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.507 +NEXT_PUBLIC_APP_VERSION=1.6.509 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 062e10f..93baea0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +## [1.6.509] – 2025-06-30 + +- feat: 1und 0 in Status in dashboard + +--- +## [1.6.508] – 2025-06-30 + +- feat: 1und 0 in Status in dashboard + +--- ## [1.6.507] – 2025-06-30 - feat: Dashboard Meldungen Status 1 oder 0 diff --git a/components/main/settingsPageComponents/GeneralSettings.tsx b/components/main/settingsPageComponents/GeneralSettings.tsx index e491e2f..bd01ec2 100644 --- a/components/main/settingsPageComponents/GeneralSettings.tsx +++ b/components/main/settingsPageComponents/GeneralSettings.tsx @@ -11,12 +11,14 @@ import { useDispatch } from "react-redux"; import { AppDispatch } from "../../../redux/store"; import { getSystemSettingsThunk } from "../../../redux/thunks/getSystemSettingsThunk"; import handleGeneralSubmit from "./handlers/handleGeneralSubmit"; +import handleKueFirmwareUpdate from "@/components/main/settingsPageComponents/handlers/handleKueFirmwareUpdate"; const GeneralSettings: React.FC = () => { const dispatch = useDispatch(); const systemSettings = useSelector( (state: RootState) => state.systemSettingsSlice ); + const isAdmin = useSelector((state: RootState) => state.authSlice?.isAdmin); // const [error, setError] = useState(""); @@ -192,6 +194,15 @@ const GeneralSettings: React.FC = () => { > Neustart CPL + {isAdmin && ( + + )}