fix es lint ignore
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -1,3 +1,8 @@
|
||||
## [1.6.495] – 2025-06-27
|
||||
|
||||
- Mock daten
|
||||
|
||||
---
|
||||
## [1.6.494] – 2025-06-27
|
||||
|
||||
- Mock Daten hinzugefügt
|
||||
|
||||
@@ -103,6 +103,8 @@ const ChartSwitcher: React.FC<ChartSwitcherProps> = ({ 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 (
|
||||
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "cpl-v4",
|
||||
"version": "1.6.494",
|
||||
"version": "1.6.495",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
|
||||
@@ -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" });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user