Kanban
This commit is contained in:
parent
4a0e90e1f9
commit
d9433761be
|
|
@ -35,6 +35,7 @@ class AppBottomBar extends StatefulWidget {
|
|||
this.customValues2 = const [],
|
||||
this.customValues3 = const [],
|
||||
this.customValues4 = const [],
|
||||
this.hideListOptions = false,
|
||||
});
|
||||
|
||||
final EntityType entityType;
|
||||
|
|
@ -54,6 +55,7 @@ class AppBottomBar extends StatefulWidget {
|
|||
final List<String> customValues4;
|
||||
final List<String> tableColumns;
|
||||
final List<String> defaultTableColumns;
|
||||
final bool hideListOptions;
|
||||
|
||||
@override
|
||||
_AppBottomBarState createState() => _AppBottomBarState();
|
||||
|
|
@ -388,6 +390,7 @@ class _AppBottomBarState extends State<AppBottomBar> {
|
|||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: <Widget>[
|
||||
if (!widget.hideListOptions) ...[
|
||||
IconButton(
|
||||
tooltip: localization.multiselect,
|
||||
icon: Icon(Icons.check_box),
|
||||
|
|
@ -395,8 +398,9 @@ class _AppBottomBarState extends State<AppBottomBar> {
|
|||
),
|
||||
if (!widget.entityType.isSetting)
|
||||
IconButton(
|
||||
tooltip:
|
||||
isList ? localization.showTable : localization.showList,
|
||||
tooltip: isList
|
||||
? localization.showTable
|
||||
: localization.showList,
|
||||
icon: Icon(isList ? Icons.table_chart : Icons.view_list),
|
||||
onPressed: () {
|
||||
store.dispatch(SwitchListTableLayout());
|
||||
|
|
@ -414,9 +418,11 @@ class _AppBottomBarState extends State<AppBottomBar> {
|
|||
icon: Icon(Icons.chrome_reader_mode),
|
||||
onPressed: () {
|
||||
store.dispatch(UpdateUserPreferences(
|
||||
isPreviewVisible: !state.prefState.isPreviewVisible));
|
||||
isPreviewVisible:
|
||||
!state.prefState.isPreviewVisible));
|
||||
},
|
||||
),
|
||||
],
|
||||
IconButton(
|
||||
tooltip: localization.filter,
|
||||
icon: Icon(Icons.filter_list),
|
||||
|
|
|
|||
|
|
@ -4,16 +4,11 @@ import 'package:boardview/boardview.dart';
|
|||
import 'package:boardview/boardview_controller.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:invoiceninja_flutter/utils/app_context.dart';
|
||||
import 'package:invoiceninja_flutter/data/models/entities.dart';
|
||||
import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/forms/decorated_form_field.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/history_drawer_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||
import 'package:invoiceninja_flutter/ui/app/menu_drawer_vm.dart';
|
||||
import 'package:invoiceninja_flutter/ui/task/kanban_view_vm.dart';
|
||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||
import 'package:timeago/timeago.dart' as timeago;
|
||||
|
||||
class KanbanView extends StatefulWidget {
|
||||
|
|
@ -79,7 +74,6 @@ class _KanbanViewState extends State<KanbanView> {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
print('## BUILD: ${_statuses.length}');
|
||||
final state = widget.viewModel.state;
|
||||
|
||||
final boardList = _statuses.map((status) {
|
||||
return BoardList(
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ class TaskScreen extends StatelessWidget {
|
|||
if (!kReleaseMode)
|
||||
IconButton(
|
||||
icon: Icon(MdiIcons.trello),
|
||||
color: state.prefState.showKanban ? state.accentColor : null,
|
||||
onPressed: () {
|
||||
if (!state.prefState.showKanban) {
|
||||
store.dispatch(
|
||||
|
|
@ -65,6 +66,7 @@ class TaskScreen extends StatelessWidget {
|
|||
state.prefState.showKanban ? KanbanViewBuilder() : TaskListBuilder(),
|
||||
bottomNavigationBar: AppBottomBar(
|
||||
entityType: EntityType.task,
|
||||
hideListOptions: state.prefState.showKanban,
|
||||
tableColumns: TaskPresenter.getAllTableFields(userCompany),
|
||||
defaultTableColumns: TaskPresenter.getDefaultTableFields(userCompany),
|
||||
onSelectedSortField: (value) => store.dispatch(SortTasks(value)),
|
||||
|
|
|
|||
Loading…
Reference in New Issue