updated memory config
This commit is contained in:
@@ -173,10 +173,10 @@ class RequestInstallmentFragment :
|
||||
PostDetailsState.Failure -> {
|
||||
(activity as? BaseActivity)?.hideLoader()
|
||||
Toast.makeText(
|
||||
context,
|
||||
getString(R.string.oops_something_went_wrong),
|
||||
Toast.LENGTH_SHORT
|
||||
)
|
||||
context,
|
||||
getString(R.string.oops_something_went_wrong),
|
||||
Toast.LENGTH_SHORT
|
||||
)
|
||||
.show()
|
||||
}
|
||||
PostDetailsState.Loading -> {
|
||||
@@ -250,10 +250,10 @@ class RequestInstallmentFragment :
|
||||
(viewState.response.content?.uploadCard?.maxUploads
|
||||
?: 1) - binding.uploadCard.getUploadedDocsSize(),
|
||||
maxUploadSizeInMB =
|
||||
viewState.response.content
|
||||
?.uploadCard
|
||||
?.maxUploadSizeInMB
|
||||
.orValue(DEFAULT_MAX_UPLOAD_SIZE_IN_MB)
|
||||
viewState.response.content
|
||||
?.uploadCard
|
||||
?.maxUploadSizeInMB
|
||||
.orValue(DEFAULT_MAX_UPLOAD_SIZE_IN_MB)
|
||||
)
|
||||
},
|
||||
removeDocumentCallback = { openDocumentDeleteBottomSheet() }
|
||||
@@ -268,21 +268,21 @@ class RequestInstallmentFragment :
|
||||
val prev = parentFragmentManager.findFragmentByTag(FullScreenErrorDialog.TAG)
|
||||
if (
|
||||
prev != null &&
|
||||
!parentFragmentManager.isStateSaved &&
|
||||
!parentFragmentManager.isDestroyed
|
||||
!parentFragmentManager.isStateSaved &&
|
||||
!parentFragmentManager.isDestroyed
|
||||
) {
|
||||
ft.remove(prev).commit()
|
||||
}
|
||||
val errorFragment =
|
||||
FullScreenErrorDialog.getInstance(
|
||||
error =
|
||||
GenericErrorResponse(
|
||||
title = getString(R.string.page_load_fail_title),
|
||||
message = getString(R.string.page_load_fail_message),
|
||||
actions =
|
||||
listOf(Action(title = getString(R.string.page_load_try_again))),
|
||||
assetDetails = AssetDetails(ActionErrorFragment.PAGE_LOAD_FAILED)
|
||||
),
|
||||
GenericErrorResponse(
|
||||
title = getString(R.string.page_load_fail_title),
|
||||
message = getString(R.string.page_load_fail_message),
|
||||
actions =
|
||||
listOf(Action(title = getString(R.string.page_load_try_again))),
|
||||
assetDetails = AssetDetails(ActionErrorFragment.PAGE_LOAD_FAILED)
|
||||
),
|
||||
sourceScreenName = this.screenName,
|
||||
moduleName = (activity as? BaseActivity)?.getCurrentModuleName(),
|
||||
dialogDismissClicked = { viewModel.fetchTrancheDisbursalWidgets(arguments) }
|
||||
@@ -344,7 +344,10 @@ class RequestInstallmentFragment :
|
||||
)
|
||||
binding.amountStatusText.text = numberToWords(amount)
|
||||
binding.amountStatusText.typeface =
|
||||
ResourcesCompat.getFont(requireContext(), getFontStyle(FontWeightEnum.BOLD.name))
|
||||
ResourcesCompat.getFont(
|
||||
requireContext(),
|
||||
getFontStyle(FontWeightEnum.BOLD.name)
|
||||
)
|
||||
binding.amountStatusText.compoundDrawablePadding = dpToPxInInt(0)
|
||||
binding.amountStatusText.setCompoundDrawablesWithIntrinsicBounds(
|
||||
null,
|
||||
|
||||
@@ -101,13 +101,13 @@ class HlDocumentPickerBottomSheet : BaseBottomSheet() {
|
||||
|
||||
if (selectedItemCount > min(defaultMaxUploadSize, maxUploadCount)) {
|
||||
Toast.makeText(
|
||||
context,
|
||||
String.format(
|
||||
getString(com.navi.insurance.R.string.maximum_upload_text),
|
||||
min(defaultMaxUploadSize, maxUploadCount)
|
||||
),
|
||||
Toast.LENGTH_LONG
|
||||
)
|
||||
context,
|
||||
String.format(
|
||||
getString(com.navi.insurance.R.string.maximum_upload_text),
|
||||
min(defaultMaxUploadSize, maxUploadCount)
|
||||
),
|
||||
Toast.LENGTH_LONG
|
||||
)
|
||||
.show()
|
||||
} else {
|
||||
documentPickerVM.setImagePickerData(
|
||||
|
||||
@@ -159,10 +159,11 @@ interface RetrofitService {
|
||||
|
||||
@GET("/customer-service/customers/me/fetch-current-address-details")
|
||||
suspend fun fetchCurrentAddressDetails():
|
||||
Response<GenericResponse<AddressVerificationDetailsResponse>>
|
||||
Response<GenericResponse<AddressVerificationDetailsResponse>>
|
||||
|
||||
@GET("/customer-service/customers/me/fetch-current-address-details/v2")
|
||||
suspend fun fetchCurrentAddressDetailsV2(): Response<GenericResponse<AddressVerificationDetailsResponse>>
|
||||
suspend fun fetchCurrentAddressDetailsV2():
|
||||
Response<GenericResponse<AddressVerificationDetailsResponse>>
|
||||
|
||||
@GET("/customer-service/customers/me/fetch-addresses-for-current-reference")
|
||||
suspend fun fetchNoProofAddressList(): Response<GenericResponse<AddressListResponse>>
|
||||
@@ -528,7 +529,9 @@ interface RetrofitService {
|
||||
): Response<GenericResponse<SummaryViewResponse>>
|
||||
|
||||
@GET("/loan-origination-manager/loan-applications/{loanApplicationId}/loan-details-summary")
|
||||
suspend fun fetchSummaryV2View(@Path("loanApplicationId") loanApplicationId: String): Response<GenericResponse<LoanSummaryViewResponse>>
|
||||
suspend fun fetchSummaryV2View(
|
||||
@Path("loanApplicationId") loanApplicationId: String
|
||||
): Response<GenericResponse<LoanSummaryViewResponse>>
|
||||
|
||||
@GET("/loan-origination-manager/loan-applications/{loanApplicationId}/get-loan-agreement-view")
|
||||
suspend fun fetchLoanAgreementView(
|
||||
@@ -573,7 +576,9 @@ interface RetrofitService {
|
||||
): Response<GenericResponse<EnachWidgetResponse>>
|
||||
|
||||
@GET("/loan-applications/{loanApplicationId}/v3/auto-debit-instructions")
|
||||
suspend fun fetchEnachV2Details(@Path("loanApplicationId") loanApplicationId: String): Response<GenericResponse<EnachV2Response>>
|
||||
suspend fun fetchEnachV2Details(
|
||||
@Path("loanApplicationId") loanApplicationId: String
|
||||
): Response<GenericResponse<EnachV2Response>>
|
||||
|
||||
@POST("/loan-origination-manager/fetch-installments")
|
||||
suspend fun fetchEmiDetails(
|
||||
@@ -667,7 +672,7 @@ interface RetrofitService {
|
||||
|
||||
@GET("/customer-service/customers/me/eligibility/work-details")
|
||||
suspend fun fetchEmploymentVerificationData():
|
||||
Response<GenericResponse<EmploymentVerificationResponse>>
|
||||
Response<GenericResponse<EmploymentVerificationResponse>>
|
||||
|
||||
@GET("/customer-service/customers/me/eligibility/pan-details")
|
||||
suspend fun fetchPanData(): Response<GenericResponse<ProfileDetailsResponse>>
|
||||
@@ -678,7 +683,9 @@ interface RetrofitService {
|
||||
): Response<GenericResponse<HLSeekDetail>>
|
||||
|
||||
@GET("/pl-in-review-ctas")
|
||||
suspend fun fetchBankStatementData(@Query("flowType") flowType: String): Response<GenericResponse<BankStatementResponse>>
|
||||
suspend fun fetchBankStatementData(
|
||||
@Query("flowType") flowType: String
|
||||
): Response<GenericResponse<BankStatementResponse>>
|
||||
|
||||
@GET("/financial-profile/account-aggregator/cta-and-terms-and-conditions")
|
||||
suspend fun fetchAggregatorStatementData(): Response<GenericResponse<AggregatorResponseData>>
|
||||
@@ -859,7 +866,7 @@ interface RetrofitService {
|
||||
|
||||
@GET("/auth-token/v1/refresh")
|
||||
suspend fun refreshFirebaseAuthToken():
|
||||
Response<GenericResponse<FirebaseRefreshAuthTokenResponse>>
|
||||
Response<GenericResponse<FirebaseRefreshAuthTokenResponse>>
|
||||
|
||||
@POST("/v1/finoramic-upload")
|
||||
suspend fun sendFinoramicData(
|
||||
@@ -938,7 +945,7 @@ interface RetrofitService {
|
||||
|
||||
@GET("/customer-service/customers/me/fetch-osv-details")
|
||||
suspend fun fetchPhysicalAddressVerificationData():
|
||||
Response<GenericResponse<KycPhysicalAddressVerificationResponse>>
|
||||
Response<GenericResponse<KycPhysicalAddressVerificationResponse>>
|
||||
|
||||
@GET("/customer-service/customers/me/fetch-osv-slot-details")
|
||||
suspend fun fetchOsvData(): Response<GenericResponse<OsvResponse>>
|
||||
@@ -1086,7 +1093,7 @@ interface RetrofitService {
|
||||
|
||||
@GET("/home-loan/customers/me/journey/v1/home")
|
||||
suspend fun fetchHomeLoanSelectTypeScreenDetails():
|
||||
Response<GenericResponse<HomeLoanSelectTypeScreenResponse>>
|
||||
Response<GenericResponse<HomeLoanSelectTypeScreenResponse>>
|
||||
|
||||
@GET("/home-loan/customers/me/journey/v1/form?action=CUSTOMIZE_LOAN")
|
||||
suspend fun fetchHomeLoanEmiTenureDetails(
|
||||
@@ -1361,22 +1368,22 @@ interface RetrofitService {
|
||||
suspend fun fetchGstLoginWithCredentialStatus(
|
||||
@Path("requestId") requestId: String
|
||||
): Response<
|
||||
GenericResponse<AdditionalDataAsyncResponse<GenericResponse<GstVerificationResponse>>>
|
||||
>
|
||||
GenericResponse<AdditionalDataAsyncResponse<GenericResponse<GstVerificationResponse>>>
|
||||
>
|
||||
|
||||
@GET("/requests/{requestId}")
|
||||
suspend fun fetchSendOTPForGstVerificationStatus(
|
||||
@Path("requestId") requestId: String
|
||||
): Response<
|
||||
GenericResponse<AdditionalDataAsyncResponse<GenericResponse<GstOtpGenerationResponse>>>
|
||||
>
|
||||
GenericResponse<AdditionalDataAsyncResponse<GenericResponse<GstOtpGenerationResponse>>>
|
||||
>
|
||||
|
||||
@GET("/requests/{requestId}")
|
||||
suspend fun fetchVerifyOTPForGstVerification(
|
||||
@Path("requestId") requestId: String
|
||||
): Response<
|
||||
GenericResponse<AdditionalDataAsyncResponse<GenericResponse<GstVerificationResponse>>>
|
||||
>
|
||||
GenericResponse<AdditionalDataAsyncResponse<GenericResponse<GstVerificationResponse>>>
|
||||
>
|
||||
|
||||
@GET("/customer-service/customers/me/credit-assignment")
|
||||
suspend fun fetchCreditAssignmentDetails(): Response<GenericResponse<CreditAssignmentResponse>>
|
||||
@@ -1504,9 +1511,9 @@ interface RetrofitService {
|
||||
@QueryMap queryMap: HashMap<String, String>
|
||||
): Response<GenericResponse<HLPermissionDetailsResponse>>
|
||||
|
||||
|
||||
@GET("/journey-tracker")
|
||||
suspend fun fetchPersonalLoanTrackerResponse(): Response<GenericResponse<PersonalLoanTrackerResponse>>
|
||||
suspend fun fetchPersonalLoanTrackerResponse():
|
||||
Response<GenericResponse<PersonalLoanTrackerResponse>>
|
||||
|
||||
@GET("end-screen-widgets/{screenName}")
|
||||
suspend fun fetchCrossSellDetails(
|
||||
@@ -1528,7 +1535,9 @@ interface RetrofitService {
|
||||
suspend fun fetchRewardsSummary(): Response<GenericResponse<RewardInfoResponse>>
|
||||
|
||||
@GET("/loan-origination-manager/loan-applications/{loanApplicationId}/get-loan-agreement-view")
|
||||
suspend fun fetchLoanAgreementV2View(@Path("loanApplicationId") loanApplicationId: String): Response<GenericResponse<FetchLoanAgreementV2Response>>
|
||||
suspend fun fetchLoanAgreementV2View(
|
||||
@Path("loanApplicationId") loanApplicationId: String
|
||||
): Response<GenericResponse<FetchLoanAgreementV2Response>>
|
||||
|
||||
@GET("/litmus-proxy/v1/proxy/experiment")
|
||||
suspend fun fetchABExperiment(
|
||||
@@ -1570,7 +1579,9 @@ interface RetrofitService {
|
||||
): Response<GenericResponse<Any>>
|
||||
|
||||
@POST("/loan-origination-manager/v4/fetch-loan-fee-details")
|
||||
suspend fun fetchFeeV2Details(@Body request: LoanFeeDetailsRequest): Response<GenericResponse<FeeDetailsV2Response>>
|
||||
suspend fun fetchFeeV2Details(
|
||||
@Body request: LoanFeeDetailsRequest
|
||||
): Response<GenericResponse<FeeDetailsV2Response>>
|
||||
|
||||
@GET("/widgets/sa/renewal/bottom-sheet-details")
|
||||
suspend fun getR11PaymentDetails(
|
||||
@@ -1716,5 +1727,4 @@ interface RetrofitService {
|
||||
@Path("rescheduleType") rescheduleType: String?,
|
||||
@Body customPayRequest: CustomPaymentRequest?
|
||||
): Response<GenericResponse<GenericWidgetResponse>>
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,7 @@
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx4096m
|
||||
kotlin.daemon.jvmargs=-Xmx1g
|
||||
kotlin.daemon.jvmargs=-Xmx8g
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
|
||||
@@ -18,4 +18,3 @@ object Constants {
|
||||
const val KEY_REPAYMENT_TYPE = "REPAYMENT_TYPE"
|
||||
const val KEY_SOURCE = "SOURCE"
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2019 by Navi Technologies Private Limited
|
||||
* * Copyright © 2019-2022 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
@@ -28,7 +28,6 @@ import com.navi.base.model.CtaData
|
||||
import com.navi.base.model.CtaType
|
||||
import com.navi.base.model.NaviClickAction
|
||||
import com.navi.base.sharedpref.PreferenceManager
|
||||
import com.navi.base.sharedpref.PreferenceManager.saveStringSecurely
|
||||
import com.navi.base.utils.isNotNull
|
||||
import com.navi.base.utils.isNull
|
||||
import com.navi.common.video.YoutubeVideoPlayer
|
||||
@@ -88,22 +87,22 @@ import com.navi.naviwidgets.widgets.hospitalcard.HospitalCardWidgetV2Layout.Comp
|
||||
import com.navi.naviwidgets.widgets.hospitalcard.HospitalCardWidgetV2Layout.Companion.HOSPITAL_DATA_V2
|
||||
import com.navi.naviwidgets.widgets.hospitalcard.HospitalCardWidgetV2Layout.Companion.NEARBY_HOSPITAL_INTENT_ACTION_V2
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import java.lang.ref.WeakReference
|
||||
import javax.inject.Inject
|
||||
import kotlinx.android.synthetic.main.expanded_quote_header_view.view.*
|
||||
import kotlinx.android.synthetic.main.quote_footer_view.view.*
|
||||
import kotlinx.android.synthetic.main.quote_header_view.view.*
|
||||
import kotlinx.coroutines.launch
|
||||
import java.lang.ref.WeakReference
|
||||
import javax.inject.Inject
|
||||
|
||||
@AndroidEntryPoint
|
||||
class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener {
|
||||
private val quoteViewModel by lazy { ViewModelProvider(requireActivity()).get(QuoteVM::class.java) }
|
||||
private val quoteViewModel by lazy {
|
||||
ViewModelProvider(requireActivity()).get(QuoteVM::class.java)
|
||||
}
|
||||
private val chatBackUpVM by lazy { ViewModelProvider(this).get(ChatBackUpVM::class.java) }
|
||||
private val policyVM by lazy { ViewModelProvider(this).get(PolicyVM::class.java) }
|
||||
private val requestCallbackVM by lazy {
|
||||
ViewModelProvider(requireActivity()).get(
|
||||
RequestCallbackVM::class.java
|
||||
)
|
||||
ViewModelProvider(requireActivity()).get(RequestCallbackVM::class.java)
|
||||
}
|
||||
private lateinit var binding: QuoteRedesignFragmentBinding
|
||||
private var listener: FragmentCallbackListener? = null
|
||||
@@ -118,23 +117,17 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
private var quoteFooterInfoData: QuoteFooterInfoData? = null
|
||||
private var naviPolicyDocumentDownloadManager: NaviPolicyDocumentDownloadManager? = null
|
||||
|
||||
@Inject
|
||||
lateinit var videoPlayer: YoutubeVideoPlayer
|
||||
@Inject lateinit var videoPlayer: YoutubeVideoPlayer
|
||||
|
||||
@Inject
|
||||
lateinit var insuranceAnalyticsHandler: InsuranceAnalyticsHandler
|
||||
@Inject lateinit var insuranceAnalyticsHandler: InsuranceAnalyticsHandler
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = DataBindingUtil.inflate(
|
||||
inflater,
|
||||
R.layout.quote_redesign_fragment,
|
||||
container,
|
||||
false
|
||||
)
|
||||
binding =
|
||||
DataBindingUtil.inflate(inflater, R.layout.quote_redesign_fragment, container, false)
|
||||
|
||||
initListeners()
|
||||
initObservers()
|
||||
@@ -159,11 +152,15 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
apiErrorHandler = context as? ApiErrorHandler
|
||||
listener = context as? FragmentCallbackListener
|
||||
locationManager = NaviLocationManager(requireContext())
|
||||
val savedPincodeBasedLocation = NaviPreferenceManager.getObjectPreference(
|
||||
Constants.USER_LOCATION_DATA_WITH_PINCODE,
|
||||
UserLocation::class.java
|
||||
)
|
||||
if (savedPincodeBasedLocation?.latitude != null && savedPincodeBasedLocation.longitude != null) {
|
||||
val savedPincodeBasedLocation =
|
||||
NaviPreferenceManager.getObjectPreference(
|
||||
Constants.USER_LOCATION_DATA_WITH_PINCODE,
|
||||
UserLocation::class.java
|
||||
)
|
||||
if (
|
||||
savedPincodeBasedLocation?.latitude != null &&
|
||||
savedPincodeBasedLocation.longitude != null
|
||||
) {
|
||||
setLocation(savedPincodeBasedLocation)
|
||||
} else {
|
||||
locationManager?.getLastLocation(::setLocation)
|
||||
@@ -186,12 +183,9 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
private fun fetchCards() {
|
||||
val quoteID =
|
||||
activity?.intent?.getStringExtra(QUOTE_ID_EXTRA) ?: quoteViewModel.quoteId.value
|
||||
val preQuoteId =
|
||||
activity?.intent?.getStringExtra(PRE_QUOTE_ID_EXTRA)
|
||||
val policyToBeCopied =
|
||||
activity?.intent?.getStringExtra(POLICY_TO_BE_COPIED)
|
||||
val applicationType =
|
||||
activity?.intent?.getStringExtra(APPLICATION_TYPE_EXTRA)
|
||||
val preQuoteId = activity?.intent?.getStringExtra(PRE_QUOTE_ID_EXTRA)
|
||||
val policyToBeCopied = activity?.intent?.getStringExtra(POLICY_TO_BE_COPIED)
|
||||
val applicationType = activity?.intent?.getStringExtra(APPLICATION_TYPE_EXTRA)
|
||||
var offerRequest =
|
||||
activity?.intent?.getParcelableExtra(Constants.OFFER_REQUEST_EXTRA) as? OfferRequest
|
||||
sendQuoteAnalyticEvents(offerRequest)
|
||||
@@ -207,17 +201,16 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
|
||||
private fun sendQuoteAnalyticEvents(offerParams: OfferRequest?) {
|
||||
offerParams?.let {
|
||||
NaviInsuranceAnalytics.instance.QuoteV2().sendQuoteOfferData(it)
|
||||
}
|
||||
offerParams?.let { NaviInsuranceAnalytics.instance.QuoteV2().sendQuoteOfferData(it) }
|
||||
}
|
||||
|
||||
private fun initObservers() {
|
||||
quoteViewModel.quoteResponse.observe(viewLifecycleOwner) { widgetGenericResponse ->
|
||||
widgetGenericResponse?.let {
|
||||
// The below prefs value is being read in chat screen for displaying form complete footer
|
||||
if (NaviPreferenceManager.getBooleanPreference(ILLNESS_QUESTION_SHOWN, false)
|
||||
.not()
|
||||
// The below prefs value is being read in chat screen for displaying form complete
|
||||
// footer
|
||||
if (
|
||||
NaviPreferenceManager.getBooleanPreference(ILLNESS_QUESTION_SHOWN, false).not()
|
||||
) {
|
||||
NaviPreferenceManager.setBooleanPreference(
|
||||
QUOTE_GENERATED_FOR_CURRENT_CHAT,
|
||||
@@ -240,17 +233,12 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
)
|
||||
} else {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
(binding.quoteRv.adapter as QuoteOfferAdapter<GenericWidgetDataInfo>).setData(
|
||||
widgetConfigList
|
||||
)
|
||||
(binding.quoteRv.adapter as QuoteOfferAdapter<GenericWidgetDataInfo>)
|
||||
.setData(widgetConfigList)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
insuranceAnalyticsHandler.sendEvent(
|
||||
it.metaData?.analyticsEvent,
|
||||
screenName
|
||||
)
|
||||
insuranceAnalyticsHandler.sendEvent(it.metaData?.analyticsEvent, screenName)
|
||||
|
||||
it.headerWidget?.let { widgetConfigList ->
|
||||
if (widgetConfigList.isNotEmpty()) {
|
||||
@@ -268,7 +256,12 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
quoteViewModel.setSumInsured(headerData.coverageDetails?.sumInsured)
|
||||
widgetConfigList.getOrNull(0)?.leftIconData?.iconCode?.let { iconCode ->
|
||||
binding.quoteHeaderView.backBtn.setImageResource(IconUtil.getIconDrawableResource(iconCode, R.drawable.ic_back_arrow_with_tail))
|
||||
binding.quoteHeaderView.backBtn.setImageResource(
|
||||
IconUtil.getIconDrawableResource(
|
||||
iconCode,
|
||||
R.drawable.ic_back_arrow_with_tail
|
||||
)
|
||||
)
|
||||
}
|
||||
binding.quoteHeaderView.visibility = View.VISIBLE
|
||||
}
|
||||
@@ -284,7 +277,9 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
it.pageLayoutParams?.let { pageLayoutParams ->
|
||||
if (isValidHexColor(pageLayoutParams.pageBackgroundColor)) {
|
||||
binding.quotePageLayout.setBackgroundColor(Color.parseColor(pageLayoutParams.pageBackgroundColor))
|
||||
binding.quotePageLayout.setBackgroundColor(
|
||||
Color.parseColor(pageLayoutParams.pageBackgroundColor)
|
||||
)
|
||||
}
|
||||
}
|
||||
it.metaData?.let { metaDataInfo ->
|
||||
@@ -317,16 +312,19 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
quoteViewModel.launchBottomSheet.observe(viewLifecycleOwner) {
|
||||
val highlightWidgetName =
|
||||
quoteViewModel.quoteResponse.value?.metaData?.pageHighlightInfo?.widgetName
|
||||
if (!quoteViewModel.quoteResponse.value?.contentWidget?.find { widgetName -> widgetName.widgetNameForBaseAdapter == highlightWidgetName }
|
||||
.isNull()) {
|
||||
if (
|
||||
!quoteViewModel.quoteResponse.value
|
||||
?.contentWidget
|
||||
?.find { widgetName ->
|
||||
widgetName.widgetNameForBaseAdapter == highlightWidgetName
|
||||
}
|
||||
.isNull()
|
||||
) {
|
||||
if (quoteViewModel.launchBottomSheet.value?.get(QUOTE_HIGHLIGHT) == true) {
|
||||
quoteViewModel.turnOffLaunchFlag(QUOTE_HIGHLIGHT)
|
||||
val bottomSheet = QuoteHighlightFragment()
|
||||
bottomSheet.isCancelable = false
|
||||
safelyShowBottomSheet(
|
||||
bottomSheet,
|
||||
QuoteHighlightFragment.TAG
|
||||
)
|
||||
safelyShowBottomSheet(bottomSheet, QuoteHighlightFragment.TAG)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -349,9 +347,7 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
)
|
||||
val intent = Intent(NEARBY_HOSPITAL_INTENT_ACTION_V2)
|
||||
intent.putExtra(HOSPITAL_DATA_V2, nearByHospitalDataV2)
|
||||
context?.let {
|
||||
LocalBroadcastManager.getInstance(it).sendBroadcast(intent)
|
||||
}
|
||||
context?.let { LocalBroadcastManager.getInstance(it).sendBroadcast(intent) }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,15 +357,11 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
requestCallbackVM.userCallback.observeNonNull(this) {
|
||||
it.getContentIfNotHandled()
|
||||
?.let { // Only proceed if the event has never been handled
|
||||
RequestCallbackSuccessBottomSheet.newInstance().show(
|
||||
parentFragmentManager,
|
||||
RequestCallbackSuccessBottomSheet.TAG
|
||||
)
|
||||
}
|
||||
it.getContentIfNotHandled()?.let { // Only proceed if the event has never been handled
|
||||
RequestCallbackSuccessBottomSheet.newInstance()
|
||||
.show(parentFragmentManager, RequestCallbackSuccessBottomSheet.TAG)
|
||||
}
|
||||
}
|
||||
|
||||
quoteViewModel.v1QuoteOfferDetail.observeNonNull(viewLifecycleOwner) { offerDetail ->
|
||||
@@ -398,7 +390,8 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
|
||||
private fun handleCallbackResponseError() {
|
||||
requestCallbackVM.errorResponse.observeNonNull(this) { err: SingleEvent<Triple<GenericErrorResponse, String?, Boolean>> ->
|
||||
requestCallbackVM.errorResponse.observeNonNull(this) {
|
||||
err: SingleEvent<Triple<GenericErrorResponse, String?, Boolean>> ->
|
||||
err.getContentIfNotHandled()?.first?.message?.let {
|
||||
Toast.makeText(context, it, Toast.LENGTH_LONG).show()
|
||||
}
|
||||
@@ -434,18 +427,19 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
private fun showExpandedHeader() {
|
||||
binding.frameLayoutContainer.visibility = View.VISIBLE
|
||||
|
||||
quoteViewModel.quoteResponse.value?.headerWidget?.getOrNull(FIRST_ITEM)
|
||||
?.let { quoteHeaderInfoData ->
|
||||
binding.expandedQuoteHeaderView.setProperties(quoteHeaderInfoData, clickCallback)
|
||||
}
|
||||
quoteViewModel.quoteResponse.value?.headerWidget?.getOrNull(FIRST_ITEM)?.let {
|
||||
quoteHeaderInfoData ->
|
||||
binding.expandedQuoteHeaderView.setProperties(quoteHeaderInfoData, clickCallback)
|
||||
}
|
||||
}
|
||||
|
||||
private fun showSumInsuredBottomSheet(bundle: Bundle? = null) {
|
||||
quoteViewModel.quoteResponse.value?.headerWidget?.let {
|
||||
val bottomSheet = QuoteSumInsuredBottomSheet.getInstance(
|
||||
it[FIRST_ITEM],
|
||||
bundle?.getParcelable(PARAMS_EXTRA) as? CtaData
|
||||
)
|
||||
val bottomSheet =
|
||||
QuoteSumInsuredBottomSheet.getInstance(
|
||||
it[FIRST_ITEM],
|
||||
bundle?.getParcelable(PARAMS_EXTRA) as? CtaData
|
||||
)
|
||||
safelyShowBottomSheet(bottomSheet, QuoteSumInsuredBottomSheet.TAG)
|
||||
}
|
||||
}
|
||||
@@ -480,12 +474,9 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
|
||||
private fun showHelpBottomSheet() {
|
||||
//TODO :: we have to replace screen name from offer_form_v2 to new screen_name
|
||||
// TODO :: we have to replace screen name from offer_form_v2 to new screen_name
|
||||
context?.let { context ->
|
||||
launchHelpCenter(
|
||||
context,
|
||||
InsuranceAnalyticsConstants.OFFER_FORM_V2
|
||||
)
|
||||
launchHelpCenter(context, InsuranceAnalyticsConstants.OFFER_FORM_V2)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -497,9 +488,7 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
|
||||
private fun setLocation(location: UserLocation?) {
|
||||
location?.let {
|
||||
this.userLocation = location
|
||||
}
|
||||
location?.let { this.userLocation = location }
|
||||
}
|
||||
|
||||
private fun fetchNearByHospitals() {
|
||||
@@ -523,7 +512,6 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override fun onClick(view: View?) {
|
||||
binding.frameLayoutContainer.visibility = View.GONE
|
||||
when (view?.id) {
|
||||
@@ -532,72 +520,92 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
analyticsEventHandler?.postAnalyticsEvent(
|
||||
AnalyticsEvent(
|
||||
name = InsuranceAnalyticsConstants.HI_btn_click_quote_help,
|
||||
properties = mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType.orEmpty()
|
||||
properties =
|
||||
mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.metaData
|
||||
?.applicationType
|
||||
.orEmpty()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
R.id.backBtn -> {
|
||||
activity?.onBackPressed()
|
||||
analyticsEventHandler?.postAnalyticsEvent(
|
||||
AnalyticsEvent(
|
||||
name = InsuranceAnalyticsConstants.HI_btn_click_quote_backbutton,
|
||||
properties = mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_ID,
|
||||
quoteViewModel.quoteId.value ?: ""
|
||||
properties =
|
||||
mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.metaData
|
||||
?.applicationType
|
||||
.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_ID,
|
||||
quoteViewModel.quoteId.value ?: ""
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
R.id.closeBtn -> {
|
||||
binding.frameLayoutContainer.visibility = View.GONE
|
||||
}
|
||||
|
||||
R.id.sumInsuredChange -> {
|
||||
showSumInsuredBottomSheet()
|
||||
analyticsEventHandler?.postAnalyticsEvent(
|
||||
AnalyticsEvent(
|
||||
name = InsuranceAnalyticsConstants.HI_btn_click_change_sum_insured,
|
||||
properties = mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_SUM_INSURED,
|
||||
quoteViewModel.quoteResponse.value?.headerWidget?.get(0)?.coverageDetails?.sumInsured
|
||||
?: EMPTY
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_PREMIUM_AMOUNT,
|
||||
quoteViewModel.quoteResponse.value?.footerWidget?.get(0)?.ctaTitle
|
||||
?: EMPTY
|
||||
properties =
|
||||
mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.metaData
|
||||
?.applicationType
|
||||
.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_SUM_INSURED,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.headerWidget
|
||||
?.get(0)
|
||||
?.coverageDetails
|
||||
?.sumInsured
|
||||
?: EMPTY
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_PREMIUM_AMOUNT,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.footerWidget
|
||||
?.get(0)
|
||||
?.ctaTitle
|
||||
?: EMPTY
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
R.id.memberChange -> {
|
||||
val memberChangeCta = quoteViewModel.quoteResponse.value?.headerWidget?.get(
|
||||
0
|
||||
)?.memberInfo?.memberChangeCta
|
||||
if (!quoteViewModel.quoteResponse.value?.metaData?.preQuoteId.isNullOrEmpty() && !memberChangeCta.isNull()
|
||||
val memberChangeCta =
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.headerWidget
|
||||
?.get(0)
|
||||
?.memberInfo
|
||||
?.memberChangeCta
|
||||
if (
|
||||
!quoteViewModel.quoteResponse.value?.metaData?.preQuoteId.isNullOrEmpty() &&
|
||||
!memberChangeCta.isNull()
|
||||
) {
|
||||
NaviInsuranceDeeplinkNavigator.navigate(
|
||||
this.activity,
|
||||
@@ -606,7 +614,10 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
)
|
||||
} else {
|
||||
// Below chat code will be deprecated in future if we move buy flow to Form
|
||||
if (NaviPreferenceManager.isChatDataAvailable() || quoteViewModel.quoteResponse.value?.metaData?.chatBackUpExists == true) {
|
||||
if (
|
||||
NaviPreferenceManager.isChatDataAvailable() ||
|
||||
quoteViewModel.quoteResponse.value?.metaData?.chatBackUpExists == true
|
||||
) {
|
||||
editMemberListener?.onEditMembers()
|
||||
} else {
|
||||
val resetPopupBottomSheet =
|
||||
@@ -618,7 +629,6 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
R.id.continueBtn -> {
|
||||
val btnTag = view.tag
|
||||
if (btnTag is CtaData) {
|
||||
@@ -646,31 +656,41 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
analyticsEventHandler?.postAnalyticsEvent(
|
||||
AnalyticsEvent(
|
||||
name = InsuranceAnalyticsConstants.HI_btn_click_quote_continue,
|
||||
properties = mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_ID,
|
||||
quoteViewModel.quoteId.value.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_SUM_INSURED,
|
||||
quoteViewModel.quoteResponse.value?.headerWidget?.get(0)?.coverageDetails?.sumInsured
|
||||
?: EMPTY
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_PREMIUM_AMOUNT,
|
||||
quoteViewModel.quoteResponse.value?.footerWidget?.get(0)?.ctaTitle
|
||||
?: EMPTY
|
||||
properties =
|
||||
mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.metaData
|
||||
?.applicationType
|
||||
.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_ID,
|
||||
quoteViewModel.quoteId.value.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_SUM_INSURED,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.headerWidget
|
||||
?.get(0)
|
||||
?.coverageDetails
|
||||
?.sumInsured
|
||||
?: EMPTY
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_PREMIUM_AMOUNT,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.footerWidget
|
||||
?.get(0)
|
||||
?.ctaTitle
|
||||
?: EMPTY
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
R.id.premium_details_text -> {
|
||||
showPremiumDetailsBottomSheet()
|
||||
}
|
||||
@@ -694,7 +714,9 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
)
|
||||
} else {
|
||||
quoteViewModel.setToastError()
|
||||
NaviTrackEvent.trackEventOnClickStream(InsuranceAnalyticsConstants.GI_GLOBAL_GENERIC_ERRORS)
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
InsuranceAnalyticsConstants.GI_GLOBAL_GENERIC_ERRORS
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -712,11 +734,12 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
quoteViewModel.updateQuoteDetails(quoteId!!, QuoteOfferUpdateRequest(planId = planId))
|
||||
} else {
|
||||
quoteViewModel.setToastError()
|
||||
NaviTrackEvent.trackEventOnClickStream(InsuranceAnalyticsConstants.GI_GLOBAL_GENERIC_ERRORS)
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
InsuranceAnalyticsConstants.GI_GLOBAL_GENERIC_ERRORS
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
override val screenName: String
|
||||
get() = InsuranceAnalyticsConstants.QUOTE_V2
|
||||
|
||||
@@ -758,28 +781,26 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
insuranceAnalyticsHandler.sendEvent(it, screenName)
|
||||
}
|
||||
when (naviClickAction.type) {
|
||||
QuoteActivity.USP_BOTTOMSHEET, QuoteActivity.BENEFITS_BOTTOMSHEET -> listener?.navigateToBottomSheet(
|
||||
naviClickAction.type ?: "",
|
||||
bundle
|
||||
)
|
||||
NAVIGATE_TO_DEEPLINK, HOSPITALS -> NaviInsuranceDeeplinkNavigator.navigate(
|
||||
activity,
|
||||
CtaData(url = naviClickAction.url),
|
||||
false,
|
||||
bundle
|
||||
)
|
||||
"DEEP_LINK" -> NaviInsuranceDeeplinkNavigator.navigate(
|
||||
activity,
|
||||
naviClickAction,
|
||||
true,
|
||||
bundle
|
||||
)
|
||||
QuoteActivity.USP_BOTTOMSHEET,
|
||||
QuoteActivity.BENEFITS_BOTTOMSHEET ->
|
||||
listener?.navigateToBottomSheet(naviClickAction.type ?: "", bundle)
|
||||
NAVIGATE_TO_DEEPLINK,
|
||||
HOSPITALS ->
|
||||
NaviInsuranceDeeplinkNavigator.navigate(
|
||||
activity,
|
||||
CtaData(url = naviClickAction.url),
|
||||
false,
|
||||
bundle
|
||||
)
|
||||
"DEEP_LINK" ->
|
||||
NaviInsuranceDeeplinkNavigator.navigate(activity, naviClickAction, true, bundle)
|
||||
CtaType.CONTENT_DATA_SCROLL.value -> {
|
||||
when (naviClickAction.parameters?.getOrNull(0)?.value) {
|
||||
PREFERENCE_WIDGET_SCROLL -> insuranceAnalyticsHandler.sendEvent(
|
||||
analyticsEvent = AnalyticsEvent(name = gi_quote_si_scroll),
|
||||
screen = screenName
|
||||
)
|
||||
PREFERENCE_WIDGET_SCROLL ->
|
||||
insuranceAnalyticsHandler.sendEvent(
|
||||
analyticsEvent = AnalyticsEvent(name = gi_quote_si_scroll),
|
||||
screen = screenName
|
||||
)
|
||||
}
|
||||
}
|
||||
CtaType.UPDATE_SUM_INSURED.value -> {
|
||||
@@ -787,17 +808,21 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
analyticsEventHandler?.postAnalyticsEvent(
|
||||
AnalyticsEvent(
|
||||
name = InsuranceAnalyticsConstants.HI_btn_click_change_sum_insured,
|
||||
properties = mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_SUM_INSURED,
|
||||
naviClickAction.parameters?.getOrNull(0)?.value.orEmpty()
|
||||
properties =
|
||||
mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.metaData
|
||||
?.applicationType
|
||||
.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_SUM_INSURED,
|
||||
naviClickAction.parameters?.getOrNull(0)?.value.orEmpty()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -805,13 +830,17 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
analyticsEventHandler?.postAnalyticsEvent(
|
||||
AnalyticsEvent(
|
||||
name = InsuranceAnalyticsConstants.HI_btn_click_quote_edit_deductible,
|
||||
properties = mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType.orEmpty()
|
||||
properties =
|
||||
mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.metaData
|
||||
?.applicationType
|
||||
.orEmpty()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
listener?.navigateTo(naviClickAction.url ?: "", bundle)
|
||||
@@ -834,17 +863,21 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
analyticsEventHandler?.postAnalyticsEvent(
|
||||
AnalyticsEvent(
|
||||
name = InsuranceAnalyticsConstants.HI_btn_click_quote_edit_members,
|
||||
properties = mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_ID,
|
||||
quoteViewModel.quoteId.value.orEmpty()
|
||||
properties =
|
||||
mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.metaData
|
||||
?.applicationType
|
||||
.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_ID,
|
||||
quoteViewModel.quoteId.value.orEmpty()
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -853,23 +886,34 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
analyticsEventHandler?.postAnalyticsEvent(
|
||||
AnalyticsEvent(
|
||||
name = InsuranceAnalyticsConstants.HI_btn_click_change_sum_insured,
|
||||
properties = mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_SUM_INSURED,
|
||||
quoteViewModel.quoteResponse.value?.headerWidget?.get(0)?.coverageDetails?.sumInsured
|
||||
?: EMPTY
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_PREMIUM_AMOUNT,
|
||||
quoteViewModel.quoteResponse.value?.footerWidget?.get(0)?.ctaTitle
|
||||
?: EMPTY
|
||||
properties =
|
||||
mutableMapOf<String, String>(
|
||||
Pair(NaviInsuranceAnalytics.SCREEN, screenName),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.APPLICATION_TYPE,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.metaData
|
||||
?.applicationType
|
||||
.orEmpty()
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_SUM_INSURED,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.headerWidget
|
||||
?.get(0)
|
||||
?.coverageDetails
|
||||
?.sumInsured
|
||||
?: EMPTY
|
||||
),
|
||||
Pair(
|
||||
NaviInsuranceAnalytics.QUOTE_PREMIUM_AMOUNT,
|
||||
quoteViewModel.quoteResponse.value
|
||||
?.footerWidget
|
||||
?.get(0)
|
||||
?.ctaTitle
|
||||
?: EMPTY
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
@@ -880,9 +924,11 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
}
|
||||
DOWNLOAD -> {
|
||||
downloadPolicyDocument(naviClickAction.parameters?.firstOrNull {
|
||||
it.key == KEY_DOCUMENT_URL
|
||||
}?.value)
|
||||
downloadPolicyDocument(
|
||||
naviClickAction.parameters
|
||||
?.firstOrNull { it.key == KEY_DOCUMENT_URL }
|
||||
?.value
|
||||
)
|
||||
}
|
||||
else -> {
|
||||
if (naviClickAction.url == VIEW_VIDEO) {
|
||||
@@ -915,25 +961,29 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
|
||||
private fun downloadPolicyDocument(policyDocumentUrl: String?) {
|
||||
naviPolicyDocumentDownloadManager = NaviPolicyDocumentDownloadManager(
|
||||
screenName,
|
||||
DownloadType.POLICY,
|
||||
Constants.POLICY_DOCUMENT_NAME,
|
||||
policyDocumentUrl,
|
||||
WeakReference<Activity>(activity)
|
||||
)
|
||||
naviPolicyDocumentDownloadManager =
|
||||
NaviPolicyDocumentDownloadManager(
|
||||
screenName,
|
||||
DownloadType.POLICY,
|
||||
Constants.POLICY_DOCUMENT_NAME,
|
||||
policyDocumentUrl,
|
||||
WeakReference<Activity>(activity)
|
||||
)
|
||||
naviPolicyDocumentDownloadManager?.start()
|
||||
}
|
||||
|
||||
private fun navigateToPaymentsScreen(checkoutOptionsResponse: CheckoutOptionsResponse) {
|
||||
val offerDetails = quoteViewModel.v1QuoteOfferDetail.value
|
||||
if (offerDetails != null) {
|
||||
val paymentMethodSelectionFragment = PaymentMethodSelectionFragment.newInstance(
|
||||
offerDetails,
|
||||
checkoutOptionsResponse,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType
|
||||
)
|
||||
activity?.supportFragmentManager?.beginTransaction()
|
||||
val paymentMethodSelectionFragment =
|
||||
PaymentMethodSelectionFragment.newInstance(
|
||||
offerDetails,
|
||||
checkoutOptionsResponse,
|
||||
quoteViewModel.quoteResponse.value?.metaData?.applicationType
|
||||
)
|
||||
activity
|
||||
?.supportFragmentManager
|
||||
?.beginTransaction()
|
||||
?.setCustomAnimations(
|
||||
R.anim.slide_in_right,
|
||||
R.anim.slide_out_left,
|
||||
@@ -953,7 +1003,6 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private fun clearListeners() {
|
||||
listener = null
|
||||
locationManager = null
|
||||
@@ -976,15 +1025,9 @@ class QuoteOfferFragment : BaseFragment(), WidgetCallback, View.OnClickListener
|
||||
}
|
||||
}
|
||||
|
||||
override fun widgetStateChanged(position: Int?, data: Pair<String, Any>?, action: String) {
|
||||
override fun widgetStateChanged(position: Int?, data: Pair<String, Any>?, action: String) {}
|
||||
|
||||
}
|
||||
override fun widgetError(position: Int, payload: Any?, action: String) {}
|
||||
|
||||
override fun widgetError(position: Int, payload: Any?, action: String) {
|
||||
|
||||
}
|
||||
|
||||
override fun widgetScrollTo(position: Int) {
|
||||
|
||||
}
|
||||
override fun widgetScrollTo(position: Int) {}
|
||||
}
|
||||
|
||||
@@ -265,7 +265,7 @@ fun TextView.setTextFieldData(textFieldData: TextFieldData?) {
|
||||
data.gradient?.let { gradient ->
|
||||
if (
|
||||
isValidHexColor(gradient.startGradientColor) &&
|
||||
isValidHexColor(gradient.endGradientColor)
|
||||
isValidHexColor(gradient.endGradientColor)
|
||||
) {
|
||||
val shader =
|
||||
LinearGradient(
|
||||
@@ -516,10 +516,10 @@ class CustomTypefaceSpan(family: String?, private val newType: Typeface) : Typef
|
||||
|
||||
fun isValidIndexRange(textData: String, startEndIndex: Pair<Int, Int>): Boolean {
|
||||
return startEndIndex.first >= 0 &&
|
||||
startEndIndex.first < textData.length &&
|
||||
startEndIndex.second >= 0 &&
|
||||
startEndIndex.second <= textData.length &&
|
||||
startEndIndex.first <= startEndIndex.second
|
||||
startEndIndex.first < textData.length &&
|
||||
startEndIndex.second >= 0 &&
|
||||
startEndIndex.second <= textData.length &&
|
||||
startEndIndex.first <= startEndIndex.second
|
||||
}
|
||||
|
||||
fun getStartEndIndex(
|
||||
@@ -571,22 +571,22 @@ fun List<MultiWidgetConstraint>.validate(info: List<NaviWidget>): Boolean {
|
||||
val validateLoanAmount =
|
||||
validateRequiredLoanAmount(
|
||||
propertyPurchaseValue =
|
||||
(info.getWidget(widgetId = multiWidgetConstraint.dependencyWidgetId)
|
||||
as? LabelWithInputWidget)
|
||||
?.inputTextItemData()
|
||||
?.savedText,
|
||||
(info.getWidget(widgetId = multiWidgetConstraint.dependencyWidgetId)
|
||||
as? LabelWithInputWidget)
|
||||
?.inputTextItemData()
|
||||
?.savedText,
|
||||
loanAmountRequired =
|
||||
(info.getWidget(widgetId = multiWidgetConstraint.widgetId)
|
||||
as? LabelWithInputWidget)
|
||||
?.inputTextItemData()
|
||||
?.savedText
|
||||
(info.getWidget(widgetId = multiWidgetConstraint.widgetId)
|
||||
as? LabelWithInputWidget)
|
||||
?.inputTextItemData()
|
||||
?.savedText
|
||||
)
|
||||
valid = validateLoanAmount and (valid)
|
||||
if (validateLoanAmount.not()) {
|
||||
info.forEach {
|
||||
if (
|
||||
it is LabelWithInputWidget &&
|
||||
it.widgetId == multiWidgetConstraint.widgetId
|
||||
it.widgetId == multiWidgetConstraint.widgetId
|
||||
) {
|
||||
it.widgetError(
|
||||
WidgetError(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* * Copyright © 2019 by Navi Technologies Private Limited
|
||||
* * Copyright © 2019-2022 by Navi Technologies Limited
|
||||
* * All rights reserved. Strictly confidential
|
||||
*
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ const val WIDGET_TIME_ELAPSED = "WIDGET_TIME_ELAPSED"
|
||||
const val WIDGET_ID = "WIDGET_ID"
|
||||
const val WIDGET_VIEWED_TIME = "WIDGET_VIEWED_TIME"
|
||||
const val EMPTY = ""
|
||||
const val COMMA =","
|
||||
const val COMMA = ","
|
||||
const val OVERRIDE_EVENT = "override_event"
|
||||
const val TEXT_TRUE = "true"
|
||||
const val PRE_PAYMENT_TYPE = "PRE_PAYMENT_TYPE"
|
||||
@@ -81,5 +81,4 @@ const val FAILED_STATE = "failed"
|
||||
const val DOWNLOADING_STATE = "downloading"
|
||||
const val UPLOADING_STATE = "loading"
|
||||
const val FAILURE_AND_RETRY_STATE = "failure"
|
||||
const val ZERO_STRING ="0"
|
||||
|
||||
const val ZERO_STRING = "0"
|
||||
|
||||
@@ -251,5 +251,5 @@ class ViewHolderFactoryImpl<T : NaviBaseAdapterModel> : ViewHolderTypeFactory<T>
|
||||
PAYMENT_TOOLTIP_WIDGET -> PaymentTooltipWidgetVH(parent)
|
||||
else -> UnknownWidgetVH(parent)
|
||||
}
|
||||
as BaseViewHolder<T>
|
||||
as BaseViewHolder<T>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user