feat: refs #6845 userIterface

This commit is contained in:
Sergio De la torre 2024-11-04 09:19:23 +01:00
parent c82c591c71
commit 5f614e0d6d
21 changed files with 360 additions and 263 deletions

View File

@ -124,7 +124,7 @@ class DataStoreLocal(var mobileApplication: MobileApplication) {
SECTORFKDEFAULT
}
)
if (operator.sector?.isOnReservationMode != null) {
editDataStoreKey(
SECTORISONRESERVATIONMODE,
@ -178,7 +178,10 @@ class DataStoreLocal(var mobileApplication: MobileApplication) {
editDataStoreKey(
RESERVATIONMODE, operator.isOnReservationMode
)
editDataStoreKey(
ITEMPACKING,
operator.itemPackingTypeFk
)
}
suspend fun isPreferenceExists(key: String): Boolean {

View File

@ -2,11 +2,16 @@ package es.verdnatura.domain
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.GradientDrawable
import android.os.Build
import android.text.Html
import android.view.Gravity
import android.view.LayoutInflater
import android.widget.EditText
import android.widget.TextView
import android.widget.Toast
import androidx.annotation.RequiresApi
import es.verdnatura.R
import java.text.SimpleDateFormat
import java.time.ZonedDateTime
import java.time.format.DateTimeFormatter
@ -41,6 +46,28 @@ fun Any.toast(
return toast.apply { show() }
}
fun Context.showToastCenterWithBackground(textToShow: String) {
val inflater = LayoutInflater.from(this)
val layout = inflater.inflate(R.layout.ticket_toast_layout, null)
val text = layout.findViewById<TextView>(R.id.toast_text)
text.text = "$textToShow"
text.setTextColor(this.getColor(R.color.verdnatura_orange_salix))
text.textSize = 18f
val background = GradientDrawable().apply {
setColor(Color.parseColor("#000000"))
cornerRadius = 16f
}
layout.background = background
Toast(this).apply {
duration = Toast.LENGTH_LONG
view = layout
setGravity(Gravity.CENTER, 0, 0)
show()
}
}
fun <T : Any> T?.notNull(f: (it: T) -> Unit) {
if (this != null) f(this)
}

View File

@ -263,6 +263,10 @@ interface OnTicketClickListener {
fun onTicketClickListener(sale: SaleVO)
}
interface OnTicketColorListener {
fun onTicketColorListener(sale: SaleVO)
}
interface OnTicketClickSaleListener {
fun onTicketClickListener(sale: Sale)
}

View File

@ -10,6 +10,8 @@ import android.graphics.drawable.Drawable
import android.media.AudioManager
import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.text.InputType
import android.view.View
import android.view.ViewGroup
@ -153,8 +155,12 @@ fun Activity.showKeyboardIn() {
}
fun Context.hideKeyboard(view: View) {
val inputMethodManager = getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
Handler(Looper.getMainLooper()).postDelayed({
val inputMethodManager =
getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
}, 100L)
}
fun Context.showKeyboard() {
@ -213,7 +219,7 @@ fun PackageManager.getPackageInfoCompat(packageName: String, flags: Int = 0): Pa
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(flags.toLong()))
} else {
getPackageInfo(packageName, flags)
getPackageInfo(packageName, flags)
}
fun convertToDateString(date: String?): String? {
@ -221,8 +227,9 @@ fun convertToDateString(date: String?): String? {
if (date.isNullOrEmpty()) {
return date
}
val formatoEntrada = SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.getDefault()) // Formato de entrada
val formatoSalida = SimpleDateFormat("yyyy-MM-dd",Locale.getDefault()) // Formato de salida
val formatoEntrada =
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.getDefault()) // Formato de entrada
val formatoSalida = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()) // Formato de salida
val dateToConvert = formatoEntrada.parse(date) // Convertir fecha de String a objeto Date
return formatoSalida.format(dateToConvert!!) // Convertir fecha a String con formato deseado
}

View File

@ -76,13 +76,6 @@ class AjustesFragment :
binding.mainToolbar.toolbarTitle.text = getString(R.string.settings)
hideBackButton(binding.mainToolbar)
getUserData()
binding.userText.text = mobileApplication.userName
binding.itemVersion.text = requireActivity().packageManager.getPackageInfo(
requireActivity().packageName, 0
).versionName!!
binding.androididText.text =
mobileApplication.dataStoreApp.readDataStoreKey<String>(ANDROID_ID)
binding.serialNumber.text = mobileApplication.serialNumber
pasilleroViewModel = PasilleroViewModel(mobileApplication)
setToolBar()
super.init()
@ -132,34 +125,44 @@ class AjustesFragment :
val listIcons: ArrayList<ImageView> = ArrayList()
val iconInfo = ImageView(context)
iconInfo.setImageResource(R.drawable.ic_info_delivery)
val iconLogout = ImageView(context)
iconLogout.setImageResource(R.drawable.ic_logout)
listIcons.add(iconInfo)
listIcons.add(iconLogout)
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
customDialog.setTitle(getString(R.string.info))
.setDescription(
getString(R.string.version) + ":\t" +
requireActivity().packageManager.getPackageInfo(
requireActivity().packageName, 0
).versionName!! + "(${getVersionCode()})" + "\n" +
getString(R.string.user) + ":\t" +
mobileApplication.userName + "\n" +
getString(R.string.androidid) + ":\t" +
mobileApplication.dataStoreApp.readDataStoreKey<String>(
ANDROID_ID
) + "\n" +
if (!mobileApplication.serialNumber.isNullOrBlank()) {
getString(R.string.serialNumber) + "\t" +
mobileApplication.serialNumber
} else ""
when (item) {
iconInfo.drawable -> {
customDialog.setTitle(getString(R.string.info))
.setDescription(
getString(R.string.version) + ":\t" +
requireActivity().packageManager.getPackageInfo(
requireActivity().packageName, 0
).versionName!! + "(${getVersionCode()})" + "\n" +
getString(R.string.user) + ":\t" +
mobileApplication.userName + "\n" +
getString(R.string.androidid) + ":\t" +
mobileApplication.dataStoreApp.readDataStoreKey<String>(
ANDROID_ID
) + "\n" +
if (!mobileApplication.serialNumber.isNullOrBlank()) {
getString(R.string.serialNumber) + "\t" +
mobileApplication.serialNumber
} else ""
)
.setOkButton(getString(R.string.Close)) {
customDialog.dismiss()
}.show()
)
.setOkButton(getString(R.string.Close)) {
customDialog.dismiss()
}.show()
}
iconLogout.drawable -> {
ma.onMyBackPressed()
}
}
}
})
binding.mainToolbar.toolbarIcons.layoutManager =
@ -217,6 +220,23 @@ class AjustesFragment :
CodeWorkerAction.STOP
)
getString(R.string.holdpositionAuto) -> {
runBlocking {
mobileApplication.dataStoreApp.editDataStoreKey(
HOLDPOSITION,
viewModel.settingsItem[5].selected != getString(R.string.yes)
)
}
viewModel.settingsItem[5].holdPosition =
!viewModel.settingsItem[5].holdPosition
viewModel.settingsItem[5].selected =
if (viewModel.settingsItem[5].holdPosition) getString(R.string.yes) else getString(
R.string.no
)
settingsAdapter!!.notifyItemChanged(5)
}
else -> {}
}

View File

@ -100,14 +100,17 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
action = false
)
)
/*Tarea 5443
_settingsItem.add(
AjustesItemVO(
"Bajar línea al revisar",
holdPosition = holdPosition,
action = true
)
)*/
//Tarea 5443
_settingsItem.add(
AjustesItemVO(
context.getString(R.string.holdpositionAuto),
holdPosition = holdPosition,
selected = if (holdPosition) context.getString(R.string.yes) else context.getString(
R.string.no
),
action = true
)
)
_settingsItem.add(
AjustesItemVO(
@ -124,11 +127,11 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
context.getString(R.string.runActivityStop), action = true
)
)
_settingsItem.add(
AjustesItemVO(
context.getString(R.string.closeSession), action = true
)
)
/* _settingsItem.add(
AjustesItemVO(
context.getString(R.string.closeSession), action = true
)
)*/
}

View File

@ -6,6 +6,8 @@ import android.graphics.Color
import android.graphics.drawable.Drawable
import android.view.LayoutInflater
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.ViewGroup
import androidx.core.content.ContextCompat.getColor
import androidx.core.graphics.drawable.DrawableCompat
@ -13,6 +15,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R
import es.verdnatura.databinding.ItemArticleRowFragmentBinding
import es.verdnatura.domain.ConstAndValues.CONTROLADOR
import es.verdnatura.domain.ConstAndValues.SACADOR
import es.verdnatura.presentation.common.OnMistakeClickListener
import es.verdnatura.presentation.common.OnPackingClickListener
@ -20,11 +23,12 @@ import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.common.OnQuantityClickListener
import es.verdnatura.presentation.common.OnSaleClickListener
import es.verdnatura.presentation.common.OnTicketClickListener
import es.verdnatura.presentation.common.OnTicketColorListener
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
class SaleAdapter(
private val items: List<SaleVO>,
private var items: MutableList<SaleVO>,
private val onPasillerosItemClickListener: OnPasillerosItemClickListener,
private val onQuantityClick: OnQuantityClickListener,
private val onSaleClickListener: OnSaleClickListener,
@ -33,8 +37,9 @@ class SaleAdapter(
private var onTicketClick: OnTicketClickListener? = null,
private var SaleAdapter: SaleAdapter? = null,
private var type: String? = null,
private var onTicketColorClickListener: OnTicketColorListener? = null
) : RecyclerView.Adapter<SaleAdapter.AjustesItemHolder>() {
) : RecyclerView.Adapter<SaleAdapter.AjustesItemHolder>() {
var context: Context? = null
var position: Int = 0
@ -396,8 +401,26 @@ class SaleAdapter(
} else {
View.GONE
}*/
println("sale ${sale.parkingCode} : ${sale.isAdvanced}")
//ASIGNAMOS VALOR A LA VSITA
ticketFk.setTextColor(
getColor(
context!!,
if (sale.isAdvanced != null && sale.isAdvanced == 1) {
R.color.verdnatura_red_salix
} else {
R.color.verdnatura_black
}
)
)
parkingCode.visibility = if (sale.parkingCode == null) GONE else VISIBLE
itemTicketColor.setOnClickListener {
onTicketColorClickListener?.onTicketColorListener(sale)
}
if (type == SACADOR || type == CONTROLADOR) {
itemTicketColor.tooltipText = context!!.getString(R.string.filterLevelColor)
}
this.sale = sale
}
@ -468,4 +491,14 @@ class SaleAdapter(
// itemTicketColor.setBackgroundResource((R.drawable.rectangle))
}
fun updateSales(newSales: List<SaleVO>) {
items = newSales.toMutableList()
notifyDataSetChanged() // Notifica al adaptador que los datos han cambiado
}
fun orderSales(newSales: List<SaleVO>) {
notifyDataSetChanged() // Notifica al adaptador que los datos han cambiado
}
}

View File

@ -1,6 +1,5 @@
package es.verdnatura.presentation.view.feature.collection.fragment
import android.app.AlertDialog
import android.content.Context
import android.graphics.drawable.Drawable
import android.media.MediaPlayer
@ -38,6 +37,7 @@ import es.verdnatura.domain.notNull
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.ItemScanned
import es.verdnatura.presentation.common.LabelDialogHelper
import es.verdnatura.presentation.common.OnBarcodeRowClickListener
import es.verdnatura.presentation.common.OnMistakeClickListener
import es.verdnatura.presentation.common.OnOptionsSelectedListener
@ -46,6 +46,7 @@ import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.common.OnQuantityClickListener
import es.verdnatura.presentation.common.OnSaleClickListener
import es.verdnatura.presentation.common.OnTicketClickListener
import es.verdnatura.presentation.common.OnTicketColorListener
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
import es.verdnatura.presentation.common.hideKeyboard
import es.verdnatura.presentation.common.itemScanIsQr
@ -126,11 +127,14 @@ class CollectionFragmentPicker(
private var recylerViewState: Parcelable? = null
private var isScanned: Boolean? = null
private var myPosition: Int = 0
private var changePosition = false
private lateinit var myGroupList: List<SaleVO>
private var canChangeState = true
private var isVerifiedCollection = false
private var hasFilterByLevel = false
companion object {
fun newInstance(collection: CollectionVO, type: String) =
CollectionFragmentPicker(collection, type)
@ -841,7 +845,7 @@ class CollectionFragmentPicker(
} else {
// pintar línea
saleAdapter!!.notifyDataSetChanged()
myPosition = storedPosition
myPosition = storedBackPosition
ReviewQuantityForRefreshingAndSorting(
sales[storedPosition].quantity!!.toInt(),
@ -926,7 +930,7 @@ class CollectionFragmentPicker(
}
saleAdapter = SaleAdapter(
myGroupList,
myGroupList as MutableList,
pasillerosItemClickListener!!,
object : OnQuantityClickListener {
@ -1001,17 +1005,25 @@ class CollectionFragmentPicker(
}
}
},
type = type
type = type,
onTicketColorClickListener = object : OnTicketColorListener {
override fun onTicketColorListener(sale: SaleVO) {
hasFilterByLevel = !hasFilterByLevel
if (hasFilterByLevel) {
saleAdapter!!.updateSales(myGroupList.filter { it.level == sale.level } as MutableList)
myGroupList = myGroupList.filter { it.level == sale.level }
} else {
createCollectionList()
}
}
}
)
lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
binding.fragmentSacadorCollections.adapter = saleAdapter
binding.fragmentSacadorCollections.layoutManager = lm
setTotalLines()
//Tarea #4628
@ -1111,6 +1123,7 @@ class CollectionFragmentPicker(
RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
storedBackPosition = lm.findFirstVisibleItemPosition()
myPosition = lm.findFirstVisibleItemPosition()
super.onScrolled(recyclerView, dx, dy)
}
})
@ -1368,7 +1381,7 @@ class CollectionFragmentPicker(
}
//nuevo
var mySale = sales[position].saleFk
val mySale = sales[position].saleFk
for (indice in myGroupList.indices) {
if (!myGroupList[indice].isParent && myGroupList[indice].saleFk == mySale) {
@ -1533,11 +1546,11 @@ class CollectionFragmentPicker(
if (!myGroupList[indice].isParent && myGroupList[indice].saleFk == mySale) {
storedBackPosition = indice
myPosition = storedBackPosition
}
}
storedBackPosition = position
myPosition = position
setListPosition(position, false)
if (type != PRECHECKER) {
@ -2075,7 +2088,7 @@ class CollectionFragmentPicker(
"" + 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) ticketCollection_setUsedShelves()
@ -2341,20 +2354,19 @@ class CollectionFragmentPicker(
}
}
if (isTicket) {
val builder = AlertDialog.Builder(context)
builder.setTitle(getString(R.string.selectLabeltoPrint))
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)
)
(getString(R.string.Imprimiendo) + mobileApplication.dataStoreApp.readDataStoreKey<String>(
PRINTERNAME
)).toast(requireContext())
val labelDialogHelper = LabelDialogHelper(requireContext())
labelDialogHelper.showLabelDialog(
onItemSelected = { labelCount ->
viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk,
labelCount = labelCount
)
}
val dialog = builder.create()
dialog.show()
(getString(R.string.Imprimiendo) + mobileApplication.dataStoreApp.readDataStoreKey<String>(
PRINTERNAME
)).toast(requireContext())
}
)
} else {
viewModel.collectionStickerPrint(
collectionFk = collection.collectionFk, null

View File

@ -7,7 +7,6 @@ import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo
import android.widget.ImageView
import android.widget.Toast
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentCollectionBinding
@ -170,7 +169,7 @@ class CollectionShowTicketFragment(
binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {//ID=0 ACTION_NEXT ID=5 ACTION_UNESPECEFIED)
if (!binding.scanInput.text.toString().isNullOrEmpty()) {
if (binding.scanInput.text.toString().isNotEmpty()) {
buttonPushedGetCollection = false
try {
viewModel.getSales(
@ -213,13 +212,14 @@ class CollectionShowTicketFragment(
try {
requireActivity().hideKeyboard()
} catch (e: Exception) {
e.message!!.toast(requireContext())
}
}
override fun observeViewModel() {
with(viewModel) {
collectionTicketList.observe(viewLifecycleOwner, Observer {
collectionTicketList.observe(viewLifecycleOwner) {
if (!it.isError) {
if (it.tickets.isNotEmpty()) {
@ -232,18 +232,18 @@ class CollectionShowTicketFragment(
}
} else {
ma.messageWithSound(it.errorMessage, it.isError, false)
ma.messageWithSound(it.errorMessage, isError = true, false)
if (activity != null) ma.onMyBackPressed()
}
})
}
responsePrint.observe(viewLifecycleOwner, Observer {
responsePrint.observe(viewLifecycleOwner) {
if (it.isError) {
ma.messageWithSound(
it.errorMessage, it.isError, true
it.errorMessage, isError = true, true
)
} else {
(getString(R.string.Imprimiendo) + mobileApplication.dataStoreApp.readDataStoreKey<String>(
@ -251,7 +251,7 @@ class CollectionShowTicketFragment(
)).toast(requireContext())
}
})
}
}
}
@ -277,27 +277,30 @@ class CollectionShowTicketFragment(
}
}
sales = salesList.sortedWith(compareBy({ it.saleOrder }))
/*salesList.sortedWith(compareBy<SaleVO> { it.isPrepared == "0" }
.thenBy { it.isControlled == "0" }*/
sales = salesList.sortedWith(compareBy { it.saleOrder })
saleAdapter =
SaleAdapter(sales, pasillerosItemClickListener!!, object : OnQuantityClickListener {
SaleAdapter(
sales as MutableList,
pasillerosItemClickListener!!,
object : OnQuantityClickListener {
override fun onQuantityClick(sale: SaleVO) {
}
}, object : OnSaleClickListener {
override fun onSaleClick(sale: SaleVO) {
}
override fun onQuantityClick(sale: SaleVO) {
}
},
object : OnSaleClickListener {
override fun onSaleClick(sale: SaleVO) {
}
}, object : OnMistakeClickListener {
override fun onMistakeClickListener(sale: SaleVO) {
}
}, object : OnPackingClickListener {
override fun onPackingClick(sale: SaleVO) {
}
},
object : OnMistakeClickListener {
override fun onMistakeClickListener(sale: SaleVO) {
}
},
object : OnPackingClickListener {
override fun onPackingClick(sale: SaleVO) {
}
})
})
lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
binding.fragmentSacadorCollections.adapter = saleAdapter
@ -310,8 +313,13 @@ class CollectionShowTicketFragment(
private fun setPosition() {
val firstIndex =
sales.indexOfFirst { it.isPreviousPrepared == "0" && (it.isPrepared == "0" || it.isControlled == "0") }
lm!!.scrollToPositionWithOffset(firstIndex, 0)
sales.indexOfFirst { it.isPreviousPrepared == "0" && it.isPrepared == "0" && it.isControlled == "0" }
val resultIndex = if (firstIndex != -1) {
firstIndex
} else {
sales.indexOfFirst { it.isPreviousPrepared == "0" && it.isPrepared == "0" }
}
lm!!.scrollToPositionWithOffset(resultIndex, 0)
}
private fun printObservations(observations: String) {
@ -331,7 +339,8 @@ class CollectionShowTicketFragment(
if (it.isControlled == "1") totalMark += 1
}
binding.mainToolbar.toolbarTitle.text = collection.collectionFk.toString()
binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size
binding.mainToolbar.toolbarSubtitle.text =
getString(R.string.totalsPicker, totalMark, sales.size)
if (totalMark == sales.size) {
getString(R.string.completCollection).toast(this.context, Toast.LENGTH_SHORT)

View File

@ -15,6 +15,8 @@ fun CollectionVO.map(context: Context): CollectionVO {
this.tickets.forEach { ticket ->
// if (ticket.sales.size>0){
ticket.sales.forEach {
it.parkingCode = ticket.parkingCode
it.isAdvanced = ticket.isAdvanced
it.ticketFk = ticket.ticketFk
it.level = ticket.level
it.rgb = ticket.rgb

View File

@ -157,7 +157,7 @@ class InventaryFragment :
setFilterItem()
}
adapter!!.notifyDataSetChanged()
adapter?.notifyDataSetChanged()
return@setOnKeyListener false
}
}

View File

@ -89,7 +89,9 @@ class CollectionVO(
var errorMessage: String = "",
var itemPackingTypeFk: String = "",
var rgb: String? = null,
var ticketTotalCount: Int? = null
var ticketTotalCount: Int? = null,
var parkingCode: String? = null,
var idAdvanced: Boolean? = null
)
class CollectionSalix(
@ -162,7 +164,9 @@ class SaleVO(
var code: String? = "",
var hasMistake: Any? = false,
var sectorFk: Int? = null,
var packingChecked: Int = 1
var packingChecked: Int = 1,
var isAdvanced: Int? = 0,
var parkingCode: String? = ""
)
@ -175,8 +179,10 @@ class TicketVO(
var sales: List<SaleVO> = listOf(),
@SerializedName(value = "observations", alternate = ["observaciones"])
var observations: String = "",
var isAdvanced: Int? = 0,
var parkingCode: String? = ""
)
)
data class CollectionIdSalix(
var id: Int

View File

@ -0,0 +1,11 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="@android:color/white"
android:autoMirrored="true">
<path
android:fillColor="@android:color/white"
android:pathData="M200,840Q167,840 143.5,816.5Q120,793 120,760L120,200Q120,167 143.5,143.5Q167,120 200,120L480,120L480,200L200,200Q200,200 200,200Q200,200 200,200L200,760Q200,760 200,760Q200,760 200,760L480,760L480,840L200,840ZM640,680L585,622L687,520L360,520L360,440L687,440L585,338L640,280L840,480L640,680Z"/>
</vector>

View File

@ -11,24 +11,24 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/default_layout_margin"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true">
android:focusableInTouchMode="true"
android:orientation="vertical"
android:padding="@dimen/default_layout_margin">
<TextView
android:id="@+id/custom_dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_1"
android:layout_marginBottom="@dimen/layout_margin_min"
android:textAlignment="center"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h6"
android:textStyle="bold"
android:visibility="gone"
tools:text="¿Estás seguro de que deseas eliminar el dispositivo de celia?"
tools:visibility="visible" />
android:id="@+id/custom_dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_1"
android:layout_marginBottom="@dimen/layout_margin_min"
android:textAlignment="center"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h6"
android:textStyle="bold"
android:visibility="gone"
tools:text="¿Estás seguro de que deseas eliminar el dispositivo de celia?"
tools:visibility="visible" />
<TextView
android:id="@+id/custom_dialog_description"
@ -44,13 +44,12 @@
tools:visibility="visible" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColorHint="@android:color/darker_gray"
android:layout_marginTop="@dimen/layout_margin_min">
android:layout_marginTop="@dimen/layout_margin_min"
android:textColorHint="@android:color/darker_gray">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_dialog_value"
@ -61,7 +60,28 @@
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray"/>
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_three"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_min"
android:textColorHint="@android:color/darker_gray"
android:visibility="gone"
tools:visibility="visible">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_dialog_value_three"
style="@style/DefaultButton.TransparentButton"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
@ -69,9 +89,10 @@
android:id="@+id/textinputlayout_two"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColorHint="@android:color/darker_gray"
android:layout_marginTop="@dimen/layout_margin_min"
android:textColorHint="@android:color/darker_gray"
android:visibility="gone">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_dialog_value_two"
style="@style/InputLineTextSearch"
@ -90,7 +111,7 @@
android:layout_height="0dp"
android:layout_weight="1"
android:clipToPadding="false"
tools:listitem="@layout/item_barcode_row"/>
tools:listitem="@layout/item_barcode_row" />
<Button
android:id="@+id/custom_dialog_button_ok"
@ -101,6 +122,15 @@
tools:text="@string/delete"
tools:visibility="visible" />
<Button
android:id="@+id/custom_dialog_button_ok_two"
style="@style/DefaultButton.NormalButton"
android:layout_width="match_parent"
android:layout_marginTop="@dimen/default_layout_margin"
android:visibility="gone"
tools:text="@string/delete"
tools:visibility="visible" />
<Button
android:id="@+id/custom_dialog_button_ko"
style="@style/DefaultButton.TransparentButton"

View File

@ -26,15 +26,7 @@
app:layout_constraintTop_toBottomOf="@id/main_toolbar" />
<!-- RecyclerView en la parte superior -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/setttings_items"
android:layout_width="0dp"
android:layout_height="wrap_content"
app:layout_constraintBottom_toTopOf="@id/scrollView"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/divider"
app:layout_constraintVertical_bias="0" />
<es.verdnatura.presentation.view.commom.SearchableRecyclerView
android:id="@+id/searchableRecyclerView"
@ -53,118 +45,15 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/setttings_items">
app:layout_constraintTop_toBottomOf="@id/divider">
<LinearLayout
android:id="@+id/linearLayout"
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/setttings_items"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/navigation_row_min_padding"
android:visibility="gone"
android:layout_height="match_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/setttings_items">
<!-- Resto de los elementos, como versiones, usuarios, etc. -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/default_layout_margin"
android:text="@string/version"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1"
android:textStyle="bold" />
<TextView
android:id="@+id/item_version"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_layout_margin"
android:text=""
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/default_layout_margin"
android:text="@string/user"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1"
android:textStyle="bold" />
<TextView
android:id="@+id/user_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_layout_margin"
android:text=""
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/default_layout_margin"
android:text="@string/Androidid"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1"
android:textStyle="bold" />
<TextView
android:id="@+id/androidid_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_layout_margin"
android:text=""
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1"
android:tooltipText="@string/copied" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="150dp"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/default_layout_margin"
android:text="@string/serialNumber"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1"
android:textStyle="bold" />
<TextView
android:id="@+id/serial_number"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/default_layout_margin"
android:text=""
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" />
</LinearLayout>
</LinearLayout>
app:layout_constraintVertical_bias="0" />
</ScrollView>
<!-- Splash progress en el centro de la pantalla -->
@ -175,7 +64,7 @@
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

View File

@ -50,16 +50,17 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_margin_min"
android:text="@string/Nivel"
android:textColor="@color/verdnatura_black"
android:textSize="@dimen/h8" />
android:textSize="@dimen/h9" />
<TextView
android:id="@+id/level"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_margin_min"
android:ellipsize="end"
android:maxLines="1"
android:text="@{sale.level}"
android:textColor="@color/verdnatura_black"
android:textSize="@dimen/h8"
@ -69,10 +70,9 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_margin_min"
android:text="@string/Ticket"
android:textColor="@color/verdnatura_black"
android:textSize="@dimen/h8" />
android:textSize="@dimen/h9" />
<TextView
android:id="@+id/ticketFk"
@ -81,11 +81,19 @@
android:text="@{sale.ticketFk}"
android:textColor="@color/verdnatura_black"
android:textSize="@dimen/h8"
android:textStyle="bold"
app:drawableEndCompat="@drawable/ic_click_black"
tool:text="123456789"
android:textStyle="bold" />
<TextView
android:id="@+id/parkingCode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text='@{String.format("(%s)", sale.parkingCode)}'
android:textColor="@color/verdnatura_black"
android:textSize="@dimen/caption"
android:textStyle="bold" />
<!-- app:drawableEndCompat="@drawable/ic_click_black"-->
/>
<RelativeLayout
android:layout_width="match_parent"
@ -190,11 +198,10 @@
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1"
android:textStyle="bold"
app:drawableEndCompat="@drawable/ic_click"
app:layout_constraintStart_toEndOf="@+id/linearLayout3"
app:layout_constraintTop_toTopOf="parent"
tool:text="85478" />
<!--app:drawableEndCompat="@drawable/ic_click"-->
<TextView
android:id="@+id/item_article_quantity_pickedOld"
@ -441,7 +448,6 @@
android:layout_height="wrap_content"
android:background="@color/verdnatura_background_item_picker"
android:clipToPadding="false"
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/item_placement_row"
tools:orientation="horizontal" />

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tool="http://schemas.android.com/tools">
<data>
@ -42,8 +41,8 @@
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h8"
android:textStyle="bold"
app:drawableEndCompat="@drawable/ic_click"
tool:text="YIC" />
<!-- app:drawableEndCompat="@drawable/ic_click"-->
</LinearLayout>
<LinearLayout

View File

@ -9,7 +9,7 @@
<string name="Pallet">Pallet</string>
<string name="Ruta">Ruta</string>
<string name="Cajas">Cajas</string>
<string name="Nivel">Niv:</string>
<string name="Nivel">N:</string>
<string name="de">de</string>
<string name="Ticket">T:</string>
<string name="Concepto">Concepto</string>
@ -884,6 +884,15 @@
<string name="errorBoxpicking">Caja preparada no válida.</string>
<string name="indicateQuantity">Indica la cantidad</string>
<string name="addItemQuantity">Vas a añadir el artículo %1$s con la siguiente cantidad:</string>
<string name="errorPrintBuy">El artículo no se puede imprimir. No se ha obtenido el código de compra(buy)</string>
<string name="itemName">Artículo %1$d : %2$s</string>
<string name="printQr">Imprimir QR</string>
<string name="printBarcode">Imprimir BARCODE</string>
<string name="labelNumber">Indica número de etiquetas</string>
<string name="optionalPacking">Packing(opcional)</string>
<string name="holdpositionAuto">Al revisar desplazar:</string>
<string name="parkingIn">Aparcado en %1$s</string>
<string name="filterLevelColor">Al pulsar filtras o no la lista por el color del nivel</string>
</resources>

View File

@ -9,7 +9,7 @@
<string name="Pallet">Pallet</string>
<string name="Ruta">Route</string>
<string name="Cajas">Cajas</string>
<string name="Nivel">Niv:</string>
<string name="Nivel">N:</string>
<string name="de">de</string>
<string name="Ticket">T:</string>
<string name="Concepto">Concepto</string>
@ -884,5 +884,14 @@
<string name="errorBoxpicking">Caja preparada no válida.</string>
<string name="indicateQuantity">Indica la cantidad</string>
<string name="addItemQuantity">Vas a añadir el artículo %1$s con la siguiente cantidad:</string>
<string name="errorPrintBuy">El artículo no se puede imprimir. No se ha obtenido el código de compra(buy)</string>
<string name="itemName">Artículo %1$d : %2$s</string>
<string name="printQr">Imprimir QR</string>
<string name="printBarcode">Imprimir BARCODE</string>
<string name="labelNumber">Indica número de etiquetas</string>
<string name="optionalPacking">Packing(opcional)</string>
<string name="holdpositionAuto">Al revisar desplazar:</string>
<string name="parkingIn">Aparcado en %1$s</string>
<string name="filterLevelColor">Al pulsar filtras o no la lista por color del nivel</string>
</resources>

View File

@ -9,7 +9,7 @@
<string name="Pallet">Pallet</string>
<string name="Ruta">Rota</string>
<string name="Cajas">Cajas</string>
<string name="Nivel">Nivel:</string>
<string name="Nivel">N:</string>
<string name="de">de</string>
<string name="Ticket">T:</string>
<string name="Concepto">Concepto</string>
@ -884,5 +884,14 @@
<string name="errorBoxpicking">Caja preparada no válida.</string>
<string name="indicateQuantity">Indica la cantidad</string>
<string name="addItemQuantity">Vas a añadir el artículo %1$s con la siguiente cantidad:</string>
<string name="errorPrintBuy">El artículo no se puede imprimir. No se ha obtenido el código de compra(buy)</string>
<string name="itemName">Artículo %1$d : %2$s</string>
<string name="printQr">Imprimir QR</string>
<string name="printBarcode">Imprimir BARCODE</string>
<string name="labelNumber">Indica número de etiquetas</string>
<string name="optionalPacking">Packing(opcional)</string>
<string name="holdpositionAuto">Al revisar desplazar:</string>
<string name="parkingIn">Aparcado en %1$s</string>
<string name="filterLevelColor">Al pulsar filtras o no la lista por el color del nivel</string>
</resources>

View File

@ -12,7 +12,7 @@
<string name="cmr">CMR</string>
<string name="Ruta">Route</string>
<string name="Cajas">Boxes</string>
<string name="Nivel">Lev:</string>
<string name="Nivel">L:</string>
<string name="de">of</string>
<string name="Ticket">T:</string>
<string name="tickets">Tickets:</string>
@ -887,5 +887,14 @@
<string name="errorBoxpicking">Caja preparada no válida.</string>
<string name="indicateQuantity">Indica la cantidad</string>
<string name="addItemQuantity">Vas a añadir el artículo %1$s con la siguiente cantidad:</string>
<string name="errorPrintBuy">El artículo no se puede imprimir. No se ha obtenido el código de compra(buy)</string>
<string name="itemName">Artículo %1$d : %2$s</string>
<string name="printQr">Imprimir QR</string>
<string name="printBarcode">Imprimir BARCODE</string>
<string name="labelNumber">Indica número de etiquetas</string>
<string name="optionalPacking">Packing(opcional)</string>
<string name="holdpositionAuto">Al revisar desplazar:</string>
<string name="parkingIn">Aparcado en %1$s</string>
<string name="filterLevelColor">Al pulsar filtras o no la lista por el color del nivel</string>
</resources>