Version 8.5Beta, strings, body =null y muestra coger vehículo
This commit is contained in:
parent
3b1f7c96c5
commit
d1e834989f
|
@ -194,7 +194,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_smarttag_register.xml" value="0.3118811881188119" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_transferencia.xml" value="0.10666666666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_ubicador.xml" value="0.22" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_vehiclecontrol.xml" value="0.1546875" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_vehiclecontrol.xml" value="0.3333333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_vehiclecontrol_user.xml" value="0.23052536231884058" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_web.xml" value="0.2463768115942029" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_workermistake.xml" value="0.2265625" />
|
||||
|
|
|
@ -13,8 +13,9 @@ android {
|
|||
applicationId "es.verdnatura"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode 120
|
||||
versionName = "8.4"
|
||||
versionCode 121
|
||||
versionName = "8.5Beta"
|
||||
//versionName = "8.4"// versionCode 120
|
||||
//versionName "8.4.2Beta" versioncode 119
|
||||
//versionName "8.4.1Beta" //versionCode 118: arreglat rocket a Alex i llevat callFunction,strings ok
|
||||
//versionName "8.4Beta" //versionCode 117: return i workerAppTester
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 120,
|
||||
"versionName": "8.4",
|
||||
"versionCode": 121,
|
||||
"versionName": "8.5Beta",
|
||||
"outputFile": "app-release.apk"
|
||||
}
|
||||
],
|
||||
|
|
Binary file not shown.
|
@ -5,7 +5,7 @@ import retrofit2.converter.gson.GsonConverterFactory
|
|||
class ApiNodeJsUtils {
|
||||
|
||||
companion object {
|
||||
const val BASE_URL:String = "http://10.1.2.24:7777/"
|
||||
const val BASE_URL:String = "http://10.1.4.72:7777/"
|
||||
// const val BASE_URL:String = "https://smart-tag.verdnatura.es"
|
||||
fun getApiService():NodeJsService{
|
||||
val nodeJsRetrofit = Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(
|
||||
|
|
|
@ -1,16 +1,10 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import com.google.gson.JsonObject
|
||||
import es.verdnatura.presentation.view.feature.collection.SalesModified
|
||||
import es.verdnatura.presentation.view.feature.collection.SalesModifiedList
|
||||
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
|
||||
import es.verdnatura.presentation.view.feature.collection.sales
|
||||
import es.verdnatura.presentation.view.feature.login.model.workerId
|
||||
import es.verdnatura.presentation.view.feature.collection.*
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyVO
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Call
|
||||
|
||||
class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
||||
|
@ -492,6 +486,9 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
|||
|
||||
): Call<Any> {
|
||||
|
||||
var saleTransfer = listSaleSalix(mutableListOf())
|
||||
saleTransfer.sales.add(saleSalix(id = saleFk.toInt(), quantity = quantity.toInt()))
|
||||
|
||||
|
||||
return salixClient!!.transferSalesSalix(
|
||||
"json",
|
||||
|
@ -499,7 +496,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
|||
token,
|
||||
"application/json",
|
||||
ticketFk,
|
||||
sales(saleId = saleFk.toInt(), quantity = quantity.toInt())
|
||||
saleTransfer
|
||||
|
||||
)
|
||||
}
|
||||
|
|
|
@ -6,7 +6,8 @@ import es.verdnatura.presentation.common.itemPackingTypeSalix
|
|||
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
|
||||
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
|
||||
import es.verdnatura.presentation.view.feature.collection.sales
|
||||
import es.verdnatura.presentation.view.feature.collection.listSaleSalix
|
||||
import es.verdnatura.presentation.view.feature.collection.saleSalix
|
||||
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
||||
import es.verdnatura.presentation.view.feature.login.model.SalixGrupo
|
||||
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
|
||||
|
@ -73,14 +74,14 @@ interface SalixService {
|
|||
Call<Any>
|
||||
|
||||
|
||||
@POST("tickets/{idTicket}/transferSales")
|
||||
@POST("tickets/{idTicket}/transferSales") //-->saleMove en Silex
|
||||
fun transferSalesSalix(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Path("idTicket") idTicket:String,
|
||||
@Body params: sales
|
||||
@Body params: listSaleSalix
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
|
|
|
@ -8,13 +8,11 @@ import android.graphics.drawable.Drawable
|
|||
import android.media.AudioManager
|
||||
import android.os.Bundle
|
||||
import android.text.InputType
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.ViewTreeObserver
|
||||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.ImageView
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.fragment.app.FragmentActivity
|
||||
import androidx.fragment.app.FragmentManager
|
||||
|
@ -23,7 +21,6 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import com.bumptech.glide.Glide
|
||||
import com.bumptech.glide.request.target.CustomTarget
|
||||
import com.bumptech.glide.request.transition.Transition
|
||||
import es.verdnatura.BuildConfig
|
||||
import java.util.*
|
||||
|
||||
|
||||
|
@ -69,6 +66,7 @@ fun View.setDimensions(width: Int, height: Int) {
|
|||
layoutParams?.height = height
|
||||
this.layoutParams = layoutParams
|
||||
}
|
||||
|
||||
fun View.setMargins(left: Int, top: Int, right: Int, bottom: Int) {
|
||||
val mlp = this.layoutParams as ViewGroup.MarginLayoutParams
|
||||
mlp.setMargins(left, top, right, bottom)
|
||||
|
@ -77,12 +75,12 @@ fun View.setMargins(left: Int, top: Int, right: Int, bottom: Int) {
|
|||
fun ImageView.loadUrl(url: String) {
|
||||
Glide.with(context)
|
||||
.asBitmap()
|
||||
.load(url)
|
||||
.into(object : CustomTarget<Bitmap>() {
|
||||
.load(url)
|
||||
.into(object : CustomTarget<Bitmap>() {
|
||||
|
||||
override fun onLoadCleared(placeholder: Drawable?) {}
|
||||
override fun onLoadCleared(placeholder: Drawable?) {}
|
||||
|
||||
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
|
||||
override fun onResourceReady(resource: Bitmap, transition: Transition<in Bitmap>?) {
|
||||
setImageBitmap(resource)
|
||||
}
|
||||
})
|
||||
|
@ -126,7 +124,8 @@ fun Calendar.convertToDateString(): String {
|
|||
|
||||
fun RecyclerView.addViewObserver(function: () -> Unit) {
|
||||
val view = this
|
||||
view.viewTreeObserver.addOnGlobalLayoutListener(object : ViewTreeObserver.OnGlobalLayoutListener {
|
||||
view.viewTreeObserver.addOnGlobalLayoutListener(object :
|
||||
ViewTreeObserver.OnGlobalLayoutListener {
|
||||
override fun onGlobalLayout() {
|
||||
view.viewTreeObserver.removeOnGlobalLayoutListener(this)
|
||||
function.invoke()
|
||||
|
@ -141,6 +140,7 @@ fun Fragment.hideKeyboard() {
|
|||
fun Activity.hideKeyboard() {
|
||||
hideKeyboard(currentFocus ?: View(this))
|
||||
}
|
||||
|
||||
fun Activity.showKeyboardIn() {
|
||||
showKeyboardIn(currentFocus ?: View(this))
|
||||
}
|
||||
|
@ -150,20 +150,20 @@ fun Context.hideKeyboard(view: View) {
|
|||
inputMethodManager.hideSoftInputFromWindow(view.windowToken, 0)
|
||||
}
|
||||
|
||||
fun Context.showKeyboard(){
|
||||
fun Context.showKeyboard() {
|
||||
val imm = getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager?
|
||||
imm!!.toggleSoftInput(InputType.TYPE_CLASS_NUMBER, 0)
|
||||
|
||||
}
|
||||
|
||||
fun Context.showKeyboardIn(view:View){
|
||||
fun Context.showKeyboardIn(view: View) {
|
||||
val imm = getSystemService(Activity.INPUT_METHOD_SERVICE) as InputMethodManager?
|
||||
imm!!.showSoftInput(view, 0)
|
||||
|
||||
}
|
||||
|
||||
// Extension function to change media volume programmatically
|
||||
fun AudioManager.setMediaVolume(volumeIndex:Int) {
|
||||
fun AudioManager.setMediaVolume(volumeIndex: Int) {
|
||||
// Set media volume level
|
||||
this.setStreamVolume(
|
||||
AudioManager.STREAM_MUSIC, // Stream type
|
||||
|
@ -173,9 +173,9 @@ fun AudioManager.setMediaVolume(volumeIndex:Int) {
|
|||
}
|
||||
|
||||
// Extension property to get media maximum volume index
|
||||
val AudioManager.mediaMaxVolume:Int
|
||||
val AudioManager.mediaMaxVolume: Int
|
||||
get() = this.getStreamMaxVolume(AudioManager.STREAM_MUSIC)
|
||||
|
||||
// Extension property to get media/music current volume index
|
||||
val AudioManager.mediaCurrentVolume:Int
|
||||
val AudioManager.mediaCurrentVolume: Int
|
||||
get() = this.getStreamVolume(AudioManager.STREAM_MUSIC)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package es.verdnatura.presentation.view.component
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.Dialog
|
||||
import android.app.TimePickerDialog
|
||||
import android.content.Context
|
||||
|
@ -56,6 +57,7 @@ class CustomDialogHour(context: Context) : Dialog(context, R.style.DialogTheme)
|
|||
//return custom_dialog_hour_value.text.toString()
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
fun setHoraValue(value: String): CustomDialogHour {
|
||||
|
||||
binding.customDialogHourValue.setText(value)
|
||||
|
|
|
@ -237,7 +237,7 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<Unit>
|
||||
) {
|
||||
|
||||
if (!response.isSuccessful()) {
|
||||
if (!response.isSuccessful) {
|
||||
_workerupdateSector.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -283,7 +283,7 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<Unit>
|
||||
) {
|
||||
|
||||
if (!response.isSuccessful()) {
|
||||
if (!response.isSuccessful) {
|
||||
_workerupdatePrinter.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
|
|
@ -61,12 +61,12 @@ class ItemCardFragment(
|
|||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun init() {
|
||||
|
||||
binding.itemcardLayout.visibility = View.GONE
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.itemcardLayout.visibility =GONE
|
||||
ma.hideBottomNavigation(GONE)
|
||||
|
||||
setEvents()
|
||||
//toolbar_title.text = getString(R.string.ConsultarArticulo)
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.ConsultarArticulo)
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.titleItemConsult)
|
||||
|
||||
//customDialog = CustomDialog(requireContext())
|
||||
customDialogInput = CustomDialogInput(requireContext())
|
||||
|
@ -133,11 +133,11 @@ class ItemCardFragment(
|
|||
binding.splashProgress.visibility = View.VISIBLE
|
||||
//getItemCard(itemFk)
|
||||
|
||||
ma.openFragmentWeb(itemInfoG!!.id)
|
||||
/* ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titleHistorical)),
|
||||
itemInfoG!!.id
|
||||
)*/
|
||||
// ma.openFragmentWeb(itemInfoG!!.id)
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titleWebViewer),
|
||||
), entryPoint = itemInfoG!!.id)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -206,23 +206,6 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
/* fun itemStockUpdate(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String){
|
||||
getItemCardUserCase.itemStockUpdate(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<Any>{
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada $callFunction."+t.message!!)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada $callFunction")
|
||||
}else{
|
||||
_response.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}*/
|
||||
|
||||
fun itemTrash(
|
||||
itemFk: String,
|
||||
|
@ -260,23 +243,6 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
/* fun itemPlacementSave(itemFk:String,warehouseFk:String,user:String,password:String,value:String){
|
||||
getItemCardUserCase.itemPlacementSave(user,password,itemFk,warehouseFk,value).enqueue(object : Callback<String>{
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
if (response.body() == null){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
}else{
|
||||
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}*/
|
||||
|
||||
fun updateGrouping(
|
||||
itemFk: String,
|
||||
|
@ -296,7 +262,7 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!response.isSuccessful()) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -351,25 +317,6 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
//sergio ver como solucionar el tema del "Finish"
|
||||
/* fun updatePackingType(itemFk:String,user:String,password:String,itemPackingType:String){
|
||||
getItemCardUserCase.updatePackingType(user,password,itemFk,itemPackingType).enqueue(object : Callback<Boolean>{
|
||||
override fun onFailure(call: Call<Boolean>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
|
||||
if (response.body() == null){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
}else{
|
||||
//if (response.body()=="Finish"){
|
||||
// //Log.i("VERDNATURA:","Fisnih encontrado")}
|
||||
_response.value = ResponseItemVO(isError = false,response = response.body()!!.toString())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}*/
|
||||
fun updatePackingTypeSalix(token: String, itemFk: String, itemPackingType: String) {
|
||||
getItemCardUserCase.updatePackingTypeSalix(token, itemFk, itemPackingType)
|
||||
.enqueue(object : Callback<Any> {
|
||||
|
@ -516,7 +463,7 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
|
|
@ -61,7 +61,7 @@ class ItemProposalFragment(
|
|||
private fun currentDay(): String {
|
||||
|
||||
val calendar = Calendar.getInstance()
|
||||
val format = SimpleDateFormat("yyyy-MM-dd",Locale.getDefault())
|
||||
val format = SimpleDateFormat(getString(R.string.dateFormat),Locale.getDefault())
|
||||
|
||||
return format.format(calendar.time)
|
||||
}
|
||||
|
|
|
@ -58,11 +58,11 @@ class BufferFragment(
|
|||
|
||||
when (entryPoint){
|
||||
|
||||
getString(R.string.bufferempty)->entryPoint="UNLOADING"
|
||||
getString(R.string.bufferfill)-> entryPoint="LOADING"
|
||||
getString(R.string.bufferaccumulate)->entryPoint="ACCUMULATION"
|
||||
getString(R.string.bufferoff)->entryPoint="DISABLED"
|
||||
getString(R.string.bufferfstrapping)->entryPoint="STRAPPING"
|
||||
getString(R.string.titleBufferEmpty)->entryPoint="UNLOADING"
|
||||
getString(R.string.titleBufferFill)-> entryPoint="LOADING"
|
||||
getString(R.string.titleBufferAccumulate)->entryPoint="ACCUMULATION"
|
||||
getString(R.string.titleBufferOff)->entryPoint="DISABLED"
|
||||
getString(R.string.titleBufferStrapping)->entryPoint="STRAPPING"
|
||||
}
|
||||
|
||||
viewModel.buffer_setTypeByName(
|
||||
|
|
|
@ -45,8 +45,8 @@ class BufferFragmentViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
|
||||
|
||||
if (response.body() != null && response.body() == true) {
|
||||
//sergio: espera respuesta en el body
|
||||
if (response.body() == true) {
|
||||
|
||||
_itembuffertype.value = ResponseItemVO(
|
||||
isError = false,
|
||||
|
|
|
@ -110,7 +110,7 @@ class BufferLoadFragment(
|
|||
ma.messageWithSound(it.errorMessage,it.isError,true)
|
||||
} else {
|
||||
// sergio: viene de la bbdd así
|
||||
if (it.response.equals("Registro añadido")){
|
||||
if (it.response.equals(getString(R.string.registerAdded))){
|
||||
|
||||
ma.messageWithSound(it.response,false,true)
|
||||
}else{
|
||||
|
|
|
@ -3,6 +3,7 @@ package es.verdnatura.presentation.view.feature.buscaritem.adapter
|
|||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.ItemLocationRowBinding
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||
|
@ -25,7 +26,8 @@ class LocationAdapter (
|
|||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
holder.binding.root.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Ubicador"),items[position].Matricula)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = holder.binding.root.context.getString(
|
||||
R.string.titleUbicator)),items[position].Matricula)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -33,7 +35,7 @@ class LocationAdapter (
|
|||
class ItemHolder(
|
||||
val binding: ItemLocationRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root){
|
||||
private val res = binding.root.context.resources
|
||||
//private val res = binding.root.context.resources
|
||||
fun bind(item: ItemLocationVO) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
|
|
|
@ -4,30 +4,28 @@ 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.ItemBuyerRowBinding
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.common.OnStarSelectedListener
|
||||
import es.verdnatura.presentation.common.convertToDateString
|
||||
import es.verdnatura.presentation.common.loadUrl
|
||||
import es.verdnatura.presentation.view.feature.calidad.model.ItemBuyerVO
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
class ItemBuyersAdapter (
|
||||
class ItemBuyersAdapter(
|
||||
private val items: List<ItemBuyerVO>,
|
||||
private val onPasillerosItemClickListener: OnPasillerosItemClickListener,
|
||||
private val onStarSelectedListener: OnStarSelectedListener
|
||||
): RecyclerView.Adapter<ItemBuyersAdapter.BuyersItemHolder> () {
|
||||
) : RecyclerView.Adapter<ItemBuyersAdapter.BuyersItemHolder>() {
|
||||
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): BuyersItemHolder {
|
||||
return BuyersItemHolder(
|
||||
ItemBuyerRowBinding.inflate(LayoutInflater.from(parent.context),parent,false)
|
||||
ItemBuyerRowBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() =items.size
|
||||
override fun getItemCount() = items.size
|
||||
|
||||
override fun onBindViewHolder(holder: BuyersItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
|
@ -37,17 +35,23 @@ class ItemBuyersAdapter (
|
|||
|
||||
inner class BuyersItemHolder(
|
||||
val binding: ItemBuyerRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root){
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
fun bind(item: ItemBuyerVO) {
|
||||
binding.apply {
|
||||
this.itemBuyer = item
|
||||
if (item.image != "")
|
||||
imgItem.loadUrl("https://verdnatura.es/vn-image-data/catalog/200x200/"+item.image);
|
||||
imgItem.loadUrl("https://verdnatura.es/vn-image-data/catalog/200x200/" + item.image)
|
||||
else
|
||||
imgItem.loadUrl("https://verdnatura.es/vn-image-data/catalog/200x200/"+item.itemFk);
|
||||
imgItem.loadUrl("https://verdnatura.es/vn-image-data/catalog/200x200/" + item.itemFk)
|
||||
|
||||
imgItem.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Consultar artículo"),item.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = binding.root.context.getString(
|
||||
R.string.titleItemConsult
|
||||
)
|
||||
), item.itemFk
|
||||
)
|
||||
}
|
||||
|
||||
if (item.showStars) layoutStars.visibility = View.VISIBLE
|
||||
|
@ -55,66 +59,67 @@ class ItemBuyersAdapter (
|
|||
|
||||
|
||||
s1.setOnClickListener {
|
||||
onStarSelectedListener.onStarSelected(item.id,"1")
|
||||
onStarSelectedListener.onStarSelected(item.id, "1")
|
||||
}
|
||||
|
||||
s2.setOnClickListener {
|
||||
onStarSelectedListener.onStarSelected(item.id,"2")
|
||||
onStarSelectedListener.onStarSelected(item.id, "2")
|
||||
}
|
||||
|
||||
s3.setOnClickListener {
|
||||
onStarSelectedListener.onStarSelected(item.id,"3")
|
||||
onStarSelectedListener.onStarSelected(item.id, "3")
|
||||
}
|
||||
|
||||
s4.setOnClickListener {
|
||||
onStarSelectedListener.onStarSelected(item.id,"4")
|
||||
onStarSelectedListener.onStarSelected(item.id, "4")
|
||||
}
|
||||
|
||||
s5.setOnClickListener {
|
||||
onStarSelectedListener.onStarSelected(item.id,"5")
|
||||
onStarSelectedListener.onStarSelected(item.id, "5")
|
||||
}
|
||||
|
||||
if (item.stars != ""){
|
||||
if (item.stars != "") {
|
||||
try {
|
||||
val punt = item.stars.toInt()
|
||||
if (punt == 1){
|
||||
if (punt == 1) {
|
||||
s1.setImageResource(item.iconResourceOk)
|
||||
s2.setImageResource(item.iconResourceKo)
|
||||
s3.setImageResource(item.iconResourceKo)
|
||||
s4.setImageResource(item.iconResourceKo)
|
||||
s5.setImageResource(item.iconResourceKo)
|
||||
}else if (punt == 2){
|
||||
} else if (punt == 2) {
|
||||
s1.setImageResource(item.iconResourceOk)
|
||||
s2.setImageResource(item.iconResourceOk)
|
||||
s3.setImageResource(item.iconResourceKo)
|
||||
s4.setImageResource(item.iconResourceKo)
|
||||
s5.setImageResource(item.iconResourceKo)
|
||||
}else if (punt == 3){
|
||||
} else if (punt == 3) {
|
||||
s1.setImageResource(item.iconResourceOk)
|
||||
s2.setImageResource(item.iconResourceOk)
|
||||
s3.setImageResource(item.iconResourceOk)
|
||||
s4.setImageResource(item.iconResourceKo)
|
||||
s5.setImageResource(item.iconResourceKo)
|
||||
}else if (punt == 4){
|
||||
} else if (punt == 4) {
|
||||
s1.setImageResource(item.iconResourceOk)
|
||||
s2.setImageResource(item.iconResourceOk)
|
||||
s3.setImageResource(item.iconResourceOk)
|
||||
s4.setImageResource(item.iconResourceOk)
|
||||
s5.setImageResource(item.iconResourceKo)
|
||||
}else if (punt == 5){
|
||||
} else if (punt == 5) {
|
||||
s1.setImageResource(item.iconResourceOk)
|
||||
s2.setImageResource(item.iconResourceOk)
|
||||
s3.setImageResource(item.iconResourceOk)
|
||||
s4.setImageResource(item.iconResourceOk)
|
||||
s5.setImageResource(item.iconResourceOk)
|
||||
}else{
|
||||
} else {
|
||||
s1.setImageResource(item.iconResourceOk)
|
||||
s2.setImageResource(item.iconResourceOk)
|
||||
s3.setImageResource(item.iconResourceOk)
|
||||
s4.setImageResource(item.iconResourceOk)
|
||||
s5.setImageResource(item.iconResourceOk)
|
||||
}
|
||||
}catch (e:Exception){}
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -163,7 +163,7 @@ class QaualityFragment(
|
|||
}
|
||||
|
||||
private fun getCalendarFromDate(date:String): Calendar {
|
||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||
val sdf = SimpleDateFormat(getString(R.string.dateFormat))
|
||||
val cal = Calendar.getInstance()
|
||||
cal.time = sdf.parse(date)
|
||||
return cal
|
||||
|
|
|
@ -61,7 +61,7 @@ class QaualityViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
|
||||
if (!response.isSuccessful()){
|
||||
if (!response.isSuccessful){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
}else{
|
||||
_response.value = ResponseItemVO(isError = false,response = response.message())
|
||||
|
|
|
@ -117,11 +117,11 @@ class ClaimFragment(
|
|||
} else {
|
||||
customDialogList.dismiss()
|
||||
ma.messageWithSound(
|
||||
"Reclamación ${listClaims.first().code} guardada con matrícula ${
|
||||
getString(R.string.claimLabel) +listClaims.first().code + getString(R.string.keepPlate) +
|
||||
listClaims.get(
|
||||
1
|
||||
).code
|
||||
}", false, true
|
||||
, false, true
|
||||
)
|
||||
listClaims.clear()
|
||||
claimAdapter!!.notifyDataSetChanged()
|
||||
|
|
|
@ -15,8 +15,11 @@ class SalixSaleQuantity(
|
|||
var quantity: Int = 0
|
||||
)
|
||||
|
||||
class sales(
|
||||
var saleId : Int =0,
|
||||
class listSaleSalix(
|
||||
var sales: MutableList<saleSalix>
|
||||
)
|
||||
class saleSalix(
|
||||
var id : Int =0,
|
||||
var quantity: Int = 0
|
||||
)
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.ItemPlacementRowBinding
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
|
@ -39,7 +40,8 @@ class PlacementAdapter (
|
|||
this.item = placement
|
||||
|
||||
itemRootLayout.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Ubicador"),placement.shelving)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = binding.root.context.getString(
|
||||
R.string.titleUbicator)),placement.shelving)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ class SaleAdapter(
|
|||
itemArticleItemFk.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = "Consultar artículo"
|
||||
title = binding.root.context.getString(R.string.titleItemConsult)
|
||||
), sale.itemFk
|
||||
)
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ class SaleAdapter(
|
|||
}
|
||||
|
||||
contentLayout.setOnLongClickListener {
|
||||
"Nueva funcionalidad en el icono de la derecha".toast(context!!)
|
||||
//"Nueva funcionalidad en el icono de la derecha".toast(context!!)
|
||||
//onMistakeClickListener.onMistakeClickListener(sale)
|
||||
false
|
||||
}
|
||||
|
@ -114,18 +114,18 @@ class SaleAdapter(
|
|||
//ERROR
|
||||
if (sale.originalQuantity != sale.quantity) {
|
||||
layoutError.visibility = View.VISIBLE
|
||||
txtError.text = "Cantidad original: " + sale.originalQuantity
|
||||
txtError.text = binding.root.context.getString(R.string.originalQuantity) + sale.originalQuantity
|
||||
if (sale.isPrepared == "1" || sale.isControlled == "1")
|
||||
sale.pickedQuantity = sale.quantity
|
||||
}
|
||||
|
||||
if (sale.isNew) {
|
||||
layoutError.visibility = View.VISIBLE
|
||||
txtError.text = "Artículo nuevo"
|
||||
txtError.text = binding.root.context.getString(R.string.newItem)
|
||||
|
||||
}
|
||||
|
||||
paintTicketcolor(sale.level, itemTicketColor)
|
||||
paintTicketcolor(sale.level, itemTicketColor)
|
||||
paintTicketcolor(sale.color, itemColor)
|
||||
|
||||
|
||||
|
@ -257,7 +257,7 @@ class SaleAdapter(
|
|||
}
|
||||
}
|
||||
|
||||
private fun paintTicketcolorOld(color: String, itemView: View) {
|
||||
/* private fun paintTicketcolorOld(color: String, itemView: View) {
|
||||
when (color.uppercase()) {
|
||||
"ROJO" -> itemView.setBackgroundColor(Color.RED)
|
||||
"AMARILLO" -> itemView.setBackgroundColor(Color.YELLOW)
|
||||
|
@ -292,7 +292,7 @@ class SaleAdapter(
|
|||
"MARFIL" -> itemView.setBackgroundColor(0xFFf7eada.toInt())
|
||||
"CIAN" -> itemView.setBackgroundColor(0xFF00ffff.toInt())
|
||||
"BEIGE" -> itemView.setBackgroundColor(0xFFf2e7bf.toInt())
|
||||
"trasparente" -> itemView.setBackgroundColor(0xFFf2e7bf.toInt())
|
||||
"transparente" -> itemView.setBackgroundColor(0xFFf2e7bf.toInt())
|
||||
|
||||
else -> {
|
||||
itemView.setBackgroundColor(Color.TRANSPARENT)
|
||||
|
@ -300,7 +300,7 @@ class SaleAdapter(
|
|||
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
private fun paintTicketcolor(color: String, itemView: View) {
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@ import android.net.Uri
|
|||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.speech.SpeechRecognizer
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
|
@ -36,13 +35,11 @@ import es.verdnatura.presentation.view.component.CustomDialogThreeButtons
|
|||
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
||||
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
||||
import es.verdnatura.presentation.view.feature.collection.ItemVO
|
||||
import es.verdnatura.presentation.view.feature.collection.SalesModified
|
||||
import es.verdnatura.presentation.view.feature.collection.adapter.SaleAdapter
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.*
|
||||
import timber.log.Timber
|
||||
import timber.log.Timber.d
|
||||
|
||||
|
||||
class CollectionFragment(
|
||||
|
@ -158,10 +155,6 @@ class CollectionFragment(
|
|||
setEvents()
|
||||
setToolBar()
|
||||
|
||||
/* if (type == SACADOR && getData(VOZ) != "NO") {
|
||||
setSpeak()
|
||||
}*/
|
||||
|
||||
if (collection.tickets.isNotEmpty()) {
|
||||
createCollectionList()
|
||||
}
|
||||
|
@ -423,11 +416,12 @@ class CollectionFragment(
|
|||
it.errorMessage,
|
||||
it.isError, true
|
||||
)
|
||||
}else{
|
||||
} else {
|
||||
ma.messageWithSound(
|
||||
"Split ok",
|
||||
it.isError, false
|
||||
getString(R.string.splitOk),
|
||||
it.isError, true
|
||||
)
|
||||
responseSaleMoveSuccesful()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -541,7 +535,7 @@ class CollectionFragment(
|
|||
} else {
|
||||
customDialogList.setValueTwo("")
|
||||
//showErrorMessage("El resultado del procedimiento barcodeToItem de la etiqueta escaneada es: " +it.response)
|
||||
showErrorMessage("La línea de compra de la etiqueta escaneada no existe.")
|
||||
showErrorMessage(getString(R.string.lineNotExist))
|
||||
if (mperror != null) mperror?.start()
|
||||
}
|
||||
}
|
||||
|
@ -602,7 +596,7 @@ class CollectionFragment(
|
|||
if (it.isError) {
|
||||
if (!goBack)
|
||||
ma.messageWithSound(
|
||||
it.errorMessage + "Usuario:" + workerFkFromTicket,
|
||||
getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + workerFkFromTicket,
|
||||
isError = true,
|
||||
true
|
||||
)
|
||||
|
@ -636,13 +630,13 @@ class CollectionFragment(
|
|||
//sergio: devuelve false si no hay para revisar y <> false.
|
||||
if (it.response != "false") {
|
||||
|
||||
customDialog.setTitle("Aviso")
|
||||
.setDescription("Pendiente de revisar : " + it.response)
|
||||
customDialog.setTitle(getString(R.string.warning))
|
||||
.setDescription(getString(R.string.pendingReview) + it.response)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.dismiss()
|
||||
|
||||
}
|
||||
.setKoButton("Revisar") {
|
||||
.setKoButton(getString(R.string.review)) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.collectionTicketGet(
|
||||
getData(USER),
|
||||
|
@ -711,15 +705,12 @@ class CollectionFragment(
|
|||
if (it.isError) {
|
||||
|
||||
if (!goBack) {
|
||||
ma.messageWithSound(it.errorMessage, it.isError, false)
|
||||
ma.messageWithSound( getString(R.string.rocketKO) + it.errorMessage, it.isError, false)
|
||||
} else {
|
||||
goBack = false
|
||||
}
|
||||
|
||||
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -737,33 +728,12 @@ class CollectionFragment(
|
|||
val ticket =
|
||||
"[" + sales[positionCollectionSplit].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].ticketFk + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Split el articulo " + sales[positionCollectionSplit].itemFk + " del ticket " + ticket
|
||||
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket
|
||||
|
||||
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)
|
||||
|
||||
}
|
||||
|
||||
private fun sendRocketWithSalesModified(list: List<SalesModified>) {
|
||||
|
||||
|
||||
var message = ""
|
||||
|
||||
for (sales in list) {
|
||||
message =
|
||||
message + "Se ha modificado la cantidad original del artículo ${sales.itemFk} de ${sales.originalQuantity} a ${sales.newQuantity} del ticket ${sales.ticketFk}"
|
||||
message = message + "\r\n"
|
||||
|
||||
}
|
||||
//Log.d("VERDNATURA::","Persona a enviar "+collection.tickets.get(0).salesPersonFk)
|
||||
//Log.d("VERDNATURA::","El message a enviar "+message)
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = collection.tickets.get(0).salesPersonFk,
|
||||
message = message, "sendChekingPresence"
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
private fun callPicker(extensionNumber: String) {
|
||||
|
||||
|
||||
|
@ -774,7 +744,7 @@ class CollectionFragment(
|
|||
|
||||
startActivity(intent)
|
||||
} catch (e: Exception) {
|
||||
d("VERDNATURA::" + e.message)
|
||||
// d("VERDNATURA::" + e.message)
|
||||
}
|
||||
|
||||
|
||||
|
@ -801,7 +771,7 @@ class CollectionFragment(
|
|||
val ticket =
|
||||
"[" + ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + ticketFk + "/summary)"
|
||||
val message =
|
||||
"Se ha añadido el articulo " + item + " con " + quantity + " unidad/es al ticket " + ticket
|
||||
getString(R.string.itemAdded) + item + getString(R.string.with) + quantity + getString(R.string.unityTicket) + ticket
|
||||
|
||||
|
||||
/* d("VERDNATURA:","el comercial es " + salePerson)
|
||||
|
@ -819,10 +789,10 @@ class CollectionFragment(
|
|||
//CREATE LIST
|
||||
private fun createCollectionList() {
|
||||
state = 0
|
||||
if (type == SACADOR && getData(VOZ) != "NO") {
|
||||
// initialize()
|
||||
speak("Colección cargada, diga listo para empezar.")
|
||||
}
|
||||
/* if (type == SACADOR && getData(VOZ) != "NO") {
|
||||
// initialize()
|
||||
speak("Colección cargada, diga listo para empezar.")
|
||||
}*/
|
||||
|
||||
binding.mainToolbar.toolbarTitle.text = collection.collectionFk
|
||||
|
||||
|
@ -956,7 +926,7 @@ class CollectionFragment(
|
|||
|
||||
private fun printObservations(observations: String) {
|
||||
if (observations.trim().isNotEmpty()) {
|
||||
customDialog.setTitle("Observaciones").setDescription(observations)
|
||||
customDialog.setTitle(getString(R.string.observations)).setDescription(observations)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.hide()
|
||||
customDialog.dismiss()
|
||||
|
@ -978,7 +948,7 @@ class CollectionFragment(
|
|||
//sergio: pita si encuentra ticket o el saleGroupFk
|
||||
//Log.i("VERDNATURA:","SE busca en sales ${saleVO.ticketFk}")
|
||||
//canviar el titcket per salegroup i enviar a pako saleTracking_add (saleGroupFk) i refrescar pantalla.
|
||||
d("El salegroup es " + saleVO.saleGroupFk)
|
||||
//d("El salegroup es " + saleVO.saleGroupFk)
|
||||
if (saleVO.saleGroupFk == txtscan) {
|
||||
// if (saleVO.ticketFk == txtscan ) {
|
||||
isOk = true
|
||||
|
@ -1361,7 +1331,7 @@ class CollectionFragment(
|
|||
if (isNumber(customDialogList.getValue()) && isNumber(total) && customDialogList.getValue()
|
||||
.toInt() > total.toInt()
|
||||
) {
|
||||
"La cantidad supera a la disponible".toast(requireContext())
|
||||
getString(R.string.quantityHigh).toast(requireContext())
|
||||
} else if (isNumber(customDialogList.getValue())) {
|
||||
originalItemScan = customDialogList.getValueTwo()
|
||||
// Log.i("VERDATURA","Le pasamos el siguiente item $originalItemScan que es el escaneado")
|
||||
|
@ -1399,19 +1369,20 @@ class CollectionFragment(
|
|||
scanRequest()
|
||||
hideKeyboards()
|
||||
} else {
|
||||
"cantidad introducida erronea".toast(requireContext())
|
||||
getString(R.string.quantityError).toast(requireContext())
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
"Escanea item para validar".toast(requireContext())
|
||||
getString(R.string.scanItemValidate).toast(requireContext())
|
||||
}
|
||||
|
||||
}.setKoButton(getString(R.string.close)) {
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
customDialogList.dismiss()
|
||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo("Escanea item")
|
||||
}.setHintValue(getString(R.string.quantitySelect)).setValue(total)
|
||||
.setHintValueTwo(getString(R.string.scanItem))
|
||||
.setValueTwo("").show()
|
||||
} catch (e: Exception) {
|
||||
//////Log.i("VERDNATURA:","${e.message.toString()}")
|
||||
|
@ -1441,7 +1412,7 @@ class CollectionFragment(
|
|||
if (isNumber(customDialogList.getValue()) && customDialogList.getValue()
|
||||
.toInt() > total.toInt()
|
||||
) {
|
||||
"La cantidad supera a la disponible".toast(requireContext())
|
||||
getString(R.string.quantityHigh).toast(requireContext())
|
||||
} else if (isNumber(customDialogList.getValue())) {
|
||||
originalItemScan = customDialogList.getValueTwo()
|
||||
|
||||
|
@ -1478,7 +1449,7 @@ class CollectionFragment(
|
|||
scanRequest()
|
||||
}
|
||||
} else {
|
||||
"cantidad introducida erronea".toast(requireContext())
|
||||
getString(R.string.quantityError).toast(requireContext())
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
|
@ -1486,7 +1457,7 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
} else {
|
||||
"Escanea item para validar".toast(requireContext())
|
||||
getString(R.string.scanItemValidate).toast(requireContext())
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
|
@ -1632,10 +1603,10 @@ class CollectionFragment(
|
|||
} else {
|
||||
|
||||
ma.messageWithSound(
|
||||
"Falta seleccionar impresora.",
|
||||
getString(R.string.printerFault),
|
||||
isError = true,
|
||||
true,
|
||||
"Error al imprimir",
|
||||
getString(R.string.printError),
|
||||
false
|
||||
)
|
||||
|
||||
|
@ -1821,9 +1792,8 @@ class CollectionFragment(
|
|||
if (item.available.isNullOrEmpty()) {
|
||||
item.available = "0"
|
||||
}
|
||||
|
||||
customDialog.setTitle("Artículo: " + item.id)
|
||||
.setDescription("Disponible: " + item.available)
|
||||
customDialog.setTitle(getString(R.string.itemPoints) + item.id)
|
||||
.setDescription(getString(R.string.available)+":" + item.available)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
scanRequest()
|
||||
customDialog.dismiss()
|
||||
|
@ -1879,8 +1849,8 @@ class CollectionFragment(
|
|||
) {
|
||||
|
||||
|
||||
customDialogInput.setTitle("Número de baldas del ticket")
|
||||
.setDescription("Indica el número de baldas que ocupa el ticket")
|
||||
customDialogInput.setTitle(getString(R.string.shlevesNumber))
|
||||
.setDescription(getString(R.string.shlevesNumberTicket))
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||
|
||||
|
@ -1943,8 +1913,8 @@ class CollectionFragment(
|
|||
|
||||
|
||||
isMarking = false
|
||||
customDialogInput.setTitle("Número de paquetes en balda")
|
||||
.setDescription("Indica el número de paquetes que caben en una balda")
|
||||
customDialogInput.setTitle(getString(R.string.packetNumberShelves))
|
||||
.setDescription(getString(R.string.packetIndicate))
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||
|
||||
|
@ -2006,11 +1976,11 @@ class CollectionFragment(
|
|||
//FALTAS / BASURA / SPLIT
|
||||
private fun showQuantityDialog(position: Int) {
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad)).setValue("")
|
||||
.setOkButton(getString(R.string.Faltas)) {
|
||||
.setOkButton(getString(R.string.titleFaults)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Faltas)
|
||||
getString(R.string.titleFaults)
|
||||
)
|
||||
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
|
@ -2057,7 +2027,7 @@ class CollectionFragment(
|
|||
when (action) {
|
||||
getString(R.string.Agregar) -> increaseQuantity(position, value)
|
||||
getString(R.string.BasuraRechazar) -> TrashMissingReject(position, value, "TRUE")
|
||||
getString(R.string.Faltas) -> TrashMissingReject(position, value, "FALSE")
|
||||
getString(R.string.titleFaults) -> TrashMissingReject(position, value, "FALSE")
|
||||
getString(R.string.Reject) -> TrashMissingReject(position, value, "reject")
|
||||
getString(R.string.Split) -> split(position, value)
|
||||
|
||||
|
@ -2071,50 +2041,42 @@ class CollectionFragment(
|
|||
private fun split(position: Int, quantity: String) {
|
||||
|
||||
//sergio: SPLIT SALIX
|
||||
/* Log.d("VERDNATURA::", "split")
|
||||
Log.d(
|
||||
"VERDNATURA::",
|
||||
"IdTicket-" + sales[position].ticketFk + "-saleFk-" + sales[position].saleFk + "-quant-" + sales[position].quantity
|
||||
)
|
||||
|
||||
quantityCollectionSplit = quantity
|
||||
positionCollectionSplit = position
|
||||
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].quantity.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
|
||||
//var working_in_test = true
|
||||
|
||||
viewModel.transferSalesSalix(
|
||||
getData(TOKEN),
|
||||
ticketFk = sales[position].ticketFk,
|
||||
saleFk = sales[position].saleFk,
|
||||
quantity = quantity
|
||||
)*/
|
||||
quantity = totalQuantity.toString()
|
||||
)
|
||||
|
||||
quantityCollectionSplit = quantity
|
||||
positionCollectionSplit = position
|
||||
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].quantity.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
viewModel.saleMove(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
saleFk = sales[position].saleFk,
|
||||
quantity = totalQuantity.toString(),
|
||||
originalQuantity = sales[position].quantity
|
||||
)
|
||||
/* sales[position].quantity = quantity
|
||||
|
||||
/* sales[position].quantity = quantity
|
||||
if (quantity == "0")
|
||||
markLine(position, type)
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
|
||||
if (quantity == "0")
|
||||
markLine(position, type)
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
|
||||
//enviar mensaje a salix
|
||||
val ticket =
|
||||
"[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Split el articulo " + sales[position].itemFk + " del ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salePersonFk,
|
||||
message = message, "sendChekingPresence"
|
||||
)*/
|
||||
//enviar mensaje a salix
|
||||
val ticket =
|
||||
"[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Split el articulo " + sales[position].itemFk + " del ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salePersonFk,
|
||||
message = message, "sendChekingPresence"
|
||||
)*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -2303,7 +2265,7 @@ class CollectionFragment(
|
|||
}
|
||||
}
|
||||
|
||||
//sergio:ahora desde encajado
|
||||
//sergio:ahora desde encajado
|
||||
// sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
|
@ -2337,7 +2299,7 @@ class CollectionFragment(
|
|||
"Se ha modificado la cantidad original " + sales[positionIncreaseQuantity].originalQuantity + " del artículo " + sales[positionIncreaseQuantity].itemFk + " a nueva cantidad: " + sales[positionIncreaseQuantity].quantity + " del ticket " + ticket
|
||||
|
||||
|
||||
//sergio: ahora desde encajadores
|
||||
//sergio: ahora desde encajadores
|
||||
// sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
|
||||
|
||||
sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
|
||||
|
@ -2443,7 +2405,7 @@ class CollectionFragment(
|
|||
|
||||
//Timber.d("VERDNATURA-Entrant en el show scanner al punxar sobre la sale")
|
||||
customDialogInput.setTitle("" + sale.itemFk)
|
||||
.setDescription(getString(R.string.Escaneaelcarroparaelitemseleccionado))
|
||||
.setDescription(getString(R.string.scanWagonForItem))
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||
findSale(customDialogInput.getValue(), index)
|
||||
|
@ -2473,7 +2435,7 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
private fun showErrorMessage(text: String) {
|
||||
customDialog.setTitle("Error al marcar la linea").setDescription(text)
|
||||
customDialog.setTitle(getString(R.string.errorMarkLine)).setDescription(text)
|
||||
.setKoButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
|
@ -2487,11 +2449,12 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
|
||||
customDialogList.setTitle("Causa de error").setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
customDialogList.dismiss()
|
||||
}.hideDialog().show()
|
||||
customDialogList.setTitle(getString(R.string.errorCause))
|
||||
.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
customDialogList.dismiss()
|
||||
}.hideDialog().show()
|
||||
|
||||
|
||||
placementSupplyAdapter =
|
||||
|
@ -2564,19 +2527,19 @@ class CollectionFragment(
|
|||
speakOrder()
|
||||
}
|
||||
OTRO -> {
|
||||
speak("Orden no registrada")
|
||||
// speak("Orden no registrada")
|
||||
}
|
||||
FALTA -> {
|
||||
speak("Orden no registrada")
|
||||
// speak("Orden no registrada")
|
||||
}
|
||||
else -> speak("Orden no registrada")
|
||||
//else -> speak("Orden no registrada")
|
||||
}
|
||||
}
|
||||
|
||||
private fun speakOrder() {
|
||||
if (type == SACADOR) {
|
||||
if (state == 0) {
|
||||
speak("Colección cargada.")
|
||||
//speak("Colección cargada.")
|
||||
} else {
|
||||
var index = 0
|
||||
for (sale in sales) {
|
||||
|
@ -2619,12 +2582,12 @@ class CollectionFragment(
|
|||
if (lastPlacementPicked == null || lastPlacementPicked!!.placement != placement.placement) {
|
||||
lastPlacementPicked = placement
|
||||
try {
|
||||
speak("Pasillo " + pasillo.toInt() + ", Sector " + sector.toInt() + ", " + carroSeparate.toString())
|
||||
// speak("Pasillo " + pasillo.toInt() + ", Sector " + sector.toInt() + ", " + carroSeparate.toString())
|
||||
} catch (e: Exception) {
|
||||
speak("Pasillo " + pasillo + " Sector " + sector + " Carro " + carro)
|
||||
// speak("Pasillo " + pasillo + " Sector " + sector + " Carro " + carro)
|
||||
}
|
||||
} else if (lastPlacementPicked != null && lastPlacementPicked!!.shelving != placement.shelving) {
|
||||
speak(" Carro " + carro)
|
||||
// speak(" Carro " + carro)
|
||||
} else {
|
||||
state = 2
|
||||
speakOrder()
|
||||
|
@ -2637,14 +2600,15 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
} else {
|
||||
speak("El item " + sale.itemFk + " no se encuentra disponible. Se necesita actuación manual.")
|
||||
// speak("El item " + sale.itemFk + " no se encuentra disponible. Se necesita actuación manual.")
|
||||
}
|
||||
|
||||
} else if (state == 2) {
|
||||
//cantar articulo
|
||||
try {
|
||||
val item = sale.itemFk
|
||||
val cantidad = sale.quantity.toInt() - sale.pickedQuantity.toInt()
|
||||
val cantidad =
|
||||
sale.quantity.toInt() - sale.pickedQuantity.toInt()
|
||||
val listtext = sale.longName.split(" ")
|
||||
var nombre: String
|
||||
if (listtext.isNotEmpty()) {
|
||||
|
@ -2653,9 +2617,9 @@ class CollectionFragment(
|
|||
nombre = sale.longName + " " + sale.color
|
||||
}
|
||||
|
||||
speak("Item " + item.toInt() + " " + nombre + " , Cantidad: " + cantidad)
|
||||
//speak("Item " + item.toInt() + " " + nombre + " , Cantidad: " + cantidad)
|
||||
} catch (e: Exception) {
|
||||
speak("Se necesita actuación manual")
|
||||
//speak("Se necesita actuación manual")
|
||||
}
|
||||
} else if (state == 3) {
|
||||
//marcar linea
|
||||
|
@ -2689,7 +2653,7 @@ class CollectionFragment(
|
|||
|
||||
state = 0
|
||||
//speak("Acción registrada. Diga listo para continuar")
|
||||
speak("Registrada")
|
||||
// speak("Registrada")
|
||||
|
||||
}
|
||||
|
||||
|
@ -2701,7 +2665,7 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
if (index >= sales.size) {
|
||||
speak("Colección completada.")
|
||||
//speak("Colección completada.")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import es.verdnatura.presentation.base.getMessageFromAllResponse
|
|||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
import es.verdnatura.presentation.view.feature.collection.ItemVO
|
||||
import es.verdnatura.presentation.view.feature.collection.SalesModified
|
||||
import es.verdnatura.presentation.view.feature.collection.SalesModifiedList
|
||||
import es.verdnatura.presentation.view.feature.collection.mapper.map
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.*
|
||||
|
@ -190,7 +189,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -276,7 +275,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -471,17 +470,6 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
|
||||
/* if (response.body() == null)
|
||||
{
|
||||
_responseNew.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
)
|
||||
} else
|
||||
{
|
||||
_responseNew.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!)
|
||||
}*/
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -551,6 +539,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
//sergio: salix devuelve id
|
||||
if (response.body() == null) {
|
||||
_responseSplit.value = ResponseItemVO(
|
||||
isError = true,
|
||||
|
@ -593,7 +582,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_responseMissingTrash.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -733,7 +722,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
)
|
||||
} else {
|
||||
_response.value =
|
||||
ResponseItemVO(isError = false, response = "Cambiado estado")
|
||||
ResponseItemVO(isError = false, response = "")
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -752,6 +741,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
//sergio:devuelve item
|
||||
if (response.body() == null) {
|
||||
_responseCode.value = ResponseItemVO(
|
||||
isError = true,
|
||||
|
@ -779,7 +769,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_responseCode.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -821,7 +811,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
override fun onResponse(call: Call<String>, response: Response<String>)
|
||||
{
|
||||
|
||||
if (response.body() == null)
|
||||
if (!response.isSuccessful) )
|
||||
{
|
||||
_responseIncQuantity.value = ResponseItemVO(
|
||||
isError = true,
|
||||
|
@ -886,7 +876,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
if (!response.isSuccessful || response.message() == "false") {
|
||||
_responseSalixMessage.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = "Error al enviar mensaje rocket." + getMessageFromAllResponse(
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this), response.message()
|
||||
)
|
||||
)
|
||||
|
@ -897,7 +887,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
override fun onFailure(call: Call<Boolean>, t: Throwable) {
|
||||
_responseSalixMessage.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = "Error al enviar mensaje rocket." + getMessageFromAllResponse(
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this), t.message!!
|
||||
)
|
||||
)
|
||||
|
@ -931,7 +921,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
call: Call<Any>,
|
||||
response: Response<Any>
|
||||
) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -1006,7 +996,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
response = response.body()!!,
|
||||
errorMessage = "No se puede realizar la llamada. El usuario no tiene la extensión configurada. Solicítelo a informática."
|
||||
errorMessage = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -1063,8 +1053,8 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
} else {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
response = response.message()!!,
|
||||
errorMessage = "No se puede realizar la llamada. El usuario no tiene la extensión configurada. Solicítelo a informática."
|
||||
response = "",
|
||||
errorMessage = response.message()!!
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,11 @@ fun CollectionVO.map(): CollectionVO {
|
|||
// sergio: OBLIGAR A ACTUALIZAR VERSIÓN PARA SUBIR DESPUÉS FICHEROS DEL BACK collection_getTickets al mismo tiempo")
|
||||
|
||||
//it.quantity = it.quantity.substring(0, it.quantity.indexOf("."))
|
||||
|
||||
//Solución Tarea #3420
|
||||
//Log.d("VERDNATURA::","quantity"+it.quantity)
|
||||
//Log.d("VERDNATURA::","quantity original"+it.originalQuantity)
|
||||
|
||||
it.quantity = if (it.quantity.indexOf(".") > 0) {
|
||||
it.quantity.substring(0, it.quantity.indexOf("."))
|
||||
} else {
|
||||
|
|
|
@ -3,6 +3,7 @@ package es.verdnatura.presentation.view.feature.controlvehiculo.fragment
|
|||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.util.Log
|
||||
import android.util.TypedValue
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
|
@ -53,11 +54,6 @@ class ControlVehiculoFragment(
|
|||
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
/* if (getWagons() < 2 && !tagName.equals(SacadorFragment.TAG))
|
||||
{
|
||||
ma.openFragmentPickers()
|
||||
}*/
|
||||
|
||||
|
||||
if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
|
||||
setToolBar("HISTORY")
|
||||
|
@ -191,8 +187,10 @@ class ControlVehiculoFragment(
|
|||
private fun insertControlTimeVehicle(plateNumber: String, direction: String) {
|
||||
|
||||
if (direction.equals("HISTORY")) {
|
||||
|
||||
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = "Historico Vehículo"),
|
||||
PasillerosItemVO(title = getString(R.string.titleHistoricalHide)),
|
||||
plateNumber
|
||||
)
|
||||
} else if (direction.equals("IN")) {
|
||||
|
@ -277,7 +275,7 @@ class ControlVehiculoFragment(
|
|||
insertControlTimeVehicle(customDialogThreeButtons.getValue(), "OUT")
|
||||
}
|
||||
}
|
||||
}.setOkButtonFour("HISTÓRICO") {
|
||||
}.setOkButtonFour(getString(R.string.historical)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isEmpty()) {
|
||||
getString(R.string.returnScan).toast(requireContext())
|
||||
} else {
|
||||
|
@ -300,7 +298,7 @@ class ControlVehiculoFragment(
|
|||
|
||||
.setValue(plate)
|
||||
|
||||
.setOkButtonFour("HISTÓRICO") {
|
||||
.setOkButtonFour(getString(R.string.historical)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isEmpty()) {
|
||||
getString(R.string.returnScan).toast(requireContext())
|
||||
} else {
|
||||
|
@ -323,10 +321,7 @@ class ControlVehiculoFragment(
|
|||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
} else {
|
||||
if (it.response == "false") {
|
||||
|
||||
|
@ -338,8 +333,7 @@ class ControlVehiculoFragment(
|
|||
|
||||
} else {
|
||||
if (it.response == "true") {
|
||||
|
||||
ma.openFragmentPickers(true)
|
||||
ma.openFragmentPickers(false)
|
||||
//ma.onPasillerosItemClickListener( PasillerosItemVO(title = "Sacadores"),"CONTROL")
|
||||
//checkControlTimeVehicle()
|
||||
}
|
||||
|
@ -351,42 +345,24 @@ class ControlVehiculoFragment(
|
|||
|
||||
responsecontrol.observe(viewLifecycleOwner, {
|
||||
binding.splashProgress.visibility = GONE
|
||||
// Log.i("VERDNATURA:","${it.response}")
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
} else {
|
||||
if (it.response.equals("1")) {
|
||||
isWorkedTimed = "REGISTERED"
|
||||
setToolBar("OUT")
|
||||
/* customDialog.setTitle("Control de vehículos")
|
||||
.setDescription("SI Tienes coche asignado")
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
if (!tagName.equals(SacadorFragment.TAG)) {
|
||||
ma.openFragmentPickers(true)
|
||||
ma.openFragmentPickers(false)
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
if (it.response.equals("0")) {
|
||||
setToolBar("IN")
|
||||
/* customDialog.setTitle("Control de vehículos")
|
||||
.setDescription("Escanea la matrícula del vehículo o elige sin vehículo")
|
||||
.setOkButton("Escanear vehículo") {
|
||||
customDialog.dismiss()
|
||||
showScanner("Escanea matrícula del vehículo", "IN")
|
||||
}
|
||||
.setKoButton("SIN VEHÍCULO") {
|
||||
customDialog.dismiss()
|
||||
saveData(DATENOVEHICLE, SimpleDateFormat("yyyy-MM-dd",Locale.getDefault()).format(Date()).toString())
|
||||
ma.openFragmentPickers(true)
|
||||
|
||||
}.show()*/
|
||||
customDialogInput.setTitle(getString(R.string.vehiclecontrol))
|
||||
.setDescription(getString(R.string.scanPlate))
|
||||
.setOkButton(getString(R.string.takeVehicle)) {
|
||||
|
|
|
@ -88,10 +88,7 @@ class ControlVehiculoUsuarioFragment(
|
|||
binding.splashProgress.visibility = GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
/*customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
} else {
|
||||
//sergio: se modifica el response = null. En casi todas las llamadas se utilizaba para ver si había error.
|
||||
// Ahora ya no.
|
||||
|
|
|
@ -45,17 +45,25 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
|
||||
if (response.body() == null || response.body().toString() == "false") {
|
||||
_responseinsert.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
)
|
||||
} else {
|
||||
//sergio_devuelve true o false
|
||||
if (response.isSuccessful){
|
||||
if (response.body().toString() == "false") {
|
||||
_responseinsert.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
)
|
||||
} else {
|
||||
|
||||
_responseinsert.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!.toString())
|
||||
_responseinsert.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!.toString())
|
||||
|
||||
}
|
||||
}
|
||||
}else{
|
||||
_responseinsert.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -77,18 +85,27 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
|
||||
if (response.body() == null || response.body().toString() == "false") {
|
||||
//sergio devuelve true o false
|
||||
if (response.isSuccessful){
|
||||
|
||||
if (response.body().toString() == "false") {
|
||||
_responseinsert.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
)
|
||||
} else {
|
||||
//_response.value = ResponseItemVO(isError = false,response = response.body()!!)
|
||||
|
||||
_responseinsert.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!.toString())
|
||||
//Log.i("VERDNATURA:","Respuesta call vehicle_insert ${response.body()}")
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
_responseinsert.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -107,7 +124,8 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
if (response.body() == null) {
|
||||
|
||||
if (!response.isSuccessful) {
|
||||
_responsecontrol.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
|
@ -115,9 +133,10 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
} else {
|
||||
_responsecontrol.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
@ -131,7 +150,6 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
android_id
|
||||
).enqueue(object : Callback<String> {
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
// Log.i("VERDNATURA::","${t.message}")
|
||||
_responsemachine.value = ResponseItemMachineControl(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!),
|
||||
|
@ -140,14 +158,8 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
if (response.body() == null) {
|
||||
if (response.body() != null) {
|
||||
|
||||
/*_responsemachine.value = ResponseItemMachineControl(
|
||||
isError = true,
|
||||
errorMessage = "Error al comprobar el nombre del dispositivo",
|
||||
type = ""
|
||||
)*/
|
||||
} else {
|
||||
_responsemachine.value =
|
||||
ResponseItemMachineControl(
|
||||
isError = false,
|
||||
|
@ -176,20 +188,19 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
if (response.body() == null) {
|
||||
if (response.body() != null) {
|
||||
/* _responsemachine.value = ResponseItemMachineControl(
|
||||
isError = true,
|
||||
errorMessage = "Error al comprobar usuario del dispositivo",
|
||||
type = ""
|
||||
)*/
|
||||
} else {
|
||||
|
||||
_responsemachine.value =
|
||||
ResponseItemMachineControl(
|
||||
isError = false,
|
||||
response = response.body()!!,
|
||||
type = "getWorker"
|
||||
)
|
||||
}
|
||||
)}
|
||||
|
||||
}
|
||||
|
||||
|
@ -214,19 +225,14 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
//sergio: devuelve en el body
|
||||
if (response.body() == null) {
|
||||
ResponseItemMachineControl(
|
||||
isError = false,
|
||||
response = response.body()!!,
|
||||
type = "getWorkerPlate"
|
||||
)
|
||||
//sergio: se modifica el response = null. En casi todas las llamadas se utilizaba para ver si había error.
|
||||
// Ahora ya no.
|
||||
/* _responsemachine.value = ResponseItemMachineControl(
|
||||
isError = true,
|
||||
errorMessage = "Error al comprobar el trabajador si ha cogido el vehículo",
|
||||
type = ""
|
||||
)*/
|
||||
|
||||
} else {
|
||||
_responsemachine.value =
|
||||
ResponseItemMachineControl(
|
||||
|
|
|
@ -34,7 +34,7 @@ class DayOfSaleAdapter (
|
|||
fun bind(item: ItemShelvingSaleDate) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||
val sdf = SimpleDateFormat(res.getString(R.string.dateFormat))
|
||||
val currentDate = sdf.format(Date())
|
||||
if (currentDate == item.dated){
|
||||
saledate.setBackgroundColor(
|
||||
|
|
|
@ -40,7 +40,7 @@ class DayOfSaleFragment(
|
|||
customDialog = CustomDialog(requireContext())
|
||||
customDialogList = CustomDialogList(requireContext())
|
||||
setEvents()
|
||||
setToolBar(getString(R.string.dayofSale))
|
||||
setToolBar(entryPoint)
|
||||
super.init()
|
||||
|
||||
}
|
||||
|
|
|
@ -122,26 +122,6 @@ class DayOfSaleViewModel(context: Context) : BaseViewModel() {
|
|||
return list
|
||||
}*/
|
||||
|
||||
|
||||
/* fun itemShelving_updateSpam(user: String, password: String,vShelvingFK:String){
|
||||
GetDayOfSaleUSerCase.itemShelving_updateSpam(user,password,vShelvingFK).enqueue(object : Callback<Boolean>{
|
||||
override fun onFailure(call: Call<Boolean>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelving_updateSpam."+t.message!!)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
|
||||
|
||||
if (response.body() == null){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelving_updateSpam")
|
||||
}else{
|
||||
_response.value = ResponseItemVO(isError = false,response = response.body()!!.toString())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}*/
|
||||
|
||||
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
||||
|
||||
GetDayOfSaleUSerCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
||||
|
|
|
@ -4,6 +4,7 @@ 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.ItemFaltasRowBinding
|
||||
import es.verdnatura.presentation.common.OnFaltasNichoClickListener
|
||||
import es.verdnatura.presentation.common.OnFaltasReviewClickListener
|
||||
|
@ -50,13 +51,14 @@ class FaltasAdapter (
|
|||
onFaltasReviewClickListener.onFaltasReviewClickListener(item)
|
||||
}
|
||||
itemFk.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Consultar artículo"),item.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(
|
||||
R.string.titleItemConsult)),item.itemFk)
|
||||
}
|
||||
itemUp.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Buscar item"),item.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(R.string.titleItemSearch)),item.itemFk)
|
||||
}
|
||||
itemDown.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Buscar item"),item.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(R.string.titleItemSearch)),item.itemFk)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -91,7 +91,7 @@ class FaltasViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.isSuccessful()) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
|
|
@ -36,7 +36,7 @@ class HistoricoAdapter (
|
|||
binding.apply {
|
||||
this.item = item
|
||||
|
||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||
val sdf = SimpleDateFormat(res.getString(R.string.dateFormat))
|
||||
val currentDate = sdf.format(Date())
|
||||
if (currentDate == item.shipped){
|
||||
// historicoDate.setBackgroundColor(res.getColor(R.color.verdnatura_pumpkin_orange))
|
||||
|
|
|
@ -198,7 +198,7 @@ class HistoricoArticuloFragment(
|
|||
|
||||
private fun navigateToToday(it: ItemHistoricoListVO) {
|
||||
var positionToday = 0
|
||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||
val sdf = SimpleDateFormat(getString(R.string.dateFormat))
|
||||
val currentDate = sdf.format(Date())
|
||||
|
||||
for (item in it.list) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package es.verdnatura.presentation.view.feature.historicovehiculo.fragment
|
||||
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
|
@ -7,88 +8,91 @@ import es.verdnatura.R
|
|||
import es.verdnatura.databinding.FragmentHistoricovehiculoBinding
|
||||
import es.verdnatura.domain.notNull
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
||||
import es.verdnatura.presentation.view.feature.historicovehiculo.adapter.HistoricoVehiculoAdapter
|
||||
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculoList
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import timber.log.Timber.d
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
|
||||
class HistoricoVehiculoFragment (
|
||||
var numberPlate:String = ""
|
||||
) : BaseFragment<FragmentHistoricovehiculoBinding, HistoricoVehiculoViewModel>(
|
||||
HistoricoVehiculoViewModel::class) {
|
||||
class HistoricoVehiculoFragment(
|
||||
var numberPlate: String = ""
|
||||
) : BaseFragment<FragmentHistoricovehiculoBinding, HistoricoVehiculoViewModel>(
|
||||
HistoricoVehiculoViewModel::class
|
||||
) {
|
||||
|
||||
private var adapter : HistoricoVehiculoAdapter? = null
|
||||
private var adapter: HistoricoVehiculoAdapter? = null
|
||||
|
||||
companion object {
|
||||
fun newInstance(entryPoint:String) = HistoricoVehiculoFragment(entryPoint)
|
||||
companion object {
|
||||
fun newInstance(entryPoint: String) = HistoricoVehiculoFragment(entryPoint)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_historicovehiculo
|
||||
|
||||
|
||||
override fun init() {
|
||||
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
|
||||
viewModel.machineWorker_getHistorical(getData(USER), getData(PASSWORD), numberPlate)
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclediary)
|
||||
setEvents()
|
||||
super.init()
|
||||
}
|
||||
|
||||
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_historicovehiculo
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
loadHistoricoVehiculoList.observe(viewLifecycleOwner, Observer { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
adapter = HistoricoVehiculoAdapter(it.list)
|
||||
binding.historicovehiculoRecyclerview.adapter = adapter
|
||||
binding.historicovehiculoRecyclerview.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
navigateToToday(it)
|
||||
|
||||
if (it.list.isEmpty()) {
|
||||
ma.messageWithSound(
|
||||
getString(R.string.lookWithpermission), true, true, getString(
|
||||
R.string.info
|
||||
)
|
||||
)
|
||||
} else {
|
||||
if (it.list[0].isError) {
|
||||
ma.messageWithSound(
|
||||
it.list[0].errorMessage, true, true, getString(
|
||||
R.string.info
|
||||
)
|
||||
)
|
||||
|
||||
override fun init()
|
||||
{
|
||||
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
|
||||
viewModel.machineWorker_getHistorical(getData(USER),getData(PASSWORD),numberPlate)
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclediary)
|
||||
setEvents()
|
||||
super.init()
|
||||
}
|
||||
|
||||
|
||||
private fun setEvents(){
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
with(viewModel){
|
||||
loadHistoricoVehiculoList.observe(viewLifecycleOwner, Observer{ event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
adapter = HistoricoVehiculoAdapter(it.list)
|
||||
binding.historicovehiculoRecyclerview.adapter = adapter
|
||||
binding.historicovehiculoRecyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
navigateToToday(it)
|
||||
|
||||
if (it.list.isEmpty()){
|
||||
ma.messageWithSound(getString(R.string.lookWithpermission),true,true,getString(
|
||||
R.string.info))
|
||||
}else{
|
||||
if (it.list[0].isError){
|
||||
ma.messageWithSound(it.list[0].errorMessage,true,true,getString(
|
||||
R.string.info))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun navigateToToday(it: ItemHistoricoVehiculoList){
|
||||
var positionToday = 0
|
||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||
val currentDate = sdf.format(Date())
|
||||
|
||||
for (item in it.list){
|
||||
if (currentDate == item.inTimed){
|
||||
break
|
||||
}
|
||||
positionToday += 1
|
||||
}
|
||||
|
||||
binding.historicovehiculoRecyclerview.scrollToPosition(positionToday)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun navigateToToday(it: ItemHistoricoVehiculoList) {
|
||||
var positionToday = 0
|
||||
val sdf = SimpleDateFormat(getString(R.string.dateFormat))
|
||||
val currentDate = sdf.format(Date())
|
||||
|
||||
for (item in it.list) {
|
||||
if (currentDate == item.inTimed) {
|
||||
break
|
||||
}
|
||||
positionToday += 1
|
||||
}
|
||||
|
||||
binding.historicovehiculoRecyclerview.scrollToPosition(positionToday)
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -11,7 +11,7 @@ class ImageViewActivity : BaseActivity<ActivityImageviewBinding>(){
|
|||
|
||||
|
||||
override fun init() {
|
||||
binding.mainToolbar.toolbarTitle.text = (intent.getStringExtra("title"))
|
||||
binding.mainToolbar.toolbarTitle.text = intent.getStringExtra("title")
|
||||
binding.imgView.loadUrl(intent.getStringExtra("url")!!)
|
||||
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
|
|
|
@ -4,6 +4,7 @@ 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.ItemInventaryRowBinding
|
||||
import es.verdnatura.presentation.common.OnInvetoryNichoClickListener
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
|
@ -45,13 +46,16 @@ class InventoryAdapter (
|
|||
onInvetoryNichoClickListener.onInvetoryNichoClickListener(item)
|
||||
}
|
||||
itemFk.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Consultar artículo"),item.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(
|
||||
R.string.titleItemConsult)),item.itemFk)
|
||||
}
|
||||
itemUp.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Buscar item"),item.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(
|
||||
R.string.titleItemSearch)),item.itemFk)
|
||||
}
|
||||
itemDown.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Buscar item"),item.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(
|
||||
R.string.titleItemSearch)),item.itemFk)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,27 +174,6 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
|
||||
/*fun itemStockUpdate(itemFk:String,warehouseFk:String,user:String,password:String,newValue:String,isTrash:String){
|
||||
//sergio: se modifica por CAU a itemTrash
|
||||
// https://cau.verdnatura.es/scp/tickets.php?id=21043 al nuevo procedimiento itemTrash
|
||||
getItemCardUserCase.itemStockUpdate(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<String>{
|
||||
//getItemCardUserCase.itemTrash(user,password,itemFk,warehouseFk,newValue,isTrash).enqueue(object : Callback<String>{
|
||||
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = "Error al guardar STOCK "+itemFk+ " Respuesta:"+t.message!!)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
if (response.body() == null){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemStockUpdate")
|
||||
}else{
|
||||
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}*/
|
||||
|
||||
//sergio: se modifica por CAU a itemTrash
|
||||
fun itemTrash(
|
||||
|
@ -408,7 +387,7 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
.enqueue(object :
|
||||
Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
d("Error message " + t.message)
|
||||
// d("Error message " + t.message)
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
|
@ -429,7 +408,7 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
)
|
||||
)
|
||||
} else {
|
||||
d("Error message:" + { response.errorBody() } + "-" + response.message() + "-" + response.raw())
|
||||
//d("Error message:" + { response.errorBody() } + "-" + response.message() + "-" + response.raw())
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -444,8 +423,7 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
_responseAddMistake.value =
|
||||
ResponseItemVO(
|
||||
isError = false,
|
||||
response = "Causa del error registrada",
|
||||
errorMessage = "Causa del error registrada"
|
||||
response = response.message()
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -69,14 +69,14 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
|||
if (binding.edittextServer.text!!.contains("test-app.verdnatura.es")) {
|
||||
saveData(
|
||||
"base_urlSalix",
|
||||
"https://salix.verdnatura.es/api/"
|
||||
"https://test-salix.verdnatura.es/api/"
|
||||
)
|
||||
|
||||
} else {
|
||||
saveData(
|
||||
"base_urlSalix",
|
||||
/*working_in_test*/
|
||||
"https://test-salix.verdnatura.es/api/"
|
||||
"https://salix.verdnatura.es/api/"
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -332,14 +332,13 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
|||
binding.splashProgress.visibility = View.GONE
|
||||
saveTokenPref("")
|
||||
customDialog.setTitle(getString(R.string.error))
|
||||
// .setDescription(it.errorMessage + ". Puedes continuar pero algunas funcionalidades no estarán disponibles.")
|
||||
.setDescription(it.errorMessage)
|
||||
|
||||
.setDescription(if (it.errorMessage.contains("Unauthorized")){"Revisa tu usuario y contraseña. En caso de no poder acceder contacta co Informática"}else{it.errorMessage})
|
||||
.setOkButton(
|
||||
getString(R.string.accept)
|
||||
) {
|
||||
customDialog.dismiss()
|
||||
//getVersion()
|
||||
//exitProcess(0)
|
||||
|
||||
}.show()
|
||||
} else {
|
||||
saveTokenPref(it.token)
|
||||
|
|
|
@ -103,8 +103,8 @@ class LoginViewModel(context: Context) : BaseViewModel()
|
|||
user,
|
||||
password,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),if (response.message()=="Unauthorized"){"Revisa tu usuario y contraseña. En caso de no poder acceder contacta co Informática"}else{response.message()
|
||||
}))
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()
|
||||
))
|
||||
|
||||
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ class LoginViewModel(context: Context) : BaseViewModel()
|
|||
response: Response<SectorItemVO>
|
||||
) {
|
||||
|
||||
if (!response.isSuccessful()){
|
||||
if (!response.isSuccessful){
|
||||
d("El sector is not successfull")
|
||||
_workergetSector.value= SectorItemVO(0,"",0,
|
||||
isError = true,
|
||||
|
|
|
@ -3,7 +3,6 @@ package es.verdnatura.presentation.view.feature.main.activity
|
|||
|
||||
import android.content.SharedPreferences
|
||||
import android.media.MediaPlayer
|
||||
import android.util.Log.d
|
||||
import android.view.Menu
|
||||
import android.widget.Toast
|
||||
import androidx.core.content.ContextCompat
|
||||
|
@ -63,6 +62,7 @@ import es.verdnatura.presentation.view.feature.smarttag.sacador.fragment.Associa
|
|||
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragment
|
||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment
|
||||
import es.verdnatura.presentation.view.feature.workermistake.adapter.WorkermistakeFragment
|
||||
import kotlinx.coroutines.DelicateCoroutinesApi
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -77,7 +77,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
private lateinit var customDialog: CustomDialogMainActivity
|
||||
var firstItem: ItemMenuVO? = null
|
||||
var fm = supportFragmentManager
|
||||
var TAG = "MainActivity"
|
||||
|
||||
//var TAG = "MainActivity"
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
override fun getLayoutId(): Int = R.layout.activity_main
|
||||
|
@ -85,17 +86,13 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
mperror = MediaPlayer.create((this), R.raw.error)
|
||||
mpok = MediaPlayer.create((this), R.raw.ok)
|
||||
|
||||
customDialog = CustomDialogMainActivity(this)
|
||||
|
||||
// working_in_design = para nuevo diseño y test de app
|
||||
//SetisWorkingInDesign(true)
|
||||
|
||||
setBottomMenuFragment()
|
||||
|
||||
|
||||
if (haveSector() && havePrinter()) addFragment(
|
||||
PasilleroFragment.newInstance("Main",true),
|
||||
PasilleroFragment.newInstance("Main", true),
|
||||
R.id.main_frame_layout,
|
||||
PasilleroFragment.TAG,
|
||||
false
|
||||
|
@ -122,24 +119,24 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
}
|
||||
|
||||
/* fun isWorkingInDesign():Boolean{
|
||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
val working= prefs.getInt("working_in_design", -1)
|
||||
return working != -1
|
||||
}
|
||||
fun SetisWorkingInDesign(isWorkingIn: Boolean) {
|
||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
val editor = prefs.edit()
|
||||
if (isWorkingIn){
|
||||
editor.putInt("working_in_design", 0)
|
||||
editor.apply()
|
||||
}else{
|
||||
editor.putInt("working_in_design", -1)
|
||||
editor.apply()
|
||||
}
|
||||
/* fun isWorkingInDesign():Boolean{
|
||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
val working= prefs.getInt("working_in_design", -1)
|
||||
return working != -1
|
||||
}
|
||||
fun SetisWorkingInDesign(isWorkingIn: Boolean) {
|
||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
val editor = prefs.edit()
|
||||
if (isWorkingIn){
|
||||
editor.putInt("working_in_design", 0)
|
||||
editor.apply()
|
||||
}else{
|
||||
editor.putInt("working_in_design", -1)
|
||||
editor.apply()
|
||||
}
|
||||
|
||||
|
||||
}*/
|
||||
}*/
|
||||
|
||||
fun havePrinter(): Boolean {
|
||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
|
@ -148,6 +145,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
}
|
||||
|
||||
@DelicateCoroutinesApi
|
||||
fun setBottomMenuFragment() {
|
||||
val bottomMenu = binding.mainBottomNavigation
|
||||
//iconos abajo sin texto
|
||||
|
@ -258,10 +256,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
}
|
||||
|
||||
getString(R.string.verticket) -> {
|
||||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
addFragment(
|
||||
ShowTicketFragment.newInstance("main"),
|
||||
ShowTicketFragment.newInstance("Main"),
|
||||
R.id.main_frame_layout,
|
||||
MAINACTIVITY.TAG,
|
||||
false
|
||||
|
@ -272,7 +270,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
addFragment(
|
||||
ParkingFragment.newInstance("main"),
|
||||
ParkingFragment.newInstance("Main"),
|
||||
R.id.main_frame_layout,
|
||||
MAINACTIVITY.TAG,
|
||||
false
|
||||
|
@ -297,22 +295,22 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
true
|
||||
}
|
||||
/* sergio: de esta manera no repinta el icono del menu seleccionado */
|
||||
bottomMenu.setOnNavigationItemReselectedListener {
|
||||
bottomMenu.setOnNavigationItemReselectedListener {
|
||||
|
||||
when (it.title){
|
||||
when (it.title) {
|
||||
|
||||
getString(R.string.Pasilleros) -> {
|
||||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
addFragment(
|
||||
PasilleroFragment.newInstance("Main",true),
|
||||
R.id.main_frame_layout,
|
||||
PasilleroFragment.TAG,
|
||||
false
|
||||
)
|
||||
getString(R.string.Pasilleros) -> {
|
||||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
addFragment(
|
||||
PasilleroFragment.newInstance("Main", true),
|
||||
R.id.main_frame_layout,
|
||||
PasilleroFragment.TAG,
|
||||
false
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -321,7 +319,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
private fun delete_Fragments() {
|
||||
fm.getFragments().forEach {
|
||||
var fragment: Fragment? = supportFragmentManager.findFragmentByTag(it.tag.toString())
|
||||
val fragment: Fragment? = supportFragmentManager.findFragmentByTag(it.tag.toString())
|
||||
if (fragment != null) supportFragmentManager
|
||||
.beginTransaction().remove(fragment)
|
||||
.commit()
|
||||
|
@ -330,28 +328,32 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
override fun onPasillerosItemClickListener(item: PasillerosItemVO, entryPoint: String) {
|
||||
|
||||
/* d("VERDNATURA::","El title es "+item.title)
|
||||
d("VERDNATURA::","El titleTOsHOW es "+item.titleToShow)
|
||||
d("VERDNATURA::","El entryPoint es "+entryPoint)*/
|
||||
/* d("VERDNATURA::","El title es "+item.title)
|
||||
d("VERDNATURA::","El titleTOsHOW es "+item.titleToShow)
|
||||
d("VERDNATURA::","El entryPoint es "+entryPoint)*/
|
||||
when (item.title) {
|
||||
|
||||
"Asociar Sacador SmartTags" -> {
|
||||
getString(R.string.titleSmarttagPickerAssociate) -> {
|
||||
addFragmentOnTop(AssociateSmartTagsFragment.newInstance(getString(R.string.SmarttagAssociate)))
|
||||
}
|
||||
|
||||
"Registrar SmartTags" -> {
|
||||
getString(R.string.titleSmarttagsRegister) -> {
|
||||
addFragmentOnTop(RegisterSmartTagsFragment.newInstance(item.title))
|
||||
}
|
||||
|
||||
//BUFFERS
|
||||
"Paletizar" -> {
|
||||
getString(R.string.titlePalletizar) -> {
|
||||
addFragmentOnTop(ExpeditionTruckListFragment.newInstance())
|
||||
}
|
||||
|
||||
getString(R.string.Paletizadores) -> {
|
||||
|
||||
addFragmentOnTop(PasilleroFragment.newInstance(getString(R.string.Paletizadores),
|
||||
isInitMenu = false))
|
||||
addFragmentOnTop(
|
||||
PasilleroFragment.newInstance(
|
||||
getString(R.string.Paletizadores),
|
||||
isInitMenu = false
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
|
@ -362,7 +364,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
}
|
||||
|
||||
getString(R.string.Pasilleros) -> {
|
||||
addFragmentOnTop(PasilleroFragment.newInstance("Pasilleros", isInitMenu = false),
|
||||
addFragmentOnTop(
|
||||
PasilleroFragment.newInstance(item.title, isInitMenu = false),
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -371,145 +374,146 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
// addFragment(ExpeditionStateFragment.newInstance(entryPoint),R.id.main_frame_layout, ExpeditionTruckListFragment.TAG,false)
|
||||
addFragmentOnTop(ExpeditionStateFragment.newInstance(item.title))
|
||||
}
|
||||
"Escanear expedición" -> {
|
||||
getString(R.string.titleScanExpedition) -> {
|
||||
addFragmentOnTop(ExpeditionScanSorterFragment.newInstance(item.title))
|
||||
}
|
||||
|
||||
"Gestión de buffers" -> {
|
||||
getString(R.string.titleBufferManegement) -> {
|
||||
addFragmentOnTop(
|
||||
PasilleroFragment.newInstance(
|
||||
"Gestión de buffer",
|
||||
item.title,
|
||||
isInitMenu = false
|
||||
)
|
||||
)
|
||||
}
|
||||
"Reclamaciones"->{
|
||||
getString(R.string.titleClaims) -> {
|
||||
addFragmentOnTop(
|
||||
PasilleroFragment.newInstance(
|
||||
"Reclamaciones",
|
||||
item.title,
|
||||
isInitMenu = false
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
"Control de usuario de vehículo" -> {
|
||||
getString(R.string.titleUserControlVehicle) -> {
|
||||
addFragmentOnTop(ControlVehiculoUsuarioFragment.newInstance(entryPoint))
|
||||
}
|
||||
|
||||
"Pre Sacador" -> {
|
||||
getString(R.string.titlePrePicker) -> {
|
||||
addFragmentOnTop(PreSacadorFragment.newInstance())
|
||||
}
|
||||
"Día de venta" -> {
|
||||
addFragmentOnTop(DayOfSaleFragment("diadeventa"))
|
||||
getString(R.string.titleDayOfSale) -> {
|
||||
addFragmentOnTop(DayOfSaleFragment(item.title))
|
||||
}
|
||||
|
||||
"Ver Ticket" -> {
|
||||
|
||||
addFragmentOnTop(ShowTicketFragment.newInstance("main"))
|
||||
getString(R.string.titleShowTicket) -> {
|
||||
addFragmentOnTop(ShowTicketFragment.newInstance(getString(R.string.Pasilleros)))
|
||||
}
|
||||
"Historial del vehículo" -> {
|
||||
getString(R.string.titleHistoricalVehicle) -> {
|
||||
addFragmentOnTop(ControlVehiculoFragment.newInstance(HistoricoVehiculoFragment.TAG))
|
||||
// fm.popBackStack(null,FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
// addFragment(HistoricoVehiculoFragment.newInstance(entryPoint),R.id.main_frame_layout, ControladorFragment.TAG,false)
|
||||
}
|
||||
"Reposición" -> {
|
||||
getString(R.string.titleReplacement) -> {
|
||||
addFragmentOnTop(ReposicionFragment.newInstance())
|
||||
}
|
||||
"Consultar artículo" -> {
|
||||
getString(R.string.titleItemConsult) -> {
|
||||
addFragmentOnTop(ItemCardFragment.newInstance(entryPoint))
|
||||
}
|
||||
//sergio:no visible desde el menú inicio
|
||||
"Buscar artículos similares" -> {
|
||||
getString(R.string.titleSearchSimilarItems) -> {
|
||||
addFragmentOnTop(ItemProposalFragment.newInstance(entryPoint))
|
||||
}
|
||||
|
||||
"Parking" -> {
|
||||
//segio: esta opción no se muestra, solo es accesible para añadir fragmentos de otras partes.
|
||||
getString(R.string.titleHistoricalHide) -> {
|
||||
addFragmentOnTop(HistoricoVehiculoFragment.newInstance(entryPoint))
|
||||
}
|
||||
|
||||
getString(R.string.Parking) -> {
|
||||
addFragmentOnTop(ParkingFragment.newInstance(""))
|
||||
}
|
||||
|
||||
|
||||
"Buscar item" -> {
|
||||
getString(R.string.titleItemSearch) -> {
|
||||
addFragmentOnTop(BuscarItemFragment.newInstance(entryPoint))
|
||||
}
|
||||
|
||||
"Historico" -> {
|
||||
getString(R.string.titleHistorical) -> {
|
||||
addFragmentOnTop(HistoricoArticuloFragment.newInstance(entryPoint))
|
||||
}
|
||||
//segio: esta opción no se muestra, solo es accesible para añadir fragmentos de otras partes.
|
||||
"Historico Vehículo" -> {
|
||||
addFragmentOnTop(HistoricoVehiculoFragment.newInstance(entryPoint))
|
||||
}
|
||||
"Inventario" -> {
|
||||
|
||||
getString(R.string.titleInventory) -> {
|
||||
addFragmentOnTop(InventaryFragment.newInstance())
|
||||
}
|
||||
"Faltas" -> {
|
||||
getString(R.string.titleFaults) -> {
|
||||
addFragmentOnTop(FaltasFragment.newInstance())
|
||||
}
|
||||
"Shelving Parking" -> {
|
||||
getString(R.string.titleShelvingParking) -> {
|
||||
addFragmentOnTop(ShelvingParkingFragment.newInstance())
|
||||
}
|
||||
"Ubicador" -> {
|
||||
getString(R.string.titleUbicator) -> {
|
||||
addFragmentOnTop(UbicadorFragment.newInstance(entryPoint))
|
||||
}
|
||||
"Automatic" -> {
|
||||
getString(R.string.titleAuto) -> {
|
||||
addFragmentOnTop(AutomaticAddItemFragment.newInstance(entryPoint))
|
||||
}
|
||||
"Calidad" -> {
|
||||
|
||||
getString(R.string.titleQuality) -> {
|
||||
addFragmentOnTop(BuyersFragment.newInstance())
|
||||
}
|
||||
"Sacadores" -> {
|
||||
addFragmentOnTop(SacadorFragment.newInstance())
|
||||
getString(R.string.titlePickers) -> {
|
||||
//addFragmentOnTop(SacadorFragment.newInstance())
|
||||
addFragmentOnTop(ControlVehiculoFragment.newInstance(""))
|
||||
}
|
||||
|
||||
//Web fragment
|
||||
"Visor web" -> {
|
||||
addFragmentOnTop(WebFragment.newInstance(item.title))
|
||||
getString(R.string.titleWebViewer) -> {
|
||||
addFragmentOnTop(WebFragment.newInstance(entryPoint))
|
||||
}
|
||||
//Menu qr
|
||||
"Lector Qr" -> {
|
||||
getString(R.string.titleQrReader) -> {
|
||||
addFragmentOnTop(QrFragment.newInstance(item.title))
|
||||
}
|
||||
|
||||
//Menu buffer
|
||||
"Vaciado buffer" -> {
|
||||
getString(R.string.titleBufferEmpty) -> {
|
||||
addFragmentOnTop(BufferFragment.newInstance(item.title))
|
||||
}
|
||||
"Llenado buffer" -> {
|
||||
getString(R.string.titleBufferFill) -> {
|
||||
addFragmentOnTop(BufferFragment.newInstance(item.title))
|
||||
}
|
||||
getString(R.string.bufferaccumulate).toString()-> {
|
||||
getString(R.string.titleBufferAccumulate) -> {
|
||||
addFragmentOnTop(BufferFragment.newInstance(item.title))
|
||||
}
|
||||
"Desactivado buffer" -> {
|
||||
getString(R.string.titleBufferOff) -> {
|
||||
addFragmentOnTop(BufferFragment.newInstance(item.title))
|
||||
}
|
||||
"Cargar expedición en buffer" -> {
|
||||
addFragmentOnTop(BufferLoadFragment.newInstance("Cargar expedición en buffer"))
|
||||
getString(R.string.titleBufferload) -> {
|
||||
addFragmentOnTop(BufferLoadFragment.newInstance(item.title))
|
||||
}
|
||||
"Flejado buffer" -> {
|
||||
getString(R.string.titleBufferStrapping) -> {
|
||||
addFragmentOnTop(BufferFragment.newInstance(item.title))
|
||||
}
|
||||
|
||||
"Pre Control" -> {
|
||||
getString(R.string.titlePreControl) -> {
|
||||
addFragmentOnTop(PreControladorFragment.newInstance())
|
||||
}
|
||||
"Histórico Shelving" -> {
|
||||
addFragmentOnTop(itemShelvingLogFragment.newInstance("Histórico Shelving"))
|
||||
Timber.tag("VERDNATURA::").d("es el historico ")
|
||||
getString(R.string.titleShelvingHistorical) -> {
|
||||
addFragmentOnTop(itemShelvingLogFragment.newInstance(item.title))
|
||||
|
||||
}
|
||||
"Log Shelving" -> {
|
||||
addFragmentOnTop(shelvingLogFragment.newInstance("Log Shelving"))
|
||||
getString(R.string.titleLogShelving) -> {
|
||||
addFragmentOnTop(shelvingLogFragment.newInstance(item.title))
|
||||
}
|
||||
"Fallo del trabajador" -> {
|
||||
getString(R.string.titleWorkerMistake) -> {
|
||||
addFragmentOnTop(WorkermistakeFragment.newInstance(item.title))
|
||||
}
|
||||
|
||||
"Obtener colección previa" -> {
|
||||
getString(R.string.titlePrePicker) -> {
|
||||
addFragmentOnTop(InitPreSacadorFragment.newInstance(item.title))
|
||||
}
|
||||
|
||||
"Ubicación de Reclamación" -> {
|
||||
getString(R.string.titleClaimUbication) -> {
|
||||
addFragmentOnTop(ClaimFragment.newInstance(item.title))
|
||||
}
|
||||
|
||||
|
@ -538,16 +542,16 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
fm.popBackStackImmediate()
|
||||
|
||||
}
|
||||
else {
|
||||
customDialog.setTitle(getString(R.string.closeSession))
|
||||
.setDescription("¿Estás seguro de cerrar la sesión?").setOkButton("Salir") {
|
||||
customDialog.dismiss()
|
||||
finish()
|
||||
} else {
|
||||
customDialog.setTitle(getString(R.string.closeSession))
|
||||
.setDescription(getString(R.string.sureCloseSession))
|
||||
.setOkButton(getString(R.string.exit)) {
|
||||
customDialog.dismiss()
|
||||
finish()
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -627,7 +631,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
SacadorFragment.newInstance(),
|
||||
R.id.main_frame_layout,
|
||||
SacadorFragment.TAG,
|
||||
false
|
||||
true
|
||||
|
||||
|
||||
)
|
||||
|
@ -640,12 +644,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
// fm.popBackStack(null,FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
// addFragment(ExpeditionStateFragment.newInstance("main"),R.id.main_frame_layout, ExpeditionStateFragment.TAG,false)
|
||||
|
||||
addFragmentOnTop(ExpeditionStateFragment.newInstance("Consultar estado expedición"))
|
||||
|
||||
}
|
||||
fun openFragmentWeb(url:String) {
|
||||
|
||||
addFragmentOnTop(WebFragment.newInstance(url))
|
||||
addFragmentOnTop(ExpeditionStateFragment.newInstance(getString(R.string.ExpeditionState)))
|
||||
|
||||
}
|
||||
|
||||
|
@ -653,10 +652,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
binding.mainBottomNavigation.visibility = visible
|
||||
}
|
||||
|
||||
fun hideBottomNavigationFragment(visible: Int) {
|
||||
binding.mainBottomNavigationFragment.visibility = visible
|
||||
}
|
||||
|
||||
|
||||
fun messageWithSound(
|
||||
message: String,
|
||||
|
@ -669,7 +664,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
if (!isError) {
|
||||
|
||||
if (isPlayed == true) (mpok?.start())
|
||||
message.toast(this, Toast.LENGTH_SHORT)
|
||||
if (isToasted!!) message.toast(this, Toast.LENGTH_SHORT)
|
||||
} else {
|
||||
|
||||
if (isPlayed == true) (mperror?.start())
|
||||
|
|
|
@ -53,10 +53,8 @@ class ExpeditionPalletDetailFragment(
|
|||
|
||||
override fun init() {
|
||||
customDialog = CustomDialog(requireContext())
|
||||
//customDialogList = CustomDialogList(requireContext())
|
||||
binding.expeditionPalletDetailPallet.text = "Pallet "+itemPallet!!.Pallet
|
||||
binding.expeditionPalletDetailPallet.text = getString(R.string.pallet)+itemPallet!!.Pallet
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
//requireActivity().main_bottom_navigation.visibility = View.GONE
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.mainToolbar.toolbarTitle.text = getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + itemExpeditionTruckVO!!.Destino
|
||||
|
||||
|
@ -117,7 +115,7 @@ class ExpeditionPalletDetailFragment(
|
|||
getData(SECTORFK)
|
||||
)
|
||||
}else{
|
||||
ma.messageWithSound("Falta seleccionar impresora",isError = true,true,"Error al imprimir",false)
|
||||
ma.messageWithSound(getString(R.string.printerFault),isError = true,true,getString(R.string.printError),false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -154,8 +152,7 @@ class ExpeditionPalletDetailFragment(
|
|||
|
||||
}else{
|
||||
binding.splashProgress.visibility=View.VISIBLE
|
||||
Log.d("VERDNATURA::","Cambiando estado a paletizado")
|
||||
viewModel.expeditionState_addByPallet( getData(USER),getData(PASSWORD),itemPallet!!.Pallet,"PALLETIZED","expeditionState_addByPallet")
|
||||
viewModel.expeditionState_addByPallet( getData(USER),getData(PASSWORD),itemPallet!!.Pallet,"PALLETIZED")
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
@ -99,7 +99,7 @@ class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel() {
|
|||
password: String,
|
||||
vPalletFk: String,
|
||||
vStateCode:String,
|
||||
callFunction:String){
|
||||
){
|
||||
|
||||
getPaletizadoresUserCase.expeditionState_addByPallet(usuario,password,vPalletFk,vStateCode).enqueue(object : Callback<Unit>{
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
|
|
|
@ -179,7 +179,6 @@ class ExpeditionPalletFragment(
|
|||
|
||||
private fun showScanExpeditions(it:ItemScanList){
|
||||
|
||||
//Log.i("VERDNATURA:","VA A ESCANEAR EN PALLETFRAGMENT")
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
||||
listExpeditions = ArrayList()
|
||||
|
@ -189,7 +188,8 @@ class ExpeditionPalletFragment(
|
|||
listExpeditions.add(BarcodeVO(code = it.expeditionFk))
|
||||
}
|
||||
|
||||
customDialogList.setTitle("Expedition ("+binding.mainToolbar.toolbarTitle.text+")").setOkButton("Comprobar"){
|
||||
customDialogList.setTitle(getString(R.string.expeditionP)+binding.mainToolbar.toolbarTitle.text+")").setOkButton(getString(
|
||||
R.string.test)){
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
|
||||
|
@ -197,7 +197,7 @@ class ExpeditionPalletFragment(
|
|||
onComprobarPalletViewClickListener!!.onComprobarPalletViewClickListener(itemExpeditionTruckVO!!,
|
||||
ItemPalletVO(Pallet = it.list.get(0).palletFk))
|
||||
}else{
|
||||
customDialog.setTitle("Atención").setDescription("No ha escaneado expediciones").setOkButton("Ok"){
|
||||
customDialog.setTitle(getString(R.string.info)).setDescription(getString(R.string.expeditionsError)).setOkButton(getString(R.string.accept)){
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ class ExpeditionPalletFragment(
|
|||
// val numExpedition = customDialogList.getValue().toDouble()
|
||||
if(customDialogList.getValue().length >= 7){
|
||||
listExpeditions.add(0,BarcodeVO(code = customDialogList.getValue()))
|
||||
customDialogList.setDescription("Total: "+listExpeditions.size)
|
||||
customDialogList.setDescription(getString(R.string.total)+listExpeditions.size)
|
||||
viewModel.expeditionScanPut(getData(USER),
|
||||
getData(PASSWORD),it.list.get(0).palletFk,customDialogList.getValue())
|
||||
////Log.i("VERDNATURA:"," palletizando ${it.list.get(0).palletFk} expedi: ${customDialogList.getValue()}")
|
||||
|
|
|
@ -113,6 +113,7 @@ class ExpeditionPalletViewModel (context: Context) : BaseViewModel() {
|
|||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
}
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
//sergio: espera repuesta en el body
|
||||
if (response.body() == null){
|
||||
_responseCheckexpeditionScanPut.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
}else{
|
||||
|
|
|
@ -165,7 +165,7 @@ class ExpeditionScanFragment (
|
|||
override fun onScanLongClickListener(itemExpeditionScanVO: ItemExpeditionScanVO) {
|
||||
customDialogTwoButtons.setTitle("Ticket: "+itemExpeditionScanVO.Ticket+" Pallet: "+itemPalletVO!!.Pallet)
|
||||
.setDescription("Expedition: "+itemExpeditionScanVO!!.expeditionFk)
|
||||
.setOkButton("Borrar"){
|
||||
.setOkButton(getString(R.string.delete)){
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionScanDel(getData(USER),
|
||||
getData(PASSWORD),itemExpeditionScanVO.id)
|
||||
|
@ -197,7 +197,7 @@ class ExpeditionScanFragment (
|
|||
if(it.expeditionFk != "0")
|
||||
listExpeditions.add(BarcodeVO(code = it.expeditionFk))
|
||||
}
|
||||
customDialogList.setTitle("Pallet"+itemPalletVO!!.Pallet+" ("+binding.mainToolbar.toolbarTitle.text+")").setOkButton("Comprobar"){
|
||||
customDialogList.setTitle("Pallet"+itemPalletVO!!.Pallet+" ("+binding.mainToolbar.toolbarTitle.text+")").setOkButton(getString(R.string.test)){
|
||||
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
|
@ -207,7 +207,7 @@ class ExpeditionScanFragment (
|
|||
ItemPalletVO(Pallet = it.list.get(0).palletFk)
|
||||
)
|
||||
}else{
|
||||
customDialog.setTitle("Atención").setDescription("No ha escaneado expediciones").setOkButton("Ok"){
|
||||
customDialog.setTitle(getString(R.string.info)).setDescription(getString(R.string.expeditionsError)).setOkButton("Ok"){
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
}
|
||||
|
|
|
@ -72,10 +72,10 @@ class ExpeditionScanSorterFragment(
|
|||
} else {
|
||||
|
||||
listExpeditionScan.add(GeneralItem(itemScaned, itemScaned))
|
||||
customDialogList.setDescription("Total:" + listExpeditionScan.size)
|
||||
customDialogList.setDescription(getString(R.string.total) + listExpeditionScan.size)
|
||||
expeditionScanAdapter!!.notifyItemInserted(listExpeditionScan.size-1)
|
||||
customDialogList.setValue("")
|
||||
ma.messageWithSound("Añadida",false,true)
|
||||
ma.messageWithSound(getString(R.string.added),false,true)
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -86,7 +86,7 @@ class ExpeditionScanSorterFragment(
|
|||
|
||||
private fun showExpeditionScan() {
|
||||
|
||||
customDialogList.setTitle("Escanea expediciones que no han pasado por el Sorter")
|
||||
customDialogList.setTitle(getString(R.string.expeditionNoSorter))
|
||||
.setOkButton(getString(R.string.end)) {
|
||||
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
|
|
@ -115,11 +115,12 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
|
|||
_response.value = ResponseItemVO(isError = true,errorMessage = "Error al lamar expedition_checkRoute "+vExpeditionFk+ " Respuesta:"+t.message!!)
|
||||
}
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
//sergio:se devuelve en el body
|
||||
if (response.body() == null){
|
||||
_responseCheckexpeditionScanPut.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada expedition_checkRoute")
|
||||
}else{
|
||||
_responseCheckexpeditionScanPut.value = ResponseItemVO(isError = false,response = response.body()!!)
|
||||
// ////Log.i("VERDNATURA:","Resultado checkExpeditionScan ${_responseCheckexpeditionScanPut.value}")
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -130,11 +131,13 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
|
|||
fun expeditionScanDel(usuario:String,password:String,vScanFk:String){
|
||||
getPaletizadoresUserCase.expeditionScanDel(usuario,password,vScanFk).enqueue(object : Callback<Any>{
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseDeleteScan.value = ResponseItemVO(isError = true,errorMessage = "Error al llamar expeditionScan_Del."+t.message!!)
|
||||
_responseDeleteScan.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),t.message!!))
|
||||
}
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null){
|
||||
_responseDeleteScan.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada expeditionScan_Del")
|
||||
if (!response.isSuccessful){
|
||||
_responseDeleteScan.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),response.message()!!))
|
||||
}else{
|
||||
_responseDeleteScan.value = ResponseItemVO(isError = false,response = response.message())
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionS
|
|||
import es.verdnatura.presentation.view.feature.paletizador.model.itemExpedetionState
|
||||
|
||||
class ExpeditionStateFragment(
|
||||
var title: String = ""
|
||||
var entryPoint: String = ""
|
||||
) : BaseFragment<FragmentItemexpeditionstateCardBinding, ExpeditionStateViewModel>(ExpeditionStateViewModel::class) {
|
||||
|
||||
|
||||
|
@ -28,7 +28,7 @@ class ExpeditionStateFragment(
|
|||
|
||||
override fun init() {
|
||||
setEvents()
|
||||
setToolBar(title)
|
||||
setToolBar(entryPoint)
|
||||
super.init()
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ class ExpeditionStateFragment(
|
|||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
binding.itemcardLayout.visibility = View.GONE
|
||||
binding.mainToolbar.toolbarTitle.text = title
|
||||
binding.mainToolbar.toolbarTitle.text = entryPoint
|
||||
ma.messageWithSound(getString(R.string.noDataLabelScanned),true,false,getString(R.string.noResults))
|
||||
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package es.verdnatura.presentation.view.feature.paletizador.fragment
|
||||
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.View
|
||||
|
@ -15,12 +16,10 @@ import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
|||
import es.verdnatura.presentation.common.OnTruckClickListener
|
||||
import es.verdnatura.presentation.view.component.CustomDialogHour
|
||||
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionListAdapter
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckList
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
import java.util.Calendar.getInstance as getInstance1
|
||||
|
||||
|
||||
|
@ -43,13 +42,17 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_expedition_truck_list
|
||||
|
||||
@SuppressLint("SetTextI18n")
|
||||
override fun init() {
|
||||
customDialogHor = CustomDialogHour(requireContext())
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.psScan)+getCURDATE()
|
||||
//binding.mainToolbar.backButton.visibility = View.GONE
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
|
||||
setToolBar()
|
||||
////Log.i("VERDNATURA:","1-cargamos expediciones")
|
||||
|
||||
viewModel.expeditionTruckList(getData(USER),
|
||||
getData(PASSWORD))
|
||||
super.init()
|
||||
|
@ -86,7 +89,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
private fun getCURDATE():String{
|
||||
val c: Date = getInstance1().getTime()
|
||||
val df = SimpleDateFormat("dd/MM/yyyy")
|
||||
return df.format(c);
|
||||
return df.format(c)
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
|
@ -113,7 +116,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
private fun addTruck(){
|
||||
customDialogHor.setTitle(getString(R.string.newTruck)).setOkButton(getString(R.string.save)){
|
||||
ma.hideKeyboard(customDialogHor.getDestinoEditText())
|
||||
if (!customDialogHor.getDestinoValue().isNullOrEmpty() && !customDialogHor.getHoraValue().isNullOrEmpty()){
|
||||
if (customDialogHor.getDestinoValue().isNotEmpty() && customDialogHor.getHoraValue().isNotEmpty()){
|
||||
viewModel.expeditionTruckAdd(getData(USER),
|
||||
getData(PASSWORD),customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
@ -128,7 +131,8 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
customDialogHor.getDestinoEditText().requestFocus()
|
||||
customDialogHor.getDestinoEditText().setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
if (!customDialogHor.getDestinoValue().isNullOrEmpty() && !customDialogHor.getHoraValue().isNullOrEmpty()){
|
||||
if (customDialogHor.getDestinoValue().isNotEmpty() && customDialogHor.getHoraValue()
|
||||
.isNotEmpty()){
|
||||
viewModel.expeditionTruckAdd(getData(USER),
|
||||
getData(PASSWORD),customDialogHor.getHoraValue(),customDialogHor.getDestinoValue())
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
|
|
@ -37,7 +37,7 @@ class ParkingFragment (var menuOrigin:String): BaseFragment<FragmentParkingBindi
|
|||
setEvents()
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.Parking)
|
||||
|
||||
if (menuOrigin =="main"){hideBackButton(binding.mainToolbar)}
|
||||
if (menuOrigin =="Main"){hideBackButton(binding.mainToolbar)}
|
||||
//sergio: después de las últimas actualizaciones se queda activo. Se cambia opción visibilidad.
|
||||
//viewModel.hideProgressLoading()
|
||||
binding.splashProgress.visibility=View.GONE
|
||||
|
|
|
@ -49,9 +49,7 @@ class ParkingViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
ProgressLoading(GONE)
|
||||
/*if (response.body() == null){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
}else{*/
|
||||
|
||||
if (response.isSuccessful)
|
||||
_response.value = ResponseItemVO(isError = false,response = response.message())
|
||||
else
|
||||
|
|
|
@ -63,34 +63,6 @@ class ParkingSaleViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
})
|
||||
}
|
||||
/* fun saleParking_add(usuario: String, password: String, sales:List<String>,parking: String)
|
||||
{
|
||||
getUbicadorUserCase.saleParking_add(usuario, password, sales, parking)
|
||||
.enqueue(object : Callback<String>
|
||||
{
|
||||
override fun onFailure(call: Call<String>, t: Throwable)
|
||||
{
|
||||
_responseParkingAdd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>)
|
||||
{
|
||||
if (response.body() == null)
|
||||
{
|
||||
_responseParkingAdd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
)
|
||||
} else
|
||||
{
|
||||
_responseParkingAdd.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!)
|
||||
}
|
||||
}
|
||||
})
|
||||
}*/
|
||||
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ class PasilleroFragment(
|
|||
"Main" -> {
|
||||
binding.mainToolbarDesign.imageViewMenu.visibility = View.VISIBLE
|
||||
binding.mainToolbarDesign.backButton.visibility = View.GONE
|
||||
//binding.mainToolbar.backButton.visibility = View.GONE
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -71,13 +71,10 @@ class PasilleroFragment(
|
|||
"Pasilleros" -> {
|
||||
viewModel.inititializeDefaultData()
|
||||
}
|
||||
/*"Verdnatura" -> {
|
||||
viewModel.inititializeDefaultData()
|
||||
}*/
|
||||
|
||||
"Paletizadores" -> viewModel.inititializeDefaultPallet()
|
||||
"Gestión de buffer" -> viewModel.inititializeDefaultBuffer()
|
||||
getString(R.string.titleBufferManegement) -> viewModel.inititializeDefaultBuffer()
|
||||
"Main" -> viewModel.inititializeDefaultDataInit()
|
||||
//"Verdnatura_design" -> viewModel.inititializeDefaultDataInit()
|
||||
"Reclamaciones" -> viewModel.inititializeDefaultClaim()
|
||||
|
||||
}
|
||||
|
|
|
@ -21,12 +21,12 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
R.drawable.barcode_scan,
|
||||
"Asociar Sacador SmartTags",R.string.SmarttagAssociate)
|
||||
) */
|
||||
_pasillerositem.add(
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(21,
|
||||
R.drawable.barcode_scan,
|
||||
"Registrar SmartTags",R.string.SmarttagRegister)
|
||||
)
|
||||
|
||||
*/
|
||||
|
||||
//sergio para que aparezca el nuevo menu
|
||||
|
||||
|
@ -34,14 +34,14 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_streetview_black_24dp,
|
||||
"Obtener colección previa", R.string.PreSacador,"Obtiene colecciones para sacar en previa"
|
||||
"Pre Sacador", R.string.titlePrePicker,"Obtiene colecciones para sacar en previa"
|
||||
)
|
||||
)
|
||||
//precontrol
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(7,
|
||||
R.drawable.ic_verified_user_black_24dp_selected,
|
||||
"Pre Control",R.string.precontrolprevious,"Sirve para revisar un ticket de previa"
|
||||
"Pre Control",R.string.titlePreControl,"Sirve para revisar un ticket de previa"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -58,7 +58,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
0,
|
||||
R.drawable.ic_loyalty_black_24dp,
|
||||
"Consultar artículo", R.string.ConsultarArticulo,"Busca información de un ítem"
|
||||
"Consultar artículo", R.string.titleItemConsult,"Busca información de un ítem"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -80,13 +80,13 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
)
|
||||
)
|
||||
|
||||
_pasillerositem.add(
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
2,
|
||||
R.drawable.ic_claims,
|
||||
"Ubicación de Reclamación", R.string.claim,"Ubicación de Reclamación"
|
||||
)
|
||||
)
|
||||
)*/
|
||||
|
||||
//sergio: pruebas cau item buscar
|
||||
/* _pasillerositem.add(
|
||||
|
@ -99,7 +99,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
1,
|
||||
R.drawable.ic_dashboard_black_24dp,
|
||||
"Ubicador", R.string.Ubicador,"Permite ubicar/saber los ítems de un carro"
|
||||
"Ubicador", R.string.titleUbicator,"Permite ubicar/saber los ítems de un carro"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -107,7 +107,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
3,
|
||||
R.drawable.ic_spa_black_24dp,
|
||||
"Inventario", R.string.Inventario, "Visualiza que falta o está desubicado"
|
||||
"Inventario", R.string.titleInventory, "Visualiza que falta o está desubicado"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -115,7 +115,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.worker_mistake,
|
||||
"Fallo del trabajador", R.string.workermistake,"Permite añadir fallos a un trabajador"
|
||||
"Fallo del trabajador", R.string.titleWorkerMistake,"Permite añadir fallos a un trabajador"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -161,7 +161,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
4,
|
||||
R.drawable.ic_move_to_inbox_black_24dp,
|
||||
"Faltas", R.string.Faltas,"Visualiza las faltas en almacén"
|
||||
"Faltas", R.string.titleFaults,"Visualiza las faltas en almacén"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -169,7 +169,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
5,
|
||||
R.drawable.ic_send_black_24dp,
|
||||
"Shelving Parking", R.string.ShelvingParking,""
|
||||
"Shelving Parking", R.string.titleShelvingParking,""
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -177,7 +177,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
8,
|
||||
R.drawable.ic_baseline_star_24,
|
||||
"Calidad", R.string.Calidad,"Permite conocer la calidad de algunos productos por comprador"
|
||||
"Calidad", R.string.titleQuality,"Permite conocer la calidad de algunos productos por comprador"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -213,7 +213,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
32,
|
||||
R.drawable.buffer_outline,
|
||||
"Gestión de buffers", R.string.BuffersManegement,"Se accede al menú de operaciones con los buffers del sorter"
|
||||
"Gestión de buffers", R.string.titleBufferManegement,"Se accede al menú de operaciones con los buffers del sorter"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -222,7 +222,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
33,
|
||||
R.drawable.qrcode_scan,
|
||||
"Lector Qr", R.string.QrReader,"Permite leer información en un qr"
|
||||
"Lector Qr", R.string.titleQrReader,"Permite leer información en un qr"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -234,7 +234,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.buffer_empty,
|
||||
"Vaciado buffer", R.string.bufferempty, "Pone en modo vaciado un buffer"
|
||||
"Vaciado buffer", R.string.titleBufferEmpty, "Pone en modo vaciado un buffer"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -243,7 +243,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
31,
|
||||
R.drawable.buffer_fill,
|
||||
"Llenado buffer", R.string.bufferfill,"Pone en modo llenado un buffer"
|
||||
"Llenado buffer", R.string.titleBufferFill,"Pone en modo llenado un buffer"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -252,7 +252,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
32,
|
||||
R.drawable.buffer_accumulation,
|
||||
"Acumulación buffer", R.string.bufferaccumulate,"Pone en modo acumulación un buffer"
|
||||
"Acumulación buffer", R.string.titleBufferAccumulate,"Pone en modo acumulación un buffer"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -260,7 +260,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
31,
|
||||
R.drawable.buffer_off,
|
||||
"Desactivado buffer", R.string.bufferoff,"Pone en modo desactivado un buffer"
|
||||
"Desactivado buffer", R.string.titleBufferOff,"Pone en modo desactivado un buffer"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -268,7 +268,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
31,
|
||||
R.drawable.buffer_flejado,
|
||||
"Flejado buffer", R.string.bufferfstrapping,"Pone en modo flejado un buffer"
|
||||
"Flejado buffer", R.string.titleBufferStrapping,"Pone en modo flejado un buffer"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -277,7 +277,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
45,
|
||||
R.drawable.buffer_load,
|
||||
"Cargar expedición en buffer", R.string.bufferload, "Pone en modo cargar un buffer"
|
||||
"Cargar expedición en buffer", R.string.titleBufferload, "Pone en modo cargar un buffer"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
@ -294,7 +294,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
_pasillerositem.add(
|
||||
PasillerosItemVO(7,
|
||||
R.drawable.ic_picker_ui,
|
||||
"Sacadores",R.string.Sacadores,"Accede a sacar pedidos"
|
||||
"Sacadores",R.string.titlePickers,"Accede a sacar pedidos"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -321,7 +321,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_claim_ui,
|
||||
"Reclamaciones", R.string.claims,"Accede al menú de reclamaciones"
|
||||
"Reclamaciones", R.string.titleClaims,"Accede al menú de reclamaciones"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -336,7 +336,7 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.ic_claims,
|
||||
"Ubicación de Reclamación", R.string.claim, "Ubicación de reclamaciones"
|
||||
"Ubicación de Reclamación", R.string.titleClaimUbication, "Ubicación de reclamaciones"
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -10,8 +10,6 @@ import es.verdnatura.databinding.FragmentControladorBinding
|
|||
import es.verdnatura.domain.ConstAndValues
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
|
||||
|
||||
|
@ -35,7 +33,7 @@ class PreControladorFragment: BaseFragment<FragmentControladorBinding,ShowTicket
|
|||
override fun init() {
|
||||
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.precontrolprevious)
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.titlePreControl)
|
||||
setEvents()
|
||||
super.init()
|
||||
}
|
||||
|
|
|
@ -67,7 +67,7 @@ class PreSacadorAdapter (
|
|||
}
|
||||
|
||||
itemArticleItemFk.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Consultar artículo"),sale.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = binding.root.context.resources.getString(R.string.titleItemConsult)),sale.itemFk)
|
||||
}
|
||||
|
||||
itemArticleQuantity.setOnClickListener {
|
||||
|
|
|
@ -110,8 +110,6 @@ class EndSacadorFragment(
|
|||
setToolBar()
|
||||
setEvents()
|
||||
|
||||
//Log.d("VERDNATURA","La col "+collection.collectionFk+ " y el type "+type)
|
||||
|
||||
searchSaleCollection()
|
||||
super.init()
|
||||
}
|
||||
|
@ -213,10 +211,7 @@ class EndSacadorFragment(
|
|||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
}
|
||||
}
|
||||
goBack = false
|
||||
|
@ -265,6 +260,7 @@ class EndSacadorFragment(
|
|||
})
|
||||
|
||||
responseSaleMove.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = GONE
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
|
@ -278,6 +274,22 @@ class EndSacadorFragment(
|
|||
}
|
||||
})
|
||||
|
||||
responseSplit.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = GONE
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
|
||||
|
||||
} else {
|
||||
responseSaleMoveSuccesful()
|
||||
ma.messageWithSound(getString(R.string.splitOk), isError = false, true)
|
||||
setTotalLines()
|
||||
}
|
||||
goBack = false
|
||||
}
|
||||
})
|
||||
|
||||
responseMissingTrash.observe(viewLifecycleOwner, Observer {
|
||||
|
||||
if (it.isError) {
|
||||
|
@ -315,7 +327,7 @@ class EndSacadorFragment(
|
|||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
|
||||
} else {
|
||||
ma.messageWithSound("Previa ok", isError = false, false)
|
||||
ma.messageWithSound(getString(R.string.previousOK), isError = false, false)
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -329,7 +341,7 @@ class EndSacadorFragment(
|
|||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
|
||||
} else {
|
||||
ma.messageWithSound("Previa ok", isError = false, false)
|
||||
ma.messageWithSound(getString(R.string.previousOK), isError = false, false)
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -387,7 +399,7 @@ class EndSacadorFragment(
|
|||
} else {
|
||||
customDialogList.setValueTwo("")
|
||||
//showErrorMessage("El resultado del procedimiento barcodeToItem de la etiqueta escaneada es: " +it.response)
|
||||
showErrorMessage("La línea de compra de la etiqueta escaneada no existe.")
|
||||
showErrorMessage(getString(R.string.lineNotExist))
|
||||
if (mperror != null) {
|
||||
mperror?.start()
|
||||
}
|
||||
|
@ -420,7 +432,7 @@ class EndSacadorFragment(
|
|||
val ticket =
|
||||
"[" + sales[positionCollectionSplit].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].id + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Split el articulo " + sales[positionCollectionSplit].itemFk + " del ticket " + ticket
|
||||
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket
|
||||
|
||||
|
||||
/* viewModel.sendChekingPresence(
|
||||
|
@ -567,7 +579,7 @@ class EndSacadorFragment(
|
|||
if (salesList.isNullOrEmpty()) {
|
||||
|
||||
ma.messageWithSound(
|
||||
"Colección sin tickets. Escanea tickets para añadirlos",
|
||||
getString(R.string.scanTicketsForAdd),
|
||||
false,
|
||||
false,
|
||||
"Pre Sacador"
|
||||
|
@ -808,9 +820,9 @@ class EndSacadorFragment(
|
|||
private fun unMarkLine(position: Int) {
|
||||
|
||||
if (sales[position].quantity == sales[position].picked) {
|
||||
customDialog.setTitle("Desmarcar linea")
|
||||
.setDescription("Vas a desmarcar la linea: " + sales[position].itemFk + " ¿Estás seguro?")
|
||||
.setOkButton("Desmarcar") {
|
||||
customDialog.setTitle(getString(R.string.unmarkLine))
|
||||
.setDescription(getString(R.string.goUnmark) + sales[position].itemFk + getString(R.string.sure))
|
||||
.setOkButton(getString(R.string.unmark)) {
|
||||
sales[position].picked = 0
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
setListPosition(position)
|
||||
|
@ -903,7 +915,7 @@ class EndSacadorFragment(
|
|||
scanRequest()
|
||||
hideKeyboards()
|
||||
} else {
|
||||
"Escanea item para validar".toast(requireContext())
|
||||
"getString(R.string.scanItemValidate) validar".toast(requireContext())
|
||||
}
|
||||
|
||||
|
||||
|
@ -911,7 +923,7 @@ class EndSacadorFragment(
|
|||
scanRequest()
|
||||
hideKeyboards()
|
||||
customDialogList.dismiss()
|
||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo("Escanea item")
|
||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo(getString(R.string.scanItem))
|
||||
.setValueTwo("").show()
|
||||
|
||||
|
||||
|
@ -948,7 +960,7 @@ class EndSacadorFragment(
|
|||
customDialogList.dismiss()
|
||||
}
|
||||
} else {
|
||||
"Escanea item para validar".toast(requireContext())
|
||||
"getString(R.string.scanItemValidate) validar".toast(requireContext())
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
|
@ -1216,7 +1228,7 @@ class EndSacadorFragment(
|
|||
}
|
||||
|
||||
private fun showErrorMessage(text: String) {
|
||||
customDialog.setTitle("Error al marcar la linea").setDescription(text)
|
||||
customDialog.setTitle(getString(R.string.errorMarkLine)).setDescription(text)
|
||||
.setKoButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
|
@ -1225,11 +1237,11 @@ class EndSacadorFragment(
|
|||
|
||||
private fun showQuantityDialog(position: Int) {
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad)).setValue("")
|
||||
.setOkButton(getString(R.string.Faltas)) {
|
||||
.setOkButton(getString(R.string.titleFaults)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Faltas)
|
||||
getString(R.string.titleFaults)
|
||||
)
|
||||
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
|
@ -1276,7 +1288,7 @@ class EndSacadorFragment(
|
|||
when (action) {
|
||||
getString(R.string.Agregar) -> increaseQuantity(position, value)
|
||||
getString(R.string.BasuraRechazar) -> TrashMissingReject(position, value, "TRUE")
|
||||
getString(R.string.Faltas) -> TrashMissingReject(position, value, "FALSE")
|
||||
getString(R.string.titleFaults) -> TrashMissingReject(position, value, "FALSE")
|
||||
getString(R.string.Reject) -> TrashMissingReject(position, value, "reject")
|
||||
getString(R.string.Split) -> split(position, value)
|
||||
|
||||
|
@ -1317,7 +1329,7 @@ class EndSacadorFragment(
|
|||
//FALTAS / BASURA / SPLIT
|
||||
private fun showQuantityDialogOld(position: Int) {
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad)).setValue("")
|
||||
.setOkButton(getString(R.string.Faltas)) {
|
||||
.setOkButton(getString(R.string.titleFaults)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
|
@ -1375,14 +1387,16 @@ class EndSacadorFragment(
|
|||
totalQuantity = sales[position].saldo.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
viewModel.saleMove(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString(),
|
||||
originalQuantity = sales[position].quantity.toString()
|
||||
)
|
||||
Log.d("VERDNATURA::", "responseSaleMove enviando")
|
||||
|
||||
binding.splashProgress.visibility=VISIBLE
|
||||
|
||||
viewModel.transferSalesSalix(
|
||||
getData(TOKEN),
|
||||
ticketFk = sales[position].id,
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString()
|
||||
)
|
||||
|
||||
/*
|
||||
try {
|
||||
sales[position].saldo = quantity.toInt()
|
||||
|
|
|
@ -177,11 +177,8 @@ class PreSacadorFragment :
|
|||
|
||||
responseSalixMessage.observe(viewLifecycleOwner, Observer {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
/* customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
ma.messageWithSound( getString(R.string.rocketKO) + it.errorMessage, it.isError, false)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -294,7 +291,7 @@ class PreSacadorFragment :
|
|||
val ticket =
|
||||
"[" + sales[positionCollectionSplit].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].id + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Split el articulo " + sales[positionCollectionSplit].itemFk + " del ticket " + ticket
|
||||
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + " getString(R.string.fromTicket) " + ticket
|
||||
/* viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[positionCollectionSplit].salesPersonFk,
|
||||
|
@ -714,7 +711,7 @@ class PreSacadorFragment :
|
|||
scanRequest()
|
||||
hideKeyboards()
|
||||
} else {
|
||||
"Escanea item para validar".toast(requireContext())
|
||||
"getString(R.string.scanItemValidate) validar".toast(requireContext())
|
||||
}
|
||||
|
||||
|
||||
|
@ -722,7 +719,7 @@ class PreSacadorFragment :
|
|||
scanRequest()
|
||||
hideKeyboards()
|
||||
customDialogList.dismiss()
|
||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo("Escanea item")
|
||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo(getString(R.string.scanItem))
|
||||
.setValueTwo("").show()
|
||||
|
||||
|
||||
|
@ -759,7 +756,7 @@ class PreSacadorFragment :
|
|||
customDialogList.dismiss()
|
||||
}
|
||||
} else {
|
||||
"Escanea item para validar".toast(requireContext())
|
||||
"getString(R.string.scanItemValidate) validar".toast(requireContext())
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
|
@ -1009,7 +1006,7 @@ class PreSacadorFragment :
|
|||
}
|
||||
|
||||
private fun showErrorMessage(text: String) {
|
||||
customDialog.setTitle("Error al marcar la linea").setDescription(text)
|
||||
customDialog.setTitle(getString(R.string.errorMarkLine)).setDescription(text)
|
||||
.setKoButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
|
@ -1018,11 +1015,11 @@ class PreSacadorFragment :
|
|||
|
||||
private fun showQuantityDialog(position: Int) {
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad)).setValue("")
|
||||
.setOkButton(getString(R.string.Faltas)) {
|
||||
.setOkButton(getString(R.string.titleFaults)) {
|
||||
checkAndCall(
|
||||
position,
|
||||
customDialogThreeButtons.getValue(),
|
||||
getString(R.string.Faltas)
|
||||
getString(R.string.titleFaults)
|
||||
)
|
||||
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
|
@ -1069,7 +1066,7 @@ class PreSacadorFragment :
|
|||
when (action) {
|
||||
getString(R.string.Agregar) -> increaseQuantity(position, value)
|
||||
getString(R.string.BasuraRechazar) -> TrashMissingReject(position, value,"TRUE")
|
||||
getString(R.string.Faltas) -> TrashMissingReject(position, value,"FALSE")
|
||||
getString(R.string.titleFaults) -> TrashMissingReject(position, value,"FALSE")
|
||||
getString(R.string.Reject) -> TrashMissingReject(position, value,"reject")
|
||||
getString(R.string.Split) -> split(position, value)
|
||||
|
||||
|
@ -1109,7 +1106,7 @@ class PreSacadorFragment :
|
|||
//FALTAS / BASURA / SPLIT
|
||||
private fun showQuantityDialogOld(position: Int) {
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad)).setValue("")
|
||||
.setOkButton(getString(R.string.Faltas)) {
|
||||
.setOkButton(getString(R.string.titleFaults)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
|
|
|
@ -13,6 +13,8 @@ import es.verdnatura.presentation.base.BaseViewModel
|
|||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
import es.verdnatura.presentation.view.feature.collection.listSaleSalix
|
||||
import es.verdnatura.presentation.view.feature.collection.saleSalix
|
||||
import es.verdnatura.presentation.view.feature.presacador.model.PreSacadorItemVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.mapper.toDateFormat
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionListVO
|
||||
|
@ -80,6 +82,9 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
val responseItemShelvingUpdate: LiveData<ResponseItemVO>
|
||||
get() = _responseItemShelvingUpdate
|
||||
|
||||
private val _responseSplit by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responseSplit: LiveData<ResponseItemVO>
|
||||
get() = _responseSplit
|
||||
|
||||
//sergio: previa nuevo
|
||||
private val _collectionList by lazy { MutableLiveData<CollectionListVO>() }
|
||||
|
@ -117,10 +122,8 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<List<PreSacadorItemVO>>
|
||||
) {
|
||||
if (response.body() != null) {
|
||||
//d("VERDNATURA::", "entra con lineas")
|
||||
_salesList.value = response.body()?.let { it }
|
||||
} else {
|
||||
// d("VERDNATURA::", "ES NULO")
|
||||
_salesList.value = listOf()
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +150,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -211,7 +214,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>)
|
||||
{
|
||||
if (response.body() == null)
|
||||
if (!response.isSuccessfull)
|
||||
{
|
||||
_responseParkingAdd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
|
@ -297,7 +300,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!response.isSuccessful()) {
|
||||
if (!response.isSuccessful) {
|
||||
_responseItemShelvingSaleSupplyAdd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -313,6 +316,8 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun saleTrackingReplace(
|
||||
usuario: String,
|
||||
password: String,
|
||||
|
@ -342,7 +347,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -368,6 +373,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
//sergio: espera item en el body
|
||||
if (response.body() == null) {
|
||||
_responseCode.value = ResponseItemVO(
|
||||
isError = true,
|
||||
|
@ -396,7 +402,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -434,7 +440,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!!response.isSuccessful) {
|
||||
if (!response.isSuccessful) {
|
||||
_responseSaleMove.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -694,7 +700,6 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<List<PreSacadorItemVO>>
|
||||
) {
|
||||
if (response.body() != null) {
|
||||
//Timber.d("entra con lineas")
|
||||
_salesList.value = response.body()?.let { it }
|
||||
} else {
|
||||
d("VERDNATURA::", "ES NULO")
|
||||
|
@ -896,4 +901,44 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
fun transferSalesSalix(
|
||||
token:String,
|
||||
ticketFk:String,
|
||||
saleFk: String,
|
||||
quantity: String,
|
||||
|
||||
) {
|
||||
getSacadorControladorUserCase.transferSalesSalix(
|
||||
token,
|
||||
ticketFk,
|
||||
saleFk,
|
||||
quantity
|
||||
|
||||
).enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseSplit.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
//segio: salix devuelve id
|
||||
if (response.body() == null) {
|
||||
_responseSplit.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
} else {
|
||||
_responseSplit.value =
|
||||
ResponseItemVO(isError = false, response = response.message())
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -82,16 +82,13 @@ class QrFragment(
|
|||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
|
||||
// getMessageFromJSON(it.errorMessage)
|
||||
ma.messageWithSound(it.errorMessage+ " "+itemscaned,true,false)
|
||||
/*customDialog.setTitle(getString(R.string.error)).setDescription( it.errorMessage+ " "+itemscaned)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
} else {
|
||||
|
||||
customDialog.setTitle(getString(R.string.info))
|
||||
.setDescription(getString(R.string.operation) + itemscaned + ". " + it.response)
|
||||
.setDescription(getString(R.string.operation) + itemscaned + "." + getString(
|
||||
R.string.answer) +it.response)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.dismiss()
|
||||
binding.mainToolbar.backButton.performClick()
|
||||
|
|
|
@ -46,26 +46,25 @@ class QrFragmentViewModel(context: Context) : BaseViewModel() {
|
|||
_qrresponse.value = ResponseItemVO(
|
||||
response = "",
|
||||
isError = true,
|
||||
errorMessage = "Usuario sin permisos para realizar la acción"
|
||||
errorMessage ="Usuario sin permisos para realizar la acción"
|
||||
|
||||
)
|
||||
|
||||
} else if (response.body() != null) {
|
||||
_qrresponse.value = ResponseItemVO(
|
||||
response = "La respuesta es: " + response.body().toString(),
|
||||
response = response.body().toString(),
|
||||
isError = false,
|
||||
errorMessage = ""
|
||||
)
|
||||
|
||||
} else {
|
||||
|
||||
if (response.body() == null) {
|
||||
_qrresponse.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ class ReposicionAdapter (
|
|||
}
|
||||
|
||||
itemArticleItemFk.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Consultar artículo"),sale.itemFk)
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = binding.root.context.resources.getString(R.string.titleItemConsult)),sale.itemFk)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
if (!binding.scanInput.text.toString().isNullOrEmpty()) {
|
||||
|
||||
if (sales.count() > 0 && sales[0].saldo == 0) {
|
||||
"Pedido completado".toast(requireContext())
|
||||
getString(R.string.orderCompleted).toast(requireContext())
|
||||
} else {
|
||||
findSale(binding.scanInput.text.toString())
|
||||
}
|
||||
|
@ -206,7 +206,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
} else {
|
||||
customDialogList.setValueTwo("")
|
||||
// showErrorMessage("El resultado del procedimiento barcodeToItem de la etiqueta escaneada es: " +it.response)
|
||||
showErrorMessage("La línea de compra de la etiqueta escaneada no existe.")
|
||||
showErrorMessage(getString(R.string.lineNotExist))
|
||||
mperror?.start()
|
||||
}
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
private fun createSaleList(salesList: List<PreSacadorItemVO>) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (salesList.isNullOrEmpty()) {
|
||||
customDialog.setTitle("Reposición").setDescription("No existen pedidos para reponer")
|
||||
customDialog.setTitle(getString(R.string.titleReplacement)).setDescription(getString(R.string.NotOrderReplacement))
|
||||
.setKoButton(getString(R.string.cancel)) {
|
||||
if (sales.count() > 0) {
|
||||
sales.clear()
|
||||
|
@ -242,7 +242,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
binding.scanInput.visibility = View.GONE
|
||||
binding.btnCancelar.visibility = View.GONE
|
||||
} else if (salesList.count() > 0 && salesList[0].saldo == 0) {
|
||||
"Pedido completado".toast(requireContext())
|
||||
getString(R.string.orderCompleted).toast(requireContext())
|
||||
binding.scanInput.visibility = View.GONE
|
||||
binding.btnCancelar.visibility = View.GONE
|
||||
} else {
|
||||
|
@ -304,7 +304,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
|
||||
if (!isOk) {
|
||||
mperror!!.start()
|
||||
("Elemento escaneado no encontrado: " + txtscan).toast(requireContext())
|
||||
(getString(R.string.itemScanetNotFound) + txtscan).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -335,7 +335,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
|
||||
if (!isOk) {
|
||||
mperror!!.start()
|
||||
("Elemento escaneado no encontrado: " + txtscan).toast(requireContext())
|
||||
(getString(R.string.itemScanetNotFound) + txtscan).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -378,7 +378,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
listPlacementSupply.add(BarcodeVO(code = it.proposal))
|
||||
}
|
||||
|
||||
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton(getString( R.string.take)) {
|
||||
customDialogList.setTitle("$shelving($item) $total "+getString(R.string.de)+" $longName").setOkButton(getString( R.string.take)) {
|
||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
|
@ -397,7 +397,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
scanRequest()
|
||||
hideKeyboards()
|
||||
} else {
|
||||
"Escanea item para validar".toast(requireContext())
|
||||
getString(R.string.scanItemValidate).toast(requireContext())
|
||||
}
|
||||
|
||||
|
||||
|
@ -405,7 +405,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
scanRequest()
|
||||
hideKeyboards()
|
||||
customDialogList.dismiss()
|
||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo("Escanea item")
|
||||
}.setHintValue(getString(R.string.quantitySelect)).setValue(total).setHintValueTwo(getString(R.string.scanItem))
|
||||
.setValueTwo("").show()
|
||||
|
||||
|
||||
|
@ -437,7 +437,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
customDialogList.dismiss()
|
||||
}
|
||||
} else {
|
||||
"Escanea item para validar".toast(requireContext())
|
||||
getString(R.string.scanItemValidate).toast(requireContext())
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
|
@ -522,7 +522,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
|
||||
when (item) {
|
||||
iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = "Parking"),
|
||||
PasillerosItemVO(title = getString(R.string.Parking)),
|
||||
""
|
||||
)
|
||||
}
|
||||
|
@ -545,7 +545,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
}
|
||||
|
||||
private fun showErrorMessage(text: String) {
|
||||
customDialog.setTitle("Error al marcar la linea").setDescription(text)
|
||||
customDialog.setTitle(getString(R.string.errorMarkLine)).setDescription(text)
|
||||
.setKoButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
|
@ -553,7 +553,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
|
||||
private fun showScanner(index: Int, sale: PreSacadorItemVO) {
|
||||
customDialogInput.setTitle("" + sale.itemFk)
|
||||
.setDescription("Escanea el carro para el item seleccionado").setOkButton(getString(R.string.accept)) {
|
||||
.setDescription(getString(R.string.scanWagonForItem)).setOkButton(getString(R.string.accept)) {
|
||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||
findSale(customDialogInput.getValue(), index)
|
||||
}
|
||||
|
|
|
@ -164,6 +164,7 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||
//sergio:espera item en el body
|
||||
if (response.body() == null) {
|
||||
_responseCode.value = ResponseItemVO(
|
||||
isError = true,
|
||||
|
@ -235,7 +236,7 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!response.isSuccessful()) {
|
||||
if (!response.isSuccessful) {
|
||||
_responseClose.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
|
|
@ -49,7 +49,6 @@ class SacadorFragment :
|
|||
|
||||
override fun init() {
|
||||
|
||||
//viewModel.smartTagInsertTicket("577387")
|
||||
customDialog = CustomDialog(requireContext())
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
binding.splashProgressTwo.visibility = View.GONE
|
||||
|
@ -178,7 +177,7 @@ class SacadorFragment :
|
|||
getData(WAGON)
|
||||
)
|
||||
} else if (getCollections) {
|
||||
Log.d("VERDNATURA::","getCollections sobrevive")
|
||||
//Log.d("VERDNATURA::","getCollections sobrevive")
|
||||
viewModel.collection_new_smart(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
|
@ -248,17 +247,18 @@ class SacadorFragment :
|
|||
binding.splashProgress.visibility = View.GONE
|
||||
|
||||
getCollections=false
|
||||
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
// viewModel.smartTagInsertTicket(it.response)
|
||||
} else {
|
||||
ma.messageWithSound(it.errorMessage, false, false)
|
||||
//ma.messageWithSound(it.errorMessage, false, false)
|
||||
viewModel.smartTagInsertTicket(it.response)
|
||||
|
||||
goBack = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
@ -302,14 +302,13 @@ class SacadorFragment :
|
|||
}
|
||||
}
|
||||
if (isNew) {
|
||||
collectionsList.add(CollectionVO(collectionFk = collection, created = "Nuevo"))
|
||||
//Log.d("VERDNATURA::","llamada nodejs insert")
|
||||
//viewModel.smartTagInsertTicket(collection)
|
||||
collectionsList.add(CollectionVO(collectionFk = collection, created = getString(R.string.newCreated)))
|
||||
|
||||
|
||||
adapter?.notifyDataSetChanged()
|
||||
} else {
|
||||
customDialog.setTitle("Atención")
|
||||
.setDescription("La colección " + collection + " sigue pendiente de preparar")
|
||||
customDialog.setTitle(getString(R.string.info))
|
||||
.setDescription(getString(R.string.collectionPending) + collection)
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
|
|
|
@ -17,6 +17,7 @@ import es.verdnatura.presentation.view.feature.sacador.mapper.toDateFormat
|
|||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionListVO
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import es.verdnatura.presentation.view.feature.smarttag.sacador.model.SmartTagRegister
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
@ -141,11 +142,9 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
|
|||
) {
|
||||
if (response.body() != null) {
|
||||
|
||||
Log.d("VERDNATURA::","Entramos y formamos _responseCollectionSmarttag:"+response.body())
|
||||
_responseCollectionSmart.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!)
|
||||
} else {
|
||||
Log.d("VERDNATURA::","Entramos y formamos _responseCollectionSmarttag")
|
||||
_responseCollectionSmart.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||
|
@ -270,8 +269,7 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
val responseSmart: SmartTagRegister
|
||||
|
||||
if (response.isSuccessful()){
|
||||
//Log.i("VERDNATURA::","El mensaje es "+response.message())
|
||||
if (response.isSuccessful){
|
||||
responseSmart = SmartTagRegister(
|
||||
message="Ticket insertado OK.",
|
||||
isError = false,
|
||||
|
@ -279,9 +277,12 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
|
|||
)
|
||||
|
||||
}else{
|
||||
var text = JSONObject(response.errorBody()!!.string()).get("error")
|
||||
var message = JSONObject(text.toString()).get("message")
|
||||
|
||||
responseSmart = SmartTagRegister(
|
||||
isError = true,
|
||||
errorMessage = response.message()
|
||||
errorMessage = message.toString()
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -294,8 +295,6 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
|
|||
val responseSmart =
|
||||
SmartTagRegister(isError = true, errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
|
||||
//Log.i("VERDNATURA::","el error nodejs es "+t.message+"--"+t.cause.toString()+"--"+t.stackTrace.toString())
|
||||
|
||||
_registerSmarttagInsert.value = responseSmart
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.content.Context
|
|||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.lifecycle.Observer
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentControladorBinding
|
||||
import es.verdnatura.domain.ConstAndValues
|
||||
|
@ -37,7 +36,8 @@ class ShowTicketFragment(var menuOrigin: String) :
|
|||
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.verticket)
|
||||
if (menuOrigin == "main") {
|
||||
|
||||
if (menuOrigin == "Main") {
|
||||
hideBackButton(binding.mainToolbar)
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ class ShowTicketFragment(var menuOrigin: String) :
|
|||
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
collectionTicketList.observe(viewLifecycleOwner, Observer {
|
||||
collectionTicketList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
@ -98,7 +98,7 @@ class ShowTicketFragment(var menuOrigin: String) :
|
|||
goBack = false
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -2,21 +2,17 @@ package es.verdnatura.presentation.view.feature.smarttag.register
|
|||
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.View.*
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.activity.OnBackPressedCallback
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentSacadorAssociatesmarttagBinding
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.*
|
||||
import es.verdnatura.presentation.common.OnSmartTagRowClickListener
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import es.verdnatura.presentation.view.feature.smarttag.adapter.SmartTagAdapter
|
||||
import es.verdnatura.presentation.view.feature.smarttag.model.SmartTag
|
||||
import es.verdnatura.presentation.view.feature.smarttag.sacador.fragment.SmartTagsViewModel
|
||||
|
@ -44,21 +40,20 @@ class RegisterSmartTagsFragment(
|
|||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
// sergio: en test: Log.i("VERDNATURA:","attached")
|
||||
val callback: OnBackPressedCallback =
|
||||
object : OnBackPressedCallback(true)
|
||||
{
|
||||
override fun handleOnBackPressed() {
|
||||
// Leave empty do disable back press or
|
||||
// write your code which you want
|
||||
// Log.i("VERDNATURA:","PULSADO")
|
||||
// sergio: en test: Log.i("VERDNATURA:","attached")
|
||||
val callback: OnBackPressedCallback =
|
||||
object : OnBackPressedCallback(true) {
|
||||
override fun handleOnBackPressed() {
|
||||
// Leave empty do disable back press or
|
||||
// write your code which you want
|
||||
// Log.i("VERDNATURA:","PULSADO")
|
||||
|
||||
}
|
||||
}
|
||||
requireActivity().onBackPressedDispatcher.addCallback(
|
||||
this,
|
||||
callback
|
||||
)
|
||||
}
|
||||
requireActivity().onBackPressedDispatcher.addCallback(
|
||||
this,
|
||||
callback
|
||||
)
|
||||
|
||||
//if (context is OnCollectionSelectedListener) onCollectionSelectedListener = context
|
||||
}
|
||||
|
@ -69,7 +64,7 @@ class RegisterSmartTagsFragment(
|
|||
customDialog = CustomDialog(requireContext())
|
||||
customDialogList = CustomDialogList(requireContext())
|
||||
goBack = false
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
ma.hideBottomNavigation(GONE)
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
setEvents()
|
||||
|
@ -87,36 +82,41 @@ class RegisterSmartTagsFragment(
|
|||
private fun setToolBar() {
|
||||
|
||||
|
||||
// Log.d("VERDNATURA::","Title"+entryPoint)
|
||||
// Log.d("VERDNATURA::","Title"+entryPoint)
|
||||
binding.mainToolbar.toolbarTitle.text = entryPoint
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
}
|
||||
|
||||
|
||||
private fun bindShelving_add(shelvingOrSmarttag: String) {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
|
||||
// Log.d("VERDNATURA::","El selvingORSmarttag es "+shelvingOrSmarttag)
|
||||
if (listSmartTags.size < 1) {
|
||||
|
||||
} else {
|
||||
/* ("https://smart-tag.verdnatura.es/bindShelving/$shelvingOrSmarttag&${listSmartTags.first().code}&${listSmartTags.size}").toast(
|
||||
requireContext()
|
||||
)*/
|
||||
viewModel.smartTagRegister(shelvingOrSmarttag,listSmartTags.first().code!!,listSmartTags.size.toString())
|
||||
|
||||
// Log.d("VERDNATURA::","https://smart-tag.verdnatura.es/bindShelving/$shelvingOrSmarttag&${listSmartTags.first().code}&${listSmartTags.size}")
|
||||
}
|
||||
|
||||
|
||||
itemScaned = shelvingOrSmarttag
|
||||
|
||||
add_item()
|
||||
if (listSmartTags.size > 0) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.smartTagRegister(
|
||||
shelvingOrSmarttag,
|
||||
listSmartTags.first().code!!,
|
||||
listSmartTags.size.toString()
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
|
||||
if (listSmartTags.isEmpty()) {
|
||||
val nameSmartTagwithWagon =
|
||||
getTextScaned(listSmartTags.size + 1) + itemScaned
|
||||
customDialogList.setTitle(getTextToPosition(listSmartTags.size + 1))
|
||||
|
||||
|
||||
listSmartTags.add(SmartTag(itemScaned, nameSmartTagwithWagon))
|
||||
smartAdapter!!.notifyDataSetChanged()
|
||||
customDialogList.setValue("")
|
||||
}
|
||||
}
|
||||
|
||||
private fun add_item(){
|
||||
var nameSmartTagwithWagon: String
|
||||
private fun add_item() {
|
||||
val nameSmartTagwithWagon: String
|
||||
|
||||
nameSmartTagwithWagon =
|
||||
getTextScaned(listSmartTags.size + 1) + itemScaned
|
||||
|
@ -129,19 +129,19 @@ class RegisterSmartTagsFragment(
|
|||
}
|
||||
|
||||
|
||||
private fun scanRequest() {
|
||||
if (binding.scanInput != null) {
|
||||
binding.scanInput.requestFocus()
|
||||
}
|
||||
hideKeyboards()
|
||||
}
|
||||
/* private fun scanRequest() {
|
||||
if (binding.scanInput != null) {
|
||||
binding.scanInput.requestFocus()
|
||||
}
|
||||
hideKeyboards()
|
||||
}*/
|
||||
|
||||
private fun hideKeyboards() {
|
||||
try {
|
||||
requireActivity().hideKeyboard()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
/* private fun hideKeyboards() {
|
||||
try {
|
||||
requireActivity().hideKeyboard()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}*/
|
||||
|
||||
private fun setEvents() {
|
||||
|
||||
|
@ -161,38 +161,62 @@ class RegisterSmartTagsFragment(
|
|||
with(viewModel) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
registerSmarttagNode.observe(viewLifecycleOwner, Observer {
|
||||
|
||||
if (it.isError){
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
}else{
|
||||
ma.messageWithSound(it.message,false,false)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
responseadd.observe(viewLifecycleOwner, Observer {
|
||||
// Log.i("VERDNATURA", "Revisar llamada de las etiquetas smarttags : ${it.response}")
|
||||
|
||||
registerSmarttagNode.observe(viewLifecycleOwner) {
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
|
||||
//listSmartTags.clear()
|
||||
showScanSmartTags()
|
||||
binding.splashProgress.visibility = GONE
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
} else {
|
||||
var nameSmartTagwithWagon: String
|
||||
add_item()
|
||||
if (listSmartTags.size > 3) {
|
||||
|
||||
nameSmartTagwithWagon =
|
||||
getTextScaned(listSmartTags.size + 1) + itemScaned
|
||||
customDialogList.setTitle(getTextToPosition(listSmartTags.size + 1))
|
||||
customDialog.setTitle(getString(R.string.info))
|
||||
.setDescription(getString(R.string.registerOneWagoon))
|
||||
.setOkButton(getString(R.string.accept))
|
||||
{
|
||||
listSmartTags.clear()
|
||||
customDialog.dismiss()
|
||||
showScanSmartTags()
|
||||
|
||||
}
|
||||
.setKoButton(getString(R.string.exit)) {
|
||||
customDialog.dismiss()
|
||||
customDialogList.dismiss()
|
||||
requireActivity().onBackPressed()
|
||||
|
||||
listSmartTags.add(SmartTag(itemScaned, nameSmartTagwithWagon))
|
||||
smartAdapter!!.notifyDataSetChanged()
|
||||
customDialogList.setValue("")
|
||||
}
|
||||
.show()
|
||||
|
||||
} else {
|
||||
showScanSmartTags()
|
||||
}
|
||||
ma.messageWithSound(it.message, false, false)
|
||||
}
|
||||
binding.splashProgress.visibility = GONE
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/* responseadd.observe(viewLifecycleOwner) {
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
} else {
|
||||
val nameSmartTagwithWagon: String
|
||||
|
||||
nameSmartTagwithWagon =
|
||||
getTextScaned(listSmartTags.size + 1) + itemScaned
|
||||
customDialogList.setTitle(getTextToPosition(listSmartTags.size + 1))
|
||||
|
||||
|
||||
listSmartTags.add(SmartTag(itemScaned, nameSmartTagwithWagon))
|
||||
smartAdapter!!.notifyDataSetChanged()
|
||||
customDialogList.setValue("")
|
||||
|
||||
}
|
||||
binding.splashProgress.visibility = GONE
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -202,6 +226,7 @@ class RegisterSmartTagsFragment(
|
|||
var message = ""
|
||||
|
||||
when (TagsScaned) {
|
||||
0 -> message = getString(R.string.scanUpToDown)
|
||||
1 -> message = getString(R.string.scanHighLabel)
|
||||
2 -> message = getString(R.string.scanMedLabel)
|
||||
3 -> message = getString(R.string.scanLowLabel)
|
||||
|
@ -217,9 +242,9 @@ class RegisterSmartTagsFragment(
|
|||
|
||||
when (TagScaned) {
|
||||
1 -> message = "Carro:"
|
||||
2 -> message = "Etiqueta superior:"
|
||||
3 -> message = "Escanea del medio:"
|
||||
4 -> message = "Etiqueta inferior:"
|
||||
2 -> message = getString(R.string.highLabel)
|
||||
3 -> message = getString(R.string.midLabel)
|
||||
4 -> message = getString(R.string.lowLabel)
|
||||
}
|
||||
|
||||
return message
|
||||
|
@ -228,43 +253,38 @@ class RegisterSmartTagsFragment(
|
|||
|
||||
private fun showScanSmartTags() {
|
||||
|
||||
customDialogList.setTitle(getString(R.string.scanUpToDown))
|
||||
|
||||
customDialogList.setTitle(getTextToPosition(listSmartTags.size))
|
||||
.setOkButton(getString(R.string.end)) {
|
||||
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
if (listSmartTags.size > 0) {
|
||||
// setFragmentResult("requestkey", bundleOf("tagMode" to "SmartTag"))
|
||||
|
||||
customDialogList.dismiss()
|
||||
requireActivity().onBackPressed()
|
||||
// ma.openFragmentPickers()
|
||||
/*listSmartTags.forEach {
|
||||
Log.i("VERDNATURA:","El codigo es :${it.code}")
|
||||
}
|
||||
workerShelving_add(userFk, it.code!!)*/
|
||||
|
||||
|
||||
} else {
|
||||
/* customDialog.setTitle("Atención").setDescription("No ha escaneado Smartags")
|
||||
.setOkButton("Ok")
|
||||
{*/
|
||||
customDialogList.dismiss()
|
||||
requireActivity().onBackPressed()
|
||||
|
||||
/* }.show()*/
|
||||
customDialogList.dismiss()
|
||||
requireActivity().onBackPressed()
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* }.setKoButton("Deshacer") {
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
/* }.setKoButton("Deshacer") {
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
if (!listSmartTags.isEmpty()) {
|
||||
if (!listSmartTags.isEmpty()) {
|
||||
|
||||
bindShelving_remove()
|
||||
bindShelving_remove()
|
||||
|
||||
} else {
|
||||
customDialogList.dismiss()
|
||||
requireActivity().onBackPressed()
|
||||
} else {
|
||||
customDialogList.dismiss()
|
||||
requireActivity().onBackPressed()
|
||||
|
||||
}*/
|
||||
}*/
|
||||
|
||||
|
||||
//
|
||||
|
@ -275,7 +295,7 @@ class RegisterSmartTagsFragment(
|
|||
|
||||
customDialogList.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||
if (!customDialogList.getValue().isNullOrEmpty()) {
|
||||
if (!customDialogList.getValue().isEmpty()) {
|
||||
// Log.i("VERDNATURA:", "scan valor ${customDialogList.getValue()}")
|
||||
|
||||
if (listSmartTags.size > 3) {
|
||||
|
@ -302,9 +322,6 @@ class RegisterSmartTagsFragment(
|
|||
bindShelving_add(customDialogList.getValue().uppercase())
|
||||
}
|
||||
|
||||
// showScanSmartTags(SmartTag(customDialogList.getValue()))
|
||||
// listSmartTags.add(SmartTag(customDialogList.getValue()))
|
||||
// smartAdapter!!.notifyDataSetChanged()
|
||||
|
||||
}
|
||||
customDialogList.setValue("")
|
||||
|
|
|
@ -49,7 +49,7 @@ class AssociateSmartTagsFragment(
|
|||
|
||||
override fun onAttach(context: Context) {
|
||||
super.onAttach(context)
|
||||
Timber.i("VERDNATURA:attached")
|
||||
// Timber.i("VERDNATURA:attached")
|
||||
val callback: OnBackPressedCallback =
|
||||
object : OnBackPressedCallback(true) {
|
||||
override fun handleOnBackPressed() {
|
||||
|
@ -152,7 +152,7 @@ class AssociateSmartTagsFragment(
|
|||
// Log.i("VERDNATURA::", "Revisar llamada de las etiquetas smarttags : ${it.response}")
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound("Asegúrate de escanear una matrícula."+it.errorMessage,true,false)
|
||||
ma.messageWithSound(getString(R.string.shelvingSure)+it.errorMessage,true,false)
|
||||
|
||||
} else {
|
||||
|
||||
|
@ -243,9 +243,6 @@ class AssociateSmartTagsFragment(
|
|||
if (listSmartTags.size > 0) {
|
||||
// setFragmentResult("requestkey", bundleOf("tagMode" to "SmartTag"))
|
||||
customDialogList.dismiss()
|
||||
|
||||
|
||||
//Log.d("VERDNATURA::","Vamos a abrrir Sacadores")
|
||||
val result = "complete"
|
||||
setFragmentResult("requestKey", bundleOf("tagMode" to result))
|
||||
ma.openFragmentPickers(true)
|
||||
|
|
|
@ -65,11 +65,6 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
|||
}else{
|
||||
_responseadd.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||
}
|
||||
/*if (response.body() == null){
|
||||
_responseadd.value = ResponseItemVO(isError = true,errorMessage = "Error al escanear matrícula o etiqueta")
|
||||
}else{
|
||||
_responseadd.value = ResponseItemVO(isError = false,response = response.body()!!)
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
|
@ -90,13 +85,13 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
|||
GetSmarttagsUserCase.workerShelving_delete(usuario,password,vBarcode).enqueue(object : Callback<Void>{
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
//_responseremove.value = ResponseItemVO(isError = true,errorMessage = "Error al llamar a workerShelving_remove")
|
||||
_responseremove.value = messageError(t.message!!,"workerShelving_delete")
|
||||
_responseremove.value = messageError(t.message!!,nameofFunction(this))
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
if (!response.isSuccessful){
|
||||
_responseremove.value = messageError(response.message(),"workerShelving_delete")
|
||||
_responseremove.value = messageError(response.message(),nameofFunction(this))
|
||||
}else{
|
||||
_responseremove.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||
}
|
||||
|
@ -120,8 +115,7 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
val responseSmart: SmartTagRegister
|
||||
|
||||
if (response.isSuccessful()){
|
||||
Log.d("VERDNATURA::","El mensaje es "+response.errorBody())
|
||||
if (response.isSuccessful){
|
||||
responseSmart = SmartTagRegister(
|
||||
message="Registrada smartTag.",
|
||||
isError = false,
|
||||
|
@ -150,7 +144,7 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
|||
val responseSmart =
|
||||
SmartTagRegister(isError = true, errorMessage = t.message!!)
|
||||
|
||||
Log.d("VERDNATURA::","el error nodejs es "+t.message+"--"+t.cause.toString()+"--"+t.stackTrace.toString())
|
||||
//Log.d("VERDNATURA::","el error nodejs es "+t.message+"--"+t.cause.toString()+"--"+t.stackTrace.toString())
|
||||
|
||||
_registerSmarttagNode.value = responseSmart
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ class TransferenciaViewModel(context: Context) : BaseViewModel() {
|
|||
_response.value = ResponseItemVO(isError = true,errorMessage ="Error en llamada itemShelvingTransfer."+t.message!!)
|
||||
}
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null){
|
||||
if (!response.isSuccessul == null){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelvingTransfer")
|
||||
}else{
|
||||
_response.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package es.verdnatura.presentation.view.feature.ubicador.adapter
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.provider.Settings.Global.getString
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
|
@ -38,6 +39,7 @@ class UbicadorAdapter (
|
|||
val binding: ItemUbicationRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root){
|
||||
private val res = binding.root.context.resources
|
||||
@SuppressLint("SetTextI18n")
|
||||
fun bind(item: ItemUbicadorVO) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
|
|
|
@ -180,7 +180,7 @@ class UbicadorFragment(
|
|||
binding.automaticImg.setOnClickListener {
|
||||
if (!shelvingFk.isNullOrEmpty())
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = "Automatic"),
|
||||
PasillerosItemVO(title = getString(R.string.titleAuto)),
|
||||
entryPoint = shelvingFk
|
||||
)
|
||||
else
|
||||
|
@ -376,13 +376,10 @@ class UbicadorFragment(
|
|||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, it.isError, false)
|
||||
|
||||
/* mperror!!.start()
|
||||
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
}else{
|
||||
ma.messageWithSound(getString(R.string.Aparcado), it.isError, true)
|
||||
ma.messageWithSound("", it.isError, true)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -507,7 +504,6 @@ class UbicadorFragment(
|
|||
packing,
|
||||
getData(WAREHOUSEFK),
|
||||
"1",
|
||||
"itemShelvingMake",
|
||||
groupingPack
|
||||
)
|
||||
changeOfflineValue(
|
||||
|
@ -535,7 +531,6 @@ class UbicadorFragment(
|
|||
packing,
|
||||
getData(WAREHOUSEFK),
|
||||
"1",
|
||||
"itemShelvingMake",
|
||||
groupingPack
|
||||
)
|
||||
changeOfflineValue(
|
||||
|
|
|
@ -134,7 +134,6 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
|||
packing: String,
|
||||
warehouse: String,
|
||||
level: String,
|
||||
callFunction: String,
|
||||
grouping: String
|
||||
) {
|
||||
getUbicadorUserCase.itemShelvingMake(
|
||||
|
@ -273,7 +272,7 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
@ -338,7 +337,7 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (response.body() == null) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
|
|
@ -188,7 +188,7 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
|
||||
responseAddMistake.observe(viewLifecycleOwner, {
|
||||
|
||||
ma.messageWithSound(it.errorMessage,it.isError,true)
|
||||
ma.messageWithSound(if (it.isError){it.errorMessage}else{getString(R.string.errorCauseRegistered)},it.isError,true, isToasted = true)
|
||||
|
||||
})
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Faltas"
|
||||
android:text="@string/fault"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1"
|
||||
|
|
|
@ -26,25 +26,20 @@
|
|||
android:orientation="vertical" >
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textinputlayout_scan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:layout_marginTop="@dimen/toolbar_height">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/scan_input"
|
||||
style="@style/ScanLineTextSearch"
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:hint="@string/Escaneaetiqueta"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:textColorHint="@color/verdnatura_white"
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -124,7 +119,7 @@
|
|||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
' <include
|
||||
<include
|
||||
android:id="@+id/main_toolbar"
|
||||
layout="@layout/toolbar_fragment"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -8,30 +8,25 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="@color/verdnatura_black">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/scan"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/scan_input"
|
||||
style="@style/InputLineTextSearch"
|
||||
style="@style/ScanLineTextSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:backgroundTint="@android:color/white"
|
||||
android:hint="@string/Escaneaetiqueta"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:textColorHint="@color/verdnatura_white"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/>
|
||||
|
||||
|
||||
' <include
|
||||
|
||||
<include
|
||||
android:id="@+id/main_toolbar"
|
||||
layout="@layout/toolbar_fragment"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
<string name="Borrardatosdeacceso">Borrar datos de acceso</string>
|
||||
<string name="Bienvenido">Bienvenido</string>
|
||||
<string name="Recordarusuarioycontraseña">Recordar usuario y contraseña</string>
|
||||
<string name="Faltas">Faltas</string>
|
||||
<string name="Versión">Versión</string>
|
||||
<string name="Usuario">Usuario</string>
|
||||
<string name="Escaneaetiqueta">Escanear etiqueta</string>
|
||||
|
@ -47,15 +46,12 @@
|
|||
<string name="Noexistessectores">No existes sectores.</string>
|
||||
<string name="Seleccionaunsector">Selecciona un sector</string>
|
||||
<string name="Pasilleros">Pasilleros</string>
|
||||
<string name="Sacadores">Sacadores</string>
|
||||
<string name="Controladores">Controladores</string>
|
||||
<string name="Paletizadores">Paletizadores</string>
|
||||
<string name="Ajustes">Ajustes</string>
|
||||
<string name="PreSacador">Pre Sacador</string>
|
||||
<string name="ConsultarArticulo">Consultar artículo</string>
|
||||
<string name="titleItemConsult">Consultar artículo</string>
|
||||
<string name="BuscarItem">Buscar Item</string>
|
||||
<string name="Ubicador">Ubicador</string>
|
||||
<string name="Inventario">Inventario</string>
|
||||
<string name="titleUbicator">Ubicador</string>
|
||||
<string name="Disponible">Disponible</string>
|
||||
<string name="Ubicado">Ubicado</string>
|
||||
<string name="SINUBICAR">Sin ubicar</string>
|
||||
|
@ -72,13 +68,12 @@
|
|||
<string name="Artículo">Artículo</string>
|
||||
<string name="Cantidad">Cantidad</string>
|
||||
<string name="ArtículoparaTicket">Artículo para Ticket</string>
|
||||
<string name="Escaneaelcarroparaelitemseleccionado">Escanea el carro para el item seleccionado</string>
|
||||
<string name="scanWagonForItem">Escanea el carro para el item seleccionado</string>
|
||||
<string name="txtnuevacantidad">Indica la nueva cantidad y la acción que quieres realizar con el resto.</string>
|
||||
<string name="BasuraRechazar">Basura</string>
|
||||
<string name="Indicanuevacantidad">Indica nueva cantidad</string>
|
||||
<string name="Coleccióncompleta">Colección completa</string>
|
||||
<string name="Parking">Parking</string>
|
||||
<string name="ShelvingParking">Shelving Parking</string>
|
||||
<string name="Reject">Rechazar</string>
|
||||
<string name="updatemng">Existe una versión nueva, es recomendable actualizar.</string>
|
||||
<string name="Actualizar">Actualizar</string>
|
||||
|
@ -132,14 +127,9 @@
|
|||
<string name="ExpeditionState">Consultar estado expedición</string>
|
||||
<string name="BuffersManegement">Gestión de buffers</string>
|
||||
<string name="PalletMake">Paletizar</string>
|
||||
<string name="bufferempty">Vaciado buffer</string>
|
||||
<string name="bufferfill">Llenado buffer</string>
|
||||
<string name="bufferaccumulate">Acumulación buffer</string>
|
||||
<string name="bufferoff">Desactivado buffer</string>
|
||||
<string name="QrReader">Lector Qr</string>
|
||||
<string name="expedition">Expedición :</string>
|
||||
<string name="ArticleSimilar">Artículos similares</string>
|
||||
<string name="updatecritical">Se necesario actualizar la app para que funcione correctamente.</string>
|
||||
<string name="updatecritical">Es necesario actualizar la app para que funcione correctamente.</string>
|
||||
<string name="available">Disponible</string>
|
||||
<string name="minQuantity">Cantidad mín.</string>
|
||||
<string name="producer">Productor</string>
|
||||
|
@ -148,17 +138,16 @@
|
|||
<string name="dayofSale">Día de venta</string>
|
||||
<string name="wagon">Carro</string>
|
||||
<string name="Referencia">Referencia</string>
|
||||
<string name="precontrolprevious">Control Previa</string>
|
||||
<string name="itemShelvingLog">Historico de ítems del carro</string>
|
||||
<string name="shelvingLog">Histórico del carro</string>
|
||||
<string name="bufferload">Cargar expedición en buffer</string>
|
||||
<string name="bufferfstrapping">Flejado buffer</string>
|
||||
<string name="titleBufferload">Cargar expedición en buffer</string>
|
||||
<string name="titleBufferStrapping">Flejado buffer</string>
|
||||
<string name="Split">Split</string>
|
||||
<string name="workermistake">Fallo del trabajador</string>
|
||||
<string name="titleWorkerMistake">Fallo del trabajador</string>
|
||||
<string name="buscarDepartamento">Buscar departamento</string>
|
||||
<string name="Noprinters">No hay impresora</string>
|
||||
<string name="Selecccionaimpresoara">Selecciona impresora</string>
|
||||
<string name="claim">Ubicación de reclamación</string>
|
||||
<string name="titleClaimUbication">Ubicación de reclamación</string>
|
||||
<string name="claims">Reclamaciones</string>
|
||||
<string name="scanPallet">Escáner paletizar</string>
|
||||
<string name="operationSuccess">Realizado correctamente</string>
|
||||
|
@ -240,7 +229,7 @@
|
|||
<string name="scanLabelExpedition">Escanea etiqueta de la expedición.</string>
|
||||
<string name="buffer">Buffer:</string>
|
||||
<string name="packingSave">Packing guardado</string>
|
||||
<string name="previousCollected">Previa recogida</string>
|
||||
<string name="previousCollected">"\"Calidad\" "</string>
|
||||
<string name="disponibility">Disponibilidad</string>
|
||||
<string name="unmarkLine">Desmarcar línea</string>
|
||||
<string name="goUnmark">Vas a desmarcar la línea: </string>
|
||||
|
@ -276,7 +265,7 @@
|
|||
<string name="titleSearchSimilarItems">Buscar artículos similares</string>
|
||||
<string name="deleteStock">Indica la causa de eliminar stock:</string>
|
||||
<string name="quantityToRegister">Indica la cantidad a dar de alta</string>
|
||||
<string name="quantityToUnregister">\"Indica la cantidad a dar de baja \"</string>
|
||||
<string name="quantityToUnregister">"Indica la cantidad a dar de baja "</string>
|
||||
<string name="fault">Falta</string>
|
||||
<string name="trash">Basura</string>
|
||||
<string name="errorNotNumber">El elemento introducido no es un número</string>
|
||||
|
@ -305,7 +294,83 @@
|
|||
<string name="reviewCAllhistorical">Revisar llamada del registro de vehículos</string>
|
||||
<string name="takeVehicle">Coger vehículo</string>
|
||||
<string name="noVehicle">Sin vehículo</string>
|
||||
<string name="wagoonNoSaleToday">\"No hay nada vendido para el carro escaneado. \"</string>
|
||||
<string name="wagoonNoSaleToday">No hay nada vendido para el carro escaneado. </string>
|
||||
<string name="parkingOk">Parking ok</string>
|
||||
<string name="showParking">Escanea el parking</string>
|
||||
<string name="lineNotExist">La línea de compra de la etiqueta escaneada no existe.</string>
|
||||
<string name="pendingReview">Pendiente de revisar : </string>
|
||||
<string name="review">Revisar</string>
|
||||
<string name="splitSent">Se ha enviado a Split el articulo </string>
|
||||
<string name="fromTicket"> del ticket </string>
|
||||
<string name="itemAdded">"Se ha añadido el articulo "</string>
|
||||
<string name="unityTicket"> unidad/es al ticket </string>
|
||||
<string name="with">" con "</string>
|
||||
<string name="quantityHigh">La cantidad supera a la disponible</string>
|
||||
<string name="quantityError">cantidad introducida erronea</string>
|
||||
<string name="scanItemValidate">Escanea item para validar</string>
|
||||
<string name="quantitySelect">Cantidad que coges:</string>
|
||||
<string name="errorMarkLine">Error al marcar la línea</string>
|
||||
<string name="printError">Error al imprimir</string>
|
||||
<string name="shlevesNumber">Número de baldas del ticket</string>
|
||||
<string name="shlevesNumberTicket">Indica el número de baldas que ocupa el ticket</string>
|
||||
<string name="packetNumberShelves">Número de paquetes en balda</string>
|
||||
<string name="packetIndicate">Indica el número de paquetes que caben en una balda</string>
|
||||
<string name="test">Comprobar</string>
|
||||
<string name="expeditionsError">No ha escaneado expediciones</string>
|
||||
<string name="expeditionNoSorter">Escanea expediciones que no han pasado por el Sorter</string>
|
||||
<string name="added">Añadida</string>
|
||||
<string name="registerAdded">Registro añadido</string>
|
||||
<string name="keepPlate">" guardada con matrícula "</string>
|
||||
<string name="splitOk">Split ok</string>
|
||||
<string name="user">Usuario:</string>
|
||||
<string name="warning">Aviso</string>
|
||||
<string name="rocketKO">Error al enviar mensaje rocket.</string>
|
||||
<string name="historical">HISTÓRICO</string>
|
||||
<string name="titleSmarttagPickerAssociate">Asociar Sacador SmartTags</string>
|
||||
<string name="titleSmarttagsRegister">Registrar SmartTags</string>
|
||||
<string name="titlePalletizar">Paletizar</string>
|
||||
<string name="titleScanExpedition">Escanear expedición</string>
|
||||
<string name="titleBufferManegement">Gestión de buffers</string>
|
||||
<string name="titleClaims">Reclamaciones</string>
|
||||
<string name="titleUserControlVehicle">Control de usuario de vehículo</string>
|
||||
<string name="titlePrePicker">Pre Sacador</string>
|
||||
<string name="titleDayOfSale">Día de venta</string>
|
||||
<string name="titleShowTicket">Ver Ticket</string>
|
||||
<string name="titleHistoricalVehicle">Historial del vehículo</string>
|
||||
<string name="titleReplacement">Reposición</string>
|
||||
<string name="titleInventory">Inventario</string>
|
||||
<string name="titleFaults">Faltas</string>
|
||||
<string name="titleShelvingParking">Shelving Parking</string>
|
||||
<string name="titleAuto">Automatic</string>
|
||||
<string name="titleQuality">Origen</string>
|
||||
<string name="titlePickers">Sacadores</string>
|
||||
<string name="titleWebViewer">Visor web</string>
|
||||
<string name="titleBufferEmpty">Vaciado buffer</string>
|
||||
<string name="titleBufferFill">Llenado buffer</string>
|
||||
<string name="titleBufferAccumulate">Acumulación buffer</string>
|
||||
<string name="titleQrReader">Lector Qr</string>
|
||||
<string name="titleBufferOff">Desactivado buffer</string>
|
||||
<string name="titlePreControl">Pre Control</string>
|
||||
<string name="titleShelvingHistorical">Histórico Shelving</string>
|
||||
<string name="titleLogShelving">Log Shelving</string>
|
||||
<string name="itemScanetNotFound">Elemento escaneado no encontrado: </string>
|
||||
<string name="NotOrderReplacement">No existen pedidos para reponer</string>
|
||||
<string name="orderCompleted">Pedido completado</string>
|
||||
<string name="shelvingSure">Asegúrate de escanear una matrícula.</string>
|
||||
<string name="highLabel">Etiqueta superior:</string>
|
||||
<string name="midLabel">Etiqueta del medio:</string>
|
||||
<string name="lowLabel">Etiqueta inferior:</string>
|
||||
<string name="newCreated">Nuevo</string>
|
||||
<string name="collectionPending">La siguiente colección sigue pendiente de preparar: </string>
|
||||
<string name="answer">La respuesta es: </string>
|
||||
<string name="previousOK">Previa OK</string>
|
||||
<string name="scanTicketsForAdd">Colección sin tickets. Escanea tickets para añadirlos</string>
|
||||
<string name="pallet">"Pallet "</string>
|
||||
<string name="expeditionP">Expedition (</string>
|
||||
<string name="sureCloseSession">¿Estás seguro de cerrar la sesión?</string>
|
||||
<string name="errorCauseRegistered">Causa del error registada</string>
|
||||
<string name="itemPoints">"Artículo: "</string>
|
||||
<string name="originalQuantity">"Cantidad original: "</string>
|
||||
<string name="noSIP">No se puede realizar la llamada. El usuario no tiene la extensión configurada. Solicítelo a informática.</string>
|
||||
<string name="titleHistoricalHide">Historico Vehículo</string>
|
||||
</resources>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
<string name="Borrardatosdeacceso">Clear access data</string>
|
||||
<string name="Bienvenido">Welcome</string>
|
||||
<string name="Recordarusuarioycontraseña">Remember username and password</string>
|
||||
<string name="Faltas">Fouls</string>
|
||||
<string name="titleFaults">Fouls</string>
|
||||
<string name="Versión">Version</string>
|
||||
<string name="Usuario">User</string>
|
||||
<string name="Escaneaetiqueta">Scan label</string>
|
||||
|
@ -48,15 +48,11 @@
|
|||
<string name="Seleccionaunsector">Select a sector</string>
|
||||
<string name="Selecccionaimpresoara">Select a printer</string>
|
||||
<string name="Pasilleros">Corridors</string>
|
||||
<string name="Sacadores">Punch</string>
|
||||
<string name="Controladores">Controller</string>
|
||||
<string name="Paletizadores">Palletizers</string>
|
||||
<string name="Ajustes">Setting</string>
|
||||
<string name="PreSacador">Pre Punch</string>
|
||||
<string name="ConsultarArticulo">Consult Article</string>
|
||||
<string name="BuscarItem">Search item</string>
|
||||
<string name="Ubicador">Locator</string>
|
||||
<string name="Inventario">Inventory</string>
|
||||
<string name="titleInventory">Inventory</string>
|
||||
<string name="Disponible">Available</string>
|
||||
<string name="Ubicado">Located</string>
|
||||
<string name="SINUBICAR">Unlocated</string>
|
||||
|
@ -73,13 +69,12 @@
|
|||
<string name="Artículo">Article</string>
|
||||
<string name="Cantidad">Quantity</string>
|
||||
<string name="ArtículoparaTicket">Ticket Item</string>
|
||||
<string name="Escaneaelcarroparaelitemseleccionado">Scan the cart for the selected item</string>
|
||||
<string name="txtnuevacantidad">Indicate the new quantity and the action you want to take with the rest.</string>
|
||||
<string name="BasuraRechazar">Garbage</string>
|
||||
<string name="Indicanuevacantidad">Indicates new quantity</string>
|
||||
<string name="Coleccióncompleta">Complete collection</string>
|
||||
<string name="Parking">Parking</string>
|
||||
<string name="ShelvingParking">Shelving Parking</string>
|
||||
<string name="titleShelvingParking">Shelving Parking</string>
|
||||
<string name="Reject">Reject</string>
|
||||
<string name="updatemng">There is a new version, it is recommended to update.</string>
|
||||
<string name="Actualizar">Update</string>
|
||||
|
@ -102,7 +97,7 @@
|
|||
<string name="Packing">Packing</string>
|
||||
<string name="Barcode">Barcode</string>
|
||||
<string name="tipodeencajado">Tipo de encajado</string>
|
||||
<string name="total">Total</string>
|
||||
<string name="total">Total:</string>
|
||||
<string name="mensajeseleccionencajado">Select packing type zone :</string>
|
||||
<string name="itemdiary">Item diary</string>
|
||||
<string name="getcollection">Get collection</string>
|
||||
|
@ -130,15 +125,15 @@
|
|||
<string name="deviceName">Device name :</string>
|
||||
<string name="assigned_user">User assigned to device name</string>
|
||||
<string name="ScanPlateOrSmarttag">Scan plate or smartag</string>
|
||||
<string name="ExpeditionState">Expedtion state</string>
|
||||
<string name="ExpeditionState">Expedition state</string>
|
||||
<string name="BuffersManegement">Buffer Management</string>
|
||||
<string name="PalletMake">Pallet make</string>
|
||||
<string name="scanPallet">Scan pallet</string>
|
||||
<string name="bufferempty">Buffer empty</string>
|
||||
<string name="bufferfill">Buffer fill</string>
|
||||
<string name="bufferaccumulate">Buffer Acumulate</string>
|
||||
<string name="bufferoff">Buffer off</string>
|
||||
<string name="QrReader">Qr Reader</string>
|
||||
<string name="titleBufferEmpty">Buffer empty</string>
|
||||
<string name="titleBufferFill">Buffer fill</string>
|
||||
<string name="titleBufferAccumulate">Buffer Acumulate</string>
|
||||
<string name="titleBufferOff">Buffer off</string>
|
||||
<string name="titleQrReader">Qr Reader</string>
|
||||
<string name="expedition">Expedition :</string>
|
||||
<string name="ArticleSimilar">Similar Articles</string>
|
||||
<string name="updatecritical">It needs to be updated for it to work properly</string>
|
||||
|
@ -150,15 +145,14 @@
|
|||
<string name="dayofSale">Day of sale</string>
|
||||
<string name="wagon">Wagon</string>
|
||||
<string name="Referencia">Reference</string>
|
||||
<string name="precontrolprevious">Control previous</string>
|
||||
<string name="itemShelvingLog">Item Log</string>
|
||||
<string name="shelvingLog">Shelving Log</string>
|
||||
<string name="bufferload">Load buffer</string>
|
||||
<string name="bufferfstrapping">Buffer strapping</string>
|
||||
<string name="titleBufferload">Load buffer</string>
|
||||
<string name="titleBufferStrapping">Buffer strapping</string>
|
||||
<string name="Split">Split</string>
|
||||
<string name="workermistake">Worker mistaker</string>
|
||||
<string name="titleWorkerMistake">Worker mistaker</string>
|
||||
<string name="buscarDepartamento">Find department</string>
|
||||
<string name="claim">Claim Ubication</string>
|
||||
<string name="titleClaimUbication">Claim Ubication</string>
|
||||
<string name="claims">Claims</string>
|
||||
<string name="operationSuccess"> done successful</string>
|
||||
<string name="settings">Settings</string>
|
||||
|
@ -269,13 +263,13 @@
|
|||
<string name="quantityReal">Cantidad real(</string>
|
||||
<string name="pull">Tirar</string>
|
||||
<string name="titleItemSearch">Buscar item</string>
|
||||
<string name="titleHistorical">Historico</string>
|
||||
<string name="titleHistorical">Histórico</string>
|
||||
<string name="titleSimilarItems">Artículos similares</string>
|
||||
<string name="currentVAlue">\"Valor actual: \"</string>
|
||||
<string name="currentVAlue">"Valor actual: "</string>
|
||||
<string name="titleSearchSimilarItems">Buscar artículos similares</string>
|
||||
<string name="deleteStock">Indica la causa de eliminar stock:</string>
|
||||
<string name="quantityToRegister">Indica la cantidad a dar de alta</string>
|
||||
<string name="quantityToUnregister">\"Indica la cantidad a dar de baja \"</string>
|
||||
<string name="quantityToUnregister">"Indica la cantidad a dar de baja "</string>
|
||||
<string name="fault">Falta</string>
|
||||
<string name="trash">Basura</string>
|
||||
<string name="errorNotNumber">El elemento introducido no es un número</string>
|
||||
|
@ -304,9 +298,80 @@
|
|||
<string name="reviewCAllhistorical">Revisar llamada del registro de vehículos</string>
|
||||
<string name="takeVehicle">Coger vehículo</string>
|
||||
<string name="noVehicle">Sin vehículo</string>
|
||||
<string name="wagoonNoSaleToday">\"No hay nada vendido para el carro escaneado. \"</string>
|
||||
<string name="parkingOk">Parking ok</string>
|
||||
<string name="wagoonNoSaleToday">No hay nada vendido para el carro escaneado. </string>
|
||||
<string name="parkingOk">Parking OK</string>
|
||||
<string name="showParking">Escanea el parking</string>
|
||||
<string name="lineNotExist">La línea de compra de la etiqueta escaneada no existe.</string>
|
||||
<string name="pendingReview">Pendiente de revisar : </string>
|
||||
<string name="review">Revisar</string>
|
||||
<string name="splitSent">Se ha enviado a Split el articulo </string>
|
||||
<string name="fromTicket">"del ticket "</string>
|
||||
<string name="itemAdded">Se ha añadido el articulo </string>
|
||||
<string name="unityTicket"> unidad/es al ticket </string>
|
||||
<string name="with">" con "</string>
|
||||
<string name="quantityHigh">La cantidad supera a la disponible</string>
|
||||
<string name="quantityError">cantidad introducida erronea</string>
|
||||
<string name="scanItemValidate">Escanea item para validar</string>
|
||||
<string name="quantitySelect">Cantidad que coges:</string>
|
||||
<string name="errorMarkLine">Error al marcar la linea</string>
|
||||
<string name="printError">Error al imprimir</string>
|
||||
<string name="shlevesNumber">Número de baldas del ticket</string>
|
||||
<string name="shlevesNumberTicket">Indica el número de baldas que ocupa el ticket</string>
|
||||
<string name="packetNumberShelves">Número de paquetes en balda</string>
|
||||
<string name="packetIndicate">Indica el número de paquetes que caben en una balda</string>
|
||||
<string name="test">Comprobar</string>
|
||||
<string name="expeditionsError">No ha escaneado expediciones</string>
|
||||
<string name="expeditionNoSorter">Escanea expediciones que no han pasado por el Sorter</string>
|
||||
<string name="added">Añadida</string>
|
||||
<string name="registerAdded">Registro añadido</string>
|
||||
<string name="keepPlate">" guardada con matrícula "</string>
|
||||
<string name="splitOk">Split OK</string>
|
||||
<string name="user">Usuario:</string>
|
||||
<string name="warning">Aviso</string>
|
||||
<string name="rocketKO">Error al enviar mensaje rocket.</string>
|
||||
<string name="historical">HISTÓRICO</string>
|
||||
<string name="titleSmarttagPickerAssociate">Asociar Sacador SmartTags</string>
|
||||
<string name="titleSmarttagsRegister">Registrar SmartTags</string>
|
||||
<string name="titlePalletizar">Paletizar</string>
|
||||
<string name="titleScanExpedition">Escanear expedición</string>
|
||||
<string name="titleBufferManegement">Gestión de buffers</string>
|
||||
<string name="titleClaims">Reclamaciones</string>
|
||||
<string name="titleUserControlVehicle">Control de usuario de vehículo</string>
|
||||
<string name="titlePrePicker">Pre Sacador</string>
|
||||
<string name="titleDayOfSale">Día de venta</string>
|
||||
<string name="titleShowTicket">Ver Ticket</string>
|
||||
<string name="titleHistoricalVehicle">Historial del vehículo</string>
|
||||
<string name="titleReplacement">Reposición</string>
|
||||
<string name="titleItemConsult">Consultar artículo</string>
|
||||
<string name="titleUbicator">Ubicator</string>
|
||||
<string name="titleAuto">Automatic</string>
|
||||
<string name="titleQuality">Quality</string>
|
||||
<string name="titleWebViewer">Visor web</string>
|
||||
<string name="titlePreControl">Pre Control</string>
|
||||
<string name="titleShelvingHistorical">Histórico Shelving</string>
|
||||
<string name="titleLogShelving">Log Shelving</string>
|
||||
<string name="titlePickers">Sacadores</string>
|
||||
<string name="itemScanetNotFound">Elemento escaneado no encontrado: </string>
|
||||
<string name="NotOrderReplacement">No existen pedidos para reponer</string>
|
||||
<string name="orderCompleted">Pedido completado</string>
|
||||
<string name="shelvingSure">Asegúrate de escanear una matrícula.</string>
|
||||
<string name="highLabel">Etiqueta superior:</string>
|
||||
<string name="midLabel">Etiqueta del medio:</string>
|
||||
<string name="lowLabel">Etiqueta inferior:</string>
|
||||
<string name="newCreated">Nuevo</string>
|
||||
<string name="collectionPending">La siguiente colección sigue pendiente de preparar: </string>
|
||||
<string name="scanWagonForItem">Scan wagoon for item selected</string>
|
||||
<string name="answer">La respuesta es: </string>
|
||||
<string name="previousOK">Previa OK</string>
|
||||
<string name="scanTicketsForAdd">Colección sin tickets. Escanea tickets para añadirlos</string>
|
||||
<string name="pallet">"Pallet "</string>
|
||||
<string name="expeditionP">Expedition (</string>
|
||||
<string name="sureCloseSession">¿Estás seguro de cerrar la sesión?</string>
|
||||
<string name="errorCauseRegistered">Causa del error registada</string>
|
||||
<string name="itemPoints">"Artículo: "</string>
|
||||
<string name="originalQuantity">"Cantidad original: "</string>
|
||||
<string name="noSIP">No se puede realizar la llamada. El usuario no tiene la extensión configurada. Solicítelo a informática.</string>
|
||||
<string name="titleHistoricalHide">Historico Vehículo</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue