|
|
@ -2,7 +2,6 @@ package com.nivesh.production.bajajfd.ui.fragment |
|
|
|
|
|
|
|
import android.Manifest |
|
|
|
import android.annotation.SuppressLint |
|
|
|
import android.app.Dialog |
|
|
|
import android.content.DialogInterface |
|
|
|
import android.content.pm.PackageManager |
|
|
|
import android.database.Cursor |
|
|
@ -50,7 +49,6 @@ class StepThreeBajajFDFragment : BaseFragment() { |
|
|
|
private val binding get() = _binding!! |
|
|
|
|
|
|
|
private lateinit var stepThreeBajajFDViewModel: StepThreeBajajFDViewModel |
|
|
|
private lateinit var dialog: Dialog |
|
|
|
private var takeImageResult: ActivityResultLauncher<Uri>? = null |
|
|
|
private var selectImageIntent: ActivityResultLauncher<String>? = null |
|
|
|
|
|
|
@ -62,7 +60,6 @@ class StepThreeBajajFDFragment : BaseFragment() { |
|
|
|
private var photoFileExt: String? = "" |
|
|
|
private var doc1FileExt: String? = "" |
|
|
|
private var doc2fileExt: String? = "" |
|
|
|
private var uniqueId: String? = "" |
|
|
|
private var docValue: String = "" |
|
|
|
private val mainPANUpload: Int = 1 |
|
|
|
private val mainPhotoUpload: Int = 2 |
|
|
@ -399,7 +396,7 @@ class StepThreeBajajFDFragment : BaseFragment() { |
|
|
|
du.ImageEncodeToBase64 = imageBase64 |
|
|
|
du.NiveshClientCode = |
|
|
|
(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.CLIENT_CODE |
|
|
|
du.UniqueId = uniqueId |
|
|
|
du.UniqueId = (activity as BajajFdMainActivity).uniqueId |
|
|
|
stepThreeBajajFDViewModel.documentsUpload( |
|
|
|
du, |
|
|
|
Constants.token, |
|
|
@ -468,9 +465,7 @@ class StepThreeBajajFDFragment : BaseFragment() { |
|
|
|
createFDApplicationResponse.Response.StatusCode.let { code -> |
|
|
|
when (code) { |
|
|
|
200 -> { |
|
|
|
(activity as BajajFdMainActivity).stepThreeApi( |
|
|
|
createFDApplicationResponse |
|
|
|
) |
|
|
|
(activity as BajajFdMainActivity).stepThreeApi() |
|
|
|
} |
|
|
|
// 650 -> refreshToken() |
|
|
|
else -> { |
|
|
@ -614,10 +609,6 @@ class StepThreeBajajFDFragment : BaseFragment() { |
|
|
|
) |
|
|
|
} |
|
|
|
|
|
|
|
fun displayReceivedData(createFDApplicationResponse: CreateFDApplicationResponse) { |
|
|
|
uniqueId = createFDApplicationResponse.Response.FDCreationDetailsResponse.UniqueId |
|
|
|
} |
|
|
|
|
|
|
|
private fun uriToBitmap(selectedFileUri: Uri): Bitmap? { |
|
|
|
try { |
|
|
|
val parcelFileDescriptor = |
|
|
|