feat roadMap #refs 7195
This commit is contained in:
parent
a2451bf825
commit
ea1384b7c4
|
@ -0,0 +1,48 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.truck.adapter
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import es.verdnatura.databinding.ItemRoadmapTruckRowBinding
|
||||||
|
import es.verdnatura.presentation.common.OnRoadMapClickListener
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.RoadMapTruck
|
||||||
|
|
||||||
|
class RoadMapListAdapter(
|
||||||
|
private var items: List<RoadMapTruck>,
|
||||||
|
private val onRoadMapClickListener: OnRoadMapClickListener
|
||||||
|
) : RecyclerView.Adapter<RoadMapListAdapter.ItemHolder>() {
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
|
||||||
|
return ItemHolder(
|
||||||
|
ItemRoadmapTruckRowBinding.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 {
|
||||||
|
onRoadMapClickListener.onRoadMapClickListener(items[position], "")
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setList(itemsList: List<RoadMapTruck>) {
|
||||||
|
items = itemsList
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ItemHolder(
|
||||||
|
val binding: ItemRoadmapTruckRowBinding
|
||||||
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
|
private val res = binding.root.context.resources
|
||||||
|
fun bind(item: RoadMapTruck) {
|
||||||
|
binding.apply {
|
||||||
|
this.item = item
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.truck.adapter
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import es.verdnatura.databinding.ItemStopmapTruckRowBinding
|
||||||
|
import es.verdnatura.presentation.common.OnStopMapClickListener
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruck
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.TruckAction
|
||||||
|
|
||||||
|
class StopMapListAdapter(
|
||||||
|
private var items: List<StopMapTruck>,
|
||||||
|
private val onStopMapClickListener: OnStopMapClickListener
|
||||||
|
) : RecyclerView.Adapter<StopMapListAdapter.ItemHolder>() {
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
|
||||||
|
return ItemHolder(
|
||||||
|
ItemStopmapTruckRowBinding.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 {
|
||||||
|
// onStopMapClickListener.onStopMapClickListener(items[position], "")
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setList(itemsList: List<StopMapTruck>) {
|
||||||
|
items = itemsList
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ItemHolder(
|
||||||
|
val binding: ItemStopmapTruckRowBinding
|
||||||
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
|
private val res = binding.root.context.resources
|
||||||
|
fun bind(item: StopMapTruck) {
|
||||||
|
binding.apply {
|
||||||
|
binding.loadPallet.setOnClickListener {
|
||||||
|
onStopMapClickListener.onStopMapClickListener(
|
||||||
|
item,
|
||||||
|
"",
|
||||||
|
action = TruckAction.LOAD
|
||||||
|
)
|
||||||
|
}
|
||||||
|
binding.unLoadPallet.setOnClickListener {
|
||||||
|
onStopMapClickListener.onStopMapClickListener(
|
||||||
|
item,
|
||||||
|
"",
|
||||||
|
action = TruckAction.UNLOAD
|
||||||
|
)
|
||||||
|
}
|
||||||
|
this.item = item
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,71 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.truck.adapter
|
||||||
|
|
||||||
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View.GONE
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import androidx.core.content.ContextCompat
|
||||||
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
import es.verdnatura.R
|
||||||
|
import es.verdnatura.databinding.ItemStopmapTruckPalletRowBinding
|
||||||
|
import es.verdnatura.presentation.common.OnPrintClickListener
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruckPallet
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.TruckAction
|
||||||
|
|
||||||
|
class StopMapPalletListAdapter(
|
||||||
|
private var items: List<StopMapTruckPallet>,
|
||||||
|
private val onPrintClickListener: OnPrintClickListener,
|
||||||
|
private val action: TruckAction
|
||||||
|
) : RecyclerView.Adapter<StopMapPalletListAdapter.ItemHolder>() {
|
||||||
|
|
||||||
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
|
||||||
|
return ItemHolder(
|
||||||
|
ItemStopmapTruckPalletRowBinding.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 {
|
||||||
|
// onStopMapClickListener.onStopMapClickListener(items[position], "")
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setList(itemsList: List<StopMapTruckPallet>) {
|
||||||
|
items = itemsList
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
inner class ItemHolder(
|
||||||
|
val binding: ItemStopmapTruckPalletRowBinding
|
||||||
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
|
private val res = binding.root.context.resources
|
||||||
|
fun bind(item: StopMapTruckPallet) {
|
||||||
|
binding.apply {
|
||||||
|
|
||||||
|
if (action == TruckAction.UNLOAD) {
|
||||||
|
binding.printNewRoutePallet.setOnClickListener {
|
||||||
|
onPrintClickListener.onPrintClickListener(item, "")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
binding.printNewRoutePallet.visibility = GONE
|
||||||
|
}
|
||||||
|
if (item.isScanned) {
|
||||||
|
itemRowLayout.setBackgroundColor(
|
||||||
|
ContextCompat.getColor(
|
||||||
|
binding.root.context!!,
|
||||||
|
R.color.salix_success_light
|
||||||
|
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
this.item = item
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,114 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.truck.fragment
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.drawable.Drawable
|
||||||
|
import android.text.Editable
|
||||||
|
import android.text.TextWatcher
|
||||||
|
import androidx.core.content.res.ResourcesCompat
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import es.verdnatura.R
|
||||||
|
import es.verdnatura.databinding.FragmentRoadmapTruckListBinding
|
||||||
|
import es.verdnatura.domain.notNull
|
||||||
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
|
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
|
import es.verdnatura.presentation.common.OnRoadMapClickListener
|
||||||
|
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.adapter.RoadMapListAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.RoadMapTruck
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.RoadMapTruckList
|
||||||
|
import java.time.LocalDate
|
||||||
|
import java.time.format.DateTimeFormatter
|
||||||
|
|
||||||
|
class RoadMapListFragment(
|
||||||
|
private var title: String
|
||||||
|
) : BaseFragment<FragmentRoadmapTruckListBinding, RoadMapListViewModel>(
|
||||||
|
RoadMapListViewModel::class
|
||||||
|
) {
|
||||||
|
|
||||||
|
private var adapter: RoadMapListAdapter? = null
|
||||||
|
private var onRoadMapClickListener: OnRoadMapClickListener? = null
|
||||||
|
private var originalList = listOf<RoadMapTruck>()
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(title: String) = RoadMapListFragment(title)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAttach(context: Context) {
|
||||||
|
if (context is OnRoadMapClickListener) onRoadMapClickListener = context
|
||||||
|
super.onAttach(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getLayoutId(): Int = R.layout.fragment_roadmap_truck_list
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
|
||||||
|
binding.mainToolbar.toolbarTitle.text =
|
||||||
|
LocalDate.now().format(DateTimeFormatter.ofPattern("dd/MM/yyyy"))
|
||||||
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
|
ma.onMyBackPressed()
|
||||||
|
}
|
||||||
|
setToolBar()
|
||||||
|
viewModel.roadMapTruckList()
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setFilter() {
|
||||||
|
binding.filterTxt.addTextChangedListener(object : TextWatcher {
|
||||||
|
override fun beforeTextChanged(
|
||||||
|
s: CharSequence?, start: Int, count: Int, after: Int
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun afterTextChanged(s: Editable?) {
|
||||||
|
|
||||||
|
adapter!!.setList(originalList.filter { roadMapTruck ->
|
||||||
|
roadMapTruck.toString().contains(
|
||||||
|
s.toString(), ignoreCase = true
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setToolBar() {
|
||||||
|
val listIcons: ArrayList<Drawable> = ArrayList()
|
||||||
|
val iconReload: Drawable = ResourcesCompat.getDrawable(
|
||||||
|
resources, R.drawable.ic_autorenew_black_24dp, null
|
||||||
|
)!!
|
||||||
|
listIcons.add(iconReload)
|
||||||
|
|
||||||
|
binding.mainToolbar.toolbarIcons.adapter =
|
||||||
|
ToolBarAdapter(listIcons, object : OnOptionsSelectedListener {
|
||||||
|
override fun onOptionsItemSelected(item: Drawable) {
|
||||||
|
when (item) {
|
||||||
|
iconReload -> viewModel.roadMapTruckList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||||
|
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun observeViewModel() {
|
||||||
|
with(viewModel) {
|
||||||
|
loadRoadMapTruckList.observe(viewLifecycleOwner) { event ->
|
||||||
|
event.getContentIfNotHandled().notNull { showRoadMapList(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showRoadMapList(it: RoadMapTruckList) {
|
||||||
|
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
|
originalList = it.list
|
||||||
|
adapter = RoadMapListAdapter(originalList, onRoadMapClickListener!!)
|
||||||
|
binding.roadmapTruckRecyclerview.adapter = adapter
|
||||||
|
binding.roadmapTruckRecyclerview.layoutManager = lm
|
||||||
|
setFilter()
|
||||||
|
binding.filterTxt.requestFocus()
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,96 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.truck.fragment
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import androidx.lifecycle.map
|
||||||
|
import es.verdnatura.domain.SalixCallback
|
||||||
|
import es.verdnatura.domain.formatWithQuotes
|
||||||
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
|
import es.verdnatura.presentation.common.Event
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.RoadMapTruck
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.RoadMapTruckList
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruck
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruckList
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruckPallet
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruckPalletList
|
||||||
|
import retrofit2.Response
|
||||||
|
import java.time.LocalDate
|
||||||
|
import java.time.LocalTime
|
||||||
|
|
||||||
|
class RoadMapListViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
|
|
||||||
|
private val _roadMapTruckList by lazy { MutableLiveData<RoadMapTruckList>() }
|
||||||
|
val loadRoadMapTruckList: LiveData<Event<RoadMapTruckList>> =
|
||||||
|
_roadMapTruckList.map { Event(it) }
|
||||||
|
|
||||||
|
private val _stopMapTruckList by lazy { MutableLiveData<StopMapTruckList>() }
|
||||||
|
val loadStopMapTruckList: LiveData<Event<StopMapTruckList>> =
|
||||||
|
_stopMapTruckList.map { Event(it) }
|
||||||
|
|
||||||
|
private val _stopMapTruckPalletList by lazy { MutableLiveData<StopMapTruckPalletList>() }
|
||||||
|
val loadStopMapTruckPalletList: LiveData<Event<StopMapTruckPalletList>> =
|
||||||
|
_stopMapTruckPalletList.map { Event(it) }
|
||||||
|
|
||||||
|
private val _responseState by lazy { MutableLiveData<Boolean>() }
|
||||||
|
val loadResponseState: LiveData<Event<Boolean>> =
|
||||||
|
_responseState.map { Event(it) }
|
||||||
|
|
||||||
|
fun roadMapTruckList() {
|
||||||
|
salix.roadmapTruckGet(
|
||||||
|
"""{"where": { "etd": {
|
||||||
|
"between": ["${LocalDate.now().atTime(LocalTime.MIN)}",
|
||||||
|
"${
|
||||||
|
LocalDate.now().atTime(LocalTime.MAX)
|
||||||
|
}"]}},"order": "etd ASC"}"""
|
||||||
|
).enqueue(object : SalixCallback<List<RoadMapTruck>>(context) {
|
||||||
|
override fun onSuccess(response: Response<List<RoadMapTruck>>) {
|
||||||
|
_roadMapTruckList.value =
|
||||||
|
response.body()?.let { RoadMapTruckList(it) }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getStopMapTruckList(roadMap: Int) {
|
||||||
|
salix.getStopMapTruckList(
|
||||||
|
"""{"where": { "roadMapMapFk":$roadMap},"order": "eta ASC"}"""
|
||||||
|
/* """{"where": { "eta": {
|
||||||
|
"between": ["${LocalDate.now().atTime(LocalTime.MIN)}",
|
||||||
|
"${
|
||||||
|
LocalDate.now().atTime(LocalTime.MAX)
|
||||||
|
}"]}},"order": "eta ASC"}"""*/
|
||||||
|
).enqueue(object : SalixCallback<List<StopMapTruck>>(context) {
|
||||||
|
override fun onSuccess(response: Response<List<StopMapTruck>>) {
|
||||||
|
_stopMapTruckList.value =
|
||||||
|
response.body()?.let { StopMapTruckList(it) }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getStopMapTruckPalletList(vTruckFk: Int) {
|
||||||
|
salix.getStopMapTruckPalletList(
|
||||||
|
arrayListOf(vTruckFk)
|
||||||
|
).enqueue(object : SalixCallback<List<StopMapTruckPallet>>(context) {
|
||||||
|
override fun onSuccess(response: Response<List<StopMapTruckPallet>>) {
|
||||||
|
_stopMapTruckPalletList.value =
|
||||||
|
response.body()?.let { StopMapTruckPalletList(it) }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
fun expeditionStateAddByPallet(
|
||||||
|
vPalletFk: Int,
|
||||||
|
vStateCode: String,
|
||||||
|
) {
|
||||||
|
salix.expeditionStateAddByPallet(
|
||||||
|
arrayListOf(vPalletFk, vStateCode).formatWithQuotes()
|
||||||
|
)
|
||||||
|
.enqueue(object : SalixCallback<Unit>(context) {
|
||||||
|
override fun onSuccess(response: Response<Unit>) {
|
||||||
|
_responseState.value = response.isSuccessful
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,119 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.truck.fragment
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.drawable.Drawable
|
||||||
|
import android.text.Editable
|
||||||
|
import android.text.TextWatcher
|
||||||
|
import androidx.core.content.res.ResourcesCompat
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import es.verdnatura.R
|
||||||
|
import es.verdnatura.databinding.FragmentStopmapTruckListBinding
|
||||||
|
import es.verdnatura.domain.notNull
|
||||||
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
|
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
|
import es.verdnatura.presentation.common.OnStopMapClickListener
|
||||||
|
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.adapter.StopMapListAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.RoadMapTruck
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruck
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruckList
|
||||||
|
|
||||||
|
class StopMapListFragment(
|
||||||
|
private var title: String,
|
||||||
|
private var roadMap: RoadMapTruck
|
||||||
|
) : BaseFragment<FragmentStopmapTruckListBinding, RoadMapListViewModel>(
|
||||||
|
RoadMapListViewModel::class
|
||||||
|
) {
|
||||||
|
|
||||||
|
private var adapter: StopMapListAdapter? = null
|
||||||
|
private var onStopMapClickListener: OnStopMapClickListener? = null
|
||||||
|
private var originalList = listOf<StopMapTruck>()
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(title: String, roadMap: RoadMapTruck) = StopMapListFragment(title, roadMap)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAttach(context: Context) {
|
||||||
|
if (context is OnStopMapClickListener) onStopMapClickListener = context
|
||||||
|
super.onAttach(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getLayoutId(): Int = R.layout.fragment_stopmap_truck_list
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
|
||||||
|
binding.mainToolbar.toolbarTitle.text =
|
||||||
|
getString(R.string.doublePointText, title, roadMap.trailerPlate)
|
||||||
|
|
||||||
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
|
ma.onMyBackPressed()
|
||||||
|
}
|
||||||
|
|
||||||
|
setToolBar()
|
||||||
|
viewModel.getStopMapTruckList(roadMap.id)
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setFilter() {
|
||||||
|
binding.filterTxt.addTextChangedListener(object : TextWatcher {
|
||||||
|
override fun beforeTextChanged(
|
||||||
|
s: CharSequence?, start: Int, count: Int, after: Int
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun afterTextChanged(s: Editable?) {
|
||||||
|
|
||||||
|
adapter!!.setList(originalList.filter { stopMapTruck ->
|
||||||
|
stopMapTruck.toString().contains(
|
||||||
|
s.toString(), ignoreCase = true
|
||||||
|
)
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.filterTxt.requestFocus()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setToolBar() {
|
||||||
|
val listIcons: ArrayList<Drawable> = ArrayList()
|
||||||
|
val iconReload: Drawable = ResourcesCompat.getDrawable(
|
||||||
|
resources, R.drawable.ic_autorenew_black_24dp, null
|
||||||
|
)!!
|
||||||
|
listIcons.add(iconReload)
|
||||||
|
|
||||||
|
binding.mainToolbar.toolbarIcons.adapter =
|
||||||
|
ToolBarAdapter(listIcons, object : OnOptionsSelectedListener {
|
||||||
|
override fun onOptionsItemSelected(item: Drawable) {
|
||||||
|
when (item) {
|
||||||
|
iconReload -> viewModel.getStopMapTruckList(roadMap.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||||
|
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun observeViewModel() {
|
||||||
|
with(viewModel) {
|
||||||
|
loadStopMapTruckList.observe(viewLifecycleOwner) { event ->
|
||||||
|
event.getContentIfNotHandled().notNull { showRoadMapList(it) }
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showRoadMapList(it: StopMapTruckList) {
|
||||||
|
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
|
originalList = it.list
|
||||||
|
adapter = StopMapListAdapter(originalList, onStopMapClickListener!!)
|
||||||
|
binding.stopmapTruckRecyclerview.adapter = adapter
|
||||||
|
binding.stopmapTruckRecyclerview.layoutManager = lm
|
||||||
|
setFilter()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,183 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.truck.fragment
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.graphics.drawable.Drawable
|
||||||
|
import android.view.View
|
||||||
|
import android.view.inputmethod.EditorInfo
|
||||||
|
import androidx.core.content.res.ResourcesCompat
|
||||||
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import es.verdnatura.R
|
||||||
|
import es.verdnatura.databinding.FragmentStopmapTruckPalletListBinding
|
||||||
|
import es.verdnatura.domain.notNull
|
||||||
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
|
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
|
import es.verdnatura.presentation.common.OnPrintClickListener
|
||||||
|
import es.verdnatura.presentation.common.OnStopMapClickListener
|
||||||
|
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.adapter.StopMapPalletListAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruck
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruckPallet
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.StopMapTruckPalletList
|
||||||
|
import es.verdnatura.presentation.view.feature.truck.model.TruckAction
|
||||||
|
|
||||||
|
class StopMapPalletListFragment(
|
||||||
|
private var title: String,
|
||||||
|
private var stopMap: StopMapTruck,
|
||||||
|
private var actionTruck: TruckAction
|
||||||
|
) : BaseFragment<FragmentStopmapTruckPalletListBinding, RoadMapListViewModel>(
|
||||||
|
RoadMapListViewModel::class
|
||||||
|
) {
|
||||||
|
|
||||||
|
private var adapter: StopMapPalletListAdapter? = null
|
||||||
|
private var onStopMapClickListener: OnStopMapClickListener? = null
|
||||||
|
private var originalList = listOf<StopMapTruckPallet>()
|
||||||
|
private var indexPalletScanned = -1
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(title: String, roadMap: StopMapTruck, truckAction: TruckAction) =
|
||||||
|
StopMapPalletListFragment(title, roadMap, truckAction)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onAttach(context: Context) {
|
||||||
|
if (context is OnStopMapClickListener) onStopMapClickListener = context
|
||||||
|
super.onAttach(context)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getLayoutId(): Int = R.layout.fragment_stopmap_truck_pallet_list
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
|
||||||
|
binding.mainToolbar.toolbarTitle.text = title
|
||||||
|
binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE
|
||||||
|
|
||||||
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
|
ma.onMyBackPressed()
|
||||||
|
}
|
||||||
|
|
||||||
|
setToolBar()
|
||||||
|
setEvents()
|
||||||
|
binding.scanInput.hint = if (actionTruck == TruckAction.LOAD) {
|
||||||
|
getString(R.string.scanForLoadTruck)
|
||||||
|
} else {
|
||||||
|
getString(R.string.scanForUnloadTruck)
|
||||||
|
}
|
||||||
|
viewModel.getStopMapTruckPalletList(stopMap.id)
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setEvents() {
|
||||||
|
binding.scanInput.requestFocus()
|
||||||
|
binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
|
|
||||||
|
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
indexPalletScanned = originalList.indexOfFirst {
|
||||||
|
it.Pallet == binding.scanInput.text.toString().toInt()
|
||||||
|
}
|
||||||
|
// this.originalList.getOrNull(index)?.isScanned = true
|
||||||
|
|
||||||
|
if (indexPalletScanned != -1) {
|
||||||
|
viewModel.expeditionStateAddByPallet(
|
||||||
|
binding.scanInput.text.toString().toInt(),
|
||||||
|
if (actionTruck == TruckAction.LOAD) {
|
||||||
|
"TRUNK"
|
||||||
|
} else {
|
||||||
|
"STORED"
|
||||||
|
}
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
indexPalletScanned = -1
|
||||||
|
ma.messageWithSound(
|
||||||
|
"", isPlayed = true, isError = true
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (
|
||||||
|
ex: Exception
|
||||||
|
|
||||||
|
) {
|
||||||
|
indexPalletScanned = -1
|
||||||
|
ma.messageWithSound(
|
||||||
|
message = getString(R.string.errorInput),
|
||||||
|
isError = true,
|
||||||
|
isPlayed = true,
|
||||||
|
""
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
binding.scanInput.setText("")
|
||||||
|
ma.hideKeyboard(binding.scanInput)
|
||||||
|
return@setOnEditorActionListener true
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setToolBar() {
|
||||||
|
val listIcons: ArrayList<Drawable> = ArrayList()
|
||||||
|
val iconReload: Drawable = ResourcesCompat.getDrawable(
|
||||||
|
resources, R.drawable.ic_autorenew_black_24dp, null
|
||||||
|
)!!
|
||||||
|
listIcons.add(iconReload)
|
||||||
|
|
||||||
|
binding.mainToolbar.toolbarIcons.adapter =
|
||||||
|
ToolBarAdapter(listIcons, object : OnOptionsSelectedListener {
|
||||||
|
override fun onOptionsItemSelected(item: Drawable) {
|
||||||
|
when (item) {
|
||||||
|
iconReload -> viewModel.getStopMapTruckPalletList(stopMap.id)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||||
|
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun observeViewModel() {
|
||||||
|
with(viewModel) {
|
||||||
|
loadStopMapTruckPalletList.observe(viewLifecycleOwner) { event ->
|
||||||
|
event.getContentIfNotHandled().notNull { showRoadMapList(it) }
|
||||||
|
}
|
||||||
|
loadResponseState.observe(viewLifecycleOwner) { event ->
|
||||||
|
event.getContentIfNotHandled().notNull {
|
||||||
|
println("pallet scanned ")
|
||||||
|
originalList.getOrNull(indexPalletScanned)?.isScanned = true
|
||||||
|
adapter!!.setList(originalList.sortedWith(compareBy { it.Pallet }).sortedWith(compareBy { it.isScanned }))
|
||||||
|
setSubtitlePallets(originalList)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showRoadMapList(it: StopMapTruckPalletList) {
|
||||||
|
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
|
originalList = it.list.sortedBy { it.isScanned}.sortedBy { it.Pallet }
|
||||||
|
adapter = StopMapPalletListAdapter(
|
||||||
|
originalList, object : OnPrintClickListener {
|
||||||
|
|
||||||
|
override fun onPrintClickListener(item: StopMapTruckPallet, entryPoint: String) {
|
||||||
|
ma.messageWithSound(
|
||||||
|
"Imprimiendo rutas nuevas ${item.Pallet}", isError = false, isPlayed = true
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}, action = actionTruck
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
binding.stopmapTruckRecyclerview.adapter = adapter
|
||||||
|
binding.stopmapTruckRecyclerview.layoutManager = lm
|
||||||
|
setSubtitlePallets(it.list)
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setSubtitlePallets(list: List<StopMapTruckPallet>) {
|
||||||
|
|
||||||
|
binding.mainToolbar.toolbarSubtitle.text = if (list.isEmpty()) {
|
||||||
|
"0/0"
|
||||||
|
} else {
|
||||||
|
getString(R.string.countTxt, list.filter { it.isScanned }.size, list.size)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.truck.model
|
||||||
|
|
||||||
|
import es.verdnatura.domain.isoToString
|
||||||
|
import es.verdnatura.presentation.common.getHourDay
|
||||||
|
|
||||||
|
data class RoadMapTruck(
|
||||||
|
var id: Int, var trailerPlate: String?, var observations: String?
|
||||||
|
|
||||||
|
) {
|
||||||
|
var etd: String? = null
|
||||||
|
get() {
|
||||||
|
return (getHourDay(field.isoToString()))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "$etd$id$trailerPlate$observations"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
data class RoadMapTruckList(
|
||||||
|
var list: List<RoadMapTruck> = listOf()
|
||||||
|
)
|
||||||
|
|
||||||
|
data class StopMapTruck(
|
||||||
|
var id: Int, var description: String?, var warehouse: Int?
|
||||||
|
|
||||||
|
) {
|
||||||
|
var eta: String? = null
|
||||||
|
get() {
|
||||||
|
return (getHourDay(field.isoToString()))
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "$description$id$warehouse$"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
data class StopMapTruckList(
|
||||||
|
var list: List<StopMapTruck> = listOf()
|
||||||
|
)
|
||||||
|
|
||||||
|
data class StopMapTruckPallet(
|
||||||
|
//var id :Int cuando esté acabado
|
||||||
|
var Pallet: Int,
|
||||||
|
var isScanned: Boolean = false
|
||||||
|
)
|
||||||
|
|
||||||
|
data class StopMapTruckPalletList(
|
||||||
|
var list: List<StopMapTruckPallet> = listOf()
|
||||||
|
)
|
||||||
|
|
||||||
|
enum class TruckAction {
|
||||||
|
LOAD,
|
||||||
|
UNLOAD
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960"
|
||||||
|
android:tint="@android:color/white"
|
||||||
|
android:autoMirrored="true">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M240,760Q190,760 155,725Q120,690 120,640L40,640L40,280Q40,247 63.5,223.5Q87,200 120,200L680,200L920,440L920,640L840,640Q840,690 805,725Q770,760 720,760Q670,760 635,725Q600,690 600,640L360,640Q360,690 325,725Q290,760 240,760ZM600,400L760,400L640,280L600,280L600,400ZM360,400L520,400L520,280L360,280L360,400ZM120,400L280,400L280,280L120,280L120,400ZM240,690Q261,690 275.5,675.5Q290,661 290,640Q290,619 275.5,604.5Q261,590 240,590Q219,590 204.5,604.5Q190,619 190,640Q190,661 204.5,675.5Q219,690 240,690ZM720,690Q741,690 755.5,675.5Q770,661 770,640Q770,619 755.5,604.5Q741,590 720,590Q699,590 684.5,604.5Q670,619 670,640Q670,661 684.5,675.5Q699,690 720,690ZM120,560L152,560Q169,542 191,531Q213,520 240,520Q267,520 289,531Q311,542 328,560L632,560Q649,542 671,531Q693,520 720,520Q747,520 769,531Q791,542 808,560L840,560L840,480L120,480L120,560ZM840,480L840,480L808,480Q791,480 769,480Q747,480 720,480Q693,480 671,480Q649,480 632,480L328,480Q311,480 289,480Q267,480 240,480Q213,480 191,480Q169,480 152,480L120,480L120,480L840,480Z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:aapt="http://schemas.android.com/aapt"
|
||||||
|
android:viewportWidth="1024"
|
||||||
|
android:viewportHeight="1024"
|
||||||
|
android:width="128dp"
|
||||||
|
android:height="128dp"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFF"
|
||||||
|
android:pathData="M696.747 313.173c-0.427 -7.253 -1.707 -14.080 -3.413 -20.907 -5.547 -12.373 -13.653 -22.613 -25.173 -29.867 -20.48 -10.24 -40.107 -9.813 -59.733 2.133 -9.813 7.253 -17.067 16.64 -22.187 28.16 -1.707 6.827 -2.987 13.653 -3.413 20.907 0.427 7.253 2.133 14.080 4.267 20.907 0.427 0.427 0.427 0.427 0.427 0.853 3.413 6.4 7.68 12.373 12.8 17.92 2.133 1.707 4.693 3.84 6.827 5.973 6.4 3.84 13.227 6.827 20.907 8.96 6.827 1.28 13.653 0.853 20.907 0.853 7.253 -2.133 14.080 -3.84 20.48 -8.107v0c17.067 -11.52 25.6 -27.733 27.307 -47.787zM897.28 357.12v0c-12.373 8.96 -26.027 12.373 -40.96 11.52 -7.253 -1.28 -14.080 -3.413 -20.907 -6.4 -11.093 -6.827 -19.627 -16.213 -25.173 -27.733 -2.133 -6.827 -3.84 -13.653 -4.267 -20.907 0 -7.253 1.28 -14.080 3.413 -20.907 1.707 -3.84 3.413 -7.253 5.547 -11.093 2.56 -2.987 5.12 -6.4 7.68 -9.387 4.267 -3.413 8.533 -6.4 12.8 -9.813 4.267 -1.707 8.533 -3.84 13.227 -4.693 17.92 -4.693 34.133 -0.853 49.067 9.813 1.707 1.707 3.413 2.987 5.547 4.693 10.667 11.947 16.213 25.6 16.64 41.813 -0.853 4.693 -1.28 9.813 -2.133 14.507 -4.267 10.667 -10.24 20.907 -20.48 28.587zM277.76 366.933c-1.28 0.427 -2.56 0.853 -3.84 1.28 -6.827 0.427 -13.653 0.427 -20.48 -0.853 -7.253 -1.707 -14.507 -5.12 -20.907 -8.96 -1.707 -1.28 -3.413 -2.56 -5.12 -3.84 -11.947 -11.52 -18.347 -25.173 -19.2 -41.387 0 -6.4 1.28 -12.8 2.987 -19.2 0.427 -1.707 1.28 -2.987 1.707 -4.693 3.413 -6.4 7.253 -12.373 11.947 -17.92 2.56 -2.133 5.12 -4.267 7.68 -6.4 6.4 -3.84 13.653 -6.827 20.907 -8.96 6.827 -0.853 13.653 -1.28 20.907 -0.427 6.827 1.28 13.227 3.84 19.2 6.827 14.933 9.813 25.173 23.040 27.733 41.387 3.84 29.013 -14.507 56.32 -43.52 63.147zM190.72 337.92v0c-3.84 5.973 -8.107 11.947 -13.227 17.067 -2.56 1.707 -4.693 3.413 -7.253 5.547 -20.907 11.52 -41.813 11.093 -62.293 -1.28 -1.707 -1.28 -3.413 -2.56 -5.12 -4.267 -11.947 -11.52 -18.773 -25.173 -19.2 -41.813 0 -7.253 1.28 -14.080 2.987 -20.48 0.427 -1.28 1.28 -2.987 1.707 -4.267 2.987 -5.547 6.4 -10.667 10.24 -15.36 2.987 -2.56 5.973 -5.12 9.387 -8.107 6.4 -3.84 13.653 -6.827 20.907 -8.96 6.827 -0.853 14.080 -1.28 20.907 -0.427 6.827 1.707 13.227 3.84 19.2 6.827 11.52 7.253 19.627 17.493 25.173 29.867 2.133 6.827 2.987 13.653 3.413 20.48 -0.853 6.827 -2.133 14.080 -4.267 20.48 -1.707 1.707 -2.133 3.413 -2.56 4.693zM47.787 423.253h686.933c1.28 0 2.56 1.28 2.56 2.56v212.48c0 1.28 -1.28 2.56 -2.56 2.56h-686.933c-1.28 0 -2.56 -1.28 -2.56 -2.56v-212.053c0 -1.707 0.853 -2.987 2.56 -2.987zM981.333 454.4v-133.12c-3.84 -9.387 -11.093 -12.8 -20.907 -12.373 -6.827 0.427 -13.653 0.427 -20.907 0 -2.987 0 -2.987 2.56 -4.267 4.267 -1.28 7.253 -4.267 14.507 -7.68 20.907 -10.667 22.187 -25.6 39.253 -50.347 46.080 -6.827 2.133 -13.653 2.56 -20.907 1.707 -18.773 -1.28 -33.28 -11.093 -45.227 -24.32 -5.12 -5.547 -9.387 -11.52 -12.8 -18.347 -1.28 -2.56 -2.987 -3.413 -5.547 -3.413 -27.307 0 -54.613 0 -81.92 0 -3.413 0 -5.547 1.28 -7.253 4.267 -14.507 21.76 -33.707 35.84 -60.16 39.253 -13.227 1.707 -26.027 0 -37.547 -6.827 -16.64 -8.107 -26.88 -21.333 -32.427 -38.4 -2.987 -6.827 -3.84 -13.653 -4.267 -20.907 0 -2.133 -1.28 -3.413 -3.413 -3.413 -6.827 0 -14.080 0 -20.907 0 -1.28 0.427 -1.28 2.133 -1.707 3.413 1.707 14.507 6.4 28.16 12.373 41.387 4.267 7.253 8.107 14.507 13.227 20.907 3.84 5.12 8.107 9.813 12.8 14.080 15.36 17.067 30.293 17.067 30.293 17.067h180.48v180.907h0.427v0.853h137.813c0 0 3.413 -2.133 4.693 -8.96 2.133 -5.973 4.693 -11.947 6.827 -17.92 2.133 -6.4 4.267 -13.227 7.253 -19.2 4.693 -14.080 9.813 -27.733 15.36 -41.813 2.133 -6.827 4.693 -14.080 7.68 -20.48v0c2.133 -8.96 5.12 -17.493 8.96 -25.6zM949.76 462.933l-34.56 92.587h-16.64c-0.427 0 -0.427 0 -0.853 0s-0.427 0 -0.853 0h-49.493v-81.92c0.853 -0.427 1.707 -0.427 2.987 -0.427 1.707 0 3.84 0 5.547 0 6.827 -1.28 13.653 -2.133 20.907 -2.133 6.827 -1.28 14.080 -2.133 20.907 -2.133 6.827 -0.853 13.653 -1.707 20.907 -2.133v0l20.907 -2.133c3.413 -0.853 6.827 -1.28 10.24 -1.707zM340.907 362.667v0c-7.253 12.373 -15.787 23.467 -26.453 31.573 -13.227 11.52 -25.173 12.8 -25.173 12.8h-172.373c0 0 -4.267 -0.427 -8.96 -1.707 0 0 -0.427 0 -0.427 0 -0.427 0 -0.427 0 -0.853 -0.427 -4.267 -1.28 -8.533 -2.987 -11.093 -5.12 -8.533 -4.693 -15.36 -11.52 -22.187 -18.773 -6.827 -8.107 -11.947 -17.067 -17.493 -26.027 -4.267 -9.387 -7.68 -19.2 -10.667 -29.013 -5.547 -15.787 0 -15.787 0 -15.787l20.907 -0.427c2.133 0 3.413 1.28 3.413 3.413 0.427 7.253 1.707 14.080 4.267 20.907 5.547 17.92 16.64 31.147 33.707 39.253 20.48 10.667 41.387 11.947 62.72 2.56 7.68 -3.413 14.933 -7.253 17.92 -15.787 0.427 -1.28 1.707 -0.853 2.56 -1.28 0 0 0 0 0 0h20.48c0.427 0.427 1.28 0.427 1.28 0.853 2.987 8.533 10.667 12.373 18.347 16.213 1.707 0.853 3.413 2.133 5.547 2.56 23.040 6.827 44.373 4.267 64.427 -8.96 19.627 -12.8 28.587 -32.427 30.72 -55.040 0.427 -3.413 1.28 -4.693 5.12 -4.693 6.827 0 13.653 0 20.053 0 0.853 0.853 0.853 2.56 0.853 3.413 -1.707 14.507 -6.4 28.16 -12.8 41.387 -0.853 2.56 -2.133 5.547 -3.84 8.107z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,169 @@
|
||||||
|
<?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">
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/verdnatura_black">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/scan_input"
|
||||||
|
style="@style/ScanLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:hint="@string/Escaneaetiqueta"
|
||||||
|
android:inputType="textVisiblePassword"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColorHint="@android:color/white"
|
||||||
|
android:visibility="invisible"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/itemData"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/bodyPicker"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/scan_input"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/itemDetails"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="40dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/scan_input">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1.25"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/scan_input">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="false"
|
||||||
|
android:text="@string/item"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/bodyPicker" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="false"
|
||||||
|
android:text="@string/shelving"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/bodyPicker" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="false"
|
||||||
|
android:text="@string/quantityTxt"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/bodyPicker" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:enabled="false"
|
||||||
|
android:text="@string/price"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/bodyPicker" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/scan_input">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/itemFK"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/item"
|
||||||
|
android:inputType="none"
|
||||||
|
android:focusable="false"
|
||||||
|
android:textColor="@color/verdnatura_orange_salix"
|
||||||
|
android:textSize="@dimen/bodyPicker" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/shelvingFK"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/shelving"
|
||||||
|
android:focusable="false"
|
||||||
|
android:inputType="none"
|
||||||
|
android:textColor="@color/verdnatura_orange_salix"
|
||||||
|
android:textSize="@dimen/bodyPicker" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/quantity"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/quantity"
|
||||||
|
android:textColor="@color/verdnatura_orange_salix"
|
||||||
|
android:textSize="@dimen/bodyPicker"
|
||||||
|
android:inputType="number"
|
||||||
|
android:imeOptions="actionDone"/>
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/price"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/price"
|
||||||
|
android:textColor="@color/verdnatura_orange_salix"
|
||||||
|
android:textSize="@dimen/bodyPicker"
|
||||||
|
android:inputType="numberDecimal"
|
||||||
|
android:imeOptions="actionDone"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_margin="50dp"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/itemDetails">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btnChangeCategory"
|
||||||
|
style="@style/DefaultButton.NormalButton"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/titleChangeCategory">
|
||||||
|
|
||||||
|
</Button>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
layout="@layout/toolbar_fragment"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
|
@ -0,0 +1,82 @@
|
||||||
|
<?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">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/verdnatura_black">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/filterLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/filterTxt"
|
||||||
|
style="@style/ScanLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:hint="@string/filterRoadMap"
|
||||||
|
android:inputType="text"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="@dimen/layout_margin_min"
|
||||||
|
android:paddingEnd="@dimen/layout_margin_min"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/filterLayout">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/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="@string/Matrícula"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/roadmap_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_roadmap_truck_row" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
layout="@layout/toolbar_fragment"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
|
@ -0,0 +1,90 @@
|
||||||
|
<?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">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/verdnatura_black">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/filterLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/filterTxt"
|
||||||
|
style="@style/ScanLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:hint="@string/filter"
|
||||||
|
android:inputType="text"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/linearLayout2"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="@dimen/layout_margin_min"
|
||||||
|
android:paddingEnd="@dimen/layout_margin_min"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/filterLayout">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="start"
|
||||||
|
android:text="@string/hour"
|
||||||
|
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="start"
|
||||||
|
android:text="@string/description"
|
||||||
|
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="@string/actions"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/stopmap_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_stopmap_truck_row" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
layout="@layout/toolbar_fragment"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
|
@ -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:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/verdnatura_black">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/filterLayout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/scanInput"
|
||||||
|
style="@style/ScanLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:gravity="center"
|
||||||
|
android:hint="@string/scanPallets"
|
||||||
|
android:inputType="text"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
|
android:id="@+id/stopmap_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/filterLayout"
|
||||||
|
tools:listitem="@layout/item_stopmap_truck_pallet_row" />
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
layout="@layout/toolbar_fragment"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
>
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="item"
|
||||||
|
type="es.verdnatura.presentation.view.feature.truck.model.RoadMapTruck" />
|
||||||
|
</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:paddingStart="@dimen/layout_margin_min"
|
||||||
|
android:paddingEnd="@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="@{String.valueOf(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.trailerPlate}"
|
||||||
|
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>
|
|
@ -0,0 +1,55 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
>
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="item"
|
||||||
|
type="es.verdnatura.presentation.view.feature.truck.model.StopMapTruckPallet" />
|
||||||
|
</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:paddingStart="@dimen/layout_margin_min"
|
||||||
|
android:paddingEnd="@dimen/layout_margin_min"
|
||||||
|
android:paddingTop="@dimen/pasilleros_margin_main_menu"
|
||||||
|
android:paddingBottom="@dimen/pasilleros_margin_main_menu">
|
||||||
|
<RelativeLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@{String.valueOf(item.Pallet)}"
|
||||||
|
android:textSize="@dimen/body2"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:gravity="center"/>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/printNewRoutePallet"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_alignParentEnd="true"
|
||||||
|
android:layout_centerVertical="true"
|
||||||
|
android:tooltipText="@string/printPalletNewRoute"
|
||||||
|
android:src="@drawable/ic_print_black_24dp"/>
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/verdnatura_black_9"/>
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
|
@ -0,0 +1,84 @@
|
||||||
|
<?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">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="item"
|
||||||
|
type="es.verdnatura.presentation.view.feature.truck.model.StopMapTruck" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/item_row_layout"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/verdnatura_black_5"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:paddingStart="@dimen/layout_margin_min"
|
||||||
|
android:paddingTop="@dimen/pasilleros_margin_main_menu"
|
||||||
|
android:paddingEnd="@dimen/layout_margin_min"
|
||||||
|
android:paddingBottom="@dimen/pasilleros_margin_main_menu">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="start"
|
||||||
|
android:text="@{String.valueOf(item.eta)}"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="start"
|
||||||
|
android:text="@{item.description}"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/loadPallet"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_marginStart="16dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:contentDescription="@string/palletTruckLoad"
|
||||||
|
android:tag="1"
|
||||||
|
android:tooltipText="@string/palletTruckLoad"
|
||||||
|
app:srcCompat="@drawable/camion" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/unLoadPallet"
|
||||||
|
android:layout_width="32dp"
|
||||||
|
android:layout_height="32dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
|
android:contentDescription="@string/palletTruckUnLoad"
|
||||||
|
android:tag="2"
|
||||||
|
android:tooltipText="@string/palletTruckUnLoad"
|
||||||
|
app:srcCompat="@drawable/camion_descarga" />
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="1dp"
|
||||||
|
android:background="@color/verdnatura_black_9" />
|
||||||
|
</LinearLayout>
|
||||||
|
</layout>
|
|
@ -739,7 +739,7 @@
|
||||||
<string name="addWorkForm">Añadir…</string>
|
<string name="addWorkForm">Añadir…</string>
|
||||||
<string name="itemOlderInfo">¿Estás seguro que quieres %1$s? Tienes material más antiguo en otra ubicación.</string>
|
<string name="itemOlderInfo">¿Estás seguro que quieres %1$s? Tienes material más antiguo en otra ubicación.</string>
|
||||||
<string name="quantityReviewed">Cantidad revisada a sumar/restar del total</string>
|
<string name="quantityReviewed">Cantidad revisada a sumar/restar del total</string>
|
||||||
<string name="deleteEntryReviewed">Vas a borrar la cantidad de la compra de la entrada</string>
|
<string name="deleteEntryReviewed">Vas a modificar la cantidad a 0</string>
|
||||||
<string name="quantityToReview">Cantidad a revisar</string>
|
<string name="quantityToReview">Cantidad a revisar</string>
|
||||||
<string name="selectEntryToFill">Selecciona entrada</string>
|
<string name="selectEntryToFill">Selecciona entrada</string>
|
||||||
<string name="entryCreate">Crear entrada</string>
|
<string name="entryCreate">Crear entrada</string>
|
||||||
|
@ -789,5 +789,32 @@
|
||||||
<string name="routeTxtDouble">R:%1$d C:%2$d</string>
|
<string name="routeTxtDouble">R:%1$d C:%2$d</string>
|
||||||
<string name="subTitleRouteDouble">%1$d/%2$d</string>
|
<string name="subTitleRouteDouble">%1$d/%2$d</string>
|
||||||
<string name="ready">Preparar</string>
|
<string name="ready">Preparar</string>
|
||||||
|
<string name="titleDeliveryTruck">Reparto camiones</string>
|
||||||
|
<string name="deliveryNote">Reparto:%1$s</string>
|
||||||
|
<string name="deliveryDriverNote">Repartidor:%1$s</string>
|
||||||
|
<string name="messageInternetError">Sin Internet. Revisa tu cobertura, datos o wifi</string>
|
||||||
|
<string name="filterRoadMap">Filtrar roadMaps</string>
|
||||||
|
<string name="stops">Paradas</string>
|
||||||
|
<string name="doublePointText">%1$s : %2$s</string>
|
||||||
|
<string name="eta">eta</string>
|
||||||
|
<string name="scanPallets">Escanear pallet</string>
|
||||||
|
<string name="countTxt">%1$d/%2$d</string>
|
||||||
|
<string name="filter">Filtrar</string>
|
||||||
|
<string name="actions">Acciones</string>
|
||||||
|
<string name="palletTruckLoad">Carga pallets al camión</string>
|
||||||
|
<string name="palletTruckUnLoad">Descarga en parada</string>
|
||||||
|
<string name="printPalletNewRoute">Imprime etiqueta pallet con las nuevas rutas</string>
|
||||||
|
<string name="titleChangeCategory">Cambiar a A2</string>
|
||||||
|
<string name="price">Precio propuesto:</string>
|
||||||
|
<string name="itemData">Datos del item</string>
|
||||||
|
<string name="scanForLoadTruck">Escanear para cargar</string>
|
||||||
|
<string name="scanForUnloadTruck">Escanear para descargar</string>
|
||||||
|
<string name="itemDetails">Ver datos y precio</string>
|
||||||
|
<string name="scanItemShelving">Escanea item y el carro donde se ubica</string>
|
||||||
|
<string name="quantityTxt">Cantidad:</string>
|
||||||
|
<string name="priceBigger">El precio no puede ser mayor</string>
|
||||||
|
<string name="quantityBigger">La cantidad no puede ser mayor</string>
|
||||||
|
<string name="errorChangeCategory">Error al cambiar categoría</string>
|
||||||
|
<string name="palletNotFound">Pallet no encontrado</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -617,7 +617,7 @@
|
||||||
<string name="hour">Hora</string>
|
<string name="hour">Hora</string>
|
||||||
<string name="palletNumber">Número de pallet</string>
|
<string name="palletNumber">Número de pallet</string>
|
||||||
<string name="scannerDelivery">Escanear</string>
|
<string name="scannerDelivery">Escanear</string>
|
||||||
<string name="filterRoutes">"Filtrar "</string>
|
<string name="filterRoutes">Filtrar</string>
|
||||||
<string name="showLogExpedition">Ver log expedição</string>
|
<string name="showLogExpedition">Ver log expedição</string>
|
||||||
<string name="udpateRoutes">Atualizar rotas</string>
|
<string name="udpateRoutes">Atualizar rotas</string>
|
||||||
<string name="showTickets">Tickets</string>
|
<string name="showTickets">Tickets</string>
|
||||||
|
@ -789,5 +789,32 @@
|
||||||
<string name="routeTxtDouble">R:%1$d C:%2$d</string>
|
<string name="routeTxtDouble">R:%1$d C:%2$d</string>
|
||||||
<string name="subTitleRouteDouble">%1$d/%2$d</string>
|
<string name="subTitleRouteDouble">%1$d/%2$d</string>
|
||||||
<string name="ready">Preparar</string>
|
<string name="ready">Preparar</string>
|
||||||
|
<string name="titleDeliveryTruck">Reparto camiones</string>
|
||||||
|
<string name="deliveryNote">Reparto:%1$s</string>
|
||||||
|
<string name="deliveryDriverNote">Repartidor:%1$s</string>
|
||||||
|
<string name="messageInternetError">Sem internet. Verifique sua cobertura, dados ou Wi-Fi.</string>
|
||||||
|
<string name="filterRoadMap">Filtrar roadMaps</string>
|
||||||
|
<string name="stops">Paradas</string>
|
||||||
|
<string name="doublePointText">%1$s : %2$s</string>
|
||||||
|
<string name="eta">eta</string>
|
||||||
|
<string name="scanPallets">Escanear pallet</string>
|
||||||
|
<string name="countTxt">%1$d/%2$d</string>
|
||||||
|
<string name="filter">Filtrar</string>
|
||||||
|
<string name="actions">Acciones</string>
|
||||||
|
<string name="palletTruckLoad">Carga pallets al camión</string>
|
||||||
|
<string name="palletTruckUnLoad">Descarga en parada</string>
|
||||||
|
<string name="printPalletNewRoute">Imprime etiqueta pallet con las nuevas rutas</string>
|
||||||
|
<string name="titleChangeCategory">Cambiar a A2</string>
|
||||||
|
<string name="price">Precio propuesto:</string>
|
||||||
|
<string name="itemData">Datos del item</string>
|
||||||
|
<string name="scanForLoadTruck">Escanear para cargar</string>
|
||||||
|
<string name="scanForUnloadTruck">Escanear para descargar</string>
|
||||||
|
<string name="itemDetails">Ver datos y precio</string>
|
||||||
|
<string name="scanItemShelving">Escanea item y el carro donde se ubica</string>
|
||||||
|
<string name="quantityTxt">Cantidad:</string>
|
||||||
|
<string name="priceBigger">El precio no puede ser mayor</string>
|
||||||
|
<string name="quantityBigger">La cantidad no puede ser mayor</string>
|
||||||
|
<string name="errorChangeCategory">Error al cambiar categoría</string>
|
||||||
|
<string name="palletNotFound">Pallet no encontrado</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -394,6 +394,7 @@
|
||||||
<string name="titleClaims">Claims</string>
|
<string name="titleClaims">Claims</string>
|
||||||
<string name="titlePackaging">Suppliers</string>
|
<string name="titlePackaging">Suppliers</string>
|
||||||
<string name="titleDelivery">Delivery</string>
|
<string name="titleDelivery">Delivery</string>
|
||||||
|
<string name="titleDeliveryTruck">Delivery Truck</string>
|
||||||
<string name="titleDeliverySummary">Delivery summary</string>
|
<string name="titleDeliverySummary">Delivery summary</string>
|
||||||
<string name="titleDeliveryRoute">Rutas</string>
|
<string name="titleDeliveryRoute">Rutas</string>
|
||||||
<string name="titlePackagingCount">Packaging</string>
|
<string name="titlePackagingCount">Packaging</string>
|
||||||
|
@ -791,5 +792,31 @@
|
||||||
<string name="userDev" translatable="false">developer</string>
|
<string name="userDev" translatable="false">developer</string>
|
||||||
<string name="passDev" translatable="false">nightmare</string>
|
<string name="passDev" translatable="false">nightmare</string>
|
||||||
<string name="ready">Preparar</string>
|
<string name="ready">Preparar</string>
|
||||||
|
<string name="deliveryNote">Reparto:%1$s</string>
|
||||||
|
<string name="deliveryDriverNote">Repartidor:%1$s</string>
|
||||||
|
<string name="messageInternetError">No internet. Check your coverage, data, or Wi-Fi</string>
|
||||||
|
<string name="filterRoadMap">Filtrar roadMaps</string>
|
||||||
|
<string name="stops">Paradas</string>
|
||||||
|
<string name="doublePointText">%1$s : %2$s</string>
|
||||||
|
<string name="eta">eta</string>
|
||||||
|
<string name="scanPallets">Escanear pallet</string>
|
||||||
|
<string name="countTxt">%1$d/%2$d</string>
|
||||||
|
<string name="filter">Filtrar</string>
|
||||||
|
<string name="actions">Acciones</string>
|
||||||
|
<string name="palletTruckLoad">Carga pallets al camión</string>
|
||||||
|
<string name="palletTruckUnLoad">Descarga en parada</string>
|
||||||
|
<string name="printPalletNewRoute">Imprime etiqueta pallet con las nuevas rutas</string>
|
||||||
|
<string name="titleChangeCategory">Cambiar a A2</string>
|
||||||
|
<string name="price">Precio propuesto:</string>
|
||||||
|
<string name="itemData">Datos del item</string>
|
||||||
|
<string name="scanForLoadTruck">Escanear para cargar</string>
|
||||||
|
<string name="scanForUnloadTruck">Escanear para descargar</string>
|
||||||
|
<string name="itemDetails">Ver datos y precio</string>
|
||||||
|
<string name="scanItemShelving">Escanea item y el carro donde se ubica</string>
|
||||||
|
<string name="quantityTxt">Cantidad:</string>
|
||||||
|
<string name="priceBigger">El precio no puede ser mayor</string>
|
||||||
|
<string name="quantityBigger">La cantidad no puede ser mayor</string>
|
||||||
|
<string name="errorChangeCategory">Error al cambiar categoría</string>
|
||||||
|
<string name="palletNotFound">Pallet no encontrado</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue