Merge branch 'testBeta_4679_reparto' into testBeta
# Conflicts: # .idea/workspace.xml # app/build.gradle
This commit is contained in:
commit
5fd74760c9
|
@ -19,8 +19,8 @@
|
|||
<option name="values">
|
||||
<map>
|
||||
<entry key="assetSourceType" value="FILE" />
|
||||
<entry key="outputName" value="ic_item" />
|
||||
<entry key="sourceFile" value="Z:\DISEÑO-APP\GENERAL\icomoon\SVG\item.svg" />
|
||||
<entry key="outputName" value="ic_info" />
|
||||
<entry key="sourceFile" value="Z:\DISEÑO-APP\GENERAL\icomoon\SVG\info.svg" />
|
||||
</map>
|
||||
</option>
|
||||
</PersistentState>
|
||||
|
|
|
@ -13,8 +13,9 @@ android {
|
|||
applicationId "es.verdnatura"
|
||||
minSdkVersion 24 //21
|
||||
targetSdkVersion 33
|
||||
versionCode 166
|
||||
versionName = "23.6"
|
||||
versionCode 170
|
||||
//versionName = "23.4" versionCode 157
|
||||
versionName = "23.8Beta"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,8 @@
|
|||
android:name=".presentation.view.feature.main.activity.MainActivity"
|
||||
android:windowSoftInputMode="stateHidden|adjustResize"
|
||||
android:configChanges="orientation"
|
||||
android:screenOrientation="portrait"/>
|
||||
android:screenOrientation="portrait"
|
||||
android:exported="true"/>
|
||||
<activity
|
||||
android:name=".presentation.view.feature.login.activity.LoginActivity"
|
||||
android:configChanges="orientation"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
package es.verdnatura.di
|
||||
|
||||
import es.verdnatura.presentation.view.feature.ajustes.fragment.AjustesViewModel
|
||||
import es.verdnatura.presentation.view.feature.articulo.fragment.ItemCardViewModel
|
||||
import es.verdnatura.presentation.view.feature.buffer.fragment.BufferFragmentViewModel
|
||||
|
@ -9,6 +10,7 @@ import es.verdnatura.presentation.view.feature.claim.fragment.ClaimViewModel
|
|||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionViewModel
|
||||
import es.verdnatura.presentation.view.feature.controlador.fragment.ControladorViewModel
|
||||
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoViewModel
|
||||
import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewModel
|
||||
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleViewModel
|
||||
import es.verdnatura.presentation.view.feature.faltas.fragment.FaltasViewModel
|
||||
import es.verdnatura.presentation.view.feature.historicoarticulo.fragment.HistoricoArticuloViewModel
|
||||
|
@ -199,4 +201,7 @@ val viewModelModule = module {
|
|||
viewModel {
|
||||
PackagingViewModel(androidContext())
|
||||
}
|
||||
viewModel {
|
||||
DeliveryViewModel(androidContext())
|
||||
}
|
||||
}
|
|
@ -54,7 +54,7 @@ abstract class SilexCallback<T>(val context: Context) : Callback<T> {
|
|||
}
|
||||
|
||||
open fun onSuccess(response: Response<T>) {
|
||||
(nameofFunction((this)) + context.getString(R.string.operationSuccessful)).toast(context)
|
||||
// (nameofFunction((this)) + context.getString(R.string.operationSuccessful)).toast(context)
|
||||
//(context as MobileApplication).playSoundIsOK(true)
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,9 @@ import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
|||
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
|
||||
import es.verdnatura.presentation.view.feature.calidad.model.ItemBuyerVO
|
||||
import es.verdnatura.presentation.view.feature.collection.SalesModified
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.DeliveryInfo
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLog
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteDelivery
|
||||
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDate
|
||||
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
|
||||
import es.verdnatura.presentation.view.feature.historicoarticulo.model.ItemHistoricoVO
|
||||
|
@ -876,4 +879,35 @@ interface VerdnaturaService {
|
|||
):
|
||||
Call<List<ItemSupplier>>
|
||||
|
||||
@POST("delivery/getInfoCompany")//NO SALIX
|
||||
fun getInfoCompany(
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<List<DeliveryInfo>>
|
||||
|
||||
@POST("delivery/expedition_getLog")//NO SALIX
|
||||
fun expedition_getLog(
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<List<ExpeditionInfoLog>>
|
||||
|
||||
@POST("delivery/get_routesFromExpedition")//NO SALIX
|
||||
fun get_routesFromExpedition(
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<List<RouteDelivery>>
|
||||
|
||||
@POST("delivery/expeditionState_add")//NO SALIX
|
||||
fun expeditionState_add(
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Void>
|
||||
|
||||
@POST("delivery/getInfoFreelance")//NO SALIX
|
||||
fun getInfoFreelance(
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<List<DeliveryInfo>>
|
||||
|
||||
|
||||
}
|
|
@ -227,6 +227,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
R.drawable.ic_eye_ui -> getString(R.string.icViewCollection)
|
||||
R.drawable.ic_collection -> getString(R.string.icViewCollection)
|
||||
R.drawable.ic_ubicator_check -> getString(R.string.checkerUbication)
|
||||
R.drawable.ic_delivery ->"Abre la app de Reparto para escanear carga"
|
||||
else -> {
|
||||
""
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package es.verdnatura.presentation.view.feature.delivery.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.databinding.ItemExpeditionlogRowBinding
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLog
|
||||
|
||||
|
||||
class ExpeditionLogAdapter(
|
||||
private val items: List<ExpeditionInfoLog>
|
||||
) : RecyclerView.Adapter<ExpeditionLogAdapter.ItemHolder>() {
|
||||
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
|
||||
return ItemHolder(
|
||||
ItemExpeditionlogRowBinding.inflate(
|
||||
LayoutInflater.from(parent.context),
|
||||
parent,
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() = items.size
|
||||
|
||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
}
|
||||
|
||||
inner class ItemHolder(
|
||||
val binding: ItemExpeditionlogRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
private val res = binding.root.context.resources
|
||||
fun bind(item: ExpeditionInfoLog) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package es.verdnatura.presentation.view.feature.delivery.fragments
|
||||
|
||||
import android.view.View
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentInfoDeliveryBinding
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewModel
|
||||
|
||||
class InfoFragment(var title: String) :
|
||||
BaseFragment<FragmentInfoDeliveryBinding, DeliveryViewModel>(DeliveryViewModel::class) {
|
||||
companion object {
|
||||
fun newInstance(title: String) = InfoFragment(title)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_info_delivery
|
||||
|
||||
override fun init() {
|
||||
super.init()
|
||||
binding.mainToolbar.toolbarTitle.text = title
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getInfoCompany(getDataInt(USERFK))
|
||||
viewModel.getInfoFreelance(getDataInt(USERFK))
|
||||
setEvents()
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
|
||||
companyInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty()) {
|
||||
binding.itemName.text = it.list[0].name
|
||||
binding.itemNif.text = it.list[0].nif
|
||||
binding.itemAdress.text = it.list[0].street + "-" + it.list[0].city
|
||||
}
|
||||
|
||||
}
|
||||
freelanceInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty()) {
|
||||
binding.linearInfoFreelance.visibility=View.VISIBLE
|
||||
binding.freelanceName.text = it.list[0].name
|
||||
binding.freelanceNif.text = it.list[0].nif
|
||||
binding.freelanceAddress.text = it.list[0].street + "-" + it.list[0].city
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,187 @@
|
|||
package es.verdnatura.presentation.view.feature.delivery.fragments
|
||||
|
||||
import android.content.Intent
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.ImageView
|
||||
import android.widget.Toast
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentExpeditionLogDeliveryBinding
|
||||
import es.verdnatura.domain.toInt
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
|
||||
import es.verdnatura.presentation.view.feature.delivery.adapters.ExpeditionLogAdapter
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.Expedition
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLog
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteDelivery
|
||||
import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewModel
|
||||
|
||||
|
||||
class LogExpeditionFragment(
|
||||
var title: String = ""
|
||||
) : BaseFragment<FragmentExpeditionLogDeliveryBinding, DeliveryViewModel>(
|
||||
DeliveryViewModel::class
|
||||
) {
|
||||
|
||||
private var adapter: ExpeditionLogAdapter? = null
|
||||
private var originalItem: Int = 0
|
||||
|
||||
companion object {
|
||||
fun newInstance(title: String) = LogExpeditionFragment(title)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_expedition_log_delivery
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun init() {
|
||||
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.mainToolbar.toolbarTitle.text = title
|
||||
binding.scanInput.requestFocus()
|
||||
setEvents()
|
||||
setToolBar()
|
||||
super.init()
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun setToolBar() {
|
||||
|
||||
binding.mainToolbar.switchButton.tooltipText =
|
||||
getString(R.string.expeditionMarkFound)
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconDelivery = ImageView(context)
|
||||
iconDelivery.setImageResource(R.drawable.ic_delivery)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
iconDelivery.tooltipText = getTooltip(R.drawable.ic_delivery)
|
||||
}
|
||||
listIcons.add(iconDelivery)
|
||||
|
||||
binding.mainToolbar.toolbarIcons.adapter =
|
||||
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
|
||||
|
||||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
|
||||
when (item) {
|
||||
iconDelivery.drawable -> {
|
||||
openAppDelivery()
|
||||
requireActivity().finish()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.GONE
|
||||
}
|
||||
|
||||
private fun openAppDelivery() {
|
||||
val i = Intent()
|
||||
i.setClassName(
|
||||
"verdnatura.es.repartoverdnatura.sfusion",
|
||||
"verdnatura.es.repartoverdnatura.ExpeditionSummaryActivity"
|
||||
)
|
||||
i.putExtra("routeId", binding.route.text)
|
||||
i.putExtra("app", "picking")
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
|
||||
binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
try {
|
||||
viewModel.expedition_getLog(binding.scanInput.toInt())
|
||||
originalItem = binding.scanInput.toInt()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
getString(R.string.expedition) + binding.scanInput.text
|
||||
} catch (ex: Exception) {
|
||||
"Error al escanear expedición".toast(context, Toast.LENGTH_SHORT)
|
||||
}
|
||||
}
|
||||
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
expeditionInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
createList(it.list)
|
||||
setSwitchButon()
|
||||
viewModel.get_routesFromExpedition(originalItem)
|
||||
}
|
||||
routeInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty()) {
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||
binding.mainToolbar.switchButton.visibility = View.VISIBLE
|
||||
setInfoText(it.list[0])
|
||||
} else {
|
||||
binding.scanInput.setText("")
|
||||
binding.routeLayout.visibility = View.GONE
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.GONE
|
||||
binding.mainToolbar.switchButton.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
responseStateAdd.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
viewModel.expedition_getLog(originalItem)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun setSwitchButon() {
|
||||
|
||||
binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
binding.mainToolbar.switchButton.tooltipText = if (isChecked)
|
||||
getString(R.string.expeditionMarkLost) else
|
||||
getString(R.string.expeditionMarkFound)
|
||||
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
||||
if (isChecked) {
|
||||
viewModel.expeditionState_add(arrayListOf(Expedition(originalItem)), "FOUND")
|
||||
} else {
|
||||
viewModel.expeditionState_add(arrayListOf(Expedition(originalItem)), "LOST")
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun setInfoText(routeDelivery: RouteDelivery) {
|
||||
binding.routeLayout.visibility = View.VISIBLE
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||
binding.route.text = routeDelivery.id.toString()
|
||||
binding.date.text = routeDelivery.created
|
||||
binding.agency.text = routeDelivery.name
|
||||
binding.scanInput.setText("")
|
||||
}
|
||||
|
||||
private fun createList(list: List<ExpeditionInfoLog>) {
|
||||
adapter = ExpeditionLogAdapter(list)
|
||||
binding.itemexpeditionlogRecyclerview.adapter = adapter
|
||||
binding.itemexpeditionlogRecyclerview.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
package es.verdnatura.presentation.view.feature.delivery.model
|
||||
|
||||
import java.text.SimpleDateFormat
|
||||
|
||||
class FreeLanceDeliveryInfoList(
|
||||
var list: List<DeliveryInfo> = listOf()
|
||||
)
|
||||
|
||||
class CompanyInfoList(
|
||||
var list: List<DeliveryInfo> = listOf()
|
||||
)
|
||||
|
||||
class DeliveryInfo(
|
||||
var name: String = "",
|
||||
var street: String = "",
|
||||
var city: String = "",
|
||||
var nif: String = "",
|
||||
var postCode: Int = 0
|
||||
)
|
||||
|
||||
class ExpeditionInfoList(
|
||||
var list: List<ExpeditionInfoLog> = listOf()
|
||||
)
|
||||
|
||||
class ExpeditionInfoLog(
|
||||
var description: String = "",
|
||||
var name: String = "",
|
||||
var created: String,
|
||||
) {
|
||||
/* posiblidad de meter función directo en xml*/
|
||||
fun getDateString(): String {
|
||||
val format = SimpleDateFormat("dd/MM/yyy")
|
||||
// return format.format(created)
|
||||
return created
|
||||
}
|
||||
}
|
||||
|
||||
class RouteDeliveryList(
|
||||
var list: List<RouteDelivery> = listOf()
|
||||
)
|
||||
|
||||
class RouteDelivery(
|
||||
var id: Int,
|
||||
var created: String,
|
||||
var name: String
|
||||
|
||||
)
|
||||
|
||||
class Expedition(
|
||||
var id: Int
|
||||
)
|
|
@ -0,0 +1,146 @@
|
|||
package es.verdnatura.presentation.view.feature.delivery.viewmodels
|
||||
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import es.verdnatura.domain.SilexCallback
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.*
|
||||
import retrofit2.Response
|
||||
import retrofit2.http.POST
|
||||
|
||||
class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val _expeditionInfoList by lazy { MutableLiveData<ExpeditionInfoList>() }
|
||||
val expeditionInfoList: LiveData<ExpeditionInfoList> = _expeditionInfoList
|
||||
|
||||
private val _routeInfoList by lazy { MutableLiveData<RouteDeliveryList>() }
|
||||
val routeInfoList: LiveData<RouteDeliveryList> = _routeInfoList
|
||||
|
||||
private val _freelanceInfoList by lazy { MutableLiveData<FreeLanceDeliveryInfoList>() }
|
||||
val freelanceInfoList: LiveData<FreeLanceDeliveryInfoList> = _freelanceInfoList
|
||||
|
||||
private val _companyInfoList by lazy { MutableLiveData<FreeLanceDeliveryInfoList>() }
|
||||
val companyInfoList: LiveData<FreeLanceDeliveryInfoList> = _companyInfoList
|
||||
|
||||
private val _responseStateAdd by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responseStateAdd: LiveData<ResponseItemVO>
|
||||
get() = _responseStateAdd
|
||||
|
||||
|
||||
fun getInfoCompany(
|
||||
userId: Int
|
||||
) {
|
||||
|
||||
silex.getInfoCompany(userId)
|
||||
.enqueue(object : SilexCallback<List<DeliveryInfo>>(context) {
|
||||
override fun onSuccess(response: Response<List<DeliveryInfo>>) {
|
||||
|
||||
if (response.body() != null) {
|
||||
_companyInfoList.value =
|
||||
response.body()?.let { FreeLanceDeliveryInfoList(it) }
|
||||
} else {
|
||||
_companyInfoList.value = FreeLanceDeliveryInfoList()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_companyInfoList.value = FreeLanceDeliveryInfoList()
|
||||
super.onError(t)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun expedition_getLog(
|
||||
expedition: Int
|
||||
) {
|
||||
|
||||
silex.expedition_getLog(expedition)
|
||||
.enqueue(object : SilexCallback<List<ExpeditionInfoLog>>(context) {
|
||||
|
||||
override fun onSuccess(response: Response<List<ExpeditionInfoLog>>) {
|
||||
|
||||
if (response.body() != null) {
|
||||
_expeditionInfoList.value =
|
||||
response.body()?.let { ExpeditionInfoList(it) }
|
||||
} else {
|
||||
_expeditionInfoList.value = ExpeditionInfoList()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_expeditionInfoList.value = ExpeditionInfoList()
|
||||
super.onError(t)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun get_routesFromExpedition(
|
||||
expedition: Int
|
||||
) {
|
||||
|
||||
silex.get_routesFromExpedition(expedition)
|
||||
.enqueue(object : SilexCallback<List<RouteDelivery>>(context) {
|
||||
|
||||
override fun onSuccess(response: Response<List<RouteDelivery>>) {
|
||||
if (response.body() != null) {
|
||||
_routeInfoList.value =
|
||||
response.body()?.let { RouteDeliveryList(it) }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_routeInfoList.value = RouteDeliveryList()
|
||||
super.onError(t)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
fun expeditionState_add(expeditions: List<Expedition>, state: String) {
|
||||
|
||||
silex.expeditionState_add(expeditions, state)
|
||||
.enqueue(object : SilexCallback<Void>(context) {
|
||||
override fun onSuccess(response: Response<Void>) {
|
||||
_responseStateAdd.value = ResponseItemVO()
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
super.onError(t)
|
||||
_responseStateAdd.value = ResponseItemVO()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@POST("/delivery/getInfoFreelance")
|
||||
fun getInfoFreelance(
|
||||
userId: Int
|
||||
) {
|
||||
silex.getInfoFreelance(userId)
|
||||
.enqueue(object : SilexCallback<List<DeliveryInfo>>(context) {
|
||||
|
||||
override fun onSuccess(response: Response<List<DeliveryInfo>>) {
|
||||
|
||||
if (response.body() != null) {
|
||||
_freelanceInfoList.value =
|
||||
response.body()?.let { FreeLanceDeliveryInfoList(it) }
|
||||
} else {
|
||||
_freelanceInfoList.value = FreeLanceDeliveryInfoList()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_freelanceInfoList.value = FreeLanceDeliveryInfoList()
|
||||
super.onError(t)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -6,7 +6,6 @@ import android.media.MediaPlayer
|
|||
import android.view.Menu
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.databinding.ktx.BuildConfig
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentManager
|
||||
import com.google.android.material.bottomnavigation.LabelVisibilityMode.LABEL_VISIBILITY_UNLABELED
|
||||
|
@ -34,6 +33,8 @@ import es.verdnatura.presentation.view.feature.controlador.fragment.ControladorF
|
|||
import es.verdnatura.presentation.view.feature.controlador.fragment.WebFragment
|
||||
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoFragment
|
||||
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoUsuarioFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.fragments.InfoFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.fragments.LogExpeditionFragment
|
||||
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleFragment
|
||||
import es.verdnatura.presentation.view.feature.faltas.fragment.FaltasFragment
|
||||
import es.verdnatura.presentation.view.feature.historicoarticulo.fragment.HistoricoArticuloFragment
|
||||
|
@ -72,7 +73,6 @@ import kotlinx.coroutines.DelicateCoroutinesApi
|
|||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
import timber.log.Timber
|
||||
|
||||
|
||||
class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickListener,
|
||||
|
@ -85,16 +85,61 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
var fm = supportFragmentManager
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
private var comeFromDelivery: Boolean? = null
|
||||
override fun getLayoutId(): Int = R.layout.activity_main
|
||||
override fun init() {
|
||||
|
||||
mperror = MediaPlayer.create((this), R.raw.error)
|
||||
mpok = MediaPlayer.create((this), R.raw.ok)
|
||||
customDialog = CustomDialogMainActivity(this)
|
||||
|
||||
setFragments()
|
||||
|
||||
setBottomMenuFragment()
|
||||
}
|
||||
|
||||
private fun setFragments() {
|
||||
try {
|
||||
val extras = intent.extras
|
||||
if (extras != null && extras.containsKey("menu")) {
|
||||
comeFromDelivery = true
|
||||
val option = extras.getString("menu")
|
||||
|
||||
saveDataInt("USERFK", extras.getString("userfk")!!.toInt())
|
||||
saveUserAccesPref(
|
||||
extras.getString("user").toString(),
|
||||
extras.getString("password").toString()
|
||||
)
|
||||
|
||||
when (option) {
|
||||
"log" -> onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.expedition_find,
|
||||
getString(R.string.titleLog),
|
||||
R.string.titleLog,
|
||||
getString(
|
||||
R.string.titleLogDescrip
|
||||
)
|
||||
|
||||
), getString(R.string.titleLog)
|
||||
)
|
||||
"info" -> onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.ic_info,
|
||||
getString(R.string.titleInfo),
|
||||
R.string.titleInfo,
|
||||
getString(
|
||||
R.string.titleInfoDescription
|
||||
)
|
||||
|
||||
), getString(R.string.titleInfo)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (haveSector() && havePrinter()) addFragment(
|
||||
PasilleroFragment.newInstance(getString(R.string.main), true),
|
||||
R.id.main_frame_layout,
|
||||
|
@ -107,13 +152,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
AjustesFragment.TAG,
|
||||
false
|
||||
)
|
||||
|
||||
// sergio: de esta manera se eliminan los logs de lanzamiento
|
||||
if (BuildConfig.DEBUG) {
|
||||
Timber.plant(Timber.DebugTree())
|
||||
}
|
||||
|
||||
|
||||
} catch (exception: Exception) {
|
||||
getString(R.string.error).toast(this)
|
||||
}
|
||||
}
|
||||
|
||||
fun haveSector(): Boolean {
|
||||
|
@ -123,6 +165,24 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
}
|
||||
|
||||
fun saveDataInt(name: String, value: Int) {
|
||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
val editor = prefs.edit()
|
||||
|
||||
when (name) {
|
||||
name -> editor.putInt(name, value)
|
||||
}
|
||||
editor.apply()
|
||||
|
||||
}
|
||||
|
||||
private fun saveUserAccesPref(user: String, password: String) {
|
||||
val prefs: SharedPreferences = this.getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
val editor = prefs.edit()
|
||||
editor.putString("user", user)
|
||||
editor.putString("password", password)
|
||||
editor.apply()
|
||||
}
|
||||
|
||||
fun havePrinter(): Boolean {
|
||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
|
@ -410,11 +470,15 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
getString(R.string.titleItemSearch) -> {
|
||||
|
||||
addFragmentOnTop(BuscarItemFragment.newInstance(if (entryPoint == "") {
|
||||
addFragmentOnTop(
|
||||
BuscarItemFragment.newInstance(
|
||||
if (entryPoint == "") {
|
||||
null
|
||||
} else {
|
||||
entryPoint.toInt()
|
||||
}))
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
getString(R.string.titleHistorical) -> {
|
||||
|
@ -532,6 +596,40 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
addFragmentOnTop(PackagingSummaryFragment.newInstance(item.title))
|
||||
}
|
||||
|
||||
getString(R.string.titleDelivery) -> {
|
||||
addFragmentOnTop(
|
||||
PasilleroFragment.newInstance(
|
||||
getString(R.string.titleDelivery),
|
||||
isInitMenu = false
|
||||
)
|
||||
)
|
||||
}
|
||||
getString(R.string.titleInfo) -> {
|
||||
addFragmentOnTop(
|
||||
InfoFragment.newInstance(item.title),
|
||||
if (comeFromDelivery == true) {
|
||||
getString(R.string.titleInfo)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
getString(R.string.titleLog) -> {
|
||||
|
||||
addFragmentOnTop(
|
||||
LogExpeditionFragment.newInstance(item.title),
|
||||
if (comeFromDelivery == true) {
|
||||
getString(R.string.titleLog)
|
||||
} else {
|
||||
null
|
||||
}
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
||||
getString(R.string.testing) -> {
|
||||
addFragmentOnTop(testPrint.newInstance(item.title))
|
||||
}
|
||||
|
@ -539,12 +637,12 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
}
|
||||
|
||||
fun addFragmentOnTop(fragment: Fragment?) {
|
||||
fun addFragmentOnTop(fragment: Fragment?, name: String? = null) {
|
||||
|
||||
supportFragmentManager
|
||||
.beginTransaction()
|
||||
.replace(R.id.main_frame_layout, fragment!!)
|
||||
.addToBackStack(null)
|
||||
.addToBackStack(name)
|
||||
.commitAllowingStateLoss()
|
||||
}
|
||||
|
||||
|
@ -554,11 +652,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
var backEntry = ""
|
||||
if (index >= 0) {
|
||||
backEntry = supportFragmentManager.getBackStackEntryAt(index).name.toString()
|
||||
//Log.d("VERDNATURA::", "El fragment es " + backEntry)
|
||||
}
|
||||
|
||||
|
||||
|
||||
try {
|
||||
fm.executePendingTransactions()
|
||||
} catch (e: Exception) {
|
||||
|
@ -569,9 +665,18 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
fm.popBackStackImmediate()
|
||||
|
||||
if (!backEntry.isNullOrBlank())
|
||||
|
||||
if (backEntry!!.contains("fragment.ExpeditionPalletDetailFragment.Companion")) {
|
||||
addFragmentOnTop(ExpeditionTruckListFragment.newInstance())
|
||||
}
|
||||
if (backEntry!!.contains(getString(R.string.titleLog)) || backEntry!!.contains(
|
||||
getString(
|
||||
R.string.titleInfo
|
||||
)
|
||||
)
|
||||
) {
|
||||
finish()
|
||||
}
|
||||
} else {
|
||||
customDialog.setTitle(getString(R.string.closeSession))
|
||||
.setDescription(getString(R.string.sureCloseSession))
|
||||
|
@ -734,4 +839,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -81,6 +81,8 @@ class PasilleroFragment(
|
|||
getString(R.string.titleBufferManegement) -> viewModel.inititializeDefaultBuffer()
|
||||
getString(R.string.main) -> viewModel.inititializeDefaultDataInit()
|
||||
getString(R.string.titleClaims) -> viewModel.inititializeDefaultClaim()
|
||||
getString(R.string.titleDelivery) -> viewModel.inititializeDefaultDelivery()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -510,6 +510,16 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
)
|
||||
)
|
||||
|
||||
//#tarea4679
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_delivery_truck,
|
||||
contextApp.getString(R.string.titleDelivery),
|
||||
R.string.titleDelivery,
|
||||
contextApp.getString(R.string.titleDeliveryDescrip)
|
||||
)
|
||||
)
|
||||
|
||||
//#tarea4021
|
||||
/* _pasillerositem.add(
|
||||
|
@ -551,5 +561,32 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
)
|
||||
|
||||
|
||||
}
|
||||
fun inititializeDefaultDelivery() {
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.expedition_find,
|
||||
contextApp.getString(R.string.titleLog),
|
||||
R.string.titleLog,
|
||||
contextApp.getString(
|
||||
R.string.titleLogDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.ic_info,
|
||||
contextApp.getString(R.string.titleInfo),
|
||||
R.string.titleInfo,
|
||||
contextApp.getString(
|
||||
R.string.titleInfoDescription
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
|
@ -0,0 +1,8 @@
|
|||
<!-- drawable/archive_search_outline.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="#F7931E" android:pathData="M13.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>
|
|
@ -0,0 +1,16 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32"
|
||||
>
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:pathData="M24.667,21.733c-1.733,0 -3.2,1.467 -3.2,3.2s1.467,3.2 3.2,3.2 3.2,-1.467 3.2,-3.2c0,-1.867 -1.467,-3.2 -3.2,-3.2zM24.667,26.533c-0.933,0 -1.6,-0.667 -1.6,-1.6s0.667,-1.6 1.6,-1.6 1.6,0.667 1.6,1.6c0,0.8 -0.8,1.6 -1.6,1.6z"/>
|
||||
<path
|
||||
android:fillColor="#FFf"
|
||||
android:pathData="M7.867,21.733c-1.733,0 -3.2,1.467 -3.2,3.2s1.467,3.2 3.2,3.2c1.733,0 3.2,-1.467 3.2,-3.2 0,-1.867 -1.467,-3.2 -3.2,-3.2zM7.867,26.533c-0.933,0 -1.6,-0.667 -1.6,-1.6s0.667,-1.6 1.6,-1.6c0.933,0 1.6,0.667 1.6,1.6 0,0.8 -0.8,1.6 -1.6,1.6z"/>
|
||||
<path
|
||||
android:fillColor="#FFf"
|
||||
android:pathData="M31.467,13.2l-6.133,-6c-0.4,-0.4 -0.933,-0.533 -1.467,-0.533h-3.067v-1.2c0,-0.8 -0.667,-1.6 -1.6,-1.6h-17.6c-0.933,0 -1.6,0.667 -1.6,1.6v17.333c0,0.933 0.8,1.6 1.6,1.6h2.133c0.267,-2 2,-3.6 4.133,-3.6 2,0 3.867,1.6 4.133,3.6h8.4c0.267,-2 2,-3.6 4.133,-3.6s4,1.6 4.267,3.6h1.6c0.933,0 1.6,-0.8 1.6,-1.6v-8.133c0,-0.533 -0.267,-1.067 -0.533,-1.467zM22.667,8.667c0,-0.133 0.133,-0.267 0.267,-0.267h1.067c0,0 0.133,0 0.133,0.133l4.8,4.533c0.133,0 0,0.4 -0.133,0.4h-5.867c-0.267,0 -0.267,-0.133 -0.267,-0.267v-4.533zM9.733,11.333c0,-1.467 0.933,-2.667 1.867,-2.933 0.133,0 0.133,0 0.267,0l3.067,-0.4v1.6c0,1.467 -0.933,2.667 -1.867,2.933 -0.133,0 -0.133,0 -0.267,0l-3.067,0.533v-1.733zM9.733,13.867l1.467,-0.267c0.533,-0.133 0.933,0.533 0.933,1.2l0.133,0.933 -1.6,0.133c-0.533,0.133 -0.933,-0.4 -0.933,-1.2v-0.8zM4.667,11.333v-1.6l2.667,-0.4c1.067,-0.133 1.733,0.8 1.733,2.267v1.6l-2.667,0.4c-1.067,0 -1.867,-0.933 -1.733,-2.267zM8.933,14v1.2c0,1.067 -0.667,2 -1.333,2.133h-0.133l-2.267,0.267v-1.2c0,-1.067 0.667,-2 1.333,-2.133h0.133l2.267,-0.267z"/>
|
||||
</vector>
|
|
@ -0,0 +1,8 @@
|
|||
<vector android:height="24dp"
|
||||
android:viewportHeight="32"
|
||||
android:viewportWidth="32"
|
||||
android:width="24dp"
|
||||
android:tint="#F7931E"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FF000000" android:pathData="M16,0c-8.8,0 -16,7.2 -16,16s7.2,16 16,16 16,-7.2 16,-16 -7.2,-16 -16,-16zM17.6,24h-3.2v-9.6h3.2v9.6zM17.6,11.2h-3.2v-3.2h3.2v3.2z"/>
|
||||
</vector>
|
|
@ -0,0 +1,181 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ScrollView
|
||||
android:id="@+id/scroll_view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical" >
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/scan_input"
|
||||
style="@style/ScanLineTextSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:hint="@string/titleExpeditionScan"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
/>
|
||||
<LinearLayout
|
||||
android:id="@+id/route_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/layout_margin_min"
|
||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||
android:paddingLeft="@dimen/layout_margin_1"
|
||||
android:visibility ="gone"
|
||||
android:paddingRight="@dimen/layout_margin_1"
|
||||
android:background="@color/verdnatura_pumpkin_orange"
|
||||
tools:visibility="visible">
|
||||
<TextView
|
||||
android:id="@+id/route"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Ruta"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:paddingLeft="@dimen/layout_margin_min"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="left" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agency"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Zona"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="left"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="fecha"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="right"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/layout_margin_min"
|
||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||
android:paddingLeft="@dimen/layout_margin_1"
|
||||
android:paddingRight="@dimen/layout_margin_1">
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Fecha"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:paddingLeft="@dimen/layout_margin_min"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Trabajador"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="left"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Estado"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="right"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/itemcard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="ExtraText">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
|
||||
<!--android:id="@+id/itemexpeditionstate_recyclerview"-->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/itemexpeditionlog_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
android:visibility="visible"
|
||||
tools:listitem="@layout/item_expeditionlog_row" />
|
||||
</RelativeLayout>>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</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>
|
|
@ -0,0 +1,285 @@
|
|||
<?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"
|
||||
android:background="@color/verdnatura_black">
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/verdnatura_white"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/main_toolbar"/>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider"
|
||||
android:layout_marginLeft="@dimen/pasilleros_margin_main_menu"
|
||||
android:layout_marginRight="@dimen/pasilleros_margin_main_menu"
|
||||
android:padding="@dimen/navigation_row_limit_padding"
|
||||
>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/company"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/company"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
android:gravity="center"
|
||||
tools:text="@string/company"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/nif"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_nif"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nif"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
tools:text="@string/nif"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/adress"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_adress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/adress"
|
||||
android:tooltipText="@string/copied"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
tools:text="@string/adress"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:id="@+id/dividertwo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:layout_marginBottom="@dimen/item_list_separation"
|
||||
android:layout_marginTop="@dimen/item_list_separation"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/linearLayout"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearInfoFreelance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/dividertwo"
|
||||
android:layout_marginLeft="@dimen/pasilleros_margin_main_menu"
|
||||
android:layout_marginRight="@dimen/pasilleros_margin_main_menu"
|
||||
android:padding="@dimen/navigation_row_limit_padding"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/freelance"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/freelance_name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
android:gravity="center"
|
||||
tools:text="@string/freelance"
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/nif"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/freelance_nif"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
tools:text="@string/nif"/>
|
||||
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/adress"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/freelance_address"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
tools:text="@string/adress"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Server:"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginRight="@dimen/default_layout_margin"/>
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</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" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/splash_progress"
|
||||
android:visibility="invisible"
|
||||
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>
|
|
@ -0,0 +1,64 @@
|
|||
<?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.delivery.model.ExpeditionInfoLog" />
|
||||
|
||||
</data>
|
||||
<LinearLayout
|
||||
android:id="@+id/item_row_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
<LinearLayout
|
||||
|
||||
android:orientation="horizontal"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/verdnatura_black_5"
|
||||
android:padding="@dimen/layout_margin_1"
|
||||
android:layout_gravity="center_horizontal"
|
||||
>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/itemFk"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{item.created}"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left"
|
||||
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{item.name}"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:singleLine="true"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="left"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:text="@{item.description}"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="right"/>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/verdnatura_black_9"/>
|
||||
</LinearLayout>
|
||||
</layout>
|
|
@ -103,7 +103,6 @@
|
|||
android:layout_height="match_parent"
|
||||
android:text="Switch"
|
||||
android:visibility="gone"
|
||||
android:tooltipText="@string/allowCheckingMode"
|
||||
tool:visibility="visible"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -193,7 +193,6 @@
|
|||
<string name="speedProblems">Problemas con la velocidad de internet. No se puede usar la voz</string>
|
||||
<string name="allowParking">Permite aparcar ticket/carro</string>
|
||||
<string name="allowTakeoffVehicle">Permite dejar el vehículo</string>
|
||||
|
||||
<string name="newCollection">Genera colección para sacar</string>
|
||||
<string name="showFilter">Ver filtro </string>
|
||||
<string name="showFaults">Ver movimientos de Faltas</string>
|
||||
|
@ -514,7 +513,7 @@
|
|||
<string name="entryNextObsers">Siguiente paso: observaciones e imágenes</string>
|
||||
<string name="nextEntrySummary">Siguiente paso: resumen entrada</string>
|
||||
<string name="activateModoChecking">Activado modo revisión</string>
|
||||
<string name="allowCheckingMode">Permite activar modo revisión. Escane primero una matrícula</string>
|
||||
<string name="allowCheckingMode">Permite activar modo revisión. Escanee primero una matrícula</string>
|
||||
<string name="codeNotExist">Código no existe. Avise para que reetiqueten producto</string>
|
||||
<string name="ticketWarning">Urge el ticket que está revisando, la hora de la zona web del ticket ya se ha cerrado</string>
|
||||
<string name="urgentWarning">Aviso urgente</string>
|
||||
|
@ -530,5 +529,17 @@
|
|||
<string name="selfConsumption">Autoconsumo</string>
|
||||
<string name="titleSelfConsumption">Autoconsumo</string>
|
||||
<string name="titleSelfDescription">Permite consumo de materiales del almacén</string>
|
||||
<string name="titleDelivery">Reparto</string>
|
||||
<string name="titleDeliveryDescrip">Accede a las opciones de reparto</string>
|
||||
<string name="titleLogDescrip">Ver datos expedición</string>
|
||||
<string name="titleInfoDescription">Ver datos empresa</string>
|
||||
<string name="titleInfo">Muestra información empresa</string>
|
||||
<string name="titleLog">Log y ruta de una expedición</string>
|
||||
<string name="nif">NIF</string>
|
||||
<string name="adress">Dirección</string>
|
||||
<string name="company">Empresa</string>
|
||||
<string name="expeditionMarkLost">Si activa este botón marca la expedición como Perdida</string>
|
||||
<string name="expeditionMarkFound">Si activa este botón marca la expedición como Encontrada</string>
|
||||
<string name="freelance">Porteador</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
<string name="Recordarusuarioycontraseña">Remember username and password</string>
|
||||
<string name="titleFaults">Foults</string>
|
||||
<string name="Versión">Version</string>
|
||||
<string name="name">Company</string>
|
||||
<string name="nif">NIF</string>
|
||||
<string name="Usuario">User</string>
|
||||
<string name="Escaneaetiqueta">Scan label</string>
|
||||
<string name="Filtro">Filter</string>
|
||||
|
@ -166,6 +168,9 @@
|
|||
<string name="titlePackingMistake">Packing mistake</string>
|
||||
<string name="buscarDepartamento">Find department</string>
|
||||
<string name="titleClaimUbication">Claim Ubication</string>
|
||||
<string name="titleInfoDescription">Show company information</string>
|
||||
<string name="titleInfo">Show company information</string>
|
||||
<string name="titleLog">Show data expedition</string>
|
||||
<string name="claims">Claims</string>
|
||||
<string name="operationSuccess"> done successful</string>
|
||||
<string name="settings">Settings</string>
|
||||
|
@ -368,6 +373,7 @@
|
|||
<string name="titleBufferManegement">Buffer management</string>
|
||||
<string name="titleClaims">Claims</string>
|
||||
<string name="titlePackaging">Suppliers</string>
|
||||
<string name="titleDelivery">Delivery</string>
|
||||
<string name="titlePackagingCount">Packaging</string>
|
||||
<string name="titlePackagingObs">Observations</string>
|
||||
<string name="titlePackagingSummary">Summary</string>
|
||||
|
@ -471,6 +477,8 @@
|
|||
<string name="titlePalletizDescrip">Access the palletizers menu: palletize, buffer…</string>
|
||||
<string name="titleClaimsDescrip">Access the claims menu</string>
|
||||
<string name="titlePackagingDescrip">Access the packaging menu</string>
|
||||
<string name="titleDeliveryDescrip">Access to the delivery menu</string>
|
||||
<string name="titleLogDescrip">Show log and route from expedition</string>
|
||||
<string name="titleClaimDescrip">Claims Location</string>
|
||||
<string name="collectionErrorBuilding">Error building collection. Error description:</string>
|
||||
<string name="main">Main</string>
|
||||
|
@ -501,7 +509,8 @@
|
|||
<string name="workFormDescrip">Give a name and urls of the servers</string>
|
||||
<string name="silexServer">Server Silex</string>
|
||||
<string name="salixServer">Server Salix</string>
|
||||
<string name="name">Name</string>
|
||||
<string name="company">Company</string>
|
||||
<string name="freelance">Freelance</string>
|
||||
<string name="deleteWorkForm">Delete work form</string>
|
||||
<string name="deleteWorkFormConfirmation">¿Do you remove definitely?</string>
|
||||
<string name="noAssigned">Not assigned</string>
|
||||
|
@ -513,6 +522,8 @@
|
|||
<string name="entryNextObsers">Next step: observations and images</string>
|
||||
<string name="nextEntrySummary">Next step: entry summary</string>
|
||||
<string name="activateModoChecking">Activated checking mode</string>
|
||||
<string name="expeditionMarkLost">If you activate this button, mark the expedition as Found</string>
|
||||
<string name="expeditionMarkFound">Este botón marca la expedición como Encontrada</string>
|
||||
<string name="allowCheckingMode">Allow checking mode. Scan firstly the plate and after activate the mode</string>
|
||||
<string name="codeNotExist">Item code not exists..Please send the label to Computing department</string>
|
||||
<string name="ticketWarning">Ticket that you are checking is urgent , closure ticket zone web is closed</string>
|
||||
|
@ -528,5 +539,6 @@
|
|||
<string name="errorQuantity">Insert the amount correctly</string>
|
||||
<string name="operationSuccessful">Operación realizada correctamente</string>
|
||||
<string name="selfConsumption">Self-consumption</string>
|
||||
<string name="adress">Address</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue