From 98672fcbd5e0db470e75dca41d647a9050404390 Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 27 Jan 2025 15:10:13 +0100 Subject: [PATCH] =?UTF-8?q?f=C3=BCr=20TDR=20liste=20f=C3=BCr=20json=20Date?= =?UTF-8?q?ien=20directory.json=20statt=20directory.csv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modules/Kue705FO.tsx | 129 +++++++++++++++++- .../Month_01/{slot0.json => 05-0829.json} | 0 .../Month_01/{slot1.json => 05-1911.json} | 0 .../kue_01/Year_24/Month_01/directory.csv | 2 - .../kue_01/Year_24/Month_01/directory.json | 10 ++ .../Month_02/{slot2.json => 05-0829.json} | 0 .../Month_02/{slot4.json => 05-1911.json} | 0 .../kue_01/Year_24/Month_02/directory.csv | 2 - .../kue_01/Year_24/Month_02/directory.json | 10 ++ .../Month_03/{slot5.json => 05-0829.json} | 0 .../Month_03/{slot6.json => 05-1911.json} | 0 .../kue_01/Year_25/Month_03/directory.csv | 2 - .../kue_01/Year_25/Month_03/directory.json | 10 ++ .../Month_04/{slot8.json => 05-0829.json} | 0 .../Month_04/{slot9.json => 05-1911.json} | 0 .../kue_01/Year_25/Month_04/directory.csv | 2 - .../kue_01/Year_25/Month_04/directory.json | 10 ++ 17 files changed, 163 insertions(+), 14 deletions(-) rename public/CPLmockData/LastTDR/kue_01/Year_24/Month_01/{slot0.json => 05-0829.json} (100%) rename public/CPLmockData/LastTDR/kue_01/Year_24/Month_01/{slot1.json => 05-1911.json} (100%) delete mode 100644 public/CPLmockData/LastTDR/kue_01/Year_24/Month_01/directory.csv create mode 100644 public/CPLmockData/LastTDR/kue_01/Year_24/Month_01/directory.json rename public/CPLmockData/LastTDR/kue_01/Year_24/Month_02/{slot2.json => 05-0829.json} (100%) rename public/CPLmockData/LastTDR/kue_01/Year_24/Month_02/{slot4.json => 05-1911.json} (100%) delete mode 100644 public/CPLmockData/LastTDR/kue_01/Year_24/Month_02/directory.csv create mode 100644 public/CPLmockData/LastTDR/kue_01/Year_24/Month_02/directory.json rename public/CPLmockData/LastTDR/kue_01/Year_25/Month_03/{slot5.json => 05-0829.json} (100%) rename public/CPLmockData/LastTDR/kue_01/Year_25/Month_03/{slot6.json => 05-1911.json} (100%) delete mode 100644 public/CPLmockData/LastTDR/kue_01/Year_25/Month_03/directory.csv create mode 100644 public/CPLmockData/LastTDR/kue_01/Year_25/Month_03/directory.json rename public/CPLmockData/LastTDR/kue_01/Year_25/Month_04/{slot8.json => 05-0829.json} (100%) rename public/CPLmockData/LastTDR/kue_01/Year_25/Month_04/{slot9.json => 05-1911.json} (100%) delete mode 100644 public/CPLmockData/LastTDR/kue_01/Year_25/Month_04/directory.csv create mode 100644 public/CPLmockData/LastTDR/kue_01/Year_25/Month_04/directory.json diff --git a/components/modules/Kue705FO.tsx b/components/modules/Kue705FO.tsx index a033591..eed4a55 100644 --- a/components/modules/Kue705FO.tsx +++ b/components/modules/Kue705FO.tsx @@ -285,13 +285,13 @@ const Kue705FO: React.FC = ({ console.error("Canvas mit ID 'myChart' nicht gefunden."); return; } - + const ctx = canvas.getContext("2d"); if (!ctx) { console.error("2D-Kontext für Canvas konnte nicht erstellt werden."); return; } - + // Konvertiere Zeitstempel in ein lesbares Format für die X-Achse const labels = data.map((row) => { const date = new Date(String(row.t).replace(/-/g, "/")); // Zeitstring parsen @@ -301,7 +301,7 @@ const Kue705FO: React.FC = ({ second: "2-digit", }); }); - + new Chart(ctx, { type: "line", data: { @@ -368,7 +368,6 @@ const Kue705FO: React.FC = ({ }, }); }; - useEffect(() => { const updateAlarmStatus = () => { @@ -388,7 +387,7 @@ const Kue705FO: React.FC = ({ useEffect(() => { if (reduxKueVersion?.[slotIndex]) { - setKueVersion("V" + reduxKueVersion[slotIndex] / 100); + setKueVersion("V" + Number(reduxKueVersion[slotIndex]) / 100); } }, [slotIndex, reduxKueVersion]); //--------------------------------------------------- @@ -474,6 +473,11 @@ const Kue705FO: React.FC = ({ } }, [schleifenwiderstand, activeButton]); //--------------------------------------------------- + const noLetter = (e: React.KeyboardEvent) => { + const input = e.currentTarget; + input.value = input.value.replace(/[^0-9]/g, ""); + }; + return (
{" "} {/* Bootstrap Icon "X" */} -

Messkurve Slot {slotIndex + 1}

+ noLetter(e)} + /> +
    +
  • +
    + Jahr + noLetter(this)} + /> +
    +
  • + +
  • +
    + Monat + +
    +
  • + +
  • +
    + +
    +
  • +
  • + +
  • + +
  • + +
  • +