TP-69727| Sidharth Bamba | gradient fix added (#11803)
Co-authored-by: Shaurya Rehan <shaurya.rehan@navi.com>
This commit is contained in:
@@ -39,7 +39,6 @@ import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.foundation.verticalScroll
|
||||
import androidx.compose.material.ExperimentalMaterialApi
|
||||
import androidx.compose.material.ModalBottomSheetValue
|
||||
import androidx.compose.material.Scaffold
|
||||
import androidx.compose.material.rememberModalBottomSheetState
|
||||
import androidx.compose.material.ripple.rememberRipple
|
||||
import androidx.compose.material3.Icon
|
||||
@@ -359,116 +358,107 @@ fun RenderPostPaymentScreen(
|
||||
|
||||
val scrollState = rememberScrollState()
|
||||
|
||||
Scaffold(
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
content = { padding ->
|
||||
Column(
|
||||
modifier =
|
||||
Modifier.padding(padding).fillMaxSize().verticalScroll(state = scrollState),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
TransactionInfoCard(
|
||||
transactionHistoryDetailItemProperty = transactionHistoryDetailItemProperty,
|
||||
transactionEntity = transactionEntity,
|
||||
onNavigationIconClicked = onNavigationIconClicked,
|
||||
onHelpCtaClicked = onHelpCtaClicked,
|
||||
helpCtaText = helpCtaText,
|
||||
onCtaClicked = onCtaClicked
|
||||
)
|
||||
Box(modifier = Modifier.fillMaxSize()) {
|
||||
Column(
|
||||
modifier =
|
||||
Modifier.fillMaxSize().padding(bottom = 100.dp).verticalScroll(state = scrollState),
|
||||
horizontalAlignment = Alignment.CenterHorizontally
|
||||
) {
|
||||
TransactionInfoCard(
|
||||
transactionHistoryDetailItemProperty = transactionHistoryDetailItemProperty,
|
||||
transactionEntity = transactionEntity,
|
||||
onNavigationIconClicked = onNavigationIconClicked,
|
||||
onHelpCtaClicked = onHelpCtaClicked,
|
||||
helpCtaText = helpCtaText,
|
||||
onCtaClicked = onCtaClicked
|
||||
)
|
||||
|
||||
PaymentStatusDescription(billEntity = billEntity)
|
||||
PaymentStatusDescription(billEntity = billEntity)
|
||||
|
||||
paymentSummaryConfig
|
||||
?.bbpsPaymentSummaryScreenConfig
|
||||
?.paymentSummaryCards
|
||||
?.forEach { item ->
|
||||
when (item.name) {
|
||||
NAVI_BBPS_REWARD_BANNER -> {
|
||||
RewardsGratificationSection(
|
||||
rewardsGratificationUIState = rewardsGratificationUIState,
|
||||
onRewardsGratificationClicked = {
|
||||
onRewardsPopUpStateUpdate.invoke(true)
|
||||
},
|
||||
onRewardsWonGratificationClicked =
|
||||
onRewardsWonGratificationClicked
|
||||
)
|
||||
Spacer(
|
||||
modifier =
|
||||
Modifier.height(
|
||||
if (
|
||||
rewardsGratificationUIState
|
||||
is
|
||||
PaymentSummaryRewardsGratificationUIState.RewardsWonGratification
|
||||
)
|
||||
24.dp
|
||||
else 32.dp
|
||||
)
|
||||
)
|
||||
}
|
||||
NAVI_BBPS_CROSS_SELL_BANNER -> {
|
||||
Box(
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp)
|
||||
) {
|
||||
AdverseView(
|
||||
activity = naviBbpsActivity,
|
||||
realEstateId =
|
||||
FirebaseRemoteConfigHelper.getString(
|
||||
NAVI_BBPS_PPS_CROSS_SELL_AD_RE_ID
|
||||
),
|
||||
timeoutInMillis =
|
||||
FirebaseRemoteConfigHelper.getLong(
|
||||
NAVI_BBPS_PPS_CROSS_SELL_AD_FALLBACK_TIMEOUT
|
||||
),
|
||||
loadingView = { CrossSellLoadingShimmer() },
|
||||
fallbackView = {
|
||||
CrossSellFallbackSection(
|
||||
naviBbpsActivity = naviBbpsActivity,
|
||||
naviBbpsAnalytics = naviBbpsAnalytics,
|
||||
isSourcePaymentSummary = true,
|
||||
myBillEntity = billEntity,
|
||||
billTransactionItemEntity = transactionEntity
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
}
|
||||
NAVI_BBPS_UP_SELL_BANNER -> {
|
||||
if (engagementBannerEntity.isNotEmpty()) {
|
||||
ImageCarouselSection(
|
||||
engagementBannerEntityList = engagementBannerEntity,
|
||||
onBannerClicked = onBannerClicked,
|
||||
naviBbpsAnalytics = naviBbpsAnalytics
|
||||
)
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (showRewardsPopUp) {
|
||||
Popup {
|
||||
ScratchCardComposable(
|
||||
backHandling = onRewardsPopUpClosed,
|
||||
screenContent =
|
||||
(rewardsGratificationUIState
|
||||
as? PaymentSummaryRewardsGratificationUIState.Gratification)
|
||||
?.gratificationResponse
|
||||
paymentSummaryConfig?.bbpsPaymentSummaryScreenConfig?.paymentSummaryCards?.forEach {
|
||||
item ->
|
||||
when (item.name) {
|
||||
NAVI_BBPS_REWARD_BANNER -> {
|
||||
RewardsGratificationSection(
|
||||
rewardsGratificationUIState = rewardsGratificationUIState,
|
||||
onRewardsGratificationClicked = {
|
||||
onRewardsPopUpStateUpdate.invoke(true)
|
||||
},
|
||||
onRewardsWonGratificationClicked = onRewardsWonGratificationClicked
|
||||
)
|
||||
Spacer(
|
||||
modifier =
|
||||
Modifier.height(
|
||||
if (
|
||||
rewardsGratificationUIState
|
||||
is
|
||||
PaymentSummaryRewardsGratificationUIState.RewardsWonGratification
|
||||
)
|
||||
24.dp
|
||||
else 32.dp
|
||||
)
|
||||
)
|
||||
}
|
||||
NAVI_BBPS_CROSS_SELL_BANNER -> {
|
||||
Box(modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp)) {
|
||||
AdverseView(
|
||||
activity = naviBbpsActivity,
|
||||
realEstateId =
|
||||
FirebaseRemoteConfigHelper.getString(
|
||||
NAVI_BBPS_PPS_CROSS_SELL_AD_RE_ID
|
||||
),
|
||||
timeoutInMillis =
|
||||
FirebaseRemoteConfigHelper.getLong(
|
||||
NAVI_BBPS_PPS_CROSS_SELL_AD_FALLBACK_TIMEOUT
|
||||
),
|
||||
loadingView = { CrossSellLoadingShimmer() },
|
||||
fallbackView = {
|
||||
CrossSellFallbackSection(
|
||||
naviBbpsActivity = naviBbpsActivity,
|
||||
naviBbpsAnalytics = naviBbpsAnalytics,
|
||||
isSourcePaymentSummary = true,
|
||||
myBillEntity = billEntity,
|
||||
billTransactionItemEntity = transactionEntity
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
}
|
||||
NAVI_BBPS_UP_SELL_BANNER -> {
|
||||
if (engagementBannerEntity.isNotEmpty()) {
|
||||
ImageCarouselSection(
|
||||
engagementBannerEntityList = engagementBannerEntity,
|
||||
onBannerClicked = onBannerClicked,
|
||||
naviBbpsAnalytics = naviBbpsAnalytics
|
||||
)
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
bottomBar = {
|
||||
BottomBarSection(
|
||||
onTransactionDetailSectionBottomNavigationCtaButtonClicked =
|
||||
onTransactionDetailSectionBottomNavigationCtaButtonClicked,
|
||||
onShareReceiptCtaClicked = onShareReceiptCtaClicked,
|
||||
shouldShowRewardCta =
|
||||
bottomBarCtaStateForRewards == BottomBarCtaStateForRewards.SCRATCH_WIN
|
||||
)
|
||||
|
||||
if (showRewardsPopUp) {
|
||||
Popup {
|
||||
ScratchCardComposable(
|
||||
backHandling = onRewardsPopUpClosed,
|
||||
screenContent =
|
||||
(rewardsGratificationUIState
|
||||
as? PaymentSummaryRewardsGratificationUIState.Gratification)
|
||||
?.gratificationResponse
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
BottomBarSection(
|
||||
onTransactionDetailSectionBottomNavigationCtaButtonClicked =
|
||||
onTransactionDetailSectionBottomNavigationCtaButtonClicked,
|
||||
onShareReceiptCtaClicked = onShareReceiptCtaClicked,
|
||||
shouldShowRewardCta =
|
||||
bottomBarCtaStateForRewards == BottomBarCtaStateForRewards.SCRATCH_WIN,
|
||||
modifier = Modifier.align(Alignment.BottomCenter).fillMaxWidth()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
@@ -788,11 +778,21 @@ fun IndicatorDots(isSelected: Boolean) {
|
||||
private fun BottomBarSection(
|
||||
onTransactionDetailSectionBottomNavigationCtaButtonClicked: () -> Unit,
|
||||
onShareReceiptCtaClicked: () -> Unit,
|
||||
shouldShowRewardCta: Boolean
|
||||
shouldShowRewardCta: Boolean,
|
||||
modifier: Modifier = Modifier
|
||||
) {
|
||||
Column(modifier = Modifier.padding(top = 16.dp)) {
|
||||
Column(modifier = modifier) {
|
||||
Image(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
contentScale = ContentScale.FillWidth,
|
||||
painter = painterResource(id = R.drawable.ic_cta_pps),
|
||||
contentDescription = null
|
||||
)
|
||||
Row(
|
||||
modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.background(color = NaviBbpsColor.textWhite)
|
||||
.padding(horizontal = 16.dp),
|
||||
verticalAlignment = Alignment.CenterVertically
|
||||
) {
|
||||
ThemeRoundedButtonWithImage(
|
||||
|
||||
21
android/navi-bbps/src/main/res/drawable/ic_cta_pps.xml
Normal file
21
android/navi-bbps/src/main/res/drawable/ic_cta_pps.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="360dp"
|
||||
android:height="58dp"
|
||||
android:viewportWidth="360"
|
||||
android:viewportHeight="58">
|
||||
<path
|
||||
android:pathData="M0,0h360v58h-360z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:startX="180"
|
||||
android:startY="0"
|
||||
android:endX="180"
|
||||
android:endY="58"
|
||||
android:type="linear">
|
||||
<item android:offset="0" android:color="#00FFFFFF"/>
|
||||
<item android:offset="0.48" android:color="#FFFFFFFF"/>
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
</vector>
|
||||
Reference in New Issue
Block a user