feat: refs #5443 collectionFragmentChecker

This commit is contained in:
Sergio De la torre 2024-10-29 09:04:55 +01:00
parent 9d84ce3a0d
commit cb328f13a3
2 changed files with 10 additions and 14 deletions

View File

@ -205,8 +205,8 @@ class CollectionFragmentPreChecker(
val listIcons: ArrayList<ImageView> = ArrayList()
val iconPrint = ImageView(context)
iconPrint.setImageResource(R.drawable.ic_print_black_24dp)
val iconAdd = ImageView(context)
iconAdd.setImageResource(R.drawable.ic_playlist_add_black_24dp)
// val iconAdd = ImageView(context)
// iconAdd.setImageResource(R.drawable.ic_playlist_add_black_24dp)
val iconViewCollection = ImageView(context)
iconViewCollection.setImageResource(R.drawable.ic_collection)
val iconWorker = ImageView(context)
@ -220,7 +220,7 @@ class CollectionFragmentPreChecker(
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
iconPrint.tooltipText = getTooltip(R.drawable.ic_print_black_24dp)
iconAdd.tooltipText = getTooltip(R.drawable.ic_playlist_add_black_24dp)
// iconAdd.tooltipText = getTooltip(R.drawable.ic_playlist_add_black_24dp)
iconViewCollection.tooltipText = getTooltip(R.drawable.ic_collection)
iconPhone.tooltipText = getTooltip(R.drawable.phone_call)
iconParking.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp)
@ -237,7 +237,7 @@ class CollectionFragmentPreChecker(
listIcons.add(iconWorker)
}
listIcons.add(iconAdd)
// listIcons.add(iconAdd)
if (type == SACADOR) {
listIcons.add(iconUpdate)
@ -255,7 +255,7 @@ class CollectionFragmentPreChecker(
when (item) {
iconPrint.drawable -> print()
iconAdd.drawable -> addItem()
// iconAdd.drawable -> addItem()
iconWorker.drawable -> showUser()
iconUpdate.drawable -> updateScreen()
iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener(
@ -2014,7 +2014,7 @@ class CollectionFragmentPreChecker(
"" + totalMark + "/" + total
if (totalMark == sales.size) {
getString(R.string.Coleccióncompleta).toast(this.context, Toast.LENGTH_SHORT)
getString(R.string.completCollection).toast(this.context, Toast.LENGTH_SHORT)
saleAdapter!!.notifyDataSetChanged()
if (!goBack)

View File

@ -171,17 +171,13 @@ class CollectionShowTicketFragment(
try {
viewModel.getSales(
collectionFk = itemScanValue(
binding.scanInput.text.toString(), arrayOf("ticket","saleGroup"), "id"
binding.scanInput.text.toString(),
arrayOf("ticket", "saleGroup"),
"id"
).toString().toInt(),
print = "0",
source = type
)
println("qrTest2")
/* viewModel.getSales(
binding.scanInput.text.toString().toInt(), print = "0", type
)*/
} catch (ex: Exception) {
getString(R.string.scanLabelTicket).toast(requireContext())
}
@ -333,7 +329,7 @@ class CollectionShowTicketFragment(
binding.mainToolbar.toolbarTitle.text = collection.collectionFk.toString()
binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size
if (totalMark == sales.size) {
getString(R.string.Coleccióncompleta).toast(this.context, Toast.LENGTH_SHORT)
getString(R.string.completCollection).toast(this.context, Toast.LENGTH_SHORT)
}
}