committed
This commit is contained in:
@@ -190,14 +190,14 @@ class UserListAdapter(
|
||||
// }
|
||||
}
|
||||
userCard.setOnClickListener {
|
||||
if (batLevel < 40) {
|
||||
Toast.makeText(
|
||||
view.context,
|
||||
"Battery level is low than 40%, please charge the device to continue testing",
|
||||
Toast.LENGTH_SHORT
|
||||
).show()
|
||||
return@setOnClickListener
|
||||
}
|
||||
// if (batLevel < 40) {
|
||||
// Toast.makeText(
|
||||
// view.context,
|
||||
// "Battery level is low than 40%, please charge the device to continue testing",
|
||||
// Toast.LENGTH_SHORT
|
||||
// ).show()
|
||||
// return@setOnClickListener
|
||||
// }
|
||||
if (model.testStatus != null) {
|
||||
if (model.testStatus!!) {
|
||||
Toast.makeText(
|
||||
|
||||
@@ -137,10 +137,10 @@ class HomeFragment : Fragment() {
|
||||
val dateFormat = SimpleDateFormat("yyyy-MM-dd")
|
||||
val currentDate = Date()
|
||||
val formattedDate = dateFormat.format(currentDate)
|
||||
val query = Firebase.firestore.collection("patientData")
|
||||
.whereGreaterThanOrEqualTo("createdAt", formattedDate)
|
||||
.orderBy("createdAt", Query.Direction.DESCENDING)
|
||||
// val query = Firebase.firestore.collection("patientData").whereEqualTo("testStatus", false)
|
||||
// val query = Firebase.firestore.collection("patientData")
|
||||
// .whereGreaterThanOrEqualTo("createdAt", formattedDate)
|
||||
// .orderBy("createdAt", Query.Direction.DESCENDING)
|
||||
val query = Firebase.firestore.collection("patientData").whereEqualTo("testStatus", false)
|
||||
query.get().addOnSuccessListener {
|
||||
if (it.documents.isEmpty()) {
|
||||
binding.pendingTest.visibility = View.VISIBLE
|
||||
|
||||
@@ -84,8 +84,8 @@ class HemoCubeFragment : Fragment() {
|
||||
binding.nameEditText.visibility = View.GONE
|
||||
binding.tvTitle.visibility = View.GONE
|
||||
binding.btnGo.visibility = View.GONE
|
||||
binding.btnSubmit.isEnabled = false
|
||||
binding.btnSubmit.isClickable = false
|
||||
binding.btnSubmit.isEnabled = true
|
||||
binding.btnSubmit.isClickable = true
|
||||
binding.btnPlacebuffer.visibility = View.GONE
|
||||
|
||||
binding.tvName.text = "Name: ${testDetails?.name}\n ID: ${testDetails?._id}"
|
||||
@@ -319,6 +319,7 @@ class HemoCubeFragment : Fragment() {
|
||||
|
||||
stringData.contains("#SC") -> {
|
||||
binding.tvSubtitle4.text = "Sample Completed"
|
||||
binding.btnSubmit.visibility = View.VISIBLE
|
||||
fetchResult()
|
||||
testingTrace.stop()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user