Enable transactions

This commit is contained in:
Hillel Coren 2022-11-13 08:11:38 +02:00
parent aeb80442a6
commit f6ef23eabb
4 changed files with 13 additions and 33 deletions

View File

@ -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));

View File

@ -654,7 +654,6 @@ class _MenuDrawerState extends State<MenuDrawer> {
icon: getEntityIcon(EntityType.recurringExpense),
title: localization.recurringExpenses,
),
if (supportsBankAccounts())
DrawerTile(
company: company,
entityType: EntityType.transaction,

View File

@ -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',

View File

@ -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) {