refs #5135: refactor animation
This commit is contained in:
parent
e29ba01e51
commit
f950dd0bd7
|
@ -71,14 +71,20 @@ class MobileApplication : Application(), InteceptorListener {
|
||||||
if (bool) mpok!!.start() else mperror!!.start()
|
if (bool) mpok!!.start() else mperror!!.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun messageToast(isError: Boolean, message:String) {
|
fun messageToast(isError: Boolean, message: String) {
|
||||||
val playSound = when (isError) {
|
val playSound = when (isError) {
|
||||||
null -> null
|
null -> null
|
||||||
false -> mpok
|
false -> mpok
|
||||||
true -> mperror
|
true -> mperror
|
||||||
}
|
}
|
||||||
playSound?.start()
|
playSound?.start()
|
||||||
message.toast(this,color = Color.RED)
|
message.toast(
|
||||||
|
this, color = if (isError) {
|
||||||
|
Color.RED
|
||||||
|
} else {
|
||||||
|
Color.BLUE
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onInterceptionResult(visibility: Int) {
|
override fun onInterceptionResult(visibility: Int) {
|
||||||
|
|
|
@ -238,11 +238,8 @@ class ItemCardFragment(
|
||||||
|
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
response.observe(viewLifecycleOwner, Observer {
|
||||||
binding.splashProgress.visibility = GONE
|
binding.splashProgress.visibility = GONE
|
||||||
if (it.isError) {
|
getItemCard(itemInfoG!!.id.toString())
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
|
||||||
} else {
|
|
||||||
getItemCard(itemInfoG!!.id.toString())
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
addressLosesList.observe(viewLifecycleOwner, Observer {
|
addressLosesList.observe(viewLifecycleOwner, Observer {
|
||||||
|
@ -565,12 +562,11 @@ class ItemCardFragment(
|
||||||
//Tarea 5652 , quitar código cuando está asignada tarea
|
//Tarea 5652 , quitar código cuando está asignada tarea
|
||||||
val test = true
|
val test = true
|
||||||
if (test) {
|
if (test) {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
// binding.splashProgress.visibility = View.VISIBLE
|
||||||
viewModel.getAddress()
|
viewModel.getAddress()
|
||||||
quantityToDiscard = value
|
quantityToDiscard = value
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
println("dardebaja")
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (itemB.action == "itemStockUpdateRemove") {
|
if (itemB.action == "itemStockUpdateRemove") {
|
||||||
|
@ -686,6 +682,7 @@ class ItemCardFragment(
|
||||||
i += 1
|
i += 1
|
||||||
}
|
}
|
||||||
listBarcodes.removeAt(posDelete)
|
listBarcodes.removeAt(posDelete)
|
||||||
|
|
||||||
viewModel.barcodesEdit(
|
viewModel.barcodesEdit(
|
||||||
itemFk = itemInfoG!!.id,
|
itemFk = itemInfoG!!.id,
|
||||||
value = code,
|
value = code,
|
||||||
|
|
|
@ -9,9 +9,9 @@ import es.verdnatura.domain.formatWithQuotes
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||||
import es.verdnatura.presentation.base.nameofFunction
|
import es.verdnatura.presentation.base.nameofFunction
|
||||||
|
import es.verdnatura.presentation.common.ItemBarCodeSalix
|
||||||
import es.verdnatura.presentation.common.ItemDiscardSalixShortage
|
import es.verdnatura.presentation.common.ItemDiscardSalixShortage
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.common.itemBarCodeSalix
|
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.AddressLoses
|
import es.verdnatura.presentation.view.feature.articulo.model.AddressLoses
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.AddressLosesList
|
import es.verdnatura.presentation.view.feature.articulo.model.AddressLosesList
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
|
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
|
||||||
|
@ -50,8 +50,10 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
||||||
itemFk: Number,
|
itemFk: Number,
|
||||||
warehouseFk: Int,
|
warehouseFk: Int,
|
||||||
) {
|
) {
|
||||||
silex.getItemCard(itemFk, warehouseFk)
|
//Tarea 6276
|
||||||
.enqueue(object : SilexCallback<ItemCardVO>(context) {
|
// salix.getCard(itemFk = itemFk, warehouseFk = warehouseFk)
|
||||||
|
silex.getItemCard(itemFk, warehouseFk)
|
||||||
|
.enqueue(object : SalixCallback<ItemCardVO>(context) {
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
_itemcard.value = ItemCardVO(
|
_itemcard.value = ItemCardVO(
|
||||||
0,
|
0,
|
||||||
|
@ -170,13 +172,6 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
||||||
ResponseItemVO(isError = false, response = response.message())
|
ResponseItemVO(isError = false, response = response.message())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
super.onError(t)
|
|
||||||
_response.value = ResponseItemVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -193,13 +188,6 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
||||||
ResponseItemVO(isError = false, response = response.message())
|
ResponseItemVO(isError = false, response = response.message())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
_response.value = ResponseItemVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -226,12 +214,6 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
||||||
) {
|
) {
|
||||||
salix.updateItem(itemFk, hashMapOf("stems" to value))
|
salix.updateItem(itemFk, hashMapOf("stems" to value))
|
||||||
.enqueue(object : SalixCallback<Any>(context) {
|
.enqueue(object : SalixCallback<Any>(context) {
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
_response.value = ResponseItemVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSuccess(response: Response<Any>) {
|
override fun onSuccess(response: Response<Any>) {
|
||||||
_response.value =
|
_response.value =
|
||||||
|
@ -246,12 +228,6 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
||||||
) {
|
) {
|
||||||
salix.updateItem(itemFk, hashMapOf("comment" to value))
|
salix.updateItem(itemFk, hashMapOf("comment" to value))
|
||||||
.enqueue(object : SalixCallback<Any>(context) {
|
.enqueue(object : SalixCallback<Any>(context) {
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
_response.value = ResponseItemVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSuccess(response: Response<Any>) {
|
override fun onSuccess(response: Response<Any>) {
|
||||||
_response.value = ResponseItemVO(isError = false)
|
_response.value = ResponseItemVO(isError = false)
|
||||||
|
@ -263,8 +239,9 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
||||||
itemFk: Int,
|
itemFk: Int,
|
||||||
value: String,
|
value: String,
|
||||||
delete: Boolean
|
delete: Boolean
|
||||||
) {//Tarea 5134 cambiar Silex para obtener el id y así poder hacer un DELETE y un PATCH
|
) {
|
||||||
// salix.barcodes_edit(idBarcode:Int, )
|
//Tarea 6276
|
||||||
|
//salix.barcodesDelete(itemFk = itemFk, barcode = value)
|
||||||
silex.barcodes_edit(value, itemFk, delete)
|
silex.barcodes_edit(value, itemFk, delete)
|
||||||
.enqueue(object : SilexCallback<Any>(context) {
|
.enqueue(object : SilexCallback<Any>(context) {
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
|
@ -288,7 +265,7 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
||||||
|
|
||||||
fun barcodesEditSalix(itemFk: Int, barCodeValue: String) {
|
fun barcodesEditSalix(itemFk: Int, barCodeValue: String) {
|
||||||
salix.barcodes_edit(
|
salix.barcodes_edit(
|
||||||
itemBarCodeSalix(itemFk, barCodeValue)
|
ItemBarCodeSalix(itemFk, barCodeValue)
|
||||||
)
|
)
|
||||||
.enqueue(object : SilexCallback<Any>(context) {
|
.enqueue(object : SilexCallback<Any>(context) {
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
|
@ -340,29 +317,9 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
|
||||||
|
|
||||||
fun getAddress() {
|
fun getAddress() {
|
||||||
salix.getAddressSalix("""{ "include": [ { "relation": "address", "scope": { "fields": { "nickname": true } } } ] }""")
|
salix.getAddressSalix("""{ "include": [ { "relation": "address", "scope": { "fields": { "nickname": true } } } ] }""")
|
||||||
.enqueue(object : SilexCallback<List<AddressLoses>>(context) {
|
.enqueue(object : SalixCallback<List<AddressLoses>>(context) {
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
val listError: ArrayList<AddressLoses> = ArrayList()
|
|
||||||
listError.add(AddressLoses(isError = true, errorMessage = t.message!!))
|
|
||||||
_addressLosesList.value = AddressLosesList(listError)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSuccess(response: Response<List<AddressLoses>>) {
|
override fun onSuccess(response: Response<List<AddressLoses>>) {
|
||||||
if (response.body() != null) {
|
_addressLosesList.value = response.body()?.let { AddressLosesList(it) }
|
||||||
_addressLosesList.value = response.body()?.let { AddressLosesList(it) }
|
|
||||||
} else {
|
|
||||||
val listError: ArrayList<AddressLoses> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
AddressLoses(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
response.message()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_addressLosesList.value = AddressLosesList(listError)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package es.verdnatura.presentation.view.feature.diadeventa.adapter
|
package es.verdnatura.presentation.view.feature.diadeventa.adapter
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
|
@ -30,6 +32,7 @@ class DayOfSaleAdapter(
|
||||||
|
|
||||||
override fun getItemCount() = items.size
|
override fun getItemCount() = items.size
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||||
holder.bind(items[position])
|
holder.bind(items[position])
|
||||||
}
|
}
|
||||||
|
@ -38,6 +41,7 @@ class DayOfSaleAdapter(
|
||||||
val binding: ItemShelvingdayofsaleRowBinding
|
val binding: ItemShelvingdayofsaleRowBinding
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
private val res = binding.root.context.resources
|
private val res = binding.root.context.resources
|
||||||
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
fun bind(item: ItemShelvingSaleDate) {
|
fun bind(item: ItemShelvingSaleDate) {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
this.item = item
|
this.item = item
|
||||||
|
|
|
@ -3,10 +3,8 @@ package es.verdnatura.presentation.view.feature.diadeventa.fragment
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.view.View
|
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.lifecycle.Observer
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentItemdayofsaleCardBinding
|
import es.verdnatura.databinding.FragmentItemdayofsaleCardBinding
|
||||||
|
@ -61,7 +59,6 @@ class DayOfSaleFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
listIcons.add(iconParking)
|
listIcons.add(iconParking)
|
||||||
|
|
||||||
binding.mainToolbar.toolbarIcons.adapter =
|
binding.mainToolbar.toolbarIcons.adapter =
|
||||||
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
|
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
|
||||||
override fun onOptionsItemSelected(item: Drawable) {
|
override fun onOptionsItemSelected(item: Drawable) {
|
||||||
|
@ -83,8 +80,9 @@ class DayOfSaleFragment(
|
||||||
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
|
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
if (!binding.scanInput.text.toString().isNullOrEmpty()) {
|
if (!binding.scanInput.text.toString().isNullOrEmpty()) {
|
||||||
getItemsSaleDate(binding.scanInput.text.toString())
|
viewModel.itemShelvingGetSaleDate(binding.scanInput.text.toString())
|
||||||
itemScan = binding.scanInput.text.toString()
|
binding.mainToolbar.toolbarTitle.text =
|
||||||
|
entryPoint + ":" + binding.scanInput.text.toString().uppercase()
|
||||||
}
|
}
|
||||||
binding.scanInput.setText("")
|
binding.scanInput.setText("")
|
||||||
ma.hideKeyboard(binding.scanInput)
|
ma.hideKeyboard(binding.scanInput)
|
||||||
|
@ -93,24 +91,24 @@ class DayOfSaleFragment(
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
requireActivity().onBackPressed()
|
requireActivity().onBackPressed()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getItemsSaleDate(vShelvingFK: String) {
|
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
viewModel.itemShelvingGetSaleDate(vShelvingFK)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun observeViewModel() {
|
override fun observeViewModel() {
|
||||||
with(viewModel) {
|
with(viewModel) {
|
||||||
|
|
||||||
itemShelvingSaleDateList.observe(viewLifecycleOwner, Observer {
|
itemShelvingSaleDateList.observe(viewLifecycleOwner) {
|
||||||
binding.splashProgress.visibility = View.GONE
|
if (it.list.isEmpty()) {
|
||||||
|
customDialog.setTitle(getString(R.string.noResults))
|
||||||
|
.setDescription(getString(R.string.wagoonNoSaleToday))
|
||||||
|
.setOkButton(getString(R.string.close)) {
|
||||||
|
customDialog.dismiss()
|
||||||
|
}.show()
|
||||||
|
|
||||||
|
}
|
||||||
adapter = DayOfSaleAdapter(
|
adapter = DayOfSaleAdapter(
|
||||||
it.list,
|
it.list,
|
||||||
onPasillerosItemClickListener = pasillerosItemClickListener!!
|
onPasillerosItemClickListener = pasillerosItemClickListener!!
|
||||||
|
@ -119,33 +117,13 @@ class DayOfSaleFragment(
|
||||||
binding.itemexpeditionstateRecyclerview.layoutManager =
|
binding.itemexpeditionstateRecyclerview.layoutManager =
|
||||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
|
|
||||||
if (it.list.isEmpty()) {
|
}
|
||||||
customDialog.setTitle(getString(R.string.noResults))
|
|
||||||
.setDescription(getString(R.string.wagoonNoSaleToday))
|
|
||||||
.setOkButton(getString(R.string.close)) {
|
|
||||||
customDialog.dismiss()
|
|
||||||
}.show()
|
|
||||||
} else {
|
|
||||||
|
|
||||||
if (it.list.get(0).isError) {
|
response.observe(viewLifecycleOwner) {
|
||||||
ma.messageWithSound(
|
|
||||||
it.list.get(0).errorMessage,
|
|
||||||
it.list.get(0).isError,
|
|
||||||
isPlayed = false
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
|
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
customDialog.setTitle(getString(R.string.info))
|
customDialog.setTitle(getString(R.string.info))
|
||||||
.setDescription(getString(R.string.parkingOk))
|
.setDescription(getString(R.string.parkingOk))
|
||||||
.setOkButton(getString(R.string.close)) {
|
.setOkButton(getString(R.string.close)) {
|
||||||
|
@ -154,7 +132,7 @@ class DayOfSaleFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -169,14 +147,16 @@ class DayOfSaleFragment(
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
|
|
||||||
|
|
||||||
customDialogList.getEditText().requestFocus()
|
customDialogList.getEditText().requestFocus()
|
||||||
ma.hideKeyboard(customDialogList.getEditText())
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
|
||||||
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
if (customDialogList.getValue().isNotEmpty()) {
|
if (customDialogList.getValue().isNotEmpty()) {
|
||||||
parking(customDialogList.getValue())
|
viewModel.setParking(
|
||||||
|
parking = customDialogList.getValue(),
|
||||||
|
scanItem = itemScan
|
||||||
|
)
|
||||||
|
customDialogList.dismiss()
|
||||||
}
|
}
|
||||||
customDialogList.setValue("")
|
customDialogList.setValue("")
|
||||||
ma.hideKeyboard(customDialogList.getEditText())
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
@ -187,14 +167,6 @@ class DayOfSaleFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun parking(parking: String) {
|
|
||||||
viewModel.setParking(
|
|
||||||
parking = parking,
|
|
||||||
scanItem = itemScan
|
|
||||||
)
|
|
||||||
customDialogList.dismiss()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@ import es.verdnatura.presentation.common.Event
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDate
|
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDate
|
||||||
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDateList
|
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDateList
|
||||||
import retrofit2.Call
|
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
|
|
||||||
class DayOfSaleViewModel(val context: Context) : BaseViewModel(context) {
|
class DayOfSaleViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
|
@ -77,31 +76,10 @@ class DayOfSaleViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/* fun getListFromJSON(json: JsonObject): MutableList<itemsExpeditionDynamics> {
|
|
||||||
val gson = Gson()
|
|
||||||
var list = mutableListOf<itemsExpeditionDynamics>()
|
|
||||||
var expeditionState: Map<String, Any> = gson.fromJson(json, object : TypeToken<Map<String, Any>>() {}.type)
|
|
||||||
expeditionState.forEach {
|
|
||||||
list.add(itemsExpeditionDynamics(key=it.key,value=it.value.toString()))
|
|
||||||
}
|
|
||||||
return list
|
|
||||||
}*/
|
|
||||||
|
|
||||||
fun setParking(scanItem: String, parking: String) {
|
fun setParking(scanItem: String, parking: String) {
|
||||||
|
|
||||||
salix.setParking(arrayListOf(scanItem, parking).formatWithQuotes())
|
salix.setParking(arrayListOf(scanItem, parking).formatWithQuotes())
|
||||||
.enqueue(object :
|
.enqueue(object :
|
||||||
SalixCallback<Any>(context) {
|
SalixCallback<Any>(context) {
|
||||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
|
||||||
_response.value = ResponseItemVO(isError = false, response = response.message())
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
_response.value = ResponseItemVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package es.verdnatura.presentation.view.feature.historicoshelving.fragment
|
package es.verdnatura.presentation.view.feature.historicoshelving.fragment
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.View
|
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import androidx.lifecycle.Observer
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentItemshelvinglogBinding
|
import es.verdnatura.databinding.FragmentItemshelvinglogBinding
|
||||||
|
@ -32,8 +30,6 @@ class ItemShelvingLogFragment(
|
||||||
override fun init() {
|
override fun init() {
|
||||||
|
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
// customDialogList = CustomDialogList(requireContext())
|
|
||||||
|
|
||||||
setEvents()
|
setEvents()
|
||||||
setToolBar(getString(R.string.itemShelvingLog))
|
setToolBar(getString(R.string.itemShelvingLog))
|
||||||
super.init()
|
super.init()
|
||||||
|
@ -54,7 +50,6 @@ class ItemShelvingLogFragment(
|
||||||
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
|
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
if (binding.scanInput.text.toString().isNotEmpty()) {
|
if (binding.scanInput.text.toString().isNotEmpty()) {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
viewModel.itemShelvingLogGet(binding.scanInput.text.toString())
|
viewModel.itemShelvingLogGet(binding.scanInput.text.toString())
|
||||||
itemScan = binding.scanInput.text.toString()
|
itemScan = binding.scanInput.text.toString()
|
||||||
}
|
}
|
||||||
|
@ -64,7 +59,6 @@ class ItemShelvingLogFragment(
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
requireActivity().onBackPressed()
|
requireActivity().onBackPressed()
|
||||||
}
|
}
|
||||||
|
@ -73,16 +67,7 @@ class ItemShelvingLogFragment(
|
||||||
|
|
||||||
override fun observeViewModel() {
|
override fun observeViewModel() {
|
||||||
with(viewModel) {
|
with(viewModel) {
|
||||||
itemShelvingLogList.observe(viewLifecycleOwner, Observer {
|
itemShelvingLogList.observe(viewLifecycleOwner) {
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
adapter = ItemShelvingLogAdapter(
|
|
||||||
it.list,
|
|
||||||
onPasillerosItemClickListener = pasillerosItemClickListener!!
|
|
||||||
)
|
|
||||||
binding.itemshelvinglogRecyclerview.adapter = adapter
|
|
||||||
binding.itemshelvinglogRecyclerview.layoutManager =
|
|
||||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
|
||||||
setToolBar(getString(R.string.itemShelvingLog) + ":" + itemScan)
|
|
||||||
|
|
||||||
if (it.list.isEmpty()) {
|
if (it.list.isEmpty()) {
|
||||||
customDialog.setTitle(getString(R.string.noResults))
|
customDialog.setTitle(getString(R.string.noResults))
|
||||||
|
@ -91,17 +76,16 @@ class ItemShelvingLogFragment(
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
} else {
|
} else {
|
||||||
|
adapter = ItemShelvingLogAdapter(
|
||||||
if (it.list.get(0).isError) {
|
it.list,
|
||||||
customDialog.setTitle(getString(R.string.error))
|
onPasillerosItemClickListener = pasillerosItemClickListener!!
|
||||||
.setDescription(it.list.get(0).errorMessage)
|
)
|
||||||
.setOkButton(getString(R.string.close)) {
|
binding.itemshelvinglogRecyclerview.adapter = adapter
|
||||||
customDialog.dismiss()
|
binding.itemshelvinglogRecyclerview.layoutManager =
|
||||||
}.show()
|
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
}
|
setToolBar(getString(R.string.itemShelvingLog) + ":" + itemScan)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,11 +4,9 @@ import android.content.Context
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.Transformations
|
import androidx.lifecycle.Transformations
|
||||||
import es.verdnatura.domain.SilexCallback
|
import es.verdnatura.domain.SalixCallback
|
||||||
import es.verdnatura.domain.formatWithQuotes
|
import es.verdnatura.domain.formatWithQuotes
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
|
||||||
import es.verdnatura.presentation.base.nameofFunction
|
|
||||||
import es.verdnatura.presentation.common.Event
|
import es.verdnatura.presentation.common.Event
|
||||||
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLog
|
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLog
|
||||||
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLogList
|
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLogList
|
||||||
|
@ -27,30 +25,13 @@ class ItemShelvingLogViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
//silex.itemShelvingLog_get(vShelvingFK)
|
//silex.itemShelvingLog_get(vShelvingFK)
|
||||||
salix.itemShelvingLogGet(params = listOf(vShelvingFK).formatWithQuotes())
|
salix.itemShelvingLogGet(params = listOf(vShelvingFK).formatWithQuotes())
|
||||||
.enqueue(object :
|
.enqueue(object :
|
||||||
SilexCallback<List<ItemShelvingLog>>(context) {
|
SalixCallback<List<ItemShelvingLog>>(context) {
|
||||||
override fun onSuccess(response: Response<List<ItemShelvingLog>>) {
|
override fun onSuccess(response: Response<List<ItemShelvingLog>>) {
|
||||||
if (response.body() != null) {
|
_itemShelvingLogList.value = response.body()?.let {
|
||||||
_itemShelvingLogList.value = response.body()?.let {
|
ItemShelvingLogList(it)
|
||||||
ItemShelvingLogList(it)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
val listError: ArrayList<ItemShelvingLog> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
ItemShelvingLog(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
t.message!!
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_itemShelvingLogList.value = ItemShelvingLogList(listError)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ class ItemShelvingLog(
|
||||||
var created: String = ""
|
var created: String = ""
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
get(){
|
get(){
|
||||||
return field.isoToString(returnOnlyDate = true)
|
return field.isoToString(returnOnlyDate = false)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package es.verdnatura.presentation.view.feature.historicovehiculo.fragment
|
package es.verdnatura.presentation.view.feature.historicovehiculo.fragment
|
||||||
|
|
||||||
|
import android.os.Build
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
|
@ -14,7 +16,7 @@ import java.util.Date
|
||||||
|
|
||||||
|
|
||||||
class HistoricoVehiculoFragment(
|
class HistoricoVehiculoFragment(
|
||||||
var numberPlate: String = ""
|
private var numberPlate: String = ""
|
||||||
) : BaseFragment<FragmentHistoricovehiculoBinding, HistoricoVehiculoViewModel>(
|
) : BaseFragment<FragmentHistoricovehiculoBinding, HistoricoVehiculoViewModel>(
|
||||||
HistoricoVehiculoViewModel::class
|
HistoricoVehiculoViewModel::class
|
||||||
) {
|
) {
|
||||||
|
@ -37,39 +39,30 @@ class HistoricoVehiculoFragment(
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun setEvents() {
|
private fun setEvents() {
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
requireActivity().onBackPressed()
|
requireActivity().onBackPressed()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
override fun observeViewModel() {
|
override fun observeViewModel() {
|
||||||
with(viewModel) {
|
with(viewModel) {
|
||||||
loadHistoricoVehiculoList.observe(viewLifecycleOwner, Observer { event ->
|
loadHistoricoVehiculoList.observe(viewLifecycleOwner, Observer { event ->
|
||||||
event.getContentIfNotHandled().notNull {
|
event.getContentIfNotHandled().notNull {
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
adapter = HistoricoVehiculoAdapter(it.list)
|
|
||||||
binding.historicovehiculoRecyclerview.adapter = adapter
|
|
||||||
binding.historicovehiculoRecyclerview.layoutManager =
|
|
||||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
|
||||||
navigateToToday(it)
|
|
||||||
|
|
||||||
if (it.list.isEmpty()) {
|
if (it.list.isEmpty()) {
|
||||||
ma.messageWithSound(
|
ma.messageWithSound(
|
||||||
getString(R.string.lookWithpermission), true, true, getString(
|
getString(R.string.lookWithpermission), isError = true, isPlayed = true, getString(
|
||||||
R.string.info
|
R.string.info
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
if (it.list[0].isError) {
|
adapter = HistoricoVehiculoAdapter(it.list)
|
||||||
ma.messageWithSound(
|
binding.historicovehiculoRecyclerview.adapter = adapter
|
||||||
it.list[0].errorMessage, true, true, getString(
|
binding.historicovehiculoRecyclerview.layoutManager =
|
||||||
R.string.info
|
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
)
|
navigateToToday(it)
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -77,6 +70,7 @@ class HistoricoVehiculoFragment(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
private fun navigateToToday(it: ItemHistoricoVehiculoList) {
|
private fun navigateToToday(it: ItemHistoricoVehiculoList) {
|
||||||
var positionToday = 0
|
var positionToday = 0
|
||||||
val sdf = SimpleDateFormat(getString(R.string.dateFormat))
|
val sdf = SimpleDateFormat(getString(R.string.dateFormat))
|
||||||
|
|
|
@ -6,8 +6,6 @@ import androidx.lifecycle.Transformations
|
||||||
import es.verdnatura.domain.SalixCallback
|
import es.verdnatura.domain.SalixCallback
|
||||||
import es.verdnatura.domain.formatWithQuotes
|
import es.verdnatura.domain.formatWithQuotes
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
|
||||||
import es.verdnatura.presentation.base.nameofFunction
|
|
||||||
import es.verdnatura.presentation.common.Event
|
import es.verdnatura.presentation.common.Event
|
||||||
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
|
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
|
||||||
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculoList
|
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculoList
|
||||||
|
@ -29,19 +27,6 @@ class HistoricoVehiculoViewModel(var context: Context) : BaseViewModel(context)
|
||||||
response.body()?.let { ItemHistoricoVehiculoList(it) }
|
response.body()?.let { ItemHistoricoVehiculoList(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
val listError: ArrayList<ItemHistoricoVehiculo> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
ItemHistoricoVehiculo(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
t.message!!
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_historicovehiculoList.value = ItemHistoricoVehiculoList(listError)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,10 @@ import android.graphics.drawable.Drawable
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.lifecycle.Observer
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentInventaryBinding
|
import es.verdnatura.databinding.FragmentInventaryBinding
|
||||||
|
import es.verdnatura.domain.toast
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.OnInvetoryNichoClickListener
|
import es.verdnatura.presentation.common.OnInvetoryNichoClickListener
|
||||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
|
@ -53,17 +53,13 @@ class InventaryFragment :
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
|
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
viewModel.itemShelvingBuyerGet()
|
viewModel.itemShelvingBuyerGet()
|
||||||
|
|
||||||
binding.filterBuyer.text = getData(BUYER)
|
binding.filterBuyer.text = getData(BUYER)
|
||||||
buyerId = getData(BUYERID)
|
buyerId = getData(BUYERID)
|
||||||
if (!buyerId.isBlank()) {
|
if (buyerId.isNotBlank()) {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
viewModel.getInventory(buyerId.toInt(), getDataInt(WAREHOUSEFK))
|
viewModel.getInventory(buyerId.toInt(), getDataInt(WAREHOUSEFK))
|
||||||
}
|
}
|
||||||
binding.filterBuyer.setOnClickListener {
|
binding.filterBuyer.setOnClickListener {
|
||||||
//SimpleSearchDialogCompat(context,getString(R.string.compradores),getString(R.string.escribirparteNombre),null,initData(),
|
|
||||||
SimpleSearchDialogCompat(context,
|
SimpleSearchDialogCompat(context,
|
||||||
getString(R.string.compradores),
|
getString(R.string.compradores),
|
||||||
getString(R.string.escribirparteNombre),
|
getString(R.string.escribirparteNombre),
|
||||||
|
@ -73,27 +69,22 @@ class InventaryFragment :
|
||||||
|
|
||||||
binding.filterBuyer.text = (nombre.title)
|
binding.filterBuyer.text = (nombre.title)
|
||||||
buyerId = nombre.getBuyerId()
|
buyerId = nombre.getBuyerId()
|
||||||
saveBuyer(nombre.getBuyerNickname(),nombre.getBuyerId())
|
saveBuyer(nombre.getBuyerNickname(), nombre.getBuyerId())
|
||||||
viewModel.getInventory(
|
viewModel.getInventory(
|
||||||
nombre.getBuyerId().toInt(),
|
nombre.getBuyerId().toInt(),
|
||||||
getDataInt(WAREHOUSEFK)
|
getDataInt(WAREHOUSEFK)
|
||||||
)
|
)
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
baseSearchDialogCompat.dismiss()
|
baseSearchDialogCompat.dismiss()
|
||||||
}).show()
|
}).show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
customDialogInput = CustomDialogInput(requireContext())
|
customDialogInput = CustomDialogInput(requireContext())
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.itemShelvingRadar)
|
binding.mainToolbar.toolbarTitle.text = getString(R.string.itemShelvingRadar)
|
||||||
setToolBar()
|
setToolBar()
|
||||||
setEvents()
|
setEvents()
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun setToolBar() {
|
private fun setToolBar() {
|
||||||
ma.hideBottomNavigation(View.GONE)
|
ma.hideBottomNavigation(View.GONE)
|
||||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||||
|
@ -115,7 +106,6 @@ class InventaryFragment :
|
||||||
buyerId.toInt(),
|
buyerId.toInt(),
|
||||||
getDataInt(WAREHOUSEFK)
|
getDataInt(WAREHOUSEFK)
|
||||||
)
|
)
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
} else {
|
} else {
|
||||||
ma.messageWithSound(
|
ma.messageWithSound(
|
||||||
getString(R.string.selectBuyer),
|
getString(R.string.selectBuyer),
|
||||||
|
@ -125,7 +115,6 @@ class InventaryFragment :
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -161,7 +150,7 @@ class InventaryFragment :
|
||||||
) || it.producer?.contains(
|
) || it.producer?.contains(
|
||||||
binding.filterItemFk.text.toString(),
|
binding.filterItemFk.text.toString(),
|
||||||
true
|
true
|
||||||
)== true || it.longName?.contains(
|
) == true || it.longName?.contains(
|
||||||
binding.filterItemFk.text.toString(),
|
binding.filterItemFk.text.toString(),
|
||||||
ignoreCase = true
|
ignoreCase = true
|
||||||
) == true
|
) == true
|
||||||
|
@ -189,13 +178,11 @@ class InventaryFragment :
|
||||||
|
|
||||||
override fun observeViewModel() {
|
override fun observeViewModel() {
|
||||||
with(viewModel) {
|
with(viewModel) {
|
||||||
buyersList.observe(viewLifecycleOwner, Observer {
|
buyersList.observe(viewLifecycleOwner) {
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
createBuyerList(it.list)
|
createBuyerList(it.list)
|
||||||
})
|
}
|
||||||
|
|
||||||
inventaryList.observe(viewLifecycleOwner, Observer {
|
inventaryList.observe(viewLifecycleOwner) { it ->
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
listInvetory = ArrayList()
|
listInvetory = ArrayList()
|
||||||
listInvetoryAux = ArrayList()
|
listInvetoryAux = ArrayList()
|
||||||
it.list.forEach {
|
it.list.forEach {
|
||||||
|
@ -204,14 +191,11 @@ class InventaryFragment :
|
||||||
listInvetoryAux.add(it)
|
listInvetoryAux.add(it)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
adapter = InventoryAdapter(listInvetory, object : OnInvetoryNichoClickListener {
|
adapter = InventoryAdapter(listInvetory, object : OnInvetoryNichoClickListener {
|
||||||
override fun onInvetoryNichoClickListener(item: ItemInventaryVO) {
|
override fun onInvetoryNichoClickListener(item: ItemInventaryVO) {
|
||||||
|
|
||||||
customDialog.setTitle(item.itemFk.toString() + "\n" + item.longName)
|
customDialog.setTitle(item.itemFk.toString() + "\n" + item.longName)
|
||||||
.setDescription(getString(R.string.quantityReal) + item.nicho + ")")
|
.setDescription(getString(R.string.quantityReal) + item.nicho + ")")
|
||||||
.setOkButton(getString(R.string.pull)) {
|
.setOkButton(getString(R.string.pull)) {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
viewModel.itemTrash(
|
viewModel.itemTrash(
|
||||||
item.itemFk!!.toInt(),
|
item.itemFk!!.toInt(),
|
||||||
getDataInt(WAREHOUSEFK),
|
getDataInt(WAREHOUSEFK),
|
||||||
|
@ -238,48 +222,33 @@ class InventaryFragment :
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
}
|
||||||
|
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
response.observe(viewLifecycleOwner) {
|
||||||
binding.splashProgress.visibility = View.GONE
|
changeOfflineValue(itemClicked)
|
||||||
if (it.isError) {
|
}
|
||||||
ma.messageWithSound(it.errorMessage, true, true)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
changeOfflineValue(itemClicked)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@SuppressLint("NotifyDataSetChanged")
|
@SuppressLint("NotifyDataSetChanged")
|
||||||
private fun changeOfflineValue(item: ItemInventaryVO) {
|
private fun changeOfflineValue(item: ItemInventaryVO) {
|
||||||
try {
|
try {
|
||||||
listInvetory.removeAt(listInvetory.indexOf(item))
|
listInvetory.removeAt(listInvetory.indexOf(item))
|
||||||
listInvetoryAux.removeAt(listInvetoryAux.indexOf(item))
|
listInvetoryAux.removeAt(listInvetoryAux.indexOf(item))
|
||||||
} catch (excep: Exception) {
|
} catch (ex: Exception) {
|
||||||
|
ex.message!!.toast(requireContext())
|
||||||
}
|
}
|
||||||
adapter?.notifyDataSetChanged()
|
adapter?.notifyDataSetChanged()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//sergio:añadido para compradores
|
|
||||||
private fun createBuyerList(list: List<BuyerVO>) {
|
private fun createBuyerList(list: List<BuyerVO>) {
|
||||||
items.clear()
|
items.clear()
|
||||||
list.forEach { buyer ->
|
if (list.isNotEmpty())
|
||||||
if (!buyer.isError) {
|
list.forEach { buyer ->
|
||||||
try {
|
items.add(SearchBuyerModel(buyer.nickname, buyer.userFk))
|
||||||
items.add(SearchBuyerModel(buyer.nickname, buyer.userFk))
|
|
||||||
} catch (e: Exception) {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -80,36 +80,9 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
//sergio para obtener comprador
|
//sergio para obtener comprador
|
||||||
fun itemShelvingBuyerGet() {
|
fun itemShelvingBuyerGet() {
|
||||||
salix.getBuyers("""{"order":"nickname"}""").enqueue(object :
|
salix.getBuyers("""{"order":"nickname"}""").enqueue(object :
|
||||||
SilexCallback<List<BuyerVO>>(context) {
|
SalixCallback<List<BuyerVO>>(context) {
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
val listError: ArrayList<BuyerVO> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
BuyerVO(
|
|
||||||
0, "",
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_buyersList.value = BuyerListVO(listError)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSuccess(response: Response<List<BuyerVO>>) {
|
override fun onSuccess(response: Response<List<BuyerVO>>) {
|
||||||
if (response.body() != null) {
|
_buyersList.value = response.body()?.let { BuyerListVO(it) }
|
||||||
_buyersList.value = response.body()?.let { BuyerListVO(it) }
|
|
||||||
} else {
|
|
||||||
val listError: ArrayList<BuyerVO> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
BuyerVO(
|
|
||||||
0, "",
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
response.message()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_buyersList.value = BuyerListVO(listError)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -125,20 +98,6 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
_inventaryList.value = response.body()?.let { InventaryListVO(it) }
|
_inventaryList.value = response.body()?.let { InventaryListVO(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
val listError: ArrayList<ItemInventaryVO> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
ItemInventaryVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
t.message!!
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_inventaryList.value = InventaryListVO(listError)
|
|
||||||
}
|
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,44 +162,16 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
_response.value =
|
_response.value =
|
||||||
ResponseItemVO(isError = false, response = response.message())
|
ResponseItemVO(isError = false, response = response.message())
|
||||||
}
|
}
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
_response.value = ResponseItemVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun department_getHasMistake() {
|
fun departmentGetHasMistake() {
|
||||||
|
|
||||||
salix.department_getHasMistake()
|
salix.department_getHasMistake()
|
||||||
.enqueue(object : SalixCallback<List<DepartmentMistake>>(context) {
|
.enqueue(object : SalixCallback<List<DepartmentMistake>>(context) {
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
DepartmentMistake(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
t.message!!
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSuccess(response: Response<List<DepartmentMistake>>) {
|
override fun onSuccess(response: Response<List<DepartmentMistake>>) {
|
||||||
if (response.body() != null) {
|
_mistakeDepartmentList.value =
|
||||||
_mistakeDepartmentList.value =
|
response.body()?.let { departmentMistakeList(it) }
|
||||||
response.body()?.let { departmentMistakeList(it) }
|
|
||||||
} else {
|
|
||||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
|
||||||
listError.add(DepartmentMistake())
|
|
||||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,70 +201,26 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun workerMistakeType_get() {
|
fun workerMistakeTypeGet() {
|
||||||
//Tarea 5134
|
|
||||||
salix.workerMistakesTypes()
|
salix.workerMistakesTypes()
|
||||||
.enqueue(object : SilexCallback<List<MistakeType>>(context) {
|
.enqueue(object : SilexCallback<List<MistakeType>>(context) {
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
val listError: ArrayList<MistakeType> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
MistakeType(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
t.message!!
|
|
||||||
),
|
|
||||||
description = ""
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_mistakeWorkerList.value = workerMistakeTypeList(listError)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSuccess(response: Response<List<MistakeType>>) {
|
override fun onSuccess(response: Response<List<MistakeType>>) {
|
||||||
if (response.body() != null) {
|
_mistakeWorkerList.value =
|
||||||
_mistakeWorkerList.value =
|
response.body()?.let { workerMistakeTypeList(it) }
|
||||||
response.body()?.let { workerMistakeTypeList(it) }
|
|
||||||
} else {
|
|
||||||
val listError: ArrayList<MistakeType> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
MistakeType(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
response.message()
|
|
||||||
),
|
|
||||||
description = ""
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_mistakeWorkerList.value = workerMistakeTypeList(listError)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun workerMistake_Add(
|
fun workerMistakeAdd(
|
||||||
vUserFk: Int,
|
vUserFk: Int,
|
||||||
vTypeFk: String
|
vTypeFk: String
|
||||||
) {
|
) {
|
||||||
salix.workerMistakesAdd(WorkerMistakeSalix(vUserFk, vTypeFk))
|
salix.workerMistakesAdd(WorkerMistakeSalix(vUserFk, vTypeFk))
|
||||||
.enqueue(object :
|
.enqueue(object :
|
||||||
SilexCallback<Any>(context) {
|
SalixCallback<Any>(context) {
|
||||||
override fun onError(t: Throwable) {
|
|
||||||
_responseAddMistake.value = ResponseItemVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onSuccess(response: Response<Any>) {
|
|
||||||
_responseAddMistake.value =
|
|
||||||
ResponseItemVO(
|
|
||||||
isError = false,
|
|
||||||
response = response.message()
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@ import es.verdnatura.presentation.view.feature.delivery.model.ClientTicket
|
||||||
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleFragment
|
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleFragment
|
||||||
import es.verdnatura.presentation.view.feature.historicoarticulo.fragment.HistoricoArticuloFragment
|
import es.verdnatura.presentation.view.feature.historicoarticulo.fragment.HistoricoArticuloFragment
|
||||||
import es.verdnatura.presentation.view.feature.historicoshelving.fragment.ItemShelvingLogFragment
|
import es.verdnatura.presentation.view.feature.historicoshelving.fragment.ItemShelvingLogFragment
|
||||||
import es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment.shelvingLogFragment
|
import es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment.ShelvingLogFragment
|
||||||
import es.verdnatura.presentation.view.feature.historicovehiculo.fragment.HistoricoVehiculoFragment
|
import es.verdnatura.presentation.view.feature.historicovehiculo.fragment.HistoricoVehiculoFragment
|
||||||
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryFragment
|
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryFragment
|
||||||
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryParkingFragment
|
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryParkingFragment
|
||||||
|
@ -83,7 +83,7 @@ import es.verdnatura.presentation.view.feature.ticket.fragment.TicketAdvanceFrag
|
||||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragment
|
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragment
|
||||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragmentTEST
|
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragmentTEST
|
||||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment
|
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.adapter.WorkermistakeFragment
|
import es.verdnatura.presentation.view.feature.workermistake.fragment.WorkermistakeFragment
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.fragment.PackingMistakeFragment
|
import es.verdnatura.presentation.view.feature.workermistake.fragment.PackingMistakeFragment
|
||||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
|
@ -637,7 +637,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
}
|
}
|
||||||
|
|
||||||
getString(R.string.titleLogShelving) -> {
|
getString(R.string.titleLogShelving) -> {
|
||||||
addFragmentOnTop(shelvingLogFragment.newInstance(item.title))
|
addFragmentOnTop(ShelvingLogFragment.newInstance(item.title))
|
||||||
}
|
}
|
||||||
|
|
||||||
getString(R.string.titleWorkerMistake) -> {
|
getString(R.string.titleWorkerMistake) -> {
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -13,50 +11,47 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="@dimen/toolbar_height"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:paddingTop="@dimen/toolbar_height">
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
android:layout_marginTop="@dimen/layout_margin_min"
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
android:paddingLeft="@dimen/layout_margin_min"
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
android:paddingRight="@dimen/layout_margin_min">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="left"
|
||||||
android:text="@string/Worker"
|
android:text="@string/Worker"
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:layout_weight="1"
|
android:textSize="@dimen/body2" />
|
||||||
android:gravity="left"/>
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="left"
|
||||||
android:text="@string/InTimed"
|
android:text="@string/InTimed"
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:layout_weight="1"
|
android:textSize="@dimen/body2" />
|
||||||
android:gravity="left"/>
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="@string/OutTimed"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"/>
|
android:gravity="center"
|
||||||
|
android:text="@string/OutTimed"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -65,47 +60,16 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
tools:listitem="@layout/item_historicovehiculo_row"/>
|
tools:listitem="@layout/item_historicovehiculo_row" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<include
|
||||||
|
|
||||||
' <include
|
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/splash_progress"
|
|
||||||
android:visibility="visible"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
|
||||||
|
|
||||||
app:lottie_autoPlay="true"
|
|
||||||
app:lottie_loop="true"
|
|
||||||
app:lottie_rawRes="@raw/orange_loading"
|
|
||||||
app:lottie_speed="2" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -1,8 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -12,11 +11,11 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:paddingTop="@dimen/toolbar_height"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
android:paddingTop="@dimen/toolbar_height">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/textinputlayout_username"
|
android:id="@+id/textinputlayout_username"
|
||||||
|
@ -24,57 +23,53 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColorHint="@android:color/darker_gray">
|
android:textColorHint="@android:color/darker_gray">
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/filter_itemFk"
|
|
||||||
style="@style/InputLineTextSearch"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_weight="1.5"
|
|
||||||
android:backgroundTint="@android:color/white"
|
|
||||||
android:hint="@string/itemFilter"
|
|
||||||
android:inputType="text"
|
|
||||||
android:lines="1"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textColorHint="#78909C"
|
|
||||||
tools:ignore="TextContrastCheck" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/filter_buyer"
|
|
||||||
style="@style/InputLineTextSearch"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_height="match_parent"
|
||||||
android:backgroundTint="@android:color/white"
|
android:orientation="horizontal">
|
||||||
android:drawableEnd="@drawable/ic_arrow_drop_down_black_24dp"
|
|
||||||
android:focusable="false"
|
|
||||||
android:hint="@string/buscarcomprador"
|
|
||||||
android:lines="1"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
|
||||||
android:textColorHint="#78909C"
|
|
||||||
android:visibility="visible"
|
|
||||||
tools:ignore="TextContrastCheck" />
|
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/filter_itemFk"
|
||||||
|
style="@style/InputLineTextSearch"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:backgroundTint="@android:color/white"
|
||||||
|
android:hint="@string/itemFilter"
|
||||||
|
android:inputType="text"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textColorHint="#78909C"
|
||||||
|
tools:ignore="TextContrastCheck" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/filter_buyer"
|
||||||
|
style="@style/InputLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@android:color/white"
|
||||||
|
android:drawableEnd="@drawable/ic_arrow_drop_down_black_24dp"
|
||||||
|
android:focusable="false"
|
||||||
|
android:hint="@string/buscarcomprador"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||||
|
android:textColorHint="#78909C"
|
||||||
|
android:visibility="visible"
|
||||||
|
tools:ignore="TextContrastCheck" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
android:layout_marginTop="@dimen/layout_margin_min"
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
android:paddingLeft="@dimen/layout_margin_min"
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
android:paddingRight="@dimen/layout_margin_min">
|
||||||
|
|
||||||
|
@ -115,13 +110,10 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
tools:listitem="@layout/item_inventary_row"/>
|
tools:listitem="@layout/item_inventary_row" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
|
@ -129,34 +121,5 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/splash_progress"
|
|
||||||
android:visibility="visible"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
|
||||||
|
|
||||||
app:lottie_autoPlay="true"
|
|
||||||
app:lottie_loop="true"
|
|
||||||
app:lottie_rawRes="@raw/orange_loading"
|
|
||||||
app:lottie_speed="2" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -1,16 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/scroll_view"
|
android:id="@+id/scroll_view"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -23,87 +19,86 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/scan_input"
|
||||||
|
style="@style/ScanLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
|
||||||
|
android:hint="@string/Escaneaetiqueta"
|
||||||
|
android:inputType="text"
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
android:lines="1"
|
||||||
android:id="@+id/scan_input"
|
android:maxLines="1"
|
||||||
style="@style/ScanLineTextSearch"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:layout_width="match_parent"
|
android:textColorHint="@android:color/darker_gray" />
|
||||||
|
|
||||||
android:hint="@string/Escaneaetiqueta"
|
|
||||||
android:inputType="text"
|
|
||||||
android:lines="1"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textColorHint="@android:color/darker_gray" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
android:layout_marginTop="@dimen/layout_margin_min"
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
android:paddingLeft="@dimen/layout_margin_min"
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
android:paddingRight="@dimen/layout_margin_min">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="left"
|
||||||
android:text="ItemFk"
|
android:text="ItemFk"
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:layout_weight="1"
|
android:textSize="@dimen/body2" />
|
||||||
android:gravity="left"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="left"
|
||||||
android:text="Nombre"
|
android:text="Nombre"
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:layout_weight="1"
|
android:textSize="@dimen/body2" />
|
||||||
android:gravity="left"/>
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
android:text="Fecha"
|
android:text="Fecha"
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:layout_weight="1"
|
android:textSize="@dimen/body2" />
|
||||||
android:gravity="center"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
android:text="Ubicado"
|
android:text="Ubicado"
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:layout_weight="1"
|
android:textSize="@dimen/body2" />
|
||||||
android:gravity="center"/>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Stock"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"/>
|
android:gravity="center"
|
||||||
|
android:text="Stock"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/itemcard_layout"
|
android:id="@+id/itemcard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:padding="10dp"
|
||||||
tools:ignore="ExtraText">
|
tools:ignore="ExtraText">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:descendantFocusability="blocksDescendants">
|
android:descendantFocusability="blocksDescendants">
|
||||||
|
@ -115,47 +110,19 @@
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
tools:listitem="@layout/item_expeditionstate_row" />
|
tools:listitem="@layout/item_expeditionstate_row" />
|
||||||
</RelativeLayout>>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
' <include
|
<include
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/splash_progress"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
|
||||||
|
|
||||||
app:lottie_autoPlay="true"
|
|
||||||
app:lottie_loop="true"
|
|
||||||
app:lottie_rawRes="@raw/orange_loading"
|
|
||||||
app:lottie_speed="2" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -1,16 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/scroll_view"
|
android:id="@+id/scroll_view"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -23,87 +19,80 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/scan_input"
|
||||||
|
style="@style/ScanLineTextSearch"
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/scan_input"
|
android:hint="@string/Escaneaetiqueta"
|
||||||
style="@style/ScanLineTextSearch"
|
android:inputType="text"
|
||||||
android:layout_width="match_parent"
|
android:lines="1"
|
||||||
android:hint="@string/Escaneaetiqueta"
|
android:maxLines="1" />
|
||||||
android:inputType="text"
|
|
||||||
android:lines="1"
|
|
||||||
android:maxLines="1"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
android:layout_marginTop="@dimen/layout_margin_min"
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||||
|
android:orientation="horizontal"
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
android:paddingLeft="@dimen/layout_margin_min"
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
android:paddingRight="@dimen/layout_margin_min">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Item"
|
android:gravity="center"
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
android:paddingLeft="@dimen/layout_margin_min"
|
||||||
|
android:text="Item"
|
||||||
android:gravity="center"/>
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Nombre"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"/>
|
android:gravity="center"
|
||||||
|
android:text="Nombre"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Parking"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:layout_weight="1.25"
|
android:layout_weight="1.25"
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:visibility="gone"/>
|
android:text="Parking"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Carro"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:layout_weight="2"
|
android:layout_weight="2"
|
||||||
android:gravity="center"/>
|
android:gravity="center"
|
||||||
|
android:text="Carro"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Cantidad"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
|
|
||||||
android:gravity="right"
|
android:gravity="right"
|
||||||
android:paddingRight="@dimen/layout_margin_min"/>
|
android:paddingRight="@dimen/layout_margin_min"
|
||||||
|
android:text="Cantidad"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/itemcard_layout"
|
android:id="@+id/itemcard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:padding="10dp"
|
||||||
tools:ignore="ExtraText">
|
tools:ignore="ExtraText">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -111,7 +100,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:descendantFocusability="blocksDescendants">
|
android:descendantFocusability="blocksDescendants">
|
||||||
|
|
||||||
<!--android:id="@+id/itemexpeditionstate_recyclerview"-->
|
<!--android:id="@+id/itemexpeditionstate_recyclerview"-->
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/itemshelvinglog_recyclerview"
|
android:id="@+id/itemshelvinglog_recyclerview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -119,46 +108,20 @@
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
tools:listitem="@layout/item_shelvinglog_row" />
|
tools:listitem="@layout/item_shelvinglog_row" />
|
||||||
</RelativeLayout>>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
' <include
|
<include
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/splash_progress"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
|
||||||
app:lottie_autoPlay="true"
|
|
||||||
app:lottie_loop="true"
|
|
||||||
app:lottie_rawRes="@raw/orange_loading"
|
|
||||||
app:lottie_speed="2" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -1,16 +1,12 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<ScrollView
|
<ScrollView
|
||||||
android:id="@+id/scroll_view"
|
android:id="@+id/scroll_view"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
@ -23,22 +19,18 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical" >
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/scan_input"
|
||||||
|
style="@style/ScanLineTextSearch"
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/scan_input"
|
android:hint="@string/Escaneaetiqueta"
|
||||||
style="@style/ScanLineTextSearch"
|
android:inputType="text"
|
||||||
android:layout_width="match_parent"
|
android:lines="1"
|
||||||
android:hint="@string/Escaneaetiqueta"
|
android:maxLines="1"
|
||||||
android:inputType="text"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:lines="1"
|
android:textColorHint="@color/verdnatura_white" />
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textColorHint="@color/verdnatura_white"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/linearHeader"
|
android:id="@+id/linearHeader"
|
||||||
|
@ -55,9 +47,8 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
android:paddingLeft="@dimen/layout_margin_min"
|
||||||
android:text="Usuario"
|
android:text="@string/user"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
|
|
||||||
android:textSize="@dimen/body2" />
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
@ -65,40 +56,18 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Fecha"
|
android:text="@string/Fecha"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/body2" />
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1.25"
|
|
||||||
android:gravity="right"
|
|
||||||
android:text="Parking"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:gravity="right"
|
|
||||||
android:paddingRight="@dimen/layout_margin_min"
|
|
||||||
android:text="Acción"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/itemcard_layout"
|
android:id="@+id/itemcard_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="10dp"
|
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
|
android:padding="10dp"
|
||||||
tools:ignore="ExtraText">
|
tools:ignore="ExtraText">
|
||||||
|
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
|
@ -106,7 +75,6 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:descendantFocusability="blocksDescendants">
|
android:descendantFocusability="blocksDescendants">
|
||||||
|
|
||||||
<!--android:id="@+id/itemexpeditionstate_recyclerview"-->
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/itemshelvinglog_recyclerview"
|
android:id="@+id/itemshelvinglog_recyclerview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -114,46 +82,20 @@
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
android:visibility="visible"
|
android:visibility="visible"
|
||||||
tools:listitem="@layout/shelvinglog_row" />
|
tools:listitem="@layout/shelvinglog_row" />
|
||||||
</RelativeLayout>>
|
</RelativeLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/splash_progress"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:gravity="center">
|
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
|
||||||
app:lottie_autoPlay="true"
|
|
||||||
app:lottie_loop="true"
|
|
||||||
app:lottie_rawRes="@raw/orange_loading"
|
|
||||||
app:lottie_speed="2" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -3,7 +3,6 @@
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
@ -50,7 +49,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:backgroundTint="@android:color/white"
|
android:backgroundTint="@android:color/white"
|
||||||
android:drawableEnd="@drawable/ic_arrow_drop_down_black_24dp"
|
|
||||||
android:focusable="false"
|
android:focusable="false"
|
||||||
android:hint="@string/buscarDepartamento"
|
android:hint="@string/buscarDepartamento"
|
||||||
android:inputType="text"
|
android:inputType="text"
|
||||||
|
@ -59,12 +57,11 @@
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||||
android:textColorHint="@android:color/darker_gray"
|
android:textColorHint="@android:color/darker_gray"
|
||||||
android:visibility="visible" />
|
android:visibility="visible"
|
||||||
|
app:drawableEndCompat="@drawable/ic_arrow_drop_down_black_24dp" />
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -81,7 +78,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1.25"
|
android:layout_weight="1.25"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Nombre"
|
android:text="@string/name"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/body2" />
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
|
@ -90,7 +87,7 @@
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Apellidos"
|
android:text="@string/surname"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/body2" />
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
|
@ -114,9 +111,6 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
'
|
|
||||||
|
|
||||||
<include
|
<include
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
|
@ -124,30 +118,5 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/splash_progress"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:visibility="visible"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
|
||||||
app:lottie_autoPlay="true"
|
|
||||||
app:lottie_loop="true"
|
|
||||||
app:lottie_rawRes="@raw/orange_loading"
|
|
||||||
app:lottie_speed="2" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
Loading…
Reference in New Issue