Browse Source

code submitted

ManojBranch
Manoj 2 years ago
parent
commit
430bf4194e
31 changed files with 964 additions and 201 deletions
  1. +1
    -0
      app/src/main/java/com/nivesh/production/partnerOnBoarding/api/ApiClient.kt
  2. +7
    -20
      app/src/main/java/com/nivesh/production/partnerOnBoarding/interfaces/ApiInterface.kt
  3. +8
    -0
      app/src/main/java/com/nivesh/production/partnerOnBoarding/model/ImageSelectedModel.kt
  4. +5
    -0
      app/src/main/java/com/nivesh/production/partnerOnBoarding/model/ResultXXX.kt
  5. +1
    -0
      app/src/main/java/com/nivesh/production/partnerOnBoarding/model/request/PartnerRequest.kt
  6. +3
    -1
      app/src/main/java/com/nivesh/production/partnerOnBoarding/model/response/ValidateOTPResponse.kt
  7. +7
    -7
      app/src/main/java/com/nivesh/production/partnerOnBoarding/repositories/MainRepository.kt
  8. +3
    -0
      app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/activities/ViewPagerActivity.kt
  9. +37
    -17
      app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/AlmostThereFragment.kt
  10. +210
    -100
      app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/GetStartedFragment.kt
  11. +1
    -1
      app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/NewDistributorSignStepOne.kt
  12. +73
    -5
      app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/OTPFragment.kt
  13. +65
    -0
      app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/PaymentFragment.kt
  14. +21
    -17
      app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/SaveEAgreementFragment.kt
  15. +13
    -1
      app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/SignUpFragment.kt
  16. +8
    -7
      app/src/main/java/com/nivesh/production/partnerOnBoarding/util/Common.kt
  17. +2
    -7
      app/src/main/java/com/nivesh/production/partnerOnBoarding/util/Constants.kt
  18. +3
    -6
      app/src/main/java/com/nivesh/production/partnerOnBoarding/viewModels/OnBoardingViewModel.kt
  19. +11
    -0
      app/src/main/res/drawable/circle_red.xml
  20. BIN
      app/src/main/res/drawable/nivesh_logo.png
  21. +5
    -0
      app/src/main/res/drawable/svg_help.xml
  22. +38
    -7
      app/src/main/res/layout/fragment_get_started.xml
  23. +3
    -1
      app/src/main/res/layout/fragment_otp.xml
  24. +352
    -0
      app/src/main/res/layout/fragment_payment.xml
  25. +2
    -1
      app/src/main/res/layout/fragment_save_e_agreement.xml
  26. +60
    -0
      app/src/main/res/layout/payment_header.xml
  27. +6
    -0
      app/src/main/res/values-hi-rIN/strings.xml
  28. +5
    -1
      app/src/main/res/values/colors.xml
  29. +7
    -1
      app/src/main/res/values/strings.xml
  30. +1
    -1
      app/src/main/res/values/style.xml
  31. +6
    -0
      app/src/main/res/values/themes.xml

+ 1
- 0
app/src/main/java/com/nivesh/production/partnerOnBoarding/api/ApiClient.kt View File

@ -2,6 +2,7 @@ package com.nivesh.production.partnerOnBoarding.api
import com.nivesh.production.partnerOnBoarding.NiveshFdApplication import com.nivesh.production.partnerOnBoarding.NiveshFdApplication
import com.nivesh.production.partnerOnBoarding.interfaces.ApiInterface
import com.nivesh.production.partnerOnBoarding.util.Constants.Companion.BASE_URL import com.nivesh.production.partnerOnBoarding.util.Constants.Companion.BASE_URL
import okhttp3.OkHttpClient import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor import okhttp3.logging.HttpLoggingInterceptor


+ 7
- 20
app/src/main/java/com/nivesh/production/partnerOnBoarding/interfaces/ApiInterface.kt View File

@ -1,4 +1,4 @@
package com.nivesh.production.partnerOnBoarding.api
package com.nivesh.production.partnerOnBoarding.interfaces
import com.google.gson.JsonObject import com.google.gson.JsonObject
import com.nivesh.production.partnerOnBoarding.model.* import com.nivesh.production.partnerOnBoarding.model.*
@ -11,19 +11,6 @@ import retrofit2.Response
import retrofit2.http.* import retrofit2.http.*
interface ApiInterface { interface ApiInterface {
//
// @POST("GetRates")
// suspend fun getRates(
// @Body getRatesRequest: GetRatesRequest,
// @Header("token") token: String
// ): Response<JsonObject>
@GET("GetIFSC_Autofill?")
suspend fun getIFSCApi(@Query("prefix") ifsc : String): Response<JsonObject>
@GET("GetbankNames")
suspend fun getIFSCBankDetailsApi(@Query( "bankname") ifsc : String, @Header("token") token: String): Response<String>
@POST("Partner/CreatePartner") @POST("Partner/CreatePartner")
suspend fun postPartnerCreation(@Body partnerRequest: PartnerRequest): Response<JsonObject> suspend fun postPartnerCreation(@Body partnerRequest: PartnerRequest): Response<JsonObject>
@ -43,11 +30,11 @@ interface ApiInterface {
@POST("Partner/GetAMFIDetail") @POST("Partner/GetAMFIDetail")
suspend fun postAMFIDetail(@Body requestBody: RequestBody): Response<JsonObject> suspend fun postAMFIDetail(@Body requestBody: RequestBody): Response<JsonObject>
@GET//"User/GetPANDetail"
suspend fun getPANDetail(@Url url: String,@Query("PAN") value: String): Response<JsonObject>
@GET("User/GetPANDetail")
suspend fun getPANDetail(@Query("PAN") value: String): Response<JsonObject>
@GET//"User/GetDocumentType"
suspend fun getDocumentType(@Url url: String,@Query("Role") value: String, @Query("Type") type: String): Response<JsonObject>
@GET("User/GetAllDocumentsType")
suspend fun getDocumentType(@Query("Role") value: String, @Query("Type") type: String): Response<JsonObject>
@Multipart @Multipart
@POST("Partner/DocumentsUpload") @POST("Partner/DocumentsUpload")
@ -61,6 +48,6 @@ interface ApiInterface {
@POST("Partner/SaveEAgreement") @POST("Partner/SaveEAgreement")
suspend fun postSaveEAgreement(@Body requestBody: RequestBody): Response<JsonObject> suspend fun postSaveEAgreement(@Body requestBody: RequestBody): Response<JsonObject>
@GET
suspend fun getAllProduct(@Url url: String): Response<JsonObject>
@GET("User/GetAllProduct")
suspend fun getAllProduct(): Response<JsonObject>
} }

+ 8
- 0
app/src/main/java/com/nivesh/production/partnerOnBoarding/model/ImageSelectedModel.kt View File

@ -0,0 +1,8 @@
package com.nivesh.production.partnerOnBoarding.model
import java.io.File
data class ImageSelectedModel(
val pos: Int,
val `file`: File
)

+ 5
- 0
app/src/main/java/com/nivesh/production/partnerOnBoarding/model/ResultXXX.kt View File

@ -0,0 +1,5 @@
package com.nivesh.production.partnerOnBoarding.model
data class ResultXXX(
val ExpiryTimeInMinute: Int
)

+ 1
- 0
app/src/main/java/com/nivesh/production/partnerOnBoarding/model/request/PartnerRequest.kt View File

@ -11,6 +11,7 @@ data class PartnerRequest(
var DateOfIncorporation: String = "", var DateOfIncorporation: String = "",
var DateOfPassingAMFICertificate: Any? = null, var DateOfPassingAMFICertificate: Any? = null,
var EUINNumber: String = "", var EUINNumber: String = "",
var EUINName: String = "",
var Email: String = "", var Email: String = "",
var InterestedProductId: List<Any> = emptyList(), var InterestedProductId: List<Any> = emptyList(),
var Mobile: String = "", var Mobile: String = "",


+ 3
- 1
app/src/main/java/com/nivesh/production/partnerOnBoarding/model/response/ValidateOTPResponse.kt View File

@ -1,7 +1,9 @@
package com.nivesh.production.partnerOnBoarding.model.response package com.nivesh.production.partnerOnBoarding.model.response
import com.nivesh.production.partnerOnBoarding.model.ResultXXX
data class ValidateOTPResponse( data class ValidateOTPResponse(
val Message: String, val Message: String,
val Result: Any,
val Result: ResultXXX,
val Status: String val Status: String
) )

+ 7
- 7
app/src/main/java/com/nivesh/production/partnerOnBoarding/repositories/MainRepository.kt View File

@ -1,6 +1,6 @@
package com.nivesh.production.partnerOnBoarding.repositories package com.nivesh.production.partnerOnBoarding.repositories
import com.nivesh.production.partnerOnBoarding.api.ApiInterface
import com.nivesh.production.partnerOnBoarding.interfaces.ApiInterface
import com.nivesh.production.partnerOnBoarding.model.request.PartnerRequest import com.nivesh.production.partnerOnBoarding.model.request.PartnerRequest
import com.nivesh.production.partnerOnBoarding.model.request.SendOTPRequest import com.nivesh.production.partnerOnBoarding.model.request.SendOTPRequest
import com.nivesh.production.partnerOnBoarding.model.request.ValidatePartnerRequest import com.nivesh.production.partnerOnBoarding.model.request.ValidatePartnerRequest
@ -27,11 +27,11 @@ class MainRepository constructor(private val apiInterface: ApiInterface) {
suspend fun getAMFIDetailResponse(requestBody: RequestBody) = suspend fun getAMFIDetailResponse(requestBody: RequestBody) =
apiInterface.postAMFIDetail(requestBody) apiInterface.postAMFIDetail(requestBody)
suspend fun getPANDetailResponse(url: String,value: String) =
apiInterface.getPANDetail(url,value)
suspend fun getPANDetailResponse(value: String) =
apiInterface.getPANDetail(value)
suspend fun getDocumentTypeResponse(url: String,value: String,type: String) =
apiInterface.getDocumentType(url,value,type)
suspend fun getDocumentTypeResponse(value: String,type: String) =
apiInterface.getDocumentType(value,type)
suspend fun getDocumentUploadResponse(multipartBody: List<MultipartBody.Part>,pc: Int,pr: Int,di: Int) = suspend fun getDocumentUploadResponse(multipartBody: List<MultipartBody.Part>,pc: Int,pr: Int,di: Int) =
apiInterface.getUploadDocument(multipartBody,pc,pr,di) apiInterface.getUploadDocument(multipartBody,pc,pr,di)
@ -39,6 +39,6 @@ class MainRepository constructor(private val apiInterface: ApiInterface) {
suspend fun getSaveEAgreement(requestBody: RequestBody, token: String) = suspend fun getSaveEAgreement(requestBody: RequestBody, token: String) =
apiInterface.postSaveEAgreement(requestBody) apiInterface.postSaveEAgreement(requestBody)
suspend fun getAllProduct(url: String) =
apiInterface.getAllProduct(url)
suspend fun getAllProduct() =
apiInterface.getAllProduct()
} }

+ 3
- 0
app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/activities/ViewPagerActivity.kt View File

@ -20,6 +20,7 @@ class ViewPagerActivity : BaseActivity() {
private val stepTwoPagerFragment = StepTwoPagerFragment() private val stepTwoPagerFragment = StepTwoPagerFragment()
private val stepThreePagerFragment = StepThreePagerFragment() private val stepThreePagerFragment = StepThreePagerFragment()
var type : Int? = null var type : Int? = null
private var brokerType: String? = null
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
init() init()
@ -37,6 +38,7 @@ class ViewPagerActivity : BaseActivity() {
PreferenceManager(this@ViewPagerActivity).setIsFirstTime(true) PreferenceManager(this@ViewPagerActivity).setIsFirstTime(true)
type = intent.getIntExtra("type", 0) type = intent.getIntExtra("type", 0)
brokerType = intent.getStringExtra("arnType")
fragments = arrayOf( fragments = arrayOf(
stepOnePagerFragment, stepOnePagerFragment,
@ -101,6 +103,7 @@ class ViewPagerActivity : BaseActivity() {
fun stepFourApi() { fun stepFourApi() {
intent = Intent(this@ViewPagerActivity, SignUpActivity::class.java) intent = Intent(this@ViewPagerActivity, SignUpActivity::class.java)
intent.putExtra("type", type) intent.putExtra("type", type)
intent.putExtra("arnType",brokerType)
startActivity(intent) startActivity(intent)
} }

+ 37
- 17
app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/AlmostThereFragment.kt View File

@ -9,6 +9,7 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.Toast import android.widget.Toast
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import com.google.gson.Gson import com.google.gson.Gson
import com.nivesh.production.partnerOnBoarding.R import com.nivesh.production.partnerOnBoarding.R
@ -25,6 +26,7 @@ import com.nivesh.production.partnerOnBoarding.ui.activities.BaseActivity
import com.nivesh.production.partnerOnBoarding.ui.activities.SignUpActivity import com.nivesh.production.partnerOnBoarding.ui.activities.SignUpActivity
import com.nivesh.production.partnerOnBoarding.util.Common import com.nivesh.production.partnerOnBoarding.util.Common
import com.nivesh.production.partnerOnBoarding.util.Common.Companion.isValidPinCode import com.nivesh.production.partnerOnBoarding.util.Common.Companion.isValidPinCode
import com.nivesh.production.partnerOnBoarding.util.Common.Companion.showDialogValidation
import com.nivesh.production.partnerOnBoarding.viewModels.OnBoardingViewModel import com.nivesh.production.partnerOnBoarding.viewModels.OnBoardingViewModel
class AlmostThereFragment : BaseFragment() { class AlmostThereFragment : BaseFragment() {
@ -50,7 +52,6 @@ class AlmostThereFragment : BaseFragment() {
OnBoardingModelProviderFactory(MainRepository(ApiClient.getApiClientOne)) OnBoardingModelProviderFactory(MainRepository(ApiClient.getApiClientOne))
)[OnBoardingViewModel::class.java] )[OnBoardingViewModel::class.java]
val partnerRequest: PartnerRequest = val partnerRequest: PartnerRequest =
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
arguments?.getSerializable("InputValue", PartnerRequest::class.java)!! arguments?.getSerializable("InputValue", PartnerRequest::class.java)!!
@ -121,10 +122,18 @@ class AlmostThereFragment : BaseFragment() {
binding.spState.setText("") binding.spState.setText("")
} }
binding.edtDate.setOnClickListener { binding.edtDate.setOnClickListener {
Common.datePicker(activity as SignUpActivity, binding.edtDate)
Common.datePicker(activity as SignUpActivity, binding.edtDate,false)
}
binding.ivInfo.setOnClickListener {
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
QuestionsFragment(),
"GET STARTED",
true
)
} }
binding.edtFullName.addTextChangedListener(object : TextWatcher { binding.edtFullName.addTextChangedListener(object : TextWatcher {
@ -196,19 +205,12 @@ class AlmostThereFragment : BaseFragment() {
partnerRequest.OtherProductName = "" partnerRequest.OtherProductName = ""
partnerRequest.PartnerCode = PreferenceManager((activity as SignUpActivity)).getPartnerCode() partnerRequest.PartnerCode = PreferenceManager((activity as SignUpActivity)).getPartnerCode()
partnerRequest.PartnerType = "advisory" partnerRequest.PartnerType = "advisory"
partnerRequest.DateOfIncorporation = Common.getDateFromTimeMills(System.currentTimeMillis())
Log.e("check_partner", partnerRequest.toString()) Log.e("check_partner", partnerRequest.toString())
apiPartnerCreation(partnerRequest) apiPartnerCreation(partnerRequest)
} }
} }
}
private fun apiPartnerCreation(partnerRequest: PartnerRequest) {
(activity as SignUpActivity).viewModelOne.getPartnerCreateData(
partnerRequest,
"",
(activity as SignUpActivity)
)
(activity as SignUpActivity).viewModelOne.getPartnerCreationMutableData.observe( (activity as SignUpActivity).viewModelOne.getPartnerCreationMutableData.observe(
viewLifecycleOwner viewLifecycleOwner
) { response -> ) { response ->
@ -220,23 +222,41 @@ class AlmostThereFragment : BaseFragment() {
Log.e("check_res_partner", res.toString()) Log.e("check_res_partner", res.toString())
if (res.Status == "success") { if (res.Status == "success") {
Toast.makeText(requireActivity(), res.Message, Toast.LENGTH_LONG).show() Toast.makeText(requireActivity(), res.Message, Toast.LENGTH_LONG).show()
val bundle = Bundle() val bundle = Bundle()
bundle.putSerializable("mobile", arguments?.getString("mobile")!!) bundle.putSerializable("mobile", arguments?.getString("mobile")!!)
bundle.putSerializable("email", binding.edtEmail.text.toString()) bundle.putSerializable("email", binding.edtEmail.text.toString())
val fragment = SaveEAgreementFragment()
bundle.putString("arnType",arguments?.getString("arnType"))
var fragment: Fragment =
if(arguments?.getString("arnType").equals(getString(R.string.advisory),true)){
SaveEAgreementFragment()
}else{
PaymentFragment()
}
fragment.arguments = bundle fragment.arguments = bundle
replaceFragment(
addFragment(
activity as BaseActivity, activity as BaseActivity,
R.id.signUpContainer, R.id.signUpContainer,
fragment, fragment,
"AlmostThereFragment", "AlmostThereFragment",
true true
) )
}else{
showDialogValidation((activity as SignUpActivity),res.Message)
} }
} }
} }
private fun apiPartnerCreation(partnerRequest: PartnerRequest) {
(activity as SignUpActivity).viewModelOne.getPartnerCreateData(
partnerRequest,
"",
(activity as SignUpActivity)
)
Log.e("checkRequest", Gson().toJson(partnerRequest).toString())
}
private fun validate(): Boolean { private fun validate(): Boolean {
return if (binding.edtDate.text.toString().isEmpty()) { // EditText return if (binding.edtDate.text.toString().isEmpty()) { // EditText
Common.commonErrorMethod( Common.commonErrorMethod(
@ -258,8 +278,8 @@ class AlmostThereFragment : BaseFragment() {
) )
} else if (!Common.isValidEmail(binding.edtEmail.text.toString())) { // EditText } else if (!Common.isValidEmail(binding.edtEmail.text.toString())) { // EditText
Common.commonErrorMethod( Common.commonErrorMethod(
binding.edtFullName,
binding.tlFullName,
binding.edtEmail,
binding.tlEmail,
getString(R.string.invalidEmail) getString(R.string.invalidEmail)
) )
} else if (binding.edtAddressLine1.text.toString().isEmpty()) { // EditText } else if (binding.edtAddressLine1.text.toString().isEmpty()) { // EditText


+ 210
- 100
app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/GetStartedFragment.kt View File

@ -5,6 +5,7 @@ package com.nivesh.production.partnerOnBoarding.ui.fragments
import android.Manifest import android.Manifest
import android.annotation.SuppressLint import android.annotation.SuppressLint
import android.app.Activity import android.app.Activity
import android.app.Dialog
import android.content.DialogInterface import android.content.DialogInterface
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.database.Cursor import android.database.Cursor
@ -42,7 +43,9 @@ import com.nivesh.production.partnerOnBoarding.BuildConfig
import com.nivesh.production.partnerOnBoarding.R import com.nivesh.production.partnerOnBoarding.R
import com.nivesh.production.partnerOnBoarding.api.ApiClient import com.nivesh.production.partnerOnBoarding.api.ApiClient
import com.nivesh.production.partnerOnBoarding.databinding.FragmentGetStartedBinding import com.nivesh.production.partnerOnBoarding.databinding.FragmentGetStartedBinding
import com.nivesh.production.partnerOnBoarding.db.PreferenceManager
import com.nivesh.production.partnerOnBoarding.model.DataX import com.nivesh.production.partnerOnBoarding.model.DataX
import com.nivesh.production.partnerOnBoarding.model.ImageSelectedModel
import com.nivesh.production.partnerOnBoarding.model.request.PartnerRequest import com.nivesh.production.partnerOnBoarding.model.request.PartnerRequest
import com.nivesh.production.partnerOnBoarding.model.response.* import com.nivesh.production.partnerOnBoarding.model.response.*
import com.nivesh.production.partnerOnBoarding.providerfactory.OnBoardingModelProviderFactory import com.nivesh.production.partnerOnBoarding.providerfactory.OnBoardingModelProviderFactory
@ -85,10 +88,12 @@ class GetStartedFragment : BaseFragment() {
private var isFront: Boolean = false private var isFront: Boolean = false
private lateinit var viewModel: OnBoardingViewModel private lateinit var viewModel: OnBoardingViewModel
private lateinit var listOfDocType: List<Data> private lateinit var listOfDocType: List<Data>
private var imageSelectedList = ArrayList<File>()
private var imageSelectedList = ArrayList<ImageSelectedModel>()
private var imageSelectedArnEuinList = ArrayList<ImageSelectedModel>()
private var arnList = ArrayList<DataX>() private var arnList = ArrayList<DataX>()
private lateinit var arnData: DataX
private var arnData: DataX? = null
private lateinit var panRes: PANResponse private lateinit var panRes: PANResponse
private var selectedDocPosition = -1
private val permissions = arrayOf( private val permissions = arrayOf(
Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.READ_EXTERNAL_STORAGE,
@ -162,11 +167,11 @@ class GetStartedFragment : BaseFragment() {
documentTypeAPI(docType) documentTypeAPI(docType)
binding.edtPassingAMFI.setOnClickListener { binding.edtPassingAMFI.setOnClickListener {
Common.datePicker(activity as SignUpActivity, binding.edtPassingAMFI)
Common.datePicker(activity as SignUpActivity, binding.edtPassingAMFI,false)
} }
binding.edtExpiryAMFI.setOnClickListener { binding.edtExpiryAMFI.setOnClickListener {
Common.datePicker(activity as SignUpActivity, binding.edtExpiryAMFI)
Common.datePicker(activity as SignUpActivity, binding.edtExpiryAMFI,true)
} }
selectImageIntent = registerForActivityResult(ActivityResultContracts.GetContent()) selectImageIntent = registerForActivityResult(ActivityResultContracts.GetContent())
@ -180,7 +185,7 @@ class GetStartedFragment : BaseFragment() {
binding.edtArnNumber.addTextChangedListener(object : TextWatcher { binding.edtArnNumber.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
Common.removeError(binding.tlArnNumber)
if (s?.length!! == 7) { if (s?.length!! == 7) {
apiAMFIDetail("ARN", s.toString()) apiAMFIDetail("ARN", s.toString())
} }
@ -189,6 +194,22 @@ class GetStartedFragment : BaseFragment() {
override fun afterTextChanged(s: Editable?) {} override fun afterTextChanged(s: Editable?) {}
}) })
binding.edtEUINNumber.addTextChangedListener(object : TextWatcher{
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
Common.removeError(binding.tlEUINNumber)
}
override fun afterTextChanged(s: Editable?) {}
})
binding.edtEUINNumberNF.addTextChangedListener(object : TextWatcher{
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
Common.removeError(binding.tlEUINNumberNF)
}
override fun afterTextChanged(s: Editable?) {}
})
binding.ivInfo.setOnClickListener { binding.ivInfo.setOnClickListener {
replaceFragment( replaceFragment(
activity as BaseActivity, activity as BaseActivity,
@ -202,14 +223,14 @@ class GetStartedFragment : BaseFragment() {
binding.edtArnNumber.setOnItemClickListener { _, _, position, _ -> binding.edtArnNumber.setOnItemClickListener { _, _, position, _ ->
if (arnList != null && arnList.size > 0) { if (arnList != null && arnList.size > 0) {
arnData = arnList[position] arnData = arnList[position]
if (arnData.EUIN != null)
binding.edtEUINNumber.setText(arnData.EUIN)
if (arnData?.EUIN != null)
binding.edtEUINNumber.setText(arnData?.EUIN)
if (arnData.ARNValidFrom != null)
binding.edtPassingAMFI.setText(arnData.ARNValidFrom)
if (arnData?.ARNValidFrom != null)
binding.edtPassingAMFI.setText(arnData?.ARNValidFrom)
if (arnData.ARNValidTill != null)
binding.edtExpiryAMFI.setText(arnData.ARNValidTill)
if (arnData?.ARNValidTill != null)
binding.edtExpiryAMFI.setText(arnData?.ARNValidTill)
} else { } else {
binding.edtEUINNumber.setText("") binding.edtEUINNumber.setText("")
binding.edtPassingAMFI.setText("") binding.edtPassingAMFI.setText("")
@ -227,32 +248,41 @@ class GetStartedFragment : BaseFragment() {
} }
binding.btnNext.setOnClickListener { binding.btnNext.setOnClickListener {
if (arguments?.getString("arnType").equals("Associate", false)) {
val pt = PartnerRequest()
pt.Name = binding.edtFullNamePanCard.text.toString()
pt.PAN = binding.edtPanNumber.text.toString()
val fragment = AlmostThereFragment()
val bundle = Bundle()
bundle.putSerializable("InputValue", pt)
bundle.putSerializable("arnData", arnData)
bundle.putSerializable("panData", panRes)
bundle.putString("mobile", arguments?.getString("mobile"))
fragment.arguments = bundle
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
fragment,
"GET STARTED",
true
)
apiUploadDocument()
if (arguments?.getString("arnType").equals(getString(R.string.associateText), false)) {
if(validationAssociate()) {
val pt = PartnerRequest()
pt.Name = binding.edtFullNamePanCard.text.toString()
pt.PAN = binding.edtPanNumber.text.toString()
val fragment = AlmostThereFragment()
val bundle = Bundle()
bundle.putSerializable("InputValue", pt)
if(arnData!=null)
bundle.putSerializable("arnData", arnData)
bundle.putSerializable("panData", panRes)
bundle.putString("mobile", arguments?.getString("mobile"))
bundle.putString("arnType",arguments?.getString("arnType"))
fragment.arguments = bundle
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
fragment,
"GET STARTED",
true
)
}
} else if (arguments?.getString("arnType").equals("advisory", false)) {
if (validation()) {
} else if (arguments?.getString("arnType").equals(getString(R.string.advisory), false)) {
if (validationAdvisory()) {
val pt = PartnerRequest() val pt = PartnerRequest()
pt.ARNNumber = binding.edtArnNumber.text.toString() pt.ARNNumber = binding.edtArnNumber.text.toString()
pt.EUINNumber = binding.edtEUINNumber.text.toString()
if (binding.edtEUINNumber.visibility == View.VISIBLE)
pt.EUINNumber = binding.edtEUINNumber.text.toString()
else pt.EUINNumber = binding.edtEUINNumberNF.text.toString()
pt.DateOfExpiryAMFICertificate = binding.edtExpiryAMFI.text.toString() pt.DateOfExpiryAMFICertificate = binding.edtExpiryAMFI.text.toString()
pt.Name = binding.edtFullNamePanCard.text.toString() pt.Name = binding.edtFullNamePanCard.text.toString()
pt.PAN = binding.edtPanNumber.text.toString() pt.PAN = binding.edtPanNumber.text.toString()
@ -264,6 +294,7 @@ class GetStartedFragment : BaseFragment() {
bundle.putSerializable("arnData", arnData) bundle.putSerializable("arnData", arnData)
bundle.putSerializable("panData", panRes) bundle.putSerializable("panData", panRes)
bundle.putString("mobile", arguments?.getString("mobile")) bundle.putString("mobile", arguments?.getString("mobile"))
bundle.putString("arnType",arguments?.getString("arnType"))
fragment.arguments = bundle fragment.arguments = bundle
replaceFragment( replaceFragment(
@ -343,13 +374,15 @@ class GetStartedFragment : BaseFragment() {
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
Common.removeError(binding.tlPanNumber) Common.removeError(binding.tlPanNumber)
if (isValidIndividualPan(s.toString().trim())) {
binding.rlEUINUpload.visibility = View.GONE
} else {
binding.rlEUINUpload.visibility = View.VISIBLE
if (!TextUtils.isEmpty(binding.edtEUINNumber.text)) {
binding.edtEUINNumberNF.setText(binding.edtEUINNumber.text.toString())
binding.edtEUINNumber.visibility = View.GONE
if (arguments?.getString("arnType").equals(getString(R.string.advisory), true)) {
if (!isValidIndividualPan(s.toString().trim())) {
binding.rlEUINUpload.visibility = View.GONE
} else {
binding.rlEUINUpload.visibility = View.VISIBLE
if (!TextUtils.isEmpty(binding.edtEUINNumber.text)) {
binding.edtEUINNumberNF.setText(binding.edtEUINNumber.text.toString())
binding.edtEUINNumber.visibility = View.GONE
}
} }
} }
@ -390,8 +423,38 @@ class GetStartedFragment : BaseFragment() {
val getCodes: Data = parent.getItemAtPosition(position) as Data val getCodes: Data = parent.getItemAtPosition(position) as Data
imageSelectedList.clear() imageSelectedList.clear()
docValue = getCodes.DocumentType docValue = getCodes.DocumentType
selectedDocPosition = position
setVisibility(listOfDocType[position].DocumentType) setVisibility(listOfDocType[position].DocumentType)
} }
(activity as SignUpActivity).viewModelOne.getPANDetailMutableData.observe(
viewLifecycleOwner
) { response ->
showProgress(View.GONE)
val res: PANResponse =
Gson().fromJson(
response?.data.toString(),
PANResponse::class.java
)
panRes = res
isPanVerify = if (res.Status == "success") {
binding.edtPanNumber.setCompoundDrawablesWithIntrinsicBounds(
0,
0,
R.drawable.svg_pan_verified,
0
)
binding.edtFullNamePanCard.setText(res.Result.data.FullName)
true
} else {
commonErrorMethod(
binding.edtPanNumber,
binding.tlPanNumber,
getString(R.string.invalidPAN)
)
}
}
} }
private fun commonMethodForVisibility(visibility: Int) { private fun commonMethodForVisibility(visibility: Int) {
@ -411,7 +474,7 @@ class GetStartedFragment : BaseFragment() {
(activity as SignUpActivity).viewModelOne.getDocumentType( (activity as SignUpActivity).viewModelOne.getDocumentType(
"3",//Currently it is static "3",//Currently it is static
docType, docType,
Constants.BASE_URL_COMMON + "User/GetAllDocumentsType",
// Constants.BASE_URL_COMMON + "User/GetAllDocumentsType",
(activity as SignUpActivity) (activity as SignUpActivity)
) )
@ -446,48 +509,21 @@ class GetStartedFragment : BaseFragment() {
private fun apiPANVerify(pan: String) { private fun apiPANVerify(pan: String) {
try { try {
ProgressUtil.showLoading(activity as SignUpActivity)
(activity as SignUpActivity).viewModelOne.getPANDetail( (activity as SignUpActivity).viewModelOne.getPANDetail(
pan, pan,
Constants.BASE_URL_COMMON + "User/GetPANDetail",
(activity as SignUpActivity) (activity as SignUpActivity)
) )
(activity as SignUpActivity).viewModelOne.getPANDetailMutableData.observe(
viewLifecycleOwner
) { response ->
ProgressUtil.hideLoading()
val res: PANResponse =
Gson().fromJson(
response?.data.toString(),
PANResponse::class.java
)
panRes = res
isPanVerify = if (res.Status == "success") {
binding.edtPanNumber.setCompoundDrawablesWithIntrinsicBounds(
0,
0,
R.drawable.svg_pan_verified,
0
)
binding.edtFullNamePanCard.setText(res.Result.data.FullName)
true
} else {
commonErrorMethod(
binding.edtPanNumber,
binding.tlPanNumber,
getString(R.string.invalidPAN)
)
}
}
showProgress(View.VISIBLE)
} catch (e: Exception) { } catch (e: Exception) {
ProgressUtil.hideLoading() ProgressUtil.hideLoading()
Log.e("checkPANError", e.message.toString()) Log.e("checkPANError", e.message.toString())
} }
} }
private fun showProgress(view: Int) {
binding.rlProgress.visibility = view
}
private fun apiAMFIDetail(type: String, value: String?) { private fun apiAMFIDetail(type: String, value: String?) {
val jsonObject = JSONObject() val jsonObject = JSONObject()
val mediaType = "application/json; charset=utf-8".toMediaType() val mediaType = "application/json; charset=utf-8".toMediaType()
@ -519,14 +555,14 @@ class GetStartedFragment : BaseFragment() {
if (type == "ARN") { if (type == "ARN") {
if (arnList.size > 0) { if (arnList.size > 0) {
arnData = arnList[0] arnData = arnList[0]
if (arnData.EUIN != null)
binding.edtEUINNumber.setText(arnData.EUIN)
if (arnData?.EUIN != null)
binding.edtEUINNumber.setText(arnData?.EUIN)
if (arnData.ARNValidFrom != null)
binding.edtPassingAMFI.setText(arnData.ARNValidFrom)
if (arnData?.ARNValidFrom != null)
binding.edtPassingAMFI.setText(arnData?.ARNValidFrom)
if (arnData.ARNValidTill != null)
binding.edtExpiryAMFI.setText(arnData.ARNValidTill)
if (arnData?.ARNValidTill != null)
binding.edtExpiryAMFI.setText(arnData?.ARNValidTill)
} }
setArnUploadVisibility(View.GONE) setArnUploadVisibility(View.GONE)
@ -573,19 +609,46 @@ class GetStartedFragment : BaseFragment() {
return false return false
} }
private fun validation(): Boolean {
private fun validationAssociate(): Boolean {
return if (binding.edtPanNumber.text.toString().isEmpty()) {
commonErrorMethod(
binding.edtPanNumber,
binding.tlPanNumber,
getString(R.string.pleaseArnNum)
)
}else if (binding.edtFullNamePanCard.text.toString().isEmpty()) {
commonErrorMethod(
binding.edtFullNamePanCard,
binding.tlFullNamePanCard,
getString(R.string.pleaseArnNum)
)
} else if(imageSelectedList != null && imageSelectedList.size == 0){
showDialogValidation((activity as SignUpActivity),getString(R.string.addressProofType))
return false
}
else return true
}
private fun validationAdvisory(): Boolean {
return if (binding.edtArnNumber.text.toString().isEmpty()) { return if (binding.edtArnNumber.text.toString().isEmpty()) {
commonErrorMethodAutoComplete( commonErrorMethodAutoComplete(
binding.edtArnNumber, binding.edtArnNumber,
binding.tlArnNumber, binding.tlArnNumber,
getString(R.string.pleaseArnNum) getString(R.string.pleaseArnNum)
) )
} else if (binding.edtEUINNumber.text.toString().isEmpty()) {
} else if (binding.edtEUINNumber.visibility != View.VISIBLE && binding.edtEUINNumber.text.toString().isEmpty()) {
commonErrorMethod( commonErrorMethod(
binding.edtEUINNumber, binding.edtEUINNumber,
binding.tlEUINNumber, binding.tlEUINNumber,
getString(R.string.pleaseEuinNum) getString(R.string.pleaseEuinNum)
) )
} else if (binding.edtEUINNumberNF.visibility != View.VISIBLE && binding.edtEUINNumberNF.text.toString().isEmpty()
) {
commonErrorMethod(
binding.edtEUINNumberNF,
binding.tlEUINNumberNF,
getString(R.string.pleaseEuinNum)
)
} else if (binding.edtPassingAMFI.text.toString().isEmpty()) { } else if (binding.edtPassingAMFI.text.toString().isEmpty()) {
commonErrorMethod( commonErrorMethod(
binding.edtPassingAMFI, binding.edtPassingAMFI,
@ -604,13 +667,20 @@ class GetStartedFragment : BaseFragment() {
binding.tlPanNumber, binding.tlPanNumber,
getString(R.string.emptyPAN) getString(R.string.emptyPAN)
) )
} else if (binding.edtFullNamePanCard.text.toString().isEmpty()) {
}else if (!isPanVerify) {
commonErrorMethod(
binding.edtPanNumber,
binding.tlPanNumber,
getString(R.string.invalidPAN)
)
}
else if (binding.edtFullNamePanCard.text.toString().isEmpty()) {
commonErrorMethod( commonErrorMethod(
binding.edtFullNamePanCard, binding.edtFullNamePanCard,
binding.tlFullNamePanCard, binding.tlFullNamePanCard,
getString(R.string.full_name_as_on_pan_card) getString(R.string.full_name_as_on_pan_card)
) )
} else if (imageSelectedList == null && imageSelectedList.size == 0) {
} else if (imageSelectedList != null && imageSelectedList.size == 0) {
showDialogValidation( showDialogValidation(
(activity as SignUpActivity), (activity as SignUpActivity),
resources.getString(R.string.selectAddressProof) resources.getString(R.string.selectAddressProof)
@ -805,8 +875,8 @@ class GetStartedFragment : BaseFragment() {
if (size < maxFileSize) { if (size < maxFileSize) {
if (type == "c") { if (type == "c") {
encodedPANBase64(fileExtension) encodedPANBase64(fileExtension)
if (isFront) imageSelectedList.add(0, fileExtension)
else imageSelectedList.add(1, fileExtension)
if (isFront) imageSelectedList.add(ImageSelectedModel(0, fileExtension))
else imageSelectedList.add(ImageSelectedModel(0, fileExtension))
} else { } else {
val bitmap: Bitmap = val bitmap: Bitmap =
MediaStore.Images.Media.getBitmap(context?.contentResolver, uri) MediaStore.Images.Media.getBitmap(context?.contentResolver, uri)
@ -821,8 +891,8 @@ class GetStartedFragment : BaseFragment() {
fOut.close() fOut.close()
if (file.exists()) encodedPANBase64(file) if (file.exists()) encodedPANBase64(file)
if (isFront) imageSelectedList.add(0, file)
else imageSelectedList.add(1, file)
if (isFront) imageSelectedList.add(ImageSelectedModel(1, file))
else imageSelectedList.add(ImageSelectedModel(1, file))
Log.e("check_panString", panString + "\n" + bitmap.toString()) Log.e("check_panString", panString + "\n" + bitmap.toString())
} }
} else { } else {
@ -842,7 +912,8 @@ class GetStartedFragment : BaseFragment() {
if (size < maxFileSize) { if (size < maxFileSize) {
if (type == "c") { if (type == "c") {
encodedPANBase64(fileExtension) encodedPANBase64(fileExtension)
imageSelectedList.add(2, fileExtension)
imageSelectedArnEuinList.add(ImageSelectedModel(0, fileExtension))
binding.tvUploadARNTitle.visibility = View.GONE
} else { } else {
val bitmap: Bitmap = val bitmap: Bitmap =
MediaStore.Images.Media.getBitmap(context?.contentResolver, uri) MediaStore.Images.Media.getBitmap(context?.contentResolver, uri)
@ -857,8 +928,8 @@ class GetStartedFragment : BaseFragment() {
fOut.close() fOut.close()
if (file.exists()) encodedPANBase64(file) if (file.exists()) encodedPANBase64(file)
imageSelectedList.add(2, file)
Log.e("check_panString", panString + "\n" + bitmap.toString())
imageSelectedArnEuinList.add(ImageSelectedModel(0, file))
binding.tvUploadARNTitle.visibility = View.GONE
} }
} else { } else {
panString = "" panString = ""
@ -877,7 +948,8 @@ class GetStartedFragment : BaseFragment() {
if (size < maxFileSize) { if (size < maxFileSize) {
if (type == "c") { if (type == "c") {
encodedPANBase64(fileExtension) encodedPANBase64(fileExtension)
imageSelectedList.add(3, fileExtension)
imageSelectedArnEuinList.add(ImageSelectedModel(1, fileExtension))
binding.tvUploadEUINTitle.visibility = View.GONE
} else { } else {
val bitmap: Bitmap = val bitmap: Bitmap =
MediaStore.Images.Media.getBitmap(context?.contentResolver, uri) MediaStore.Images.Media.getBitmap(context?.contentResolver, uri)
@ -892,8 +964,8 @@ class GetStartedFragment : BaseFragment() {
fOut.close() fOut.close()
if (file.exists()) encodedPANBase64(file) if (file.exists()) encodedPANBase64(file)
imageSelectedList.add(3, file)
Log.e("check_panString", panString + "\n" + bitmap.toString())
imageSelectedArnEuinList.add(ImageSelectedModel(1, fileExtension))
binding.tvUploadEUINTitle.visibility = View.GONE
} }
} else { } else {
panString = "" panString = ""
@ -905,17 +977,56 @@ class GetStartedFragment : BaseFragment() {
} }
private fun apiUploadDocument() { private fun apiUploadDocument() {
if (imageSelectedList != null && imageSelectedList.size != 0) { if (imageSelectedList != null && imageSelectedList.size != 0) {
val part = ArrayList<MultipartBody.Part>() val part = ArrayList<MultipartBody.Part>()
imageSelectedList.forEachIndexed { index, element ->
imageSelectedList.forEachIndexed { _, element ->
if (element.pos == 0) {
part.add(prepareImagePart(element.file, "front"))
} else {
part.add(prepareImagePart(element.file, "back"))
}
}
if(selectedDocPosition != -1) {
(activity as SignUpActivity).viewModelOne.getDocumentUpload(
part,
PreferenceManager((activity as SignUpActivity)).getPartnerCode().toInt(),
5,
listOfDocType[selectedDocPosition].DocumentId,
(activity as SignUpActivity)
)
}else{
showDialogValidation((activity as SignUpActivity),"Document Not Selected")
}
(activity as SignUpActivity).viewModelOne.getDocumentUploadMutableData.observe(
viewLifecycleOwner
) { response ->
Log.e("check_upload_res", response.toString())
val res: DocumentUploadResponse =
Gson().fromJson(
response?.data.toString(),
DocumentUploadResponse::class.java
)
if (res.Status == getString(R.string.successText)) {
Toast.makeText(activity as SignUpActivity, res.Message, Toast.LENGTH_LONG)
.show()
}
}
}
if (index == 0) {
part.add(prepareImagePart(element, "front"))
if (imageSelectedArnEuinList != null && imageSelectedList.size != 0) {
val part = ArrayList<MultipartBody.Part>()
imageSelectedArnEuinList.forEachIndexed { _, element ->
if (element.pos == 0) {
part.add(prepareImagePart(element.file, "ARN"))
} else { } else {
part.add(prepareImagePart(element, "back"))
part.add(prepareImagePart(element.file, "EUIN"))
} }
} }
@ -926,7 +1037,6 @@ class GetStartedFragment : BaseFragment() {
8, 8,
(activity as SignUpActivity) (activity as SignUpActivity)
) )
(activity as SignUpActivity).viewModelOne.getDocumentUploadMutableData.observe( (activity as SignUpActivity).viewModelOne.getDocumentUploadMutableData.observe(
viewLifecycleOwner viewLifecycleOwner
) { response -> ) { response ->


+ 1
- 1
app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/NewDistributorSignStepOne.kt View File

@ -51,7 +51,7 @@ class NewDistributorSignStepOne : BaseFragment() {
)[OnBoardingViewModel::class.java] )[OnBoardingViewModel::class.java]
(activity as SignUpActivity).viewModelOne.getAllProduct( (activity as SignUpActivity).viewModelOne.getAllProduct(
Constants.BASE_URL_COMMON + "User/GetAllProduct",
// Constants.BASE_URL_COMMON + "User/GetAllProduct",
(activity as SignUpActivity) (activity as SignUpActivity)
) )


+ 73
- 5
app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/OTPFragment.kt View File

@ -1,6 +1,9 @@
package com.nivesh.production.partnerOnBoarding.ui.fragments package com.nivesh.production.partnerOnBoarding.ui.fragments
import android.annotation.SuppressLint
import android.app.Activity
import android.os.Bundle import android.os.Bundle
import android.os.CountDownTimer
import android.text.Editable import android.text.Editable
import android.text.InputFilter import android.text.InputFilter
import android.text.TextWatcher import android.text.TextWatcher
@ -10,10 +13,13 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import android.widget.EditText import android.widget.EditText
import android.widget.TextView
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
import com.google.gson.Gson
import com.nivesh.production.partnerOnBoarding.R import com.nivesh.production.partnerOnBoarding.R
import com.nivesh.production.partnerOnBoarding.databinding.FragmentOtpBinding import com.nivesh.production.partnerOnBoarding.databinding.FragmentOtpBinding
import com.nivesh.production.partnerOnBoarding.model.request.SendOTPRequest import com.nivesh.production.partnerOnBoarding.model.request.SendOTPRequest
import com.nivesh.production.partnerOnBoarding.model.response.ValidateOTPResponse
import com.nivesh.production.partnerOnBoarding.ui.activities.BaseActivity import com.nivesh.production.partnerOnBoarding.ui.activities.BaseActivity
import com.nivesh.production.partnerOnBoarding.ui.activities.SignUpActivity import com.nivesh.production.partnerOnBoarding.ui.activities.SignUpActivity
import com.nivesh.production.partnerOnBoarding.util.Common import com.nivesh.production.partnerOnBoarding.util.Common
@ -21,12 +27,17 @@ import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody import okhttp3.RequestBody
import okhttp3.RequestBody.Companion.toRequestBody import okhttp3.RequestBody.Companion.toRequestBody
import org.json.JSONObject import org.json.JSONObject
import java.util.concurrent.TimeUnit
class OTPFragment : BaseFragment() { class OTPFragment : BaseFragment() {
private var _binding: FragmentOtpBinding? = null private var _binding: FragmentOtpBinding? = null
private val binding get() = _binding!! private val binding get() = _binding!!
private var type: Int? = null private var type: Int? = null
private var mobile: String? = null private var mobile: String? = null
var countDownTimer: CountDownTimer? = null
var otpExpiryTime: Int = 0
var timerTime: Long = 0
var timeInSeconds = 0
override fun onCreateView( override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
@ -67,10 +78,14 @@ class OTPFragment : BaseFragment() {
binding.edtOTP5.setOnKeyListener(GenericKeyEvent(binding.edtOTP5, binding.edtOTP4)) binding.edtOTP5.setOnKeyListener(GenericKeyEvent(binding.edtOTP5, binding.edtOTP4))
binding.edtOTP6.setOnKeyListener(GenericKeyEvent(binding.edtOTP6, binding.edtOTP5)) binding.edtOTP6.setOnKeyListener(GenericKeyEvent(binding.edtOTP6, binding.edtOTP5))
binding.txtDigit.text = getString(R.string.sixDigitOTP).plus(" ").plus("+91.00000.00000")
binding.txtDigit.text = getString(R.string.sixDigitOTP).plus(" ").plus("\n+91 ".plus(mobile))
binding.txtResendOTP.setOnClickListener { binding.txtResendOTP.setOnClickListener {
smsAPI()
}
binding.txtChangeNumber.setOnClickListener{
(activity as SignUpActivity).onBackPressedDispatcher.onBackPressed()
} }
binding.btnSubmit.setOnClickListener { binding.btnSubmit.setOnClickListener {
@ -82,7 +97,54 @@ class OTPFragment : BaseFragment() {
(activity as SignUpActivity).viewModelOne.getSendOTPMutableData.observe( (activity as SignUpActivity).viewModelOne.getSendOTPMutableData.observe(
viewLifecycleOwner viewLifecycleOwner
) { response -> ) { response ->
Log.e("check_res_login", response?.data.toString())
val validateOTPResponse: ValidateOTPResponse =
Gson().fromJson(
response?.data.toString(),
ValidateOTPResponse::class.java
)
if(validateOTPResponse.Status == getString(R.string.successText)){
otpExpiryTime = validateOTPResponse.Result.ExpiryTimeInMinute
binding.txtTimer.visibility = View.VISIBLE
binding.txtTimer.text = otpExpiryTime.toString().plus(": 00")
binding.txtTimerText.text = getString(R.string.secondsTimer).plus(" ").plus(otpExpiryTime).plus(" minute")
showTimer((60000 * otpExpiryTime).toLong())
}
}
}
private fun showTimer(timerTime1: Long) {
countDownTimer?.cancel()
timerTime = 0
timerMethod(timerTime1, binding.txtTimer, activity)
}
private fun timerMethod(timerMilliSec: Long, txt_timer: TextView, mActivity: Activity?) {
try {
countDownTimer = object : CountDownTimer(timerMilliSec, 1000) {
@SuppressLint("SetTextI18n")
override fun onTick(millisUntilFinished: Long) {
txt_timer.text = "(" + String.format(
"%02d:%02d",
TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished),
TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished) - TimeUnit.MINUTES.toSeconds(
TimeUnit.MILLISECONDS.toMinutes(millisUntilFinished)
)
) + ")"
timerTime = millisUntilFinished
timeInSeconds = TimeUnit.MILLISECONDS.toSeconds(millisUntilFinished).toInt()
}
override fun onFinish() {
txt_timer.text = "00:00"
timerTime = 0
if (mActivity != null && !mActivity.isFinishing) {
resendOTPItemVisibility(View.VISIBLE)
}
}
}.start()
} catch (e: Exception) {
e.printStackTrace()
} }
} }
@ -91,7 +153,7 @@ class OTPFragment : BaseFragment() {
obj.put("OTP", "1234") obj.put("OTP", "1234")
obj.put("Mobile", mobile) obj.put("Mobile", mobile)
obj.put("Email", "test@test.com") obj.put("Email", "test@test.com")
obj.put("ExpiryTimeInMinute", 0)
obj.put("ExpiryTimeInMinute", otpExpiryTime)
val mediaType = "application/json; charset=utf-8".toMediaType() val mediaType = "application/json; charset=utf-8".toMediaType()
val body: RequestBody = obj.toString().toRequestBody(mediaType) val body: RequestBody = obj.toString().toRequestBody(mediaType)
@ -105,12 +167,11 @@ class OTPFragment : BaseFragment() {
viewLifecycleOwner viewLifecycleOwner
) { response -> ) { response ->
Log.e("check_otp_res", response?.data.toString()) Log.e("check_otp_res", response?.data.toString())
countDownTimer?.cancel()
val bundle = Bundle() val bundle = Bundle()
bundle.putString("mobile", mobile) bundle.putString("mobile", mobile)
bundle.putString("arnType", arguments?.getString("arnType")) bundle.putString("arnType", arguments?.getString("arnType"))
var fragment = Fragment() var fragment = Fragment()
if (type == 4) { if (type == 4) {
fragment = GetStartedFragment() fragment = GetStartedFragment()
} else if (type == 3) { } else if (type == 3) {
@ -130,6 +191,8 @@ class OTPFragment : BaseFragment() {
} }
private fun smsAPI() { private fun smsAPI() {
resendOTPItemVisibility(View.GONE)
val sendOTPRequest = SendOTPRequest() val sendOTPRequest = SendOTPRequest()
sendOTPRequest.AMCID = "" sendOTPRequest.AMCID = ""
sendOTPRequest.CommunicationValue = arguments?.getString("mobile").toString() sendOTPRequest.CommunicationValue = arguments?.getString("mobile").toString()
@ -147,6 +210,11 @@ class OTPFragment : BaseFragment() {
) )
} }
private fun resendOTPItemVisibility(viewType: Int) {
binding.txtResendOTP.visibility = viewType
binding.txtDidNotGetOTP.visibility = viewType
}
private fun validate(): Boolean { private fun validate(): Boolean {
return if (binding.edtOTP1.text.toString().isEmpty()) { // EditText return if (binding.edtOTP1.text.toString().isEmpty()) { // EditText
Common.commonErrorMethod( Common.commonErrorMethod(


+ 65
- 0
app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/PaymentFragment.kt View File

@ -0,0 +1,65 @@
package com.nivesh.production.partnerOnBoarding.ui.fragments
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import com.nivesh.production.partnerOnBoarding.R
import com.nivesh.production.partnerOnBoarding.databinding.FragmentPaymentBinding
import com.nivesh.production.partnerOnBoarding.ui.activities.BaseActivity
import com.nivesh.production.partnerOnBoarding.ui.activities.SignUpActivity
class PaymentFragment : BaseFragment() {
private var _binding: FragmentPaymentBinding? = null
private val binding get() = _binding!!
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
_binding = FragmentPaymentBinding.inflate(inflater,container,false)
return binding.root
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
init()
}
private fun init() {
binding.btnApplyNow.setOnClickListener{
setUpFragment()
}
binding.header.tvSkip.setOnClickListener{
setUpFragment()
}
binding.header.ivBack.setOnClickListener{
(activity as SignUpActivity).onBackPressedDispatcher.onBackPressed()
}
binding.header.tvSkip.setOnClickListener{
setUpFragment()
}
}
private fun setUpFragment() {
val bundle = Bundle()
bundle.putSerializable("mobile", arguments?.getString("mobile")!!)
bundle.putSerializable("email", arguments?.getString("email")!!)
bundle.putString("arnType",arguments?.getString("arnType"))
var fragment = SaveEAgreementFragment()
fragment.arguments = bundle
replaceFragment(
activity as BaseActivity,
R.id.signUpContainer,
fragment,
"AlmostThereFragment",
true
)
}
}

+ 21
- 17
app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/SaveEAgreementFragment.kt View File

@ -80,6 +80,26 @@ class SaveEAgreementFragment : BaseFragment() {
} }
Log.e("check_otp_res", response?.data.toString()) Log.e("check_otp_res", response?.data.toString())
} }
binding.header.ivBack.setOnClickListener{
(activity as SignUpActivity).onBackPressedDispatcher.onBackPressed()
}
(activity as SignUpActivity).viewModelOne.getSendOTPSaveEAgreementMutableData.observe(
viewLifecycleOwner
) { response ->
Log.e("check_res_otp", response?.data.toString())
if(response!=null) {
val res: SendOTPResponse =
Gson().fromJson(
response.data.toString(),
SendOTPResponse::class.java
)
if (res.Status ==getString(R.string.successText)) {
dialogOTP()
}
}
}
} }
private fun showConfirmDialog(message: String) { private fun showConfirmDialog(message: String) {
@ -287,28 +307,12 @@ class SaveEAgreementFragment : BaseFragment() {
sendOTPRequest.Name = "Manoj Singh" sendOTPRequest.Name = "Manoj Singh"
sendOTPRequest.ProductId = 1 sendOTPRequest.ProductId = 1
sendOTPRequest.UserRole = 3 sendOTPRequest.UserRole = 3
sendOTPRequest.UserId = "4988"
sendOTPRequest.UserId = PreferenceManager((activity as SignUpActivity)).getPartnerCode()
(activity as SignUpActivity).viewModelOne.getSaveEAgreementSendOTP( (activity as SignUpActivity).viewModelOne.getSaveEAgreementSendOTP(
sendOTPRequest, sendOTPRequest,
"", "",
(activity as SignUpActivity) (activity as SignUpActivity)
) )
(activity as SignUpActivity).viewModelOne.getSendOTPSaveEAgreementMutableData.observe(
viewLifecycleOwner
) { response ->
Log.e("check_res_otp", response?.data.toString())
if(response!=null) {
val res: SendOTPResponse =
Gson().fromJson(
response.data.toString(),
SendOTPResponse::class.java
)
if (res.Status ==getString(R.string.successText)) {
dialogOTP()
}
}
}
} }
class GenericKeyEvent internal constructor( class GenericKeyEvent internal constructor(


+ 13
- 1
app/src/main/java/com/nivesh/production/partnerOnBoarding/ui/fragments/SignUpFragment.kt View File

@ -1,5 +1,7 @@
package com.nivesh.production.partnerOnBoarding.ui.fragments package com.nivesh.production.partnerOnBoarding.ui.fragments
import android.content.res.ColorStateList
import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.text.Editable import android.text.Editable
import android.text.InputFilter import android.text.InputFilter
@ -8,7 +10,10 @@ import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.core.content.ContextCompat
import androidx.core.widget.TextViewCompat
import androidx.lifecycle.ViewModelProvider import androidx.lifecycle.ViewModelProvider
import com.google.android.material.button.MaterialButton
import com.google.gson.Gson import com.google.gson.Gson
import com.nivesh.production.partnerOnBoarding.R import com.nivesh.production.partnerOnBoarding.R
import com.nivesh.production.partnerOnBoarding.api.ApiClient import com.nivesh.production.partnerOnBoarding.api.ApiClient
@ -59,6 +64,13 @@ class SignUpFragment : BaseFragment() {
override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {}
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
Common.removeError(binding.tlMobileNumber) Common.removeError(binding.tlMobileNumber)
if(s.toString().length>=10){
binding.btnSignUp.backgroundTintList = ColorStateList.valueOf(ContextCompat.getColor((activity as SignUpActivity),R.color.buttonRed))
binding.btnSignUp.isEnabled = true
}else if(s.toString().length<10){
binding.btnSignUp.isEnabled = false
binding.btnSignUp.backgroundTintList = ColorStateList.valueOf(ContextCompat.getColor((activity as SignUpActivity),R.color.buttonLightRed))
}
} }
}) })
@ -137,7 +149,7 @@ class SignUpFragment : BaseFragment() {
val fragment = OTPFragment() val fragment = OTPFragment()
fragment.arguments = bundle fragment.arguments = bundle
replaceFragment(
addFragment(
activity as BaseActivity, activity as BaseActivity,
R.id.signUpContainer, R.id.signUpContainer,
fragment, fragment,


+ 8
- 7
app/src/main/java/com/nivesh/production/partnerOnBoarding/util/Common.kt View File

@ -86,7 +86,7 @@ class Common {
// val mPattern = Pattern.compile("[A-Z]{3}P[A-Z]\\d{4}[A-Z]") // val mPattern = Pattern.compile("[A-Z]{3}P[A-Z]\\d{4}[A-Z]")
// val mMatcher = mPattern.matcher(pan.toString()) // val mMatcher = mPattern.matcher(pan.toString())
// return mMatcher.matches() // return mMatcher.matches()
return pan.length == 4 && pan[3] != 'P'
return pan.length > 3 && pan[3] != 'P'
} }
//is Indian mobile Number //is Indian mobile Number
@ -238,7 +238,7 @@ class Common {
} }
} }
fun datePicker(activity: Activity, edtDOB: TextInputEditText): String {
fun datePicker(activity: Activity, edtDOB: TextInputEditText,futureDate: Boolean): String {
val cal = Calendar.getInstance() val cal = Calendar.getInstance()
var preSelectedDate = "" var preSelectedDate = ""
val year: Int val year: Int
@ -261,17 +261,18 @@ class Common {
val datePickerDialog = DatePickerDialog( val datePickerDialog = DatePickerDialog(
activity as SignUpActivity, { _, years, monthOfYear, dayOfMonth -> activity as SignUpActivity, { _, years, monthOfYear, dayOfMonth ->
if (monthOfYear.toString().length == 1) {
"0".plus(monthOfYear)
var monthsCount = (monthOfYear+1)
preSelectedDate = if (monthsCount.toString().length == 1) {
years.toString().plus("-").plus("0".plus(monthOfYear)).plus("-").plus(dayOfMonth)
}else {
years.toString().plus("-").plus(monthOfYear).plus("-").plus(dayOfMonth)
} }
preSelectedDate = years.toString().plus("-").plus(monthOfYear + 1).plus("-")
.plus(dayOfMonth.toString())
edtDOB.setText(preSelectedDate) edtDOB.setText(preSelectedDate)
edtDOB.setSelection(edtDOB.text.toString().length) edtDOB.setSelection(edtDOB.text.toString().length)
}, year, month, day }, year, month, day
) )
datePickerDialog.datePicker.maxDate = cal.timeInMillis
if(!futureDate) datePickerDialog.datePicker.maxDate = cal.timeInMillis
val c = Calendar.getInstance() val c = Calendar.getInstance()
c.add(Calendar.YEAR, -140) c.add(Calendar.YEAR, -140)
datePickerDialog.datePicker.minDate = c.timeInMillis datePickerDialog.datePicker.minDate = c.timeInMillis


+ 2
- 7
app/src/main/java/com/nivesh/production/partnerOnBoarding/util/Constants.kt View File

@ -3,12 +3,7 @@ package com.nivesh.production.partnerOnBoarding.util
class Constants { class Constants {
companion object { companion object {
const val BASE_URL = "http://3.109.121.6:5001/api/"
// const val BASE_URL = "http://3.109.121.6/partner/api/"
const val BASE_URL_COMMON = "http://3.109.121.6:5002/api/"
// const val token = "636F8F63-06C4-4D95-8562-392B34025FB0"
const val maxFileSize : Double = 5.0
const val BASE_URL = "http://3.109.121.6/api/"
const val maxFileSize: Double = 5.0
} }
} }

+ 3
- 6
app/src/main/java/com/nivesh/production/partnerOnBoarding/viewModels/OnBoardingViewModel.kt View File

@ -93,11 +93,10 @@ open class OnBoardingViewModel(private val mainRepository: MainRepository) : Vie
val getPANDetailMutableData: MutableLiveData<Resource<JsonObject>?> = MutableLiveData() val getPANDetailMutableData: MutableLiveData<Resource<JsonObject>?> = MutableLiveData()
fun getPANDetail( fun getPANDetail(
requestBody: String, requestBody: String,
url: String,
activity: Activity activity: Activity
) = viewModelScope.launch(handleError(activity)) { ) = viewModelScope.launch(handleError(activity)) {
if (Common.isNetworkAvailable(activity)) { if (Common.isNetworkAvailable(activity)) {
val response = mainRepository.getPANDetailResponse(url,requestBody)
val response = mainRepository.getPANDetailResponse(requestBody)
getPANDetailMutableData.postValue(handleResponse(response)) getPANDetailMutableData.postValue(handleResponse(response))
} }
} }
@ -106,11 +105,10 @@ open class OnBoardingViewModel(private val mainRepository: MainRepository) : Vie
fun getDocumentType( fun getDocumentType(
value: String, value: String,
type: String, type: String,
url: String,
activity: Activity activity: Activity
) = viewModelScope.launch(handleError(activity)) { ) = viewModelScope.launch(handleError(activity)) {
if (Common.isNetworkAvailable(activity)) { if (Common.isNetworkAvailable(activity)) {
val response = mainRepository.getDocumentTypeResponse(url,value,type)
val response = mainRepository.getDocumentTypeResponse(value,type)
getDocumentTypeMutableData.postValue(handleResponse(response)) getDocumentTypeMutableData.postValue(handleResponse(response))
} }
} }
@ -143,11 +141,10 @@ open class OnBoardingViewModel(private val mainRepository: MainRepository) : Vie
val getAllProductMutableData: MutableLiveData<Resource<JsonObject>?> = MutableLiveData() val getAllProductMutableData: MutableLiveData<Resource<JsonObject>?> = MutableLiveData()
fun getAllProduct( fun getAllProduct(
url: String,
activity: Activity activity: Activity
) = viewModelScope.launch(handleError(activity)) { ) = viewModelScope.launch(handleError(activity)) {
if (Common.isNetworkAvailable(activity)) { if (Common.isNetworkAvailable(activity)) {
val response = mainRepository.getAllProduct(url)
val response = mainRepository.getAllProduct()
getAllProductMutableData.postValue(handleResponse(response)) getAllProductMutableData.postValue(handleResponse(response))
} }
} }

+ 11
- 0
app/src/main/res/drawable/circle_red.xml View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="10dp"
android:height="10dp"
android:viewportWidth="10"
android:viewportHeight="10">
<path
android:fillColor="#E92629"
android:pathData="M 5 0 C 7.76142374915 0 10 2.23857625085 10 5 C 10 7.76142374915 7.76142374915 10 5 10 C 2.23857625085 10 0 7.76142374915 0 5 C 0 2.23857625085 2.23857625085 0 5 0 Z" />
</vector>

BIN
app/src/main/res/drawable/nivesh_logo.png View File

Before After
Width: 88  |  Height: 88  |  Size: 2.8 KiB

+ 5
- 0
app/src/main/res/drawable/svg_help.xml View File

@ -0,0 +1,5 @@
<vector android:autoMirrored="true" android:height="24dp"
android:tint="#FFFFFF" android:viewportHeight="24"
android:viewportWidth="24" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M11,18h2v-2h-2v2zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8zM12,6c-2.21,0 -4,1.79 -4,4h2c0,-1.1 0.9,-2 2,-2s2,0.9 2,2c0,2 -3,1.75 -3,5h2c0,-2.25 3,-2.5 3,-5 0,-2.21 -1.79,-4 -4,-4z"/>
</vector>

+ 38
- 7
app/src/main/res/layout/fragment_get_started.xml View File

@ -80,7 +80,8 @@
android:id="@+id/edtArnNumber" android:id="@+id/edtArnNumber"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="text"
android:inputType="number"
android:maxLength="7"
android:textColorHint="@color/greyColor2" android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
android:padding="@dimen/margin_15" android:padding="@dimen/margin_15"
@ -126,11 +127,12 @@
android:scaleType="fitXY" /> android:scaleType="fitXY" />
<TextView <TextView
android:id="@+id/tvUploadTitle"
android:id="@+id/tvUploadARNTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_centerInParent="true" android:layout_centerInParent="true"
android:textColor="@color/lightBlue1" android:textColor="@color/lightBlue1"
android:layout_marginTop="@dimen/margin_10"
android:text="@string/upload" /> android:text="@string/upload" />
</RelativeLayout> </RelativeLayout>
@ -151,12 +153,14 @@
android:id="@+id/edtEUINNumber" android:id="@+id/edtEUINNumber"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="number"
android:maxEms="18"
android:contentDescription="@string/euinNum"
android:gravity="top|start" android:gravity="top|start"
app:mask="#### / #### / ####"
android:inputType="number"
android:maxLength="18"
android:textColorHint="@color/greyColor2" android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14" />
android:textSize="@dimen/text_size_14"
app:mask="#### / #### / ####"
tool:ignore="TouchTargetSizeCheck,EditableContentDescCheck" />
</com.google.android.material.textfield.TextInputLayout> </com.google.android.material.textfield.TextInputLayout>
@ -248,6 +252,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:inputType="text" android:inputType="text"
android:maxEms="30"
android:textColorHint="@color/greyColor2" android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14" android:textSize="@dimen/text_size_14"
tool:ignore="TextContrastCheck" /> tool:ignore="TextContrastCheck" />
@ -420,7 +425,6 @@
android:hint="@string/addressProofType" android:hint="@string/addressProofType"
android:inputType="none" android:inputType="none"
android:labelFor="@+id/spInterestPayout" android:labelFor="@+id/spInterestPayout"
android:padding="@dimen/margin_5"
android:textColorHint="@color/greyColor2" android:textColorHint="@color/greyColor2"
android:textSize="@dimen/text_size_14" /> android:textSize="@dimen/text_size_14" />
@ -652,4 +656,31 @@
app:layout_constraintStart_toStartOf="@+id/btnNext" app:layout_constraintStart_toStartOf="@+id/btnNext"
app:layout_constraintTop_toBottomOf="@+id/btnNext" /> app:layout_constraintTop_toBottomOf="@+id/btnNext" />
<RelativeLayout
android:id="@+id/rlProgress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent2"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ProgressBar
android:id="@+id/pbInternal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
android:layout_below="@+id/pbInternal"
android:layout_centerHorizontal="true"
android:text="@string/pleaseWait"/>
</RelativeLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>

+ 3
- 1
app/src/main/res/layout/fragment_otp.xml View File

@ -5,6 +5,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:id="@+id/containerOTP" android:id="@+id/containerOTP"
android:background="@color/white"
android:orientation="vertical"> android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -225,7 +226,6 @@
android:layout_marginTop="@dimen/margin_5" android:layout_marginTop="@dimen/margin_5"
android:layout_marginEnd="@dimen/margin_20" android:layout_marginEnd="@dimen/margin_20"
android:gravity="end" android:gravity="end"
android:text="(00:30)"
android:textColor="@color/black" android:textColor="@color/black"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/otpLayout" /> app:layout_constraintTop_toBottomOf="@id/otpLayout" />
@ -268,6 +268,7 @@
android:layout_marginTop="@dimen/margin_15" android:layout_marginTop="@dimen/margin_15"
android:text="@string/didNotGetOTP" android:text="@string/didNotGetOTP"
android:textColor="@color/black" android:textColor="@color/black"
android:visibility="gone"
android:textSize="@dimen/text_size_16" android:textSize="@dimen/text_size_16"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/txtTimerText" /> app:layout_constraintTop_toBottomOf="@id/txtTimerText" />
@ -280,6 +281,7 @@
android:text="@string/resendOTP" android:text="@string/resendOTP"
android:textColor="@color/blue1" android:textColor="@color/blue1"
android:textSize="@dimen/text_size_16" android:textSize="@dimen/text_size_16"
android:visibility="gone"
android:textStyle="bold" android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/txtDidNotGetOTP" app:layout_constraintStart_toEndOf="@+id/txtDidNotGetOTP"


+ 352
- 0
app/src/main/res/layout/fragment_payment.xml View File

@ -0,0 +1,352 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
android:orientation="vertical">
<include
android:id="@+id/header"
layout="@layout/payment_header" />
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/header"
android:padding="@dimen/margin_10"
android:layout_marginBottom="@dimen/margin_100">
<LinearLayout
android:id="@+id/constraintTwo"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="@dimen/margin_150"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<ImageView
android:id="@+id/ivNiveshLogo"
android:layout_width="@dimen/margin_50"
android:layout_height="@dimen/margin_50"
android:layout_marginTop="@dimen/margin_10"
android:src="@drawable/nivesh_logo" />
<TextView
android:id="@+id/tvPayTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_10"
android:text="Pay a nominal of Rs. 3,000/- to complete your registration"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<TextView
android:id="@+id/tvHeaderOne"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="What you get:"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_18"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.02"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/llLogo"
app:layout_constraintVertical_bias="0.0" />
<LinearLayout
android:id="@+id/llheaderOne"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/margin_10"
app:layout_constraintTop_toBottomOf="@+id/tvHeaderOne">
<ImageView
android:id="@+id/ivbulletOne"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:src="@drawable/circle_red" />
<TextView
android:id="@+id/tvTitleOne"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="Training for passing NISM exam required for obtaining AMFI Registration Number (ARN) for MF business: 2 weeks"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<LinearLayout
android:id="@+id/llheaderTwo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/margin_10"
app:layout_constraintTop_toBottomOf="@+id/llheaderOne">
<ImageView
android:id="@+id/ivbulletTwo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:src="@drawable/circle_red" />
<TextView
android:id="@+id/tvTitleTwo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="Reimbursement of Fee for NISM exam and ARN registration (Rs. ……)"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<LinearLayout
android:id="@+id/llheaderThree"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/margin_10"
app:layout_constraintTop_toBottomOf="@+id/llheaderTwo">
<ImageView
android:id="@+id/ivbulletThree"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:src="@drawable/circle_red" />
<TextView
android:id="@+id/tvTitleThree"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="Point of Sales Person (POSP) for insurance business: 3 days"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<LinearLayout
android:id="@+id/llheaderFour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/margin_10"
app:layout_constraintTop_toBottomOf="@+id/llheaderThree">
<ImageView
android:id="@+id/ivbulletFour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:src="@drawable/circle_red" />
<TextView
android:id="@+id/tvTitleFour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="Specialised training on products &amp; Nivesh platform: 2 days"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_18" />
</LinearLayout>
<TextView
android:id="@+id/tvTitleFive"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="Total benefits worth more than Rs. 10,000!"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_18"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/llheaderFour" />
<TextView
android:id="@+id/tvTitleSix"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_10"
android:text="That's not all... you will continue to get regular training and knowledge sharing sessions throughout your association with Nivesh."
android:textColor="@color/greyColor5"
android:textSize="@dimen/margin_16"
app:layout_constraintTop_toBottomOf="@+id/tvTitleFive" />
<TextView
android:id="@+id/tvTitleSeven"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:layout_marginTop="@dimen/margin_10"
android:text="What is needed from you:"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_18"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@+id/tvTitleSix" />
<LinearLayout
android:id="@+id/llheaderFive"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/margin_10"
app:layout_constraintTop_toBottomOf="@+id/tvTitleSeven">
<ImageView
android:id="@+id/ivbulletFive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:src="@drawable/circle_red" />
<TextView
android:id="@+id/tvTitleFives"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="Specialised training on products &amp; Nivesh platform: 2 days"
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_16" />
</LinearLayout>
<LinearLayout
android:id="@+id/llheaderSix"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/margin_10"
app:layout_constraintTop_toBottomOf="@+id/llheaderFive">
<ImageView
android:id="@+id/ivbulletSix"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:src="@drawable/circle_red" />
<TextView
android:id="@+id/tvTitleSixs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="Just your commitment, positive attitude and a smartphone."
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_16" />
</LinearLayout>
<LinearLayout
android:id="@+id/llheaderSeven"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:padding="@dimen/margin_10"
app:layout_constraintTop_toBottomOf="@+id/llheaderSix">
<ImageView
android:id="@+id/ivbulletSeven"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:src="@drawable/circle_red" />
<TextView
android:id="@+id/tvTitleSevens"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_10"
android:text="Rest will be handled by Nivesh, a complete platform to grow and manage your business."
android:textColor="@color/greyColor5"
android:textSize="@dimen/text_size_16" />
</LinearLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_alignParentBottom="true">
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/greyColor6" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/margin_10"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:padding="@dimen/margin_10"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Join Nivesh"
android:textSize="@dimen/text_size_14"
android:textColor="@color/greyColor7"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="\u20B9 3000"
android:textSize="@dimen/text_size_24"
android:textStyle="bold"
android:textColor="@color/greyColor5"/>
</LinearLayout>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:layout_weight="2">
<com.google.android.material.button.MaterialButton
android:id="@+id/btnApplyNow"
app:cornerRadius="@dimen/margin_15"
android:theme="@style/Theme.NormalLoginSelected"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/apply_now"
android:layout_marginEnd="@dimen/margin_20"
android:layout_marginStart="@dimen/margin_20"
android:textColor="@color/white"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

+ 2
- 1
app/src/main/res/layout/fragment_save_e_agreement.xml View File

@ -2,7 +2,8 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical">
android:orientation="vertical"
android:background="@color/white">
<include <include
android:id="@+id/header" android:id="@+id/header"


+ 60
- 0
app/src/main/res/layout/payment_header.xml View File

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:orientation="horizontal"
android:gravity="center_vertical"
android:background="@color/colorPrimary"
android:padding="@dimen/margin_10">
<ImageView
android:id="@+id/ivBack"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:src="@drawable/svg_back"
android:contentDescription="@string/save_draft" />
<TextView
android:id="@+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textAllCaps="true"
android:layout_marginStart="@dimen/margin_20"
android:layout_marginTop="@dimen/margin_10"
android:textSize="@dimen/text_size_18"
android:text="@string/join_nivesh"
android:layout_toEndOf="@+id/ivBack"
android:layout_centerVertical="true"
android:textColor="@color/white"/>
<TextView
android:id="@+id/tvInfo"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textAllCaps="true"
android:gravity="center"
android:layout_toStartOf="@+id/tvSkip"
android:layout_marginTop="@dimen/margin_2"
android:layout_marginEnd="@dimen/margin_10"
android:textSize="@dimen/text_size_15"
android:textColor="@color/white"
android:drawablePadding="@dimen/margin_10"
app:drawableStartCompat="@drawable/svg_help" />
<TextView
android:id="@+id/tvSkip"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textAllCaps="true"
android:gravity="center"
android:layout_marginTop="@dimen/margin_2"
android:layout_marginEnd="@dimen/margin_10"
android:textSize="@dimen/text_size_15"
android:text="SKIP"
android:layout_alignParentEnd="true"
android:textColor="@color/white"
android:drawablePadding="@dimen/margin_10" />
</RelativeLayout>

+ 6
- 0
app/src/main/res/values-hi-rIN/strings.xml View File

@ -349,5 +349,11 @@
<string name="euinName">EUIN Name (Employee)</string> <string name="euinName">EUIN Name (Employee)</string>
<string name="successText">success</string> <string name="successText">success</string>
<string name="aadhaarText">Aadhaar</string> <string name="aadhaarText">Aadhaar</string>
<string name="timerMsg">minutes are remaining to complete the process</string>
<string name="associateText">Associate</string>
<string name="advisory">advisory</string>
<string name="join_nivesh">Join Nivesh</string>
<string name="apply_now">APPLY NOW</string>
<string name="pleaseWait">Please Wait...</string>
</resources> </resources>

+ 5
- 1
app/src/main/res/values/colors.xml View File

@ -12,19 +12,23 @@
<color name="red"> #E9161E</color> <color name="red"> #E9161E</color>
<color name="blue">#1F5ACE</color> <color name="blue">#1F5ACE</color>
<color name="transparent">#00000000</color> <color name="transparent">#00000000</color>
<color name="transparent2">#99000000</color>
<color name="lightBlue">#5077FF</color> <color name="lightBlue">#5077FF</color>
<color name="blue1">#006BFF</color> <color name="blue1">#006BFF</color>
<color name="lightBlue2">#1FAEFF</color> <color name="lightBlue2">#1FAEFF</color>
<color name="lightBlue1">#0050A1</color> <color name="lightBlue1">#0050A1</color>
<color name="button_red">#E92629</color>
<color name="buttonRed">#E92629</color>
<color name="buttonLightRed">#FFBCBC</color>
<color name="greyColor1">#323131</color> <color name="greyColor1">#323131</color>
<color name="greyColor2">#757575</color> <color name="greyColor2">#757575</color>
<color name="greyColor3">#D9D9D9</color> <color name="greyColor3">#D9D9D9</color>
<color name="greyColor4">#E6EBE0</color> <color name="greyColor4">#E6EBE0</color>
<color name="greyColor5">#303030</color> <color name="greyColor5">#303030</color>
<color name="greyColor6">#F6F6F6</color>
<color name="greyColor7">#8F8F99</color>
<color name="greenColor">#41CA00</color> <color name="greenColor">#41CA00</color>


+ 7
- 1
app/src/main/res/values/strings.xml View File

@ -304,7 +304,7 @@
<string name="invalidOTP">Please enter valid OTP</string> <string name="invalidOTP">Please enter valid OTP</string>
<string name="sixDigitOTP">Enter the 6-digit verification code sent to</string> <string name="sixDigitOTP">Enter the 6-digit verification code sent to</string>
<string name="submit">SUBMIT</string> <string name="submit">SUBMIT</string>
<string name="secondsTimer">This session will end in 30 seconds.</string>
<string name="secondsTimer">This session will end in</string>
<string name="didNotGetOTP">Didn\'t get the OTP</string> <string name="didNotGetOTP">Didn\'t get the OTP</string>
<string name="resendOTP">RESEND OTP</string> <string name="resendOTP">RESEND OTP</string>
<string name="mobNoText">We sent a code to your mobile number</string> <string name="mobNoText">We sent a code to your mobile number</string>
@ -362,5 +362,11 @@
<string name="euinName">EUIN Name (Employee)</string> <string name="euinName">EUIN Name (Employee)</string>
<string name="successText">success</string> <string name="successText">success</string>
<string name="aadhaarText">Aadhaar</string> <string name="aadhaarText">Aadhaar</string>
<string name="timerMsg">minutes are remaining to complete the process</string>
<string name="associateText">Associate</string>
<string name="advisory">advisory</string>
<string name="join_nivesh">Join Nivesh</string>
<string name="apply_now">APPLY NOW</string>
<string name="pleaseWait">Please Wait...</string>
</resources> </resources>

+ 1
- 1
app/src/main/res/values/style.xml View File

@ -152,7 +152,7 @@
</declare-styleable> </declare-styleable>
<style name="Theme.lightRed" parent="Widget.MaterialComponents.Button.OutlinedButton"> <style name="Theme.lightRed" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="colorPrimary">@color/button_red</item>
<item name="colorPrimary">@color/buttonRed</item>
<item name="elevation">@dimen/margin_8</item> <item name="elevation">@dimen/margin_8</item>
<item name="android:solidColor">@color/white</item> <item name="android:solidColor">@color/white</item>
</style> </style>


+ 6
- 0
app/src/main/res/values/themes.xml View File

@ -31,6 +31,12 @@
<item name="android:solidColor">@color/white</item> <item name="android:solidColor">@color/white</item>
</style> </style>
<style name="Theme.NormalLoginSelected" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="colorPrimary">#F64242</item>
<item name="elevation">@dimen/margin_8</item>
<item name="android:solidColor">@color/white</item>
</style>
<style name="Theme.Register" parent="Widget.MaterialComponents.Button.OutlinedButton"> <style name="Theme.Register" parent="Widget.MaterialComponents.Button.OutlinedButton">
<item name="colorPrimary">#1FAEFF</item> <item name="colorPrimary">#1FAEFF</item>
<item name="elevation">@dimen/margin_8</item> <item name="elevation">@dimen/margin_8</item>


Loading…
Cancel
Save

Powered by TurnKey Linux.