Compare commits
No commits in common. "48add553800290333a827d793041118790e3fe93" and "665bf1d5dfd0e0b59beaa257a942ba3ebbf91377" have entirely different histories.
48add55380
...
665bf1d5df
@ -43,8 +43,8 @@ android {
|
||||
dimension = "env"
|
||||
applicationIdSuffix = ".uat"
|
||||
versionNameSuffix = "-UAT"
|
||||
versionCode = 10
|
||||
versionName = "2.8"
|
||||
versionCode = 3
|
||||
versionName = "2.1"
|
||||
buildConfigField("String", "ENV", "\"UAT\"")
|
||||
resValue("string", "app_name", "MOB-UAT")
|
||||
}
|
||||
|
||||
@ -29,8 +29,6 @@
|
||||
<application
|
||||
android:name="com.mob.utsmyanmar.MyApplication"
|
||||
android:allowBackup="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
|
||||
@ -39,6 +39,7 @@ import androidx.compose.ui.focus.FocusRequester
|
||||
import androidx.compose.ui.focus.focusRequester
|
||||
import androidx.compose.ui.platform.LocalFocusManager
|
||||
import androidx.compose.ui.text.TextRange
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.KeyboardType
|
||||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
@ -232,7 +233,8 @@ private fun ManualCardEntryScreen(
|
||||
singleLine = true,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
textStyle = MaterialTheme.typography.bodyLarge.copy(
|
||||
letterSpacing = 2.sp
|
||||
letterSpacing = 2.sp,
|
||||
fontFamily = FontFamily.Monospace
|
||||
)
|
||||
)
|
||||
|
||||
@ -261,7 +263,8 @@ private fun ManualCardEntryScreen(
|
||||
.width(160.dp)
|
||||
.focusRequester(expiryFocusRequester),
|
||||
textStyle = MaterialTheme.typography.bodyLarge.copy(
|
||||
letterSpacing = 2.sp
|
||||
letterSpacing = 2.sp,
|
||||
fontFamily = FontFamily.Monospace
|
||||
)
|
||||
)
|
||||
}
|
||||
@ -281,6 +284,7 @@ private fun ManualCardEntryScreen(
|
||||
Text(
|
||||
text = "**** **** **** ${pan.takeLast(4)}",
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
fontFamily = FontFamily.Monospace,
|
||||
letterSpacing = 1.5.sp
|
||||
)
|
||||
if (expiry.length == 4) {
|
||||
|
||||
@ -35,7 +35,6 @@ import com.mob.utsmyanmar.ui.processing_card.ProcessingCardRoute
|
||||
import com.mob.utsmyanmar.ui.processing_card.ProcessingCardViewModel
|
||||
import com.mob.utsmyanmar.ui.refund_rrn.InputRrnRoute
|
||||
import com.mob.utsmyanmar.ui.refund_rrn.RRNViewModel
|
||||
import com.mob.utsmyanmar.ui.history_functions.prepareReprintPayDetail
|
||||
import com.mob.utsmyanmar.ui.sale_void.TranDetailPage
|
||||
import com.mob.utsmyanmar.ui.sale_void.VoidTraceScreen
|
||||
import com.mob.utsmyanmar.ui.sale_void.VoidViewModel
|
||||
@ -56,7 +55,6 @@ import com.mob.utsmyanmar.viewmodel.EmvTransactionProcessViewModel
|
||||
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
||||
import com.mob.utsmyanmar.viewmodel.TransProcessViewModel
|
||||
import com.utsmyanmar.paylibs.model.TradeData
|
||||
import com.utsmyanmar.paylibs.utils.enums.TransMenu
|
||||
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.N)
|
||||
@ -134,9 +132,7 @@ fun AppNavGraph(
|
||||
},
|
||||
onNavigateRecentTransaction = { record ->
|
||||
recentPayDetails.firstOrNull { it.PID == record.pid }?.let { payDetail ->
|
||||
sharedViewModel.setTransMenu(TransMenu.REPRINT)
|
||||
sharedViewModel.isReprint.value = true
|
||||
sharedViewModel.payDetail.value = prepareReprintPayDetail(payDetail)
|
||||
sharedViewModel.payDetail.value = payDetail
|
||||
transResultViewModel.onEvent(
|
||||
TransactionResultEvent.Start,
|
||||
sharedViewModel
|
||||
|
||||
@ -26,6 +26,7 @@ import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.graphics.graphicsLayer
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
@ -177,12 +178,12 @@ fun ReceiptPreview(
|
||||
) {
|
||||
Text(
|
||||
text = "MOB POS",
|
||||
style = MaterialTheme.typography.headlineLarge
|
||||
style = MaterialTheme.typography.headlineLarge.copy(fontFamily = FontFamily.Monospace)
|
||||
)
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = "Transaction Receipt",
|
||||
style = MaterialTheme.typography.bodyMedium
|
||||
style = MaterialTheme.typography.bodyMedium.copy(fontFamily = FontFamily.Monospace)
|
||||
)
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
ReceiptDivider()
|
||||
@ -201,14 +202,14 @@ fun ReceiptPreview(
|
||||
Spacer(modifier = Modifier.height(8.dp))
|
||||
Text(
|
||||
text = "Thank You",
|
||||
style = MaterialTheme.typography.titleMedium
|
||||
style = MaterialTheme.typography.titleMedium.copy(fontFamily = FontFamily.Monospace)
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
|
||||
Text(
|
||||
text = "Please keep this receipt",
|
||||
style = MaterialTheme.typography.bodySmall
|
||||
style = MaterialTheme.typography.bodySmall.copy(fontFamily = FontFamily.Monospace)
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -226,13 +227,13 @@ fun ReceiptRow(
|
||||
) {
|
||||
Text(
|
||||
text = label,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
style = MaterialTheme.typography.bodyMedium.copy(fontFamily = FontFamily.Monospace),
|
||||
color = Color.Gray
|
||||
)
|
||||
|
||||
Text(
|
||||
text = value,
|
||||
style = MaterialTheme.typography.titleSmall
|
||||
style = MaterialTheme.typography.titleSmall.copy(fontFamily = FontFamily.Monospace)
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -244,6 +245,7 @@ fun ReceiptDivider() {
|
||||
.fillMaxWidth()
|
||||
.padding(vertical = 10.dp),
|
||||
text = "--------------------------------",
|
||||
fontFamily = FontFamily.Monospace,
|
||||
color = Color.Gray
|
||||
)
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@ import com.mob.utsmyanmar.model.TransactionStatus
|
||||
import com.mob.utsmyanmar.ui.settlement.SettlementViewModel
|
||||
import com.mob.utsmyanmar.viewmodel.SharedViewModel
|
||||
import com.mob.utsmyanmar.viewmodel.TransProcessViewModel
|
||||
import com.utsmyanmar.paylibs.model.enums.TransCVM
|
||||
import com.utsmyanmar.paylibs.utils.iso_utils.TransactionsType
|
||||
|
||||
private const val MOCK_HOST_DELAY_MS = 2000L
|
||||
@ -83,6 +84,6 @@ fun ProcessingRoute(
|
||||
}
|
||||
|
||||
private fun requiresSignature(payDetail: com.utsmyanmar.paylibs.model.PayDetail?): Boolean {
|
||||
// return payDetail?.transCVM == TransCVM.SIGNATURE && payDetail.isFreeSign == false
|
||||
return true;
|
||||
return payDetail?.transCVM == TransCVM.SIGNATURE && !payDetail.isFreeSign
|
||||
// return true;
|
||||
}
|
||||
|
||||
@ -53,11 +53,12 @@ fun SignaturePad(
|
||||
modifier: Modifier = Modifier,
|
||||
signatureColor: Color = Color.Black,
|
||||
onBack: () -> Unit = {},
|
||||
// signatureBlob is null for Digital mode (using stored signature) or when nothing was drawn
|
||||
onConfirm: (SignatureMode, Bitmap?, signatureBlob: ByteArray?) -> Unit = { _, _, _ -> }
|
||||
) {
|
||||
val paths = remember { mutableStateListOf<List<Offset>>() }
|
||||
val currentPath = remember { mutableStateListOf<Offset>() }
|
||||
var selectedMode by remember { mutableStateOf(SignatureMode.Digital) }
|
||||
var selectedMode by remember { mutableStateOf(SignatureMode.Manual) }
|
||||
var canvasSize by remember { mutableStateOf(Size.Zero) }
|
||||
var strokeWidth = 6f
|
||||
|
||||
@ -66,15 +67,16 @@ fun SignaturePad(
|
||||
currentPath.clear()
|
||||
}
|
||||
|
||||
|
||||
fun buildBitmap(): Bitmap? {
|
||||
if (selectedMode == SignatureMode.Manual) return null
|
||||
if (selectedMode == SignatureMode.Digital) return null
|
||||
if (paths.isEmpty() && currentPath.isEmpty()) return null
|
||||
if (canvasSize.width <= 0f || canvasSize.height <= 0f) return null
|
||||
|
||||
val bitmap =
|
||||
createBitmap(canvasSize.width.toInt(), canvasSize.height.toInt(), Bitmap.Config.RGB_565)
|
||||
val canvas = AndroidCanvas(bitmap)
|
||||
canvas.drawColor(android.graphics.Color.WHITE)
|
||||
canvas.drawColor(android.graphics.Color.WHITE) // fill white background first
|
||||
|
||||
val paint = Paint().apply {
|
||||
color = android.graphics.Color.BLACK
|
||||
@ -127,23 +129,15 @@ fun SignaturePad(
|
||||
) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth(0.85f)
|
||||
.height(180.dp)
|
||||
.fillMaxWidth(0.85f) // narrower than full width, adjust as needed
|
||||
.height(180.dp) // fixed height instead of weight(1f)
|
||||
.align(Alignment.CenterHorizontally)
|
||||
.background(
|
||||
color = if (selectedMode == SignatureMode.Digital) {
|
||||
Color.White
|
||||
} else {
|
||||
Color.White.copy(alpha = 0.55f)
|
||||
},
|
||||
shape = RoundedCornerShape(16.dp)
|
||||
)
|
||||
.background(Color.White, RoundedCornerShape(16.dp))
|
||||
.padding(12.dp)
|
||||
.onSizeChanged { size ->
|
||||
canvasSize = Size(size.width.toFloat(), size.height.toFloat())
|
||||
}
|
||||
.pointerInput(selectedMode) {
|
||||
if (selectedMode == SignatureMode.Manual) return@pointerInput
|
||||
.pointerInput(Unit) {
|
||||
detectDragGestures(
|
||||
onDragStart = { startOffset ->
|
||||
currentPath.add(startOffset)
|
||||
@ -199,7 +193,7 @@ fun SignaturePad(
|
||||
) {
|
||||
SignatureModeOption(
|
||||
title = "Manual Sign",
|
||||
subtitle = "Signature on Paper",
|
||||
subtitle = "Customer signs on screen",
|
||||
selected = selectedMode == SignatureMode.Manual,
|
||||
onClick = { selectedMode = SignatureMode.Manual },
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
@ -209,7 +203,7 @@ fun SignaturePad(
|
||||
|
||||
SignatureModeOption(
|
||||
title = "Digital Sign",
|
||||
subtitle = "Draw on pad",
|
||||
subtitle = "Use stored signature",
|
||||
selected = selectedMode == SignatureMode.Digital,
|
||||
onClick = { selectedMode = SignatureMode.Digital },
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
@ -232,6 +226,10 @@ fun SignaturePad(
|
||||
Button(
|
||||
onClick = {
|
||||
val bitmap = buildBitmap()
|
||||
if (selectedMode == SignatureMode.Manual && bitmap == null) {
|
||||
// nothing drawn yet on Manual mode — block confirm
|
||||
return@Button
|
||||
}
|
||||
val signatureBlob = bitmap?.let { bitmapToBlob(it) }
|
||||
onConfirm(selectedMode, bitmap, signatureBlob)
|
||||
},
|
||||
@ -299,4 +297,4 @@ fun SignaturePadPreview() {
|
||||
MOBPOSTheme {
|
||||
SignaturePad()
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,96 +1,77 @@
|
||||
package com.mob.utsmyanmar.ui.theme
|
||||
|
||||
import androidx.compose.ui.text.font.Font
|
||||
import androidx.compose.material3.Typography
|
||||
import androidx.compose.ui.text.TextStyle
|
||||
import androidx.compose.ui.text.font.FontFamily
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.mob.utsmyanmar.R
|
||||
|
||||
private val LibreBaskerville = FontFamily(
|
||||
Font(R.font.libre_baskerville_regular, FontWeight.Normal)
|
||||
)
|
||||
|
||||
val Typography = Typography(
|
||||
displayLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 32.sp,
|
||||
lineHeight = 40.sp,
|
||||
),
|
||||
displayMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 30.sp,
|
||||
lineHeight = 38.sp,
|
||||
),
|
||||
headlineLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 24.sp,
|
||||
lineHeight = 32.sp,
|
||||
),
|
||||
headlineMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Bold,
|
||||
fontSize = 20.sp,
|
||||
lineHeight = 28.sp,
|
||||
),
|
||||
titleLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
fontSize = 22.sp,
|
||||
lineHeight = 28.sp,
|
||||
),
|
||||
titleMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.SemiBold,
|
||||
fontSize = 18.sp,
|
||||
lineHeight = 26.sp,
|
||||
),
|
||||
titleSmall = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
),
|
||||
bodyLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 16.sp,
|
||||
lineHeight = 24.sp,
|
||||
letterSpacing = 0.5.sp
|
||||
),
|
||||
bodyMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
),
|
||||
bodySmall = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Normal,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
),
|
||||
labelLarge = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 14.sp,
|
||||
lineHeight = 20.sp,
|
||||
),
|
||||
labelMedium = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 12.sp,
|
||||
lineHeight = 16.sp,
|
||||
),
|
||||
labelSmall = TextStyle(
|
||||
fontFamily = LibreBaskerville,
|
||||
fontWeight = FontWeight.Medium,
|
||||
fontSize = 11.sp,
|
||||
lineHeight = 16.sp,
|
||||
letterSpacing = 0.5.sp
|
||||
)
|
||||
)
|
||||
)
|
||||
Binary file not shown.
@ -1,7 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.MOBPOS" parent="android:style/Theme.Material.Light.NoActionBar">
|
||||
<item name="fontFamily">@font/libre_baskerville_regular</item>
|
||||
<item name="android:fontFamily">@font/libre_baskerville_regular</item>
|
||||
</style>
|
||||
<style name="Theme.MOBPOS" parent="android:style/Theme.Material.Light.NoActionBar"/>
|
||||
</resources>
|
||||
@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<network-security-config>
|
||||
|
||||
<domain-config cleartextTrafficPermitted="true">
|
||||
<domain includeSubdomains="true">posuat.myanmarorientalbank.com:5033</domain>
|
||||
</domain-config>
|
||||
|
||||
</network-security-config>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -50,7 +50,7 @@ public abstract class BaseXPrint {
|
||||
|
||||
protected String currentTime;
|
||||
|
||||
protected static final String typeface_name = "jetBrainsMonoRegular.ttf";
|
||||
protected static final String typeface_name = "jbm_semibold.ttf";
|
||||
protected static final String MPU_AID = "A0000004820000000001";
|
||||
|
||||
protected static final String HOST_NAME_VM = "VISA/ MASTERCARD";
|
||||
|
||||
@ -38,7 +38,7 @@ public class SystemParamsSettings implements Serializable {
|
||||
|
||||
private boolean checkExpSwitch = false;
|
||||
|
||||
// private String tmsAddress = "http://posuat.myanmarorientalbank.com:5033/api/v1";
|
||||
// private String tmsAddress = "http://posuat.myanmarorientalbank.com:5033";
|
||||
private String tmsAddress = "https://sirius-nest.utsmyanmar.com/api/v1";
|
||||
// private String tmsAddress = "http://128.199.170.203";
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user