Only showing account selection box if there are any SEPA accounts
This commit is contained in:
parent
c89220bc0c
commit
5d00bbf77e
|
@ -101,32 +101,34 @@ fun CreateEpcQrCodeScreen(onClosed: () -> Unit) {
|
|||
}
|
||||
|
||||
|
||||
Select(
|
||||
"Für Konto",
|
||||
accountsWithIban,
|
||||
selectedAccount,
|
||||
{ account ->
|
||||
selectedAccount = account
|
||||
if (accountsWithIban.size > 1) {
|
||||
Select(
|
||||
"Für Konto",
|
||||
accountsWithIban,
|
||||
selectedAccount,
|
||||
{ account ->
|
||||
selectedAccount = account
|
||||
|
||||
if (account != null) {
|
||||
iban = account.iban ?: ""
|
||||
bic = banks.firstOrNull { it.id == selectedAccount?.bankId }?.bic ?: ""
|
||||
receiverName = account.accountHolderName
|
||||
if (account != null) {
|
||||
iban = account.iban ?: ""
|
||||
bic = banks.firstOrNull { it.id == selectedAccount?.bankId }?.bic ?: ""
|
||||
receiverName = account.accountHolderName
|
||||
|
||||
amountFocus.requestFocus()
|
||||
}
|
||||
},
|
||||
{ account -> account?.displayName ?: "" },
|
||||
leadingIcon = bankOfSelectedAccount?.let { { BankIcon(bankOfSelectedAccount) } },
|
||||
dropDownItemContent = { account ->
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
BankIcon(banks.firstOrNull { it.id == account?.bankId }, Modifier.padding(end = 6.dp))
|
||||
amountFocus.requestFocus()
|
||||
}
|
||||
},
|
||||
{ account -> account?.displayName ?: "" },
|
||||
leadingIcon = bankOfSelectedAccount?.let { { BankIcon(bankOfSelectedAccount) } },
|
||||
dropDownItemContent = { account ->
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
BankIcon(banks.firstOrNull { it.id == account?.bankId }, Modifier.padding(end = 6.dp))
|
||||
|
||||
Text(account?.displayName ?: "")
|
||||
}
|
||||
},
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 16.dp, bottom = 8.dp)
|
||||
)
|
||||
Text(account?.displayName ?: "")
|
||||
}
|
||||
},
|
||||
modifier = Modifier.fillMaxWidth().padding(top = 16.dp, bottom = 8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
OutlinedTextField(
|
||||
label = { Text("Empfänger*in") },
|
||||
|
|
Loading…
Reference in New Issue