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