Merge remote-tracking branch 'origin/master'
This commit is contained in:
2
.idea/gradle.xml
generated
2
.idea/gradle.xml
generated
@@ -8,7 +8,7 @@
|
|||||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||||
<option name="gradleHome" value="$USER_HOME$/andriod studio gradle/gradle-7.3" />
|
<option name="gradleHome" value="$USER_HOME$/andriod studio gradle/gradle-7.3" />
|
||||||
<option name="gradleJvm" value="Embedded JDK" />
|
<option name="gradleJvm" value="jbr-17" />
|
||||||
<option name="modules">
|
<option name="modules">
|
||||||
<set>
|
<set>
|
||||||
<option value="$PROJECT_DIR$" />
|
<option value="$PROJECT_DIR$" />
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<provider
|
<provider
|
||||||
android:name="androidx.core.content.FileProvider"
|
android:name="androidx.core.content.FileProvider"
|
||||||
android:authorities="com.example.hposregistration.provider"
|
android:authorities="in.sminnovations.hposregistration.provider"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:grantUriPermissions="true">
|
android:grantUriPermissions="true">
|
||||||
<meta-data
|
<meta-data
|
||||||
|
|||||||
@@ -15,8 +15,9 @@ data class UserData(
|
|||||||
var phoneNumber: String = "",
|
var phoneNumber: String = "",
|
||||||
var careOf: String = "",
|
var careOf: String = "",
|
||||||
var maritalStatus: String = "",
|
var maritalStatus: String = "",
|
||||||
|
var category: String = "",
|
||||||
var caste: String = "",
|
var caste: String = "",
|
||||||
var subCaste: String = "",
|
var subCaste: String? = "",
|
||||||
var house: String = "",
|
var house: String = "",
|
||||||
var city: String = "",
|
var city: String = "",
|
||||||
var district: String = "",
|
var district: String = "",
|
||||||
@@ -30,6 +31,7 @@ data class UserData(
|
|||||||
var registeredBy: String? = "",
|
var registeredBy: String? = "",
|
||||||
var createdAt: String? = "",
|
var createdAt: String? = "",
|
||||||
var registrationCenterName: String? = "",
|
var registrationCenterName: String? = "",
|
||||||
|
var testStatus: Boolean = false
|
||||||
){
|
){
|
||||||
enum class Gender {
|
enum class Gender {
|
||||||
MALE,
|
MALE,
|
||||||
|
|||||||
@@ -78,6 +78,10 @@ class UserListFragment : BaseFragment() {
|
|||||||
binding.uploadData.setOnClickListener {
|
binding.uploadData.setOnClickListener {
|
||||||
showUploadDialog(requireContext())
|
showUploadDialog(requireContext())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
viewModel.allUserData.observe(viewLifecycleOwner) { userDataList ->
|
||||||
|
deteleIncompleteRegistration(userDataList)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun logoutUser(context: Context) {
|
private fun logoutUser(context: Context) {
|
||||||
@@ -87,7 +91,7 @@ class UserListFragment : BaseFragment() {
|
|||||||
|
|
||||||
// Positive button
|
// Positive button
|
||||||
builder.setPositiveButton("Yes") { dialog, _ ->
|
builder.setPositiveButton("Yes") { dialog, _ ->
|
||||||
saveUserId("")
|
saveUserId()
|
||||||
findNavController().navigate(R.id.action_userListFragment_to_loginFragment)
|
findNavController().navigate(R.id.action_userListFragment_to_loginFragment)
|
||||||
dialog.dismiss()
|
dialog.dismiss()
|
||||||
}
|
}
|
||||||
@@ -101,9 +105,9 @@ class UserListFragment : BaseFragment() {
|
|||||||
dialog.show()
|
dialog.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun saveUserId(userId: String) {
|
private fun saveUserId() {
|
||||||
with(sharedPreference.edit()) {
|
with(sharedPreference.edit()) {
|
||||||
putString(Constant.USER_ID, userId)
|
putString(Constant.USER_ID, "")
|
||||||
apply()
|
apply()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -188,7 +192,7 @@ class UserListFragment : BaseFragment() {
|
|||||||
|
|
||||||
private fun deteleIncompleteRegistration(userDataList: List<UserData>) {
|
private fun deteleIncompleteRegistration(userDataList: List<UserData>) {
|
||||||
userDataList.forEach {
|
userDataList.forEach {
|
||||||
if (it._id.isEmpty()) {
|
if (it.userImageURL.isEmpty()) {
|
||||||
viewModel.deleteById(it._id)
|
viewModel.deleteById(it._id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,10 +122,14 @@ class ReviewDetailsRegistrationFragment : BaseFragment() {
|
|||||||
requireContext().getString(R.string.care_of_details, userData.careOf)
|
requireContext().getString(R.string.care_of_details, userData.careOf)
|
||||||
binding.tvMaritalStatus.text =
|
binding.tvMaritalStatus.text =
|
||||||
requireContext().getString(R.string.marital_status_details, userData.maritalStatus)
|
requireContext().getString(R.string.marital_status_details, userData.maritalStatus)
|
||||||
|
binding.tvCategory.text =
|
||||||
|
requireContext().getString(R.string.category_details, userData.category)
|
||||||
binding.tvCaste.text =
|
binding.tvCaste.text =
|
||||||
requireContext().getString(R.string.caste_details, userData.caste)
|
requireContext().getString(R.string.caste_details, userData.caste)
|
||||||
binding.tvSubCaste.text =
|
if (userData.subCaste != "") {
|
||||||
requireContext().getString(R.string.sub_caste_details, userData.subCaste)
|
binding.tvSubCaste.text =
|
||||||
|
requireContext().getString(R.string.sub_caste_details, userData.subCaste)
|
||||||
|
}
|
||||||
binding.tvHouse.text =
|
binding.tvHouse.text =
|
||||||
requireContext().getString(R.string.house_details, userData.house)
|
requireContext().getString(R.string.house_details, userData.house)
|
||||||
binding.tvCity.text =
|
binding.tvCity.text =
|
||||||
|
|||||||
@@ -76,59 +76,24 @@ class UserDetailsRegistrationFragment : Fragment() {
|
|||||||
yes1.isChecked = it
|
yes1.isChecked = it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// user.sickleCellHistory.let{
|
|
||||||
// if (it != null) {
|
|
||||||
// if (binding.etFamilyHistory.isVisible) {
|
|
||||||
// binding.etFamilyHistory.setText(it)
|
|
||||||
// yes1history.isChecked = true
|
|
||||||
// }else{
|
|
||||||
// no1history.isChecked = true
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// user.isUnderMedication.let {
|
|
||||||
// if (it != null) {
|
|
||||||
// yes.isChecked = it
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
user.sickleCellHistory.let {
|
user.sickleCellHistory.let {
|
||||||
if (it != null) {
|
if (it != null) {
|
||||||
yes1history.isChecked = true
|
yes1history.isChecked = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// user.sickleCellHistory.let{
|
|
||||||
// if (it != null) {
|
|
||||||
// if(yes1history.isChecked){
|
|
||||||
// yes1history.isChecked = true
|
|
||||||
// }else if(no1history.isChecked){
|
|
||||||
// no1history.isChecked
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
if (yes1history.isChecked) {
|
if (yes1history.isChecked) {
|
||||||
if (binding.yes1history.isChecked) View.VISIBLE else View.GONE
|
if (binding.yes1history.isChecked) View.VISIBLE else View.GONE
|
||||||
|
|
||||||
user.sickleCellHistory.let { etFamilyHistory.setText(it) }
|
user.sickleCellHistory.let { etFamilyHistory.setText(it) }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
binding.tilFamilyHistory.visibility = View.GONE
|
binding.tilFamilyHistory.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.yes1history.setOnClickListener {
|
binding.yes1history.setOnClickListener {
|
||||||
binding.tilFamilyHistory.visibility =
|
binding.tilFamilyHistory.visibility =
|
||||||
if (binding.yes1history.isChecked) View.VISIBLE else View.GONE
|
if (binding.yes1history.isChecked) View.VISIBLE else View.GONE
|
||||||
user.sickleCellHistory.let { etFamilyHistory.setText(it) }
|
user.sickleCellHistory.let { etFamilyHistory.setText(it) }
|
||||||
|
|
||||||
}
|
}
|
||||||
//
|
|
||||||
binding.no1history.setOnClickListener {
|
binding.no1history.setOnClickListener {
|
||||||
binding.tilFamilyHistory.visibility =
|
binding.tilFamilyHistory.visibility =
|
||||||
if (binding.no1history.isChecked) View.GONE else View.VISIBLE
|
if (binding.no1history.isChecked) View.GONE else View.VISIBLE
|
||||||
@@ -200,10 +165,18 @@ class UserDetailsRegistrationFragment : Fragment() {
|
|||||||
|
|
||||||
val category = etCaste.text.toString()
|
val category = etCaste.text.toString()
|
||||||
if (category.isEmpty()) {
|
if (category.isEmpty()) {
|
||||||
|
etCaste.error = "Please enter your category"
|
||||||
|
return false
|
||||||
|
} else {
|
||||||
|
userData.category = category
|
||||||
|
}
|
||||||
|
|
||||||
|
val caste = etCaste.text.toString()
|
||||||
|
if (caste.isEmpty()) {
|
||||||
etCaste.error = "Please enter your caste"
|
etCaste.error = "Please enter your caste"
|
||||||
return false
|
return false
|
||||||
} else {
|
} else {
|
||||||
userData.caste = category
|
userData.caste = caste
|
||||||
}
|
}
|
||||||
|
|
||||||
val subCaste = etSubCaste.text.toString()
|
val subCaste = etSubCaste.text.toString()
|
||||||
@@ -251,13 +224,6 @@ class UserDetailsRegistrationFragment : Fragment() {
|
|||||||
userData.pinCode = pincode
|
userData.pinCode = pincode
|
||||||
}
|
}
|
||||||
|
|
||||||
// val bloodGroup = etBloodGroup.text.toString()
|
|
||||||
// if (bloodGroup.isEmpty()) {
|
|
||||||
// etBloodGroup.error = "Please enter your blood group"
|
|
||||||
// return false
|
|
||||||
// } else {
|
|
||||||
// userData.bloodGroup = bloodGroup
|
|
||||||
// }
|
|
||||||
userData.isUnderMedication = yes.isChecked
|
userData.isUnderMedication = yes.isChecked
|
||||||
userData.isUnderTransfusion = yes1.isChecked
|
userData.isUnderTransfusion = yes1.isChecked
|
||||||
userData.sickleCellHistory = yes1history.isChecked.toString()
|
userData.sickleCellHistory = yes1history.isChecked.toString()
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
tools:context=".ui.fragments.registration.ReviewDetailsRegistrationFragment">
|
tools:context="com.example.hposregistration.ui.fragments.registration.ReviewDetailsRegistrationFragment">
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/tvCareOf" />
|
app:layout_constraintTop_toBottomOf="@id/tvCareOf" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvCaste"
|
android:id="@+id/tvCategory"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
@@ -135,6 +135,16 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvMaritalStatus" />
|
app:layout_constraintTop_toBottomOf="@id/tvMaritalStatus" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tvCaste"
|
||||||
|
style="@style/title1_1"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tvCategory" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tvSubCaste"
|
android:id="@+id/tvSubCaste"
|
||||||
style="@style/title1_1"
|
style="@style/title1_1"
|
||||||
|
|||||||
@@ -144,13 +144,32 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/til_is_married">
|
app:layout_constraintTop_toBottomOf="@id/til_is_married">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/et_Caste"
|
android:id="@+id/et_category"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:hint="@string/_2" />
|
android:hint="@string/_2" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
android:id="@+id/til_caste"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginHorizontal="24dp"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/til_category">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/et_Caste"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:hint="@string/caste" />
|
||||||
|
|
||||||
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/til_subCaste"
|
android:id="@+id/til_subCaste"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
@@ -160,7 +179,7 @@
|
|||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/til_category">
|
app:layout_constraintTop_toBottomOf="@id/til_caste">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/et_subCaste"
|
android:id="@+id/et_subCaste"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
<string name="birth_year">Birth Year</string>
|
<string name="birth_year">Birth Year</string>
|
||||||
<string name="marital_status">Select Marital status</string>
|
<string name="marital_status">Select Marital status</string>
|
||||||
<string name="father_s_husband_s_name">Father\'s/Husband\'s Name</string>
|
<string name="father_s_husband_s_name">Father\'s/Husband\'s Name</string>
|
||||||
<string name="caste">Select Caste</string>
|
<string name="caste">Caste</string>
|
||||||
<string name="person_s_address_details">Person\'s Address Details</string>
|
<string name="person_s_address_details">Person\'s Address Details</string>
|
||||||
<string name="district">District</string>
|
<string name="district">District</string>
|
||||||
<string name="city_town">City / Town</string>
|
<string name="city_town">City / Town</string>
|
||||||
@@ -64,6 +64,7 @@
|
|||||||
<string name="phone_number_details">Mobile Number: %1$s</string>
|
<string name="phone_number_details">Mobile Number: %1$s</string>
|
||||||
<string name="care_of_details">Father\'s/Husband\'s Name: %1$s</string>
|
<string name="care_of_details">Father\'s/Husband\'s Name: %1$s</string>
|
||||||
<string name="marital_status_details">Marital Status: %1$s</string>
|
<string name="marital_status_details">Marital Status: %1$s</string>
|
||||||
|
<string name="category_details">Category: %1$s</string>
|
||||||
<string name="caste_details">Caste: %1$s</string>
|
<string name="caste_details">Caste: %1$s</string>
|
||||||
<string name="sub_caste_details">Sub Caste: %1$s</string>
|
<string name="sub_caste_details">Sub Caste: %1$s</string>
|
||||||
<string name="house_details">House: %1$s</string>
|
<string name="house_details">House: %1$s</string>
|
||||||
@@ -81,7 +82,7 @@
|
|||||||
<string name="login_id">Login ID</string>
|
<string name="login_id">Login ID</string>
|
||||||
<string name="password">Password</string>
|
<string name="password">Password</string>
|
||||||
<string name="login">Login</string>
|
<string name="login">Login</string>
|
||||||
<string name="_2">Caste</string>
|
<string name="_2">Category</string>
|
||||||
|
|
||||||
|
|
||||||
<string-array name="category">
|
<string-array name="category">
|
||||||
|
|||||||
Reference in New Issue
Block a user