TP-62212 | Dynamic mandate ay (#10477)
This commit is contained in:
@@ -77,6 +77,12 @@ class AmcPaymentBottomSheet : BaseBottomSheet() {
|
||||
safelyDismissDialog()
|
||||
}
|
||||
note.setSpannableString(response?.footer?.title)
|
||||
val mode = arguments?.getString(PAYMENT_MODE)
|
||||
if (mode != null) {
|
||||
response?.options?.forEach {
|
||||
it.defaultSelected = (it.optionCardMetaData?.paymentMode == mode)
|
||||
}
|
||||
}
|
||||
radioItems.customRadioInnerLayout(response?.options)
|
||||
primarybtn.apply {
|
||||
isVisible = response?.footer?.nextCta.isNotNull()
|
||||
|
||||
@@ -15,7 +15,7 @@ data class OptionCardData(
|
||||
@SerializedName("subTitle") val subtitle: TextWithStyle? = null,
|
||||
@SerializedName("iconCode") val iconCode: String? = null,
|
||||
@SerializedName("label") val label: LabelData? = null,
|
||||
@SerializedName("defaultSelected") val defaultSelected: Boolean? = null,
|
||||
@SerializedName("defaultSelected") var defaultSelected: Boolean? = null,
|
||||
@SerializedName(
|
||||
"metadata",
|
||||
alternate = ["metaData"]
|
||||
@@ -37,4 +37,4 @@ data class OptionCardLayoutData(
|
||||
@Parcelize
|
||||
data class OptionCardMetaData(
|
||||
@SerializedName("paymentMode") val paymentMode: String? = null
|
||||
) : Parcelable
|
||||
): Parcelable
|
||||
@@ -22,6 +22,7 @@ import com.navi.amc.utils.Constant
|
||||
import com.navi.amc.utils.Constant.AMOUNT
|
||||
import com.navi.amc.utils.Constant.DISMISS
|
||||
import com.navi.amc.utils.Constant.HIT_API
|
||||
import com.navi.amc.utils.Constant.PAYMENT_MODE
|
||||
import com.navi.amc.utils.Constant.SHOW_BOTTOMSHEET
|
||||
import com.navi.amc.utils.getBottomSheet
|
||||
import com.navi.amc.utils.getPaymentSyncFlowStatusCta
|
||||
@@ -216,7 +217,8 @@ class AutoPaySetupFragmentV2 : AmcBaseFragment() {
|
||||
SHOW_BOTTOMSHEET -> {
|
||||
val data = actionData.parameters?.getOrNull(0)?.value
|
||||
val key = actionData.parameters?.getOrNull(0)?.key.orEmpty()
|
||||
val bundle = Bundle().apply { putString(Constant.DATA, data) }
|
||||
val bundle = Bundle().apply { putString(Constant.DATA, data)
|
||||
putString(PAYMENT_MODE, viewModel.paymentMode.value)}
|
||||
getBottomSheet(key, bundle, genericListener = {
|
||||
viewModel.setPaymentMode(it)
|
||||
performAction(it)
|
||||
|
||||
Reference in New Issue
Block a user