feat: refs #8182 zoneClickable

This commit is contained in:
Sergio De la torre 2024-11-20 07:58:36 +01:00
parent 61e6aa2a5a
commit 2c32244617
8 changed files with 61 additions and 35 deletions

View File

@ -421,6 +421,12 @@ class SaleAdapter(
if (type == SACADOR || type == CONTROLADOR) {
itemTicketColor.tooltipText = context!!.getString(R.string.filterLevelColor)
}
/* ticketFk.paintFlags = ticketFk.paintFlags or Paint.UNDERLINE_TEXT_FLAG
itemArticleItemFk.paintFlags =
itemArticleItemFk.paintFlags or Paint.UNDERLINE_TEXT_FLAG*/
this.sale = sale
}

View File

@ -31,6 +31,7 @@ import es.verdnatura.presentation.common.GeneralAdapter
import es.verdnatura.presentation.common.GeneralItem
import es.verdnatura.presentation.common.ItemDescorationCustomized
import es.verdnatura.presentation.common.OnGeneralItemRowClickListener
import es.verdnatura.presentation.common.OnGeneralRowClickListener
import es.verdnatura.presentation.common.OnItemButtonCMRRowClickListener
import es.verdnatura.presentation.common.OnItemButtonTicketRowClickListener
import es.verdnatura.presentation.common.OnOptionsSelectedListener
@ -607,8 +608,9 @@ class TicketsFragment : BaseFragment<FragmentTicketsBinding, DeliveryViewModel>(
customDialogList.dismiss()
}.hideDialog().show()
val listPhonesAdapter = GeneralAdapter(phones, object : OnGeneralItemRowClickListener {
override fun onGeneralItemRowClickListener(item: GeneralItem) {
val listPhonesAdapter =
GeneralAdapter(phones, onRowClickListener = object : OnGeneralRowClickListener {
override fun onRowClickListener(item: GeneralItem) {
phones.forEach {
if (it.code == item.code) {
if (ContextCompat.checkSelfPermission(

View File

@ -156,7 +156,7 @@ class SaleVO(
var cel1: String = "",
var cel2: String = "",
var cel3: String = "",
var saleGroupFk: String = "",
var saleGroupFk: String? = "",
var picked: String? = "",
var isParent: Boolean = false,
var totalSales: Int = 0,

View File

@ -217,18 +217,20 @@ class UbicadorFragmentNew : BaseFragment<FragmentUbicadorBinding, UbicadorViewMo
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
listItems.clear()
when (item) {
iconAdd.drawable -> showAddItemNew(
isEditItem = false, null
)
iconAddMultiple.drawable ->
iconAddMultiple.drawable -> {
ma.onPasillerosItemClickListener(
PasillerosItemVO(
title = R.string.addItemMultipleShelving,
), entryPoint = getString(R.string.addItemMultipleShelving)
)
}
iconReload.drawable -> {
@ -342,6 +344,7 @@ class UbicadorFragmentNew : BaseFragment<FragmentUbicadorBinding, UbicadorViewMo
binding.automaticImg.setOnClickListener {
if (shelvingFk.isNotBlank()) ma.onPasillerosItemClickListener(
PasillerosItemVO(title = R.string.titleAuto), entryPoint = shelvingFk
)
@ -522,18 +525,13 @@ class UbicadorFragmentNew : BaseFragment<FragmentUbicadorBinding, UbicadorViewMo
with(viewModel) {
loadShelvingListNew.observe(viewLifecycleOwner) { event ->
listItems.clear()
event.getContentIfNotHandled().notNull { it ->
if (isShelvinLogfromMainScreen) {
viewModel.shelvingLogAdd(shelvingFk)
}
listItems.addAll(it.list)
listItems.forEach { item ->
println("description **************************${item.description}")
println("description ${item.description}")
println("description longName${item.longName}")
println("description name ${item.name}")
println("description size ${item.size ?: ""}")
if (item.description.isNullOrEmpty()) {
item.description =
item.longName ?: "${item.name ?: ""} ${item.size ?: ""}"
@ -548,7 +546,7 @@ class UbicadorFragmentNew : BaseFragment<FragmentUbicadorBinding, UbicadorViewMo
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
R.string.label
) + totalStickers
if (listItems.isNotEmpty()) binding.editPrioridad.setText(it.list[0].priority.toString())
if (listItems.isNotEmpty()) binding.editPrioridad.setText(listItems[0].priority?.toString())
if (!binding.mainToolbar.switchButton.isChecked && listItems.isNotEmpty()) {
listItems = listItems.asReversed()
@ -865,6 +863,7 @@ class UbicadorFragmentNew : BaseFragment<FragmentUbicadorBinding, UbicadorViewMo
customDialogUbicador.getPackingValue().toIntOrNull()
) else {
viewModel.itemShelvingAdd(
shelving = shelvingFk,
item = customDialogUbicador.getItemValue().toLong(),
@ -1054,7 +1053,6 @@ class UbicadorFragmentNew : BaseFragment<FragmentUbicadorBinding, UbicadorViewMo
if (!isAutoSelf) {
listItems.remove(item)
adapter!!.notifyItemRemoved(listItems.indexOf(item))
//adapter!!.notifyDataSetChanged()
viewModel.itemShelvingDelete(
item.id
)

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="@android:color/white"
android:pathData="M320,550L399,440L569,440L320,244L320,550ZM551,880L406,568L240,800L240,80L800,520L516,520L660,829L551,880ZM399,440L399,440L399,440L399,440Z" />
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="@android:color/black"
android:pathData="M320,550L399,440L569,440L320,244L320,550ZM551,880L406,568L240,800L240,80L800,520L516,520L660,829L551,880ZM399,440L399,440L399,440L399,440Z" />
</vector>

View File

@ -82,6 +82,7 @@
android:textColor="@color/verdnatura_black"
android:textSize="@dimen/h8"
android:textStyle="bold" />
<!-- app:drawableEndCompat="@drawable/ic_click_black"-->
<TextView
android:id="@+id/parkingCode"
@ -92,8 +93,6 @@
android:textColor="@color/verdnatura_black"
android:textSize="@dimen/caption"
android:textStyle="bold" />
<!-- app:drawableEndCompat="@drawable/ic_click_black"-->
<RelativeLayout
android:layout_width="match_parent"
@ -191,7 +190,7 @@
<TextView
android:id="@+id/item_article_itemFk"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
android:maxLines="1"
android:text="@{Long.toString(sale.itemFk)}"

View File

@ -35,6 +35,7 @@
tool:text="053-05" />
<TextView
android:id="@+id/placementcode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{item.shelving}"