Fix: Messkurven-Modal (ISO/RSL) lädt Kurve automatisch, setzt Dropdown & DateRangePicker korrekt zurück

- Dropdown für Messkurven (ISO/RSL) wird beim Öffnen auf 'Alle Messwerte' (DIA0) gesetzt
- Messkurve wird beim Öffnen des Modals automatisch geladen
- Beim Schließen werden vonDatum, bisDatum, Dropdown und DateRangePicker zurückgesetzt
- Gleiches Verhalten für ISO- und RSL/Loop-Modal
This commit is contained in:
ISA
2025-08-15 11:22:32 +02:00
parent d75d9ce578
commit 4e8221c892
9 changed files with 58 additions and 25 deletions

View File

@@ -1,6 +1,11 @@
"use client";
// /components/main/kabelueberwachung/kue705FO/Charts/LoopMeasurementChart/LoopChartActionBar.tsx
import React, { useEffect, useState } from "react";
import React, {
useEffect,
useState,
forwardRef,
useImperativeHandle,
} from "react";
import { useAppDispatch } from "@/redux/store";
import { getMessagesThunk } from "@/redux/thunks/getMessagesThunk";
import { RSL_DURATION_SECONDS, NODE_ENV } from "@/utils/env";
@@ -94,7 +99,7 @@ export const useLoopChartLoader = () => {
};
//-----------------------------------------------------------------------------------LoopChartActionBar
const LoopChartActionBar: React.FC = () => {
const LoopChartActionBar = forwardRef((_props, ref) => {
const dispatch = useAppDispatch();
// RSL Progress State Dauer konfigurierbar über NEXT_PUBLIC_RSL_DURATION_SECONDS
const TOTAL_DURATION = RSL_DURATION_SECONDS;
@@ -272,6 +277,10 @@ const LoopChartActionBar: React.FC = () => {
}
};
useImperativeHandle(ref, () => ({
handleFetchData,
}));
return (
<div className="flex justify-between p-1 bg-gray-100 rounded-lg ">
<div className="flex items-center">
@@ -393,6 +402,7 @@ const LoopChartActionBar: React.FC = () => {
)}
</div>
);
};
});
LoopChartActionBar.displayName = "LoopChartActionBar";
export default LoopChartActionBar;