Version 8.6.1Beta, añadido ticketColor más grande, quitados colores items y permutado quantity por cel2. Quitados warnings
This commit is contained in:
parent
edfa831a84
commit
35253779e6
|
@ -150,9 +150,10 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/buyers_fragment.xml" value="0.18333333333333332" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_edit_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_edit_dialog_two_values.xml" value="0.2203125" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_hour.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_list_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_three_dialog.xml" value="0.12817028985507245" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_three_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_two_dialog.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/component_custom_ubicador_dialog.xml" value="0.2453125" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_ajustes.xml" value="0.3333333333333333" />
|
||||
|
@ -202,7 +203,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_workermistake.xml" value="0.2265625" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_ajustes_row.xml" value="0.16666666666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row_fragment.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row_fragment.xml" value="0.4466666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row_presacador.xml" value="0.4466666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_article_row_reubication_fragment.xml" value="0.36614583333333334" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_barcode_row.xml" value="0.15579710144927536" />
|
||||
|
@ -225,6 +226,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_location_row.xml" value="0.16875" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_main_menu.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_pasilleros_main_menu.xml" value="0.33" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_placement_reubication_row.xml" value="0.27447916666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_placement_row.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_proposal_row.xml" value="0.22604166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_reposicion.xml" value="0.1" />
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 123,
|
||||
"versionName": "8.5.2Beta",
|
||||
"versionCode": 126,
|
||||
"versionName": "8.6Beta",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
|
|
Binary file not shown.
|
@ -173,7 +173,7 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
|
|||
password: String,
|
||||
shelvingFk: String
|
||||
|
||||
): Call<List<Reubication>> {
|
||||
): Call<ArrayList<Reubication>> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(shelvingFk)
|
||||
|
||||
|
|
|
@ -1034,7 +1034,7 @@ interface VerdnaturaService {
|
|||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>
|
||||
):
|
||||
Call<List<Reubication>>
|
||||
Call<ArrayList<Reubication>>
|
||||
|
||||
|
||||
@POST("almacennew/clearShelvingList")//REVISADA
|
||||
|
|
|
@ -0,0 +1,124 @@
|
|||
package es.verdnatura.presentation.view.component
|
||||
|
||||
import android.app.Dialog
|
||||
import android.content.Context
|
||||
import android.text.InputType
|
||||
import android.view.View
|
||||
import com.google.android.material.textfield.TextInputEditText
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.ComponentCustomEditDialogTwoValuesBinding
|
||||
|
||||
|
||||
class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.DialogTheme) {
|
||||
|
||||
private var binding: ComponentCustomEditDialogTwoValuesBinding =
|
||||
ComponentCustomEditDialogTwoValuesBinding.inflate(layoutInflater)
|
||||
|
||||
|
||||
init {
|
||||
|
||||
setContentView(binding.root)
|
||||
setInputText()
|
||||
setInputTextTwoVisibility()
|
||||
}
|
||||
|
||||
fun getEditText(): TextInputEditText {
|
||||
|
||||
return binding.customDialogValue
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun getEditTextTwo(): TextInputEditText {
|
||||
|
||||
return binding.customDialogValueTwo
|
||||
|
||||
}
|
||||
|
||||
fun getValue(): String {
|
||||
|
||||
return binding.customDialogValue.text.toString()
|
||||
|
||||
|
||||
}
|
||||
|
||||
fun getValueTwo(): String {
|
||||
|
||||
return binding.customDialogValueTwo.text.toString()
|
||||
|
||||
}
|
||||
|
||||
fun setValue(value: String): CustomDialogInputTwoValues {
|
||||
|
||||
binding.customDialogValue.setText(value)
|
||||
binding.customDialogValue.visibility = View.VISIBLE
|
||||
|
||||
|
||||
return this
|
||||
}
|
||||
fun setValueTwo(value: String): CustomDialogInputTwoValues {
|
||||
|
||||
binding.customDialogValueTwo.setText(value)
|
||||
binding.customDialogValue.visibility = View.VISIBLE
|
||||
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
fun setTitle(title: String): CustomDialogInputTwoValues {
|
||||
|
||||
binding.customDialogTitle.visibility = View.VISIBLE
|
||||
binding.customDialogTitle.text = title
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
fun setDescription(description: String): CustomDialogInputTwoValues {
|
||||
|
||||
binding.customDialogDescription.visibility = View.VISIBLE
|
||||
binding.customDialogDescription.text = description
|
||||
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
fun setOkButton(text: String, onButtonClicked: () -> Unit): CustomDialogInputTwoValues {
|
||||
|
||||
binding.customDialogButtonOk.visibility = View.VISIBLE
|
||||
binding.customDialogButtonOk.text = text
|
||||
binding.customDialogButtonOk.setOnClickListener { onButtonClicked() }
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
fun setKoButton(text: String, onButtonClicked: () -> Unit): CustomDialogInputTwoValues {
|
||||
|
||||
binding.customDialogButtonKo.visibility = View.VISIBLE
|
||||
binding.customDialogButtonKo.text = text
|
||||
binding.customDialogButtonKo.setOnClickListener { onButtonClicked() }
|
||||
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
fun setInputText() {
|
||||
binding.customDialogValue.inputType = InputType.TYPE_CLASS_NUMBER
|
||||
}
|
||||
|
||||
fun setInputTextTwo() {
|
||||
binding.customDialogValueTwo.inputType = InputType.TYPE_CLASS_NUMBER
|
||||
}
|
||||
|
||||
fun setInputTextTwoVisibility() {
|
||||
binding.textinputlayoutTwo.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
/* fun setFocusText() {
|
||||
binding.customDialogValue.requestFocus()
|
||||
}*/
|
||||
|
||||
fun setFocusTextTwo() {
|
||||
binding.customDialogValueTwo.requestFocus()
|
||||
}
|
||||
|
||||
}
|
|
@ -170,7 +170,7 @@ class AjustesFragment :
|
|||
}.show()
|
||||
} else {
|
||||
|
||||
if (it.list != null && it.list.size > 0) {
|
||||
if (it.list.size > 0) {
|
||||
val listSectores: ArrayList<String> = ArrayList()
|
||||
it.list.forEach {
|
||||
listSectores.add(it.description)
|
||||
|
@ -200,7 +200,7 @@ class AjustesFragment :
|
|||
}.show()
|
||||
} else {
|
||||
|
||||
if (it.list != null && it.list.size > 0) {
|
||||
if (it.list.size > 0) {
|
||||
val listPrinters: ArrayList<String> = ArrayList()
|
||||
it.list.forEach {
|
||||
listPrinters.add(it.name)
|
||||
|
|
|
@ -540,10 +540,8 @@ class ItemCardFragment(
|
|||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
binding.scrollView.post {
|
||||
val position = IntArray(2)
|
||||
if (binding.itemcardImage != null) {
|
||||
binding.itemcardImage.getLocationInWindow(position)
|
||||
binding.scrollView.scrollTo(0, position[1])
|
||||
}
|
||||
binding.itemcardImage.getLocationInWindow(position)
|
||||
binding.scrollView.scrollTo(0, position[1])
|
||||
}
|
||||
binding.splashProgressTwo.visibility = GONE
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ class CollectionFragment(
|
|||
|
||||
mperror = MediaPlayer.create((activity as MainActivity), R.raw.error)
|
||||
mpok = MediaPlayer.create((activity as MainActivity), R.raw.ok)
|
||||
Log.d("VERDNATURA::","El type es "+type)
|
||||
|
||||
|
||||
if ((collection.collectionFk != null) && type.equals(CONTROLADOR)) {
|
||||
|
||||
|
|
|
@ -120,17 +120,17 @@ class PasilleroViewModel(context: Context) : BaseViewModel() {
|
|||
)
|
||||
|
||||
//Tarea #3754 --> Falta arreglar la colección que se le pasa a ReubicationCollectionFragment y diseño más visual
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
1,
|
||||
R.drawable.ic_reubication,
|
||||
contextApp.getString(R.string.titleReUbicator),
|
||||
R.string.titleReUbicator,
|
||||
contextApp.getString(
|
||||
R.string.titleReubicatorDescrip
|
||||
)
|
||||
)
|
||||
)*/
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
1,
|
||||
R.drawable.ic_reubication,
|
||||
contextApp.getString(R.string.titleReUbicator),
|
||||
R.string.titleReUbicator,
|
||||
contextApp.getString(
|
||||
R.string.titleReubicatorDescrip
|
||||
)
|
||||
)
|
||||
)*/
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
|
|
|
@ -18,6 +18,7 @@ package es.verdnatura.presentation.view.feature.reubication.adapter
|
|||
import es.verdnatura.presentation.common.*
|
||||
import es.verdnatura.presentation.view.feature.collection.adapter.PlacementAdapter
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.reubication.model.PlacementReubication
|
||||
import es.verdnatura.presentation.view.feature.reubication.model.Reubication
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||
|
||||
|
@ -69,14 +70,14 @@ class ReubicatorAdapter(
|
|||
}
|
||||
/* if (sale.pickedQuantity.isNullOrEmpty())
|
||||
sale.pickedQuantity = "0"
|
||||
|
||||
*/
|
||||
val childLayoutManager =
|
||||
LinearLayoutManager(context!!, RecyclerView.HORIZONTAL, false)
|
||||
|
||||
itemArticlePlacements.apply {
|
||||
layoutManager = childLayoutManager
|
||||
adapter = PlacementAdapter(sale.placements, onPasillerosItemClickListener)
|
||||
}*/
|
||||
adapter = reubication.placements?.let { ReubicatorPlacementAdapter(it, onPasillerosItemClickListener) }
|
||||
}
|
||||
|
||||
//CLICK EVENTS
|
||||
/*
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package es.verdnatura.presentation.view.feature.reubication.adapter
|
||||
|
||||
|
||||
import android.content.Context
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.ItemPlacementReubicationRowBinding
|
||||
import es.verdnatura.databinding.ItemPlacementRowBinding
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.reubication.model.PlacementReubication
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementVO
|
||||
|
||||
class ReubicatorPlacementAdapter (
|
||||
private val items: List<PlacementReubication>,
|
||||
private val onPasillerosItemClickListener: OnPasillerosItemClickListener
|
||||
): RecyclerView.Adapter<ReubicatorPlacementAdapter.AjustesItemHolder> () {
|
||||
var context: Context? = null
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
|
||||
this.context = parent.context
|
||||
return AjustesItemHolder(
|
||||
ItemPlacementReubicationRowBinding.inflate(LayoutInflater.from(parent.context),parent,false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() =items.size
|
||||
|
||||
override fun onBindViewHolder(holder: AjustesItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
}
|
||||
|
||||
inner class AjustesItemHolder(
|
||||
val binding: ItemPlacementReubicationRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root){
|
||||
fun bind(placement: PlacementReubication) {
|
||||
binding.apply {
|
||||
if (placement.plate.isNullOrEmpty())
|
||||
placement.plate = ""//placement.parking
|
||||
if (placement.visible.isNullOrEmpty())
|
||||
placement.visible = "("+placement.visible+")"
|
||||
this.item = placement
|
||||
|
||||
itemRootLayout.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = binding.root.context.getString(
|
||||
R.string.titleUbicator)),placement.plate)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -2,7 +2,6 @@ package es.verdnatura.presentation.view.feature.reubication.fragment
|
|||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.text.Editable
|
||||
import android.util.Log
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
|
@ -14,8 +13,10 @@ import es.verdnatura.domain.notNull
|
|||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.common.OnReubicationClickListener
|
||||
import es.verdnatura.presentation.view.component.CustomDialogInputTwoValues
|
||||
import es.verdnatura.presentation.view.component.CustomDialogThreeButtons
|
||||
import es.verdnatura.presentation.view.feature.reubication.adapter.ReubicatorAdapter
|
||||
import es.verdnatura.presentation.view.feature.reubication.model.PlacementReubication
|
||||
import es.verdnatura.presentation.view.feature.reubication.model.Reubication
|
||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorViewModel
|
||||
|
||||
|
@ -30,6 +31,7 @@ class ReubicationCollectionFragment(
|
|||
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
|
||||
private var adapter: ReubicatorAdapter? = null
|
||||
private lateinit var customDialogThreeButtons: CustomDialogThreeButtons
|
||||
private lateinit var customDialogInputTwoValues: CustomDialogInputTwoValues
|
||||
|
||||
companion object {
|
||||
fun newInstance(
|
||||
|
@ -52,31 +54,35 @@ class ReubicationCollectionFragment(
|
|||
@SuppressLint("SetTextI18n")
|
||||
override fun init() {
|
||||
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
|
||||
customDialogInputTwoValues = CustomDialogInputTwoValues(requireContext())
|
||||
ma.hideBottomNavigation(GONE)
|
||||
binding.splashProgress.visibility = GONE
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
"${getString(R.string.wagoon)}:${shelving.uppercase()}"
|
||||
setEvents()
|
||||
|
||||
for (item in list) {
|
||||
Log.d("VERDNATURA::", "item " + item.itemFk)
|
||||
}
|
||||
showList(list)
|
||||
// showList(list)
|
||||
// createReubicationsTwo(list)
|
||||
//createReubications(list)
|
||||
showList(list.sortedBy { it.pickingOrder })
|
||||
super.init()
|
||||
}
|
||||
|
||||
|
||||
private fun showList(list: List<Reubication>) {
|
||||
|
||||
|
||||
for (l in list){
|
||||
Log.d("VERDNATURA:::","El item es "+l.itemFk+":"+l.pickingOrder)
|
||||
}
|
||||
|
||||
adapter = ReubicatorAdapter(list, pasillerosItemClickListener!!, object :
|
||||
OnReubicationClickListener {
|
||||
override fun onReubicationClick(reubication: Reubication) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelving_merge(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
reubication.id,
|
||||
"xxx"
|
||||
)
|
||||
Log.d("VERDNATURA::", "el click en reubication")
|
||||
showLeaveItemDialog(reubication, "")
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -118,34 +124,110 @@ class ReubicationCollectionFragment(
|
|||
}
|
||||
|
||||
private fun scanPlate(plate: String) {
|
||||
showLeaveItemDialog(plate)
|
||||
/* for (items in list){
|
||||
for (placements in items.placements!!){
|
||||
if (placements.plate==plate){
|
||||
Log.d("VERDNATURA::","Encontrada matrícula")
|
||||
showLeaveItemDialog(plate)
|
||||
//showLeaveItemDialog(plate)
|
||||
var found = false
|
||||
all_list@ for (items in list) {
|
||||
|
||||
}
|
||||
}
|
||||
}*/
|
||||
for (placements in items.placements!!) {
|
||||
|
||||
|
||||
if (placements.plate == plate ) {
|
||||
Log.d("VERDNATURA::", "Encontrada matrícula")
|
||||
found = true
|
||||
showLeaveItemDialog(items, placements.plate)
|
||||
break@all_list
|
||||
|
||||
}
|
||||
|
||||
|
||||
}}
|
||||
if (!found) {
|
||||
ma.messageWithSound(getString(R.string.itemScanetNotFound), true, true, isToasted = true)
|
||||
}
|
||||
}
|
||||
|
||||
private fun showLeaveItemDialog(plate: String) {
|
||||
customDialogThreeButtons.setDescription("¿ Dejar item:XXX en el carro :$plate ?").setValue("1000")
|
||||
.setOkButton(getString(R.string.leaveItem)) {
|
||||
private fun showLeaveItemDialog(itemReubication: Reubication, placementReubication: String) {
|
||||
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}.show()
|
||||
if (placementReubication.isNotEmpty()) {
|
||||
val messageDescrip =
|
||||
"¿ Dejar item: ${itemReubication.itemFk}-" + itemReubication.longName + " en el carro :" + placementReubication + "?"
|
||||
customDialogThreeButtons.setDescription(messageDescrip)
|
||||
.setValue(itemReubication.visible)
|
||||
.setOkButton(getString(R.string.leaveItem)) {
|
||||
|
||||
if (customDialogThreeButtons.getValue() == itemReubication.visible) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelving_merge(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
itemReubication.id,
|
||||
placementReubication
|
||||
)
|
||||
}
|
||||
customDialogThreeButtons.dismiss()
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}.show()
|
||||
|
||||
} else {
|
||||
val messageDescrip =
|
||||
getString(R.string.scanPlateToLeave)+itemReubication.itemFk+"-" + itemReubication.longName
|
||||
|
||||
customDialogInputTwoValues.setDescription(messageDescrip)
|
||||
.setValue(itemReubication.visible)
|
||||
.setOkButton(getString(R.string.leaveItem)) {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelving_merge(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
itemReubication.id,
|
||||
placementReubication.uppercase()
|
||||
)
|
||||
|
||||
customDialogInputTwoValues.dismiss()
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
customDialogInputTwoValues.setValueTwo("")
|
||||
scanRequest()
|
||||
|
||||
customDialogInputTwoValues.dismiss()
|
||||
}.show()
|
||||
}
|
||||
customDialogInputTwoValues.getEditTextTwo()
|
||||
.setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
|
||||
if (customDialogInputTwoValues.getValueTwo().isNotEmpty()) {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelving_merge(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
itemReubication.id,
|
||||
customDialogInputTwoValues.getValueTwo().uppercase()
|
||||
)
|
||||
}
|
||||
customDialogInputTwoValues.setValue("")
|
||||
scanRequest()
|
||||
customDialogInputTwoValues.dismiss()
|
||||
//hideKeyboards()
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
false
|
||||
}
|
||||
|
||||
customDialogInputTwoValues.setFocusTextTwo()
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun scanRequest() {
|
||||
if (binding.scanInput != null) {
|
||||
binding.scanInput.requestFocus()
|
||||
}
|
||||
binding.scanInput.requestFocus()
|
||||
|
||||
}
|
||||
|
||||
|
@ -172,8 +254,8 @@ class ReubicationCollectionFragment(
|
|||
)
|
||||
)
|
||||
} else {
|
||||
showList(it.list)
|
||||
|
||||
// createReubications(it.list)
|
||||
createReubicationsTwo(it.list)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,7 +273,12 @@ class ReubicationCollectionFragment(
|
|||
|
||||
ma.messageWithSound(it.response, false, false, "", false)
|
||||
|
||||
callItemShelvingReturn()
|
||||
if (!list.isEmpty())
|
||||
{
|
||||
callItemShelvingReturn()
|
||||
}else{
|
||||
ma.onBackPressed()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -211,5 +298,85 @@ class ReubicationCollectionFragment(
|
|||
|
||||
}
|
||||
|
||||
private fun createReubicationsTwo(list: List<Reubication>) {
|
||||
|
||||
var listItems= mutableListOf<String>()
|
||||
val reubication=mutableListOf<Reubication>()
|
||||
|
||||
for (item in list){
|
||||
Log.d("VERDNATURA::", "itemFk"+item.shelvingFk)
|
||||
Log.d("VERDNATURA::", "escaneado"+shelving)
|
||||
if (item.shelvingFk.uppercase()==shelving.uppercase()){
|
||||
//listItems.add(item.itemFk)
|
||||
Log.d("VERDNATURA::", "añadiendo")
|
||||
reubication.add(Reubication(itemFk =item.itemFk, id=item.id,longName = item.longName, visible = item.visible, shelvingFk = item.shelvingFk))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for (item in list){
|
||||
for (r in reubication){
|
||||
if (item.itemFk==r.itemFk){
|
||||
|
||||
if (item.shelvingFk.uppercase()!=shelving.uppercase())
|
||||
r.placements.add(PlacementReubication(code=item.code,plate=item.shelvingFk,visible="("+item.visible+")", idItemShelving = item.id))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ma.openFragmentReubications(reubication,shelving)
|
||||
}
|
||||
|
||||
|
||||
|
||||
private fun createReubications(list: List<Reubication>) {
|
||||
|
||||
val listItems = mutableListOf<String>()
|
||||
val reubication = mutableListOf<Reubication>()
|
||||
|
||||
for (item in list) {
|
||||
if (!listItems.contains(item.itemFk)) {
|
||||
listItems.add(item.itemFk)
|
||||
reubication.add(
|
||||
Reubication(
|
||||
itemFk = item.itemFk,
|
||||
longName = item.longName,
|
||||
visible = item.visible,
|
||||
shelvingFk = item.shelvingFk
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
for (item in list) {
|
||||
for (r in reubication) {
|
||||
if (item.itemFk == r.itemFk) {
|
||||
|
||||
if (item.shelvingFk.uppercase() != shelving.uppercase())
|
||||
r.placements.add(
|
||||
PlacementReubication(
|
||||
code = item.code,
|
||||
plate = item.shelvingFk,
|
||||
visible = "(" + item.visible + ")",
|
||||
idItemShelving = item.id
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (item in list) {
|
||||
Log.d("VERDNATURA::", "el item es " + item.itemFk + "-" + item.id + "-" + item.visible)
|
||||
for (r in item.placements) {
|
||||
Log.d(
|
||||
"VERDNATURA::",
|
||||
"la reubic es" + r.idItemShelving + "-" + r.plate + "-" + r.code
|
||||
)
|
||||
}
|
||||
}
|
||||
//ma.openFragmentReubications(reubication,shelving)
|
||||
|
||||
showList(list)
|
||||
}
|
||||
|
||||
}
|
|
@ -10,6 +10,7 @@ import es.verdnatura.databinding.FragmentControladorBinding
|
|||
import es.verdnatura.domain.notNull
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||
import es.verdnatura.presentation.view.feature.reubication.model.PlacementReubication
|
||||
import es.verdnatura.presentation.view.feature.reubication.model.Reubication
|
||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorViewModel
|
||||
|
||||
|
@ -67,6 +68,7 @@ class ReubicationFragment(var entrypoint: String) :
|
|||
shelvingFk = binding.scanInput.text.toString(),
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
binding.scanInput.setText("")
|
||||
|
@ -98,6 +100,11 @@ class ReubicationFragment(var entrypoint: String) :
|
|||
)
|
||||
)
|
||||
} else {
|
||||
|
||||
|
||||
/* for (item in it.list){
|
||||
Log.d("VERDNATURA::", "Listando itemFk"+item.itemFk+":"+item.shelvingFk+":"+item.code)
|
||||
}*/
|
||||
createReubications(it.list)
|
||||
|
||||
}
|
||||
|
@ -114,17 +121,64 @@ class ReubicationFragment(var entrypoint: String) :
|
|||
|
||||
private fun createReubications(list: List<Reubication>) {
|
||||
|
||||
for (item in list) {
|
||||
|
||||
if (item.shelvingFk != shelvingScaned && item.itemFk == "5987") {
|
||||
var listItems = mutableListOf<String>()
|
||||
|
||||
// TODO("FALTA CREAR REUBICACIONES")
|
||||
// item.placements!!.add(PlacementReubication(item.shelvingFk, item.visible))
|
||||
val reubication = mutableListOf<Reubication>() as ArrayList
|
||||
Log.d("VERDNATURA::", "Iniciem llistat")
|
||||
|
||||
for (item in list.sortedBy { it.pickingOrder }) {
|
||||
if (item.shelvingFk.uppercase() == shelvingScaned.uppercase()) {
|
||||
Log.d("VERDNATURA::", "añadiendo" + item.itemFk + ":" + item.shelvingFk)
|
||||
reubication.add(
|
||||
Reubication(
|
||||
itemFk = item.itemFk,
|
||||
id = item.id,
|
||||
longName = item.longName,
|
||||
visible = item.visible,
|
||||
shelvingFk = item.shelvingFk,
|
||||
pickingOrder = item.pickingOrder
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
Log.d("VERDNATURA::","LA MATRICULA ES "+shelvingScaned)
|
||||
ma.openFragmentReubications(list,shelvingScaned)
|
||||
|
||||
|
||||
|
||||
for (item in list.sortedBy { it.pickingOrder }) {
|
||||
for (r in reubication) {
|
||||
if (item.itemFk == r.itemFk) {
|
||||
if (item.shelvingFk.uppercase() != shelvingScaned.uppercase())
|
||||
r.placements.add(
|
||||
PlacementReubication(
|
||||
code = item.code,
|
||||
plate = item.shelvingFk,
|
||||
visible = "(" + item.visible + ")",
|
||||
idItemShelving = item.id
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (item in reubication) {
|
||||
if (item.placements.isNullOrEmpty()) {
|
||||
item.pickingOrder = 0
|
||||
}else{
|
||||
//item.pickingOrder=
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
for (item in reubication) {
|
||||
Log.d(
|
||||
"VERDNATURA::",
|
||||
"Item:" + item.itemFk + ":" + item.shelvingFk + " pickingORder:" + item.pickingOrder
|
||||
)
|
||||
|
||||
}
|
||||
ma.openFragmentReubications(reubication.sortedBy { it.pickingOrder }, shelvingScaned)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package es.verdnatura.presentation.view.feature.reubication.model
|
||||
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementVO
|
||||
|
||||
|
||||
class ReubicationList(
|
||||
var list: List<Reubication> = listOf()
|
||||
var list: ArrayList<Reubication> = arrayListOf()
|
||||
)
|
||||
|
||||
class Reubication(
|
||||
|
@ -11,13 +14,16 @@ class Reubication(
|
|||
var itemFk: String = "",
|
||||
var longName: String = "",
|
||||
var visible: String = "",
|
||||
var placements: MutableList<PlacementReubication>? = null,
|
||||
var isError: Boolean,
|
||||
var errorMessage: String
|
||||
var placements: MutableList<PlacementReubication> = mutableListOf(),
|
||||
var pickingOrder:Int=0,
|
||||
var isError: Boolean=false,
|
||||
var errorMessage: String=""
|
||||
)
|
||||
|
||||
class PlacementReubication(
|
||||
var code:String ="",
|
||||
var plate: String = "",
|
||||
var visible: String = "",
|
||||
var idItemShelving:String=""
|
||||
|
||||
)
|
|
@ -85,11 +85,6 @@ class UbicadorFragment(
|
|||
|
||||
private fun setToolBar() {
|
||||
|
||||
/* val listIcons:ArrayList<Drawable> = ArrayList()
|
||||
val iconAdd : Drawable = resources.getDrawable(R.drawable.ic_add_black_24dp,resources.newTheme())
|
||||
val iconReload : Drawable = resources.getDrawable(R.drawable.ic_autorenew_black_24dp,resources.newTheme())
|
||||
listIcons.add(iconAdd)
|
||||
listIcons.add(iconReload)*/
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconAdd = ImageView(context)
|
||||
iconAdd.setImageResource(R.drawable.ic_add_black_24dp)
|
||||
|
@ -198,7 +193,7 @@ class UbicadorFragment(
|
|||
)
|
||||
parking = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(R.string.label) + etiquetas
|
||||
shelvingFk.uppercase() + " "+getString(R.string.pUppercase) + parking + getString(R.string.label) + etiquetas
|
||||
if (mpok != null) mpok!!.start()
|
||||
customDialogInput.dismiss()
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
|
@ -220,7 +215,7 @@ class UbicadorFragment(
|
|||
parking = customDialogInput.getValue()
|
||||
if (binding.mainToolbar.toolbarTitle != null && shelvingFk != null && parking != null && etiquetas != null) {
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(R.string.label) + etiquetas
|
||||
shelvingFk.uppercase() + "*"+getString(R.string.pUppercase) + parking + "*"+getString(R.string.label) + etiquetas
|
||||
} else {
|
||||
binding.mainToolbar.toolbarTitle.text = ""
|
||||
}
|
||||
|
@ -245,7 +240,7 @@ class UbicadorFragment(
|
|||
)
|
||||
shelvingFk = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(R.string.label) + etiquetas
|
||||
shelvingFk.uppercase() + " "+getString(R.string.pUppercase) + parking + " "+getString(R.string.label) + etiquetas
|
||||
if (mpok != null) mpok!!.start()
|
||||
customDialogInput.dismiss()
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
|
@ -265,7 +260,7 @@ class UbicadorFragment(
|
|||
)
|
||||
shelvingFk = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(R.string.label) + etiquetas
|
||||
shelvingFk.uppercase() + " "+getString(R.string.pUppercase) + parking + " "+getString(R.string.label) + etiquetas
|
||||
if (mpok != null) mpok!!.start()
|
||||
customDialogInput.dismiss()
|
||||
return@setOnEditorActionListener true
|
||||
|
@ -330,7 +325,7 @@ class UbicadorFragment(
|
|||
}
|
||||
etiquetas = contEtiquetas.toString()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(R.string.label) + etiquetas
|
||||
shelvingFk.uppercase() + " " +getString(R.string.pUppercase) + parking + " "+getString(R.string.label) + etiquetas
|
||||
if (it.list.size > 0)
|
||||
binding.editPrioridad.setText(it.list[0].priority)
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package es.verdnatura.presentation.view.feature.ubicador.fragment
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
|
@ -334,15 +335,16 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
) {
|
||||
getUbicadorUserCase.itemShelving_return(usuario, password, shelvingFk)
|
||||
.enqueue(object : Callback<List<Reubication>> {
|
||||
override fun onFailure(call: Call<List<Reubication>>, t: Throwable) {
|
||||
.enqueue(object : Callback<ArrayList<Reubication>> {
|
||||
override fun onFailure(call: Call<ArrayList<Reubication>>, t: Throwable) {
|
||||
val listError: ArrayList<Reubication> = ArrayList()
|
||||
listError.add(
|
||||
Reubication(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
t.message!!
|
||||
t.message!!,
|
||||
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -350,8 +352,8 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<Reubication>>,
|
||||
response: Response<List<Reubication>>
|
||||
call: Call<ArrayList<Reubication>>,
|
||||
response: Response<ArrayList<Reubication>>
|
||||
) {
|
||||
if (response.body()==null) {
|
||||
val listError: ArrayList<Reubication> = ArrayList()
|
||||
|
@ -368,7 +370,9 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
|||
} else {
|
||||
|
||||
_reubicationList.value = response.body()?.let { ReubicationList(it) }
|
||||
|
||||
/* for (item in response.body()!!){
|
||||
Log.d("VERDNATURA","El item es "+item.itemFk+":"+item.shelvingFk)
|
||||
}*/
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -58,7 +58,25 @@
|
|||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textinputlayout_two"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:layout_marginTop="@dimen/default_layout_margin">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/custom_dialog_value_two"
|
||||
style="@style/DefaultButton.NormalButton"
|
||||
android:layout_width="match_parent"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:background="@drawable/background_round"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<Button
|
||||
android:id="@+id/custom_dialog_button_ok"
|
||||
style="@style/DefaultButton.NormalButton"
|
||||
|
|
|
@ -0,0 +1,105 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
style="@style/DialogTheme"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/layout_margin_1"
|
||||
app:cardBackgroundColor="@color/verdnatura_black_8"
|
||||
app:cardCornerRadius="@dimen/dialog_radius">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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_3"
|
||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||
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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||
android:textSize="@dimen/body1"
|
||||
android:visibility="gone"
|
||||
tools:text="Este cambio no podrá deshacerse a no ser que vuelvas a vincular el dispositivo"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textinputlayout_username"
|
||||
android:layout_margin="@dimen/layout_margin_min"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/custom_dialog_value"
|
||||
style="@style/DefaultButton.NormalButton"
|
||||
android:layout_width="match_parent"
|
||||
android:inputType="number"
|
||||
android:hint="@string/quantity"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:background="@drawable/background_round"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textinputlayout_two"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_margin="@dimen/layout_margin_min"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/scanShelving"
|
||||
android:visibility="visible"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/custom_dialog_value_two"
|
||||
style="@style/DefaultButton.NormalButton"
|
||||
android:layout_width="match_parent"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:background="@drawable/background_round"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
<Button
|
||||
android:id="@+id/custom_dialog_button_ok"
|
||||
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"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginTop="@dimen/default_layout_margin"
|
||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||
android:visibility="gone"
|
||||
tools:text="@string/cancel"
|
||||
tools:visibility="visible" />
|
||||
</LinearLayout>
|
||||
</androidx.cardview.widget.CardView>
|
|
@ -45,7 +45,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
|
||||
tools:listitem="@layout/item_article_row_fragment" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="8dp"
|
||||
|
||||
tools:listitem="@layout/item_article_row_reubication_fragment" />
|
||||
|
||||
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
|
||||
|
|
|
@ -137,7 +137,7 @@
|
|||
<!--SEMAFORO=================================================-->
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="@dimen/semaforo_width"
|
||||
android:layout_width="@dimen/semaforo_width_to_modify"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -172,7 +172,7 @@
|
|||
android:id="@+id/item_article_itemFk"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.itemFk}"
|
||||
|
@ -191,7 +191,7 @@
|
|||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:maxLines="1"
|
||||
android:paddingTop="2dp"
|
||||
android:text="En balda:"
|
||||
android:text="@string/in_shelve"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
|
@ -218,7 +218,7 @@
|
|||
tool:text="Number" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity_picked"
|
||||
android:id="@+id/item_article_quantity_pickedOld"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
|
@ -226,6 +226,7 @@
|
|||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toStartOf="@+id/txtde"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:text="0" />
|
||||
|
@ -236,18 +237,21 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@string/de"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_article_quantity"
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_article_quantityOld"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity"
|
||||
android:id="@+id/item_article_quantityOld"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_1"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingRight="10dp"
|
||||
android:visibility="gone"
|
||||
|
||||
android:text="@{sale.quantity}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
|
@ -256,11 +260,27 @@
|
|||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:text="10" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_cel2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:paddingLeft="10dp"
|
||||
android:text="@{sale.cel2}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tool:text="5x1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity_line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.line1}"
|
||||
|
@ -275,7 +295,7 @@
|
|||
android:id="@+id/item_article_cel1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_1"
|
||||
|
||||
android:text="@{sale.cel1}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
|
@ -288,7 +308,8 @@
|
|||
android:id="@+id/item_article_quantity_line2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.line2}"
|
||||
|
@ -299,59 +320,86 @@
|
|||
app:layout_constraintTop_toBottomOf="@+id/item_article_quantity_line1"
|
||||
tool:text="información de la linea 2" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_cel2"
|
||||
android:id="@+id/item_article_quantity_picked"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@{sale.pickedQuantity}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body3"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toStartOf="@+id/txtdeNew"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2"
|
||||
tool:text="0" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/txtdeNew"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@string/de"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body3"
|
||||
app:layout_constraintEnd_toStartOf="@+id/item_article_quantity"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_cel2_Old"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_1"
|
||||
android:text="@{sale.cel2}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textSize="@dimen/body3"
|
||||
android:visibility="gone"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line2"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2"
|
||||
tool:text="cel2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity"
|
||||
android:layout_width="wrap_content"
|
||||
android:paddingTop="@dimen/layout_margin_minest"
|
||||
android:paddingBottom="@dimen/layout_margin_minest"
|
||||
android:paddingLeft="@dimen/layout_margin_1"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{sale.quantity}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body3"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line2"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line2"
|
||||
tool:text="100" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_quantity_line3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
android:layout_marginStart="@dimen/layout_margin_min"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_marginEnd="22dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.line3}"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/linearLayout3"
|
||||
app:layout_constraintTop_toBottomOf="@+id/item_article_quantity_line2"
|
||||
tool:text="información de la linea 3" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_color"
|
||||
android:layout_width="15dp"
|
||||
android:layout_height="15dp"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:visibility="gone"
|
||||
android:background="@drawable/background_item_color"
|
||||
app:layout_constraintStart_toEndOf="@+id/item_article_quantity_line3"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/item_article_quantity_line3" />
|
||||
/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_cel3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_1"
|
||||
|
||||
android:text="@{sale.cel3}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintEnd_toEndOf="@+id/content_layout"
|
||||
app:layout_constraintEnd_toEndOf="@+id/item_article_quantity_line3"
|
||||
app:layout_constraintTop_toTopOf="@+id/item_article_quantity_line3"
|
||||
tool:text="cel3" />
|
||||
|
||||
|
@ -365,7 +413,7 @@
|
|||
|
||||
<View
|
||||
android:id="@+id/item_ticketColor"
|
||||
android:layout_width="5dp"
|
||||
android:layout_width="@dimen/semaforo_width"
|
||||
android:layout_height="@dimen/ticketColor_height"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/border" />
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<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"
|
||||
>
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
|
@ -74,7 +74,7 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/layout_margin_min"
|
||||
android:text="@string/Matrícula"
|
||||
android:text="@string/wagoon"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8" />
|
||||
<TextView
|
||||
|
@ -93,6 +93,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/layout_margin_min"
|
||||
android:text="Code"
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8" />
|
||||
|
||||
|
@ -103,6 +104,7 @@
|
|||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textStyle="bold"
|
||||
android:visibility="gone"
|
||||
tool:text="CAL-01"
|
||||
|
||||
/>
|
||||
|
@ -193,7 +195,7 @@
|
|||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:maxLines="1"
|
||||
android:text="@{reubication.itemFk}"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
@ -246,11 +248,10 @@
|
|||
android:id="@+id/item_article_quantity_line1"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{reubication.longName}"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
app:layout_constraintStart_toStartOf="@+id/item_article_itemFk"
|
||||
app:layout_constraintTop_toBottomOf="@+id/item_article_itemFk"
|
||||
|
@ -379,7 +380,7 @@
|
|||
android:layout_height="1dp"
|
||||
android:background="@color/verdnatura_white"></LinearLayout>
|
||||
|
||||
<!-- <androidx.recyclerview.widget.RecyclerView
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/item_article_placements"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -387,7 +388,7 @@
|
|||
android:clipToPadding="false"
|
||||
|
||||
tools:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
tools:listitem="@layout/item_placement_row"
|
||||
tools:orientation="horizontal" />-->
|
||||
tools:listitem="@layout/item_placement_reubication_row"
|
||||
tools:orientation="horizontal" />
|
||||
</LinearLayout>
|
||||
</layout>
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tool="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="es.verdnatura.presentation.view.feature.reubication.model.PlacementReubication" />
|
||||
</data>
|
||||
<LinearLayout
|
||||
android:id="@+id/item_root_layout"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/layout_margin_1"
|
||||
android:gravity="center"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:background="@color/verdnatura_background_item_picker">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.code}"
|
||||
tool:text="053-05"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/h7"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.plate}"
|
||||
tool:text="XXX"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textStyle="bold"
|
||||
android:textSize="@dimen/h8"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.visible}"
|
||||
tool:text="260"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h8"
|
||||
android:layout_marginStart="@dimen/layout_margin_min"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="28-05"
|
||||
tool:text="28/05 "
|
||||
android:visibility="gone"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h8"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.visible}"
|
||||
android:visibility="gone"
|
||||
tool:text="260"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h8"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
|
@ -445,4 +445,8 @@
|
|||
<string name="titleReUbicator">Reubicación</string>
|
||||
<string name="errorReubication">No aparecen item para el carro escaneado</string>
|
||||
<string name="leaveItem">Dejar item</string>
|
||||
<string name="toReubication">Reubicación</string>
|
||||
<string name="quantity">Cantidad</string>
|
||||
<string name="scanPlateToLeave">Escanea la matrícula donde quieres dejar el item :</string>
|
||||
<string name="in_shelve">En balda:</string>
|
||||
</resources>
|
||||
|
|
|
@ -2,9 +2,13 @@
|
|||
<resources>
|
||||
|
||||
<!--Vertical margin-->
|
||||
|
||||
<dimen name="layout_margin_min_to_modify">2dp</dimen>
|
||||
<dimen name="layout_margin_minest">1dp</dimen>
|
||||
<dimen name="layout_margin_min">4dp</dimen>
|
||||
<dimen name="layout_margin_1">8dp</dimen>
|
||||
<dimen name="default_layout_margin">16dp</dimen>
|
||||
<dimen name="layout_end_ticket_color">20dp</dimen>
|
||||
<dimen name="layout_margin_3">32dp</dimen>
|
||||
<dimen name="layout_margin_4">40dp</dimen>
|
||||
<dimen name="layout_margin_5">48dp</dimen>
|
||||
|
@ -38,6 +42,7 @@
|
|||
|
||||
<dimen name="body1">16sp</dimen>
|
||||
<dimen name="body2">14sp</dimen>
|
||||
<dimen name="body3">15sp</dimen>
|
||||
|
||||
<dimen name="button">14sp</dimen>
|
||||
<dimen name="caption">12sp</dimen>
|
||||
|
@ -83,6 +88,7 @@
|
|||
|
||||
<!-- Sacadores -->
|
||||
<dimen name="semaforo_width">20dp</dimen>
|
||||
<dimen name="semaforo_width_to_modify">15dp</dimen>
|
||||
<dimen name="semaforo_height">30dp</dimen>
|
||||
|
||||
<!-- Pintar ticket -->
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<string name="Origen">Origin</string>
|
||||
<string name="Tamaño">Size</string>
|
||||
<string name="Matrícula">Registration number</string>
|
||||
<string name="toReubication">Reubication</string>
|
||||
<string name="Visible">Visible</string>
|
||||
<string name="Destino">Destination</string>
|
||||
<string name="Nicho">Niche</string>
|
||||
|
@ -262,6 +263,7 @@
|
|||
<string name="pUppercase"> P: </string>
|
||||
<string name="itemSearch">Consult item</string>
|
||||
<string name="quantityReal">Real quantity (</string>
|
||||
<string name="quantity">Quantity</string>
|
||||
<string name="pull">Throw</string>
|
||||
<string name="titleItemSearch">Search item</string>
|
||||
<string name="titleHistorical">Historical</string>
|
||||
|
@ -444,6 +446,8 @@
|
|||
<string name="title">title</string>
|
||||
<string name="errorReubication">There are not items for scanned wagoon</string>
|
||||
<string name="leaveItem">Dejar item</string>
|
||||
<string name="scanPlateToLeave">Scan the plate where you want to leave the item :</string>
|
||||
<string name="in_shelve">In shelve:</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue