paletizador

This commit is contained in:
Enrique Blasco 2020-05-27 01:21:56 +02:00
parent 1ee28e3dbe
commit e2c27ce2bc
37 changed files with 1777 additions and 11 deletions

View File

@ -12,8 +12,8 @@ android {
applicationId "es.verdnatura"
minSdkVersion 21
targetSdkVersion 29
versionCode 2
versionName "5.0.1"
versionCode 4
versionName "5.0.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -4,8 +4,11 @@ import es.verdnatura.presentation.view.feature.ajustes.fragment.AjustesViewModel
import es.verdnatura.presentation.view.feature.articulo.fragment.ItemCardViewModel
import es.verdnatura.presentation.view.feature.buscaritem.fragment.BuscarItemViewModel
import es.verdnatura.presentation.view.feature.faltas.fragment.FaltasViewModel
import es.verdnatura.presentation.view.feature.historico.fragment.HistoricoViewModel
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel
import es.verdnatura.presentation.view.feature.login.fragment.LoginViewModel
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionPalletViewModel
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionTruckListViewModel
import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroViewModel
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingViewModel
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemViewModel
@ -29,6 +32,11 @@ val viewModelModule = module{
ItemCardViewModel()
}
// Pasilleros / Item Card / Historico
viewModel {
HistoricoViewModel()
}
// Pasilleros / Buscar Item
viewModel {
BuscarItemViewModel()
@ -62,4 +70,13 @@ val viewModelModule = module{
viewModel {
AjustesViewModel()
}
// PALETIZADOR
viewModel {
ExpeditionTruckListViewModel()
}
viewModel {
ExpeditionPalletViewModel()
}
}

View File

@ -8,7 +8,7 @@ import java.util.concurrent.TimeUnit
class ApiUtils {
companion object {
//const val BASE_URL:String = "http://192.168.1.108:8000/"
//const val BASE_URL:String = "http://192.168.1.108:8008/"
const val BASE_URL:String = "https://app.verdnatura.es/"
fun getApiService():VerdnaturaService{
val retrofit = Retrofit.Builder()

View File

@ -1,6 +1,7 @@
package es.verdnatura.domain
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoVO
import retrofit2.Call
class GetItemCardUserCase : RestClient() {
@ -60,4 +61,11 @@ class GetItemCardUserCase : RestClient() {
params.add(delete)
return restClient!!.barcodes_edit("json","1",usuario,password,"application/json",params = params)
}
fun itemDiary(usuario:String,password:String,itemFk:String,warehouseFk: String) : Call<List<ItemHistoricoVO>> {
val params:ArrayList<String> = ArrayList();
params.add(itemFk)
params.add(warehouseFk)
return restClient!!.itemDiary("json","1",usuario,password,"application/json",params = params)
}
}

View File

@ -0,0 +1,35 @@
package es.verdnatura.domain
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemScanVO
import retrofit2.Call
class GetPaletizadoresUserCase: RestClient() {
fun expeditionTruckList(usuario:String,password:String) : Call<List<ItemExpeditionTruckVO>> {
val params:ArrayList<String> = ArrayList();
return restClient!!.expeditionTruckList("json","1",usuario,password,"application/json")
}
fun expeditionTruckAdd(usuario:String,password:String,vHour:String,vDescription:String) : Call<String> {
val params:ArrayList<String> = ArrayList();
params.add(vHour)
params.add(vDescription)
return restClient!!.expeditionTruckAdd("json","1",usuario,password,"application/json",params)
}
fun expeditionPallet_List(usuario:String,password:String,vTruckFk:String) : Call<List<ItemPalletVO>> {
val params:ArrayList<String> = ArrayList();
params.add(vTruckFk)
return restClient!!.expeditionPallet_List("json","1",usuario,password,"application/json",params)
}
fun expeditionScanAdd(usuario:String,password:String,vPalletFk:String,vTruckFk:String) : Call<List<ItemScanVO>> {
val params:ArrayList<String> = ArrayList();
params.add(vPalletFk)
params.add(vTruckFk)
return restClient!!.expeditionScanAdd("json","1",usuario,password,"application/json",params)
}
}

View File

@ -6,7 +6,11 @@ import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoVO
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemScanVO
import es.verdnatura.presentation.view.feature.shelvingparking.model.ItemShelvingParkingVO
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
import retrofit2.Call
@ -51,13 +55,22 @@ interface VerdnaturaService {
//PASILLEROS ========================================================================>
//CONSULTAR ARTICULO ========================================================================>
@POST("almacennew/item_card")
fun getItemCard(@Header("aplicacion") aplicacion: String,
@POST("almacennew/itemDiary")
fun itemDiary(@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<List<ItemHistoricoVO>>
@POST("almacennew/item_card")
fun getItemCard(@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<ItemCardVO>
@POST("almacennew/itemStockUpdate")
@ -236,5 +249,40 @@ interface VerdnaturaService {
@Body params: List<String>):
Call<String>
//PALETIZADORES ========================================================================>
@POST("almacennew/expeditionTruckList")
fun expeditionTruckList(@Header("aplicacion") aplicacion: String,
@Header("version") version: String,
@Header("user") user: String,
@Header("pass") pass: String,
@Header("Content-Type") content_type: String):
Call<List<ItemExpeditionTruckVO>>
@POST("almacennew/expeditionTruckAdd")
fun expeditionTruckAdd(@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>
@POST("almacennew/expeditionPalletList")
fun expeditionPallet_List(@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<List<ItemPalletVO>>
@POST("almacennew/expeditionScanAdd")
fun expeditionScanAdd(@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<List<ItemScanVO>>
}

View File

@ -11,6 +11,7 @@ import androidx.fragment.app.Fragment
import org.koin.androidx.viewmodel.ext.android.viewModel
import kotlin.reflect.KClass
abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelClass: KClass<V>) :
Fragment() {
@ -59,4 +60,6 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
lifecycle.addObserver(this@BaseFragment.viewModel)
addBindingVariables()
}
}

View File

@ -7,6 +7,8 @@ import es.verdnatura.presentation.view.feature.articulo.model.ItemCardRowVO
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
@ -58,3 +60,11 @@ interface OnVisibleClickListener {
interface OnMoreClickListener {
fun onMoreClickListener(item: ItemUbicadorVO)
}
interface OnTruckClickListener {
fun onTruckClickListener(item: ItemExpeditionTruckVO,entryPoint: String)
}
interface OnPalletClickListener {
fun onPalletClickListener(item: ItemPalletVO,entryPoint: String)
}

View File

@ -0,0 +1,84 @@
package es.verdnatura.presentation.view.component
import android.app.Dialog
import android.app.TimePickerDialog
import android.content.Context
import android.view.View
import com.google.android.material.textfield.TextInputEditText
import es.verdnatura.R
import kotlinx.android.synthetic.main.component_custom_hour.*
import java.text.SimpleDateFormat
import java.util.*
class CustomDialogHour(context: Context) : Dialog(context, R.style.DialogTheme) {
init {
setContentView(R.layout.component_custom_hour)
}
fun getDestinoEditText(): TextInputEditText {
return custom_dialog_destino_value
}
fun getDestinoValue(): String {
return custom_dialog_destino_value.text.toString()
}
fun setDestinoValue(value: String): CustomDialogHour {
custom_dialog_destino_value.setText(value)
custom_dialog_destino_value.visibility = View.VISIBLE
return this
}
fun getHoraEditText(): TextInputEditText {
return custom_dialog_hour_value
}
fun getHoraValue(): String {
return custom_dialog_hour_value.text.toString()
}
fun setHoraValue(value: String): CustomDialogHour {
custom_dialog_hour_value.setText(value)
custom_dialog_hour_value.visibility = View.VISIBLE
ib_obtener_hora.setOnClickListener {
val cal = Calendar.getInstance()
val timeSetListener = TimePickerDialog.OnTimeSetListener { timePicker, hour, minute ->
cal.set(Calendar.HOUR_OF_DAY, hour)
cal.set(Calendar.MINUTE, minute)
custom_dialog_hour_value.setText(SimpleDateFormat("HH:mm").format(cal.time))
}
TimePickerDialog(context, timeSetListener, cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), true).show()
}
return this
}
fun setTitle(title: String): CustomDialogHour {
custom_dialog_title.visibility = View.VISIBLE
custom_dialog_title.text = title
return this
}
fun setDescription(description: String): CustomDialogHour {
custom_dialog_description.visibility = View.VISIBLE
custom_dialog_description.text = description
return this
}
fun setOkButton(text: String, onButtonClicked: () -> Unit): CustomDialogHour {
custom_dialog_button_ok.visibility = View.VISIBLE
custom_dialog_button_ok.text = text
custom_dialog_button_ok.setOnClickListener { onButtonClicked() }
return this
}
fun setKoButton(text: String, onButtonClicked: () -> Unit): CustomDialogHour {
custom_dialog_button_ko.visibility = View.VISIBLE
custom_dialog_button_ko.text = text
custom_dialog_button_ko.setOnClickListener { onButtonClicked() }
return this
}
}

View File

@ -11,6 +11,7 @@ import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentItemCardBinding
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnBarcodeRowClickListener
import es.verdnatura.presentation.common.OnItemCardRowClickListener
@ -73,16 +74,28 @@ class ItemCardFragment(
super.init()
}
private fun setToolBar(){
val listIcons:ArrayList<Drawable> = ArrayList()
val iconReload : Drawable = resources.getDrawable(R.drawable.ic_autorenew_black_24dp,resources.newTheme())
val iconHistory : Drawable = resources.getDrawable(R.drawable.ic_history_black_24dp,resources.newTheme())
listIcons.add(iconReload)
listIcons.add(iconHistory)
toolbar_icons.adapter = ToolBarAdapter(listIcons,object: OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
if (item == iconReload){
splash_progress.visibility = View.VISIBLE
getItemCard(itemFk)
}
if (item == iconHistory){
if (itemFk.isNullOrEmpty()){
"Escanea un item".toast(activity!!)
}else{
(activity as MainActivity).onPasillerosItemClickListener( PasillerosItemVO(title = "Historico"),itemFk)
}
}
}
})

View File

@ -44,3 +44,5 @@ class BarcodeVO(
var code:String? = ""
)

View File

@ -0,0 +1,46 @@
package es.verdnatura.presentation.view.feature.historico.adapter
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R
import es.verdnatura.databinding.ItemHistoricoRowBinding
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoVO
import java.text.SimpleDateFormat
import java.util.*
class HistoricoAdapter (
private val items: List<ItemHistoricoVO>
): RecyclerView.Adapter<HistoricoAdapter.ItemHolder> () {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
return ItemHolder(
ItemHistoricoRowBinding.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: ItemHistoricoRowBinding
) : RecyclerView.ViewHolder(binding.root){
private val res = binding.root.context.resources
fun bind(item: ItemHistoricoVO) {
binding.apply {
this.item = item
val sdf = SimpleDateFormat("yyyy-MM-dd")
val currentDate = sdf.format(Date())
if (currentDate == item.date){
historicoDate.setBackgroundColor(res.getColor(R.color.verdnatura_pumpkin_orange))
}else{
historicoDate.setBackgroundColor(res.getColor(R.color.verdnatura_black_5))
}
}
}
}
}

View File

@ -0,0 +1,94 @@
package es.verdnatura.presentation.view.feature.historico.fragment
import android.content.SharedPreferences
import android.view.View
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentHistoricoBinding
import es.verdnatura.domain.notNull
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.component.CustomDialogInput
import es.verdnatura.presentation.view.feature.historico.adapter.HistoricoAdapter
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoListVO
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_historico.*
import kotlinx.android.synthetic.main.toolbar.*
import java.text.SimpleDateFormat
import java.util.*
class HistoricoFragment(
var itemFk:String = ""
) : BaseFragment<FragmentHistoricoBinding, HistoricoViewModel>(
HistoricoViewModel::class) {
private var user = ""
private var password = ""
private var sectorFk = ""
private var warehouseFk = ""
private var adapter : HistoricoAdapter? = null
private lateinit var customDialogInput: CustomDialogInput
private lateinit var customDialog: CustomDialog
companion object {
fun newInstance(entryPoint:String) = HistoricoFragment(entryPoint)
}
override fun getLayoutId(): Int = R.layout.fragment_historico
override fun init() {
val prefs: SharedPreferences = activity!!.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()
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
activity!!.main_bottom_navigation.visibility = View.GONE
viewModel.itemDiary(user,password,itemFk,warehouseFk)
toolbar_title.text = "itemDiary"
setEvents()
super.init()
}
private fun setEvents(){
backButton.setOnClickListener {
activity!!.onBackPressed()
}
}
override fun observeViewModel() {
with(viewModel){
loadHistoricoList.observe(viewLifecycleOwner, Observer { event ->
event.getContentIfNotHandled().notNull {
splash_progress.visibility = View.GONE
adapter = HistoricoAdapter(it.list)
historico_recyclerview.adapter = adapter
historico_recyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
navigateToToday(it)
}
})
}
}
private fun navigateToToday(it:ItemHistoricoListVO){
var positionToday = 0
val sdf = SimpleDateFormat("yyyy-MM-dd")
val currentDate = sdf.format(Date())
for (item in it.list){
if (currentDate == item.date){
break
}
positionToday += 1
}
historico_recyclerview.scrollToPosition(positionToday)
}
}

View File

@ -0,0 +1,56 @@
package es.verdnatura.presentation.view.feature.historico.fragment
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.GetItemCardUserCase
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoListVO
import es.verdnatura.presentation.view.feature.historico.model.ItemHistoricoVO
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
class HistoricoViewModel : BaseViewModel() {
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase()
private val _historicoList by lazy { MutableLiveData<ItemHistoricoListVO>() }
val historicoList: LiveData<ItemHistoricoListVO>
get() = _historicoList
val loadHistoricoList = Transformations.map(_historicoList) { Event(it) }
fun itemDiary(usuario:String,password:String,itemFk:String,vWarehouseFk:String){
getItemCardUserCase.itemDiary(usuario,password,itemFk,vWarehouseFk).enqueue(object :
Callback<List<ItemHistoricoVO>> {
override fun onFailure(call: Call<List<ItemHistoricoVO>>, t: Throwable) {
val listError:ArrayList<ItemHistoricoVO> = ArrayList()
listError.add(ItemHistoricoVO(isError = true,errorMessage = t.message!!))
_historicoList.value = ItemHistoricoListVO(listError)
}
override fun onResponse(
call: Call<List<ItemHistoricoVO>>,
response: Response<List<ItemHistoricoVO>>
) {
if (response.body() != null){
_historicoList.value = response.body()?.let { ItemHistoricoListVO(it) }
}else{
val listError:ArrayList<ItemHistoricoVO> = ArrayList()
listError.add(ItemHistoricoVO(isError = true,errorMessage = "Error en la llamada de shelvingParking_get"))
_historicoList.value = ItemHistoricoListVO(listError)
}
}
})
}
}

View File

@ -0,0 +1,19 @@
package es.verdnatura.presentation.view.feature.historico.model
class ItemHistoricoVO (
var date:String = "",
var stateName:String = "",
var origin:String = "",
var reference: String = "",
var clientFk: String = "",
var name:String = "",
var invalue:String = "-",
var out:String = "-",
var balance:String = "-",
var isError:Boolean = false,
var errorMessage:String = ""
)
class ItemHistoricoListVO(
var list:List<ItemHistoricoVO> = listOf()
)

View File

@ -98,7 +98,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding,LoginViewModel> (LoginVi
}.show()
}else{
customDialog.setTitle("Error").setDescription("Existe una versión nueva, es recomendable actualizar.").setOkButton("Actualizar"){
customDialog.setTitle("Actualizar").setDescription("Existe una versión nueva, es recomendable actualizar.").setOkButton("Actualizar"){
val openURL = Intent(Intent.ACTION_VIEW)
openURL.data = Uri.parse("https://app.verdnatura.es/bin/vn-pickingV2.apk")
startActivity(openURL)

View File

@ -10,16 +10,19 @@ import es.verdnatura.R
import es.verdnatura.databinding.ActivityMainBinding
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseActivity
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.common.TAG
import es.verdnatura.presentation.common.addFragment
import es.verdnatura.presentation.common.*
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.ajustes.fragment.AjustesFragment
import es.verdnatura.presentation.view.feature.articulo.fragment.ItemCardFragment
import es.verdnatura.presentation.view.feature.buscaritem.fragment.BuscarItemFragment
import es.verdnatura.presentation.view.feature.faltas.fragment.FaltasFragment
import es.verdnatura.presentation.view.feature.historico.fragment.HistoricoFragment
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryFragment
import es.verdnatura.presentation.view.feature.main.model.ItemMenuVO
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionPalletFragment
import es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionTruckListFragment
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroFragment
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingFragment
@ -31,7 +34,8 @@ import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
class MainActivity : BaseActivity<ActivityMainBinding>() , OnPasillerosItemClickListener {
class MainActivity : BaseActivity<ActivityMainBinding>() , OnPasillerosItemClickListener,
OnTruckClickListener, OnPalletClickListener {
private var lastBottomMenuItemSelected: ItemMenuVO? = null
private lateinit var customDialog: CustomDialog
@ -73,7 +77,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() , OnPasillerosItemClick
applicationContext,R.drawable.ic_verified_user_black_24dp),selectedImage = ContextCompat.getDrawable(
applicationContext,R.drawable.ic_verified_user_black_24dp_selected)))
bottomMenuItems.add(ItemMenuVO(3,title = "Ajustes",defaultImage = ContextCompat.getDrawable(
bottomMenuItems.add(ItemMenuVO(3,title = "Paletizadores",defaultImage = ContextCompat.getDrawable(
applicationContext,R.drawable.ic_local_shipping_black_24dp),selectedImage = ContextCompat.getDrawable(
applicationContext,R.drawable.ic_local_shipping_black_24dp_selected)))
bottomMenuItems.add(ItemMenuVO(4,title = "Ajustes",defaultImage = ContextCompat.getDrawable(
applicationContext,R.drawable.ic_build_black_24dp),selectedImage = ContextCompat.getDrawable(
applicationContext,R.drawable.ic_build_black_24dp_selected)))
@ -123,6 +131,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>() , OnPasillerosItemClick
"Función Controladores desactivada".toast(this@MainActivity)
true
}
"Paletizadores" -> {
fm.popBackStack(null,FragmentManager.POP_BACK_STACK_INCLUSIVE)
addFragment(ExpeditionTruckListFragment.newInstance(),R.id.main_frame_layout, ExpeditionTruckListFragment.TAG,false)
true
}
"Ajustes" -> {
fm.popBackStack(null,FragmentManager.POP_BACK_STACK_INCLUSIVE)
addFragment(AjustesFragment.newInstance(),R.id.main_frame_layout, AjustesFragment.TAG,false)
@ -148,6 +161,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>() , OnPasillerosItemClick
"Buscar item" -> {
addFragmentOnTop(BuscarItemFragment.newInstance(entryPoint))
}
"Historico" -> {
addFragmentOnTop(HistoricoFragment.newInstance(entryPoint))
}
"Inventario" -> {
addFragmentOnTop(InventaryFragment.newInstance())
}
@ -192,4 +208,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>() , OnPasillerosItemClick
}
override fun onTruckClickListener(item: ItemExpeditionTruckVO, entryPoint: String) {
addFragmentOnTop(ExpeditionPalletFragment.newInstance(item))
}
override fun onPalletClickListener(item: ItemPalletVO, entryPoint: String) {
// addFragmentOnTop(ItemCardFragment.newInstance(entryPoint))
}
}

View File

@ -0,0 +1,41 @@
package es.verdnatura.presentation.view.feature.paletizador.adapter
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.databinding.ItemExpeditiontruckRowBinding
import es.verdnatura.presentation.common.OnTruckClickListener
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
class ExpeditionListAdapter (
private val items: List<ItemExpeditionTruckVO>,
private val onTruckClickListener: OnTruckClickListener
): RecyclerView.Adapter<ExpeditionListAdapter.ItemHolder> () {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
return ItemHolder(
ItemExpeditiontruckRowBinding.inflate(LayoutInflater.from(parent.context),parent,false)
)
}
override fun getItemCount() =items.size
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
holder.bind(items[position])
holder.binding.root.setOnClickListener {
onTruckClickListener.onTruckClickListener(items[position],"")
}
}
inner class ItemHolder(
val binding: ItemExpeditiontruckRowBinding
) : RecyclerView.ViewHolder(binding.root){
private val res = binding.root.context.resources
fun bind(item: ItemExpeditionTruckVO) {
binding.apply {
this.item = item
}
}
}
}

View File

@ -0,0 +1,50 @@
package es.verdnatura.presentation.view.feature.paletizador.adapter
import android.content.Context
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R
import es.verdnatura.databinding.ItemExpeditionpalletRowBinding
import es.verdnatura.presentation.common.OnPalletClickListener
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
class ExpeditionPalletAdapter (
private val items: List<ItemPalletVO>,
private val onPalletClickListener: OnPalletClickListener
): RecyclerView.Adapter<ExpeditionPalletAdapter.ItemHolder> () {
private var context:Context? = null
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
this.context = parent.context
return ItemHolder(
ItemExpeditionpalletRowBinding.inflate(LayoutInflater.from(parent.context),parent,false)
)
}
override fun getItemCount() =items.size
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
holder.bind(items[position])
holder.binding.root.setOnClickListener {
onPalletClickListener.onPalletClickListener(items[position],"")
}
}
inner class ItemHolder(
val binding: ItemExpeditionpalletRowBinding
) : RecyclerView.ViewHolder(binding.root){
private val res = binding.root.context.resources
fun bind(item: ItemPalletVO) {
binding.apply {
this.item = item
if (item.Rutas != "1"){
expeditionPalletRutas.setTextColor(ContextCompat.getColor(context!!, R.color.verdnatura_red))
}else {
expeditionPalletRutas.setTextColor(ContextCompat.getColor(context!!, R.color.verdnatura_white))
}
}
}
}
}

View File

@ -0,0 +1,195 @@
package es.verdnatura.presentation.view.feature.paletizador.fragment
import android.content.Context
import android.content.SharedPreferences
import android.graphics.drawable.Drawable
import android.os.Bundle
import android.view.View
import android.view.inputmethod.EditorInfo
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentExpeditionPalletBinding
import es.verdnatura.domain.notNull
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnBarcodeRowClickListener
import es.verdnatura.presentation.common.OnOptionsSelectedListener
import es.verdnatura.presentation.common.OnPalletClickListener
import es.verdnatura.presentation.view.component.CustomDialogHour
import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionPalletAdapter
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletListVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemScanList
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.fragment_expedition_pallet.*
import kotlinx.android.synthetic.main.toolbar.*
import java.text.SimpleDateFormat
import java.util.*
import kotlin.collections.ArrayList
class ExpeditionPalletFragment(
var itemExpeditionTruckVO: ItemExpeditionTruckVO? = null
) : BaseFragment<FragmentExpeditionPalletBinding, ExpeditionPalletViewModel>(
ExpeditionPalletViewModel::class) {
private var user = ""
private var password = ""
private var sectorFk = ""
private var warehouseFk = ""
private var adapter : ExpeditionPalletAdapter? = null
private var onPalletClickListener: OnPalletClickListener? = null
private lateinit var customDialogList: CustomDialogList
private var listExpeditions:ArrayList<BarcodeVO> = ArrayList()
private var expeditionAdapter : BarcodeAdapter? = null
companion object {
fun newInstance(item: ItemExpeditionTruckVO) =
ExpeditionPalletFragment(item)
}
override fun onAttach(context: Context) {
if (context is OnPalletClickListener) onPalletClickListener = context
super.onAttach(context)
}
override fun getLayoutId(): Int = R.layout.fragment_expedition_pallet
override fun onCreate(savedInstanceState: Bundle?) {
val prefs: SharedPreferences = activity!!.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()
super.onCreate(savedInstanceState)
}
override fun init() {
customDialogList = CustomDialogList(requireContext())
splash_progress.visibility = View.VISIBLE
activity!!.main_bottom_navigation.visibility = View.GONE
toolbar_title.text = getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + itemExpeditionTruckVO!!.Destino
setToolBar()
setEvents()
viewModel.expeditionPallet_List(user,password,itemExpeditionTruckVO!!.truckFk)
super.init()
}
private fun setEvents(){
backButton.setOnClickListener {
activity!!.onBackPressed()
}
}
private fun setToolBar(){
val listIcons:ArrayList<Drawable> = ArrayList()
val iconReload : Drawable = resources.getDrawable(R.drawable.ic_autorenew_black_24dp,resources.newTheme())
val iconPlus : Drawable = resources.getDrawable(R.drawable.ic_add_black_24dp,resources.newTheme())
listIcons.add(iconReload)
listIcons.add(iconPlus)
toolbar_icons.adapter = ToolBarAdapter(listIcons,object: OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
if (item == iconReload){
splash_progress.visibility = View.VISIBLE
viewModel.expeditionPallet_List(user,password,itemExpeditionTruckVO!!.truckFk)
}else if(item == iconPlus){
expeditionScanAdd()
}
}
})
toolbar_icons.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
}
private fun getCURDATE(date:String):String{
val c = Calendar.getInstance()
val df = SimpleDateFormat("yyyy-mm-dd HH:mm")
val df2 = SimpleDateFormat("HH:mm")
c.time = df.parse(date)
return df2.format(c.time);
}
override fun observeViewModel() {
with(viewModel){
loadExpeditionPalletList.observe(viewLifecycleOwner, Observer { event ->
event.getContentIfNotHandled().notNull {printExpeditionList(it) }
})
loadScanList.observe(viewLifecycleOwner, Observer { event ->
event.getContentIfNotHandled().notNull {showScanExpeditions(it) }
})
}
}
private fun printExpeditionList(it: ItemPalletListVO){
splash_progress.visibility = View.GONE
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
adapter = ExpeditionPalletAdapter(it.list,onPalletClickListener!!)
expedition_pallet_recyclerview.adapter = adapter
expedition_pallet_recyclerview.layoutManager = lm
}
private fun expeditionScanAdd(){
splash_progress.visibility = View.VISIBLE
viewModel.expeditionScanAdd(usuario = user,password = password,vPalletFk = "0",vTruckFk = itemExpeditionTruckVO!!.truckFk)
}
private fun showScanExpeditions(it:ItemScanList){
splash_progress.visibility = View.GONE
it.list.forEach {
listExpeditions.add(BarcodeVO(code = it.expeditionFk))
}
customDialogList.setTitle("Expedition ("+toolbar_title.text+")").setOkButton("Comprobar"){
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
splash_progress.visibility = View.VISIBLE
viewModel.expeditionPallet_List(user,password,itemExpeditionTruckVO!!.truckFk)
listExpeditions = ArrayList()
customDialogList.hide()
}.setKoButton("Cerrar"){
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
splash_progress.visibility = View.VISIBLE
viewModel.expeditionPallet_List(user,password,itemExpeditionTruckVO!!.truckFk)
listExpeditions = ArrayList()
customDialogList.hide()
}.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) {
if (!customDialogList.getValue().isNullOrEmpty()){
listExpeditions.add(BarcodeVO(code = customDialogList.getValue()))
expeditionAdapter!!.notifyDataSetChanged()
}
customDialogList.setValue("")
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
return@setOnEditorActionListener true
}
false
}
expeditionAdapter = BarcodeAdapter(listExpeditions,object: OnBarcodeRowClickListener {
override fun onBarcodeRowClickListener(item: BarcodeVO) {
listExpeditions.remove(item)
expeditionAdapter!!.notifyDataSetChanged()
}
})
customDialogList.getRecyclerView().adapter = expeditionAdapter
customDialogList.getRecyclerView().layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
}
}

View File

@ -0,0 +1,79 @@
package es.verdnatura.presentation.view.feature.paletizador.fragment
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.GetPaletizadoresUserCase
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletListVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemScanList
import es.verdnatura.presentation.view.feature.paletizador.model.ItemScanVO
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
class ExpeditionPalletViewModel : BaseViewModel() {
private val getPaletizadoresUserCase: GetPaletizadoresUserCase = GetPaletizadoresUserCase()
private val _expeditionPalletList by lazy { MutableLiveData<ItemPalletListVO>() }
val loadExpeditionPalletList = Transformations.map(_expeditionPalletList) { Event(it) }
private val _scanList by lazy { MutableLiveData<ItemScanList>() }
val loadScanList = Transformations.map(_scanList) { Event(it) }
fun expeditionPallet_List(usuario:String,password:String,vTruckFk:String){
getPaletizadoresUserCase.expeditionPallet_List(usuario,password,vTruckFk).enqueue(object :
Callback<List<ItemPalletVO>> {
override fun onFailure(call: Call<List<ItemPalletVO>>, t: Throwable) {
val listError:ArrayList<ItemPalletVO> = ArrayList()
listError.add(ItemPalletVO(isError = true,errorMessage = t.message!!))
_expeditionPalletList.value = ItemPalletListVO(listError)
}
override fun onResponse(
call: Call<List<ItemPalletVO>>,
response: Response<List<ItemPalletVO>>
) {
if (response.body() != null){
_expeditionPalletList.value = response.body()?.let { ItemPalletListVO(it) }
}else{
val listError:ArrayList<ItemPalletVO> = ArrayList()
listError.add(ItemPalletVO(isError = true,errorMessage = "Error en la llamada de expeditionTruck_List"))
_expeditionPalletList.value = ItemPalletListVO(listError)
}
}
})
}
fun expeditionScanAdd(usuario:String,password:String,vPalletFk:String,vTruckFk:String){
getPaletizadoresUserCase.expeditionScanAdd(usuario,password,vPalletFk,vTruckFk).enqueue(object :
Callback<List<ItemScanVO>> {
override fun onFailure(call: Call<List<ItemScanVO>>, t: Throwable) {
val listError:ArrayList<ItemScanVO> = ArrayList()
listError.add(ItemScanVO(isError = true,errorMessage = t.message!!))
_scanList.value = ItemScanList(listError)
}
override fun onResponse(
call: Call<List<ItemScanVO>>,
response: Response<List<ItemScanVO>>
) {
if (response.body() != null){
_scanList.value = response.body()?.let { ItemScanList(it) }
}else{
val listError:ArrayList<ItemScanVO> = ArrayList()
listError.add(ItemScanVO(isError = true,errorMessage = "Error en la llamada de expeditionTruck_List"))
_scanList.value = ItemScanList(listError)
}
}
})
}
}

View File

@ -0,0 +1,160 @@
package es.verdnatura.presentation.view.feature.paletizador.fragment
import android.content.Context
import android.content.SharedPreferences
import android.graphics.drawable.Drawable
import android.os.Bundle
import android.view.View
import android.view.inputmethod.EditorInfo
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentExpeditionTruckListBinding
import es.verdnatura.domain.notNull
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnOptionsSelectedListener
import es.verdnatura.presentation.common.OnTruckClickListener
import es.verdnatura.presentation.view.component.CustomDialogHour
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionListAdapter
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckList
import kotlinx.android.synthetic.main.fragment_expedition_truck_list.*
import kotlinx.android.synthetic.main.toolbar.*
import java.text.SimpleDateFormat
import java.util.*
import kotlin.collections.ArrayList
import java.util.Calendar.getInstance as getInstance1
class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBinding, ExpeditionTruckListViewModel>(
ExpeditionTruckListViewModel::class) {
private var user = ""
private var password = ""
private var sectorFk = ""
private var warehouseFk = ""
private var adapter : ExpeditionListAdapter? = null
private lateinit var customDialogHor: CustomDialogHour
private var onTruckClickListener: OnTruckClickListener? = null
companion object {
fun newInstance() = ExpeditionTruckListFragment()
}
override fun onAttach(context: Context) {
if (context is OnTruckClickListener) onTruckClickListener = context
super.onAttach(context)
}
override fun getLayoutId(): Int = R.layout.fragment_expedition_truck_list
override fun onCreate(savedInstanceState: Bundle?) {
val prefs: SharedPreferences = activity!!.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()
super.onCreate(savedInstanceState)
}
override fun init() {
customDialogHor = CustomDialogHour(requireContext())
splash_progress.visibility = View.VISIBLE
toolbar_title.text = "PScan: "+getCURDATE()
backButton.visibility = View.GONE
setToolBar()
viewModel.expeditionTruckList(user,password)
super.init()
}
private fun setToolBar(){
val listIcons:ArrayList<Drawable> = ArrayList()
val iconReload : Drawable = resources.getDrawable(R.drawable.ic_autorenew_black_24dp,resources.newTheme())
val iconPlus : Drawable = resources.getDrawable(R.drawable.ic_add_black_24dp,resources.newTheme())
listIcons.add(iconReload)
listIcons.add(iconPlus)
toolbar_icons.adapter = ToolBarAdapter(listIcons,object: OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
if (item == iconReload){
splash_progress.visibility = View.VISIBLE
viewModel.expeditionTruckList(user,password)
}else if(item == iconPlus){
addTruck()
}
}
})
toolbar_icons.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
}
private fun getCURDATE():String{
val c: Date = getInstance1().getTime()
val df = SimpleDateFormat("dd/MM/yyyy")
return df.format(c);
}
override fun observeViewModel() {
with(viewModel){
loadExpeditionTruckList.observe(viewLifecycleOwner, Observer { event ->
event.getContentIfNotHandled().notNull {printExpeditionList(it) }
})
loadResponseExpeditionAdd.observe(viewLifecycleOwner, Observer { event ->
viewModel.expeditionTruckList(user,password)
})
}
}
private fun printExpeditionList(it: ItemExpeditionTruckList){
splash_progress.visibility = View.GONE
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
adapter = ExpeditionListAdapter(it.list,onTruckClickListener!!)
expedition_truck_recyclerview.adapter = adapter
expedition_truck_recyclerview.layoutManager = lm
}
private fun addTruck(){
customDialogHor.setTitle("Nuevo Camión").setOkButton("Guardar"){
(activity as MainActivity).hideKeyboard(customDialogHor.getDestinoEditText())
if (!customDialogHor.getDestinoValue().isNullOrEmpty() && !customDialogHor.getHoraValue().isNullOrEmpty()){
viewModel.expeditionTruckAdd(user,password,customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
splash_progress.visibility = View.VISIBLE
customDialogHor.dismiss()
}
(activity as MainActivity).hideKeyboard(customDialogHor.getDestinoEditText())
customDialogHor.dismiss()
}.setKoButton("Cancelar"){
customDialogHor.dismiss()
}.setHoraValue("").setDestinoValue("").show()
customDialogHor.getDestinoEditText().requestFocus()
customDialogHor.getDestinoEditText().setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!customDialogHor.getDestinoValue().isNullOrEmpty() && !customDialogHor.getHoraValue().isNullOrEmpty()){
viewModel.expeditionTruckAdd(user,password,customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
splash_progress.visibility = View.VISIBLE
customDialogHor.dismiss()
}
return@setOnEditorActionListener true
}
(activity as MainActivity).hideKeyboard(customDialogHor.getDestinoEditText())
false
}
}
}

View File

@ -0,0 +1,72 @@
package es.verdnatura.presentation.view.feature.paletizador.fragment
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.GetPaletizadoresUserCase
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckList
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
class ExpeditionTruckListViewModel : BaseViewModel() {
private val getPaletizadoresUserCase: GetPaletizadoresUserCase = GetPaletizadoresUserCase()
private val _expeditionTruckList by lazy { MutableLiveData<ItemExpeditionTruckList>() }
val loadExpeditionTruckList = Transformations.map(_expeditionTruckList) { Event(it) }
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
val loadResponseExpeditionAdd = Transformations.map(_response) { Event(it) }
fun expeditionTruckList(usuario:String,password:String){
getPaletizadoresUserCase.expeditionTruckList(usuario,password).enqueue(object :
Callback<List<ItemExpeditionTruckVO>> {
override fun onFailure(call: Call<List<ItemExpeditionTruckVO>>, t: Throwable) {
val listError:ArrayList<ItemExpeditionTruckVO> = ArrayList()
listError.add(ItemExpeditionTruckVO(isError = true,errorMessage = t.message!!))
_expeditionTruckList.value = ItemExpeditionTruckList(listError)
}
override fun onResponse(
call: Call<List<ItemExpeditionTruckVO>>,
response: Response<List<ItemExpeditionTruckVO>>
) {
if (response.body() != null){
_expeditionTruckList.value = response.body()?.let { ItemExpeditionTruckList(it) }
}else{
val listError:ArrayList<ItemExpeditionTruckVO> = ArrayList()
listError.add(ItemExpeditionTruckVO(isError = true,errorMessage = "Error en la llamada de expeditionTruck_List"))
_expeditionTruckList.value = ItemExpeditionTruckList(listError)
}
}
})
}
fun expeditionTruckAdd(usuario:String,password:String,vHour:String,vDescription:String){
getPaletizadoresUserCase.expeditionTruckAdd(usuario,password,vHour,vDescription).enqueue(object : Callback<String>{
override fun onFailure(call: Call<String>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage = "Error al guardar CAMIÓN "+vDescription+ " Respuesta:"+t.message!!)
}
override fun onResponse(call: Call<String>, response: Response<String>) {
if (response.body() == null){
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada expeditionTruckAdd")
}else{
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
}
}
})
}
}

View File

@ -0,0 +1,15 @@
package es.verdnatura.presentation.view.feature.paletizador.model
class ItemExpeditionTruckVO (
var truckFk:String = "",
var ETD:String = "",
var Destino:String = "",
var isError:Boolean = false,
var errorMessage:String = ""
)
class ItemExpeditionTruckList(
var list: List<ItemExpeditionTruckVO> = listOf()
)

View File

@ -0,0 +1,14 @@
package es.verdnatura.presentation.view.feature.paletizador.model
class ItemPalletVO(
var Pallet:String = "",
var Rutas:String = "",
var Eti:String = "",
var isError: Boolean = false,
var errorMessage: String = ""
)
class ItemPalletListVO(
var list:List<ItemPalletVO> = listOf()
)

View File

@ -0,0 +1,12 @@
package es.verdnatura.presentation.view.feature.paletizador.model
class ItemScanVO (
var expeditionFk:String = "",
var palletFk:String = "",
var isError:Boolean = false,
var errorMessage:String = ""
)
class ItemScanList(
var list:List<ItemScanVO> = listOf()
)

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M13,3c-4.97,0 -9,4.03 -9,9L1,12l3.89,3.89 0.07,0.14L9,12L6,12c0,-3.87 3.13,-7 7,-7s7,3.13 7,7 -3.13,7 -7,7c-1.93,0 -3.68,-0.79 -4.94,-2.06l-1.42,1.42C8.27,19.99 10.51,21 13,21c4.97,0 9,-4.03 9,-9s-4.03,-9 -9,-9zM12,8v5l4.28,2.54 0.72,-1.21 -3.5,-2.08L13.5,8L12,8z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF" android:pathData="M20,8h-3L17,4L3,4c-1.1,0 -2,0.9 -2,2v11h2c0,1.66 1.34,3 3,3s3,-1.34 3,-3h6c0,1.66 1.34,3 3,3s3,-1.34 3,-3h2v-5l-3,-4zM6,18.5c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM19.5,9.5l1.96,2.5L17,12L17,9.5h2.5zM18,18.5c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#F7931E"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#F7931E" android:pathData="M20,8h-3L17,4L3,4c-1.1,0 -2,0.9 -2,2v11h2c0,1.66 1.34,3 3,3s3,-1.34 3,-3h6c0,1.66 1.34,3 3,3s3,-1.34 3,-3h2v-5l-3,-4zM6,18.5c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5zM19.5,9.5l1.96,2.5L17,12L17,9.5h2.5zM18,18.5c-0.83,0 -1.5,-0.67 -1.5,-1.5s0.67,-1.5 1.5,-1.5 1.5,0.67 1.5,1.5 -0.67,1.5 -1.5,1.5z"/>
</vector>

View File

@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="#F7931E"
android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"/>
</vector>

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
style="@style/DialogTheme"
android:layout_height="wrap_content"
android:layout_margin="@dimen/layout_margin_1"
app:cardBackgroundColor="@color/verdnatura_black_8"
app:cardCornerRadius="@dimen/dialog_radius">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="@dimen/default_layout_margin">
<TextView
android:id="@+id/custom_dialog_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_margin_3"
android:layout_marginBottom="@dimen/default_layout_margin"
android:textAlignment="center"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h6"
android:textStyle="bold"
android:visibility="gone"
tools:text="¿Estás seguro de que deseas eliminar el dispositivo de celia?"
tools:visibility="visible" />
<TextView
android:id="@+id/custom_dialog_description"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1"
android:visibility="gone"
tools:text="Este cambio no podrá deshacerse a no ser que vuelvas a vincular el dispositivo"
tools:visibility="visible" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_hour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColorHint="@android:color/darker_gray"
android:layout_marginTop="@dimen/default_layout_margin"
android:layout_weight="1">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_dialog_hour_value"
style="@style/InputLineTextSearch"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:hint="Hora"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray"
android:enabled="false"/>
</com.google.android.material.textfield.TextInputLayout>
<ImageButton
android:id="@+id/ib_obtener_hora"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/round_av_timer_24"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/et_mostrar_fecha_picker"
android:layout_marginEnd="8dp"
app:layout_constraintLeft_toRightOf="@+id/et_mostrar_hora_picker"
android:layout_marginStart="8dp"
app:layout_constraintHorizontal_bias="0.504"
tools:ignore="ContentDescription"
android:layout_marginTop="25dp"/>
</LinearLayout>
<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/default_layout_margin">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_dialog_destino_value"
style="@style/InputLineTextSearch"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:hint="Destino"
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>
<Button
android:id="@+id/custom_dialog_button_ok"
style="@style/DefaultButton.NormalButton"
android:layout_width="match_parent"
android:layout_marginTop="@dimen/default_layout_margin"
android:visibility="gone"
tools:text="Grabar"
tools:visibility="visible" />
<Button
android:id="@+id/custom_dialog_button_ko"
style="@style/DefaultButton.TransparentButton"
android:layout_width="match_parent"
android:layout_marginTop="@dimen/default_layout_margin"
android:layout_marginBottom="@dimen/default_layout_margin"
android:visibility="gone"
tools:text="Cancelar"
tools:visibility="visible" />
</LinearLayout>
</androidx.cardview.widget.CardView>

View File

@ -0,0 +1,105 @@
<?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:tools="http://schemas.android.com/tools">
<data>
<variable
name="viewModel"
type="es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionPalletViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black"
>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Pallet"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Rutas"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Eti"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/expedition_pallet_recyclerview"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:clipToPadding="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2"
tools:listitem="@layout/item_expeditionpallet_row" />
<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"
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>
</layout>

View File

@ -0,0 +1,96 @@
<?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:tools="http://schemas.android.com/tools">
<data>
<variable
name="viewModel"
type="es.verdnatura.presentation.view.feature.paletizador.fragment.ExpeditionTruckListViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black"
>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:orientation="horizontal"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="ETD"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="Destino"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/expedition_truck_recyclerview"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="16dp"
android:clipToPadding="false"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2"
tools:listitem="@layout/item_expeditiontruck_row" />
<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"
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>
</layout>

View File

@ -0,0 +1,131 @@
<?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.historico.fragment.HistoricoViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
<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="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="Cliente"
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="Entrada"
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="Salida"
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="Balance"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/historico_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/item_historico_row"/>
</LinearLayout>
<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="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>
</layout>

View File

@ -0,0 +1,62 @@
<?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.paletizador.model.ItemPalletVO" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/item_row_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"
android:paddingBottom="@dimen/pasilleros_margin_main_menu">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{item.Pallet}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:id="@+id/expedition_pallet_rutas"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{item.Rutas}"
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="@{item.Eti}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_black_9"/>
</LinearLayout>
</layout>

View File

@ -0,0 +1,52 @@
<?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.paletizador.model.ItemExpeditionTruckVO" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/item_row_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"
android:paddingBottom="@dimen/pasilleros_margin_main_menu">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{item.ETD}"
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="@{item.Destino}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_black_9"/>
</LinearLayout>
</layout>

View File

@ -0,0 +1,77 @@
<?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.historico.model.ItemHistoricoVO" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<LinearLayout
android:id="@+id/item_row_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"
android:paddingBottom="@dimen/pasilleros_margin_main_menu">
<TextView
android:id="@+id/historico_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{item.date}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:gravity="center"
android:layout_marginRight="@dimen/layout_margin_min"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{item.name}"
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="@{item.invalue}"
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="@{item.out}"
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="@{item.balance}"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_black_9"/>
</LinearLayout>
</layout>