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

Reviewed-on: #111
This commit was merged in pull request #111.
This commit is contained in:
2025-12-17 11:13:16 +00:00
3 changed files with 29 additions and 6 deletions

View File

@@ -426,9 +426,13 @@
"addRecipient": "Add Recipient", "addRecipient": "Add Recipient",
"editRecipient": "Edit Recipient", "editRecipient": "Edit Recipient",
"saveRecipient": "Save Recipient", "saveRecipient": "Save Recipient",
"choosePaymentMethod": "Payment Methods (choose at least 1)", "choosePaymentMethod": "Payment Methods (choose at least 1)",
"recipientFormRule": "Recipient must have at least one payment method", "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", "allStatus": "All",
"readyStatus": "Ready", "readyStatus": "Ready",
@@ -444,6 +448,10 @@
"@errorSaveRecipient": { "@errorSaveRecipient": {
"description": "Error message displayed when saving a recipient fails" "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": "Recipient deleted successfully",
"@recipientDeletedSuccessfully": { "@recipientDeletedSuccessfully": {
"description": "Success message displayed when a recipient is deleted" "description": "Success message displayed when a recipient is deleted"

View File

@@ -426,9 +426,13 @@
"addRecipient": "Добавить получателя", "addRecipient": "Добавить получателя",
"editRecipient": "Редактировать получателя", "editRecipient": "Редактировать получателя",
"saveRecipient": "Сохранить получателя", "saveRecipient": "Сохранить получателя",
"choosePaymentMethod": "Способы оплаты (выберите хотя бы 1)", "choosePaymentMethod": "Способы оплаты (выберите хотя бы 1)",
"recipientFormRule": "Получатель должен иметь хотя бы один способ оплаты", "recipientFormRule": "Получатель должен иметь хотя бы один способ оплаты",
"recipientFormValidationError": "Заполните обязательные поля, чтобы сохранить получателя",
"@recipientFormValidationError": {
"description": "Сообщение об ошибке, если обязательные поля формы получателя не заполнены"
},
"allStatus": "Все", "allStatus": "Все",
"readyStatus": "Готов", "readyStatus": "Готов",
@@ -444,6 +448,10 @@
"@errorSaveRecipient": { "@errorSaveRecipient": {
"description": "Сообщение об ошибке при неудачном сохранении получателя" "description": "Сообщение об ошибке при неудачном сохранении получателя"
}, },
"recipientSavedSuccessfully": "Получатель успешно сохранен",
"@recipientSavedSuccessfully": {
"description": "Сообщение об успешном сохранении получателя"
},
"recipientDeletedSuccessfully": "Получатель успешно удален", "recipientDeletedSuccessfully": "Получатель успешно удален",
"@recipientDeletedSuccessfully": { "@recipientDeletedSuccessfully": {
"description": "Сообщение об успешном удалении получателя" "description": "Сообщение об успешном удалении получателя"

View File

@@ -101,8 +101,15 @@ class _AdressBookRecipientFormState extends State<AdressBookRecipientForm> {
//TODO: Change when registration is ready //TODO: Change when registration is ready
Future<void> _save() async { Future<void> _save() async {
if (!_formKey.currentState!.validate() || _methods.isEmpty) { final l10n = AppLocalizations.of(context)!;
notifyUser(context, AppLocalizations.of(context)!.errorSaveRecipient);
if (!_formKey.currentState!.validate()) {
notifyUser(context, l10n.recipientFormValidationError);
return;
}
if (_methods.isEmpty) {
notifyUser(context, l10n.recipientFormRule);
return; return;
} }
@@ -114,8 +121,8 @@ class _AdressBookRecipientFormState extends State<AdressBookRecipientForm> {
final recipient = await executeActionWithNotification( final recipient = await executeActionWithNotification(
context: context, context: context,
action: _doSave, action: _doSave,
errorMessage: AppLocalizations.of(context)!.errorSaveRecipient, errorMessage: l10n.errorSaveRecipient,
successMessage: AppLocalizations.of(context)!.recipientFormRule, successMessage: l10n.recipientSavedSuccessfully,
); );