changes made for button separation for sample and buffer for better work flow
This commit is contained in:
@@ -224,6 +224,16 @@ object Constants {
|
|||||||
"HCV-001-0048",
|
"HCV-001-0048",
|
||||||
"HCV-001-0049",
|
"HCV-001-0049",
|
||||||
"HCV-001-0050",
|
"HCV-001-0050",
|
||||||
|
"HCV-000-6001",
|
||||||
|
"HCV-000-6002",
|
||||||
|
"HCV-000-6003",
|
||||||
|
"HCV-000-6004",
|
||||||
|
"HCV-000-6005",
|
||||||
|
"HCV-000-6006",
|
||||||
|
"HCV-000-6007",
|
||||||
|
"HCV-000-6008",
|
||||||
|
"HCV-000-6009",
|
||||||
|
"HCV-000-6010",
|
||||||
)
|
)
|
||||||
|
|
||||||
const val password = "SMI@12345"
|
const val password = "SMI@12345"
|
||||||
|
|||||||
@@ -1,5 +1,15 @@
|
|||||||
package com.example.hpostesting.presentation.dashboard
|
package com.example.hpostesting.presentation.dashboard
|
||||||
|
|
||||||
|
// Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
||||||
|
// Notice: All information contained herein is, and remains
|
||||||
|
// the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
||||||
|
// if any. The intellectual and technical concepts contained
|
||||||
|
// herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
||||||
|
// and its suppliers and may be covered by Indian and Foreign Patents,
|
||||||
|
// patents in process, and are protected by trade secret or copyright law.
|
||||||
|
// Dissemination of this information or reproduction of this material
|
||||||
|
// is strictly forbidden unless prior written permission is obtained
|
||||||
|
// from ShanMukha Innovations Pvt. Ltd.
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.app.AlertDialog
|
import android.app.AlertDialog
|
||||||
import android.app.DownloadManager
|
import android.app.DownloadManager
|
||||||
@@ -350,15 +360,16 @@ class HomeFragment : Fragment() {
|
|||||||
hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
||||||
isTokenAvailable = true
|
isTokenAvailable = true
|
||||||
|
|
||||||
} else if (isTokenAvailable) {
|
|
||||||
isTokenAvailable = true
|
|
||||||
hemoCubeViewModel.startPeriodicCheckUpdate()
|
|
||||||
hemoCubeViewModel.checkUpdate(createCheckUpdateRequestData())
|
|
||||||
} else {
|
|
||||||
if (isTokenExpired(accessToken)) {
|
|
||||||
hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// else if (isTokenAvailable) {
|
||||||
|
// isTokenAvailable = true
|
||||||
|
// hemoCubeViewModel.startPeriodicCheckUpdate()
|
||||||
|
// hemoCubeViewModel.checkUpdate(createCheckUpdateRequestData())
|
||||||
|
// } else {
|
||||||
|
// if (isTokenExpired(accessToken)) {
|
||||||
|
// hemoCubeViewModel.login(createLoginRequestData(userID, password))
|
||||||
|
// }
|
||||||
|
// }
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(
|
Toast.makeText(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
|
|||||||
@@ -459,6 +459,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
checkCuvetteSam = true
|
checkCuvetteSam = true
|
||||||
binding.btnRetryCheckCuvette.visibility = View.GONE
|
binding.btnRetryCheckCuvette.visibility = View.GONE
|
||||||
|
binding.btnPlacebuffer.visibility = View.GONE
|
||||||
|
binding.btnSamplestart.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resultData.contains("#AIN") && sampleClick && this.testStatusCode <= TestStatus.CUVETTE_ABSENTS.code -> {
|
resultData.contains("#AIN") && sampleClick && this.testStatusCode <= TestStatus.CUVETTE_ABSENTS.code -> {
|
||||||
@@ -473,6 +475,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
checkCuvette = true
|
checkCuvette = true
|
||||||
binding.btnRetryCheckCuvette.visibility = View.GONE
|
binding.btnRetryCheckCuvette.visibility = View.GONE
|
||||||
|
binding.btnPlacebuffer.visibility = View.VISIBLE
|
||||||
|
binding.btnSamplestart.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resultData.contains("#AIN") && this.testStatusCode <= TestStatus.CUVETTE_ABSENT.code -> {
|
resultData.contains("#AIN") && this.testStatusCode <= TestStatus.CUVETTE_ABSENT.code -> {
|
||||||
@@ -483,6 +487,11 @@ class HemoCubeFragment : Fragment() {
|
|||||||
resultData.contains("#BS") && this.testStatusCode < TestStatus.BUFFER_STARTED.code -> {
|
resultData.contains("#BS") && this.testStatusCode < TestStatus.BUFFER_STARTED.code -> {
|
||||||
hemoCubeViewModel.messages.postValue(getString(R.string.buffer_started))
|
hemoCubeViewModel.messages.postValue(getString(R.string.buffer_started))
|
||||||
this.testStatusCode = TestStatus.BUFFER_STARTED.code
|
this.testStatusCode = TestStatus.BUFFER_STARTED.code
|
||||||
|
activity?.runOnUiThread {
|
||||||
|
binding.btnPlacebuffer.visibility = View.GONE
|
||||||
|
binding.btnSamplestart.isClickable = false
|
||||||
|
binding.btnSamplestart.isEnabled = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resultData.contains("#BC") && this.testStatusCode < TestStatus.BUFFER_COMPLETED.code -> {
|
resultData.contains("#BC") && this.testStatusCode < TestStatus.BUFFER_COMPLETED.code -> {
|
||||||
@@ -493,6 +502,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
binding.tvSubtitle4.text = getString(R.string.buffer_completed)
|
binding.tvSubtitle4.text = getString(R.string.buffer_completed)
|
||||||
// binding.btnSamplestart.visibility = View.VISIBLE
|
// binding.btnSamplestart.visibility = View.VISIBLE
|
||||||
binding.btnPlacebuffer.visibility = View.GONE
|
binding.btnPlacebuffer.visibility = View.GONE
|
||||||
|
binding.btnSamplestart.isClickable = true
|
||||||
|
binding.btnSamplestart.isEnabled = true
|
||||||
}
|
}
|
||||||
this.testStatusCode = TestStatus.BUFFER_COMPLETED.code
|
this.testStatusCode = TestStatus.BUFFER_COMPLETED.code
|
||||||
|
|
||||||
@@ -672,6 +683,8 @@ class HemoCubeFragment : Fragment() {
|
|||||||
activity?.runOnUiThread {
|
activity?.runOnUiThread {
|
||||||
// binding.btnPlacebuffer.visibility = View.GONE
|
// binding.btnPlacebuffer.visibility = View.GONE
|
||||||
binding.btnRetryCheckCuvette.visibility = View.VISIBLE
|
binding.btnRetryCheckCuvette.visibility = View.VISIBLE
|
||||||
|
binding.btnPlacebuffer.visibility = View.GONE
|
||||||
|
binding.btnSamplestart.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,7 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btn_placebuffer"
|
android:id="@+id/btn_placebuffer"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="150dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="16dp"
|
android:layout_marginHorizontal="16dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
|
|||||||
Reference in New Issue
Block a user