Fixed bug that after updating account balance didn't get updated
This commit is contained in:
parent
fcdf60f596
commit
f1d3052c41
|
@ -11,7 +11,7 @@ struct AccountTransactionsDialog: View {
|
||||||
|
|
||||||
private let allTransactions: [IAccountTransaction]
|
private let allTransactions: [IAccountTransaction]
|
||||||
|
|
||||||
private let balanceOfAllTransactions: CommonBigDecimal
|
@State private var balanceOfAllTransactions: CommonBigDecimal
|
||||||
|
|
||||||
private let areMoreThanOneBanksTransactionsDisplayed: Bool
|
private let areMoreThanOneBanksTransactionsDisplayed: Bool
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ struct AccountTransactionsDialog: View {
|
||||||
self.allTransactions = transactions
|
self.allTransactions = transactions
|
||||||
self._filteredTransactions = State(initialValue: transactions)
|
self._filteredTransactions = State(initialValue: transactions)
|
||||||
|
|
||||||
self.balanceOfAllTransactions = balance
|
self._balanceOfAllTransactions = State(initialValue: balance)
|
||||||
self._balanceOfFilteredTransactions = State(initialValue: balance)
|
self._balanceOfFilteredTransactions = State(initialValue: balance)
|
||||||
|
|
||||||
self.areMoreThanOneBanksTransactionsDisplayed = Set(allTransactions.compactMap { $0.bankAccount }.compactMap { $0.customer as! Customer }).count > 1
|
self.areMoreThanOneBanksTransactionsDisplayed = Set(allTransactions.compactMap { $0.bankAccount }.compactMap { $0.customer as! Customer }).count > 1
|
||||||
|
@ -164,6 +164,8 @@ struct AccountTransactionsDialog: View {
|
||||||
presenter.updateSelectedBankAccountTransactionsAsync { response in
|
presenter.updateSelectedBankAccountTransactionsAsync { response in
|
||||||
executingDone()
|
executingDone()
|
||||||
|
|
||||||
|
self.balanceOfAllTransactions = self.presenter.balanceOfSelectedBankAccounts
|
||||||
|
|
||||||
if response.successful {
|
if response.successful {
|
||||||
self.filterTransactions(self.searchText)
|
self.filterTransactions(self.searchText)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue