TP-81196 | Select EMI Date Issue Fix (#12341)
This commit is contained in:
@@ -16,6 +16,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.width
|
||||
import androidx.compose.material.Card
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@@ -23,19 +24,18 @@ import androidx.compose.ui.unit.dp
|
||||
import com.naviapp.home.utils.shimmerEffect
|
||||
|
||||
@Composable
|
||||
fun LoansTabContentShimmer(backgroundColor: Color = Color.Transparent) {
|
||||
Column(
|
||||
modifier =
|
||||
Modifier.fillMaxWidth().padding(start = 16.dp, end = 16.dp).background(backgroundColor)
|
||||
) {
|
||||
Box(modifier = Modifier.height(274.dp).fillMaxWidth().shimmerEffect())
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
Box(modifier = Modifier.height(24.dp).width(100.dp).shimmerEffect())
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
Box(modifier = Modifier.height(180.dp).fillMaxWidth().shimmerEffect())
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
Box(modifier = Modifier.height(24.dp).width(100.dp).shimmerEffect())
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
Box(modifier = Modifier.fillMaxHeight().fillMaxWidth().shimmerEffect())
|
||||
fun LoansTabContentShimmer(backgroundColor: Color = Color.White) {
|
||||
Card(modifier = Modifier.fillMaxWidth().background(backgroundColor)) {
|
||||
Column(modifier = Modifier.fillMaxWidth().padding(start = 16.dp, end = 16.dp)) {
|
||||
Box(modifier = Modifier.height(274.dp).fillMaxWidth().shimmerEffect())
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
Box(modifier = Modifier.height(24.dp).width(100.dp).shimmerEffect())
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
Box(modifier = Modifier.height(180.dp).fillMaxWidth().shimmerEffect())
|
||||
Spacer(modifier = Modifier.height(32.dp))
|
||||
Box(modifier = Modifier.height(24.dp).width(100.dp).shimmerEffect())
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
Box(modifier = Modifier.fillMaxHeight().fillMaxWidth().shimmerEffect())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@ import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.mutableStateOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalLifecycleOwner
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
@@ -215,7 +214,7 @@ private fun LoansTabWebView(
|
||||
}
|
||||
)
|
||||
if (showLoaderState.value) {
|
||||
LoansTabContentShimmer(Color.White)
|
||||
LoansTabContentShimmer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ import com.navi.ap.utils.constants.RPD_PAYMENT_URI
|
||||
import com.navi.ap.utils.constants.S3_KEY
|
||||
import com.navi.ap.utils.constants.SEARCH_DEBOUNCE_TIME_IN_MILLIS
|
||||
import com.navi.ap.utils.constants.SELECTED_BANK
|
||||
import com.navi.ap.utils.constants.SELECTED_EMI_DATE
|
||||
import com.navi.ap.utils.constants.SELECTED_IFSC_DATA
|
||||
import com.navi.ap.utils.constants.SELECTED_LOAN_AMOUNT
|
||||
import com.navi.ap.utils.constants.SELECTED_TENURE
|
||||
@@ -193,6 +194,7 @@ internal class PLLambdaImpl(
|
||||
var tenure = resolvedValues[SELECTED_TENURE]?.toString()
|
||||
val emiPlanSelected = resolvedValues[SELECTED_TENURE_PILL_INDEX]?.toString()
|
||||
val offerType = resolvedValues[OFFER_TYPE]?.toString()
|
||||
val selectedEmiDate = resolvedValues[SELECTED_EMI_DATE]?.toString()
|
||||
|
||||
if (
|
||||
savedAmount == amount &&
|
||||
@@ -218,7 +220,8 @@ internal class PLLambdaImpl(
|
||||
amount = amount,
|
||||
tenureInMonths = tenure,
|
||||
emiPlansSelected = emiPlanSelected,
|
||||
offerType = offerType
|
||||
offerType = offerType,
|
||||
selectedEmiDate = selectedEmiDate
|
||||
)
|
||||
bridge.setLambdaState(
|
||||
when {
|
||||
@@ -1264,7 +1267,8 @@ internal class PLLambdaImpl(
|
||||
bridge.setLambdaState(LambdaState.Loading)
|
||||
val lambdaResponse =
|
||||
repository.fetchOfferDetails(
|
||||
fetchEmiDates = resolvedValues[FETCH_EMI_DATES]?.toString()?.toBoolean()
|
||||
fetchEmiDates = resolvedValues[FETCH_EMI_DATES]?.toString()?.toBoolean(),
|
||||
selectedEmiDate = resolvedValues[SELECTED_EMI_DATE]?.toString()
|
||||
)
|
||||
|
||||
bridge.setLambdaState(
|
||||
|
||||
@@ -75,7 +75,8 @@ class PLLambdaRepository @Inject constructor(private val retrofitService: APRetr
|
||||
tenureInMonths: String? = null,
|
||||
emiPlansSelected: String? = null,
|
||||
fetchEmiDates: Boolean? = false,
|
||||
offerType: String? = null
|
||||
offerType: String? = null,
|
||||
selectedEmiDate: String? = null
|
||||
): ApRepoResult<Any> {
|
||||
val response =
|
||||
retrofitService.getOfferDetails(
|
||||
@@ -83,7 +84,8 @@ class PLLambdaRepository @Inject constructor(private val retrofitService: APRetr
|
||||
tenureInMonths = tenureInMonths,
|
||||
emiPlansSelected = emiPlansSelected,
|
||||
fetchEmiDates = fetchEmiDates,
|
||||
offerType = offerType
|
||||
offerType = offerType,
|
||||
selectedEmiDate = selectedEmiDate
|
||||
)
|
||||
logApiResponseEvents(methodName = ::fetchOfferDetails.name, response = response)
|
||||
return apiResponseCallback(response = response, apiTag = ApiType.GetScreenDefinition.name)
|
||||
|
||||
@@ -35,7 +35,8 @@ data class CalendarWidgetData(
|
||||
@SerializedName("errorTextProperty") val errorTextProperty: TextProperty? = null,
|
||||
@SerializedName("errorIconProperty") val errorIconProperty: ImageProperty? = null,
|
||||
@SerializedName("errorImageUrl") val errorImageUrl: String? = null,
|
||||
@SerializedName("errorMessage") val errorMessage: TextData? = null
|
||||
@SerializedName("errorMessage") val errorMessage: TextData? = null,
|
||||
@SerializedName("selectedDateRaw") val selectedDateRaw: String? = null
|
||||
) : UiTronData(), Parcelable {
|
||||
|
||||
@IgnoredOnParcel
|
||||
|
||||
@@ -39,6 +39,7 @@ import com.navi.ap.common.models.customwidget.CalendarDateElementData
|
||||
import com.navi.ap.common.models.customwidget.CalendarWidgetData
|
||||
import com.navi.ap.utils.constants.SELECTED_DATE
|
||||
import com.navi.ap.utils.constants.SELECTED_DATE_WITH_SUFFIX
|
||||
import com.navi.ap.utils.constants.SELECTED_EMI_DATE
|
||||
import com.navi.ap.utils.constants.SELECTED_FORMATTED_DATE
|
||||
import com.navi.ap.utils.constants.SELECTED_RAW_DATE
|
||||
import com.navi.ap.utils.constants.SHOW
|
||||
@@ -98,6 +99,7 @@ class CalendarWidget {
|
||||
if (selectedDate == null) return@LaunchedEffect
|
||||
viewModel.handle[calendarWidgetData.layoutId.getInputId()] = selectedDate.toString()
|
||||
viewModel.handle[SELECTED_RAW_DATE] = selectedDate
|
||||
viewModel.handle[SELECTED_EMI_DATE] = calendarWidgetData.selectedDateRaw
|
||||
calendarWidgetData.emiDate
|
||||
?.firstOrNull { it.rawDate == selectedDate }
|
||||
?.let {
|
||||
|
||||
@@ -64,6 +64,7 @@ interface PlLambdaService {
|
||||
@Query("tenureInMonths") tenureInMonths: String? = null,
|
||||
@Query("emiPlansSelected") emiPlansSelected: String? = null,
|
||||
@Query("fetchEmiDates") fetchEmiDates: Boolean? = null,
|
||||
@Query("firstEmiDate") selectedEmiDate: String? = null,
|
||||
@Header("X-Target") target: String = ModuleName.LE.name,
|
||||
): Response<GenericResponse<Any>>
|
||||
|
||||
|
||||
@@ -99,3 +99,4 @@ const val S3_KEY = "S3_KEY"
|
||||
const val OFFER_TYPE = "offerType"
|
||||
const val FETCH_EMI_DATES = "fetchEmiDates"
|
||||
const val LOAN_DISBURSEMENT_FIRST_EMI_DUE_DATE = "loanDisbursement.firstEmiDueDate"
|
||||
const val SELECTED_EMI_DATE = "selectedEmiDate"
|
||||
|
||||
Reference in New Issue
Block a user