refs #6810 feat:crashlytics
This commit is contained in:
parent
343d9434e1
commit
abf1dfd37b
|
@ -41,7 +41,23 @@ import es.verdnatura.domain.ConstAndValues.WAREHOUSEFK
|
|||
import es.verdnatura.domain.notNull
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.*
|
||||
import es.verdnatura.presentation.common.DataMessageSalix
|
||||
import es.verdnatura.presentation.common.ItemScanned
|
||||
import es.verdnatura.presentation.common.OnBarcodeRowClickListener
|
||||
import es.verdnatura.presentation.common.OnMistakeClickListener
|
||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.common.OnQuantityClickListener
|
||||
import es.verdnatura.presentation.common.OnSaleClickListener
|
||||
import es.verdnatura.presentation.common.OnTicketClickListener
|
||||
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
|
||||
import es.verdnatura.presentation.common.addViewObserver
|
||||
import es.verdnatura.presentation.common.hideKeyboard
|
||||
import es.verdnatura.presentation.common.itemScanIsQr
|
||||
import es.verdnatura.presentation.common.itemScanValue
|
||||
import es.verdnatura.presentation.common.onPackingClickListener
|
||||
import es.verdnatura.presentation.common.showKeyboard
|
||||
import es.verdnatura.presentation.common.showKeyboardIn
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||
|
@ -52,7 +68,12 @@ import es.verdnatura.presentation.view.feature.collection.ItemVO
|
|||
import es.verdnatura.presentation.view.feature.collection.adapter.SaleAdapter
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.*
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyListVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||
import org.json.JSONObject
|
||||
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
|
@ -997,6 +1018,12 @@ class CollectionFragment(
|
|||
|
||||
}
|
||||
|
||||
/* if (type == CONTROLADOR) {
|
||||
myGroupList.sortedByDescending{ it.isAdded }.sortedWith(
|
||||
compareBy { it.picked })
|
||||
} else {
|
||||
myGroupList
|
||||
},*/
|
||||
saleAdapter =
|
||||
SaleAdapter(
|
||||
myGroupList,
|
||||
|
@ -1201,6 +1228,8 @@ class CollectionFragment(
|
|||
}
|
||||
} else if (type == CONTROLADOR || type == PRECHECKER) {
|
||||
|
||||
try {
|
||||
|
||||
for (saleVO in sales) {
|
||||
//0-Salegroup
|
||||
|
||||
|
@ -1239,6 +1268,9 @@ class CollectionFragment(
|
|||
}
|
||||
index += 1
|
||||
}
|
||||
} catch (ex: Exception) {
|
||||
getString(R.string.errorInput).toast(requireContext())
|
||||
}
|
||||
//Lo escaneado no encontrado miramos si es parking o ticket
|
||||
if (!isOk) {
|
||||
if (txtscan.contains("-")) {
|
||||
|
@ -1254,42 +1286,51 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
} else {
|
||||
binding.splashProgress.visibility =
|
||||
VISIBLE
|
||||
|
||||
storedPosition = 0
|
||||
storedBackPosition = 0
|
||||
// if (type != PRECHECKER) {
|
||||
isMarking = false
|
||||
|
||||
try {
|
||||
var myScan = txtscan.toInt()
|
||||
|
||||
var hasItemSales = sales.any {
|
||||
it.itemFk == txtscan.toInt()
|
||||
}
|
||||
if (!hasItemSales) {
|
||||
binding.splashProgress.visibility =
|
||||
VISIBLE
|
||||
viewModel.collectionTicketGet(
|
||||
txtscan.toInt(),
|
||||
myScan,
|
||||
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
|
||||
} catch (ex: Exception) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
ma.messageWithSound(
|
||||
getString(R.string.error),
|
||||
isError = false,
|
||||
isPlayed = false
|
||||
)
|
||||
}
|
||||
|
||||
if (type.equals(CONTROLADOR)) {
|
||||
binding.splashProgress.visibility =
|
||||
VISIBLE
|
||||
viewModel.ticketIsOutClosureZone(
|
||||
txtscan.toInt()
|
||||
myScan
|
||||
)
|
||||
//Tarea 6458
|
||||
viewModel.ticketState(txtscan.toInt())
|
||||
viewModel.ticketState(myScan)
|
||||
|
||||
}
|
||||
}else{
|
||||
mperror!!.start()
|
||||
}
|
||||
|
||||
} catch (ex: Exception) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
getString(R.string.errorInput).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun findSale(txtscan: String, position: Int) {
|
||||
|
@ -1539,7 +1580,11 @@ class CollectionFragment(
|
|||
state = 0
|
||||
if (sales[position].isPrepared == "1") {
|
||||
customDialog.setTitle(getString(R.string.unmarkLine))
|
||||
.setDescription(getString(R.string.goUnmark) + sales[position].itemFk + getString(R.string.sure))
|
||||
.setDescription(
|
||||
getString(R.string.goUnmark) + sales[position].itemFk + getString(
|
||||
R.string.sure
|
||||
)
|
||||
)
|
||||
.setOkButton(getString(R.string.unmark)) {
|
||||
sales[position].isPrepared = "0"
|
||||
sales[position].pickedQuantity = 0
|
||||
|
@ -1966,7 +2011,9 @@ class CollectionFragment(
|
|||
itemFk = customDialogList.getValue().toInt(),
|
||||
ticketFk = ticketSelected,
|
||||
quantityFk = customDialogList.getValueTwo().toInt(),
|
||||
warehouseFk = mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK)
|
||||
warehouseFk = mobileApplication.dataStoreApp.readDataStoreKey(
|
||||
WAREHOUSEFK
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
@ -2194,6 +2241,8 @@ class CollectionFragment(
|
|||
//FALTAS / BASURA / SPLIT
|
||||
|
||||
private fun showQuantityDialog(position: Int) {
|
||||
try {
|
||||
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad))
|
||||
.setValue("")
|
||||
.setOkButtonAdd(getString(R.string.Agregar)) {
|
||||
|
@ -2206,6 +2255,9 @@ class CollectionFragment(
|
|||
customDialogThreeButtons.dismiss()
|
||||
}.show()
|
||||
customDialogThreeButtons.setFocusDialogValue()
|
||||
} catch (ex: Exception) {
|
||||
getString(R.string.errorInput).toast(requireContext())
|
||||
}
|
||||
}
|
||||
|
||||
private fun missingTrashSuccesful() {
|
||||
|
|
|
@ -63,10 +63,11 @@ class ReubicationCollectionFragment(
|
|||
|
||||
for (item in list) {
|
||||
item.code = shelving.uppercase()
|
||||
if (!item.carros.isNullOrEmpty()) {
|
||||
for (i in item.carros) {
|
||||
i.visible = "(" + i.visible + ")"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
adapter = ReubicatorAdapter(list.sortedWith(compareBy { item ->
|
||||
|
|
Loading…
Reference in New Issue