back in input amount

This commit is contained in:
moon 2026-06-15 11:22:22 +06:30
parent 669efd87c0
commit efad1b4e14
2 changed files with 21 additions and 20 deletions

View File

@ -12,6 +12,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material.icons.Icons import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.rounded.ArrowBack
import androidx.compose.material.icons.rounded.Backspace import androidx.compose.material.icons.rounded.Backspace
import androidx.compose.material3.Button import androidx.compose.material3.Button
import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.ButtonDefaults
@ -55,7 +56,7 @@ fun InputAmount(
val supportingText = "Enter the amount to continue" val supportingText = "Enter the amount to continue"
Scaffold( Scaffold(
topBar = { AppBar(title = "Amount") }, topBar = { AppBar(title = "Amount", icon = Icons.AutoMirrored.Rounded.ArrowBack, onIconClick = onBackClick) },
containerColor = Color.IvoryBeige containerColor = Color.IvoryBeige
) {paddingValues -> ) {paddingValues ->
@ -162,7 +163,7 @@ fun InputAmount(
horizontalArrangement = Arrangement.spacedBy(12.dp) horizontalArrangement = Arrangement.spacedBy(12.dp)
) { ) {
Button( Button(
onClick = {}, onClick = onBackClick,
modifier = Modifier modifier = Modifier
.weight(1f) .weight(1f)
.height(56.dp), .height(56.dp),

View File

@ -91,47 +91,47 @@ class TMSSetupsImpl : TMSSetups {
siriusResponse.address.takeIf { it.isNotEmpty() }?.let { ops.merchantAddress = it } siriusResponse.address.takeIf { it.isNotEmpty() }?.let { ops.merchantAddress = it }
//host //host
if (siriusHosts.isNotEmpty()) { if (!siriusHosts.isNullOrEmpty()) {
for (host in siriusHosts) { for (host in siriusHosts) {
val isMMQR = listOf(host.name, host.description).any { val isMMQR = listOf(host.name, host.description).any {
it.lowercase().run { contains("mmqr") } it?.lowercase()?.contains("mmqr") == true
} }
if (isMMQR) { if (isMMQR) {
ops.secHostName = host.name ops.secHostName = host.name.orEmpty()
ops.secHostTerminalId = host.tid ops.secHostTerminalId = host.tid.orEmpty()
ops.secHostMerchantId = host.mid ops.secHostMerchantId = host.mid.orEmpty()
host.secondaryIP.trim().let { ip -> host.secondaryIP?.trim()?.let { ip ->
ops.secHostIpAddress = if (ip.contains(":")) "$ip/" else "" ops.secHostIpAddress = if (ip.contains(":")) "$ip/" else ""
} }
host.currency.takeIf { it.isNotEmpty() }?.let { host.currency?.takeIf { it.isNotEmpty() }?.let {
ops.secHostCurrency = currencyTextToCode(it) ops.secHostCurrency = currencyTextToCode(it)
} }
if (host.tid.isEmpty()) ops.secHostTerminalId = "" if (host.tid.isNullOrEmpty()) ops.secHostTerminalId = ""
if (host.mid.isEmpty()) ops.secHostTerminalId = "" if (host.mid.isNullOrEmpty()) ops.secHostTerminalId = ""
} else { } else {
ops.hostName = host.name ops.hostName = host.name.orEmpty()
ops.terminalId = host.tid ops.terminalId = host.tid.orEmpty()
ops.merchantId = host.mid ops.merchantId = host.mid.orEmpty()
host.primaryIP.trim().let { ip -> host.primaryIP?.trim()?.let { ip ->
ops.ipAddress = if (ip.contains(":")) ip else "" ops.ipAddress = if (ip.contains(":")) ip else ""
} }
host.secondaryIP.trim().let { ip -> host.secondaryIP?.trim()?.let { ip ->
ops.secIpAddress = if (ip.contains(":")) ip else "" ops.secIpAddress = if (ip.contains(":")) ip else ""
} }
host.currency.takeIf { it.isNotEmpty() }?.let { host.currency?.takeIf { it.isNotEmpty() }?.let {
ops.currencyType = currencyTextToCurrencyType(it) ops.currencyType = currencyTextToCurrencyType(it)
} }
if (host.tid.isEmpty()) ops.terminalId = "" if (host.tid.isNullOrEmpty()) ops.terminalId = ""
if (host.mid.isEmpty()) ops.merchantId = "" if (host.mid.isNullOrEmpty()) ops.merchantId = ""
} }
} }
} }
//Properties //Properties
for (prop in siriusProperty) { for (prop in siriusProperty.orEmpty()) {
val name = prop.name val name = prop.name
val data = prop.property val data = prop.property