diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/common/utils/BbpsDeeplinkDataConverter.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/common/utils/BbpsDeeplinkDataConverter.kt index 71caaa64ac..2a40fd6c09 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/common/utils/BbpsDeeplinkDataConverter.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/common/utils/BbpsDeeplinkDataConverter.kt @@ -12,6 +12,8 @@ import com.navi.base.utils.EMPTY import com.navi.bbps.common.CATEGORY_ID_MOBILE_POSTPAID import com.navi.bbps.common.CATEGORY_ID_MOBILE_PREPAID import com.navi.bbps.common.DATE_TIME_FORMAT_DATE_MONTH_NAME_YEAR +import com.navi.bbps.common.NAVI_BBPS_INITIAL_SOURCE +import com.navi.bbps.common.NAVI_HOME import com.navi.bbps.common.NaviBbpsScreen import com.navi.bbps.common.utils.NaviBbpsCommonUtils.jsonToMap import com.navi.bbps.common.utils.NaviBbpsCommonUtils.toStringMap @@ -73,7 +75,7 @@ constructor( CustomerParamsExtraData(existingCustomerParams = customerParams), isRootScreen = true, source = NaviBbpsScreen.NAVI_BBPS_BILLER_LIST.name, - initialSource = "", + initialSource = bundle.getString(NAVI_BBPS_INITIAL_SOURCE) ?: NAVI_HOME, ) } @@ -119,7 +121,7 @@ constructor( payBillScreenSource = payBillSource, isRootScreen = true, source = "", - initialSource = "", + initialSource = bundle.getString(NAVI_BBPS_INITIAL_SOURCE) ?: NAVI_HOME, ) } @@ -150,7 +152,7 @@ constructor( phoneNumberDetail = phoneContactEntity, isRootScreen = true, source = "", - initialSource = "", + initialSource = bundle.getString(NAVI_BBPS_INITIAL_SOURCE) ?: NAVI_HOME, ) } diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/entry/NaviBbpsRouter.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/entry/NaviBbpsRouter.kt index fbd2b46653..1a72c98fec 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/entry/NaviBbpsRouter.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/entry/NaviBbpsRouter.kt @@ -13,6 +13,7 @@ import android.os.Bundle import com.navi.base.deeplink.DeepLinkManager import com.navi.base.model.CtaData import com.navi.base.utils.orTrue +import com.navi.bbps.common.NAVI_HOME import com.navi.bbps.common.NaviBbpsScreen import com.navi.bbps.common.SOURCE_MODULE import com.navi.bbps.common.START_SCREEN_NAME @@ -23,7 +24,7 @@ import com.ramcosta.composedestinations.spec.Route object NaviBbpsRouter { fun startNaviBbps( activity: Activity, - sourceModule: String = "NAVI_HOME", + sourceModule: String = NAVI_HOME, ctaData: CtaData = CtaData(), bundle: Bundle = Bundle(), finish: Boolean? = false, diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/billerlist/BillerListViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/billerlist/BillerListViewModel.kt index f0938610fd..69ce297932 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/billerlist/BillerListViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/billerlist/BillerListViewModel.kt @@ -31,6 +31,7 @@ import com.navi.bbps.common.usecase.RewardNudgeUseCase import com.navi.bbps.common.utils.BillDetailsResponseToEntityMapper import com.navi.bbps.common.utils.MyBillEntityToBillDetailsResponseMapper import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getBbpsMetricInfo +import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getNormalisedPhoneNumber import com.navi.bbps.common.utils.getDefaultConfig import com.navi.bbps.common.viewmodel.NaviBbpsBaseVM import com.navi.bbps.feature.billerlist.model.network.BillerGroupItemResponse @@ -143,6 +144,7 @@ constructor( val isDeleteBillInProgress = _isDeleteBillInProgress.asStateFlow() val phoneNumber = BaseUtils.getPhoneNumber().toString() + val normalisedPhoneNumber = getNormalisedPhoneNumber(phoneNumber = phoneNumber) private val _myNumberState = MutableStateFlow( @@ -151,7 +153,8 @@ constructor( PhoneContactEntity( name = phoneNumberDetail?.name ?: MY_NUMBER, phoneNumber = phoneNumberDetail?.phoneNumber ?: phoneNumber, - normalisedPhoneNumber = phoneNumberDetail?.normalisedPhoneNumber ?: phoneNumber, + normalisedPhoneNumber = + phoneNumberDetail?.normalisedPhoneNumber ?: normalisedPhoneNumber, ), ) ) diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/billhistorydetail/BillHistoryDetailsViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/billhistorydetail/BillHistoryDetailsViewModel.kt index 826de8d419..6febdc023f 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/billhistorydetail/BillHistoryDetailsViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/billhistorydetail/BillHistoryDetailsViewModel.kt @@ -34,6 +34,7 @@ import com.navi.bbps.common.repository.BbpsCommonRepository import com.navi.bbps.common.usecase.NaviBbpsConfigUseCase import com.navi.bbps.common.utils.NaviBbpsCommonUtils import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getBbpsMetricInfo +import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getNormalisedPhoneNumber import com.navi.bbps.common.utils.NaviBbpsCommonUtils.isRechargeCategory import com.navi.bbps.common.utils.NaviBbpsDateUtils import com.navi.bbps.common.utils.getDefaultConfig @@ -540,7 +541,10 @@ constructor( PhoneContactEntity( name = myBillEntity.value.billerName, phoneNumber = myBillEntity.value.primaryCustomerParamValue, - normalisedPhoneNumber = myBillEntity.value.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = myBillEntity.value.primaryCustomerParamValue + ), ) if (billCategoryEntity.categoryId == CATEGORY_ID_MOBILE_PREPAID) { @@ -646,7 +650,10 @@ constructor( PhoneContactEntity( name = contactNameForMobileNumber, phoneNumber = myBillEntity.value.primaryCustomerParamValue, - normalisedPhoneNumber = myBillEntity.value.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = myBillEntity.value.primaryCustomerParamValue + ), ), billCategoryEntity = BillCategoryEntity( diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoriesViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoriesViewModel.kt index a204e21bd0..c7556cf857 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoriesViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/category/BillCategoriesViewModel.kt @@ -49,6 +49,7 @@ import com.navi.bbps.common.utils.MyBillEntityToBillCategoryEntityMapper import com.navi.bbps.common.utils.MyBillEntityToBillerDetailsEntityMapper import com.navi.bbps.common.utils.NaviBbpsCommonUtils import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getBbpsMetricInfo +import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getNormalisedPhoneNumber import com.navi.bbps.common.utils.NaviBbpsDateUtils import com.navi.bbps.common.utils.getDefaultConfig import com.navi.bbps.common.utils.getDisplayableAmount @@ -434,7 +435,10 @@ constructor( .get() .getContactNameFromPhoneNumber(myBillEntity.primaryCustomerParamValue), phoneNumber = myBillEntity.primaryCustomerParamValue, - normalisedPhoneNumber = myBillEntity.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = myBillEntity.primaryCustomerParamValue + ), ) val source = NaviBbpsScreen.NAVI_BBPS_BILL_CATEGORIES.name @@ -478,7 +482,10 @@ constructor( .get() .getContactNameFromPhoneNumber(myBillEntity.primaryCustomerParamValue), phoneNumber = myBillEntity.primaryCustomerParamValue, - normalisedPhoneNumber = myBillEntity.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = myBillEntity.primaryCustomerParamValue + ), ) val source = NaviBbpsScreen.NAVI_BBPS_BILL_CATEGORIES.name @@ -543,7 +550,10 @@ constructor( myBillEntity.primaryCustomerParamValue ), phoneNumber = myBillEntity.primaryCustomerParamValue, - normalisedPhoneNumber = myBillEntity.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = myBillEntity.primaryCustomerParamValue + ), ), myBillEntityToBillCategoryEntityMapper.mapMyBillEntityToBillCategoryEntity( myBillEntity diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/common/ui/BbpsRoutingLauncherScreen.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/common/ui/BbpsRoutingLauncherScreen.kt index 89d6be4f67..735ee7fe8b 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/common/ui/BbpsRoutingLauncherScreen.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/common/ui/BbpsRoutingLauncherScreen.kt @@ -22,6 +22,7 @@ import com.navi.bbps.common.BBPS_BILLER_SEARCH_BOX_PLACEHOLDER_TEXT import com.navi.bbps.common.BBPS_CATEGORY_ICON_URL import com.navi.bbps.common.BBPS_CATEGORY_ID import com.navi.bbps.common.BBPS_CATEGORY_TITLE +import com.navi.bbps.common.NAVI_BBPS_INITIAL_SOURCE import com.navi.bbps.common.NAVI_HOME import com.navi.bbps.common.NaviBbpsDimens import com.navi.bbps.common.NaviBbpsScreen @@ -66,7 +67,7 @@ fun BbpsRoutingLauncherScreen( ), isRootScreen = true, source = NAVI_HOME, - initialSource = NAVI_HOME, + initialSource = bundle.getString(NAVI_BBPS_INITIAL_SOURCE) ?: NAVI_HOME, ) } NaviBbpsScreen.NAVI_BBPS_CONTACT_LIST_SCREEN.name -> { @@ -83,14 +84,16 @@ fun BbpsRoutingLauncherScreen( ), isRootScreen = true, source = NAVI_HOME, - initialSource = NAVI_HOME, + initialSource = bundle.getString(NAVI_BBPS_INITIAL_SOURCE) ?: NAVI_HOME, ) } NaviBbpsScreen.NAVI_BBPS_MY_SAVED_BILLS.name -> { MyBillsScreenDestination( isRootScreen = true, source = NAVI_HOME, - initialSource = NaviBbpsScreen.NAVI_BBPS_MY_SAVED_BILLS.name, + initialSource = + bundle.getString(NAVI_BBPS_INITIAL_SOURCE) + ?: NaviBbpsScreen.NAVI_BBPS_MY_SAVED_BILLS.name, ) } NaviBbpsScreen.NAVI_BBPS_PAY_BILL_SCREEN.name -> { @@ -112,7 +115,7 @@ fun BbpsRoutingLauncherScreen( DetectedBillsScreenDestination( isRootScreen = true, source = NAVI_HOME, - initialSource = NAVI_HOME, + initialSource = bundle.getString(NAVI_BBPS_INITIAL_SOURCE) ?: NAVI_HOME, ) } NaviBbpsScreen.NAVI_BBPS_BILL_CATEGORIES_WITH_PARAMS.name -> { @@ -121,10 +124,18 @@ fun BbpsRoutingLauncherScreen( bundle .getString("triggerOriginFromExternalEntry") ?.toBooleanStrictOrNull() - .orFalse() + .orFalse(), + initialSource = + bundle.getString(NAVI_BBPS_INITIAL_SOURCE) + ?: NaviBbpsScreen.NAVI_BBPS_BILL_CATEGORIES_V2.name, ) } - else -> BillCategoriesScreenV2Destination() + else -> + BillCategoriesScreenV2Destination( + initialSource = + bundle.getString(NAVI_BBPS_INITIAL_SOURCE) + ?: NaviBbpsScreen.NAVI_BBPS_BILL_CATEGORIES_V2.name + ) } scope.launch { diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/contactlist/ContactListViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/contactlist/ContactListViewModel.kt index 7c51ed5638..809ff8f535 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/contactlist/ContactListViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/contactlist/ContactListViewModel.kt @@ -270,7 +270,8 @@ constructor( PhoneContactEntity( name = contactManager.getDefaultName(), phoneNumber = searchQuery, - normalisedPhoneNumber = searchQuery, + normalisedPhoneNumber = + getNormalisedPhoneNumber(phoneNumber = searchQuery), ) ) } else { @@ -470,7 +471,7 @@ constructor( return PhoneContactEntity( name = naviResourceProvider.getString(R.string.bbps_my_number), phoneNumber = myPhoneNumber, - normalisedPhoneNumber = myPhoneNumber, + normalisedPhoneNumber = getNormalisedPhoneNumber(phoneNumber = myPhoneNumber), ) } diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/contactlist/ui/RenderContactListScreen.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/contactlist/ui/RenderContactListScreen.kt index 5091a68eab..7d6d08cb6c 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/contactlist/ui/RenderContactListScreen.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/contactlist/ui/RenderContactListScreen.kt @@ -66,6 +66,7 @@ import com.navi.bbps.common.ui.MyNumberCtaView import com.navi.bbps.common.ui.OfferRolodexWithShimmer import com.navi.bbps.common.ui.PermissionTile import com.navi.bbps.common.ui.getOfferDataForMultipleBillItems +import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getNormalisedPhoneNumber import com.navi.bbps.common.utils.getDisplayableAmount import com.navi.bbps.feature.contactlist.ContactListViewModel import com.navi.bbps.feature.contactlist.model.view.ContactListState @@ -308,7 +309,10 @@ fun RecentBillsSection( name = getContactNameFromPhoneNumber(billItem.primaryCustomerParamValue), phoneNumber = billItem.primaryCustomerParamValue, - normalisedPhoneNumber = billItem.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = billItem.primaryCustomerParamValue + ), ) RecentBillItem( myBillEntity = billItem, diff --git a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/mybills/MyBillsViewModel.kt b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/mybills/MyBillsViewModel.kt index d058835f75..9047c59c46 100644 --- a/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/mybills/MyBillsViewModel.kt +++ b/android/navi-bbps/src/main/kotlin/com/navi/bbps/feature/mybills/MyBillsViewModel.kt @@ -46,6 +46,7 @@ import com.navi.bbps.common.utils.MyBillEntityToBillDetailsResponseMapper import com.navi.bbps.common.utils.MyBillEntityToBillerDetailsEntityMapper import com.navi.bbps.common.utils.NaviBbpsCommonUtils import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getBbpsMetricInfo +import com.navi.bbps.common.utils.NaviBbpsCommonUtils.getNormalisedPhoneNumber import com.navi.bbps.common.utils.OriginSessionAttributes import com.navi.bbps.common.utils.OriginWidgetStatus import com.navi.bbps.common.utils.getDefaultConfig @@ -572,7 +573,10 @@ constructor( .get() .getContactNameFromPhoneNumber(myBillEntity.primaryCustomerParamValue), phoneNumber = myBillEntity.primaryCustomerParamValue, - normalisedPhoneNumber = myBillEntity.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = myBillEntity.primaryCustomerParamValue + ), ) val source = NaviBbpsScreen.NAVI_BBPS_MY_SAVED_BILLS.name @@ -651,7 +655,10 @@ constructor( myBillEntity.primaryCustomerParamValue ), phoneNumber = myBillEntity.primaryCustomerParamValue, - normalisedPhoneNumber = myBillEntity.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = myBillEntity.primaryCustomerParamValue + ), ) val source = NaviBbpsScreen.NAVI_BBPS_MY_SAVED_BILLS.name @@ -703,7 +710,10 @@ constructor( myBillEntity.primaryCustomerParamValue ), phoneNumber = myBillEntity.primaryCustomerParamValue, - normalisedPhoneNumber = myBillEntity.primaryCustomerParamValue, + normalisedPhoneNumber = + getNormalisedPhoneNumber( + phoneNumber = myBillEntity.primaryCustomerParamValue + ), ), myBillEntityToBillCategoryEntityMapper.mapMyBillEntityToBillCategoryEntity( myBillEntity