Transactions
This commit is contained in:
parent
a621e8b18e
commit
3c773c1a55
|
|
@ -1,6 +1,8 @@
|
|||
// Flutter imports:
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:invoiceninja_flutter/redux/transaction/transaction_actions.dart';
|
||||
import 'package:invoiceninja_flutter/utils/platforms.dart';
|
||||
|
||||
// Package imports:
|
||||
import 'package:redux/redux.dart';
|
||||
|
|
@ -251,7 +253,11 @@ Middleware<AppState> _loadRecurringExpenses(
|
|||
if (action.completer != null) {
|
||||
action.completer.complete(null);
|
||||
}
|
||||
if (supportsBankAccounts()) {
|
||||
store.dispatch(LoadTransactions());
|
||||
} else {
|
||||
store.dispatch(PersistData());
|
||||
}
|
||||
}).catchError((Object error) {
|
||||
print(error);
|
||||
store.dispatch(LoadRecurringExpensesFailure(error));
|
||||
|
|
|
|||
|
|
@ -313,11 +313,7 @@ Middleware<AppState> _loadTransactions(TransactionRepository repository) {
|
|||
if (action.completer != null) {
|
||||
action.completer.complete(null);
|
||||
}
|
||||
/*
|
||||
if (state.productState.isStale) {
|
||||
store.dispatch(LoadProducts());
|
||||
}
|
||||
*/
|
||||
store.dispatch(PersistData());
|
||||
}).catchError((Object error) {
|
||||
print(error);
|
||||
store.dispatch(LoadTransactionsFailure(error));
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import 'package:invoiceninja_flutter/redux/quote/quote_actions.dart';
|
|||
import 'package:invoiceninja_flutter/redux/recurring_expense/recurring_expense_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/recurring_invoice/recurring_invoice_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/task/task_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/transaction/transaction_actions.dart';
|
||||
import 'package:invoiceninja_flutter/redux/vendor/vendor_actions.dart';
|
||||
import 'package:redux/redux.dart';
|
||||
|
||||
|
|
@ -178,6 +179,9 @@ Reducer<EntityType> loadingEntityTypeReducer = combineReducers([
|
|||
TypedReducer<EntityType, LoadRecurringExpensesRequest>((state, action) {
|
||||
return EntityType.recurringExpense;
|
||||
}),
|
||||
TypedReducer<EntityType, LoadTransactionsRequest>((state, action) {
|
||||
return EntityType.transaction;
|
||||
}),
|
||||
]);
|
||||
|
||||
Reducer<int> filterClearedAtReducer = combineReducers([
|
||||
|
|
|
|||
|
|
@ -228,11 +228,7 @@ Middleware<AppState> _loadStubs(StubRepository repository) {
|
|||
if (action.completer != null) {
|
||||
action.completer.complete(null);
|
||||
}
|
||||
/*
|
||||
if (state.productState.isStale) {
|
||||
store.dispatch(LoadProducts());
|
||||
}
|
||||
*/
|
||||
|
||||
}).catchError((Object error) {
|
||||
print(error);
|
||||
store.dispatch(LoadStubsFailure(error));
|
||||
|
|
|
|||
Loading…
Reference in New Issue