app version 131

This commit is contained in:
chandrashekhar reddy
2025-02-17 11:26:44 +05:30
parent c312bf0f39
commit 5f2d5fed85
3 changed files with 11 additions and 4 deletions

View File

@@ -141,9 +141,9 @@ class KitScanActivity : AppCompatActivity(), IDcsSdkApiDelegate {
val time = timeDifference(sharedPreference.getString(Constants.KIT_TIME, "").toString())
val kitNum = sharedPreference.getString(Constants.KIT_NUMBER, "").toString()
// Toast.makeText(this@KitScanActivity,"Test MAx time"+ time+"-Test count-"+kitNum,Toast.LENGTH_SHORT).show()
// if (sharedPreference.getString(Constants.USER_ID, "").toString() == "ADMIN") {
// moveToNext()
// }else{
if (sharedPreference.getString(Constants.USER_ID, "").toString() == "ADMIN") {
moveToNext()
}else{
if (DataHolder.sampleReadCounter <= maxTest && kitNum != "" && time < Constants.MAX_KIT_TIME) {
moveToNext()
} else {
@@ -158,7 +158,7 @@ class KitScanActivity : AppCompatActivity(), IDcsSdkApiDelegate {
apply()
}
}
//}
}
// if (checkHemoCubeKitData()) {
// DataHolder.selectedTest!!.kitSerial =

View File

@@ -1390,6 +1390,7 @@ class TrueHemeTestFragment : Fragment() {
apply()
}
}
trueHemeTestViewModel.updateLocalData()
} catch (e: Exception) {
Toast.makeText(
requireContext(),

View File

@@ -791,4 +791,10 @@ class TrueHemeTestViewModel @Inject constructor(
"yyyy-MM-dd HH:mm:ss", Locale.getDefault()
).format(Calendar.getInstance().time)
}
fun updateLocalData() {
viewModelScope.launch {
parseData()
hemoCubeDao.updateTest(testDetails!!)
}
}
}