NTP-51225 | order history refund widget shimmer and message update (#15791)
This commit is contained in:
@@ -491,18 +491,7 @@ fun RefundStatusCardV2(
|
||||
onHowToUseRrnClicked: () -> Unit,
|
||||
) {
|
||||
|
||||
Column(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.noRippleClickableWithDebounce {
|
||||
when {
|
||||
refundStatusWidgetProperties.isContactUsVisible -> {
|
||||
onContactUsClicked?.invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
.padding(start = 16.dp, end = 16.dp, bottom = 16.dp)
|
||||
) {
|
||||
Column(modifier = Modifier.fillMaxWidth().padding(start = 16.dp, end = 16.dp, bottom = 16.dp)) {
|
||||
Column {
|
||||
Divider(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
@@ -613,11 +602,7 @@ private fun FailedTransactionDescriptionText(modifier: Modifier, onContactUsClic
|
||||
lineHeight = 20.sp,
|
||||
),
|
||||
text = text,
|
||||
onClick = { offset ->
|
||||
text.getStringAnnotations(tag = tag, start = offset, end = offset).firstOrNull()?.let {
|
||||
onContactUsClicked()
|
||||
}
|
||||
},
|
||||
onClick = { _ -> onContactUsClicked() },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.border
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
@@ -21,16 +22,20 @@ import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.runtime.mutableIntStateOf
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Brush
|
||||
import androidx.compose.ui.layout.onGloballyPositioned
|
||||
import androidx.compose.ui.platform.LocalDensity
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.unit.sp
|
||||
import com.navi.common.model.NaviLottieCompositionSpecType
|
||||
import com.navi.design.font.FontWeightEnum
|
||||
import com.navi.design.font.getFontWeight
|
||||
import com.navi.design.font.naviFontFamily
|
||||
@@ -39,9 +44,11 @@ import com.navi.naviwidgets.extensions.NaviText
|
||||
import com.navi.pay.R
|
||||
import com.navi.pay.common.theme.color.NaviPayColor
|
||||
import com.navi.pay.common.ui.InlineKnowMoreText
|
||||
import com.navi.pay.common.ui.NaviPayLottieAnimation
|
||||
import com.navi.pay.tstore.details.ui.bbps.BbpsRefundStatusWidgetProperties
|
||||
import com.navi.pay.tstore.details.ui.bbps.RefundStatusCardV2
|
||||
import com.navi.pay.tstore.utils.error.model.OrderErrorEntity
|
||||
import com.navi.pay.utils.NAVI_PAY_CTA_SHIMMER_LOTTIE_URL
|
||||
|
||||
@Composable
|
||||
fun PaymentErrorAndRefundSection(
|
||||
@@ -117,15 +124,31 @@ fun PaymentErrorAndRefundSection(
|
||||
}
|
||||
|
||||
orderErrorEntity.refundMessage.isNotBlank() -> {
|
||||
GenericRefundMessage(
|
||||
modifier =
|
||||
Modifier.clickableDebounce {
|
||||
if (isDescriptionTextClickable) {
|
||||
onShowFullErrorClicked()
|
||||
}
|
||||
},
|
||||
refundMessage = orderErrorEntity.refundMessage,
|
||||
)
|
||||
var refundMessageHeight by remember { mutableIntStateOf(0) }
|
||||
|
||||
Box(modifier = Modifier.fillMaxWidth()) {
|
||||
GenericRefundMessage(
|
||||
modifier =
|
||||
Modifier.onGloballyPositioned { coordinates ->
|
||||
refundMessageHeight = coordinates.size.height
|
||||
}
|
||||
.clickableDebounce {
|
||||
if (isDescriptionTextClickable) {
|
||||
onShowFullErrorClicked()
|
||||
}
|
||||
},
|
||||
refundMessage = orderErrorEntity.refundMessage,
|
||||
)
|
||||
|
||||
NaviPayLottieAnimation(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth()
|
||||
.height(with(LocalDensity.current) { refundMessageHeight.toDp() }),
|
||||
lottieFileName = NAVI_PAY_CTA_SHIMMER_LOTTIE_URL,
|
||||
lottieCompositionSpecType = NaviLottieCompositionSpecType.Url,
|
||||
showLottieInfiniteTimes = false,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,6 @@ constructor(
|
||||
title = "Payment failed",
|
||||
message =
|
||||
"We were unable to process your payment due to an unexpected issue. Please try again later or use an alternate payment method.",
|
||||
refundMessage = "Any amount debited will be refunded within 5-7 working days.",
|
||||
refundMessage = "Any amount debited will be refunded in 5-7 days.",
|
||||
)
|
||||
}
|
||||
|
||||
@@ -75,6 +75,8 @@ const val NAVI_PAY_UPI_NUMBER_LINK_SUCCESSFUL_LOTTIE = "navi-pay-upi-number-link
|
||||
const val NAVI_PAY_NEXT_ACTION_CHEVRON_WHITE_LOTTIE = "navi-pay-next-action-chevron-white.lottie"
|
||||
const val NAVI_PAY_THUNDER_ANIMATION_UPI_LITE = "thunder_animation_upi_lite.lottie"
|
||||
const val NAVI_PAY_PROTECT_ARC_PENDING_LOTTIE = "navi-pay-arc-pending-loader.lottie"
|
||||
const val NAVI_PAY_CTA_SHIMMER_LOTTIE_URL =
|
||||
"https://public-assets.np.navi-tech.in/sa/application-platform/lottie/cta_shimmer.json"
|
||||
|
||||
// Shared Preference constants
|
||||
const val KEY_DEVICE_FINGERPRINT = "naviPayKeyDeviceFingerPrint"
|
||||
|
||||
Reference in New Issue
Block a user