|
|
@ -39,6 +39,7 @@ import com.nivesh.production.niveshfd.util.Common.Companion.getDate |
|
|
|
import com.nivesh.production.niveshfd.util.Common.Companion.isIndianMobileNo |
|
|
|
import com.nivesh.production.niveshfd.util.Common.Companion.isMinor |
|
|
|
import com.nivesh.production.niveshfd.util.Common.Companion.isValidEmail |
|
|
|
import com.nivesh.production.niveshfd.util.Common.Companion.isValidIndividualPan |
|
|
|
import com.nivesh.production.niveshfd.util.Common.Companion.isValidName |
|
|
|
import com.nivesh.production.niveshfd.util.Common.Companion.isValidPan |
|
|
|
import com.nivesh.production.niveshfd.util.Common.Companion.removeError |
|
|
@ -564,10 +565,10 @@ class StepTwoNiveshFDFragment : Fragment() { |
|
|
|
} |
|
|
|
} |
|
|
|
binding.tvBankDetails.setOnClickListener { |
|
|
|
if (binding.llBankDetails.visibility == View.VISIBLE) { |
|
|
|
binding.llBankDetails.visibility = View.GONE |
|
|
|
if (binding.llBank.visibility == View.VISIBLE) { |
|
|
|
binding.llBank.visibility = View.GONE |
|
|
|
} else { |
|
|
|
binding.llBankDetails.visibility = View.VISIBLE |
|
|
|
binding.llBank.visibility = View.VISIBLE |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1487,10 +1488,22 @@ class StepTwoNiveshFDFragment : Fragment() { |
|
|
|
listOfOccupation |
|
|
|
) |
|
|
|
binding.spOccupation.setAdapter(adapter) |
|
|
|
binding.spOccupation.setText( |
|
|
|
adapter.getItem(0)?.Label, |
|
|
|
false |
|
|
|
) |
|
|
|
|
|
|
|
val occupationCode = (activity as NiveshFdMainActivity).getClientDetailsResponse.ObjectResponse?.clientDetails?.clientMasterMFD?.CLIENT_OCCUPATION_CODE |
|
|
|
if (occupationCode.isNullOrEmpty()) { |
|
|
|
|
|
|
|
binding.spOccupation.setText( |
|
|
|
adapter.getItem(0)?.Label, |
|
|
|
false |
|
|
|
) |
|
|
|
}else{ |
|
|
|
for (title in listOfOccupation) { |
|
|
|
if (title.Value == occupationCode) { |
|
|
|
binding.spOccupation.setText(title.Label, false) |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 650 -> refreshToken() |
|
|
@ -1823,7 +1836,10 @@ class StepTwoNiveshFDFragment : Fragment() { |
|
|
|
) |
|
|
|
} else if (binding.edtDOB.text.toString().isEmpty()) { // EditText |
|
|
|
commonErrorMethod(binding.edtDOB, binding.tlDOB, getString(R.string.emptyDOB)) |
|
|
|
} else if (binding.edtPANNumber.text.toString().isEmpty()) { // EditText |
|
|
|
}else if (isMinor(binding.edtDOB.text.toString())) { // EditText |
|
|
|
commonErrorMethod(binding.edtDOB, binding.tlDOB, getString(R.string.minorApplicant)) |
|
|
|
} |
|
|
|
else if (binding.edtPANNumber.text.toString().isEmpty()) { // EditText |
|
|
|
commonErrorMethod( |
|
|
|
binding.edtPANNumber, |
|
|
|
binding.tlPanNumber, |
|
|
@ -1835,6 +1851,12 @@ class StepTwoNiveshFDFragment : Fragment() { |
|
|
|
binding.tlPanNumber, |
|
|
|
getString(R.string.invalidPAN) |
|
|
|
) |
|
|
|
} else if (!isValidIndividualPan(binding.edtPANNumber.text.toString())) { // EditText |
|
|
|
commonErrorMethod( |
|
|
|
binding.edtPANNumber, |
|
|
|
binding.tlPanNumber, |
|
|
|
getString(R.string.invalidIndividualPAN) |
|
|
|
) |
|
|
|
} else if (binding.spTitle.text.isEmpty()) { // Spinner |
|
|
|
commonSpinnerErrorMethod( |
|
|
|
binding.spTitle, |
|
|
|