From 3b0a559d3c1d018aafd6de4cfbe145dc81bb49ee Mon Sep 17 00:00:00 2001 From: ISA Date: Tue, 22 Oct 2024 09:25:28 +0200 Subject: [PATCH] =?UTF-8?q?F=C3=BCge=20Alert=20f=C3=BCr=20R=C3=BCckmeldung?= =?UTF-8?q?=20der=20Schleifenmessung=20hinzu.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modules/Kue705FO.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/components/modules/Kue705FO.jsx b/components/modules/Kue705FO.jsx index 633887a..147d157 100644 --- a/components/modules/Kue705FO.jsx +++ b/components/modules/Kue705FO.jsx @@ -162,7 +162,9 @@ function Kue705FO({ let slotFormat = slot < 10 ? `0${slot}` : `${slot}`; const apiUrl = process.env.NEXT_PUBLIC_API_BASE_URL; - setLoading(true); + setLoading(true); // Setze den Ladezustand auf true + alert(`Schleifenmessung wird für Slot ${slot} gestartet...`); + fetch( `${apiUrl}/CPL?Service/KUEdetail.HTML&KS_${slotFormat}=1&slot=${slot}`, { @@ -171,15 +173,18 @@ function Kue705FO({ ) .then((response) => { if (response.ok) { + alert(`Schleifenmessung erfolgreich gestartet für Slot ${slot}`); console.log("Schleifenmessung erfolgreich gestartet für Slot", slot); } else { + alert("Fehler beim Starten der Schleifenmessung."); console.error("Fehler beim Senden der Schleifen-Anfrage"); } }) .catch((error) => { + alert("Ein Fehler ist aufgetreten."); console.error("Fehler:", error); }) - .finally(() => setLoading(false)); + .finally(() => setLoading(false)); // Ladezustand zurücksetzen }; const handleModulNameChange = (newName) => {