TP-61716 | Loan Amount and Navi Logo on VKYC Meeting Screen (#10270)
This commit is contained in:
@@ -60,6 +60,7 @@ import com.navi.ap.screens.vkyc.models.VKYCAgentAssignedResponse
|
||||
import com.navi.ap.screens.vkyc.utils.ACTION_KYC_VKYC_CANCELLED_AT
|
||||
import com.navi.ap.screens.vkyc.utils.ACTION_KYC_VKYC_COMPLETED_AT
|
||||
import com.navi.ap.screens.vkyc.utils.CANCEL_VKYC_CALL
|
||||
import com.navi.ap.screens.vkyc.utils.FORMATTED_LOAN_AMOUNT
|
||||
import com.navi.ap.screens.vkyc.utils.HMS_ADD_VIDEO_TRACK
|
||||
import com.navi.ap.screens.vkyc.utils.HMS_AUTH_TOKEN
|
||||
import com.navi.ap.screens.vkyc.utils.HMS_SDK_JOIN_CALLED
|
||||
@@ -87,6 +88,7 @@ import com.navi.ap.utils.constants.BUTTON_BG_PRIMARY_HEX_CODE
|
||||
import com.navi.ap.utils.constants.BUTTON_BG_SECONDARY_HEX_CODE
|
||||
import com.navi.ap.utils.constants.CLIENT_REFERENCE_ID
|
||||
import com.navi.ap.utils.constants.DEFAULT_SOURCE_SCREEN
|
||||
import com.navi.ap.utils.constants.RUPEE_SYMBOL
|
||||
import com.navi.ap.utils.constants.SCREEN_NAME
|
||||
import com.navi.ap.utils.constants.TEXT_PRIMARY_HEX_CODE
|
||||
import com.navi.ap.utils.constants.WHITE_HEX_CODE
|
||||
@@ -96,6 +98,7 @@ import com.navi.base.utils.orFalse
|
||||
import com.navi.common.R as CommonR
|
||||
import com.navi.common.firebaseremoteconfig.FirebaseRemoteConfigHelper
|
||||
import com.navi.common.utils.Constants
|
||||
import com.navi.common.utils.EMPTY
|
||||
import com.navi.common.utils.SPACE
|
||||
import com.navi.design.common.ComposeSize
|
||||
import com.navi.design.font.FontWeightEnum
|
||||
@@ -433,7 +436,8 @@ private fun initUi(
|
||||
binding,
|
||||
getVKYCAgentAssignedResponse(bundle),
|
||||
activity,
|
||||
coroutineScope
|
||||
coroutineScope,
|
||||
bundle
|
||||
)
|
||||
}
|
||||
|
||||
@@ -454,7 +458,8 @@ private fun setVkycAgentImageAndName(
|
||||
binding: VkycMeetingRoomScreenBinding?,
|
||||
vkycAgentData: VKYCAgentAssignedResponse?,
|
||||
activity: ApplicationPlatformActivity,
|
||||
coroutineScope: CoroutineScope
|
||||
coroutineScope: CoroutineScope,
|
||||
bundle: Bundle
|
||||
) {
|
||||
vkycAgentData?.agentImageUrl?.let { imageUrl ->
|
||||
binding?.customerExecutiveImage?.setVisibilityState(View.GONE)
|
||||
@@ -469,12 +474,18 @@ private fun setVkycAgentImageAndName(
|
||||
tvAgentConnectedToast.setVisibilityState(View.VISIBLE)
|
||||
}
|
||||
}
|
||||
binding?.loanAmountValueText?.text =
|
||||
getFormattedLoanAmount(bundle.getString(FORMATTED_LOAN_AMOUNT))
|
||||
coroutineScope.launch {
|
||||
delay(vkycAgentData?.agentConnectedToastTimeout ?: 2500)
|
||||
binding?.tvAgentConnectedToast?.setVisibilityState(View.GONE)
|
||||
}
|
||||
}
|
||||
|
||||
private fun getFormattedLoanAmount(loanAmount: String?): String {
|
||||
return loanAmount?.let { RUPEE_SYMBOL.plus(loanAmount) } ?: run { EMPTY }
|
||||
}
|
||||
|
||||
private fun fillApiCall(
|
||||
viewModel: VKYCVideoCallingScreenViewModel,
|
||||
fields: List<FillRequest.ApplicationFields.Field>
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.navi.ap.screens.vkyc.models.VKYCAgentAssignedResponse
|
||||
import com.navi.ap.screens.vkyc.models.VKYCSettingsData
|
||||
import com.navi.ap.screens.vkyc.utils.AGENT_CONNECTED_TOAST_TIMEOUT
|
||||
import com.navi.ap.screens.vkyc.utils.ErrorType
|
||||
import com.navi.ap.screens.vkyc.utils.FORMATTED_LOAN_AMOUNT
|
||||
import com.navi.ap.screens.vkyc.utils.HMS_AUTH_TOKEN
|
||||
import com.navi.ap.screens.vkyc.utils.HMS_SDK_SETTINGS_DATA
|
||||
import com.navi.ap.screens.vkyc.utils.HMS_USER_NAME
|
||||
@@ -282,12 +283,14 @@ private fun handleVKYAgentAssignedResponseState(
|
||||
if (vkycAgentAssignedResponse.data?.status == AGENT_JOINED) {
|
||||
val hmsSdkSettingsData =
|
||||
viewModel.handle.get<VKYCSettingsData>(HMS_SDK_SETTINGS_DATA)
|
||||
val formattedLoanAmount = viewModel.handle.get<String>(FORMATTED_LOAN_AMOUNT)
|
||||
val bundleData =
|
||||
getBundleData(
|
||||
bundle = bundle,
|
||||
data = vkycAgentAssignedResponse.data,
|
||||
vkycSettingsData = hmsSdkSettingsData,
|
||||
clientReferenceId = viewModel.handle[CLIENT_REFERENCE_ID]
|
||||
clientReferenceId = viewModel.handle[CLIENT_REFERENCE_ID],
|
||||
formattedLoanAmount = formattedLoanAmount
|
||||
)
|
||||
logApEvent(eventName = VKYC_AGENT_JOINED)
|
||||
activity.navController.navigate(
|
||||
@@ -362,7 +365,8 @@ private fun getBundleData(
|
||||
bundle: Bundle?,
|
||||
data: VKYCAgentAssignedResponse,
|
||||
vkycSettingsData: VKYCSettingsData?,
|
||||
clientReferenceId: String?
|
||||
clientReferenceId: String?,
|
||||
formattedLoanAmount: String?
|
||||
): Bundle {
|
||||
return Bundle().apply {
|
||||
putAll(bundle)
|
||||
@@ -378,5 +382,6 @@ private fun getBundleData(
|
||||
putString(VKYC_SETTINGS_PREVIEW_PUT_URL, vkycSettingsData?.previewPutUrl)
|
||||
putString(VKYC_SETTINGS_REFERENCE_ID, vkycSettingsData?.referenceId)
|
||||
putString(CLIENT_REFERENCE_ID, clientReferenceId)
|
||||
putString(FORMATTED_LOAN_AMOUNT, formattedLoanAmount)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,3 +65,4 @@ const val VKYC_ON_DESTROY = "VKYC_ON_DESTROY"
|
||||
const val CANCEL_VKYC_CALL = "CANCEL_VKYC_CALL"
|
||||
const val VKYC_AGENT_JOINED = "VKYC_AGENT_JOINED"
|
||||
const val COROUTINE_JOB_ON_COMPLETION_CALLED = "COROUTINE_JOB_ON_COMPLETION_CALLED"
|
||||
const val FORMATTED_LOAN_AMOUNT = "FORMATTED_LOAN_AMOUNT"
|
||||
|
||||
@@ -90,3 +90,4 @@ const val KEY_PAYMENT_SDK_VERSION = "KEY_PAYMENT_SDK_VERSION"
|
||||
const val KEY_PAYMENT_GATEWAY_EVENT_NAME = "paymentGatewayEventName"
|
||||
const val PAYMENT_DOT_GATEWAY_DOT = "payments.gateway."
|
||||
const val DOT_SDK_DOT = ".sdk."
|
||||
const val RUPEE_SYMBOL = "₹"
|
||||
|
||||
@@ -21,6 +21,18 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ic_navi_logo"
|
||||
android:layout_width="@dimen/dp_160"
|
||||
android:layout_height="@dimen/dp_20"
|
||||
android:layout_marginTop="@dimen/dp_16"
|
||||
android:paddingHorizontal="@dimen/layout_dp_24"
|
||||
android:src="@drawable/ic_navi_logo_with_name"
|
||||
app:layout_constraintBottom_toTopOf="@id/videoSurfaceView"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<live.hms.videoview.HMSVideoView
|
||||
android:id="@+id/videoSurfaceView"
|
||||
android:layout_width="@dimen/dp_0"
|
||||
@@ -29,7 +41,8 @@
|
||||
app:layout_constraintBottom_toTopOf="@id/button_guide"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
android:layout_marginTop="@dimen/dp_20"
|
||||
app:layout_constraintTop_toBottomOf="@+id/ic_navi_logo"/>
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/customerExecutiveViewCard"
|
||||
@@ -102,7 +115,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.8" />
|
||||
app:layout_constraintGuide_percent="0.86" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/iv_switch_camera"
|
||||
@@ -111,10 +124,10 @@
|
||||
android:background="@drawable/ic_bg_circle"
|
||||
android:onClick="@{()->vkycVideoCallingScreenViewModel.onFlipCameraClicked()}"
|
||||
android:padding="@dimen/dp_20"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/button_guide"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/button_guide"
|
||||
android:layout_marginBottom="@dimen/dp_24"
|
||||
app:srcCompat="@drawable/ic_switch_camera" />
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
@@ -261,6 +274,7 @@
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
tools:visibility="visible"
|
||||
android:layout_marginBottom="@dimen/dp_24"
|
||||
app:layout_constraintTop_toBottomOf="@id/face_guide_bottom">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
@@ -286,12 +300,57 @@
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_loan_amount"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/_16dp"
|
||||
android:layout_marginEnd="@dimen/_16dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/button_guide"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loan_amount_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/tt_regular"
|
||||
android:text="@string/loan_amount"
|
||||
android:textColor="@color/primaryColor"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/colon"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="@font/tt_regular"
|
||||
android:text="@string/semi_colon_with_space"
|
||||
android:textColor="@color/primaryColor"
|
||||
android:textSize="@dimen/sp_14" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/loan_amount_value_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_8"
|
||||
android:fontFamily="@font/tt_semi_bold"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/primaryColor"
|
||||
android:textSize="@dimen/sp_20"
|
||||
tools:text="$1,00,000.00" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<com.navi.design.textview.NaviTextView
|
||||
android:id="@+id/tv_agent_connected_toast"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/dp_20"
|
||||
android:layout_marginBottom="@dimen/dp_48"
|
||||
app:layout_constraintTop_toBottomOf="@id/button_guide"
|
||||
android:background="@drawable/increase_volume_bg"
|
||||
android:backgroundTint="@color/light_green_cyan"
|
||||
android:drawableStart="@drawable/ic_overlapped_tick"
|
||||
@@ -303,7 +362,7 @@
|
||||
android:paddingVertical="@dimen/dp_16"
|
||||
android:textColor="@color/successColor"
|
||||
android:textSize="@dimen/sp_14"
|
||||
android:visibility="visible"
|
||||
android:visibility="invisible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/customerExecutiveViewCard"
|
||||
app:layout_constraintStart_toStartOf="@id/customerExecutiveViewCard" />
|
||||
|
||||
Reference in New Issue
Block a user