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