Enable transactions
This commit is contained in:
parent
aeb80442a6
commit
f6ef23eabb
|
|
@ -2,7 +2,6 @@
|
|||
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';
|
||||
|
|
@ -253,11 +252,8 @@ 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));
|
||||
|
|
|
|||
|
|
@ -654,7 +654,6 @@ class _MenuDrawerState extends State<MenuDrawer> {
|
|||
icon: getEntityIcon(EntityType.recurringExpense),
|
||||
title: localization.recurringExpenses,
|
||||
),
|
||||
if (supportsBankAccounts())
|
||||
DrawerTile(
|
||||
company: company,
|
||||
entityType: EntityType.transaction,
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ class _SettingsListState extends State<SettingsList> {
|
|||
section: kSettingsTemplatesAndReminders,
|
||||
viewModel: widget.viewModel,
|
||||
),
|
||||
if (showAll && supportsBankAccounts())
|
||||
if (showAll)
|
||||
SettingsListTile(
|
||||
section: kSettingsBankAccounts,
|
||||
viewModel: widget.viewModel,
|
||||
|
|
@ -574,7 +574,6 @@ class SettingsSearch extends StatelessWidget {
|
|||
'late_fees',
|
||||
]
|
||||
],
|
||||
if (supportsBankAccounts())
|
||||
kSettingsBankAccounts: [
|
||||
[
|
||||
'bank_accounts',
|
||||
|
|
|
|||
|
|
@ -31,20 +31,6 @@ bool supportsAppleOAuth() => kIsWeb || isApple();
|
|||
// TODO remove this function
|
||||
bool supportsMicrosoftOAuth() => kIsWeb;
|
||||
|
||||
// TODO remove this function
|
||||
bool supportsBankAccounts() {
|
||||
if (!kReleaseMode) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext);
|
||||
if (store.state.isSelfHosted) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool supportsInAppPurchase() {
|
||||
final store = StoreProvider.of<AppState>(navigatorKey.currentContext);
|
||||
if (store.state.isSelfHosted) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue