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/material.dart';
import 'package:flutter/widgets.dart'; import 'package:flutter/widgets.dart';
import 'package:invoiceninja_flutter/redux/transaction/transaction_actions.dart'; import 'package:invoiceninja_flutter/redux/transaction/transaction_actions.dart';
import 'package:invoiceninja_flutter/utils/platforms.dart';
// Package imports: // Package imports:
import 'package:redux/redux.dart'; import 'package:redux/redux.dart';
@ -253,11 +252,8 @@ Middleware<AppState> _loadRecurringExpenses(
if (action.completer != null) { if (action.completer != null) {
action.completer.complete(null); action.completer.complete(null);
} }
if (supportsBankAccounts()) {
store.dispatch(LoadTransactions()); store.dispatch(LoadTransactions());
} else {
store.dispatch(PersistData());
}
}).catchError((Object error) { }).catchError((Object error) {
print(error); print(error);
store.dispatch(LoadRecurringExpensesFailure(error)); store.dispatch(LoadRecurringExpensesFailure(error));

View File

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

View File

@ -204,7 +204,7 @@ class _SettingsListState extends State<SettingsList> {
section: kSettingsTemplatesAndReminders, section: kSettingsTemplatesAndReminders,
viewModel: widget.viewModel, viewModel: widget.viewModel,
), ),
if (showAll && supportsBankAccounts()) if (showAll)
SettingsListTile( SettingsListTile(
section: kSettingsBankAccounts, section: kSettingsBankAccounts,
viewModel: widget.viewModel, viewModel: widget.viewModel,
@ -574,7 +574,6 @@ class SettingsSearch extends StatelessWidget {
'late_fees', 'late_fees',
] ]
], ],
if (supportsBankAccounts())
kSettingsBankAccounts: [ kSettingsBankAccounts: [
[ [
'bank_accounts', 'bank_accounts',

View File

@ -31,20 +31,6 @@ bool supportsAppleOAuth() => kIsWeb || isApple();
// TODO remove this function // TODO remove this function
bool supportsMicrosoftOAuth() => kIsWeb; 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() { bool supportsInAppPurchase() {
final store = StoreProvider.of<AppState>(navigatorKey.currentContext); final store = StoreProvider.of<AppState>(navigatorKey.currentContext);
if (store.state.isSelfHosted) { if (store.state.isSelfHosted) {