From 29bc05244f1ceb75ee6d325281397deef7fbcc35 Mon Sep 17 00:00:00 2001 From: Divyesh Shinde Date: Thu, 16 Jan 2025 16:28:58 +0530 Subject: [PATCH] NTP-24902 | Divyesh | bbps mobile number spacing fix (#14550) --- .../details/ui/bbps/BbpsOrderDetailsSummarySection.kt | 6 +++++- .../navi/pay/tstore/details/ui/bbps/OrderBbpsUtils.kt | 10 ++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/android/navi-pay/src/main/kotlin/com/navi/pay/tstore/details/ui/bbps/BbpsOrderDetailsSummarySection.kt b/android/navi-pay/src/main/kotlin/com/navi/pay/tstore/details/ui/bbps/BbpsOrderDetailsSummarySection.kt index bf8b9c0d09..feb5691cc3 100644 --- a/android/navi-pay/src/main/kotlin/com/navi/pay/tstore/details/ui/bbps/BbpsOrderDetailsSummarySection.kt +++ b/android/navi-pay/src/main/kotlin/com/navi/pay/tstore/details/ui/bbps/BbpsOrderDetailsSummarySection.kt @@ -251,7 +251,11 @@ private fun BillDetailsSection(bbpsTransactionDetailsMetadata: BbpsTransactionDe Spacer(modifier = Modifier.width(8.dp)) NaviText( modifier = Modifier.weight(1f, fill = false), - text = bbpsTransactionDetailsMetadata?.primaryCustomerParamKey.orEmpty(), + text = + OrderBbpsUtils.getDisplayableCustomerParamKey( + primaryCustomerParamKey = + bbpsTransactionDetailsMetadata?.primaryCustomerParamKey.orEmpty() + ), fontFamily = naviFontFamily, fontWeight = getFontWeight(FontWeightEnum.NAVI_BODY_REGULAR), fontSize = 14.sp, diff --git a/android/navi-pay/src/main/kotlin/com/navi/pay/tstore/details/ui/bbps/OrderBbpsUtils.kt b/android/navi-pay/src/main/kotlin/com/navi/pay/tstore/details/ui/bbps/OrderBbpsUtils.kt index eb9bf360d1..b8ea1efe1e 100644 --- a/android/navi-pay/src/main/kotlin/com/navi/pay/tstore/details/ui/bbps/OrderBbpsUtils.kt +++ b/android/navi-pay/src/main/kotlin/com/navi/pay/tstore/details/ui/bbps/OrderBbpsUtils.kt @@ -25,6 +25,8 @@ object OrderBbpsUtils { private const val CATEGORY_ID_CABLE = "CABLE" private const val CATEGORY_ID_DTH = "DTH" private const val CATEGORY_ID_MOBILE_PREPAID = "MOBILE-PREPAID" + private const val CUSTOMER_PARAM_KEY_MOBILE_NUMBER = "MobileNumber" + private const val DISPLAYABLE_CUSTOMER_PARAM_KEY_MOBILE_NUMBER = "Mobile Number" fun isRechargeCategory(categoryId: String): Boolean { return categoryId in @@ -36,6 +38,14 @@ object OrderBbpsUtils { ) } + fun getDisplayableCustomerParamKey(primaryCustomerParamKey: String): String { + if (primaryCustomerParamKey == CUSTOMER_PARAM_KEY_MOBILE_NUMBER) { + return DISPLAYABLE_CUSTOMER_PARAM_KEY_MOBILE_NUMBER + } else { + return primaryCustomerParamKey + } + } + fun prepareRefundStatusWidgetProperties( orderEntity: OrderEntity?, resourceProvider: ResourceProvider,