refs #4676 delivery->picking

This commit is contained in:
Sergio De la torre 2023-07-18 07:10:13 +02:00
parent 12dcab0543
commit a068ed3f6c
27 changed files with 1072 additions and 44 deletions

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetDropDown">
<targetSelectedWithDropDown>
<Target>
<type value="QUICK_BOOT_TARGET" />
<deviceKey>
<Key>
<type value="VIRTUAL_DEVICE_PATH" />
<value value="C:\Users\sergiodt\.android\avd\Pixel_5_API_22.avd" />
</Key>
</deviceKey>
</Target>
</targetSelectedWithDropDown>
<timeTargetWasSelectedWithDropDown value="2023-06-05T13:46:57.531979300Z" />
</component>
</project>

View File

@ -3,12 +3,16 @@
xmlns:tools="http://schemas.android.com/tools"
package="es.verdnatura">
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.PREVENT_POWER_KEY" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.LAUNCH_APPS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<!--
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
tools:ignore="ProtectedPermissions" />

View File

@ -20,6 +20,7 @@ class MobileApplication : Application() {
var renewPeriod:Long = 0
var renewInterval:Long = 0
var userPassword: String? = null
var hasNetwork:Boolean = true
var mperror: MediaPlayer? = null
var mpok: MediaPlayer? = null
private lateinit var customDialog: CustomDialogMainActivity

View File

@ -5,8 +5,12 @@ import android.graphics.Color
import android.os.Build
import android.text.Html
import android.widget.EditText
import android.widget.TextView
import android.widget.Toast
import androidx.annotation.RequiresApi
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
/*fun Any.toast(context: Context?, duration: Int = Toast.LENGTH_SHORT): Toast {
@ -38,4 +42,8 @@ fun EditText.toInt(): Int {
}
fun EditText.toLong(): Long {
return this.text.toString().toLong()
}
fun toDateString(date: Date):String{
val format = SimpleDateFormat("dd-MM-yyyy", Locale.getDefault())
return format.format(date)
}

View File

@ -872,4 +872,9 @@ interface VerdnaturaService {
fun route_getExpeditionSummary(
@Body vararg params: Any
): Call<List<ExpeditionInfoSummary>>
@POST("/delivery/get_routes")
fun getRoutes(
@Body vararg params: Any
): Call<MutableList<RouteInfo>>
}

View File

@ -224,7 +224,9 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
R.drawable.exit -> getString(R.string.exitScreen)
R.drawable.ic_image_upload -> getString(R.string.messageUpload)
R.drawable.expedition_find -> getString(R.string.showLogExpedition)
R.drawable.ic_info_refresh-> getString(R.string.udpateRoutes)
R.drawable.ic_info_delivery -> getString(R.string.info)
else -> {
""
}

View File

@ -0,0 +1,13 @@
package es.verdnatura.presentation.common
import android.graphics.Rect;
import android.view.View;
import androidx.recyclerview.widget.RecyclerView;
class ItemDescorationCustomized(private val verticalSpaceHeight: Int) : RecyclerView.ItemDecoration() {
override fun getItemOffsets(outRect: Rect, view: View, parent: RecyclerView, state: RecyclerView.State) {
outRect.bottom = verticalSpaceHeight
}
}

View File

@ -0,0 +1,42 @@
import android.content.Context
import android.net.ConnectivityManager
import android.net.Network
import android.net.NetworkCapabilities
import android.net.NetworkRequest
import es.verdnatura.MobileApplication
import es.verdnatura.R
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
class NetworkUtils(context: Context, applicationContext: MobileApplication) {
private val connectivityManager: ConnectivityManager =
context.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
private val networkCallback: ConnectivityManager.NetworkCallback =
object : ConnectivityManager.NetworkCallback() {
override fun onAvailable(network: Network) {
applicationContext.hasNetwork = true
}
override fun onLost(network: Network) {
applicationContext.hasNetwork = false
(context as MainActivity).messageWithSound(
context.getString(R.string.sin_internet),
true,
true
)
}
}
fun registerNetworkCallback() {
val networkRequest = NetworkRequest.Builder()
.addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
.build()
connectivityManager.registerNetworkCallback(networkRequest, networkCallback)
}
fun unregisterNetworkCallback() {
connectivityManager.unregisterNetworkCallback(networkCallback)
}
}

View File

@ -7,10 +7,10 @@ import es.verdnatura.presentation.view.feature.articulo.model.ItemCardRowVO
import es.verdnatura.presentation.view.feature.articulo.model.ItemProposal
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking
import es.verdnatura.presentation.view.feature.login.model.WorkForms
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
@ -52,6 +52,11 @@ interface OnItemCardRowClickListener {
interface OnItemImageLoadRowClickListener {
fun onItemImageLoadRowClickListener(item: ExpeditionInfoSummary)
}
interface OnItemImageRouteRowClickListener {
fun onItemImageRouteRowClickListener(item: RouteInfo, action: String)
}
interface OnAddressRowClickListener {
fun onAddressRowClickListener(item: ExpeditionInfoSummary)
}
@ -87,6 +92,7 @@ interface OnImageUpdateClickListener {
interface OnWorkFormsItemRowClickListener {
fun OnWorkFormsItemRowClickListener(item: WorkForms)
}
interface OnTrashItemRowClickListener {
fun OnTrashItemRowClickListener(item: WorkForms)
}
@ -161,6 +167,7 @@ interface OnReubicationClickListener {
interface OnMistakeClickListener {
fun onMistakeClickListener(sale: SaleVO)
}
interface OnTicketClickListener {
fun onTicketClickListener(sale: SaleVO)
}

View File

@ -0,0 +1,97 @@
package es.verdnatura.presentation.view.feature.delivery.adapters
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R
import es.verdnatura.databinding.ItemExpeditionSummaryRowBinding
import es.verdnatura.databinding.ItemRouteRowBinding
import es.verdnatura.domain.toDateString
import es.verdnatura.presentation.common.OnAddressRowClickListener
import es.verdnatura.presentation.common.OnItemCardRowClickListener
import es.verdnatura.presentation.common.OnItemImageLoadRowClickListener
import es.verdnatura.presentation.common.OnItemImageRouteRowClickListener
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
class RouteAdapter(
private var items: MutableList<RouteInfo>,
private val OnItemImageRouteRowClickListener: OnItemImageRouteRowClickListener,
) : RecyclerView.Adapter<RouteAdapter.ItemHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
items = setHeaders(items)
return ItemHolder(
ItemRouteRowBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
)
}
fun setHeaders(list: MutableList<RouteInfo>):MutableList<RouteInfo>{
var prevCreated = ""
for (route in list) {
if (route.created.toString() != prevCreated) {
route.header = true
prevCreated = route.created.toString()
}
}
return list
}
fun updateList(newList: MutableList<RouteInfo>) {
items = setHeaders(newList)
notifyDataSetChanged()
}
override fun getItemCount() = items.size
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
items = setHeaders(items)
holder.bind(items[position])
holder.binding.root.setOnClickListener {
//onAddressRowClickListener.onAddressRowClickListener(items[position])
}
}
inner class ItemHolder(
val binding: ItemRouteRowBinding
) : RecyclerView.ViewHolder(binding.root) {
private val res = binding.root.context.resources
fun bind(item: RouteInfo) {
binding.apply {
showTickets.setOnClickListener {
OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"showTickets")
}
imageLoadVan.setOnClickListener {
OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"loadVan")
}
linearLayoutShowTickets.setOnClickListener {
OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"showTickets")
}
linearLayoutLoadVan.setOnClickListener {
OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"loadVan")
}
if (item.header){
linearLayoutLoadVan.visibility
headerRoute.visibility= View.VISIBLE
headerRoute.text = toDateString(item.created)
}else{
headerRoute.visibility=View.GONE
}
this.item = item
}
}
}
}

View File

@ -0,0 +1,261 @@
package es.verdnatura.presentation.view.feature.delivery.fragments
import android.content.Intent
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.graphics.drawable.Drawable
import android.os.Build
import android.text.Editable
import android.text.TextWatcher
import android.view.View
import android.widget.ImageView
import androidx.annotation.RequiresApi
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentRouteBinding
import es.verdnatura.domain.notNull
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.*
import es.verdnatura.presentation.view.feature.delivery.adapters.RouteAdapter
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewModel
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
class RoutesFragment(
var title: String = ""
) : BaseFragment<FragmentRouteBinding, DeliveryViewModel>(
DeliveryViewModel::class
) {
private var adapter: RouteAdapter? = null
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
private lateinit var myListRoute: MutableList<RouteInfo>
companion object {
fun newInstance(title: String) =
RoutesFragment(title)
}
override fun getLayoutId(): Int = R.layout.fragment_route
@RequiresApi(Build.VERSION_CODES.O)
override fun init() {
super.init()
setEvents()
setToolBar()
binding.scanInput.requestFocus()
callBack(viewModel.getRoutes(mobileApplication.userId!!))
}
private fun callBack(callBackEndPoint: Unit) {
binding.splashProgress.visibility = View.VISIBLE
return callBackEndPoint
}
@RequiresApi(Build.VERSION_CODES.O)
private fun setToolBar() {
ma.hideBottomNavigation(View.GONE)
binding.mainToolbar.toolbarSubtitle.setTextColor(requireContext().getColor((R.color.verdnatura_pumpkin_orange)))
binding.mainToolbar.toolbarTitle.visibility = View.VISIBLE
binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
binding.mainToolbar.toolbarTitle.text = title
val listIcons: ArrayList<ImageView> = ArrayList()
val iconInfo = ImageView(context)
val iconRefresh = ImageView(context)
val iconSearch = ImageView(context)
iconInfo.setImageResource(R.drawable.ic_info_delivery)
iconRefresh.setImageResource(R.drawable.ic_info_refresh)
iconSearch.setImageResource(R.drawable.expedition_find)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
iconInfo.tooltipText = getTooltip(R.drawable.ic_info_delivery)
iconRefresh.tooltipText = getTooltip(R.drawable.ic_info_refresh)
iconSearch.tooltipText = getTooltip(R.drawable.expedition_find)
}
listIcons.add(iconInfo)
listIcons.add(iconRefresh)
listIcons.add(iconSearch)
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
when (item) {
iconRefresh.drawable -> {
callBack(viewModel.getRoutes(mobileApplication.userId!!))
}
iconInfo.drawable -> {
ma.onPasillerosItemClickListener(
PasillerosItemVO(title = getString(R.string.titleInfo)),
getString(R.string.titleInfo)
)
}
iconSearch.drawable -> {
ma.onPasillerosItemClickListener(
PasillerosItemVO(title = getString(R.string.titleLog)),
getString(R.string.titleLog)
)
}
}
}
})
binding.mainToolbar.toolbarIcons.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
}
private fun openAppDelivery(item: RouteInfo) {
val i = Intent()
val manager: PackageManager = requireContext().packageManager
val info: PackageInfo = manager.getPackageInfo(requireContext().packageName, 0)
val version = info.versionName
try {
if (version.contains("Beta")) {
i.setClassName(
"verdnatura.es.repartoverdnatura.sfusion",
"verdnatura.es.repartoverdnatura.Tickets"
)
} else {
i.setClassName(
"verdnatura.es.repartoverdnatura",
"verdnatura.es.repartoverdnatura.Tickets"
)
}
i.putExtra("plate", item.numberPlate)
i.putExtra("id", item.id.toString())
i.putExtra("agency", item.name)
i.putExtra("hour", item.hour)
i.putExtra("date", item.created.toString())
i.putExtra("m3", item.m3.toString())
i.putExtra("driver", item.driver)
i.putExtra("kmStart", item.kmStart.toString())
i.putExtra("kmEnd", item.kmEnd.toString())
i.putExtra("dEnd", item.finished)
i.putExtra("dStart", item.started)
i.putExtra("app", "picking")
startActivity(i)
} catch (e: Exception) {
getString(R.string.deliveryApp).toast(context)
}
}
private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed()
}
binding.scanInput.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) {
val searchText = s.toString().lowercase()
val filteredList = myListRoute.filter { route ->
route.toString().lowercase().contains(searchText)
}.toMutableList()
adapter!!.updateList(filteredList)
}
override fun afterTextChanged(s: Editable?) {
}
})
}
@RequiresApi(Build.VERSION_CODES.O)
override fun observeViewModel() {
with(viewModel) {
loadRouteList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.GONE
createListRoutes(it.list)
}
}
routeInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) {
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
binding.mainToolbar.switchButton.visibility = View.VISIBLE
} else {
binding.scanInput.setText("")
binding.mainToolbar.toolbarIcons.visibility = View.GONE
binding.mainToolbar.switchButton.visibility = View.GONE
}
}
}
}
private fun createListRoutes(list: MutableList<RouteInfo>) {
myListRoute = list
adapter = RouteAdapter(
myListRoute,
object : OnItemImageRouteRowClickListener {
override fun onItemImageRouteRowClickListener(item: RouteInfo, action: String) {
when (action) {
"loadVan" -> {
binding.scanInput.isEnabled = true
ma.onPasillerosItemClickListener(
PasillerosItemVO(title = getString(R.string.titleDeliverySummary)),
item.id.toString()
)
}
"showTickets" -> {
//println("La ruta de los tickets es: " + item.id)
openAppDelivery(item)
}
}
}
},
)
binding.routeRecyclerview.addItemDecoration(
ItemDescorationCustomized(
resources.getDimensionPixelSize(
R.dimen.vertical_spacing
)
)
)
binding.routeRecyclerview.adapter = adapter
binding.routeRecyclerview.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
adapter!!.notifyDataSetChanged()
}
private fun setListPosition(list: MutableList<ExpeditionInfoLoadUnload>) {
for (i in list.indices) {
binding.routeRecyclerview.scrollToPosition(i)
break
}
}
}

View File

@ -3,6 +3,8 @@ package es.verdnatura.presentation.view.feature.delivery.model
import androidx.room.Entity
import androidx.room.PrimaryKey
import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
class FreeLanceDeliveryInfoList(
var list: List<DeliveryInfo> = listOf()
@ -101,3 +103,26 @@ class ExpeditionInfoSummary(
var delivered: Int = 0
)
class RouteList(
var list: MutableList<RouteInfo> = mutableListOf()
)
class RouteInfo(
var id: Long,
var driver: String,
var hour: String,
var created: Date,
var m3: Double,
var numberPlate: String,
var name: String,
var kmStart: Long,
var kmEnd: Long,
var started: String,
var finished: String,
var header :Boolean = false
) {
override fun toString(): String {
return "$driver$id$name$numberPlate$m3$created$hour$"
}
}
val dateFormat = SimpleDateFormat("yyyy-MM-dd", Locale.getDefault())

View File

@ -0,0 +1,51 @@
package es.verdnatura.presentation.view.feature.delivery.model
import java.io.Serializable
class Ruta : Serializable {
var Id: String? = null
var Hour: String? = null
var Date: String? = null
var M3: String? = null
var Plate: String? = null
var Agency: String? = null
var Driver: String? = null
var kmStart: String? = null
var kmEnd: String? = null
var dStart: String? = null
var dEnd: String? = null
var Chofer: String? = null
var isLoaded = "0"
constructor(
id: String?,
hour: String?,
date: String?,
m3: String?,
plate: String?,
agency: String?,
driver: String?,
kmStart: String?,
kmEnd: String?,
dStart: String?,
dEnd: String?,
chofer: String?,
isloaded: String
) {
this.Id = id
this.Hour = hour
this.Date = date
this.M3 = m3
this.Plate = plate
this.Agency = agency
this.Driver = driver
this.kmStart = kmStart
this.kmEnd = kmEnd
this.dStart = dStart
this.dEnd = dEnd
this.Chofer = chofer
isLoaded = isloaded
}
}

View File

@ -4,10 +4,23 @@ package es.verdnatura.presentation.view.feature.delivery.viewmodels
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.SilexCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.delivery.model.*
import es.verdnatura.presentation.view.feature.delivery.model.DeliveryInfo
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoList
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLog
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionList
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionSummaryList
import es.verdnatura.presentation.view.feature.delivery.model.FreeLanceDeliveryInfoList
import es.verdnatura.presentation.view.feature.delivery.model.RouteDelivery
import es.verdnatura.presentation.view.feature.delivery.model.RouteDeliveryList
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
import es.verdnatura.presentation.view.feature.delivery.model.RouteList
import retrofit2.Response
class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
@ -21,6 +34,9 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
private val _expeditionInfoSummary by lazy { MutableLiveData<ExpeditionSummaryList>() }
val expeditionInfoSummary: LiveData<ExpeditionSummaryList> = _expeditionInfoSummary
private val _routeList by lazy { MutableLiveData<RouteList>() }
val routeList: LiveData<RouteList> = _routeList
private val _routeInfoList by lazy { MutableLiveData<RouteDeliveryList>() }
val routeInfoList: LiveData<RouteDeliveryList> = _routeInfoList
@ -37,6 +53,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
private val _expeditionList by lazy { MutableLiveData<ExpeditionList>() }
val expeditionList: LiveData<ExpeditionList> = _expeditionList
val loadRouteList = Transformations.map(_routeList) { Event(it) }
fun getInfoCompany(
userId: Int
@ -182,24 +199,47 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
silex.route_getExpeditionSummary(route)
.enqueue(object : SilexCallback<List<ExpeditionInfoSummary>>(context) {
override fun onSuccess(response: Response<List<ExpeditionInfoSummary>>) {
override fun onSuccess(response: Response<List<ExpeditionInfoSummary>>) {
if (response.body() != null) {
_expeditionInfoSummary.value =
response.body()?.let { ExpeditionSummaryList(it) }
} else {
_expeditionInfoSummary.value = ExpeditionSummaryList()
if (response.body() != null) {
_expeditionInfoSummary.value =
response.body()?.let { ExpeditionSummaryList(it) }
} else {
_expeditionInfoSummary.value = ExpeditionSummaryList()
}
}
}
override fun onError(t: Throwable) {
_expeditionInfoSummary.value = ExpeditionSummaryList()
super.onError(t)
override fun onError(t: Throwable) {
_expeditionInfoSummary.value = ExpeditionSummaryList()
super.onError(t)
}
})
}
})
}
fun getRoutes(
workerFk: Int
) {
silex.getRoutes(workerFk)
.enqueue(object : SilexCallback<MutableList<RouteInfo>>(context) {
override fun onSuccess(response: Response<MutableList<RouteInfo>>) {
if (response.body() != null) {
_routeList.value =
response.body()?.let { RouteList(it) }
} else {
_routeList.value = RouteList()
}
}
override fun onError(t: Throwable) {
_routeList.value = RouteList()
super.onError(t)
}
})
}
}

View File

@ -3,6 +3,7 @@ package es.verdnatura.presentation.view.feature.main.activity
//Tarea #4815
import NetworkUtils
import PhotosFragment
import android.content.SharedPreferences
import android.media.MediaPlayer
@ -44,6 +45,7 @@ import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlV
import es.verdnatura.presentation.view.feature.delivery.fragments.InfoFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.LoadUnloadFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.LogExpeditionFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.RoutesFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.SummaryFragment
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleFragment
import es.verdnatura.presentation.view.feature.historicoarticulo.fragment.HistoricoArticuloFragment
@ -106,6 +108,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
private var scheduledFuture: ScheduledFuture<*>? = null
private var scheduledExecutor: ScheduledExecutorService? = null
private val _renewTokenResponse = MutableLiveData<RenewToken>()
private lateinit var networkUtils: NetworkUtils
//Tarea #4815
private var comeFromDelivery: Boolean? = null
@ -114,14 +118,23 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
override fun onPause() {
super.onPause()
scheduledFuture?.cancel(false)
// networkUtils.unregisterNetworkCallback()
}
@RequiresApi(Build.VERSION_CODES.O)
override fun onResume() {
super.onResume()
if (scheduledFuture?.isCancelled == true) {
startRepeatingTask((application as MobileApplication).renewInterval)
try {
if (scheduledFuture?.isCancelled == true) {
var prefs = (application as MobileApplication).getPrefsShared()
startRepeatingTask(prefs.getLong("renewInterval",0))
}
networkUtils.registerNetworkCallback()
} catch (e: Exception) {
e.message.toString().toast(baseContext)
}
}
@RequiresApi(Build.VERSION_CODES.O)
@ -134,10 +147,15 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
customDialog = CustomDialogMainActivity(this)
setFragments()
setBottomMenuFragment()
setRegisterNetwork()
}
private fun setRegisterNetwork() {
networkUtils = NetworkUtils(this, application as MobileApplication)
}
@RequiresApi(Build.VERSION_CODES.O)
private fun startRepeatingTask(myInterval: Long) {
@ -828,6 +846,19 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
}
getString(R.string.titleDeliveryRoute) -> {
addFragmentOnTop(
RoutesFragment.newInstance(item.title),
if (comeFromDelivery == true) {
getString(R.string.titleDeliverySummary)
} else {
null
}
)
}
getString(R.string.titlePhotos) -> {
addFragmentOnTop(
PhotosFragment.newInstance(item.title, entryPoint)
@ -1095,7 +1126,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
//Tarea 5613
fun checkTokenRenew() {
val prefs = (application as MobileApplication).getPrefsShared()
val renewPeriod = (application as MobileApplication).renewPeriod
val renewPeriod = prefs.getLong("renewPeriod",0)
var min = minOf(prefs.getLong("ttl", 0), renewPeriod) * 1000
/* println("Renovar: ****************************")

View File

@ -170,7 +170,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
)
)
//Tarea 5891
_pasillerositem.add(
/* _pasillerositem.add(
PasillerosItemVO(
3,
R.drawable.ic_inventory_parking,
@ -180,7 +180,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
R.string.titleInventoryParkingDescrip
)
)
)
)*/
_pasillerositem.add(
PasillerosItemVO(
@ -499,7 +499,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
)
)
/* //Tarea 4678
//Tarea 4678
_pasillerositem.add(
PasillerosItemVO(
6,
@ -513,7 +513,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
//#tarea4021
_pasillerositem.add(
/* _pasillerositem.add(
PasillerosItemVO(
6,
R.drawable.ic_packaging,
@ -565,7 +565,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
}
fun inititializeDefaultDelivery() {
_pasillerositem.add(
/* _pasillerositem.add(
PasillerosItemVO(
30,
R.drawable.expedition_find,
@ -587,7 +587,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
)
)
)
_pasillerositem.add(
/* _pasillerositem.add(
PasillerosItemVO(
30,
R.drawable.ic_delivery_truck,
@ -610,7 +610,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
)
)
)
*/
_pasillerositem.add(
PasillerosItemVO(
@ -621,7 +621,17 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
contextApp.getString(R.string.titleDeliverySummary)
)
)
*/
_pasillerositem.add(
PasillerosItemVO(
6,
R.drawable.ic_delivery_truck,
contextApp.getString(R.string.titleDeliveryRoute),
R.string.titleDeliveryRoute,
contextApp.getString(R.string.titleDeliveryRoute)
)
)
}
}

View File

@ -4,5 +4,5 @@
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#F7931E" android:pathData="M13.04 10C12.64 10.25 12.26 10.55 11.9 10.9C11.57 11.24 11.27 11.61 11.03 12H8V10.5C8 10.22 8.22 10 8.5 10H13.04M20 8H2V2H20V8M18 4H4V6H18V4M5 18V9H3V20H11.82C11.24 19.4 10.8 18.72 10.5 18H5M23.39 21L22 22.39L18.88 19.32C18.19 19.75 17.37 20 16.5 20C14 20 12 18 12 15.5S14 11 16.5 11 21 13 21 15.5C21 16.38 20.75 17.21 20.31 17.9L23.39 21M19 15.5C19 14.12 17.88 13 16.5 13S14 14.12 14 15.5 15.12 18 16.5 18 19 16.88 19 15.5Z" />
<path android:fillColor="#FFF" android:pathData="M13.04 10C12.64 10.25 12.26 10.55 11.9 10.9C11.57 11.24 11.27 11.61 11.03 12H8V10.5C8 10.22 8.22 10 8.5 10H13.04M20 8H2V2H20V8M18 4H4V6H18V4M5 18V9H3V20H11.82C11.24 19.4 10.8 18.72 10.5 18H5M23.39 21L22 22.39L18.88 19.32C18.19 19.75 17.37 20 16.5 20C14 20 12 18 12 15.5S14 11 16.5 11 21 13 21 15.5C21 16.38 20.75 17.21 20.31 17.9L23.39 21M19 15.5C19 14.12 17.88 13 16.5 13S14 14.12 14 15.5 15.12 18 16.5 18 19 16.88 19 15.5Z" />
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="960"
android:viewportHeight="960"
>
<path
android:fillColor="@android:color/white"
android:pathData="M453,680L513,680L513,440L453,440L453,680ZM479.98,366Q494,366 503.5,356.8Q513,347.6 513,334Q513,319.55 503.52,309.78Q494.04,300 480.02,300Q466,300 456.5,309.78Q447,319.55 447,334Q447,347.6 456.48,356.8Q465.96,366 479.98,366ZM480.27,880Q397.53,880 324.77,848.5Q252,817 197.5,762.5Q143,708 111.5,635.16Q80,562.32 80,479.5Q80,396.68 111.5,323.84Q143,251 197.5,197Q252,143 324.84,111.5Q397.68,80 480.5,80Q563.32,80 636.16,111.5Q709,143 763,197Q817,251 848.5,324Q880,397 880,479.73Q880,562.47 848.5,635.23Q817,708 763,762.32Q709,816.63 636,848.32Q563,880 480.27,880ZM480.5,820Q622,820 721,720.5Q820,621 820,479.5Q820,338 721.19,239Q622.38,140 480,140Q339,140 239.5,238.81Q140,337.63 140,480Q140,621 239.5,720.5Q339,820 480.5,820ZM480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Q480,480 480,480Z"/>
</vector>

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="960"
android:viewportHeight="960"
>
<path
android:fillColor="@android:color/white"
android:pathData="M480,800Q347,800 253.5,706.5Q160,613 160,480Q160,347 253.5,253.5Q347,160 480,160Q565,160 629,194.5Q693,229 740,289L740,160L800,160L800,414L546,414L546,354L714,354Q676,294 617,257Q558,220 480,220Q371,220 295.5,295.5Q220,371 220,480Q220,589 295.5,664.5Q371,740 480,740Q563,740 632,692.5Q701,645 728,567L790,567Q761,672 675,736Q589,800 480,800Z"/>
</vector>

View File

@ -0,0 +1,8 @@
<vector android:height="24dp" android:viewportHeight="32"
android:viewportWidth="32" android:width="24dp"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FFFFFF"
android:pathData="M6.267,20.267c0.4,-1.2 0.8,-2.4 1.2,-3.6 0.267,-0.8 0.533,-1.733 0.933,-2.533 0.933,-2.533 1.733,-5.2 2.667,-7.733 0.667,-1.733 1.2,-3.467 1.867,-5.2 0.133,-0.4 0.267,-0.667 0.4,-1.067 0,-0.133 0.133,-0.133 0.267,-0.133 1.867,0.4 3.6,0.667 5.467,1.067 2.533,0.533 4.933,1.067 7.467,1.467 1.733,0.4 3.467,0.667 5.333,1.067 0.133,0.133 0.133,0.133 0.133,0.4 -0.933,2.8 -1.867,5.6 -2.8,8.267 -0.667,2 -1.333,4 -2,5.867 -0.8,2.133 -1.467,4.4 -2.4,6.533 -0.533,1.6 -1.2,3.067 -1.867,4.533 -0.4,0.8 -0.8,1.6 -1.467,2.133 -0.533,0.533 -1.067,0.667 -1.867,0.4 -1.867,-0.533 -2.933,-1.867 -3.333,-3.733 -0.133,-0.8 -0.267,-1.6 -0.267,-2.4 0,-0.4 0,-0.8 0,-1.2s-0.267,-0.667 -0.533,-0.8c-2.4,-0.933 -4.8,-2 -7.333,-2.933 -0.8,0 -1.333,-0.133 -1.867,-0.4zM17.333,12.8c-0.533,0 -0.933,0.133 -0.933,0.533 -0.133,0.4 0.133,0.8 0.533,0.933 1.867,0.667 3.867,1.333 5.733,1.867 0.4,0.133 0.8,0 0.933,-0.267 0.267,-0.533 0.133,-0.933 -0.4,-1.2 -1.467,-0.533 -3.067,-1.067 -4.533,-1.467 -0.533,-0.133 -1.067,-0.267 -1.333,-0.4zM14.933,18.267c-0.133,0 -0.267,0 -0.4,0.133 -0.267,0.133 -0.4,0.4 -0.4,0.667 0,0.4 0.267,0.667 0.667,0.8 1.867,0.667 3.733,1.2 5.733,1.867 0.533,0.133 0.933,0 1.067,-0.4s-0.133,-0.8 -0.533,-0.933c-1.333,-0.4 -2.667,-0.933 -4.133,-1.333 -0.8,-0.4 -1.467,-0.667 -2,-0.8zM25.2,10.267c0.667,0 0.933,-0.133 1.067,-0.667 0.133,-0.267 -0.267,-0.667 -0.667,-0.8 -0.667,-0.133 -1.333,-0.4 -2.133,-0.533 -1.2,-0.4 -2.4,-0.667 -3.733,-1.067 -0.533,-0.133 -1.067,0.267 -0.933,0.8 0,0.4 0.4,0.533 0.8,0.667 1.333,0.4 2.8,0.8 4.133,1.2 0.533,0.133 1.067,0.267 1.467,0.4zM16.133,6.667c0,-0.4 -0.4,-0.8 -0.8,-0.8 -0.533,0 -0.8,0.267 -0.8,0.667s0.4,0.8 0.933,0.8c0.4,0.133 0.667,-0.133 0.667,-0.667zM13.333,13.067c0.4,0 0.8,-0.267 0.8,-0.667s-0.4,-0.8 -0.8,-0.8c-0.533,0 -0.933,0.267 -0.8,0.667 -0.133,0.4 0.133,0.8 0.8,0.8zM11.067,16.8c-0.533,0 -0.8,0.267 -0.8,0.8s0.4,0.8 0.933,0.8c0.4,0 0.8,-0.267 0.8,-0.667 -0.133,-0.533 -0.533,-0.933 -0.933,-0.933z"/>
<path android:fillColor="#FFFFFF"
android:pathData="M0.133,19.333c0.8,0.4 1.733,0.667 2.533,1.067 1.867,0.8 3.733,1.467 5.467,2.267 1.6,0.667 3.2,1.333 4.933,2 0.267,0.133 0.533,0.267 0.8,0.4s0.4,0.267 0.4,0.533c0,1.333 0.133,2.8 0.667,4 0.267,0.533 0.533,1.2 0.8,1.733 -0.4,-0.133 -0.933,-0.267 -1.333,-0.533 -1.467,-0.533 -2.933,-1.2 -4.533,-1.733 -1.333,-0.533 -2.667,-1.2 -4,-1.733 -0.933,-0.4 -1.867,-0.8 -2.8,-1.2s-1.733,-1.2 -2.267,-2c-0.667,-1.333 -0.8,-2.667 -0.8,-4.133 0,-0.133 0.133,-0.4 0.133,-0.667z"/>
</vector>

View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:hint="@string/filterRoutes"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:enabled="true"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/>
/>
<LinearLayout
android:id="@+id/txtDescriptions"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/scan_input">
</LinearLayout>
<LinearLayout
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_pumpkin_orange"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtDescriptions"/>
<LinearLayout
android:id="@+id/itemcard_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="5dp"
android:orientation="vertical"
tools:ignore="ExtraText"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/divider">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/route_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/item_route_row" />
</RelativeLayout>
</LinearLayout>
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</ScrollView>
<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" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -0,0 +1,249 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="item"
type="es.verdnatura.presentation.view.feature.delivery.model.RouteInfo" />
</data>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_height="30dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@color/verdnatura_black_9">
<TextView
android:id="@+id/headerRoute"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="1dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
android:textColor="@color/verdnatura_white"
android:background="@color/verdnatura_pumpkin_orange"
android:text="cabecera"
>
</TextView>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@color/verdnatura_black_9">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="1dp"
android:paddingLeft="5dp"
android:paddingRight="5dp"
>
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/linearLayout"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/textDriver"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{item.driver}"
android:textColor="@color/verdnatura_white" />
<TextView
android:id="@+id/textRoute"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{String.valueOf(item.id)}"
android:textColor="@color/verdnatura_white" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/textHour"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="@string/hour"
android:textColor="@color/verdnatura_brown_grey" />
<TextView
android:id="@+id/hour"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{item.hour}"
android:textColor="@color/verdnatura_white" />
</LinearLayout>
<TextView
android:id="@+id/textZone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@{item.name}"
android:textColor="@color/verdnatura_white"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/textPalletNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="@string/namePallet"
android:textColor="@color/verdnatura_brown_grey" />
<TextView
android:id="@+id/palletNumber"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{item.numberPlate}"
android:textColor="@color/verdnatura_white" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal">
<TextView
android:id="@+id/txtM3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:text="m3"
android:textColor="@color/verdnatura_brown_grey" />
<TextView
android:id="@+id/M3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@{String.valueOf(item.m3)}"
android:textColor="@color/verdnatura_white" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="100dp"
android:layout_height="0dp"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:id="@+id/linearLayoutLoadVan"
android:layout_weight="1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/imageLoadVan"
android:layout_width="match_parent"
android:layout_height="30dp"
android:layout_marginTop="0dp"
android:layout_marginBottom="5dp"
android:tooltipText="Permite escanear expediciones a cargar en la furgoneta"
app:srcCompat="@drawable/camion" />
<TextView
android:id="@+id/loadVanTxt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="@string/scannerDelivery"
android:textColor="@color/colorPrimary" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayoutShowTickets"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:layout_weight="1"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/showTickets"
android:layout_width="match_parent"
android:layout_height="30dp"
app:srcCompat="@drawable/ic_ticket_action"
android:layout_marginTop="0dp"
android:tooltipText="Permite escanear expediciones a cargar en la furgoneta"
android:layout_marginBottom="5dp"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:text="@string/showTickets"
android:textColor="@color/colorPrimary"/>
</LinearLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</layout>

View File

@ -612,5 +612,16 @@
<string name="itemNotFoundScanAgain">Artículo no encontrado. Escanea de nuevo el carro</string>
<string name="scanShelvingAgain">Escanea matrícula de nuevo</string>
<string name="saveSesion">Recordar sesión</string>
<string name="titleDeliveryRoute">Rutas</string>
<string name="hour">Hora</string>
<string name="palletNumber">Número de pallet</string>
<string name="scannerDelivery">Escáner</string>
<string name="filterRoutes">Filtrar rutas</string>
<string name="showLogExpedition">Ver log expedición</string>
<string name="udpateRoutes">Actualizar rutas</string>
<string name="showTickets">Tickets</string>
<string name="namePallet">Número palet</string>
<string name="sin_internet">NO INTERNET</string>
<string name="deliveryApp">Asegúrate de tener la app de reparto instalada</string>
</resources>

View File

@ -612,5 +612,16 @@
<string name="itemNotFoundScanAgain">Artículo no encontrado. Escanea de nuevo el carro</string>
<string name="scanShelvingAgain">Escanea matrícula de nuevo</string>
<string name="saveSesion">Recordar sesión</string>
<string name="titleDeliveryRoute">Routes</string>
<string name="hour">Heure</string>
<string name="palletNumber">"Número de pallet "</string>
<string name="scannerDelivery">Scanner</string>
<string name="filterRoutes">Filtrer les itinéraires </string>
<string name="showLogExpedition">Afficher le journal de l\\\'expédition</string>
<string name="udpateRoutes">Mettre à jour</string>
<string name="showTickets">Tickets</string>
<string name="namePallet">Numéro de palette</string>
<string name="sin_internet">NO INTERNET</string>
<string name="deliveryApp">Assurez-vous que l\'application de livraison est installée</string>
</resources>

View File

@ -612,5 +612,16 @@
<string name="itemNotFoundScanAgain">Artículo no encontrado. Escanea de nuevo el carro</string>
<string name="scanShelvingAgain">Escanea matrícula de nuevo</string>
<string name="saveSesion">Recordar sesión</string>
<string name="titleDeliveryRoute">Rutas</string>
<string name="hour">Hora</string>
<string name="palletNumber">Número de pallet</string>
<string name="scannerDelivery">Escanear</string>
<string name="filterRoutes">"Filtrar "</string>
<string name="showLogExpedition">Ver log expedição</string>
<string name="udpateRoutes">Atualizar rotas</string>
<string name="showTickets">Tickets</string>
<string name="namePallet">Numero palet</string>
<string name="sin_internet">NO INTERNET</string>
<string name="deliveryApp">Certifique-se de ter o aplicativo de entrega instalado</string>
</resources>

View File

@ -1,6 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--Vertical spacing recyclerViewer-->
<dimen name="vertical_spacing">2dp</dimen>
<!--Vertical margin-->
<dimen name="layout_margin_min_to_modify">2dp</dimen>

View File

@ -6,6 +6,8 @@
<string name="Salida">Departure</string>
<string name="Balance">Balance</string>
<string name="Pallet">Pallet</string>
<string name="namePallet">Pallet number</string>
<string name="palletNumber">Número de pallet</string>
<string name="cmr">CMR</string>
<string name="Ruta">Route</string>
<string name="Cajas">Boxes</string>
@ -13,6 +15,7 @@
<string name="de">of</string>
<string name="Ticket">Ticket</string>
<string name="tickets">Tickets:</string>
<string name="showTickets">Tickets</string>
<string name="Concepto">Concept</string>
<string name="SinServir">NoServing</string>
<string name="Aparcado">Parked</string>
@ -162,6 +165,7 @@
<string name="controlticket">Control ticket</string>
<string name="checkerUbication">Permit check ubications</string>
<string name="titleExpeditionScan">Scan expedition</string>
<string name="filterRoutes">Filtrar rutas</string>
<string name="dayofSale">Day of sale</string>
<string name="wagoon">Wagoon</string>
<string name="Referencia">Reference</string>
@ -388,6 +392,7 @@
<string name="titlePackaging">Suppliers</string>
<string name="titleDelivery">Delivery</string>
<string name="titleDeliverySummary">Delivery summary</string>
<string name="titleDeliveryRoute">Rutas</string>
<string name="titlePackagingCount">Packaging</string>
<string name="titlePackagingObs">Observations</string>
<string name="titlePackagingSummary">Summary</string>
@ -593,6 +598,8 @@
<string name="scanItemUpload">Scan item upload</string>
<string name="messageUploadItem">Tienes que escanear el artículo para poder subirlo</string>
<string name="messageUpload">Sube la imagen al servidor</string>
<string name="showLogExpedition">View log expedition</string>
<string name="udpateRoutes">Update routes</string>
<string name="selectImage">Seleccionar imagen</string>
<string name="ticketAdvance">Avanzar ticket encajado</string>
<string name="ticketAdvanceDescrip">Permite avanzar un ticket para que sea encajado</string>
@ -611,4 +618,8 @@
<string name="scanItemForChecking">Escanea artículo a verificar</string>
<string name="itemNotFoundScanAgain">Artículo no encontrado. Escanea de nuevo el carro</string>
<string name="scanShelvingAgain">Escanea matrícula de nuevo</string>
<string name="hour">Hour</string>
<string name="scannerDelivery">Scan</string>
<string name="sin_internet">NO INTERNET</string>
<string name="deliveryApp">Make sure you have the delivery app installed</string>
</resources>