From fda744be8a9c46480f517ada93aa08acf4037080 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 25 May 2020 19:13:42 +0200 Subject: [PATCH] Implemented displaying error message if account transactions couldn't be retrieved --- ui/BankingJavaFxApp/src/main/resources/Messages.properties | 1 + .../src/main/resources/Messages_de.properties | 1 + .../banking/ui/javafx/controls/AccountTransactionsView.kt | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/ui/BankingJavaFxApp/src/main/resources/Messages.properties b/ui/BankingJavaFxApp/src/main/resources/Messages.properties index 5d1ef885..3ffcbe0f 100755 --- a/ui/BankingJavaFxApp/src/main/resources/Messages.properties +++ b/ui/BankingJavaFxApp/src/main/resources/Messages.properties @@ -24,6 +24,7 @@ accounts.view.ask.really.delete.account=Really delete account \'%s\'?\r\n\r\nThi account.transactions.control.view.search.label=Find: account.transactions.control.view.balance.label=Balance: +account.transactions.control.view.could.not.retrieve.account.transactions=Could not retrieve account transactions for \'%1$s\'.\n\nError message from your bank:\n\n%2$s account.transactions.table.column.header.value.date=Value date account.transactions.table.column.header.usage=Usage diff --git a/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties b/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties index 627f2de4..e7b4dc45 100755 --- a/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties +++ b/ui/BankingJavaFxApp/src/main/resources/Messages_de.properties @@ -24,6 +24,7 @@ accounts.view.ask.really.delete.account=Möchten Sie das Konto \'%s\' wirklich l account.transactions.control.view.search.label=Suchen: account.transactions.control.view.balance.label=Saldo: +account.transactions.control.view.could.not.retrieve.account.transactions=Kontoumsätze für \'%1$s\' konnten nicht empfangen werden.\n\nFehlermeldung Ihrer Bank:\n\n%2$s account.transactions.table.column.header.value.date=Buchungstag account.transactions.table.column.header.usage=Verwendungszweck diff --git a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsView.kt b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsView.kt index 0b4c2a42..bdc4009c 100644 --- a/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsView.kt +++ b/ui/BankingJavaFxControls/src/main/kotlin/net/dankito/banking/ui/javafx/controls/AccountTransactionsView.kt @@ -7,6 +7,7 @@ import javafx.scene.control.ContextMenu import javafx.scene.input.ContextMenuEvent import javafx.scene.input.MouseButton import javafx.scene.input.MouseEvent +import net.dankito.banking.ui.javafx.dialogs.JavaFxDialogService import net.dankito.banking.ui.model.AccountTransaction import net.dankito.banking.ui.model.BankAccount import net.dankito.banking.ui.model.parameters.TransferMoneyData @@ -137,6 +138,11 @@ open class AccountTransactionsView(private val presenter: BankingPresenter) : Vi if (response.isSuccessful) { updateTransactionsToDisplay() } + else if (response.userCancelledAction == false) { // if user cancelled entering TAN then don't show a error message + JavaFxDialogService().showErrorMessageOnUiThread( + String.format(messages["account.transactions.control.view.could.not.retrieve.account.transactions"], response.bankAccount.displayName, response.errorToShowToUser) + ) + } } }