refs #3520 feat:silex→salix

This commit is contained in:
Sergio De la torre 2024-04-19 08:53:41 +02:00
parent 0ae481ee4a
commit 0044fcfaa9
23 changed files with 340 additions and 923 deletions

View File

@ -16,7 +16,6 @@ abstract class BaseViewModel : ViewModel, LifecycleObserver {
constructor() : super()
constructor(context: Context) : super() {
app = context as MobileApplication
silex = app.silex
salix = app.salix
}
}

View File

@ -15,7 +15,6 @@ import android.text.InputType.TYPE_CLASS_TEXT
import android.util.Log.d
import android.view.KeyEvent
import android.view.KeyEvent.ACTION_DOWN
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.WindowManager
@ -78,8 +77,7 @@ import org.json.JSONObject
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class CollectionFragment(
var collection: CollectionVO = CollectionVO(0),
var type: String = SACADOR
var collection: CollectionVO = CollectionVO(0), var type: String = SACADOR
) : BaseFragment<FragmentCollectionBinding, CollectionViewModel>(CollectionViewModel::class) {
private lateinit var dataMessageSalix: DataMessageSalix
@ -160,9 +158,13 @@ class CollectionFragment(
collection.collectionFk
)
//tarea 6458
viewModel.ticketState(collection.collectionFk)
workerFkFromTicket = collection.tickets.get(0).sales.get(0).workerFk
try {
workerFkFromTicket = collection.tickets[0].sales[0].workerFk
} catch (ex: Exception) {
getString(R.string.ticketWithoutWorker).toast(requireContext())
}
}
if (collection.tickets.isEmpty()) {
@ -188,7 +190,7 @@ class CollectionFragment(
customDialog = CustomDialog(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
ma.hideBottomNavigation(GONE)
binding.splashProgress.visibility = VISIBLE
setEvents()
setToolBar()
if (collection.tickets.isNotEmpty()) {
@ -285,7 +287,7 @@ class CollectionFragment(
private fun updateScreen() {
canChangeState = false
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -351,7 +353,6 @@ class CollectionFragment(
private fun getCollection() {
binding.splashProgress.visibility = VISIBLE
if (!buttonPushedGetCollection) {
//Tarea 3520
viewModel.collectionGetId(
@ -360,12 +361,6 @@ class CollectionFragment(
print = "0",
type
)
/* viewModel.collection_get(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
print = "0",
type
)*/
buttonPushedGetCollection = true
} else {
viewModel.collectionTicketGet(
@ -453,7 +448,7 @@ class CollectionFragment(
isMarking = false
binding.collectionSwipe.isRefreshing = false
// if (type != PRECHECKER) {
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -490,7 +485,7 @@ class CollectionFragment(
@RequiresApi(Build.VERSION_CODES.O)
override fun observeViewModel() {
with(viewModel) {
binding.splashProgress.visibility = GONE
collectionTicketList.observe(viewLifecycleOwner, Observer {
if (!it.isError) {
@ -513,38 +508,36 @@ class CollectionFragment(
})
responseUsedShelves.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
ma.messageWithSound(
if (it.isError) it.errorMessage else getString(R.string.savedShelves),
it.isError, true
it.isError,
true
)
}
})
responseParking.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
binding.splashProgress.visibility = GONE
ma.messageWithSound(
if (it.isError) it.errorMessage else getString(R.string.Aparcado),
it.isError, true
it.isError,
true
)
}
})
responsePrint.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
if (it.isError) {
ma.messageWithSound(
it.errorMessage,
it.isError, true
it.errorMessage, it.isError, true
)
} else {
(getString(R.string.Imprimiendo) + mobileApplication.dataStoreApp.readDataStoreKey<String>(
@ -558,19 +551,16 @@ class CollectionFragment(
})
responseSplit.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
if (!goBack) {
if (it.isError) {
ma.messageWithSound(
it.errorMessage,
it.isError, true
it.errorMessage, it.isError, true
)
} else {
ma.messageWithSound(
getString(R.string.splitOk),
it.isError, true
getString(R.string.splitOk), it.isError, true
)
//responseSaleMoveSuccesful()
}
@ -585,7 +575,7 @@ class CollectionFragment(
ma.messageWithSound(it.errorMessage, true, true)
} else {
ma.messageWithSound(getString(R.string.previousCollected), false, true)
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -595,19 +585,19 @@ class CollectionFragment(
}
})
placementSuppleyList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) printShelvingResult(it)
goBack = false
})
item.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) toastDisponibility(it)
goBack = false
})
responseNew.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
// if (!goBack) {
if (it.isError) {
customDialog.setTitle(getString(R.string.disponibility))
@ -618,10 +608,6 @@ class CollectionFragment(
}.show()
} else {
binding.splashProgress.visibility =
VISIBLE
if (!goBack) {
viewModel.collectionTicketGet(
@ -639,7 +625,7 @@ class CollectionFragment(
})
responseCode.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (!goBack2) {
if (it.isError) {
customDialog.setTitle(getString(R.string.error))
@ -674,7 +660,7 @@ class CollectionFragment(
})
responseTicketState.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
if (!goBack) {
if ((it.code == "ON_CHECKING" || it.code == "CHECKED") && it.user.id != mobileApplication.userId) {
var customDialogWarningChecking = CustomDialog(requireContext())
@ -685,8 +671,7 @@ class CollectionFragment(
} else {
getString(R.string.checkedByUser, it.user.username)
}
)
.setOkButton(getString(R.string.aware)) {
).setOkButton(getString(R.string.aware)) {
customDialogWarningChecking.dismiss()
}.show()
}
@ -695,7 +680,7 @@ class CollectionFragment(
}
responseTicketClosure.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
if (it.response.toBoolean()) {
var customDialogWarning = CustomDialog(requireContext())
@ -732,9 +717,7 @@ class CollectionFragment(
} else {
ma.messageWithSound(
getString(R.string.errorRegistered),
isError = false,
false
getString(R.string.errorRegistered), isError = false, false
)
goBack = true
}
@ -744,19 +727,15 @@ class CollectionFragment(
responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
if (!goMistakeBack)
ma.messageWithSound(
if (!goMistakeBack) ma.messageWithSound(
getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + workerFkFromTicket,
isError = true,
true
)
} else {
if (!goMistakeBack)
callPicker(it.response)
if (!goMistakeBack) callPicker(it.response)
}
goMistakeBack = true
@ -764,17 +743,13 @@ class CollectionFragment(
mistakeList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
/*sergio:se quita y se pone esta comprobacion porque si no aparece de nuevo otra vez al volver atrás */
if (!goMistakeBack)
showMistakeList(it.list)
if (!goMistakeBack) showMistakeList(it.list)
goMistakeBack = true
})
//sergio: para si hay algun ticket por revisar antes de parkinear
responseCollectionUnchecked.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, false)
@ -787,9 +762,7 @@ class CollectionFragment(
.setOkButton(getString(R.string.accept)) {
customDialog.dismiss()
}
.setKoButton(getString(R.string.review)) {
binding.splashProgress.visibility = View.VISIBLE
}.setKoButton(getString(R.string.review)) {
viewModel.collectionTicketGet(
it.response.toInt(),
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -801,8 +774,7 @@ class CollectionFragment(
customDialog.show()
} else {
viewModel.setParking(
ticketFk = tickets[0].toInt(),
parking = ticketScanTxt
ticketFk = tickets[0].toInt(), parking = ticketScanTxt
)
}
// if (!goBack)navigateToCollectionList(it)
@ -812,9 +784,8 @@ class CollectionFragment(
loadResponseDel.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.INVISIBLE
if (it.isError) {
binding.splashProgress.visibility = GONE
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, false)
@ -837,7 +808,7 @@ class CollectionFragment(
/* responseDel.observe(viewLifecycleOwner, Observer {
if (it.isError) {
binding.splashProgress.visibility = GONE
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, false)
@ -874,14 +845,13 @@ class CollectionFragment(
responseSaleReplace.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, true)
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -903,12 +873,12 @@ class CollectionFragment(
loadResponseSaleTrackingMark.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = GONE
if (it.isError) {
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, true)
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -982,7 +952,6 @@ class CollectionFragment(
state = 0
binding.mainToolbar.toolbarTitle.text = collection.collectionFk.toString()
binding.splashProgress.visibility = View.GONE
var salesList: ArrayList<SaleVO> = ArrayList()
tickets = ArrayList()
var observations = ""
@ -991,8 +960,9 @@ class CollectionFragment(
ticket.sales.forEach { saleVO ->
if (type == SACADOR && saleVO.quantity != 0) {
salesList.add(saleVO)
if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty())
tickets.add(saleVO.ticketFk)
if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty()) tickets.add(
saleVO.ticketFk
)
} else if (type == CONTROLADOR) {
salesList.add(saleVO)
//Tarea 6607
@ -1002,19 +972,21 @@ class CollectionFragment(
} else {
saleVO.packingChecked = 1
}*/
if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty())
tickets.add(saleVO.ticketFk)
if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty()) tickets.add(
saleVO.ticketFk
)
} else if (type == PRECHECKER) {
if (saleVO.saleGroupFk != "") {
salesList.add(saleVO)
if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty())
tickets.add(saleVO.ticketFk)
if (tickets.firstOrNull { it == saleVO.ticketFk }
.isNullOrEmpty()) tickets.add(saleVO.ticketFk)
}
}
}
observations = observations.takeIf { !it.isNullOrBlank() }?.plus(" ${ticket.observations}") ?: ""
}//}
observations =
observations.takeIf { !it.isNullOrBlank() }?.plus(" ${ticket.observations}") ?: ""
}
sales = salesList.sortedWith(compareBy({ it.saleOrder }))
myGroupList = groupSaleGroup(salesList).sortedWith(compareBy({ it.saleOrder }))
@ -1031,8 +1003,7 @@ class CollectionFragment(
} else {
myGroupList
},*/
saleAdapter =
SaleAdapter(
saleAdapter = SaleAdapter(
myGroupList,
pasillerosItemClickListener!!,
object : OnQuantityClickListener {
@ -1078,7 +1049,7 @@ class CollectionFragment(
object : OnMistakeClickListener {
override fun onMistakeClickListener(sale: SaleVO) {
//Tarea #4969
binding.splashProgress.visibility = VISIBLE
viewModel.mistakeType()
mistakeSale = sale
goMistakeBack = false
@ -1096,8 +1067,7 @@ class CollectionFragment(
var entryPoint = Gson().toJson(
mutableMapOf(
"entryPoint" to sale.ticketFk,
"web" to "${
"entryPoint" to sale.ticketFk, "web" to "${
mobileApplication.dataStoreApp.getServerSalix()
}/#!/ticket/${sale.ticketFk}/sale"
)
@ -1109,7 +1079,8 @@ class CollectionFragment(
)
}
}
}, type = type
},
type = type
)
@ -1133,10 +1104,8 @@ class CollectionFragment(
if (type == SACADOR) {
setStoredPosition(true)
} else {
if (storedPosition != 0)
setListPosition(storedPosition, true)
else if (storedBackPosition != 0)
setListPosition(storedBackPosition, true)
if (storedPosition != 0) setListPosition(storedPosition, true)
else if (storedBackPosition != 0) setListPosition(storedBackPosition, true)
}
}
@ -1223,8 +1192,7 @@ class CollectionFragment(
if (tickets.size > 0) {
viewModel.setParking(
ticketFk = tickets[0].toInt(),
parking = txtscan
ticketFk = tickets[0].toInt(), parking = txtscan
)
}
@ -1306,8 +1274,7 @@ class CollectionFragment(
it.itemFk == txtscan.toInt()
}
if (!hasItemSales) {
binding.splashProgress.visibility =
VISIBLE
viewModel.collectionTicketGet(
myScan,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -1317,8 +1284,7 @@ class CollectionFragment(
if (type.equals(CONTROLADOR)) {
binding.splashProgress.visibility =
VISIBLE
viewModel.ticketIsOutClosureZone(
myScan
)
@ -1331,7 +1297,7 @@ class CollectionFragment(
}
} catch (ex: Exception) {
binding.splashProgress.visibility = GONE
getString(R.string.errorInput).toast(requireContext())
}
@ -1365,8 +1331,7 @@ class CollectionFragment(
}
shelvingIndex += 1
}
}
/*
}/*
if (!isOk){
//3- Por barcode
saleVO.Barcodes.forEach { barcode ->
@ -1382,8 +1347,7 @@ class CollectionFragment(
if (txtscan.contains("-")) {
tickets.forEach {
viewModel.setParking(
ticketFk = it.toInt(),
parking = txtscan
ticketFk = it.toInt(), parking = txtscan
)
}
@ -1420,8 +1384,7 @@ class CollectionFragment(
saleAdapter!!.notifyDataSetChanged()
saleTrackingReplace(position, newType)
setListPosition(position, false)
/* } else {
setListPosition(position, false)/* } else {
sales[position].packingChecked = sales[position].packingChecked - 1
saleAdapter!!.notifyDataSetChanged()
}*/
@ -1501,8 +1464,7 @@ class CollectionFragment(
SECTORDESCRIP
).uppercase() == getString(
R.string.sectorALGEMESINEW
)
|| type == PRECHECKER
) || type == PRECHECKER
) {
var myPosition = position
@ -1548,7 +1510,6 @@ class CollectionFragment(
private fun saleTrackingReplace(position: Int, type: String) {
//Tarea #4371 se quita para ver si funciona correctamente
//binding.splashProgress.visibility=VISIBLE
viewModel.saleTrackingReplace(
saleFk = sales[position].saleFk,
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
@ -1564,7 +1525,6 @@ class CollectionFragment(
//Tarea #4371 se quita para ver si funciona correctamente
private fun saleTracking_mark(position: Int, type: String) {
binding.splashProgress.visibility = VISIBLE
viewModel.run {
saleTracking_mark(
saleFk = sales[position].saleFk,
@ -1586,21 +1546,17 @@ class CollectionFragment(
state = 0
if (sales[position].isPrepared == "1") {
customDialog.setTitle(getString(R.string.unmarkLine))
.setDescription(
customDialog.setTitle(getString(R.string.unmarkLine)).setDescription(
getString(R.string.goUnmark) + sales[position].itemFk + getString(
R.string.sure
)
)
.setOkButton(getString(R.string.unmark)) {
).setOkButton(getString(R.string.unmark)) {
sales[position].isPrepared = "0"
sales[position].pickedQuantity = 0
saleAdapter!!.notifyDataSetChanged()
setListPosition(position, false)
if (type != PRECHECKER) {
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingUpdateFromSale(
sales[position].saleFk
)
@ -1629,11 +1585,10 @@ class CollectionFragment(
private fun showShelving(position: Int, shelvingPosition: Int) {
storedShelvingPosition = shelvingPosition
storedPosition = position
binding.splashProgress.visibility = VISIBLE
var quantityGet = 0
try {
quantityGet =
(sales[position].quantity!! - sales[position].pickedQuantity!!.toInt())
quantityGet = (sales[position].quantity!! - sales[position].pickedQuantity!!.toInt())
} catch (e: Exception) {
}
//Log.i("VERDNATURA:","Aparece para enviar")
@ -1656,8 +1611,7 @@ class CollectionFragment(
if (!placementSupplyListVO.list.isEmpty()) {
var placement: PlacementSupplyVO? = null
placementSupplyListVO.list.forEach { placementVO ->
if (placementVO.stock != "0" && placement == null)
placement = placementVO
if (placementVO.stock != "0" && placement == null) placement = placementVO
}
if (placement != null) {
shelving = placement!!.shelving
@ -1670,8 +1624,7 @@ class CollectionFragment(
}
listPlacementSupply = ArrayList()
placementSupplyListVO.list.forEach {
if (it.stock != "0")
listPlacementSupply.add(BarcodeVO(code = it.proposal))
if (it.stock != "0") listPlacementSupply.add(BarcodeVO(code = it.proposal))
//////Log.i("VERDNATURA:","Array de placementsupply")
}
try {
@ -1683,13 +1636,10 @@ class CollectionFragment(
) {
if (customDialogList.getValueTwo().isNotEmpty()) {
isScanned = false
/*Tarea #5109*/
isScanned = false/*Tarea #5109*/
customDialogList.setValueTwo(
itemScanValue(
customDialogList.getValueTwo(),
"buy",
"more"
customDialogList.getValueTwo(), "buy", "more"
).toString()
)
@ -1705,8 +1655,7 @@ class CollectionFragment(
if (checkItemScan(customDialogList.getValueTwo())) {
onQuantityOfShelvingSelected(itemShelvingFk)
//Log.i("VERDNATURA:","Cantidad seleccionada")
mpok?.start()
/* Se quita para comprobar al final de saleTracking_mark
mpok?.start()/* Se quita para comprobar al final de saleTracking_mark
ReviewQuantityForRefreshingAndSorting(
customDialogList.getValue().toInt(),
sales[storedPosition].quantity!!.toInt(),
@ -1715,8 +1664,7 @@ class CollectionFragment(
customDialogList.dismiss()
} else {
itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility =
VISIBLE
viewModel.getIdFromCodeSalix(
code = customDialogList.getValueTwo(),
@ -1739,8 +1687,7 @@ class CollectionFragment(
hideKeyboards()
customDialogList.dismiss()
}.setHintValue(getString(R.string.quantitySelect)).setValue(total)
.setHintValueTwo(getString(R.string.scanItem))
.setValueTwo("").show()
.setHintValueTwo(getString(R.string.scanItem)).setValueTwo("").show()
} catch (e: Exception) {
ma.messageWithSound(e.message.toString(), true, true)
}
@ -1771,9 +1718,7 @@ class CollectionFragment(
customDialogList.setValueTwo(
itemScanValue(
customDialogList.getValueTwo(),
"buy",
"more"
customDialogList.getValueTwo(), "buy", "more"
).toString()
)
@ -1789,8 +1734,7 @@ class CollectionFragment(
if (checkItemScan(customDialogList.getValueTwo())) {
onQuantityOfShelvingSelected(itemShelvingFk)
mpok?.start()
/* ReviewQuantityForRefreshingAndSorting(
mpok?.start()/* ReviewQuantityForRefreshingAndSorting(
customDialogList.getValue().toInt(),
sales[storedPosition].quantity!!.toInt(),
sales[storedPosition].pickedQuantity.toInt()
@ -1800,7 +1744,6 @@ class CollectionFragment(
customDialogList.dismiss()
} else {
itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCodeSalix(
@ -1831,10 +1774,8 @@ class CollectionFragment(
ma.messageWithSound(e.message.toString(), true, true)
}
placementSupplyAdapter =
BarcodeAdapter(
listPlacementSupply,
object : OnBarcodeRowClickListener {
placementSupplyAdapter = BarcodeAdapter(
listPlacementSupply, object : OnBarcodeRowClickListener {
override fun onBarcodeRowClickListener(item: BarcodeVO) {
placementSupplyListVO.list.forEach {
if (it.proposal == item.code) {
@ -1856,8 +1797,7 @@ class CollectionFragment(
}
private fun ReviewQuantityForRefreshingAndSorting(
quantityTotal: Int,
quantityPicked: Int
quantityTotal: Int, quantityPicked: Int
) {
if (quantityPicked < quantityTotal) {
@ -1876,8 +1816,7 @@ class CollectionFragment(
}
private fun setStoredPosition(isFromBack: Boolean) {
/* if (type == SACADOR) {
private fun setStoredPosition(isFromBack: Boolean) {/* if (type == SACADOR) {
for (indice in myGroupList.indices) {
if (myGroupList[indice].isPrepared == "0") {
@ -1898,12 +1837,10 @@ class CollectionFragment(
if (storedPosition >= 0 && sales.size > storedPosition) {
val saleToCheck = sales[storedPosition]
if (saleToCheck.itemFk.toString() == valueToCheck)
return true
if (saleToCheck.itemFk.toString() == valueToCheck) return true
else {
saleToCheck.barcodes.forEach { barcode ->
if (barcode == valueToCheck)
return true
if (barcode == valueToCheck) return true
}
}
}
@ -1917,8 +1854,7 @@ class CollectionFragment(
try {
val shelvingVisible =
sales[storedPosition].placements[storedShelvingPosition].visible.substring(
1,
sales[storedPosition].placements[storedShelvingPosition].visible.indexOf(")")
1, sales[storedPosition].placements[storedShelvingPosition].visible.indexOf(")")
)
if (quantity == 0) {
@ -1937,12 +1873,10 @@ class CollectionFragment(
try {
if (quantity == 0) {
sales[storedPosition].pickedQuantity =
(sales[storedPosition].pickedQuantity!! + customDialogList.getValue()
.toInt())
(sales[storedPosition].pickedQuantity!! + customDialogList.getValue().toInt())
} else {
sales[storedPosition].pickedQuantity =
(sales[storedPosition].pickedQuantity!! + quantity
.toInt())
(sales[storedPosition].pickedQuantity!! + quantity.toInt())
}
} catch (e: Exception) {
}
@ -2002,8 +1936,6 @@ class CollectionFragment(
) {
getString(R.string.Todosloscampossonobligatorios).toast(requireContext())
} else {
binding.splashProgress.visibility =
VISIBLE
//sergio datos para mensaje salix
@ -2042,9 +1974,7 @@ class CollectionFragment(
try {
customDialogList.setValue(
itemScanValue(
customDialogList.getValue(),
"buy",
"more"
customDialogList.getValue(), "buy", "more"
).toString()
)
@ -2072,8 +2002,6 @@ class CollectionFragment(
) {
getString(R.string.Todosloscampossonobligatorios).toast(requireContext())
} else {
binding.splashProgress.visibility =
VISIBLE
dataMessageSalix = DataMessageSalix(
ticket = ticketSelected,
@ -2142,8 +2070,7 @@ class CollectionFragment(
totalMark += 1
}
} else if (type == CONTROLADOR) {
if ((it.isControlled == "1" || it.isControlled == "2") && !it.isParent)
totalMark += 1
if ((it.isControlled == "1" || it.isControlled == "2") && !it.isParent) totalMark += 1
}//Refactor #4030
else if (type == PRECHECKER) {
@ -2187,8 +2114,7 @@ class CollectionFragment(
R.string.sectorALGEMESI
) && sectorDesciption.uppercase() != getString(
R.string.sectorALGEMESINEW
)
))
)))
) {
customDialogInput.setTitle(getString(R.string.shlevesNumber))
@ -2196,7 +2122,6 @@ class CollectionFragment(
.setOkButton(getString(R.string.accept)) {
if (!customDialogInput.getValue().isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.ticketCollection_setUsedShelves(
ticketFk = collection.collectionFk,
usedShelves = customDialogInput.getValue().toInt()
@ -2225,7 +2150,6 @@ class CollectionFragment(
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!customDialogInput.getValue().isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.ticketCollection_setUsedShelves(
ticketFk = collection.collectionFk,
usedShelves = customDialogInput.getValue().toInt()
@ -2251,8 +2175,7 @@ class CollectionFragment(
try {
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad))
.setValue("")
.setOkButtonAdd(getString(R.string.Agregar)) {
.setValue("").setOkButtonAdd(getString(R.string.Agregar)) {
increaseQuantity(position, customDialogThreeButtons.getValue().toInt())
scanRequest()
customDialogThreeButtons.dismiss()
@ -2273,8 +2196,7 @@ class CollectionFragment(
sales[positionCollectionMissing].quantity = quantityCollectionMissing
saleAdapter!!.notifyDataSetChanged()
if (quantityCollectionMissing == 0)
markLine(positionCollectionMissing, type)
if (quantityCollectionMissing == 0) markLine(positionCollectionMissing, type)
var totalQuantity: Int = 0
try {
@ -2285,7 +2207,7 @@ class CollectionFragment(
saleAdapter!!.notifyDataSetChanged()
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -2316,8 +2238,7 @@ class CollectionFragment(
quantityIncrease = quantity
viewModel.collectionIncreaseQuantitySalix(
saleFk = sales[position].saleFk,
quantity = quantity.toString()
saleFk = sales[position].saleFk, quantity = quantity.toString()
)
}
@ -2327,15 +2248,13 @@ class CollectionFragment(
if (type == CONTROLADOR) {
tickets.forEach {
viewModel.ticketStateTodaySetState(
ticketFk = it.toInt(),
state = "CHECKED"
ticketFk = it.toInt(), state = "CHECKED"
)
}
} else if (type == SACADOR) {
tickets.forEach {
viewModel.ticketStateTodaySetState(
ticketFk = it.toInt(),
state = "PREPARED"
ticketFk = it.toInt(), state = "PREPARED"
)
}
////Refactor #4030
@ -2343,8 +2262,7 @@ class CollectionFragment(
} else if (type == PRECHECKER) {
tickets.forEach {
viewModel.ticketStateTodaySetState(
ticketFk = it.toInt(),
state = "PREVIOUS_CONTROLLED"
ticketFk = it.toInt(), state = "PREVIOUS_CONTROLLED"
)
}
}
@ -2404,8 +2322,7 @@ class CollectionFragment(
val labelCount = arrayOf("1", "2", "3", "4", "5", "6", "7", "8", "9", "10")
builder.setItems(labelCount) { dialog, which ->
viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk,
labelCount = (which + 1)
collectionFk = collection.collectionFk, labelCount = (which + 1)
)
(getString(R.string.Imprimiendo) + mobileApplication.dataStoreApp.readDataStoreKey<String>(
PRINTERNAME
@ -2416,8 +2333,7 @@ class CollectionFragment(
dialog.show()
} else {
viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk,
null
collectionFk = collection.collectionFk, null
)
}
@ -2427,15 +2343,14 @@ class CollectionFragment(
private fun showMistakeList(list: List<MistakeTypeVO>) {
customDialogInput.dismiss()
binding.splashProgress.visibility = GONE
//
listPlacementSupply = ArrayList()
list.forEach {
listPlacementSupply.add(BarcodeVO(code = it.description))
}
customDialogList.setTitle(getString(R.string.errorCause))
customDialogList.hideTextInput()
.setKoButton(getString(R.string.cancel)) {
customDialogList.hideTextInput().setKoButton(getString(R.string.cancel)) {
scanRequest()
hideKeyboards()
listPlacementSupply.clear()
@ -2451,8 +2366,7 @@ class CollectionFragment(
if (it.description == item.code) {
viewModel.saleMistakeAdd(
saleFk = mistakeSale?.saleFk!!,
typeFk = it.id
saleFk = mistakeSale?.saleFk!!, typeFk = it.id
)

View File

@ -14,7 +14,6 @@ import android.text.InputType.TYPE_CLASS_NUMBER
import android.text.InputType.TYPE_CLASS_TEXT
import android.view.KeyEvent
import android.view.KeyEvent.ACTION_DOWN
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.WindowManager
@ -183,7 +182,6 @@ class CollectionFragmentPreChecker(
customDialog = CustomDialog(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
ma.hideBottomNavigation(GONE)
binding.splashProgress.visibility = VISIBLE
setEvents()
setToolBar()
if (collection.tickets.isNotEmpty()) {
@ -278,7 +276,6 @@ class CollectionFragmentPreChecker(
}
private fun updateScreen() {
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -342,30 +339,6 @@ class CollectionFragmentPreChecker(
hideKeyboard()
}
/* private fun getCollection() {
binding.splashProgress.visibility = VISIBLE
if (!buttonPushedGetCollection) {
//Tarea 3520
viewModel.collection_get(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
print = "0",
type
)
buttonPushedGetCollection = true
} else {
viewModel.collectionTicketGet(
lastScanned,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
print = "0",
type
)
buttonPushedGetCollection = false
}
lastScanned = collection.collectionFk
}*/
private fun scanRequest() {
binding.scanInput.requestFocus()
@ -473,7 +446,7 @@ class CollectionFragmentPreChecker(
isMarking = false
binding.collectionSwipe.isRefreshing = false
// if (type != PRECHECKER) {
binding.splashProgress.visibility = VISIBLE
//
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -510,7 +483,7 @@ class CollectionFragmentPreChecker(
@RequiresApi(Build.VERSION_CODES.O)
override fun observeViewModel() {
with(viewModel) {
binding.splashProgress.visibility = GONE
//
collectionTicketList.observe(viewLifecycleOwner, Observer {
if (!it.isError) {
@ -533,7 +506,7 @@ class CollectionFragmentPreChecker(
})
responseUsedShelves.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
//
if (!goBack) {
ma.messageWithSound(
@ -544,10 +517,10 @@ class CollectionFragmentPreChecker(
})
responseParking.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
//
if (!goBack) {
binding.splashProgress.visibility = GONE
//
ma.messageWithSound(
if (it.isError) it.errorMessage else getString(R.string.Aparcado),
it.isError, true
@ -557,7 +530,7 @@ class CollectionFragmentPreChecker(
})
responsePrint.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
//
if (!goBack) {
@ -578,7 +551,7 @@ class CollectionFragmentPreChecker(
})
responseSplit.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
//
if (!goBack) {
@ -605,7 +578,7 @@ class CollectionFragmentPreChecker(
ma.messageWithSound(it.errorMessage, true, true)
} else {
ma.messageWithSound(getString(R.string.previousCollected), false, true)
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -615,19 +588,17 @@ class CollectionFragmentPreChecker(
}
})
placementSuppleyList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) printShelvingResult(it)
goBack = false
})
item.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) toastDisponibility(it)
goBack = false
})
responseNew.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
// if (!goBack) {
if (it.isError) {
customDialog.setTitle(getString(R.string.disponibility))
@ -638,10 +609,6 @@ class CollectionFragmentPreChecker(
}.show()
} else {
binding.splashProgress.visibility =
VISIBLE
if (!goBack) {
viewModel.collectionTicketGet(
@ -660,7 +627,7 @@ class CollectionFragmentPreChecker(
})
responseCode.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (!goBack2) {
if (it.isError) {
customDialog.setTitle(getString(R.string.error))
@ -711,7 +678,7 @@ class CollectionFragmentPreChecker(
})*/
//Tarea 4280
responseTicketClosure.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
//
if (!goBack) {
if (it.response.toBoolean()) {
var customDialogWarning = CustomDialog(requireContext())
@ -771,7 +738,6 @@ class CollectionFragmentPreChecker(
})*/
responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
if (!goMistakeBack)
@ -791,7 +757,7 @@ class CollectionFragmentPreChecker(
mistakeList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
/*sergio:se quita y se pone esta comprobacion porque si no aparece de nuevo otra vez al volver atrás */
if (!goMistakeBack)
@ -801,7 +767,7 @@ class CollectionFragmentPreChecker(
//sergio: para si hay algun ticket por revisar antes de parkinear
responseCollectionUnchecked.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
//
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, false)
@ -816,7 +782,7 @@ class CollectionFragmentPreChecker(
}
.setKoButton(getString(R.string.review)) {
binding.splashProgress.visibility = View.VISIBLE
//
viewModel.collectionTicketGet(
it.response.toInt(),
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -839,9 +805,8 @@ class CollectionFragmentPreChecker(
loadResponseDel.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.INVISIBLE
if (it.isError) {
binding.splashProgress.visibility = GONE
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, false)
@ -863,7 +828,7 @@ class CollectionFragmentPreChecker(
/* responseDel.observe(viewLifecycleOwner, Observer {
if (it.isError) {
binding.splashProgress.visibility = GONE
//
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, false)
@ -898,14 +863,13 @@ class CollectionFragmentPreChecker(
responseSaleReplace.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, true)
binding.splashProgress.visibility = VISIBLE
//
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -927,12 +891,12 @@ class CollectionFragmentPreChecker(
loadResponseSaleTrackingMark.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = GONE
if (it.isError) {
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, true)
binding.splashProgress.visibility = VISIBLE
//
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -1014,7 +978,6 @@ class CollectionFragmentPreChecker(
state = 0
binding.mainToolbar.toolbarTitle.text = collection.collectionFk.toString()
binding.splashProgress.visibility = View.GONE
var salesList: ArrayList<SaleVO> = ArrayList()
tickets = ArrayList()
var observations = ""
@ -1100,7 +1063,7 @@ class CollectionFragmentPreChecker(
object : OnMistakeClickListener {
override fun onMistakeClickListener(sale: SaleVO) {
//Tarea #4969
binding.splashProgress.visibility = VISIBLE
viewModel.mistakeType()
mistakeSale = sale
goMistakeBack = false
@ -1299,8 +1262,6 @@ class CollectionFragmentPreChecker(
}
} else {
binding.splashProgress.visibility =
VISIBLE
storedPosition = 0
storedBackPosition = 0
// if (type != PRECHECKER) {
@ -1314,7 +1275,7 @@ class CollectionFragmentPreChecker(
)
} catch (ex: Exception) {
binding.splashProgress.visibility = GONE
ma.messageWithSound(
getString(R.string.error),
isError = false,
@ -1520,7 +1481,6 @@ class CollectionFragmentPreChecker(
}
private fun saleTrackingReplace(position: Int, type: String) {
//binding.splashProgress.visibility=VISIBLE
viewModel.saleTrackingReplace(
saleFk = sales[position].saleFk,
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
@ -1536,7 +1496,7 @@ class CollectionFragmentPreChecker(
//Tarea #4371 se quita para ver si funciona correctamente
private fun saleTracking_mark(position: Int, type: String) {
binding.splashProgress.visibility = VISIBLE
viewModel.run {
saleTracking_mark(
saleFk = sales[position].saleFk,
@ -1566,7 +1526,7 @@ class CollectionFragmentPreChecker(
setListPosition(position, false)
if (type != PRECHECKER) {
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingUpdateFromSale(
sales[position].saleFk
@ -1596,7 +1556,7 @@ class CollectionFragmentPreChecker(
private fun showShelving(position: Int, shelvingPosition: Int) {
storedShelvingPosition = shelvingPosition
storedPosition = position
binding.splashProgress.visibility = VISIBLE
var quantityGet = 0
try {
quantityGet =
@ -1675,9 +1635,6 @@ class CollectionFragmentPreChecker(
customDialogList.dismiss()
} else {
itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility =
VISIBLE
viewModel.getIdFromCodeSalix(
code = customDialogList.getValueTwo(),
)
@ -1760,7 +1717,7 @@ class CollectionFragmentPreChecker(
customDialogList.dismiss()
} else {
itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCodeSalix(
@ -1960,8 +1917,6 @@ class CollectionFragmentPreChecker(
) {
getString(R.string.Todosloscampossonobligatorios).toast(requireContext())
} else {
binding.splashProgress.visibility =
VISIBLE
//sergio datos para mensaje salix
@ -2028,8 +1983,6 @@ class CollectionFragmentPreChecker(
) {
getString(R.string.Todosloscampossonobligatorios).toast(requireContext())
} else {
binding.splashProgress.visibility =
VISIBLE
dataMessageSalix = DataMessageSalix(
ticket = ticketSelected,
@ -2176,7 +2129,7 @@ class CollectionFragmentPreChecker(
private fun customDialogSetUsed() {
if (!customDialogInput.getValue().isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.ticketCollection_setUsedShelves(
ticketFk = collection.collectionFk,
usedShelves = customDialogInput.getValue().toInt()
@ -2262,7 +2215,7 @@ class CollectionFragmentPreChecker(
}
saleAdapter!!.notifyDataSetChanged()
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK),
@ -2402,7 +2355,7 @@ class CollectionFragmentPreChecker(
private fun showMistakeList(list: List<MistakeTypeVO>) {
customDialogInput.dismiss()
binding.splashProgress.visibility = GONE
listPlacementSupply = ArrayList()
list.forEach {
listPlacementSupply.add(BarcodeVO(code = it.description))

View File

@ -199,6 +199,10 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
val loadResponseItemShelvingUpdate: LiveData<Event<ResponseItemVO>> =
_responseItemShelvingUpdate.map { Event(it) }
private val _responseSaleAddPrevOK by lazy { MutableLiveData<ResponseItemVO>() }
val responseSaleAddPrevOK: LiveData<ResponseItemVO>
get() = _responseSaleAddPrevOK
fun getSales(
collectionFk: Int,
print: String,
@ -233,48 +237,9 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
print: String,
type: String
) {
if (type == "PRECHECKER" || type == "PREPARED" || type == "CHECKER" || type == "SHOWTICKET") {
getSales(collectionFk, print, type)
} else {
silex.collection_getTickets(
collectionFk,
sectorFk,
print,
type
)
.enqueue(object :
SilexCallback<CollectionVO>(context) {
override fun onError(t: Throwable) {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
}
override fun onSuccess(response: Response<CollectionVO>) {
if (response.body() != null) {
_collectionTicketList.value =
response.body()?.let { it.map(contextApp) }
} else {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
}
}
//Tarea 6276 Salix collection_getTickets
@ -314,47 +279,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
})
}
/* fun collection_get(
collectionFk: Int,
sectorFk: Int,
print: String,
type: String
) {
//Falta back de Salix
// salix.collectionGet(params = arrayListOf(collectionFk, sectorFk, print, type).formatWithQuotes())
silex.collection_get(
collectionFk,
sectorFk,
print,
type
)
.enqueue(object :
SalixCallback<CollectionVO>(context) {
override fun onError(t: Throwable) {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<CollectionVO>) {
if (response.body() != null) {
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
} else {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
}*/
fun collectionGetId(
ticketFk: Int,
@ -1119,42 +1044,6 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
})
}
/* fun collection_getUncheckedTicket(
collectionFk: Int
) {
silex.collection_getUncheckedTicket(
collectionFk
).enqueue(object :
SalixCallback<String>(context) {
override fun onError(t: Throwable) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<String>) {
if (response.body() != null) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = false,
response = response.body()!!,
errorMessage = ""
)
} else {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = true,
response = response.body()!!.toString(),
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
}*/
fun hasUncheckedTicket(
collectionFk: Int
) {
@ -1219,4 +1108,28 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
})
}
fun saleTrackingAddPrevOK(
sectorCollectionFk: Int
) {
salix.saleTrackingAddPrevOK(arrayListOf(sectorCollectionFk))
.enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
)
}
override fun onSuccess(response: Response<Any>) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = false, errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
})
}
}

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.controlador.fragment
import android.content.Context
import android.view.View
import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo
import androidx.lifecycle.Observer
@ -34,7 +33,7 @@ class ControladorFragment :
override fun init() {
binding.splashProgress.visibility = View.GONE
binding.scanInput.visibility = VISIBLE
binding.mainToolbar.toolbarTitle.text = getString(R.string.controlticket)
setEvents()
@ -58,7 +57,7 @@ class ControladorFragment :
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
goBack = false
if (!binding.scanInput.text.isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
binding.scanInput.setText(textScanned_filterDouble(binding.scanInput.text!!.toString()))
//Tarea 6458 descomentar si ok
collectionViewModel = CollectionViewModel(mobileApplication)
@ -66,7 +65,7 @@ class ControladorFragment :
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))
@ -79,8 +78,6 @@ class ControladorFragment :
)
.setOkButton(getString(R.string.aware)) {
customDialogWarning.dismiss()
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(
ConstAndValues.SECTORFK
@ -88,7 +85,7 @@ class ControladorFragment :
collectionFk = binding.scanInput.text.toString()
.toInt(),
print = "0",
type = ConstAndValues.CONTROLADOR
type = ConstAndValues.ON_CHECKING
)
}.setKoButton(getString(R.string.cancel)){
binding.scanInput.setText("")
@ -103,7 +100,7 @@ class ControladorFragment :
),
collectionFk = binding.scanInput.text.toString().toInt(),
print = "0",
type = ConstAndValues.CONTROLADOR
type = ConstAndValues.ON_CHECKING
)
}
})
@ -120,7 +117,6 @@ class ControladorFragment :
override fun observeViewModel() {
with(viewModel) {
collectionTicketList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
binding.scanInput.setText("")
if (it.isError) {
ma.messageWithSound(it.errorMessage, isError = true, isPlayed = false)

View File

@ -115,7 +115,6 @@ class EndSacadorFragment(
customDialogInput = CustomDialogInput(requireContext())
customDialogInputParking = CustomDialogInput(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
binding.splashProgress.visibility = GONE
binding.mainToolbar.toolbarTitle.text = getString(R.string.getticketpre)
setToolBar()
setEvents()
@ -191,7 +190,6 @@ class EndSacadorFragment(
override fun observeViewModel() {
with(viewModel) {
salesList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
createSaleList(it)
})
@ -212,7 +210,6 @@ class EndSacadorFragment(
})
placementSuppleyList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) printShelvingResult(it)
goBack = false
})
@ -232,7 +229,6 @@ class EndSacadorFragment(
responseParkingAdd.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
@ -255,7 +251,6 @@ class EndSacadorFragment(
})
responseSplit.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
if (it.isError) {
ma.messageWithSound(it.errorMessage, isError = true, true)
@ -271,7 +266,6 @@ class EndSacadorFragment(
loadResponseSaleGropAdd.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = GONE
if (!goBack) {
if (it.isError) {
@ -294,7 +288,6 @@ class EndSacadorFragment(
responseSaleAddPrevOK.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
if (it.isError) {
@ -312,7 +305,6 @@ class EndSacadorFragment(
goBack = false
})
response.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
if (it.isError) {
@ -326,7 +318,6 @@ class EndSacadorFragment(
goBack = false
})
responseSaleupdateIsChecked.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
@ -351,7 +342,6 @@ class EndSacadorFragment(
})
responseItemShelvingSaleSupplyAdd.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack) {
if (it.isError) {
@ -364,7 +354,7 @@ class EndSacadorFragment(
})
responseCode.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (!goBack2) {
if (it.isError) {
customDialog.setTitle(getString(R.string.error))
@ -427,7 +417,7 @@ class EndSacadorFragment(
//CREATE LIST
private fun searchSaleCollection() {
binding.splashProgress.visibility = VISIBLE
viewModel.sectorCollectionGetSale(
collection.collectionFk,
sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK)
@ -439,7 +429,6 @@ class EndSacadorFragment(
ticket = ticketFk
if (ticketFk != 0)
binding.splashProgress.visibility = VISIBLE
viewModel.sectorCollectionSaleGroupAdd(
ticketFk,
collection.collectionFk
@ -447,7 +436,7 @@ class EndSacadorFragment(
}
private fun createSaleList(salesList: List<PreSacadorItemVO>) {
binding.splashProgress.visibility = GONE
if (salesList.isNullOrEmpty()) {
ma.messageWithSound(
@ -547,8 +536,6 @@ class EndSacadorFragment(
binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size
if (totalMark == sales.size) {
getString(R.string.ticketCompleted).toast(this.context, Toast.LENGTH_SHORT)
binding.splashProgress.visibility = VISIBLE
viewModel.saleTrackingAddPrevOK(
sectorCollectionFk = collection.collectionFk
)
@ -684,7 +671,6 @@ class EndSacadorFragment(
private fun showShelving(position: Int, shelvingPosition: Int) {
storedShelvingPosition = shelvingPosition
storedPosition = position
binding.splashProgress.visibility = VISIBLE
var quantityGet = 0
try {
quantityGet = (sales[position].saldo!! - sales[position].picked!!)
@ -739,7 +725,6 @@ class EndSacadorFragment(
customDialogList.dismiss()
} else {
itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCode(
code = customDialogList.getValueTwo()
)
@ -797,7 +782,6 @@ class EndSacadorFragment(
customDialogList.dismiss()
} else {
itemShelvingFkStored = itemShelvingFk
binding.splashProgress.visibility = View.VISIBLE
viewModel.getIdFromCode(
code = customDialogList.getValueTwo()
)

View File

@ -118,7 +118,6 @@ class AutomaticAddItemFragment(
mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK)
)
} else {
binding.splashAnimation.visibility = View.VISIBLE
viewModel.itemShelvingMakeMulti(
shelvingFk,
listString,
@ -134,7 +133,6 @@ class AutomaticAddItemFragment(
override fun observeViewModel() {
with(viewModel) {
binding.splashAnimation.visibility = View.INVISIBLE
response.observe(viewLifecycleOwner, Observer {
ma.onMyBackPressed()
})

View File

@ -9,6 +9,7 @@ import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.workermistake.model.MakeMultiSalix
import retrofit2.Response
class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) {
@ -22,11 +23,8 @@ class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) {
items: List<Long>,
warehouseFk: Int
) {
//Tarea 6276 A MODIFICAR SI O SI. MAÑANA // Falta cambiar el
//salix.upsertItem(MakeMultiSalix(shelvingFk,items,warehouseFk))
//falta cambiar el procedimiento si no no coge bien las cantidades, no las multiplica si el packing es 2 por ejemplo.
// Escanear dos veces un 10 pero pone un dos = 2x20 cuando debería ser 40.
silex.itemShelvingMake_multi(shelvingFk, items, warehouseFk)
salix.upsertItem(MakeMultiSalix(shelvingFk, items, warehouseFk))
.enqueue(object :
SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
@ -44,6 +42,7 @@ class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) {
}
})
}
fun itemShelvingAddList(

View File

@ -51,7 +51,7 @@
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:text="@string/Entrada"
android:text="@string/entry"
android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" />
@ -123,7 +123,7 @@
<LinearLayout
android:id="@+id/splash_progress"
android:id="@+id/splash_animation"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"

View File

@ -84,28 +84,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_animation"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center"
>
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,17 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:clickable="false">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black"
>
android:background="@color/verdnatura_black">
<EditText
@ -19,27 +16,26 @@
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:autofillHints="name"
android:hint="@string/Escaner"
android:inputType="textVisiblePassword"
android:lines="1"
android:maxLines="1"
android:paddingStart="@dimen/default_layout_margin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar"
android:paddingStart="@dimen/default_layout_margin"
android:autofillHints="name"/>
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
<ImageView
android:id="@+id/previaButton"
android:layout_width="32dp"
android:layout_height="32dp"
android:visibility="invisible"
android:contentDescription="@string/error"
android:tooltipText="Permite marcar las líneas de previa escaneando ticket"
app:srcCompat="@drawable/ic_streetview_black_24dp"
android:visibility="invisible"
app:layout_constraintStart_toEndOf="@+id/scan_input"
app:layout_constraintTop_toTopOf="@+id/scan_input"
android:contentDescription="@string/error"
/>
app:srcCompat="@drawable/ic_streetview_black_24dp" />
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/collection_swipe"
@ -59,27 +55,7 @@
tools:listitem="@layout/item_article_row_fragment" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"

View File

@ -61,24 +61,6 @@
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
<include
android:id="@+id/main_toolbar"

View File

@ -30,27 +30,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -31,27 +31,5 @@
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -207,55 +207,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
<LinearLayout
android:id="@+id/splash_progress_two"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -143,31 +143,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -85,26 +85,5 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -174,31 +174,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible"
android:textSize="@dimen/body2"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -50,27 +50,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -47,23 +47,6 @@
tools:listitem="@layout/item_article_row_reubication_fragment" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
<include
android:id="@+id/main_toolbar"

View File

@ -33,28 +33,5 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -64,27 +64,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -32,28 +32,5 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>