Break: Digitale Eingänge, es soll Kabelüberwachung Isolation zu erst angezeigt, und ein Button Daten anzeigen, dass die nicht bei DatePicker autmatisch holt

This commit is contained in:
ISA
2025-04-03 13:16:35 +02:00
parent 75759791cd
commit c44920e7aa
5 changed files with 141 additions and 108 deletions

View File

@@ -26,16 +26,22 @@ export const fetchDigitaleEingaenge = async () => {
return [];
}
const formattedData = win.win_de_state.map(
(status: number, index: number) => ({
id: index + 1,
label: win.win_de_label?.[index] || `DE${index + 1}`,
status: status === 1,
counter: win.win_counter?.[index] || 0,
flutter: win.win_flutter?.[index] || 0,
invertierung: win.win_de_invert?.[index] === 1,
})
);
const formattedData = win.win_de_state.map((status, index) => ({
id: index + 1,
label: win.win_de_label?.[index] || `DE${index + 1}`,
name: win.win_de_label?.[index] || "",
status: status === 1,
counter: win.win_de_counter?.[index] || 0,
flutter: win.win_flutter?.[index] || 0,
invertierung: win.win_de_invert?.[index] === 1,
// 🔽 NEU:
filterzeit: win.win_de_time_filter?.[index] || 0,
gewichtung: win.win_de_weighting?.[index] || 0,
zaehlerAktiv: win.win_de_counter_active?.[index] === 1,
eingangOffline: win.win_de_offline?.[index] === 1,
}));
return formattedData;
} catch (error) {