hide bloodgroup and incubate btn after action
This commit is contained in:
@@ -53,7 +53,7 @@ class UserListAdapter(
|
|||||||
userName.text = "Name: ${model.name}"
|
userName.text = "Name: ${model.name}"
|
||||||
userId.text = "User ID:${model._id}"
|
userId.text = "User ID:${model._id}"
|
||||||
if (model.incubationTime == "") {
|
if (model.incubationTime == "") {
|
||||||
// btnStartIncubation.visibility = View.VISIBLE
|
btnBlood.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
userId.text =
|
userId.text =
|
||||||
"User ID:${model._id} \n Time: ${isBetween15And30Minutes(model.incubationTime)} \n Started at: ${
|
"User ID:${model._id} \n Time: ${isBetween15And30Minutes(model.incubationTime)} \n Started at: ${
|
||||||
@@ -63,7 +63,7 @@ class UserListAdapter(
|
|||||||
).parse(model.incubationTime)!!
|
).parse(model.incubationTime)!!
|
||||||
)
|
)
|
||||||
}"
|
}"
|
||||||
btnStartIncubation.visibility = View.GONE
|
btnBlood.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -117,6 +117,7 @@ class UserListAdapter(
|
|||||||
"Blood group updated successfully",
|
"Blood group updated successfully",
|
||||||
Toast.LENGTH_SHORT
|
Toast.LENGTH_SHORT
|
||||||
).show()
|
).show()
|
||||||
|
btnBlood.visibility = View.GONE
|
||||||
}
|
}
|
||||||
.addOnFailureListener { e ->
|
.addOnFailureListener { e ->
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
|
|||||||
@@ -64,25 +64,31 @@ class HemoCubeFragment : Fragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun initViews() {
|
private fun initViews() {
|
||||||
// binding.btnSubmit.setOnClickListener {
|
binding.btnSubmit.setOnClickListener {
|
||||||
// val bloodGroupText = binding.etBloodGroup.text.toString()
|
// val bloodGroupText = binding.etBloodGroup.text.toString()
|
||||||
// if (bloodGroupText.isEmpty()) {
|
// if (bloodGroupText.isEmpty()) {
|
||||||
// binding.etBloodGroup.error = "Please enter your blood group"
|
// binding.etBloodGroup.error = "Please enter your blood group"
|
||||||
// } else {
|
// } else {
|
||||||
// activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
// binding.progressBar.visibility = View.VISIBLE
|
binding.progressBar.visibility = View.VISIBLE
|
||||||
// }
|
}
|
||||||
// hemoCubeViewModel.uploadHemoCubeResultToDatabase(
|
hemoCubeViewModel.uploadHemoCubeResultToDatabase(
|
||||||
// isOnline, true, sharedPreferences.getString(Constants.KIT_NUMBER, "")
|
isOnline, true, sharedPreferences.getString(Constants.KIT_NUMBER, "")
|
||||||
// )
|
)
|
||||||
|
|
||||||
|
val i = Intent(
|
||||||
|
requireContext().applicationContext, DashboardActivity::class.java
|
||||||
|
)
|
||||||
|
startActivity(i)
|
||||||
|
(activity as HemocubeActivity).finish()
|
||||||
// }
|
// }
|
||||||
// }
|
}
|
||||||
// if (isTestOngoing) {
|
if (isTestOngoing) {
|
||||||
// binding.btnKit.visibility = View.GONE
|
// binding.btnKit.visibility = View.GONE
|
||||||
// binding.btnKit.isEnabled = false
|
// binding.btnKit.isEnabled = false
|
||||||
// binding.btnKit.isClickable = false
|
// binding.btnKit.isClickable = false
|
||||||
//
|
|
||||||
// }
|
}
|
||||||
binding.btnSubmit.isEnabled = false
|
binding.btnSubmit.isEnabled = false
|
||||||
binding.btnSubmit.isClickable = false
|
binding.btnSubmit.isClickable = false
|
||||||
|
|
||||||
|
|||||||
@@ -78,6 +78,7 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:text="@string/start_incubation"
|
android:text="@string/start_incubation"
|
||||||
|
android:visibility="gone"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
app:layout_constraintStart_toEndOf="@+id/btn_blood"
|
app:layout_constraintStart_toEndOf="@+id/btn_blood"
|
||||||
app:layout_constraintBottom_toBottomOf="@+id/btn_blood" />
|
app:layout_constraintBottom_toBottomOf="@+id/btn_blood" />
|
||||||
|
|||||||
Reference in New Issue
Block a user