refs #6458 feat:showDialogChecker
This commit is contained in:
parent
4240c5ab51
commit
24d1ccdd9b
|
@ -10,7 +10,6 @@ import es.verdnatura.databinding.FragmentGeneralBlackBinding
|
|||
import es.verdnatura.domain.ConstAndValues
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionViewModel
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
|
||||
|
@ -60,35 +59,37 @@ class ControladorFragment :
|
|||
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
binding.scanInput.setText(textScanned_filterDouble(binding.scanInput.text!!.toString()))
|
||||
//Tarea 6458
|
||||
collectionViewModel = CollectionViewModel(mobileApplication)
|
||||
collectionViewModel!!.ticketState(binding.scanInput.text.toString().toInt())
|
||||
collectionViewModel!!.responseTicketState.observe(viewLifecycleOwner, Observer { it ->
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if ((it.code == "ON_CHECKING" || it.code == "CHECKED") && it.user.id != mobileApplication.userId) {
|
||||
var customDialogWarning = CustomDialog(requireContext())
|
||||
customDialogWarning.setTitle(getString(R.string.info))
|
||||
customDialogWarning.setDescription(
|
||||
if (it.code == "ON_CHECKING") {
|
||||
getString(R.string.checkingByUser, it.user.username)
|
||||
} else {
|
||||
getString(R.string.checkedByUser, it.user.username)
|
||||
}
|
||||
)
|
||||
.setOkButton(getString(R.string.aware)) {
|
||||
customDialogWarning.dismiss()
|
||||
binding.splashProgress.visibility= VISIBLE
|
||||
viewModel.collectionTicketGet(
|
||||
sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(
|
||||
ConstAndValues.SECTORFK
|
||||
),
|
||||
collectionFk = binding.scanInput.text.toString().toInt(),
|
||||
print = "0",
|
||||
type = ConstAndValues.CONTROLADOR
|
||||
//Tarea 6458 descomentar si ok
|
||||
/* collectionViewModel = CollectionViewModel(mobileApplication)
|
||||
collectionViewModel!!.ticketState(binding.scanInput.text.toString().toInt())
|
||||
collectionViewModel!!.responseTicketState.observe(
|
||||
viewLifecycleOwner,
|
||||
Observer { it ->
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if ((it.code == "ON_CHECKING" || it.code == "CHECKED") && it.user.id != mobileApplication.userId) {
|
||||
var customDialogWarning = CustomDialog(requireContext())
|
||||
customDialogWarning.setTitle(getString(R.string.info))
|
||||
customDialogWarning.setDescription(
|
||||
if (it.code == "ON_CHECKING") {
|
||||
getString(R.string.checkingByUser, it.user.username)
|
||||
} else {
|
||||
getString(R.string.checkedByUser, it.user.username)
|
||||
}
|
||||
)
|
||||
}.show()
|
||||
customDialogWarning.currentFocus
|
||||
} else {
|
||||
.setOkButton(getString(R.string.aware)) {
|
||||
customDialogWarning.dismiss()
|
||||
binding.splashProgress.visibility= VISIBLE
|
||||
viewModel.collectionTicketGet(
|
||||
sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(
|
||||
ConstAndValues.SECTORFK
|
||||
),
|
||||
collectionFk = binding.scanInput.text.toString().toInt(),
|
||||
print = "0",
|
||||
type = ConstAndValues.CONTROLADOR
|
||||
)
|
||||
}.show()
|
||||
customDialogWarning.currentFocus
|
||||
} else {*/
|
||||
viewModel.collectionTicketGet(
|
||||
sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(
|
||||
ConstAndValues.SECTORFK
|
||||
|
@ -97,8 +98,8 @@ class ControladorFragment :
|
|||
print = "0",
|
||||
type = ConstAndValues.CONTROLADOR
|
||||
)
|
||||
}
|
||||
})
|
||||
// }
|
||||
//})
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
<dimen name="h6">20sp</dimen>
|
||||
<dimen name="h7">18sp</dimen>
|
||||
<dimen name="h8">16sp</dimen>
|
||||
<dimen name="h9">14sp</dimen>
|
||||
<dimen name="subtitle1">16sp</dimen>
|
||||
<dimen name="subtitle2">14sp</dimen>
|
||||
|
||||
|
|
Loading…
Reference in New Issue