Using now new TanMedium.displayName property
This commit is contained in:
parent
d3d90d4737
commit
ea34567354
|
@ -121,12 +121,12 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
|
||||||
Row(Modifier.padding(top = 16.dp)) {
|
Row(Modifier.padding(top = 16.dp)) {
|
||||||
ExposedDropdownMenuBox(showTanMediaDropDownMenu, { isExpanded -> showTanMediaDropDownMenu = isExpanded }, Modifier.fillMaxWidth()) {
|
ExposedDropdownMenuBox(showTanMediaDropDownMenu, { isExpanded -> showTanMediaDropDownMenu = isExpanded }, Modifier.fillMaxWidth()) {
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = challenge.selectedTanMedium?.let { getTanMediumDisplayName(it) } ?: "<Keines ausgewählt>",
|
value = challenge.selectedTanMedium?.let { it.displayName } ?: "<Keines ausgewählt>",
|
||||||
onValueChange = { Log.info { "TanMedia value changed: $it" }},
|
onValueChange = { Log.info { "TanMedia value changed: $it" }},
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier.fillMaxWidth(),
|
||||||
label = { Text("TAN Medium") },
|
label = { Text("TAN Medium") },
|
||||||
readOnly = true,
|
readOnly = true,
|
||||||
trailingIcon = { Icon(Icons.Filled.ArrowDropDown, "Alle TAN Verfahren anzeigen") }
|
trailingIcon = { Icon(Icons.Filled.ArrowDropDown, "Alle TAN Medien anzeigen") }
|
||||||
)
|
)
|
||||||
|
|
||||||
ExposedDropdownMenu(showTanMediaDropDownMenu, { showTanMediaDropDownMenu = false }) {
|
ExposedDropdownMenu(showTanMediaDropDownMenu, { showTanMediaDropDownMenu = false }) {
|
||||||
|
@ -138,7 +138,7 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
|
||||||
// TODO: change TanMethod
|
// TODO: change TanMethod
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
Text(getTanMediumDisplayName(tanMedium))
|
Text(tanMedium.displayName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -211,15 +211,3 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getTanMediumDisplayName(tanMedium: net.codinux.banking.client.model.tan.TanMedium): String {
|
|
||||||
tanMedium.tanGenerator?.let { tanGenerator ->
|
|
||||||
return "${tanMedium.mediumName} ${tanGenerator.cardNumber}"
|
|
||||||
}
|
|
||||||
|
|
||||||
tanMedium.mobilePhone?.let { mobilePhone ->
|
|
||||||
return "${tanMedium.mediumName} ${mobilePhone.concealedPhoneNumber ?: mobilePhone.phoneNumber}"
|
|
||||||
}
|
|
||||||
|
|
||||||
return tanMedium.mediumName ?: ""
|
|
||||||
}
|
|
Loading…
Reference in New Issue