Merge branch 'kitscan_fix' into Homocube
This commit is contained in:
@@ -18,8 +18,8 @@ android {
|
||||
applicationId "in.sminnovations.hpostesting"
|
||||
minSdk 21
|
||||
targetSdk 34
|
||||
versionCode 2
|
||||
versionName "2.0.1"
|
||||
versionCode 3
|
||||
versionName "2.1.3"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.example.hpostesting.presentation.adapter.UserListAdapter
|
||||
import com.example.hpostesting.presentation.hemocube.HemoCubeViewModel
|
||||
import com.example.hpostesting.presentation.testRight.TestRightViewModel
|
||||
import com.firebase.ui.firestore.FirestoreRecyclerOptions
|
||||
import com.google.firebase.firestore.Query
|
||||
import com.google.firebase.firestore.ktx.firestore
|
||||
import com.google.firebase.ktx.Firebase
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
@@ -90,7 +91,7 @@ class HomeFragment : Fragment() {
|
||||
}
|
||||
}
|
||||
private fun loadUserData() {
|
||||
val query = Firebase.firestore.collection("patientData").whereEqualTo("testStatus", false)
|
||||
val query = Firebase.firestore.collection("patientData").whereEqualTo("testStatus", false).orderBy("createdAt", Query.Direction.DESCENDING)
|
||||
query.get().addOnSuccessListener {
|
||||
if (it.documents.isEmpty()) {
|
||||
binding.pendingTest.visibility = View.VISIBLE
|
||||
|
||||
@@ -9,6 +9,7 @@ import androidx.lifecycle.ViewModelProvider
|
||||
import com.example.hpostesting.presentation.dashboard.ui.slideshow.SlideshowViewModel
|
||||
import `in`.sminnovations.hpostesting.databinding.FragmentSlideshowBinding
|
||||
|
||||
|
||||
class SlideshowFragment : Fragment() {
|
||||
|
||||
private var _binding: FragmentSlideshowBinding? = null
|
||||
@@ -20,7 +21,7 @@ class SlideshowFragment : Fragment() {
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
savedInstanceState: Bundle?,
|
||||
): View {
|
||||
val slideshowViewModel =
|
||||
ViewModelProvider(this).get(SlideshowViewModel::class.java)
|
||||
@@ -28,6 +29,12 @@ class SlideshowFragment : Fragment() {
|
||||
_binding = FragmentSlideshowBinding.inflate(inflater, container, false)
|
||||
val root: View = binding.root
|
||||
|
||||
val pInfo = requireActivity().packageManager.getPackageInfo(
|
||||
requireActivity().packageName, 0
|
||||
)
|
||||
val version = pInfo.versionName
|
||||
binding.textSlideshow.text = version
|
||||
|
||||
// val textView: TextView = binding.textSlideshow
|
||||
// slideshowViewModel.text.observe(viewLifecycleOwner) {
|
||||
// textView.text = it
|
||||
|
||||
@@ -102,6 +102,11 @@ class HemoCubeFragment : Fragment() {
|
||||
(activity as HemocubeActivity).finish()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
resetKitCount()
|
||||
val intent = Intent(context, KitScanActivity::class.java)
|
||||
startActivity(intent)
|
||||
(activity as HemocubeActivity).finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -377,7 +382,7 @@ class HemoCubeFragment : Fragment() {
|
||||
}
|
||||
|
||||
} catch (_: Exception) {
|
||||
|
||||
Toast.makeText( requireContext(), "Error while processing device data", Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user