diff --git a/.env.development b/.env.development index 2f09596..aebca18 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.494 +NEXT_PUBLIC_APP_VERSION=1.6.495 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 7b9b57e..b6636f3 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.494 +NEXT_PUBLIC_APP_VERSION=1.6.495 NEXT_PUBLIC_CPL_MODE=production \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a2a015..0130747 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## [1.6.495] – 2025-06-27 + +- Mock daten + +--- ## [1.6.494] – 2025-06-27 - Mock Daten hinzugefügt diff --git a/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx b/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx index a699601..46c2788 100644 --- a/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx +++ b/components/main/kabelueberwachung/kue705FO/Charts/ChartSwitcher.tsx @@ -103,6 +103,8 @@ const ChartSwitcher: React.FC = ({ isOpen, onClose }) => { loadLoopChartData.loadLoopChartData(); }, 10); // kleiner Delay, damit Redux-State sicher aktualisiert ist } + //ESLint ignore + // eslint-disable-next-line react-hooks/exhaustive-deps }, [isOpen, activeMode, slotNumber, dispatch]); return ( diff --git a/package-lock.json b/package-lock.json index 225dffd..1b63e44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "cpl-v4", - "version": "1.6.494", + "version": "1.6.495", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "cpl-v4", - "version": "1.6.494", + "version": "1.6.495", "dependencies": { "@fontsource/roboto": "^5.1.0", "@iconify-icons/ri": "^1.2.10", diff --git a/package.json b/package.json index 1db8dc5..b2d37f8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cpl-v4", - "version": "1.6.494", + "version": "1.6.495", "private": true, "scripts": { "dev": "next dev", diff --git a/pages/api/cpl/slotDataAPIHandler.ts b/pages/api/cpl/slotDataAPIHandler.ts index 764ef41..801d581 100644 --- a/pages/api/cpl/slotDataAPIHandler.ts +++ b/pages/api/cpl/slotDataAPIHandler.ts @@ -32,17 +32,24 @@ export default function handler(req: NextApiRequest, res: NextApiResponse) { const fileContent = fs.readFileSync(filePath, "utf-8"); const jsonData = JSON.parse(fileContent); + interface SlotDataEntry { + t: string; + [key: string]: unknown; + } + const fromDateStr = String(vonDatum); const toDateStr = String(bisDatum); - const filtered = jsonData.filter((entry: any) => { - if (!entry.t) return false; - const dateStr = entry.t.split(" ")[0]; // Nur yyyy-mm-dd extrahieren - return dateStr >= fromDateStr && dateStr <= toDateStr; - }); + const filtered = (jsonData as SlotDataEntry[]).filter( + (entry: SlotDataEntry) => { + if (!entry.t) return false; + const dateStr = entry.t.split(" ")[0]; // Nur yyyy-mm-dd extrahieren + return dateStr >= fromDateStr && dateStr <= toDateStr; + } + ); res.status(200).json(filtered); - } catch (error: any) { + } catch (error: unknown) { console.error("❌ Fehler beim Lesen der Slot-Daten:", error); res.status(500).json({ error: "❌ Interner Serverfehler" }); }