Merge pull request 'Added popup for recipient deletion' (#293) from SEND032 into main
All checks were successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/discovery Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/gateway_mntx Pipeline was successful
ci/woodpecker/push/gateway_chain Pipeline was successful
ci/woodpecker/push/gateway_tgsettle Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful

Reviewed-on: #293
This commit was merged in pull request #293.
This commit is contained in:
2026-01-21 15:51:45 +00:00
3 changed files with 30 additions and 2 deletions

View File

@@ -112,13 +112,33 @@ RouteBase payoutShellRoute() => ShellRoute(
context, context,
recipient: recipient, recipient: recipient,
), ),
onDeleteRecipient: (recipient) => executeActionWithNotification( onDeleteRecipient: (recipient) async {
final confirmed = await showDialog<bool>(
context: context,
builder: (dialogContext) => AlertDialog(
title: Text(loc.delete),
content: Text(loc.deleteRecipientConfirmation),
actions: [
TextButton(
onPressed: () => Navigator.pop(dialogContext, false),
child: Text(loc.cancel),
),
ElevatedButton(
onPressed: () => Navigator.pop(dialogContext, true),
child: Text(loc.delete),
),
],
),
);
if (confirmed != true) return;
await executeActionWithNotification(
context: context, context: context,
action: () async => action: () async =>
context.read<RecipientsProvider>().delete(recipient.id), context.read<RecipientsProvider>().delete(recipient.id),
successMessage: loc.recipientDeletedSuccessfully, successMessage: loc.recipientDeletedSuccessfully,
errorMessage: loc.errorDeleteRecipient, errorMessage: loc.errorDeleteRecipient,
), );
},
), ),
); );
}, },

View File

@@ -346,6 +346,10 @@
"@deletePaymentConfirmation": { "@deletePaymentConfirmation": {
"description": "Confirmation dialog message shown before a payment method is removed" "description": "Confirmation dialog message shown before a payment method is removed"
}, },
"deleteRecipientConfirmation": "Are you sure you want to delete this recipient?",
"@deleteRecipientConfirmation": {
"description": "Confirmation dialog message shown before a recipient is removed"
},
"edit": "Edit", "edit": "Edit",
"@edit": { "@edit": {

View File

@@ -346,6 +346,10 @@
"@deletePaymentConfirmation": { "@deletePaymentConfirmation": {
"description": "Сообщение диалога подтверждения, показываемое перед удалением способа оплаты" "description": "Сообщение диалога подтверждения, показываемое перед удалением способа оплаты"
}, },
"deleteRecipientConfirmation": "Вы уверены, что хотите удалить получателя?",
"@deleteRecipientConfirmation": {
"description": "Сообщение диалога подтверждения, показываемое перед удалением получателя"
},
"edit": "Редактировать", "edit": "Редактировать",
"@edit": { "@edit": {