Kanban
This commit is contained in:
parent
c887f9cbe7
commit
8d0daa658a
|
|
@ -123,6 +123,7 @@ class UpdateUserPreferences implements PersistPrefs {
|
|||
this.accentColor,
|
||||
this.menuMode,
|
||||
this.historyMode,
|
||||
this.showKanban,
|
||||
this.showFilterSidebar,
|
||||
this.alwaysShowFilterSidebar,
|
||||
this.rowsPerPage,
|
||||
|
|
@ -140,6 +141,7 @@ class UpdateUserPreferences implements PersistPrefs {
|
|||
final bool isPreviewVisible;
|
||||
final bool showFilterSidebar;
|
||||
final bool alwaysShowFilterSidebar;
|
||||
final bool showKanban;
|
||||
final String accentColor;
|
||||
final int rowsPerPage;
|
||||
final String colorTheme;
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ PrefState prefReducer(
|
|||
..isMenuVisible = menuVisibleReducer(state.isMenuVisible, action)
|
||||
..isHistoryVisible = historyVisibleReducer(state.isHistoryVisible, action)
|
||||
..enableDarkMode = darkModeReducer(state.enableDarkMode, action)
|
||||
..showKanban = showKanbanReducer(state.enableDarkMode, action)
|
||||
..showFilterSidebar =
|
||||
showFilterSidebarReducer(state.showFilterSidebar, action)
|
||||
..longPressSelectionIsDefault =
|
||||
|
|
@ -162,6 +163,12 @@ Reducer<bool> darkModeReducer = combineReducers([
|
|||
}),
|
||||
]);
|
||||
|
||||
Reducer<bool> showKanbanReducer = combineReducers([
|
||||
TypedReducer<bool, UpdateUserPreferences>((showKanban, action) {
|
||||
return action.showKanban ?? showKanban;
|
||||
}),
|
||||
]);
|
||||
|
||||
Reducer<bool> showFilterSidebarReducer = combineReducers([
|
||||
TypedReducer<bool, UpdateUserPreferences>((value, action) {
|
||||
return action.showFilterSidebar ?? value;
|
||||
|
|
|
|||
|
|
@ -48,12 +48,14 @@ class TaskScreen extends StatelessWidget {
|
|||
IconButton(
|
||||
icon: Icon(MdiIcons.trello),
|
||||
onPressed: () {
|
||||
//
|
||||
store.dispatch(
|
||||
UpdateUserPreferences(showKanban: !state.prefState.showKanban),
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
body: TaskListBuilder(),
|
||||
//body: KanbanViewBuilder(),
|
||||
body:
|
||||
state.prefState.showKanban ? KanbanViewBuilder() : TaskListBuilder(),
|
||||
bottomNavigationBar: AppBottomBar(
|
||||
entityType: EntityType.task,
|
||||
tableColumns: TaskPresenter.getAllTableFields(userCompany),
|
||||
|
|
|
|||
Loading…
Reference in New Issue