refs #6921 feat:deliveryNotes

This commit is contained in:
Sergio De la torre 2024-04-15 08:56:31 +02:00
parent f8fe66c090
commit 0ae481ee4a
1 changed files with 13 additions and 11 deletions

View File

@ -1,5 +1,7 @@
package es.verdnatura.presentation.view.feature.delivery.adapters package es.verdnatura.presentation.view.feature.delivery.adapters
import android.graphics.Color
import android.graphics.PorterDuff
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View.INVISIBLE import android.view.View.INVISIBLE
import android.view.ViewGroup import android.view.ViewGroup
@ -75,23 +77,23 @@ class TicketAdapter(
binding.apply { binding.apply {
if (!item.ticketObservation.isNullOrEmpty()) { if (!item.ticketObservation.isNullOrEmpty()) {
note.setColorFilter(
ContextCompat.getColor(
note.context, R.color.verdnatura_dark_sky_blue
)
)
} else {
note.setColorFilter( note.setColorFilter(
ContextCompat.getColor( ContextCompat.getColor(
note.context, R.color.verdnatura_white note.context, R.color.verdnatura_white
) )
) )
note.setOnClickListener {
onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener(
item, "note"
)
}
} else {
note.alpha = 0.5f
note.setColorFilter(Color.GRAY, PorterDuff.Mode.MULTIPLY)
note.isClickable = false
} }
note.setOnClickListener {
onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener(
item, "note"
)
}
addNote.setOnClickListener { addNote.setOnClickListener {
onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener( onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener(
item, "addNote" item, "addNote"