feat(ui): Slot-Nummer nach links verschoben und Datumsauswahl horizontal ausgerichtet

- Slot-Nr.-Anzeige nach links im ActionBar verschoben.
- Datum-Labels („Von“ & „Bis“) und Eingabefelder horizontal ausgerichtet.
- Verbesserte UI/UX der Chart-Steuerungskomponenten.
This commit is contained in:
Ismail Ali
2025-03-14 21:30:21 +01:00
parent 162a0aa318
commit e0379c24a6
18 changed files with 14734 additions and 92 deletions

View File

@@ -89,7 +89,7 @@ const LoopMeasurementChart = () => {
messwertMinimum: eintrag.i,
messwertMaximum: eintrag.a,
messwert: eintrag.m ?? null,
messwertDurchschnitt: ["DIA1", "DIA2"].includes(selectedMode)
messwertDurchschnitt: ["DIA0", "DIA1", "DIA2"].includes(selectedMode)
? eintrag.g ?? null
: null,
}))
@@ -110,15 +110,22 @@ const LoopMeasurementChart = () => {
}, [formatierteDaten, brushRange.endIndex, dispatch]);
const handleBrushChange = useCallback(
({ startIndex, endIndex }) => {
({ startIndex, endIndex }: { startIndex?: number; endIndex?: number }) => {
if (startIndex === undefined || endIndex === undefined) return; // Verhindert Fehler
dispatch(
setBrushRange({
startIndex,
endIndex,
startDate: new Date(formatierteDaten[startIndex].zeit)
startDate: new Date(
formatierteDaten[startIndex]?.zeit || formatierteDaten[0].zeit
)
.toISOString()
.split("T")[0],
endDate: new Date(formatierteDaten[endIndex].zeit)
endDate: new Date(
formatierteDaten[endIndex]?.zeit ||
formatierteDaten[formatierteDaten.length - 1].zeit
)
.toISOString()
.split("T")[0],
})
@@ -126,6 +133,7 @@ const LoopMeasurementChart = () => {
},
[dispatch, formatierteDaten]
);
//--------------------------------------------------------------------------------
useEffect(() => {
if (formatierteDaten.length) {