Don’t allow creating an empty payment if client initiated payments is disabled

This commit is contained in:
Hillel Coren 2024-01-30 15:49:57 +02:00
parent 6a6b0fb665
commit ce862942ea
2 changed files with 8 additions and 1 deletions

View File

@ -98,7 +98,8 @@ class PaymentEditVM {
showDialog<ErrorDialog>( showDialog<ErrorDialog>(
context: navigatorKey.currentContext!, context: navigatorKey.currentContext!,
builder: (BuildContext context) { builder: (BuildContext context) {
return ErrorDialog(localization.pleaseSelectAnInvoice); return ErrorDialog(
localization.pleaseSelectAnInvoiceOrCredit);
}); });
return null; return null;
} }

View File

@ -18,6 +18,8 @@ mixin LocalizationsProvider on LocaleCodeAware {
static final Map<String, Map<String, String>> _localizedValues = { static final Map<String, Map<String, String>> _localizedValues = {
'en': { 'en': {
// STARTER: lang key - do not remove comment // STARTER: lang key - do not remove comment
'please_select_an_invoice_or_credit':
'Please select an invoice or credit',
'mobile_version': 'Mobile Version', 'mobile_version': 'Mobile Version',
'venmo': 'Venmo', 'venmo': 'Venmo',
'mercado_pago': 'Mercado Pago', 'mercado_pago': 'Mercado Pago',
@ -114273,6 +114275,10 @@ mixin LocalizationsProvider on LocaleCodeAware {
_localizedValues[localeCode]!['mobile_version'] ?? _localizedValues[localeCode]!['mobile_version'] ??
_localizedValues['en']!['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 // STARTER: lang field - do not remove comment
String lookup(String? key) { String lookup(String? key) {