diff --git a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt index 717449f..f280cb1 100644 --- a/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt +++ b/composeApp/src/commonMain/kotlin/net/codinux/banking/ui/dialogs/EnterTanDialog.kt @@ -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) {