[TP-20664] Skip permission bug fix (#5610)

* crash fix (#5591)

* Increase version name and code (#5590)

* font family bug fix (#5593)

* change roboto to tt (#5594)

* Fix dashboard refersh issue (#5596)

* Added screen orientation mode portrait (#5598)

* Fix dashboard refersh issue

* Added screen orientation mode portrait

* Feature/buy gold (#5597)

* TitleWithSubTitleWithImageWidget.kt

* ICON_TITLE_TIMER_WIDGET

* IconTitleTimerWidget

* add  new widget for reward dashboard

* added card background

* UI FIX

* UI FIX

* UI FIX

* refactoring

* add  new widget and mocks

* add mock and change in info activity

* add product fragment

* add product fragment and mocks

* remove hilt form shared vm

* button loader widget

* add product fragment repo

* button loader widget

* add fils in reward folder

* add button lottie

* add lottie file name

* change in lottie file

* refactoring and button clickable

* Impl tab layout with animation for page behaviour

* added reward history shimmer

* add dashboard support for rewards

* add header view layout

* clean code

* simple text widget handling

* simple text widget handling

* Import fix

* simple text widget padding contract

* Scroll and margin fix

* REMOVED DISABLED STATE OF BUTTON LOADER AND CHANGED BACKGROUND OF ICON TIMER WIDGET

* add events in widget

* add mock

* clean code and add mock

* clean mock

* fix

* changed styles.xml

* add reward nudge and change anylatics

* goldBuyInfoPage

* mock file

* digitalGoldInfo screen

* buy gold info lottie

* lottie and image for sell info widget

* Changes in BannerWidget

* Adding deeplink for DG FTUE screen

* gold ftue integration

* navigation handling

* adding activity theme and orientation

* Removing build files

* Reverting test code

* Remove dead code

* Merge conflict resolved

* resolving comments

* minor changes

* removing unused import, formatting change

* resolved comments

Co-authored-by: amansingh <amankasyapp@gmail.com>
Co-authored-by: Abhinav Gupta <abhinav.g@navi.com>
Co-authored-by: adarshs <adarsh.s@navi.com>

* font fixes (#5600)

Co-authored-by: Shivam Goyal <shivam.goyal@navi.com>

* font for OCR amount field (#5599)

* gold widget crash fix (#5595)

* Vkyc selfie orientation bug fix (#5602)

* crash fix (#5592)

* fix image orientation issue

Co-authored-by: Himanshu Tanwar <himanshu.tanwar@navi.com>
Co-authored-by: shuchi <shuchi.dwivedi@tesco.com>

* Feature/buy gold (#5604)

* TitleWithSubTitleWithImageWidget.kt

* ICON_TITLE_TIMER_WIDGET

* IconTitleTimerWidget

* add  new widget for reward dashboard

* added card background

* UI FIX

* UI FIX

* UI FIX

* refactoring

* add  new widget and mocks

* add mock and change in info activity

* add product fragment

* add product fragment and mocks

* remove hilt form shared vm

* button loader widget

* add product fragment repo

* button loader widget

* add fils in reward folder

* add button lottie

* add lottie file name

* change in lottie file

* refactoring and button clickable

* Impl tab layout with animation for page behaviour

* added reward history shimmer

* add dashboard support for rewards

* add header view layout

* clean code

* simple text widget handling

* simple text widget handling

* Import fix

* simple text widget padding contract

* Scroll and margin fix

* REMOVED DISABLED STATE OF BUTTON LOADER AND CHANGED BACKGROUND OF ICON TIMER WIDGET

* add events in widget

* add mock

* clean code and add mock

* clean mock

* fix

* changed styles.xml

* add reward nudge and change anylatics

* goldBuyInfoPage

* mock file

* digitalGoldInfo screen

* buy gold info lottie

* lottie and image for sell info widget

* Changes in BannerWidget

* Adding deeplink for DG FTUE screen

* gold ftue integration

* navigation handling

* adding activity theme and orientation

* Removing build files

* Reverting test code

* Remove dead code

* Merge conflict resolved

* resolving comments

* minor changes

* removing unused import, formatting change

* resolved comments

* replacing gold price chart images

Co-authored-by: amansingh <amankasyapp@gmail.com>
Co-authored-by: Abhinav Gupta <abhinav.g@navi.com>
Co-authored-by: adarshs <adarsh.s@navi.com>
Co-authored-by: shankar yadav <shankar.yadav@navi.com>

* Gi app fonts fix (#5603)

* GI app fonts fix

* GI app fonts fix

* Gi app fonts fix (#5607)



* small font fix

* old pan verification

* Additional check for old pan verification api call

* removed imports

Co-authored-by: Himanshu Tanwar <himanshu.tanwar@navi.com>
Co-authored-by: shankar yadav <shankar.yadav@navi.com>
Co-authored-by: Abhinav Gupta <abhinav.g@navi.com>
Co-authored-by: Apoorv Nigam <apoorv.nigam@navi.com>
Co-authored-by: amansingh <amankasyapp@gmail.com>
Co-authored-by: adarshs <adarsh.s@navi.com>
Co-authored-by: Balrambhai Sharma <sharma.balrambhai@navi.com>
Co-authored-by: Shivam Goyal <shivam.goyal@navi.com>
Co-authored-by: nikhil kumar <nikhil.kumar@navi.com>
Co-authored-by: Shuchi Dwivedi <shuchi.dwivedi@navi.com>
Co-authored-by: shuchi <shuchi.dwivedi@tesco.com>
Co-authored-by: shreyansuraj <shreyansu.raj@navi.com>
This commit is contained in:
Jegatheeswaran M
2023-03-13 13:01:53 +05:30
committed by GitHub Enterprise
parent 6df4e63a3e
commit e8f4f8e1f8
3 changed files with 29 additions and 4 deletions

View File

@@ -98,6 +98,7 @@ object ApiErrorTagType {
const val EXPERIAN_FAILURE = "EXPERIAN_FAILURE"
const val PAN_DEDUP_FAILURE = "PAN_DEDUP_FAILURE"
const val LOCATION_UPDATE_FAILED = "LOCATION_UPDATE_FAILED"
const val OLD_PAN_VERIFICATION_FAILED = "OLD_PAN_VERIFICATION_FAILED"
@StringDef(
SELFIE_UPLOAD,

View File

@@ -88,13 +88,13 @@ class PermissionViewModel(private val permissionRepository: PermissionRepository
}
}
fun fetchPanVerification() {
fun fetchPanVerification(tag: String? = null) {
viewModelScope.launch {
val response = permissionRepository.fetchPanVerification()
if (response.error == null && response.errors?.isEmpty().orTrue()) {
_panVerificationResponse.value = response.data
} else {
setErrorData(response.errors, response.error)
setErrorData(response.errors, response.error, tag)
}
}
}

View File

@@ -12,7 +12,6 @@ import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.text.TextUtils
import android.util.Log
import android.view.View
import androidx.core.content.ContextCompat
import androidx.databinding.DataBindingUtil
@@ -43,6 +42,7 @@ import com.naviapp.manager.viewmodel.UserDataViewModel
import com.naviapp.models.SubPageStatusType
import com.naviapp.models.response.UploadDataWithCtaAsyncResponse
import com.naviapp.network.ApiErrorTagType
import com.naviapp.network.ApiErrorTagType.OLD_PAN_VERIFICATION_FAILED
import com.naviapp.permission.viewmodel.PermissionViewModel
import com.naviapp.personalloan.getloan.activities.GetLoanActivity
import com.naviapp.personalloan.getloan.loandetails.viewmodels.LoanDetailsVM
@@ -110,6 +110,10 @@ class LoanEligibilityLoaderV2Activity : WifiTrackerBaseActivity() {
Pair(
handleLocationFailure,
ApiErrorTagType.LOCATION_UPDATE_FAILED
),
Pair(
handleOldPanVerificationFailure,
ApiErrorTagType.OLD_PAN_VERIFICATION_FAILED
)
),
actionErrorV2Enabled = true)
@@ -177,8 +181,10 @@ class LoanEligibilityLoaderV2Activity : WifiTrackerBaseActivity() {
}
}
permissionViewModel.permissionAsyncResponse.observeNonNull(this) { response ->
if (panVerificationType != null && panVerificationType.equals(NEW_PAN_VERIFICATION)) {
if (checkPanVerificationType(NEW_PAN_VERIFICATION)) {
loanDetailsVM.fetchPanVerificationV2()
} else if(intent.getStringExtra(FLOW_TYPE).orEmpty() == SKIP_PERMISSION || checkPanVerificationType(OLD_PAN_VERIFICATION)) {
permissionViewModel.fetchPanVerification(OLD_PAN_VERIFICATION_FAILED)
} else {
onSubmitPermissionDetails(response)
}
@@ -347,8 +353,20 @@ class LoanEligibilityLoaderV2Activity : WifiTrackerBaseActivity() {
deInitializeAsyncListeners(firebaseDataHelper, apiPollScheduler)
}
}
permissionViewModel.panVerificationResponse.observeNullable(this) { response ->
if (response?.isVerified.orFalse()) {
permissionViewModel.permissionAsyncResponse.value?.let { permissionResponse ->
onSubmitPermissionDetails(
permissionResponse
)
}
}
}
}
private fun checkPanVerificationType(panVerification: String): Boolean = (panVerificationType != null && panVerificationType.equals(panVerification))
private fun onSubmitPermissionDetails(response: UploadDataAsyncResponse) {
response.let {
firebaseInitPermission(
@@ -690,6 +708,11 @@ class LoanEligibilityLoaderV2Activity : WifiTrackerBaseActivity() {
sendLocation()
}
private val handleOldPanVerificationFailure: View.OnClickListener =
View.OnClickListener {
permissionViewModel.fetchPanVerification(OLD_PAN_VERIFICATION_FAILED)
}
override fun onDestroy() {
if (userDataViewModel.shouldFireDurationEvent()) {
analyticsEventTracker.trackUserDuration(
@@ -848,5 +871,6 @@ class LoanEligibilityLoaderV2Activity : WifiTrackerBaseActivity() {
private const val NEXT_SCREEN_TRANSITION_DELAY = AMOUNT_VIEW_ANIMATION_DELAY + 1000L
private const val PAN_VERIFICATION_TYPE = "PAN_VERIFICATION_TYPE"
private const val NEW_PAN_VERIFICATION = "NEW_PAN_VERIFICATION"
private const val OLD_PAN_VERIFICATION = "OLD_PAN_VERIFICATION"
}
}