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:
@@ -1,14 +1,23 @@
|
||||
// brushSlice.ts (✅ Korrekt)
|
||||
// brushSlice.ts
|
||||
import { createSlice } from "@reduxjs/toolkit";
|
||||
|
||||
interface BrushState {
|
||||
startIndex: number;
|
||||
endIndex: number;
|
||||
startDate: string | null;
|
||||
endDate: string | null;
|
||||
}
|
||||
|
||||
const initialState: BrushState = {
|
||||
startIndex: 0,
|
||||
endIndex: 0,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
};
|
||||
|
||||
const brushSlice = createSlice({
|
||||
name: "brush",
|
||||
initialState: {
|
||||
startIndex: 0,
|
||||
endIndex: 0,
|
||||
startDate: null,
|
||||
endDate: null,
|
||||
},
|
||||
initialState,
|
||||
reducers: {
|
||||
setBrushRange(state, action) {
|
||||
state.startIndex = action.payload.startIndex;
|
||||
@@ -16,8 +25,15 @@ const brushSlice = createSlice({
|
||||
state.startDate = action.payload.startDate || state.startDate;
|
||||
state.endDate = action.payload.endDate || state.endDate;
|
||||
},
|
||||
resetBrushRange(state) {
|
||||
state.startIndex = 0;
|
||||
state.endIndex = 0;
|
||||
state.startDate = null;
|
||||
state.endDate = null;
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
export const { setBrushRange } = brushSlice.actions;
|
||||
export const { setBrushRange, resetBrushRange } = brushSlice.actions;
|
||||
|
||||
export default brushSlice.reducer;
|
||||
|
||||
Reference in New Issue
Block a user