feat(iso): DateRangePicker-Zeitraum bei "Daten laden" anwenden

This commit is contained in:
ISA
2025-08-12 09:33:25 +02:00
parent e4b56faf75
commit 8af8e14878
8 changed files with 64 additions and 34 deletions

View File

@@ -19,9 +19,10 @@ type ModuleType = "ISO" | "TDR" | "RSL" | "KVZ";
interface ReportProps {
moduleType: ModuleType;
autoLoad?: boolean;
}
const Report: React.FC<ReportProps> = ({ moduleType }) => {
const Report: React.FC<ReportProps> = ({ moduleType, autoLoad = true }) => {
const dispatch = useDispatch<AppDispatch>();
const [loading, setLoading] = useState(false);
const [error, setError] = useState<string | null>(null);
@@ -178,12 +179,13 @@ const Report: React.FC<ReportProps> = ({ moduleType }) => {
moduleKeywordMap,
]);
// Automatisches Laden beim Mount und bei Änderungen
// Automatisches Laden beim Mount und bei Änderungen (optional)
useEffect(() => {
if (!autoLoad) return;
if (slotNumber !== null) {
loadMessages();
}
}, [loadMessages, slotNumber]);
}, [loadMessages, slotNumber, autoLoad]);
if (loading) {
return (