Kanban
This commit is contained in:
parent
330c853521
commit
fe73e49461
|
|
@ -40,7 +40,6 @@ class EntityType extends EnumClass {
|
||||||
static const EntityType design = _$design;
|
static const EntityType design = _$design;
|
||||||
// STARTER: entity type - do not remove comment
|
// STARTER: entity type - do not remove comment
|
||||||
static const EntityType subscription = _$subscription;
|
static const EntityType subscription = _$subscription;
|
||||||
static const EntityType kanban = _$kanban;
|
|
||||||
static const EntityType webhook = _$webhook;
|
static const EntityType webhook = _$webhook;
|
||||||
static const EntityType token = _$token;
|
static const EntityType token = _$token;
|
||||||
static const EntityType paymentTerm = _$paymentTerm;
|
static const EntityType paymentTerm = _$paymentTerm;
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ import 'package:invoiceninja_flutter/redux/document/document_middleware.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/expense/expense_middleware.dart';
|
import 'package:invoiceninja_flutter/redux/expense/expense_middleware.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/group/group_middleware.dart';
|
import 'package:invoiceninja_flutter/redux/group/group_middleware.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/invoice/invoice_middleware.dart';
|
import 'package:invoiceninja_flutter/redux/invoice/invoice_middleware.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/kanban/kanban_middleware.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/payment/payment_middleware.dart';
|
import 'package:invoiceninja_flutter/redux/payment/payment_middleware.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/product/product_middleware.dart';
|
import 'package:invoiceninja_flutter/redux/product/product_middleware.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/project/project_middleware.dart';
|
import 'package:invoiceninja_flutter/redux/project/project_middleware.dart';
|
||||||
|
|
@ -69,7 +68,6 @@ void main({bool isTesting = false}) async {
|
||||||
..addAll(createStoreQuotesMiddleware())
|
..addAll(createStoreQuotesMiddleware())
|
||||||
..addAll(createStoreSettingsMiddleware())
|
..addAll(createStoreSettingsMiddleware())
|
||||||
..addAll(createStoreReportsMiddleware())
|
..addAll(createStoreReportsMiddleware())
|
||||||
..addAll(createStoreKabanMiddleware())
|
|
||||||
// STARTER: middleware - do not remove comment
|
// STARTER: middleware - do not remove comment
|
||||||
..addAll(createStoreSubscriptionsMiddleware())
|
..addAll(createStoreSubscriptionsMiddleware())
|
||||||
..addAll(createStoreTaskStatusesMiddleware())
|
..addAll(createStoreTaskStatusesMiddleware())
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ import 'package:invoiceninja_flutter/ui/design/design_screen_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/design/edit/design_edit_vm.dart';
|
import 'package:invoiceninja_flutter/ui/design/edit/design_edit_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/design/view/design_view_vm.dart';
|
import 'package:invoiceninja_flutter/ui/design/view/design_view_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/invoice/invoice_pdf_vm.dart';
|
import 'package:invoiceninja_flutter/ui/invoice/invoice_pdf_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/kanban_screen_vm.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/payment/refund/payment_refund_vm.dart';
|
import 'package:invoiceninja_flutter/ui/payment/refund/payment_refund_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/payment_term/edit/payment_term_edit_vm.dart';
|
import 'package:invoiceninja_flutter/ui/payment_term/edit/payment_term_edit_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/payment_term/payment_term_screen.dart';
|
import 'package:invoiceninja_flutter/ui/payment_term/payment_term_screen.dart';
|
||||||
|
|
@ -306,8 +305,6 @@ class InvoiceNinjaAppState extends State<InvoiceNinjaApp> {
|
||||||
appLayout: state.prefState.appLayout,
|
appLayout: state.prefState.appLayout,
|
||||||
child: DashboardScreenBuilder(),
|
child: DashboardScreenBuilder(),
|
||||||
),
|
),
|
||||||
KanbanScreenBuilder.route: (context) =>
|
|
||||||
KanbanScreenBuilder(),
|
|
||||||
ProductScreen.route: (context) => ProductScreenBuilder(),
|
ProductScreen.route: (context) => ProductScreenBuilder(),
|
||||||
ProductViewScreen.route: (context) => ProductViewScreen(),
|
ProductViewScreen.route: (context) => ProductViewScreen(),
|
||||||
ProductEditScreen.route: (context) => ProductEditScreen(),
|
ProductEditScreen.route: (context) => ProductEditScreen(),
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import 'package:invoiceninja_flutter/redux/document/document_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/expense/expense_actions.dart';
|
import 'package:invoiceninja_flutter/redux/expense/expense_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/group/group_actions.dart';
|
import 'package:invoiceninja_flutter/redux/group/group_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/invoice/invoice_actions.dart';
|
import 'package:invoiceninja_flutter/redux/invoice/invoice_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/kanban/kanban_actions.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/payment/payment_actions.dart';
|
import 'package:invoiceninja_flutter/redux/payment/payment_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/product/product_actions.dart';
|
import 'package:invoiceninja_flutter/redux/product/product_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/project/project_actions.dart';
|
import 'package:invoiceninja_flutter/redux/project/project_actions.dart';
|
||||||
|
|
@ -291,9 +290,6 @@ void viewEntitiesByType({
|
||||||
case EntityType.reports:
|
case EntityType.reports:
|
||||||
action = ViewReports(navigator: navigator);
|
action = ViewReports(navigator: navigator);
|
||||||
break;
|
break;
|
||||||
case EntityType.kanban:
|
|
||||||
action = ViewKanban(navigator: navigator);
|
|
||||||
break;
|
|
||||||
case EntityType.settings:
|
case EntityType.settings:
|
||||||
action = ViewSettings(
|
action = ViewSettings(
|
||||||
navigator: navigator,
|
navigator: navigator,
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
|
||||||
|
|
||||||
class ViewKanban extends AbstractNavigatorAction implements PersistUI {
|
|
||||||
ViewKanban({
|
|
||||||
@required NavigatorState navigator,
|
|
||||||
this.force = false,
|
|
||||||
}) : super(navigator: navigator);
|
|
||||||
|
|
||||||
final bool force;
|
|
||||||
}
|
|
||||||
|
|
@ -1,38 +0,0 @@
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/kanban/kanban_actions.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/ui/ui_actions.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/kanban_screen_vm.dart';
|
|
||||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
|
||||||
import 'package:redux/redux.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
List<Middleware<AppState>> createStoreKabanMiddleware() {
|
|
||||||
final viewKanban = _viewKanban();
|
|
||||||
|
|
||||||
return [
|
|
||||||
TypedMiddleware<AppState, ViewKanban>(viewKanban),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
Middleware<AppState> _viewKanban() {
|
|
||||||
return (Store<AppState> store, dynamic dynamicAction, NextDispatcher next) {
|
|
||||||
final action = dynamicAction as ViewKanban;
|
|
||||||
|
|
||||||
checkForChanges(
|
|
||||||
store: store,
|
|
||||||
context: action.context,
|
|
||||||
force: action.force,
|
|
||||||
callback: () {
|
|
||||||
const route = KanbanScreenBuilder.route;
|
|
||||||
|
|
||||||
next(action);
|
|
||||||
|
|
||||||
store.dispatch(UpdateCurrentRoute(route));
|
|
||||||
|
|
||||||
if (isMobile(action.context)) {
|
|
||||||
Navigator.of(action.context).pushNamed(route);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -10,7 +10,6 @@ import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/expense/expense_actions.dart';
|
import 'package:invoiceninja_flutter/redux/expense/expense_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/group/group_actions.dart';
|
import 'package:invoiceninja_flutter/redux/group/group_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/invoice/invoice_actions.dart';
|
import 'package:invoiceninja_flutter/redux/invoice/invoice_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/kanban/kanban_actions.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/payment/payment_actions.dart';
|
import 'package:invoiceninja_flutter/redux/payment/payment_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/product/product_actions.dart';
|
import 'package:invoiceninja_flutter/redux/product/product_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/project/project_actions.dart';
|
import 'package:invoiceninja_flutter/redux/project/project_actions.dart';
|
||||||
|
|
@ -235,8 +234,6 @@ Reducer<BuiltList<HistoryRecord>> historyReducer = combineReducers([
|
||||||
TypedReducer<BuiltList<HistoryRecord>, ViewReports>((historyList, action) =>
|
TypedReducer<BuiltList<HistoryRecord>, ViewReports>((historyList, action) =>
|
||||||
_addToHistory(
|
_addToHistory(
|
||||||
historyList, HistoryRecord(entityType: EntityType.reports))),
|
historyList, HistoryRecord(entityType: EntityType.reports))),
|
||||||
TypedReducer<BuiltList<HistoryRecord>, ViewKanban>((historyList, action) =>
|
|
||||||
_addToHistory(historyList, HistoryRecord(entityType: EntityType.kanban))),
|
|
||||||
TypedReducer<BuiltList<HistoryRecord>, ViewSettings>((historyList, action) =>
|
TypedReducer<BuiltList<HistoryRecord>, ViewSettings>((historyList, action) =>
|
||||||
_addToHistory(
|
_addToHistory(
|
||||||
historyList,
|
historyList,
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ 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/redux/dashboard/dashboard_actions.dart';
|
import 'package:invoiceninja_flutter/redux/dashboard/dashboard_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/kanban/kanban_actions.dart';
|
|
||||||
import 'package:invoiceninja_flutter/redux/reports/reports_actions.dart';
|
import 'package:invoiceninja_flutter/redux/reports/reports_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
import 'package:invoiceninja_flutter/redux/settings/settings_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/ui/pref_state.dart';
|
import 'package:invoiceninja_flutter/redux/ui/pref_state.dart';
|
||||||
|
|
@ -112,7 +111,6 @@ class _HistoryListTileState extends State<HistoryListTile> {
|
||||||
if ([
|
if ([
|
||||||
EntityType.dashboard,
|
EntityType.dashboard,
|
||||||
EntityType.reports,
|
EntityType.reports,
|
||||||
EntityType.kanban,
|
|
||||||
EntityType.settings,
|
EntityType.settings,
|
||||||
].contains(history.entityType)) {
|
].contains(history.entityType)) {
|
||||||
title = Text(localization.lookup(history.entityType.toString()));
|
title = Text(localization.lookup(history.entityType.toString()));
|
||||||
|
|
@ -207,9 +205,6 @@ class _HistoryListTileState extends State<HistoryListTile> {
|
||||||
case EntityType.reports:
|
case EntityType.reports:
|
||||||
store.dispatch(ViewReports(navigator: Navigator.of(context)));
|
store.dispatch(ViewReports(navigator: Navigator.of(context)));
|
||||||
break;
|
break;
|
||||||
case EntityType.kanban:
|
|
||||||
store.dispatch(ViewKanban(navigator: Navigator.of(context)));
|
|
||||||
break;
|
|
||||||
case EntityType.settings:
|
case EntityType.settings:
|
||||||
store.dispatch(ViewSettings(
|
store.dispatch(ViewSettings(
|
||||||
navigator: Navigator.of(context), section: history.id));
|
navigator: Navigator.of(context), section: history.id));
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,6 @@ import 'package:invoiceninja_flutter/ui/expense_category/edit/expense_category_e
|
||||||
import 'package:invoiceninja_flutter/ui/expense_category/expense_category_screen_vm.dart';
|
import 'package:invoiceninja_flutter/ui/expense_category/expense_category_screen_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/expense_category/view/expense_category_view_vm.dart';
|
import 'package:invoiceninja_flutter/ui/expense_category/view/expense_category_view_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/invoice/invoice_pdf_vm.dart';
|
import 'package:invoiceninja_flutter/ui/invoice/invoice_pdf_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/kanban_screen_vm.dart';
|
|
||||||
import 'package:invoiceninja_flutter/ui/payment_term/edit/payment_term_edit_vm.dart';
|
import 'package:invoiceninja_flutter/ui/payment_term/edit/payment_term_edit_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/payment_term/payment_term_screen_vm.dart';
|
import 'package:invoiceninja_flutter/ui/payment_term/payment_term_screen_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/payment_term/view/payment_term_view_vm.dart';
|
import 'package:invoiceninja_flutter/ui/payment_term/view/payment_term_view_vm.dart';
|
||||||
|
|
@ -118,9 +117,6 @@ class MainScreen extends StatelessWidget {
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case KanbanScreenBuilder.route:
|
|
||||||
screen = KanbanScreenBuilder();
|
|
||||||
break;
|
|
||||||
case ClientScreen.route:
|
case ClientScreen.route:
|
||||||
screen = EntityScreens(
|
screen = EntityScreens(
|
||||||
entityType: EntityType.client,
|
entityType: EntityType.client,
|
||||||
|
|
|
||||||
|
|
@ -387,16 +387,6 @@ class MenuDrawer extends StatelessWidget {
|
||||||
iconTooltip: localization.newExpense,
|
iconTooltip: localization.newExpense,
|
||||||
),
|
),
|
||||||
// STARTER: menu - do not remove comment
|
// STARTER: menu - do not remove comment
|
||||||
if (!kReleaseMode &&
|
|
||||||
company.isModuleEnabled(EntityType.task))
|
|
||||||
DrawerTile(
|
|
||||||
company: company,
|
|
||||||
icon: getEntityIcon(EntityType.kanban),
|
|
||||||
title: localization.kanban,
|
|
||||||
onTap: () => viewEntitiesByType(
|
|
||||||
appContext: context.getAppContext(),
|
|
||||||
entityType: EntityType.kanban),
|
|
||||||
),
|
|
||||||
DrawerTile(
|
DrawerTile(
|
||||||
company: company,
|
company: company,
|
||||||
icon: getEntityIcon(EntityType.reports),
|
icon: getEntityIcon(EntityType.reports),
|
||||||
|
|
@ -404,9 +394,6 @@ class MenuDrawer extends StatelessWidget {
|
||||||
onTap: () => viewEntitiesByType(
|
onTap: () => viewEntitiesByType(
|
||||||
appContext: context.getAppContext(),
|
appContext: context.getAppContext(),
|
||||||
entityType: EntityType.reports),
|
entityType: EntityType.reports),
|
||||||
onLongPress: () => viewEntitiesByType(
|
|
||||||
appContext: context.getAppContext(),
|
|
||||||
entityType: EntityType.kanban),
|
|
||||||
),
|
),
|
||||||
DrawerTile(
|
DrawerTile(
|
||||||
company: company,
|
company: company,
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ 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/history_drawer_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_filter.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/app/menu_drawer_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/kanban_screen_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:invoiceninja_flutter/utils/platforms.dart';
|
||||||
import 'package:timeago/timeago.dart' as timeago;
|
import 'package:timeago/timeago.dart' as timeago;
|
||||||
|
|
||||||
class KanbanScreen extends StatefulWidget {
|
class KanbanView extends StatefulWidget {
|
||||||
const KanbanScreen({
|
const KanbanView({
|
||||||
Key key,
|
Key key,
|
||||||
@required this.viewModel,
|
@required this.viewModel,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
@ -23,10 +23,10 @@ class KanbanScreen extends StatefulWidget {
|
||||||
final KanbanVM viewModel;
|
final KanbanVM viewModel;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_KanbanScreenState createState() => _KanbanScreenState();
|
_KanbanViewState createState() => _KanbanViewState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _KanbanScreenState extends State<KanbanScreen> {
|
class _KanbanViewState extends State<KanbanView> {
|
||||||
final _boardViewController = new BoardViewController();
|
final _boardViewController = new BoardViewController();
|
||||||
|
|
||||||
List<TaskStatusEntity> _statuses = [];
|
List<TaskStatusEntity> _statuses = [];
|
||||||
|
|
@ -166,35 +166,12 @@ class _KanbanScreenState extends State<KanbanScreen> {
|
||||||
);
|
);
|
||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
return Scaffold(
|
return Padding(
|
||||||
drawer: isMobile(context) || state.prefState.isMenuFloated
|
padding: const EdgeInsets.symmetric(vertical: 8),
|
||||||
? MenuDrawerBuilder()
|
child: BoardView(
|
||||||
: null,
|
boardViewController: _boardViewController,
|
||||||
endDrawer: isMobile(context) || state.prefState.isHistoryFloated
|
lists: boardList,
|
||||||
? HistoryDrawerBuilder()
|
dragDelay: 1,
|
||||||
: null,
|
|
||||||
appBar: AppBar(
|
|
||||||
centerTitle: false,
|
|
||||||
leading: isMobile(context) || state.prefState.isMenuFloated
|
|
||||||
? null
|
|
||||||
: SizedBox(),
|
|
||||||
title: ListFilter(
|
|
||||||
key: ValueKey('__cleared_at_${state.uiState.filterClearedAt}__'),
|
|
||||||
entityType: EntityType.kanban,
|
|
||||||
entityIds: [],
|
|
||||||
filter: state.uiState.filter,
|
|
||||||
onFilterChanged: (value) {
|
|
||||||
//store.dispatch(FilterCompany(value));
|
|
||||||
},
|
|
||||||
),
|
|
||||||
),
|
|
||||||
body: Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 8),
|
|
||||||
child: BoardView(
|
|
||||||
boardViewController: _boardViewController,
|
|
||||||
lists: boardList,
|
|
||||||
dragDelay: 1,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -5,20 +5,19 @@ import 'package:invoiceninja_flutter/redux/app/app_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
import 'package:invoiceninja_flutter/redux/app/app_state.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/task/task_actions.dart';
|
import 'package:invoiceninja_flutter/redux/task/task_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/task_status/task_status_actions.dart';
|
import 'package:invoiceninja_flutter/redux/task_status/task_status_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/kanban_screen.dart';
|
import 'package:invoiceninja_flutter/ui/task/kanban_view.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/completers.dart';
|
import 'package:invoiceninja_flutter/utils/completers.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
import 'package:redux/redux.dart';
|
import 'package:redux/redux.dart';
|
||||||
|
|
||||||
class KanbanScreenBuilder extends StatefulWidget {
|
class KanbanViewBuilder extends StatefulWidget {
|
||||||
const KanbanScreenBuilder({Key key}) : super(key: key);
|
const KanbanViewBuilder({Key key}) : super(key: key);
|
||||||
static const String route = '/kanban';
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_KanbanScreenBuilderState createState() => _KanbanScreenBuilderState();
|
_KanbanViewBuilderState createState() => _KanbanViewBuilderState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _KanbanScreenBuilderState extends State<KanbanScreenBuilder> {
|
class _KanbanViewBuilderState extends State<KanbanViewBuilder> {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return StoreConnector<AppState, KanbanVM>(
|
return StoreConnector<AppState, KanbanVM>(
|
||||||
|
|
@ -26,7 +25,7 @@ class _KanbanScreenBuilderState extends State<KanbanScreenBuilder> {
|
||||||
builder: (context, viewModel) {
|
builder: (context, viewModel) {
|
||||||
final state = viewModel.state;
|
final state = viewModel.state;
|
||||||
final company = state.company;
|
final company = state.company;
|
||||||
return KanbanScreen(
|
return KanbanView(
|
||||||
viewModel: viewModel,
|
viewModel: viewModel,
|
||||||
key: ValueKey(
|
key: ValueKey(
|
||||||
'__${company.id}_${state.userCompanyState.lastUpdated}_'),
|
'__${company.id}_${state.userCompanyState.lastUpdated}_'),
|
||||||
|
|
@ -4,6 +4,7 @@ import 'package:invoiceninja_flutter/constants.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/list_scaffold.dart';
|
import 'package:invoiceninja_flutter/ui/app/list_scaffold.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
import 'package:invoiceninja_flutter/ui/app/list_filter.dart';
|
||||||
|
import 'package:invoiceninja_flutter/ui/task/kanban_view_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/task/task_presenter.dart';
|
import 'package:invoiceninja_flutter/ui/task/task_presenter.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/task/task_screen_vm.dart';
|
import 'package:invoiceninja_flutter/ui/task/task_screen_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/utils/localization.dart';
|
import 'package:invoiceninja_flutter/utils/localization.dart';
|
||||||
|
|
@ -12,6 +13,7 @@ import 'package:invoiceninja_flutter/data/models/models.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/task/task_list_vm.dart';
|
import 'package:invoiceninja_flutter/ui/task/task_list_vm.dart';
|
||||||
import 'package:invoiceninja_flutter/redux/task/task_actions.dart';
|
import 'package:invoiceninja_flutter/redux/task/task_actions.dart';
|
||||||
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
import 'package:invoiceninja_flutter/ui/app/app_bottom_bar.dart';
|
||||||
|
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
|
||||||
|
|
||||||
class TaskScreen extends StatelessWidget {
|
class TaskScreen extends StatelessWidget {
|
||||||
const TaskScreen({
|
const TaskScreen({
|
||||||
|
|
@ -42,7 +44,16 @@ class TaskScreen extends StatelessWidget {
|
||||||
store.dispatch(FilterTasks(value));
|
store.dispatch(FilterTasks(value));
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
appBarActions: [
|
||||||
|
IconButton(
|
||||||
|
icon: Icon(MdiIcons.trello),
|
||||||
|
onPressed: () {
|
||||||
|
//
|
||||||
|
},
|
||||||
|
)
|
||||||
|
],
|
||||||
body: TaskListBuilder(),
|
body: TaskListBuilder(),
|
||||||
|
//body: KanbanViewBuilder(),
|
||||||
bottomNavigationBar: AppBottomBar(
|
bottomNavigationBar: AppBottomBar(
|
||||||
entityType: EntityType.task,
|
entityType: EntityType.task,
|
||||||
tableColumns: TaskPresenter.getAllTableFields(userCompany),
|
tableColumns: TaskPresenter.getAllTableFields(userCompany),
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,6 @@ IconData getEntityIcon(EntityType entityType) {
|
||||||
return MdiIcons.label;
|
return MdiIcons.label;
|
||||||
case EntityType.subscription:
|
case EntityType.subscription:
|
||||||
return MdiIcons.shopping;
|
return MdiIcons.shopping;
|
||||||
case EntityType.kanban:
|
|
||||||
return MdiIcons.trello;
|
|
||||||
default:
|
default:
|
||||||
return MdiIcons.crosshairsQuestion;
|
return MdiIcons.crosshairsQuestion;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue