v6.3 Añadida función "Cargar expedición en buffer" y preparando shevingLog

This commit is contained in:
Sergio De la torre 2021-11-25 08:40:30 +01:00
parent 594f249340
commit af1b0541d5
32 changed files with 980 additions and 171 deletions

View File

@ -1,7 +1,6 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="LBRACE_ON_NEXT_LINE" value="true" />
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
@ -118,10 +117,6 @@
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1" />
<option name="KEEP_BLANK_LINES_IN_CODE" value="1" />
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1" />
<option name="ALIGN_MULTILINE_METHOD_BRACKETS" value="true" />
</codeStyleSettings>
</code_scheme>
</component>

View File

@ -51,6 +51,7 @@
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_move_to_inbox_black_24dp.xml" value="0.15052083333333333" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_playlist_add_black_24dp.xml" value="0.15052083333333333" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_print_black_24dp.xml" value="0.15052083333333333" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_send_black_24dp.xml" value="0.134375" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_spa_black_24dp.xml" value="0.15052083333333333" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_spa_black_launcher.xml" value="0.19479166666666667" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_star_ko.xml" value="0.15052083333333333" />
@ -63,6 +64,7 @@
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_visibility_black_24dp.xml" value="0.2546875" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_visibility_black_24dp_white.xml" value="0.2546875" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_visibility_white_24dp.xml" value="0.2546875" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/movie_plus_outline.xml" value="0.134375" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/pallet_shipping.xml" value="0.1" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/pallet_shipping_black.xml" value="0.1" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/pallet_shipping_selected.xml" value="0.1" />
@ -77,6 +79,7 @@
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_ajustes.xml" value="0.3333333333333333" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_automatic_add_item.xml" value="0.20625" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_buffer.xml" value="0.1408514492753623" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_buffer_load.xml" value="0.20923913043478262" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_buscar_item.xml" value="0.21014492753623187" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_collection.xml" value="0.23007246376811594" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_controlador.xml" value="0.20153985507246377" />
@ -99,6 +102,7 @@
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_pasillero.xml" value="0.13829787234042554" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_qr.xml" value="0.19882246376811594" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_sacador_associatesmarttag.xml" value="0.22" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_shelvinglog.xml" value="0.13269927536231885" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_smarttag_register.xml" value="0.3118811881188119" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_transferencia.xml" value="0.10666666666666667" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_ubicador.xml" value="0.15729166666666666" />
@ -118,7 +122,9 @@
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_shelvingdayofsale_row.xml" value="0.2375" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_shelvinglog_row.xml" value="0.21739130434782608" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_smarttag_row.xml" value="0.20153985507246377" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_ubication_row.xml" value="0.11822916666666666" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/item_worker_image.xml" value="0.23177083333333334" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/shelvinglog_row.xml" value="0.18385416666666668" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/toolbar.xml" value="0.15353260869565216" />
</map>
</option>

View File

@ -14,8 +14,10 @@ android {
applicationId "es.verdnatura"
minSdkVersion 21
targetSdkVersion 29
versionCode 81
versionName "6.2" //VERSION CODE 81, arreglado el null de grouping en ubicador.
versionCode 83
versionName "6.3" //VERSION CODE 83 Nueva funcionalidad Cargar expedición en buffer
//versionName "6.2.1" // VERSION CODE 82 Aparece mensaje de error completo en "Error al construir la colección".
//versionName "6.2" //VERSION CODE 81, arreglado el null de grouping en ubicador.
//versionName "6.1.9.1" //VERSION CODE 80, arreglado el null de grouping en ubicador.
//versionName "6.1.9" VERSION CODE 76, añadido grouping, reference, prioridad, controladores vs scadores, boton mensaje error,rocket salix y error al añadir elemento a colección.
// Sin subir, Modificado y añadido mensajes de error, añadido opcion Dia de venta y su parking, teclado numerico para controlador

View File

@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 81,
"versionName": "6.2",
"versionCode": 83,
"versionName": "6.3",
"outputFile": "app-release.apk"
}
],

Binary file not shown.

View File

@ -14,6 +14,7 @@ import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleView
import es.verdnatura.presentation.view.feature.faltas.fragment.FaltasViewModel
import es.verdnatura.presentation.view.feature.historico.fragment.HistoricoViewModel
import es.verdnatura.presentation.view.feature.historicoshelving.fragment.itemShelvingLogViewModel
import es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment.shelvingLogViewModel
import es.verdnatura.presentation.view.feature.historicovehiculo.fragment.HistoricoVehiculoViewModel
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel
import es.verdnatura.presentation.view.feature.login.fragment.LoginViewModel
@ -180,4 +181,8 @@ val viewModelModule = module {
viewModel {
itemShelvingLogViewModel(androidContext())
}
viewModel {
shelvingLogViewModel(androidContext())
}
}

View File

@ -88,13 +88,13 @@ class GetLoginUserCase(context: Context) : RestClient(context)
//SALIX MENSAJE :SERGIO: PARA NO ENVIAR MENSAJES A COMERCIALES PONGO QUE LAS MODIFICACIONES SE ENVIAN AL CANAL CREADO.
*/
fun sendChekingPresence(token:String,workerId:Int,message:String) : Call<Boolean>{
fun sendChekingPresence(token:String,workerId:Int,message:String) : Call<Boolean>{
return salixClient!!.sendChekingPresence(content_type = "application/json", authorization = token, params = SalixMessageVO(workerId = workerId,message = message))
}
// SERGIO: PARA DESARROLLO Y PRUEBAS SE DESCOMENTA ESTAS LÍNEAS Y SE COMENTAN LAS DE ARRIBA
/* fun sendChekingPresence(token: String, workerId: Int, message: String): Call<Boolean>
/* fun sendChekingPresence(token: String, workerId: Int, message: String): Call<Boolean>
{
return salixClient!!.sendGroup(
content_type = "application/json",

View File

@ -254,5 +254,22 @@ class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
params
)
}
fun expeditionLoading_add(
usuario: String,
password: String,
vExpeditionFk: String,
vBufferFk: String
): Call<String> {
val params: ArrayList<String> = ArrayList()
params.add(vExpeditionFk)
params.add(vBufferFk)
return restClient!!.expeditionLoading_add(
"json",
"1",
usuario,
password,
"application/json",
params
)
}
}

View File

@ -13,7 +13,7 @@ import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSale
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoVO
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvingparking.model.ParkingShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLog
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
import es.verdnatura.presentation.view.feature.login.model.LoginDevice
@ -883,8 +883,8 @@ interface VerdnaturaService {
):
Call<List<ItemShelvingLog>>
@POST("almacennew/parkingShelvingLog_get")//REVISADA
fun parkingShelvingLog_get(
@POST("almacennew/shelvingLog_get")//REVISADA
fun shelvingLog_get(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@ -892,7 +892,7 @@ interface VerdnaturaService {
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<List<ParkingShelvingLog>>
Call<List<ShelvingLog>>
@POST("almacennew/itemShelving_updateSpam")//REVISADA
fun itemShelving_updateSpam(
@ -1026,6 +1026,17 @@ interface VerdnaturaService {
):
Call<String>
@POST("almacennew/expeditionLoading_add")//REVISADA
fun expeditionLoading_add(
@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String,
@Body params: List<String>
):
Call<String>
//CALIDAD
@POST("almacennew/itemShelvingBuyerGet")//REVISADA
fun itemShelvingBuyerGet(

View File

@ -3,7 +3,7 @@ package es.verdnatura.domain
import android.content.Context
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvingparking.model.ParkingShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLog
import retrofit2.Call
class itemShelvingLogUSerCase(context: Context) : RestClient(context) {
@ -27,14 +27,14 @@ class itemShelvingLogUSerCase(context: Context) : RestClient(context) {
)
}
fun parkingShelvingLog_get(
fun shelvingLog_get(
usuario: String,
password: String,
vShelvingFk: String
): Call<List<ParkingShelvingLog>> {
): Call<List<ShelvingLog>> {
val params: ArrayList<String> = ArrayList()
params.add(vShelvingFk)
return restClient!!.parkingShelvingLog_get(
return restClient!!.shelvingLog_get(
"json",
"1",
usuario,

View File

@ -46,7 +46,7 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
fun getItemCard(itemFk:String,warehouseFk:String,user:String,password:String,callFunction:String) {
getItemCardUserCase.getItemCard(user,password,itemFk,warehouseFk).enqueue(object :Callback<ItemCardVO>{
override fun onFailure(call: Call<ItemCardVO>, t: Throwable) {
_itemcard.value = ItemCardVO(isError = true,errorMessage = getMessageFromAllResponse(callFunction,t.message!!))
_itemcard.value = ItemCardVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
}

View File

@ -27,6 +27,11 @@ class BufferFragmentViewModel(context: Context) : BaseViewModel() {
val bufferresponse: LiveData<Boolean>
get() = _bufferresponse
private val _bufferloadresponse by lazy { MutableLiveData<ResponseItemVO>() }
val bufferloadresponse: LiveData<ResponseItemVO>
get() = _bufferloadresponse
fun buffer_setTypeByName(user: String, password: String, vBufferFk: String, vType: String,callFunction:String){
GetPaletizadoresUserCase.buffer_setTypeByName(user, password, vBufferFk, vType)
@ -62,6 +67,42 @@ class BufferFragmentViewModel(context: Context) : BaseViewModel() {
})
}
fun expeditionLoading_add(usuario:String,password:String,vExpeditionFk:String, vBufferFk:String,callFunction:String){
GetPaletizadoresUserCase.expeditionLoading_add(usuario,password,vExpeditionFk, vBufferFk).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_bufferloadresponse.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(callFunction,t.message!!))
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (!response.isSuccessful){
_bufferloadresponse.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(callFunction,response.message()!!))
}else {
if (response.body()!!.isNullOrEmpty()) {
_bufferloadresponse.value = ResponseItemVO(
isError = true,
errorMessage =
getMessageFromAllResponse(callFunction,response.message()!!)
)
} else {
_bufferloadresponse.value = ResponseItemVO(
isError = false,
response = response.body()!!
)
}
}
}
})
}
}

View File

@ -0,0 +1,310 @@
package es.verdnatura.presentation.view.feature.buffer.fragment
import android.content.Context
import android.content.SharedPreferences
import android.media.MediaPlayer
import android.os.Bundle
import android.util.Log
import android.view.View.*
import android.view.inputmethod.EditorInfo
import androidx.activity.OnBackPressedCallback
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentBufferBinding
import es.verdnatura.databinding.FragmentBufferLoadBinding
import es.verdnatura.databinding.FragmentSacadorAssociatesmarttagBinding
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.*
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.component.CustomDialogInput
import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.component.CustomDialogThreeButtons
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import es.verdnatura.presentation.view.feature.smarttag.adapter.SmartTagAdapter
import es.verdnatura.presentation.view.feature.smarttag.model.SmartTag
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.component_custom_three_dialog.*
import kotlinx.android.synthetic.main.fragment_collection.*
import kotlinx.android.synthetic.main.fragment_controlador.*
import kotlinx.android.synthetic.main.fragment_controlador.scan_input
import kotlinx.android.synthetic.main.fragment_controlador.splash_progress
import kotlinx.android.synthetic.main.fragment_expedition_scan.*
import kotlinx.android.synthetic.main.fragment_login.*
import kotlinx.android.synthetic.main.fragment_sacador.*
import kotlinx.android.synthetic.main.toolbar.*
class BufferLoadFragment(
var entryPoint: String = ""
) : BaseFragment<FragmentBufferLoadBinding, BufferFragmentViewModel>(
BufferFragmentViewModel::class
) {
private var user = ""
private var userFk = ""
private var password = ""
private var sectorFk = ""
private var warehouseFk = ""
private var goBack: Boolean = false
override fun getLayoutId(): Int = R.layout.fragment_sacador_associatesmarttag
private lateinit var customDialog: CustomDialog
private lateinit var customDialogList: CustomDialogList
private lateinit var customDialogInput: CustomDialogInput
private lateinit var customDialogThreeButtons: CustomDialogThreeButtons
private var listTags: ArrayList<SmartTag> = ArrayList()
private var tagsAdapter: SmartTagAdapter? = null
private var itemScaned: String = ""
var mperror: MediaPlayer? = null
var mpok: MediaPlayer? = null
companion object {
fun newInstance(entryPoint: String) = BufferLoadFragment(entryPoint)
}
override fun onAttach(context: Context) {
super.onAttach(context)
// sergio: en test: Log.i("VERDNATURA:","attached")
val callback: OnBackPressedCallback =
object : OnBackPressedCallback(true)
{
override fun handleOnBackPressed() {
// Leave empty do disable back press or
// write your code which you want
// Log.i("VERDNATURA:","PULSADO")
}
}
requireActivity().onBackPressedDispatcher.addCallback(
this,
callback
)
}
override fun init() {
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
customDialogInput = CustomDialogInput(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
goBack = false
requireActivity().main_bottom_navigation.visibility = GONE
splash_progress.visibility = GONE
mperror = MediaPlayer.create((activity as MainActivity),R.raw.error)
mpok= MediaPlayer.create((activity as MainActivity),R.raw.ok)
setEvents()
setToolBar()
showExpeditionOrBufferScan()
super.init()
}
override fun onPause() {
goBack = true
super.onPause()
}
private fun setToolBar() {
toolbar_title.text = entryPoint
}
private fun checkLoadExpedition(ExpeditionOrBuffer: String) {
// if (listTags.isNullOrEmpty()){
listTags.add(SmartTag(ExpeditionOrBuffer, getTextScaned(listTags.size + 1) + ExpeditionOrBuffer))
customDialogList.setTitle(getTextToPosition(listTags.size + 1))
tagsAdapter!!.notifyDataSetChanged()
// }
if (listTags.size==2) {
splash_progress.visibility = VISIBLE
viewModel.expeditionLoading_add(
usuario = user,
password=password,
vBufferFk = ExpeditionOrBuffer,
vExpeditionFk = listTags.first().code.toString(),
callFunction = "expeditionLoading_add")
}
itemScaned = ExpeditionOrBuffer
}
private fun scanRequest() {
if (scan_input != null) {
scan_input.requestFocus()
}
hideKeyboards()
}
private fun hideKeyboards() {
try {
requireActivity().hideKeyboard()
} catch (e: Exception) {
}
}
override fun onCreate(savedInstanceState: Bundle?) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
user = prefs.getString(USER, "").toString()
password = prefs.getString(PASSWORD, "").toString()
sectorFk = prefs.getInt(SECTORFK, 1).toString()
warehouseFk = prefs.getInt(WAREHOUSEFK, 1).toString()
userFk = prefs.getString(USERFK, "0").toString()
super.onCreate(savedInstanceState)
}
private fun setEvents() {
backButton.setOnClickListener {
requireActivity().onBackPressed()
}
}
override fun observeViewModel() {
with(viewModel) {
splash_progress.visibility = GONE
bufferloadresponse.observe(viewLifecycleOwner, Observer {
if (it.isError) {
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()
} else {
it.response.toast(requireContext())
if (it.response.equals("Registro añadido")){
mpok?.start()
}else{
mperror?.start()
}
listTags.clear()
tagsAdapter!!.notifyDataSetChanged()
showExpeditionOrBufferScan()
/* var nameSmartTagwithWagon: String
nameSmartTagwithWagon =
getTextScaned(listTags.size + 1) + itemScaned
getTextScaned(1) + itemScaned
customDialogList.setTitle(getTextToPosition(listTags.size + 1))
listTags.add(SmartTag(itemScaned, nameSmartTagwithWagon))
tagsAdapter!!.notifyDataSetChanged()
customDialogList.setValue("")*/
}
splash_progress.visibility = GONE
})
}
}
private fun getTextToPosition(TagsScaned: Int): String {
var message = ""
when (TagsScaned) {
1 -> message = "Escanea buffer"
//2 -> message = "Escanea etiqueta del medio"
//3 -> message = "Escanea etiqueta inferior"
//4 -> message = "Carro escaneado"
else -> { message="Escanea buffer"}
}
return message
}
private fun getTextScaned(TagScaned: Int): String {
var message = ""
when (TagScaned) {
1 -> message = "Expedición:"
2 -> message = "Buffer:"
//3 -> message = ""
//4 -> message = ""
else -> { message=""}
}
return message
}
private fun showExpeditionOrBufferScan() {
customDialogList.setTitle("Escanea etiqueta de la expedición.")
.setOkButton("Cerrar") {
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
listTags.clear()
customDialogList.dismiss()
requireActivity().onBackPressed()
}.setValue("").show()
customDialogList.getEditText().requestFocus()
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
customDialogList.getEditText().setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
if (!customDialogList.getValue().isNullOrEmpty()) {
checkLoadExpedition(customDialogList.getValue())
}
customDialogList.setValue("")
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
return@setOnEditorActionListener true
}
false
}
tagsAdapter = SmartTagAdapter(listTags, object : OnSmartTagRowClickListener {
override fun OnSmartTagRowClickListener(item: SmartTag) {
}
}, showDelete = false)
customDialogList.getRecyclerView().adapter = tagsAdapter
customDialogList.getRecyclerView().layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
}
}

View File

@ -829,7 +829,8 @@ class CollectionFragment(
if (type == PRECHECKER) {
sales[position].isControlled =
if (sales[position].isControlled == "2") "0" else "2" //sergio: para diferenciar precontrol en previa
//if (sales[position].isControlled == "2") "0" else "2" //sergio: para diferenciar precontrol en previa
if (sales[position].isControlled == "1") "0" else "1"//sergio: para diferenciar precontrol en previa
}
saleAdapter!!.notifyDataSetChanged()
@ -874,9 +875,9 @@ class CollectionFragment(
usuario = user,
password = password,
saleFk = sales[position].saleFk,
vIsChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else "1",
vIsChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR || type == PRECHECKER) sales[position].isControlled else "1",
vOriginalQuantity = sales[position].pickedQuantity,
vStateFk = if (type==CONTROLADOR) "CHECKED" else type,//type.toString(),
vStateFk = if (type==CONTROLADOR) "CHECKED" else if (type=="PRECHECKER") "PRECHECKED" else type,//type.toString(),
vBuyFk = originalItemScan,
callFunction = "saleTrackingReplace"
)

View File

@ -1,5 +1,6 @@
package es.verdnatura.presentation.view.feature.collection.mapper
import android.util.Log
import es.verdnatura.presentation.common.convertToDateString
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import java.text.SimpleDateFormat
@ -7,22 +8,28 @@ import java.util.*
fun CollectionVO.map() : CollectionVO{
try {
this.tickets.forEach { ticket ->
ticket.sales.forEach {
this.tickets.forEach {
ticket -> ticket.sales.forEach {
it.ticketFk = ticket.ticketFk
it.level = ticket.level
it.salePersonFk = ticket.salesPersonFk
it.agencyName = ticket.agencyName
it.quantity = it.quantity.substring(0, it.quantity.indexOf("."))
it.isNew = it.isAdded == "1"
it.originalQuantity =
if (it.originalQuantity != "-1") it.originalQuantity.substring(
0,
it.originalQuantity.indexOf(".")
) else it.quantity
it.quantity = it.quantity.substring(0, it.quantity.indexOf("."))
it.isNew = it.isAdded == "1"
// Log.d("VERDNATURA:","ORIGINAL QUANT"+it.originalQuantity)
it.originalQuantity =
if (it.originalQuantity != "-1") it.originalQuantity.substring(
0,
it.originalQuantity.indexOf(".")
) else it.quantity
// it.originalQuantity=it.originalQuantity.toInt().toString()
it.pickedQuantity =
if (it.isPrepared == "1" || it.isPreviousPrepared == "1" || it.isControlled == "1") it.quantity else it.pickedQuantity
if (!it.placements.isNullOrEmpty()) {
if (!it.placements.isNullOrEmpty()) {
it.placements.forEachIndexed { index, placement ->
if (index == 0) {
try {
@ -46,6 +53,7 @@ fun CollectionVO.map() : CollectionVO{
if (this.tickets == null || this.tickets.isEmpty()){
this.errorMessage = "La colección no tiene tickets"
}else{
this.errorMessage = "Error al construir la colección. Descripción del error:"+ e.message.toString()
}

View File

@ -72,6 +72,10 @@ class ControladorFragment : BaseFragment<FragmentControladorBinding,ControladorV
private fun setEvents(){
backButton.setOnClickListener {
requireActivity().onBackPressed()
}
scan_input.requestFocus()
scan_input.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {

View File

@ -0,0 +1,49 @@
package es.verdnatura.presentation.view.feature.historicoshelvinglog.adapter
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.databinding.ShelvinglogRowBinding
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLog
class ShelvingLogAdapter (
private val items: List<ShelvingLog>
): RecyclerView.Adapter<ShelvingLogAdapter.ItemHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
return ItemHolder(
ShelvinglogRowBinding.inflate(LayoutInflater.from(parent.context),parent,false)
)
}
override fun getItemCount() =items.size
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
holder.bind(items[position])
}
inner class ItemHolder(
val binding: ShelvinglogRowBinding
) : RecyclerView.ViewHolder(binding.root){
private val res = binding.root.context.resources
fun bind(item: ShelvingLog) {
binding.apply {
this.item = item
/* val sdf = SimpleDateFormat("yyyy-MM-dd")
val currentDate = sdf.format(Date())
if (currentDate == item.created){
saledate.setBackgroundColor(
ContextCompat.getColor(historicoDate.context,
R.color.verdnatura_pumpkin_orange))
}else{
saledate.setBackgroundColor(
ContextCompat.getColor(historicoDate.context,
R.color.verdnatura_black_5))
}*/
}
}
}
}

View File

@ -1,6 +1,4 @@
package es.verdnatura.presentation.view.feature.historicoshelvingparking.fragment
import es.verdnatura.presentation.view.feature.historicoshelving.fragment.itemShelvingLogViewModel
package es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment
import android.content.SharedPreferences
import android.view.View
@ -9,12 +7,13 @@ import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentItemshelvinglogBinding
import es.verdnatura.databinding.FragmentShelvinglogBinding
import es.verdnatura.domain.notNull
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.feature.historicoshelving.adapter.ItemShelvingLogAdapter
import es.verdnatura.presentation.view.feature.historicoshelvinglog.adapter.ShelvingLogAdapter
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.buyers_fragment.*
@ -28,32 +27,32 @@ import kotlinx.android.synthetic.main.fragment_itemshelvinglog.*
import kotlinx.android.synthetic.main.fragment_parking.*
import kotlinx.android.synthetic.main.toolbar.*
class ParkingShlelvingLog(
class shelvingLogFragment(
var entryPoint: String = ""
// ) : BaseFragment<FragmentItemdayofsaleCardBinding, itemShelvingLogViewModel>(itemShelvingLogViewModel::class) {
) : BaseFragment<FragmentItemshelvinglogBinding, itemShelvingLogViewModel>(
itemShelvingLogViewModel::class) {
) : BaseFragment<FragmentShelvinglogBinding, shelvingLogViewModel>(
shelvingLogViewModel::class) {
private lateinit var customDialogList: CustomDialogList
private var user = ""
private var password = ""
private var warehouseFk = ""
private var adapter: ItemShelvingLogAdapter? = null
private var adapter: ShelvingLogAdapter? = null
private var itemScan = ""
companion object {
fun newInstance(entryPoint: String) = ParkingShlelvingLog(entryPoint)
fun newInstance(entryPoint: String) = shelvingLogFragment(entryPoint)
}
private lateinit var customDialog: CustomDialog
override fun getLayoutId(): Int = R.layout.fragment_itemshelvinglog
override fun getLayoutId(): Int = R.layout.fragment_shelvinglog
override fun init() {
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
setEvents()
setToolBar(getString(R.string.itemShelvingLog))
setToolBar(getString(R.string.shelvingLog))
super.init()
}
@ -70,7 +69,7 @@ class ParkingShlelvingLog(
edit_itemFk.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (!edit_itemFk.text.toString().isNullOrEmpty()) {
itemShelvingLog_get(edit_itemFk.text.toString())
shelvingLog_get(edit_itemFk.text.toString())
itemScan = edit_itemFk.text.toString()
}
@ -91,13 +90,13 @@ class ParkingShlelvingLog(
private fun itemShelvingLog_get(vShelvingFK: String) {
private fun shelvingLog_get(vShelvingFK: String) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
user = prefs.getString(USER, "").toString()
password = prefs.getString(PASSWORD, "").toString()
warehouseFk = prefs.getInt(WAREHOUSEFK, 1).toString()
splash_progress.visibility = View.VISIBLE
viewModel.itemShelvingLog_get(user, password,vShelvingFK,"itemShelvingLog_get")
viewModel.shelvingLog_get(user, password,vShelvingFK,"shelvingLog_get")
}
@ -105,15 +104,14 @@ class ParkingShlelvingLog(
override fun observeViewModel() {
with(viewModel) {
loadItemShelvingLogList.observe(viewLifecycleOwner, Observer{ event ->
loadShelvingLogList.observe(viewLifecycleOwner, Observer{ event ->
event.getContentIfNotHandled().notNull {
splash_progress.visibility = View.GONE
adapter = ItemShelvingLogAdapter(it.list)
adapter = ShelvingLogAdapter(it.list)
itemshelvinglog_recyclerview.adapter = adapter
itemshelvinglog_recyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
setToolBar(getString(R.string.itemShelvingLog)+":"+itemScan)
setToolBar(getString(R.string.shelvingLog)+":"+itemScan)
// navigateToToday(it)
if (it.list.isEmpty()){
customDialog.setTitle("Sin resultados")
.setDescription("No se ha podido obtener datos de la etiqueta escaneada. ")

View File

@ -0,0 +1,89 @@
package es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.itemShelvingLogUSerCase
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLogList
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import timber.log.Timber.i
class shelvingLogViewModel(context: Context) : BaseViewModel() {
private val itemShelvingLogUSerCase: itemShelvingLogUSerCase =
itemShelvingLogUSerCase(context)
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
val response: LiveData<ResponseItemVO>
get() = _response
private val _itemShelvingLogList by lazy { MutableLiveData<ShelvingLogList>() }
val itemShelvingLogList: LiveData<ShelvingLogList>
get() = _itemShelvingLogList
val loadShelvingLogList = Transformations.map(_itemShelvingLogList) { Event(it) }
fun shelvingLog_get(usuario:String,password:String,vShelvingFK: String,callFunction:String){
itemShelvingLogUSerCase.shelvingLog_get(usuario,password,vShelvingFK).enqueue(object :
Callback<List<ShelvingLog>> {
override fun onFailure(call: Call<List<ShelvingLog>>, t: Throwable) {
val listError:ArrayList<ShelvingLog> = ArrayList()
listError.add(ShelvingLog(isError = true,errorMessage = getMessageFromAllResponse(callFunction,t.message!!)))
_itemShelvingLogList.value = ShelvingLogList(listError)
}
override fun onResponse(
call: Call<List<ShelvingLog>>,
response: Response<List<ShelvingLog>>
) {
if (!response.isSuccessful){
val listError:ArrayList<ShelvingLog> = ArrayList()
listError.add(ShelvingLog(isError = true,errorMessage = getMessageFromAllResponse(callFunction,response.message())))
_itemShelvingLogList.value = ShelvingLogList(listError)
}else{
if (response.body() != null)
{
i("crea la lista " + response.body())
_itemShelvingLogList.value = response.body()?.let {
ShelvingLogList(it)
}
i("finalizada la lista ${response.body()}")
}
}
}
})
}
}

View File

@ -0,0 +1,25 @@
package es.verdnatura.presentation.view.feature.historicoshelvinglog.model
class ShelvingLog(
var id:String = "",
var originFk:String = "",
var name:String = "",
var action:String = "",
var creationDate:String = "",
var description:String = "",
var changedModel:String = "",
var oldInstance:Boolean = false,
var newInstance:String = "",
var changedModelId:String = "",
var changedModelValue:String = "",
var isError:Boolean = false,
var errorMessage:String = ""
)
class ShelvingLogList(
var list:List<ShelvingLog> = listOf())

View File

@ -1,97 +0,0 @@
package es.verdnatura.presentation.view.feature.historicoshelvingparking.fragment
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.itemShelvingLogUSerCase
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDateList
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLogList
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvingparking.model.ParkingShelvingLog
import es.verdnatura.presentation.view.feature.historicoshelvingparking.model.ParkingShelvingLogList
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import timber.log.Timber.i
class ParkingShelvingLogViewModel(context: Context) : BaseViewModel() {
private val itemShelvingLogUSerCase: itemShelvingLogUSerCase =
itemShelvingLogUSerCase(context)
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
val response: LiveData<ResponseItemVO>
get() = _response
/* private val _itemShelvingSaleDateList by lazy { MutableLiveData<ItemShelvingSaleDateList>() }
val itemShelvingSaleDateList: LiveData<ItemShelvingSaleDateList>
get() = _itemShelvingSaleDateList*/
private val _parkingShelvingLogList by lazy { MutableLiveData<ParkingShelvingLogList>() }
val parkingShelvingLogList: LiveData<ParkingShelvingLogList>
get() = _parkingShelvingLogList
val loadParkingShelvingLogList = Transformations.map(_parkingShelvingLogList) { Event(it) }
fun parkingShelvingLog_get(usuario:String,password:String,vShelvingFK: String,callFunction:String){
itemShelvingLogUSerCase.parkingShelvingLog_get(usuario,password,vShelvingFK).enqueue(object :
Callback<List<ParkingShelvingLog>> {
override fun onFailure(call: Call<List<ParkingShelvingLog>>, t: Throwable) {
val listError:ArrayList<ParkingShelvingLog> = ArrayList()
listError.add(ParkingShelvingLog(isError = true,errorMessage = getMessageFromAllResponse(callFunction,t.message!!)))
_parkingShelvingLogList.value = ParkingShelvingLogList(listError)
}
override fun onResponse(
call: Call<List<ParkingShelvingLog>>,
response: Response<List<ParkingShelvingLog>>
) {
if (!response.isSuccessful){
val listError:ArrayList<ParkingShelvingLog> = ArrayList()
listError.add(ParkingShelvingLog(isError = true,errorMessage = getMessageFromAllResponse(callFunction,response.message())))
_parkingShelvingLogList.value = ParkingShelvingLogList(listError)
}else{
if (response.body() != null)
{
i("crea la lista " + response.body())
_parkingShelvingLogList.value = response.body()?.let {
ParkingShelvingLogList(it)
}
i("finalizada la lista ${response.body()}")
}
}
}
})
}
}

View File

@ -1,18 +0,0 @@
package es.verdnatura.presentation.view.feature.historicoshelvingparking.model
class ParkingShelvingLog(
var itemFk:String = "",
var longName:String = "",
var shelvingFk:String = "",
var visible:String = "",
var accion:String = "",
var created:String = "",
var code:String = "",
var isError:Boolean = false,
var errorMessage:String = ""
)
class ParkingShelvingLogList(
var list:List<ParkingShelvingLog> = listOf())

View File

@ -16,6 +16,7 @@ import es.verdnatura.presentation.view.feature.ajustes.fragment.AjustesFragment
import es.verdnatura.presentation.view.feature.articulo.fragment.ItemCardFragment
import es.verdnatura.presentation.view.feature.articulo.fragment.ItemProposalFragment
import es.verdnatura.presentation.view.feature.buffer.fragment.BufferFragment
import es.verdnatura.presentation.view.feature.buffer.fragment.BufferLoadFragment
import es.verdnatura.presentation.view.feature.buscaritem.fragment.BuscarItemFragment
import es.verdnatura.presentation.view.feature.calidad.fragment.BuyersFragment
import es.verdnatura.presentation.view.feature.calidad.fragment.QaualityFragment
@ -28,6 +29,7 @@ import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleFrag
import es.verdnatura.presentation.view.feature.faltas.fragment.FaltasFragment
import es.verdnatura.presentation.view.feature.historico.fragment.HistoricoFragment
import es.verdnatura.presentation.view.feature.historicoshelving.fragment.itemShelvingLogFragment
import es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment.shelvingLogFragment
import es.verdnatura.presentation.view.feature.historicovehiculo.fragment.HistoricoVehiculoFragment
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryFragment
import es.verdnatura.presentation.view.feature.main.model.ItemMenuVO
@ -402,6 +404,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
"Desactivado buffer" -> {
addFragmentOnTop(BufferFragment.newInstance("Desactivado buffer"))
}
"Cargar expedición en buffer"->{
addFragmentOnTop(BufferLoadFragment.newInstance("Cargar expedición en buffer"))
}
/*sergio:pruebas*/
"Pre Control" -> {
@ -410,6 +415,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
"Histórico Shelving" -> {
addFragmentOnTop(itemShelvingLogFragment.newInstance("Histórico Shelving"))
}
"Log Shelving" -> {
addFragmentOnTop(shelvingLogFragment.newInstance("Log Shelving"))
}
}

View File

@ -30,10 +30,16 @@ class PasilleroViewModel(context: Context) : BaseViewModel() {
*/
/*_pasillerositem.add(
/* _pasillerositem.add(
PasillerosItemVO(7,
R.drawable.ic_streetview_black_24dp,
"Pre Control",R.string.precontrolprevious)
)
_pasillerositem.add(
PasillerosItemVO(7,
R.drawable.ic_history_orange_24dp,
"Log Shelving",R.string.shelvingLog)
)*/
//sergio para que aparezca el nuevo menu
@ -197,6 +203,14 @@ class PasilleroViewModel(context: Context) : BaseViewModel() {
"Gestión de buffers", R.string.BuffersManegement
)
)
_pasillerositem.add(
PasillerosItemVO(
45,
R.drawable.buffer_load,
"Cargar expedición en buffer", R.string.bufferload
)
)
_pasillerositem.add(
PasillerosItemVO(
33,

View File

@ -226,7 +226,7 @@ class SacadorFragment :
adapter?.notifyDataSetChanged()
} else {
customDialog.setTitle("Atención")
.setDescription("La colección " + collection + " sigue pendiente de prepararr")
.setDescription("La colección " + collection + " sigue pendiente de preparar")
.setOkButton("Aceptar") {
customDialog.dismiss()
}.show()

View File

@ -102,6 +102,4 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
}

View File

@ -0,0 +1,8 @@
<!-- drawable/movie_plus_outline.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#F7931E" android:pathData="M13 19C13 19.34 13.04 19.67 13.09 20H4C2.9 20 2 19.11 2 18V6C2 4.89 2.9 4 4 4H5L7 8H10L8 4H10L12 8H15L13 4H15L17 8H20L18 4H22V13.81C21.39 13.46 20.72 13.22 20 13.09V10H5.76L4 6.47V18H13.09C13.04 18.33 13 18.66 13 19M20 18V15H18V18H15V20H18V23H20V20H23V18H20Z" />
</vector>

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<variable
name="viewModel"
type="es.verdnatura.presentation.view.feature.smarttag.sacador.model.SmartTagScan" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black">
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="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">
<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>
</layout>

View File

@ -0,0 +1,162 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColorHint="@android:color/darker_gray"
android:layout_marginTop="@dimen/toolbar_height">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edit_itemFk"
style="@style/InputLineTextSearch"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:hint="@string/Escaneaetiqueta"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Usuario"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:paddingLeft="@dimen/layout_margin_min"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Fecha"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Parking"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1.25"
android:gravity="right"
android:visibility="gone"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Acción"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:gravity="right"
android:paddingRight="@dimen/layout_margin_min"/>
</LinearLayout>
<LinearLayout
android:id="@+id/itemcard_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:orientation="vertical"
tools:ignore="ExtraText">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants">
<!--android:id="@+id/itemexpeditionstate_recyclerview"-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/itemshelvinglog_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/shelvinglog_row" />
</RelativeLayout>>
</LinearLayout>
</LinearLayout>
</ScrollView>
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="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>
</layout>

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tool="http://schemas.android.com/tools">
<data>
<variable
name="item"
type="es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLog" />
</data>
<LinearLayout
android:id="@+id/item_row_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/verdnatura_black_5"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min"
android:paddingTop="@dimen/layout_margin_min"
android:layout_gravity="center_horizontal"
android:paddingBottom="@dimen/layout_margin_min"
>
<TextView
android:id="@+id/itemFk"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{item.name}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:gravity="left"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{item.creationDate}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{item.action}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:paddingRight="@dimen/layout_margin_min"
android:gravity="right"/>
</LinearLayout>
<LinearLayout
android:id="@+id/item_rowsub_layout"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/verdnatura_black_5"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min"
android:paddingTop="@dimen/pasilleros_margin_main_menu"
>
<TextView
android:id="@+id/item2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{item.description}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="left"
/>
<TextView
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{item.description}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
</LinearLayout>
<ImageView
android:id="@+id/imageViewSeparator"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@android:drawable/divider_horizontal_bright"
android:background="@color/verdnatura_pumpkin_orange"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_black_9"/>
</LinearLayout>
</layout>

View File

@ -152,4 +152,6 @@
<string name="Referencia">Referencia</string>
<string name="precontrolprevious">Control Previa</string>
<string name="itemShelvingLog">Historico de ítems del carro</string>
<string name="shelvingLog">Histórico por matrícula</string>
<string name="bufferload">Cargar expedición en buffer</string>
</resources>

View File

@ -150,5 +150,7 @@
<string name="Referencia">Reference</string>
<string name="precontrolprevious">Control previous</string>
<string name="itemShelvingLog">Item Log</string>
<string name="shelvingLog">Shelving Log</string>
<string name="bufferload">Load buffer</string>
</resources>