diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/SqliteBankingRepository.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/SqliteBankingRepository.kt index 5c5ed4d..396f2b9 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/SqliteBankingRepository.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/SqliteBankingRepository.kt @@ -55,7 +55,7 @@ open class SqliteBankingRepository( } - fun getAllBankAccounts(): List = userQueries.selectAllBankAccounts { id, userId, identifier, subAccountNumber, iban, productName, accountHolderName, type, currency, accountLimit, isAccountTypeSupportedByApplication, features, balance, serverTransactionsRetentionDays, lastTransactionsRetrievalTime, retrievedTransactionsFrom, userSetDisplayName, displayIndex, hideAccount, includeInAutomaticAccountsUpdate -> + fun getAllBankAccounts(): List = userQueries.selectAllBankAccounts { id, userId, identifier, subAccountNumber, iban, productName, accountHolderName, type, currency, accountLimit, isAccountTypeSupportedByApplication, features, balance, serverTransactionsRetentionDays, lastAccountUpdateTime, retrievedTransactionsFrom, userSetDisplayName, displayIndex, hideAccount, includeInAutomaticAccountsUpdate -> BankAccountEntity( id, userId, @@ -69,7 +69,7 @@ open class SqliteBankingRepository( mapToAmount(balance), mapToInt(serverTransactionsRetentionDays), - mapToInstant(lastTransactionsRetrievalTime), mapToDate(retrievedTransactionsFrom), + mapToInstant(lastAccountUpdateTime), mapToDate(retrievedTransactionsFrom), mutableListOf(), mutableListOf(), emptyList(), @@ -94,7 +94,7 @@ open class SqliteBankingRepository( account.isAccountTypeSupportedByApplication, mapEnumCollectionToString(account.features), mapInt(account.serverTransactionsRetentionDays), - mapInstant(account.lastTransactionsRetrievalTime), mapDate(account.retrievedTransactionsFrom), + mapInstant(account.lastAccountUpdateTime), mapDate(account.retrievedTransactionsFrom), account.userSetDisplayName, mapInt(account.displayIndex), account.hideAccount, account.includeInAutomaticAccountsUpdate diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/entities/BankAccountEntity.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/entities/BankAccountEntity.kt index 08ebbd6..f855efc 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/entities/BankAccountEntity.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/dataaccess/entities/BankAccountEntity.kt @@ -25,7 +25,7 @@ class BankAccountEntity( balance: Amount = Amount.Zero, // TODO: add a BigDecimal library serverTransactionsRetentionDays: Int? = null, - lastTransactionsRetrievalTime: Instant? = null, + lastAccountUpdateTime: Instant? = null, retrievedTransactionsFrom: LocalDate? = null, bookedTransactions: MutableList = mutableListOf(), @@ -46,7 +46,7 @@ class BankAccountEntity( balance, - serverTransactionsRetentionDays, lastTransactionsRetrievalTime, retrievedTransactionsFrom, + serverTransactionsRetentionDays, lastAccountUpdateTime, retrievedTransactionsFrom, bookedTransactions as MutableList, prebookedTransactions, holdings, @@ -66,7 +66,7 @@ class BankAccountEntity( account.balance, account.serverTransactionsRetentionDays, - account.lastTransactionsRetrievalTime, account.retrievedTransactionsFrom, + account.lastAccountUpdateTime, account.retrievedTransactionsFrom, transactions.toMutableList(), mutableListOf(), holdings, diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/BankingService.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/BankingService.kt index 6a5e53d..eb29c39 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/BankingService.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/BankingService.kt @@ -5,6 +5,7 @@ import kotlinx.coroutines.* import kotlinx.datetime.LocalDate import net.codinux.banking.client.SimpleBankingClientCallback import net.codinux.banking.client.fints4k.FinTs4kBankingClient +import net.codinux.banking.client.fints4k.FinTsClientOptions import net.codinux.banking.client.model.* import net.codinux.banking.client.model.options.GetAccountDataOptions import net.codinux.banking.client.model.options.RetrieveTransactions @@ -17,8 +18,6 @@ import net.codinux.banking.dataaccess.BankingRepository import net.codinux.banking.dataaccess.entities.AccountTransactionEntity import net.codinux.banking.dataaccess.entities.BankAccountEntity import net.codinux.banking.dataaccess.entities.UserEntity -import net.codinux.banking.fints.config.FinTsClientConfiguration -import net.codinux.banking.fints.config.FinTsClientOptions import net.codinux.banking.ui.IOorDefault import net.codinux.banking.ui.model.AccountTransactionViewModel import net.codinux.banking.ui.model.BankInfo @@ -37,7 +36,7 @@ class BankingService( private val bankFinder: BankFinder ) { - private val client = FinTs4kBankingClient(FinTsClientConfiguration(FinTsClientOptions(true)), SimpleBankingClientCallback { tanChallenge, callback -> + private val client = FinTs4kBankingClient(FinTsClientOptions(true, closeDialogs = false), SimpleBankingClientCallback { tanChallenge, callback -> uiState.receivedTanChallenge(tanChallenge, callback) }) diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/TransactionsGroupingService.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/TransactionsGroupingService.kt index 1b10542..196c95a 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/TransactionsGroupingService.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/service/TransactionsGroupingService.kt @@ -3,7 +3,7 @@ package net.codinux.banking.ui.service import kotlinx.datetime.DayOfWeek import kotlinx.datetime.LocalDate import kotlinx.datetime.Month -import net.codinux.banking.fints.extensions.minusDays +import net.codinux.banking.client.model.extensions.minusDays import net.codinux.banking.ui.model.AccountTransactionViewModel import net.codinux.banking.ui.model.TransactionsGrouping