Compare commits
1 Commits
Diagnostic
...
dev-assura
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c379d68679 |
@@ -13,6 +13,7 @@ import android.widget.AdapterView
|
|||||||
import android.widget.ArrayAdapter
|
import android.widget.ArrayAdapter
|
||||||
import android.widget.Spinner
|
import android.widget.Spinner
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
|
import androidx.core.view.isVisible
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import com.example.hpostesting.data.DataHolder
|
import com.example.hpostesting.data.DataHolder
|
||||||
import com.example.hpostesting.data.constant.Constants
|
import com.example.hpostesting.data.constant.Constants
|
||||||
@@ -102,9 +103,6 @@ class AssuranceControlsFragment: Fragment() {
|
|||||||
id: Long
|
id: Long
|
||||||
) {
|
) {
|
||||||
val selectedValue: String = volumeOptions[position]
|
val selectedValue: String = volumeOptions[position]
|
||||||
if (!selectedValue.equals("Select volume")) {
|
|
||||||
DataHolder.hemoCubeTestData!!.volume = selectedValue
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onNothingSelected(parent: AdapterView<*>?) {
|
override fun onNothingSelected(parent: AdapterView<*>?) {
|
||||||
@@ -125,13 +123,19 @@ class AssuranceControlsFragment: Fragment() {
|
|||||||
volumeSpinner.setSelection(volumePosition)
|
volumeSpinner.setSelection(volumePosition)
|
||||||
|
|
||||||
binding.btnSubmit.setOnClickListener {
|
binding.btnSubmit.setOnClickListener {
|
||||||
val selectedSolution = DataHolder.hemoCubeTestData!!.solution
|
val selectedSolution = binding.spinnerSolutions.selectedItem.toString()
|
||||||
val selectedVolume = DataHolder.hemoCubeTestData!!.volume
|
val selectedConcentration = binding.spinnerConcentration.selectedItem.toString()
|
||||||
if (selectedSolution == "Select solution" || selectedVolume == "Select volume") {
|
|
||||||
Toast.makeText(requireContext(), "Please select both solution and volume", Toast.LENGTH_SHORT).show()
|
// Check if any of the selections are default values
|
||||||
return@setOnClickListener
|
if (selectedSolution == "Select solution") {
|
||||||
|
Toast.makeText(requireContext(), "Please select a solution", Toast.LENGTH_LONG).show()
|
||||||
|
return@setOnClickListener // Prevent further execution
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (selectedConcentration == "Select concentration") {
|
||||||
|
Toast.makeText(requireContext(), "Please select a concentration", Toast.LENGTH_LONG).show()
|
||||||
|
return@setOnClickListener // Prevent further execution
|
||||||
|
}
|
||||||
DataHolder.hemoCubeTestData!!.quickCapture = true
|
DataHolder.hemoCubeTestData!!.quickCapture = true
|
||||||
val currentUnixTime = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
val currentUnixTime = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
Instant.now().epochSecond
|
Instant.now().epochSecond
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ class HomeFragment : Fragment() {
|
|||||||
thresholds = Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId].toString(),
|
thresholds = Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId].toString(),
|
||||||
interpretation = userData.classificationResult,
|
interpretation = userData.classificationResult,
|
||||||
testId = userData._id,
|
testId = userData._id,
|
||||||
testTime = userData.testTime,
|
testTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
collectionTime = "2024-02-08 16:33:56",//userData.testTime,
|
collectionTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
expiryTime = "2024-02-08 16:33:56"//userData.testTime,
|
expiryTime = "2024-02-08 16:33:56"//userData.testTime,
|
||||||
)
|
)
|
||||||
@@ -817,7 +817,7 @@ class HomeFragment : Fragment() {
|
|||||||
thresholds = Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId].toString(),
|
thresholds = Constants.BUFFER_INTENSITY_THRESHOLDS[userData.deviceId].toString(),
|
||||||
interpretation = userData.classificationResult,
|
interpretation = userData.classificationResult,
|
||||||
testId = userData._id,
|
testId = userData._id,
|
||||||
testTime = userData.testTime,
|
testTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
collectionTime = "2024-02-08 16:33:56",//userData.testTime,
|
collectionTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
expiryTime = "2024-02-08 16:33:56",//userData.testTime,
|
expiryTime = "2024-02-08 16:33:56",//userData.testTime,
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user