|
@ -33,7 +33,6 @@ import com.nivesh.production.bajajfd.model.* |
|
|
import com.nivesh.production.bajajfd.repositories.MainRepository |
|
|
import com.nivesh.production.bajajfd.repositories.MainRepository |
|
|
import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity |
|
|
import com.nivesh.production.bajajfd.ui.activity.BajajFdMainActivity |
|
|
import com.nivesh.production.bajajfd.ui.providerfactory.StepTwoModelProviderFactory |
|
|
import com.nivesh.production.bajajfd.ui.providerfactory.StepTwoModelProviderFactory |
|
|
import com.nivesh.production.bajajfd.util.Common |
|
|
|
|
|
import com.nivesh.production.bajajfd.util.Common.Companion.commonErrorAutoCompleteMethod |
|
|
import com.nivesh.production.bajajfd.util.Common.Companion.commonErrorAutoCompleteMethod |
|
|
import com.nivesh.production.bajajfd.util.Common.Companion.commonErrorMethod |
|
|
import com.nivesh.production.bajajfd.util.Common.Companion.commonErrorMethod |
|
|
import com.nivesh.production.bajajfd.util.Common.Companion.commonSpinnerErrorMethod |
|
|
import com.nivesh.production.bajajfd.util.Common.Companion.commonSpinnerErrorMethod |
|
@ -52,11 +51,14 @@ import java.util.* |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class StepTwoBajajFDFragment : BaseFragment() { |
|
|
class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
private var _binding: FragmentBajajfdStepTwoBinding? = null |
|
|
private var _binding: FragmentBajajfdStepTwoBinding? = null |
|
|
private val binding get() = _binding!! |
|
|
private val binding get() = _binding!! |
|
|
|
|
|
|
|
|
private lateinit var rbBank: RadioButton |
|
|
private lateinit var rbBank: RadioButton |
|
|
private lateinit var rbPaymentMode: RadioButton |
|
|
private lateinit var rbPaymentMode: RadioButton |
|
|
private var cal = Calendar.getInstance() |
|
|
private var cal = Calendar.getInstance() |
|
|
|
|
|
|
|
|
private lateinit var listOfTitle: List<GetCodes> |
|
|
private lateinit var listOfTitle: List<GetCodes> |
|
|
private lateinit var listOfGender: List<GetCodes> |
|
|
private lateinit var listOfGender: List<GetCodes> |
|
|
private lateinit var listOfAnnualIncome: List<GetCodes> |
|
|
private lateinit var listOfAnnualIncome: List<GetCodes> |
|
@ -68,7 +70,6 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
private lateinit var listOfCities: List<DataObjectX> |
|
|
private lateinit var listOfCities: List<DataObjectX> |
|
|
private lateinit var listOfIFSC: MutableList<String> |
|
|
private lateinit var listOfIFSC: MutableList<String> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private lateinit var stepTwoBajajFDViewModel: StepTwoBajajFDViewModel |
|
|
private lateinit var stepTwoBajajFDViewModel: StepTwoBajajFDViewModel |
|
|
private lateinit var bankListAdapter: BankListAdapter |
|
|
private lateinit var bankListAdapter: BankListAdapter |
|
|
private lateinit var paymentModeAdapter: PaymentModeAdapter |
|
|
private lateinit var paymentModeAdapter: PaymentModeAdapter |
|
@ -524,32 +525,15 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
binding.btnAddBank.setOnClickListener { |
|
|
binding.btnAddBank.setOnClickListener { |
|
|
if (validateBank()) { |
|
|
if (validateBank()) { |
|
|
/// as |
|
|
|
|
|
|
|
|
|
|
|
val selectedOption: Int = binding.rgBank!!.checkedRadioButtonId |
|
|
|
|
|
|
|
|
|
|
|
val fullName= binding.edtFirstName.text.toString().plus(" ").plus(binding.edtMiddleName.text.toString()).plus(" ").plus(binding.edtLastName.text.toString()) |
|
|
|
|
|
verifyAccountNo( |
|
|
|
|
|
|
|
|
verifyAccountNo( |
|
|
binding.edtAccountNumber.text.toString(), |
|
|
binding.edtAccountNumber.text.toString(), |
|
|
binding.edtIFSC.text.toString(), |
|
|
binding.edtIFSC.text.toString(), |
|
|
fullName, |
|
|
|
|
|
|
|
|
binding.edtFirstName.text.toString().plus(" ") |
|
|
|
|
|
.plus(binding.edtMiddleName.text.toString()).plus(" ") |
|
|
|
|
|
.plus(binding.edtLastName.text.toString()), |
|
|
binding.edtMobileNumber.text.toString(), |
|
|
binding.edtMobileNumber.text.toString(), |
|
|
1 |
|
|
|
|
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// binding.radio.findViewById(selectedOption) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
|
|
|
|
) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -559,29 +543,23 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
if ((activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.ClientBanklist?.isEmpty()!!) { |
|
|
if ((activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.ClientBanklist?.isEmpty()!!) { |
|
|
binding.llBankDetails.visibility = View.VISIBLE |
|
|
binding.llBankDetails.visibility = View.VISIBLE |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
binding.llBankDetails.visibility = View.GONE |
|
|
binding.llBankDetails.visibility = View.GONE |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
binding.addBankDetail.setOnClickListener { |
|
|
binding.addBankDetail.setOnClickListener { |
|
|
if (bankListAdapter.itemCount == 5) { |
|
|
if (bankListAdapter.itemCount == 5) { |
|
|
showDialogValidation(mActivity, "You Can Not Add More Than Five Account") |
|
|
|
|
|
|
|
|
showDialogValidation(mActivity, getString(R.string.fiveAccountValidation)) |
|
|
} else { |
|
|
} else { |
|
|
showHideBankDetail() |
|
|
showHideBankDetail() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
titleApi() |
|
|
titleApi() |
|
|
// setUpRecyclerView() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setUpRecyclerView( |
|
|
setUpRecyclerView( |
|
|
(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.ClientBanklist, |
|
|
(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.ClientBanklist, |
|
|
(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.CLIENT_ACCNO1) |
|
|
|
|
|
|
|
|
(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.CLIENT_ACCNO1 |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
binding.tvPersonalDetails.setOnClickListener { |
|
|
binding.tvPersonalDetails.setOnClickListener { |
|
|
if (binding.llPersonalDetail.visibility == View.VISIBLE) { |
|
|
if (binding.llPersonalDetail.visibility == View.VISIBLE) { |
|
@ -600,12 +578,11 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
binding.tvBankDetails.setOnClickListener { |
|
|
binding.tvBankDetails.setOnClickListener { |
|
|
if (binding.llBankDetails.visibility == View.VISIBLE) { |
|
|
if (binding.llBankDetails.visibility == View.VISIBLE) { |
|
|
binding.llBankDetails.visibility = View.GONE |
|
|
binding.llBankDetails.visibility = View.GONE |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
binding.llBankDetails.visibility = View.VISIBLE |
|
|
binding.llBankDetails.visibility = View.VISIBLE |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
binding.btnNext.setOnClickListener { |
|
|
binding.btnNext.setOnClickListener { |
|
|
if (validation()) { |
|
|
if (validation()) { |
|
|
// Applicant Details |
|
|
// Applicant Details |
|
@ -708,8 +685,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
(activity as BajajFdMainActivity).nomineeGuardianDetails.GuardianAddress1 = |
|
|
(activity as BajajFdMainActivity).nomineeGuardianDetails.GuardianAddress1 = |
|
|
binding.edtGuardianAddress.text.toString() |
|
|
binding.edtGuardianAddress.text.toString() |
|
|
(activity as BajajFdMainActivity).nomineeGuardianDetails.GuardianAddress2 = "" |
|
|
(activity as BajajFdMainActivity).nomineeGuardianDetails.GuardianAddress2 = "" |
|
|
(activity as BajajFdMainActivity).nomineeGuardianDetails.GuardianAddress3 = |
|
|
|
|
|
binding.spGuardianRelation.text.toString() |
|
|
|
|
|
|
|
|
(activity as BajajFdMainActivity).nomineeGuardianDetails.GuardianAddress3 = "" |
|
|
|
|
|
|
|
|
// Applicant Bank Details |
|
|
// Applicant Bank Details |
|
|
(activity as BajajFdMainActivity).fdBankDetails.AccountType = |
|
|
(activity as BajajFdMainActivity).fdBankDetails.AccountType = |
|
@ -736,6 +712,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
(activity as BajajFdMainActivity).createFDApplicantRequest.NomineeGuardianDetails = |
|
|
(activity as BajajFdMainActivity).createFDApplicantRequest.NomineeGuardianDetails = |
|
|
(activity as BajajFdMainActivity).nomineeGuardianDetails |
|
|
(activity as BajajFdMainActivity).nomineeGuardianDetails |
|
|
|
|
|
|
|
|
|
|
|
(activity as BajajFdMainActivity).createFDApplicantRequest.UniqueId = "" |
|
|
|
|
|
|
|
|
(activity as BajajFdMainActivity).createFDRequest.CreateFDApplicationRequest = |
|
|
(activity as BajajFdMainActivity).createFDRequest.CreateFDApplicationRequest = |
|
|
(activity as BajajFdMainActivity).createFDApplicantRequest |
|
|
(activity as BajajFdMainActivity).createFDApplicantRequest |
|
@ -746,14 +723,11 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
createFDApi((activity as BajajFdMainActivity).createFDRequest) |
|
|
createFDApi((activity as BajajFdMainActivity).createFDRequest) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
binding.btnBack.setOnClickListener { |
|
|
binding.btnBack.setOnClickListener { |
|
|
(activity as BajajFdMainActivity).binding.viewPager.currentItem = 0 |
|
|
(activity as BajajFdMainActivity).binding.viewPager.currentItem = 0 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private fun createFDApi(data: CreateFDRequest) { |
|
|
private fun createFDApi(data: CreateFDRequest) { |
|
@ -777,7 +751,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
createFDApplicationResponse.Response.Errors[0].ErrorMessage |
|
|
createFDApplicationResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -788,7 +762,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -801,11 +775,10 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun ifscCodeCheckApi(ifsc: String) { |
|
|
private fun ifscCodeCheckApi(ifsc: String) { |
|
|
if (ifsc.length ==11) { |
|
|
|
|
|
|
|
|
if (ifsc.length >= 10) { |
|
|
stepTwoBajajFDViewModel.ifscCodeApi(ifsc, activity as BajajFdMainActivity) |
|
|
stepTwoBajajFDViewModel.ifscCodeApi(ifsc, activity as BajajFdMainActivity) |
|
|
stepTwoBajajFDViewModel.getifscCodeCheckMutableData.observe(viewLifecycleOwner) { response -> |
|
|
|
|
|
|
|
|
stepTwoBajajFDViewModel.getIfscCodeCheckMutableData.observe(viewLifecycleOwner) { response -> |
|
|
when (response) { |
|
|
when (response) { |
|
|
is Resource.Success -> { |
|
|
is Resource.Success -> { |
|
|
val getIFSCCodeListResponse = |
|
|
val getIFSCCodeListResponse = |
|
@ -827,27 +800,20 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
listOfIFSC |
|
|
listOfIFSC |
|
|
) |
|
|
) |
|
|
binding.edtIFSC.setAdapter(adapter) |
|
|
binding.edtIFSC.setAdapter(adapter) |
|
|
|
|
|
|
|
|
binding.edtIFSC.setOnItemClickListener { _, _, position, _ -> |
|
|
binding.edtIFSC.setOnItemClickListener { _, _, position, _ -> |
|
|
if (listOfIFSC.size > 0) { |
|
|
if (listOfIFSC.size > 0) { |
|
|
binding.edtIFSC.setText(adapter.getItem(position).toString()) |
|
|
|
|
|
|
|
|
binding.edtIFSC.setText( |
|
|
|
|
|
adapter.getItem(position).toString() |
|
|
|
|
|
) |
|
|
binding.edtIFSC.setSelection(binding.edtIFSC.text.toString().length) |
|
|
binding.edtIFSC.setSelection(binding.edtIFSC.text.toString().length) |
|
|
getIFSCDetailsApi(binding.edtIFSC.toString()) |
|
|
|
|
|
|
|
|
getIFSCDetailsApi(binding.edtIFSC.text.toString()) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getIFSCCodeListResponse.Response.message |
|
|
getIFSCCodeListResponse.Response.message |
|
|
) |
|
|
) |
|
@ -858,7 +824,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
message |
|
|
message |
|
|
) |
|
|
) |
|
@ -881,34 +847,23 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
ifscCode, |
|
|
ifscCode, |
|
|
activity as BajajFdMainActivity |
|
|
activity as BajajFdMainActivity |
|
|
) |
|
|
) |
|
|
stepTwoBajajFDViewModel.getifscCodeDetailsCheckMutableData.observe(viewLifecycleOwner) { response -> |
|
|
|
|
|
|
|
|
stepTwoBajajFDViewModel.getIfscCodeDetailsCheckMutableData.observe(viewLifecycleOwner) { response -> |
|
|
when (response) { |
|
|
when (response) { |
|
|
is Resource.Success -> { |
|
|
is Resource.Success -> { |
|
|
val getIFSCCodeResponse = |
|
|
|
|
|
Gson().fromJson( |
|
|
|
|
|
response.data?.toString(), |
|
|
|
|
|
|
|
|
if (response.data.toString().isNotEmpty()) { |
|
|
|
|
|
val getIFSCCodeResponse = Gson().fromJson( |
|
|
|
|
|
response.data.toString(), |
|
|
GetIFSCCodeResponse::class.java |
|
|
GetIFSCCodeResponse::class.java |
|
|
) |
|
|
) |
|
|
getIFSCCodeResponse.Response.status_code.let { code -> |
|
|
|
|
|
when (code) { |
|
|
|
|
|
200 -> { |
|
|
|
|
|
binding.edtBankName.setText(getIFSCCodeResponse.BANK) |
|
|
|
|
|
binding.edtBankBranch.setText(getIFSCCodeResponse.BRANCH) |
|
|
|
|
|
} |
|
|
|
|
|
// 650 -> refreshToken() |
|
|
|
|
|
else -> { |
|
|
|
|
|
Common.showDialogValidation( |
|
|
|
|
|
activity as BajajFdMainActivity, |
|
|
|
|
|
getIFSCCodeResponse.Response.message |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
binding.edtBankName.setText(getIFSCCodeResponse.IFSCCODEServiceResult[0].BnkDescr) |
|
|
|
|
|
binding.edtBankName.setSelection(binding.edtBankName.text.toString().length) |
|
|
|
|
|
binding.edtBankBranch.setText(getIFSCCodeResponse.IFSCCODEServiceResult[0].BankBranch) |
|
|
|
|
|
binding.edtBankBranch.setSelection( binding.edtBankBranch.text.toString().length) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -917,27 +872,27 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
is Resource.DataError -> { |
|
|
is Resource.DataError -> { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private fun verifyAccountNo(bankAccount :String,Ifsc :String,name:String,phoneNumber:String,bankNo:Int) { |
|
|
|
|
|
|
|
|
private fun verifyAccountNo( |
|
|
|
|
|
bankAccount: String, Ifsc: String, name: String, phoneNumber: String, bankNo: Int |
|
|
|
|
|
) { |
|
|
|
|
|
|
|
|
val bankValidationApiRequest = BankValidationApiRequest() |
|
|
val bankValidationApiRequest = BankValidationApiRequest() |
|
|
bankValidationApiRequest.BankAccountNo=bankAccount |
|
|
|
|
|
bankValidationApiRequest.IFSC=Ifsc |
|
|
|
|
|
bankValidationApiRequest.Name=name |
|
|
|
|
|
bankValidationApiRequest.PhoneNo=phoneNumber |
|
|
|
|
|
bankValidationApiRequest.RoleId=5 |
|
|
|
|
|
bankValidationApiRequest.BankNo=bankNo |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bankValidationApiRequest.BankAccountNo = bankAccount |
|
|
|
|
|
bankValidationApiRequest.IFSC = Ifsc |
|
|
|
|
|
bankValidationApiRequest.Name = name |
|
|
|
|
|
bankValidationApiRequest.PhoneNo = phoneNumber |
|
|
|
|
|
bankValidationApiRequest.RoleId = 5 |
|
|
|
|
|
bankValidationApiRequest.BankNo = bankNo |
|
|
stepTwoBajajFDViewModel.bankValidationApi( |
|
|
stepTwoBajajFDViewModel.bankValidationApi( |
|
|
bankValidationApiRequest, |
|
|
bankValidationApiRequest, |
|
|
token, |
|
|
token, |
|
|
activity as BajajFdMainActivity |
|
|
activity as BajajFdMainActivity |
|
|
|
|
|
|
|
|
) |
|
|
) |
|
|
stepTwoBajajFDViewModel.bankValidationApiMutableData.observe(viewLifecycleOwner) { response -> |
|
|
stepTwoBajajFDViewModel.bankValidationApiMutableData.observe(viewLifecycleOwner) { response -> |
|
|
when (response) { |
|
|
when (response) { |
|
@ -951,51 +906,43 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
if (binding.tvAcVerify.visibility == View.GONE) { |
|
|
if (binding.tvAcVerify.visibility == View.GONE) { |
|
|
binding.tvAcVerify.visibility = View.VISIBLE |
|
|
binding.tvAcVerify.visibility = View.VISIBLE |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
when (code) { |
|
|
when (code) { |
|
|
200 -> { |
|
|
200 -> { |
|
|
if(getBankValidationApiResponse.Message=="Account verified") |
|
|
|
|
|
{ |
|
|
|
|
|
val clientBanklist =ClientBanklist() |
|
|
|
|
|
clientBanklist.AccountNumber=bankAccount |
|
|
|
|
|
clientBanklist.AccountType="sb" |
|
|
|
|
|
clientBanklist.BankName=binding.edtBankName.text.toString() |
|
|
|
|
|
clientBanklist.BranchName=binding.edtBankBranch.text.toString() |
|
|
|
|
|
clientBanklist.IFSCCode=Ifsc |
|
|
|
|
|
clientBanklist.IsValBank=1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (getBankValidationApiResponse.Message == "Account Verified") { |
|
|
|
|
|
val clientBankList = ClientBanklist() |
|
|
|
|
|
clientBankList.AccountNumber = bankAccount |
|
|
|
|
|
clientBankList.AccountType = "sb" |
|
|
|
|
|
clientBankList.BankName = |
|
|
|
|
|
binding.edtBankName.text.toString() |
|
|
|
|
|
clientBankList.BranchName = |
|
|
|
|
|
binding.edtBankBranch.text.toString() |
|
|
|
|
|
clientBankList.IFSCCode = Ifsc |
|
|
|
|
|
clientBankList.IsValBank = 1 |
|
|
(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.ClientBanklist?.let { |
|
|
(activity as BajajFdMainActivity).getClientDetailsResponse.ObjectResponse?.ClientBanklist?.let { |
|
|
listOfBanks.addAll( |
|
|
listOfBanks.addAll( |
|
|
it |
|
|
it |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
listOfBanks.add(clientBanklist) |
|
|
|
|
|
|
|
|
listOfBanks.add(clientBankList) |
|
|
setUpRecyclerView( |
|
|
setUpRecyclerView( |
|
|
listOfBanks , |
|
|
|
|
|
clientBanklist.AccountNumber.toString()) |
|
|
|
|
|
|
|
|
listOfBanks, |
|
|
|
|
|
clientBankList.AccountNumber.toString() |
|
|
|
|
|
) |
|
|
showHideBankDetail() |
|
|
showHideBankDetail() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, getBankValidationApiResponse.Message) |
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
showDialogValidation( |
|
|
|
|
|
activity as BajajFdMainActivity, |
|
|
|
|
|
getBankValidationApiResponse.Message |
|
|
|
|
|
) |
|
|
showHideBankDetail() |
|
|
showHideBankDetail() |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
else -> { |
|
|
else -> { |
|
|
showDialogValidation(activity as BajajFdMainActivity, getBankValidationApiResponse.Message) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
|
|
|
activity as BajajFdMainActivity, |
|
|
|
|
|
getBankValidationApiResponse.Message |
|
|
|
|
|
) |
|
|
showHideBankDetail() |
|
|
showHideBankDetail() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -1003,7 +950,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1014,12 +961,8 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun validateBank(): Boolean { |
|
|
private fun validateBank(): Boolean { |
|
|
return if (binding.edtIFSC.text.toString().isEmpty()) { // EditText |
|
|
return if (binding.edtIFSC.text.toString().isEmpty()) { // EditText |
|
|
commonErrorAutoCompleteMethod( |
|
|
commonErrorAutoCompleteMethod( |
|
@ -1056,35 +999,22 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private fun setUpRecyclerView( bankList: List<ClientBanklist>?, |
|
|
|
|
|
selectedAccount: String? = null) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// This code is used to get the screen dimensions of the user's device |
|
|
|
|
|
|
|
|
private fun setUpRecyclerView( |
|
|
|
|
|
bankList: List<ClientBanklist>?, |
|
|
|
|
|
selectedAccount: String? = null |
|
|
|
|
|
) { |
|
|
val displayMetrics = DisplayMetrics() |
|
|
val displayMetrics = DisplayMetrics() |
|
|
requireActivity().windowManager.defaultDisplay.getMetrics(displayMetrics) |
|
|
requireActivity().windowManager.defaultDisplay.getMetrics(displayMetrics) |
|
|
val width = displayMetrics.widthPixels.toDouble() |
|
|
val width = displayMetrics.widthPixels.toDouble() |
|
|
val height = displayMetrics.heightPixels |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
binding.rvClientBankList.layoutManager = LinearLayoutManager( |
|
|
binding.rvClientBankList.layoutManager = LinearLayoutManager( |
|
|
mActivity, |
|
|
mActivity, |
|
|
LinearLayoutManager.HORIZONTAL, |
|
|
LinearLayoutManager.HORIZONTAL, |
|
|
false |
|
|
false |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bankListAdapter = BankListAdapter( |
|
|
|
|
|
bankList, |
|
|
|
|
|
selectedAccount,width |
|
|
|
|
|
) |
|
|
|
|
|
binding.rvClientBankList.adapter = bankListAdapter |
|
|
|
|
|
|
|
|
bankListAdapter = BankListAdapter(bankList, selectedAccount, width) |
|
|
|
|
|
binding.rvClientBankList.adapter = bankListAdapter |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun datePicker(edtDOB: TextInputEditText) { |
|
|
private fun datePicker(edtDOB: TextInputEditText) { |
|
|
val year = cal.get(Calendar.YEAR) |
|
|
val year = cal.get(Calendar.YEAR) |
|
|
val month = cal.get(Calendar.MONTH) |
|
|
val month = cal.get(Calendar.MONTH) |
|
@ -1094,7 +1024,6 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
if (monthOfYear.toString().length == 1) { |
|
|
if (monthOfYear.toString().length == 1) { |
|
|
"0".plus(monthOfYear) |
|
|
"0".plus(monthOfYear) |
|
|
} |
|
|
} |
|
|
// edtDOB.setText(getDate(dayOfMonth.toString() + "-" + (monthOfYear + 1) + "-" + years)) |
|
|
|
|
|
edtDOB.setText( |
|
|
edtDOB.setText( |
|
|
years.toString().plus("-").plus(monthOfYear + 1).plus("-") |
|
|
years.toString().plus("-").plus(monthOfYear + 1).plus("-") |
|
|
.plus(dayOfMonth.toString()) |
|
|
.plus(dayOfMonth.toString()) |
|
@ -1156,7 +1085,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1228,7 +1157,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -1239,7 +1168,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1279,7 +1208,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -1290,7 +1219,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1306,7 +1235,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
private fun setUpRecyclerViewPaymentMode(listOfPayMode: List<GetCodes>) { |
|
|
private fun setUpRecyclerViewPaymentMode(listOfPayMode: List<GetCodes>) { |
|
|
|
|
|
|
|
|
binding.rvPaymentMode.layoutManager = |
|
|
binding.rvPaymentMode.layoutManager = |
|
|
GridLayoutManager(activity as BajajFdMainActivity,2) |
|
|
|
|
|
|
|
|
GridLayoutManager(activity as BajajFdMainActivity, 2) |
|
|
paymentModeAdapter = PaymentModeAdapter( |
|
|
paymentModeAdapter = PaymentModeAdapter( |
|
|
listOfPayMode, |
|
|
listOfPayMode, |
|
|
listOfPayMode[0].Value |
|
|
listOfPayMode[0].Value |
|
@ -1314,7 +1243,6 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
binding.rvPaymentMode.adapter = paymentModeAdapter |
|
|
binding.rvPaymentMode.adapter = paymentModeAdapter |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun genderApi() { |
|
|
private fun genderApi() { |
|
|
val getCodeRequest = GetCodeRequest() |
|
|
val getCodeRequest = GetCodeRequest() |
|
|
getCodeRequest.ProductName = getString(R.string.bajajFD) |
|
|
getCodeRequest.ProductName = getString(R.string.bajajFD) |
|
@ -1351,7 +1279,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -1362,7 +1290,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1418,7 +1346,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -1429,7 +1357,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1479,7 +1407,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -1490,7 +1418,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1532,14 +1460,14 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
) |
|
|
) |
|
|
binding.spOccupation.setAdapter(adapter) |
|
|
binding.spOccupation.setAdapter(adapter) |
|
|
binding.spOccupation.setText( |
|
|
binding.spOccupation.setText( |
|
|
adapter.getItem(0)?.Value, |
|
|
|
|
|
|
|
|
adapter.getItem(0)?.Label, |
|
|
false |
|
|
false |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -1550,7 +1478,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1599,7 +1527,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
getCodeResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -1610,7 +1538,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1671,7 +1599,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
stateListResponse.response.message |
|
|
stateListResponse.response.message |
|
|
) |
|
|
) |
|
@ -1682,7 +1610,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1749,7 +1677,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
cityListResponse.response.message |
|
|
cityListResponse.response.message |
|
|
) |
|
|
) |
|
@ -1760,7 +1688,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1793,7 +1721,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
// 650 -> refreshToken() |
|
|
// 650 -> refreshToken() |
|
|
else -> { |
|
|
else -> { |
|
|
Common.showDialogValidation( |
|
|
|
|
|
|
|
|
showDialogValidation( |
|
|
activity as BajajFdMainActivity, |
|
|
activity as BajajFdMainActivity, |
|
|
getFDBankListResponse.Response.Errors[0].ErrorMessage |
|
|
getFDBankListResponse.Response.Errors[0].ErrorMessage |
|
|
) |
|
|
) |
|
@ -1804,7 +1732,7 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
|
|
|
|
|
|
is Resource.Error -> { |
|
|
is Resource.Error -> { |
|
|
response.message?.let { message -> |
|
|
response.message?.let { message -> |
|
|
Common.showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
|
|
|
|
|
|
showDialogValidation(activity as BajajFdMainActivity, message) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
is Resource.Loading -> { |
|
|
is Resource.Loading -> { |
|
@ -1975,7 +1903,11 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
getString(R.string.emptyState) |
|
|
getString(R.string.emptyState) |
|
|
) |
|
|
) |
|
|
} else if (binding.spCity.text.toString().isEmpty()) { // EditText |
|
|
} else if (binding.spCity.text.toString().isEmpty()) { // EditText |
|
|
commonSpinnerErrorMethod(binding.spCity, binding.tlCity, getString(R.string.emptyCity)) |
|
|
|
|
|
|
|
|
commonSpinnerErrorMethod( |
|
|
|
|
|
binding.spCity, |
|
|
|
|
|
binding.tlCity, |
|
|
|
|
|
getString(R.string.emptyCity) |
|
|
|
|
|
) |
|
|
} else if (binding.edtPinCode.text.toString().isEmpty()) { // EditText |
|
|
} else if (binding.edtPinCode.text.toString().isEmpty()) { // EditText |
|
|
commonErrorMethod( |
|
|
commonErrorMethod( |
|
|
binding.edtPinCode, |
|
|
binding.edtPinCode, |
|
@ -2041,29 +1973,31 @@ class StepTwoBajajFDFragment : BaseFragment() { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
override fun onDestroyView() { |
|
|
|
|
|
super.onDestroyView() |
|
|
|
|
|
_binding = null |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private fun showHideBankDetail() { |
|
|
private fun showHideBankDetail() { |
|
|
if (binding.llBankDetails.visibility == View.GONE) { |
|
|
if (binding.llBankDetails.visibility == View.GONE) { |
|
|
binding.llBankDetails.visibility = View.VISIBLE |
|
|
binding.llBankDetails.visibility = View.VISIBLE |
|
|
binding.addBankDetail.setCompoundDrawablesWithIntrinsicBounds(0,0,R.drawable.ic_minus,0) |
|
|
|
|
|
|
|
|
binding.addBankDetail.setCompoundDrawablesWithIntrinsicBounds( |
|
|
|
|
|
0, |
|
|
|
|
|
0, |
|
|
|
|
|
R.drawable.ic_minus, |
|
|
|
|
|
0 |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
binding.llBankDetails.visibility = View.GONE |
|
|
binding.llBankDetails.visibility = View.GONE |
|
|
binding.addBankDetail.setCompoundDrawablesWithIntrinsicBounds(0,0,R.drawable.ic_add_icon,0) |
|
|
|
|
|
|
|
|
binding.addBankDetail.setCompoundDrawablesWithIntrinsicBounds( |
|
|
|
|
|
0, |
|
|
|
|
|
0, |
|
|
|
|
|
R.drawable.ic_add_icon, |
|
|
|
|
|
0 |
|
|
|
|
|
) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
override fun onDestroyView() { |
|
|
|
|
|
super.onDestroyView() |
|
|
|
|
|
_binding = null |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|