feat refactor Ubicador #refs 6413

This commit is contained in:
Sergio De la torre 2024-05-28 10:48:37 +02:00
parent aa00a6343f
commit fcb351c7d8
1 changed files with 13 additions and 20 deletions

View File

@ -149,22 +149,15 @@ class UbicadorFragmentNew(
} }
if (!isChecked) { if (!isChecked) {
listLocalItems.clear() listIcons.removeAt(listIcons.size-1)
listIcons.remove(iconReset) binding.mainToolbar.toolbarIcons.adapter!!.notifyItemRemoved(listIcons.size)
binding.mainToolbar.toolbarIcons.adapter!!.notifyItemRemoved(
listIcons.indexOf(
iconReset
)
)
} else { } else {
listIcons.add(iconReset) listIcons.add(iconReset)
binding.mainToolbar.toolbarIcons.adapter!!.notifyItemInserted( binding.mainToolbar.toolbarIcons.adapter!!.notifyItemInserted(listIcons.size-1)
listIcons.indexOf(
iconReset
)
)
} }
//binding.mainToolbar.toolbarIcons.adapter!!.notifyDataSetChanged() //binding.mainToolbar.toolbarIcons.adapter!!.notifyDataSetChanged()
} }
} }
@ -408,11 +401,11 @@ class UbicadorFragmentNew(
private fun customDialogActionParking() { private fun customDialogActionParking() {
parking = customDialogInput.getValue() parking = customDialogInput.getValue()
/* tarea 6964 //tarea 6964
viewModel.hasItemOlder( /* viewModel.hasItemOlder(
shelvingFk, customDialogInput.getValue(), shelvingFk, customDialogInput.getValue(),
action = Action.PARKINEAR action = Action.PARKINEAR
)*/ )*/
viewModel.setParking( viewModel.setParking(
shelvingFk, customDialogInput.getValue() shelvingFk, customDialogInput.getValue()
) )
@ -766,7 +759,7 @@ class UbicadorFragmentNew(
shelving = shelvingFk, shelving = shelvingFk,
item = customDialogUbicador.getItemValue().toLong(), item = customDialogUbicador.getItemValue().toLong(),
quantity = customDialogUbicador.getVisibleValue() quantity = customDialogUbicador.getVisibleValue()
.toIntOrNull()!! / customDialogUbicador.getPackingValue().toIntOrNull()!!, .toIntOrNull()!!,
packing = customDialogUbicador.getPackingValue().toIntOrNull(), packing = customDialogUbicador.getPackingValue().toIntOrNull(),
warehouse = mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK), warehouse = mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK),
grouping = null grouping = null
@ -880,8 +873,8 @@ class UbicadorFragmentNew(
private fun customDialogTransferAction(item: ItemUbicador) { private fun customDialogTransferAction(item: ItemUbicador) {
if (customDialogInput.getValue().isNotEmpty()) { if (customDialogInput.getValue().isNotEmpty()) {
/*tearea 6964 /*tearea 6964*/
viewModel.hasItemOlder( /*viewModel.hasItemOlder(
shelvingFkIn = shelvingFk, shelvingFkIn = shelvingFk,
shelvingFkOut = customDialogInput.getValue(), shelvingFkOut = customDialogInput.getValue(),
itemFk = item.id, itemFk = item.id,