hide bloodgroup and incubate btn after action
This commit is contained in:
@@ -53,7 +53,7 @@ class UserListAdapter(
|
||||
userName.text = "Name: ${model.name}"
|
||||
userId.text = "User ID:${model._id}"
|
||||
if (model.incubationTime == "") {
|
||||
// btnStartIncubation.visibility = View.VISIBLE
|
||||
btnBlood.visibility = View.VISIBLE
|
||||
} else {
|
||||
userId.text =
|
||||
"User ID:${model._id} \n Time: ${isBetween15And30Minutes(model.incubationTime)} \n Started at: ${
|
||||
@@ -63,7 +63,7 @@ class UserListAdapter(
|
||||
).parse(model.incubationTime)!!
|
||||
)
|
||||
}"
|
||||
btnStartIncubation.visibility = View.GONE
|
||||
btnBlood.visibility = View.GONE
|
||||
}
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ class UserListAdapter(
|
||||
"Blood group updated successfully",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
btnBlood.visibility = View.GONE
|
||||
}
|
||||
.addOnFailureListener { e ->
|
||||
Toast.makeText(
|
||||
|
||||
@@ -64,25 +64,31 @@ class HemoCubeFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun initViews() {
|
||||
// binding.btnSubmit.setOnClickListener {
|
||||
binding.btnSubmit.setOnClickListener {
|
||||
// val bloodGroupText = binding.etBloodGroup.text.toString()
|
||||
// if (bloodGroupText.isEmpty()) {
|
||||
// binding.etBloodGroup.error = "Please enter your blood group"
|
||||
// } else {
|
||||
// activity?.runOnUiThread {
|
||||
// binding.progressBar.visibility = View.VISIBLE
|
||||
// }
|
||||
// hemoCubeViewModel.uploadHemoCubeResultToDatabase(
|
||||
// isOnline, true, sharedPreferences.getString(Constants.KIT_NUMBER, "")
|
||||
// )
|
||||
activity?.runOnUiThread {
|
||||
binding.progressBar.visibility = View.VISIBLE
|
||||
}
|
||||
hemoCubeViewModel.uploadHemoCubeResultToDatabase(
|
||||
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.isEnabled = false
|
||||
// binding.btnKit.isClickable = false
|
||||
//
|
||||
// }
|
||||
|
||||
}
|
||||
binding.btnSubmit.isEnabled = false
|
||||
binding.btnSubmit.isClickable = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user