added chatbot for disbursement details
This commit is contained in:
@@ -14,6 +14,7 @@ import androidx.annotation.StyleRes
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import com.navi.chat.utils.ChatPLScreens
|
||||
import com.navi.common.extensions.orFalse
|
||||
import com.navi.common.listeners.FragmentInterchangeListener
|
||||
import com.navi.common.listeners.HeaderInteractionListener
|
||||
@@ -43,7 +44,9 @@ import com.naviapp.personalloan.intermediate.coupon.fragment.CouponFragment
|
||||
import com.naviapp.personalloan.intermediate.mfiinfo.fragment.MfiInfoFragment
|
||||
import com.naviapp.personalloan.intermediate.telco.fragment.TelcoOtpFragment
|
||||
import com.naviapp.personalloan.intermediate.topup.fragment.TopUpLoanIntroFragment
|
||||
import com.naviapp.personalloanrevamp.getloanRevamp.helper.GetLoanV2ViewHelper
|
||||
import com.naviapp.utils.Constants
|
||||
import com.naviapp.utils.EMPTY
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
|
||||
@AndroidEntryPoint
|
||||
@@ -51,6 +54,7 @@ class IntermediateActivity : BaseActivity(), View.OnClickListener,
|
||||
FragmentInterchangeListener, HeaderInteractionListener {
|
||||
|
||||
private lateinit var binding: ActivityIntermediateVerificationBinding
|
||||
private var currentScreen: String = EMPTY
|
||||
|
||||
private val sharedAggregatorVM: AggregatorSharedVM by lazy {
|
||||
ViewModelProvider(this).get(
|
||||
@@ -78,6 +82,7 @@ class IntermediateActivity : BaseActivity(), View.OnClickListener,
|
||||
)
|
||||
val fragmentTransaction = supportFragmentManager.beginTransaction()
|
||||
if (!supportFragmentManager.isStateSaved && !supportFragmentManager.isDestroyed) {
|
||||
updateCurrentScreen(currentScreenTag)
|
||||
fragmentTransaction.replace(
|
||||
getViewContainer(bundle.getBoolean(Constants.IS_FULL_SCREEN_VIEW)),
|
||||
fragment,
|
||||
@@ -150,6 +155,19 @@ class IntermediateActivity : BaseActivity(), View.OnClickListener,
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateCurrentScreen(screen: String) {
|
||||
currentScreen = screen
|
||||
}
|
||||
|
||||
private fun getTouchPointName(currentScreen: String): String? {
|
||||
when (currentScreen) {
|
||||
SubPageStatusType.MONEY_DISBURSEMENT_STATUS -> {
|
||||
return ChatPLScreens.PL_DELAYED_DISBURSEMENT_SCREEN.name
|
||||
}
|
||||
else -> return null
|
||||
}
|
||||
}
|
||||
|
||||
override val screenName: String
|
||||
get() = NaviAnalytics.INTERMEDIATE_VERIFICATION_SCREEN
|
||||
override val moduleName: ModuleNameV2
|
||||
@@ -157,7 +175,7 @@ class IntermediateActivity : BaseActivity(), View.OnClickListener,
|
||||
|
||||
private fun openHelpInfo() {
|
||||
if (isDead()) return
|
||||
CustomerSupportFragment.newInstance(screenName, null)
|
||||
CustomerSupportFragment.newInstance(screenName, getTouchPointName(currentScreen))
|
||||
.show(supportFragmentManager, CustomerSupportFragment.TAG)
|
||||
}
|
||||
|
||||
|
||||
@@ -218,6 +218,9 @@ class GetLoanV2Activity :
|
||||
NaviAnalytics.PL_GETLOAN_PAGE_LANDS_V2 -> {
|
||||
return ChatPLScreens.PL_LOAN_AGREEMENT_SCREEN.name
|
||||
}
|
||||
NaviAnalytics.DELAYED_DISBURSEMENT_DETAILS_V2_SCREEN -> {
|
||||
return ChatPLScreens.PL_DELAYED_DISBURSEMENT_SCREEN.name
|
||||
}
|
||||
else -> return null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,5 +15,6 @@ enum class ChatPLScreens {
|
||||
PL_BANK_DETAIL_AUTO_DEBIT_SCREEN,
|
||||
PL_LOAN_AGREEMENT_SCREEN,
|
||||
PL_CARD_SCREEN,
|
||||
PROFILE_CHAT_SCREEN
|
||||
PROFILE_CHAT_SCREEN,
|
||||
PL_DELAYED_DISBURSEMENT_SCREEN
|
||||
}
|
||||
Reference in New Issue
Block a user