From ce862942ea808cbe7c29ea8fb226e0c8fdf87917 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 30 Jan 2024 15:49:57 +0200 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20allow=20creating=20an=20empty?= =?UTF-8?q?=20payment=20if=20client=20initiated=20payments=20is=20disabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ui/payment/edit/payment_edit_vm.dart | 3 ++- lib/utils/i18n.dart | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/ui/payment/edit/payment_edit_vm.dart b/lib/ui/payment/edit/payment_edit_vm.dart index 37d2c5a44..f25f7034e 100644 --- a/lib/ui/payment/edit/payment_edit_vm.dart +++ b/lib/ui/payment/edit/payment_edit_vm.dart @@ -98,7 +98,8 @@ class PaymentEditVM { showDialog( context: navigatorKey.currentContext!, builder: (BuildContext context) { - return ErrorDialog(localization.pleaseSelectAnInvoice); + return ErrorDialog( + localization.pleaseSelectAnInvoiceOrCredit); }); return null; } diff --git a/lib/utils/i18n.dart b/lib/utils/i18n.dart index b5a581265..1364615ca 100644 --- a/lib/utils/i18n.dart +++ b/lib/utils/i18n.dart @@ -18,6 +18,8 @@ mixin LocalizationsProvider on LocaleCodeAware { static final Map> _localizedValues = { 'en': { // STARTER: lang key - do not remove comment + 'please_select_an_invoice_or_credit': + 'Please select an invoice or credit', 'mobile_version': 'Mobile Version', 'venmo': 'Venmo', 'mercado_pago': 'Mercado Pago', @@ -114273,6 +114275,10 @@ mixin LocalizationsProvider on LocaleCodeAware { _localizedValues[localeCode]!['mobile_version'] ?? _localizedValues['en']!['mobile_version']!; + String get pleaseSelectAnInvoiceOrCredit => + _localizedValues[localeCode]!['please_select_an_invoice_or_credit'] ?? + _localizedValues['en']!['please_select_an_invoice_or_credit']!; + // STARTER: lang field - do not remove comment String lookup(String? key) {