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