Merge pull request 'Made clear massages for errors in recipient registration' (#111) from SEND008 into main
Some checks are pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/mntx_gateway Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline is running
ci/woodpecker/push/frontend Pipeline is running
ci/woodpecker/push/chain_gateway Pipeline was successful
Some checks are pending
ci/woodpecker/push/ledger Pipeline is pending
ci/woodpecker/push/mntx_gateway Pipeline is pending
ci/woodpecker/push/nats Pipeline is pending
ci/woodpecker/push/notification Pipeline is pending
ci/woodpecker/push/payments_orchestrator Pipeline is pending
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline is running
ci/woodpecker/push/frontend Pipeline is running
ci/woodpecker/push/chain_gateway Pipeline was successful
Reviewed-on: #111
This commit was merged in pull request #111.
This commit is contained in:
@@ -426,9 +426,13 @@
|
||||
"addRecipient": "Add Recipient",
|
||||
"editRecipient": "Edit Recipient",
|
||||
"saveRecipient": "Save Recipient",
|
||||
|
||||
|
||||
"choosePaymentMethod": "Payment Methods (choose at least 1)",
|
||||
"recipientFormRule": "Recipient must have at least one payment method",
|
||||
"recipientFormValidationError": "Fill in the required fields to save the recipient",
|
||||
"@recipientFormValidationError": {
|
||||
"description": "Error message shown when recipient form fields are invalid or missing"
|
||||
},
|
||||
|
||||
"allStatus": "All",
|
||||
"readyStatus": "Ready",
|
||||
@@ -444,6 +448,10 @@
|
||||
"@errorSaveRecipient": {
|
||||
"description": "Error message displayed when saving a recipient fails"
|
||||
},
|
||||
"recipientSavedSuccessfully": "Recipient saved successfully",
|
||||
"@recipientSavedSuccessfully": {
|
||||
"description": "Success message displayed when a recipient is saved"
|
||||
},
|
||||
"recipientDeletedSuccessfully": "Recipient deleted successfully",
|
||||
"@recipientDeletedSuccessfully": {
|
||||
"description": "Success message displayed when a recipient is deleted"
|
||||
|
||||
@@ -426,9 +426,13 @@
|
||||
"addRecipient": "Добавить получателя",
|
||||
"editRecipient": "Редактировать получателя",
|
||||
"saveRecipient": "Сохранить получателя",
|
||||
|
||||
|
||||
"choosePaymentMethod": "Способы оплаты (выберите хотя бы 1)",
|
||||
"recipientFormRule": "Получатель должен иметь хотя бы один способ оплаты",
|
||||
"recipientFormValidationError": "Заполните обязательные поля, чтобы сохранить получателя",
|
||||
"@recipientFormValidationError": {
|
||||
"description": "Сообщение об ошибке, если обязательные поля формы получателя не заполнены"
|
||||
},
|
||||
|
||||
"allStatus": "Все",
|
||||
"readyStatus": "Готов",
|
||||
@@ -444,6 +448,10 @@
|
||||
"@errorSaveRecipient": {
|
||||
"description": "Сообщение об ошибке при неудачном сохранении получателя"
|
||||
},
|
||||
"recipientSavedSuccessfully": "Получатель успешно сохранен",
|
||||
"@recipientSavedSuccessfully": {
|
||||
"description": "Сообщение об успешном сохранении получателя"
|
||||
},
|
||||
"recipientDeletedSuccessfully": "Получатель успешно удален",
|
||||
"@recipientDeletedSuccessfully": {
|
||||
"description": "Сообщение об успешном удалении получателя"
|
||||
|
||||
@@ -101,8 +101,15 @@ class _AdressBookRecipientFormState extends State<AdressBookRecipientForm> {
|
||||
|
||||
//TODO: Change when registration is ready
|
||||
Future<void> _save() async {
|
||||
if (!_formKey.currentState!.validate() || _methods.isEmpty) {
|
||||
notifyUser(context, AppLocalizations.of(context)!.errorSaveRecipient);
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
|
||||
if (!_formKey.currentState!.validate()) {
|
||||
notifyUser(context, l10n.recipientFormValidationError);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_methods.isEmpty) {
|
||||
notifyUser(context, l10n.recipientFormRule);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -114,8 +121,8 @@ class _AdressBookRecipientFormState extends State<AdressBookRecipientForm> {
|
||||
final recipient = await executeActionWithNotification(
|
||||
context: context,
|
||||
action: _doSave,
|
||||
errorMessage: AppLocalizations.of(context)!.errorSaveRecipient,
|
||||
successMessage: AppLocalizations.of(context)!.recipientFormRule,
|
||||
errorMessage: l10n.errorSaveRecipient,
|
||||
successMessage: l10n.recipientSavedSuccessfully,
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user