If tanExpirationTime is set, displaying TAN expiration time

This commit is contained in:
dankito 2024-09-09 03:16:36 +02:00
parent 34b77f862c
commit 004ca65fca
1 changed files with 10 additions and 0 deletions

View File

@ -16,6 +16,8 @@ import androidx.compose.ui.unit.dp
import bankmeister.composeapp.generated.resources.Res
import bankmeister.composeapp.generated.resources.zoom_in
import bankmeister.composeapp.generated.resources.zoom_out
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toLocalDateTime
import net.codinux.banking.client.model.tan.AllowedTanFormat
import net.codinux.banking.client.model.tan.EnterTanResult
import net.codinux.banking.ui.composables.BankIcon
@ -145,6 +147,14 @@ fun EnterTanDialog(tanChallengeReceived: TanChallengeReceived, onDismiss: () ->
Text(challenge.messageToShowToUser)
}
challenge.tanExpirationTime?.let { expirationTime ->
Row(Modifier.padding(top = 16.dp)) {
val time = expirationTime.toLocalDateTime(TimeZone.currentSystemDefault()).time
Text("TAN ist gültig bis:", Modifier.padding(end = 6.dp))
Text("${time.hour.toString().padStart(2, '0')}:${time.minute.toString().padStart(2, '0')}${time.second.toString().padStart(2, '0')}")
}
}
Column(Modifier.fillMaxWidth().padding(top = 16.dp)) {
if (isNotADecoupledTanMethod) {