From 15a0a899a2af90bc705a12b05ad40ced6cf56a96 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 27 May 2024 11:27:19 +0300 Subject: [PATCH 1/5] Show if bank account is disconnected --- lib/ui/bank_account/bank_account_list_item.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ui/bank_account/bank_account_list_item.dart b/lib/ui/bank_account/bank_account_list_item.dart index 46a0e1fe04..cda29d9758 100644 --- a/lib/ui/bank_account/bank_account_list_item.dart +++ b/lib/ui/bank_account/bank_account_list_item.dart @@ -83,8 +83,8 @@ class BankAccountListItem extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(toTitleCase(bankAccount.type) + - (bankAccount.isDisconnected - ? ' • ${localization!.disconnected}' + (bankAccount.disabledUpstream + ? ' • ${localization!.disconnected.toUpperCase()}' : '')), EntityStateLabel(bankAccount), ], From 9c26ea6cd8fad89fa4c7ff00e10ae12f82e1b632 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 27 May 2024 11:27:28 +0300 Subject: [PATCH 2/5] Show app button to reconnect bank --- .../bank_account/view/bank_account_view.dart | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/lib/ui/bank_account/view/bank_account_view.dart b/lib/ui/bank_account/view/bank_account_view.dart index d652cbe3f3..707af787cd 100644 --- a/lib/ui/bank_account/view/bank_account_view.dart +++ b/lib/ui/bank_account/view/bank_account_view.dart @@ -1,7 +1,11 @@ +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:invoiceninja_flutter/data/models/entities.dart'; +import 'package:invoiceninja_flutter/data/models/models.dart'; +import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart'; import 'package:invoiceninja_flutter/redux/transaction/transaction_selectors.dart'; import 'package:invoiceninja_flutter/ui/app/FieldGrid.dart'; +import 'package:invoiceninja_flutter/ui/app/buttons/elevated_button.dart'; import 'package:invoiceninja_flutter/ui/app/entities/entity_list_tile.dart'; import 'package:invoiceninja_flutter/ui/app/entity_header.dart'; import 'package:invoiceninja_flutter/ui/app/lists/list_divider.dart'; @@ -9,6 +13,7 @@ import 'package:invoiceninja_flutter/ui/app/scrollable_listview.dart'; import 'package:invoiceninja_flutter/ui/bank_account/view/bank_account_view_vm.dart'; import 'package:invoiceninja_flutter/ui/app/view_scaffold.dart'; import 'package:invoiceninja_flutter/utils/formatting.dart'; +import 'package:invoiceninja_flutter/utils/icons.dart'; import 'package:invoiceninja_flutter/utils/localization.dart'; import 'package:invoiceninja_flutter/utils/strings.dart'; @@ -40,12 +45,27 @@ class _BankAccountViewState extends State { onBackPressed: () => viewModel.onBackPressed(), body: ScrollableListView( children: [ - if (bankAccount.isConnected) + if (!kReleaseMode || bankAccount.isConnected) ...[ EntityHeader( entity: bankAccount, label: localization.balance, value: formatNumber(bankAccount.balance, context), ), + if (!kReleaseMode || bankAccount.isDisconnected) ...[ + ListDivider(), + Padding( + padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), + child: AppButton( + label: localization.reconnect, + onPressed: () { + handleBankAccountAction( + context, [bankAccount], EntityAction.reconnect); + }, + iconData: getEntityActionIcon(EntityAction.reconnect), + ), + ), + ], + ], ListDivider(), EntitiesListTile( entity: bankAccount, From 0bbd0e745c1c980c94aceb22914739dd1e2e35d4 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 27 May 2024 11:49:58 +0300 Subject: [PATCH 3/5] Code cleanup --- lib/ui/bank_account/view/bank_account_view.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ui/bank_account/view/bank_account_view.dart b/lib/ui/bank_account/view/bank_account_view.dart index 707af787cd..64e3912263 100644 --- a/lib/ui/bank_account/view/bank_account_view.dart +++ b/lib/ui/bank_account/view/bank_account_view.dart @@ -1,6 +1,5 @@ import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:invoiceninja_flutter/data/models/entities.dart'; import 'package:invoiceninja_flutter/data/models/models.dart'; import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart'; import 'package:invoiceninja_flutter/redux/transaction/transaction_selectors.dart'; From 2282180b144fabad90cafe9fc0fa89a0b65d9682 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 27 May 2024 12:13:09 +0300 Subject: [PATCH 4/5] Show app button to reconnect bank --- lib/ui/bank_account/view/bank_account_view.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/ui/bank_account/view/bank_account_view.dart b/lib/ui/bank_account/view/bank_account_view.dart index 64e3912263..264a05388b 100644 --- a/lib/ui/bank_account/view/bank_account_view.dart +++ b/lib/ui/bank_account/view/bank_account_view.dart @@ -1,4 +1,3 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:invoiceninja_flutter/data/models/models.dart'; import 'package:invoiceninja_flutter/redux/bank_account/bank_account_actions.dart'; @@ -44,18 +43,18 @@ class _BankAccountViewState extends State { onBackPressed: () => viewModel.onBackPressed(), body: ScrollableListView( children: [ - if (!kReleaseMode || bankAccount.isConnected) ...[ + if (bankAccount.isConnected) ...[ EntityHeader( entity: bankAccount, label: localization.balance, value: formatNumber(bankAccount.balance, context), ), - if (!kReleaseMode || bankAccount.isDisconnected) ...[ + if (bankAccount.isDisconnected) ...[ ListDivider(), Padding( padding: const EdgeInsets.only(left: 20, right: 20, bottom: 20), child: AppButton( - label: localization.reconnect, + label: localization.reconnect.toUpperCase(), onPressed: () { handleBankAccountAction( context, [bankAccount], EntityAction.reconnect); From 915e2582de4ee74987dd56171414ae7d63bceb9c Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Mon, 27 May 2024 12:58:31 +0300 Subject: [PATCH 5/5] Update white label payment link --- lib/constants.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/constants.dart b/lib/constants.dart index 5a8d9b421c..d9ed302c34 100644 --- a/lib/constants.dart +++ b/lib/constants.dart @@ -19,7 +19,7 @@ const String kAppLargeTestUrl = 'https://testv5.invoicing.co'; const String kFlutterDemoUrl = 'https://demo.invoiceninja.com'; const String kReactDemoUrl = 'https://react.invoicing.co/demo'; const String kWhiteLabelUrl = - 'https://app.invoiceninja.com/buy_now/?account_key=AsFmBAeLXF0IKf7tmi0eiyZfmWW9hxMT&product_id=3'; + 'https://invoiceninja.invoicing.co/client/subscriptions/O5xe7Rwd7r/purchase?account_key=AsFmBAeLXF0IKf7tmi0eiyZfmWW9hxMT&product_id=3'; const String kPrivacyPolicyURL = 'https://www.invoiceninja.com/privacy-policy'; const String kTermsOfServiceURL = 'https://www.invoiceninja.com/terms'; const String kBankingURL = 'https://invoiceninja.com/banking';