Version 8.5.1Beta, strings, muestra previa y comentar smarttads
This commit is contained in:
parent
d1e834989f
commit
f3ab292c32
|
@ -13,8 +13,9 @@ android {
|
|||
applicationId "es.verdnatura"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode 121
|
||||
versionName = "8.5Beta"
|
||||
versionCode 122
|
||||
versionName = "8.5.1Beta"
|
||||
//versionName = "8.5Beta" //versionCode 121
|
||||
//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
|
||||
|
|
Binary file not shown.
|
@ -49,7 +49,7 @@ val viewModelModule = module {
|
|||
|
||||
// Pasilleros
|
||||
viewModel {
|
||||
PasilleroViewModel()
|
||||
PasilleroViewModel(androidContext())
|
||||
}
|
||||
//Pasilleros Dia de venta
|
||||
viewModel {
|
||||
|
|
|
@ -7,6 +7,7 @@ import retrofit2.Call
|
|||
|
||||
class GetPreSacadorUseCase(context: Context) : RestClient(context) {
|
||||
|
||||
|
||||
fun ticketToPrePrepare(
|
||||
usuario: String,
|
||||
password: String,
|
||||
|
@ -85,7 +86,7 @@ class GetPreSacadorUseCase(context: Context) : RestClient(context) {
|
|||
usuario: String,
|
||||
password: String,
|
||||
vSaleGroupFk: String,
|
||||
vSectorCollectionFk:String
|
||||
vSectorCollectionFk: String
|
||||
|
||||
): Call<Unit> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
|
@ -105,7 +106,7 @@ class GetPreSacadorUseCase(context: Context) : RestClient(context) {
|
|||
fun saleTracking_addPrevOK(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vSectorCollectionFk:String
|
||||
vSectorCollectionFk: String
|
||||
|
||||
): Call<Unit> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
|
@ -124,8 +125,8 @@ class GetPreSacadorUseCase(context: Context) : RestClient(context) {
|
|||
fun saleTracking_updateIsChecked(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vSaleFk:String,
|
||||
vIsChecked:String
|
||||
vSaleFk: String,
|
||||
vIsChecked: String
|
||||
|
||||
): Call<Unit> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
|
@ -151,7 +152,7 @@ class GetPreSacadorUseCase(context: Context) : RestClient(context) {
|
|||
usuario: String,
|
||||
password: String,
|
||||
sectorCollectionFK: String,
|
||||
vSectorFk:String
|
||||
vSectorFk: String
|
||||
|
||||
): Call<List<PreSacadorItemVO>> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
|
|
|
@ -51,15 +51,13 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
protected val TOKEN = "token"
|
||||
protected val SECTORDESCRIP = "sectordescrip"
|
||||
protected val SECTORFK = "sectorFk"
|
||||
|
||||
protected val PRINTERNAME= "printername"
|
||||
protected val PRINTERFK = "printerFk"
|
||||
|
||||
protected val WAREHOUSEFK = "warehouseFk"
|
||||
protected val RECORDAR = "recordar"
|
||||
protected val REMEMBER = "recordar"
|
||||
protected val ANDROID_ID = "ANDROID_ID"
|
||||
protected val DEVICENAME = "devicename"
|
||||
protected val VOZ = "voz"
|
||||
//protected val VOZ = "voz"
|
||||
//nuevo campo número carros ajustes y campos para guardar el buyerid y buyernickname
|
||||
protected val BUYER = "buyernickname"
|
||||
protected val BUYERID = "buyerid"
|
||||
|
@ -527,7 +525,7 @@ override fun onViewCreated(view: View, savedInstanceState: Bundle?)
|
|||
PASSWORD -> prefs.getString(PASSWORD, "").toString()
|
||||
SECTORFK->prefs.getInt(name, SECTORFKDEFAULT).toString()
|
||||
WAREHOUSEFK->prefs.getInt(name, ConstAndValues.WAREHOUSEFKDEFAULT).toString()
|
||||
VOZ->prefs.getString(name, "NO").toString()
|
||||
//VOZ->prefs.getString(name, "NO").toString()
|
||||
WAGON->prefs.getInt(name, 2).toString()
|
||||
TAGSTYPE-> prefs.getString(name, getString(R.string.stickers)).toString()
|
||||
SECTORDESCRIP->prefs.getString(name,getString(R.string.Sinsector)).toString()
|
||||
|
@ -568,12 +566,18 @@ override fun onViewCreated(view: View, savedInstanceState: Bundle?)
|
|||
editor.commit()
|
||||
}
|
||||
|
||||
fun removePrinter(){
|
||||
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
|
||||
val editor = prefs.edit()
|
||||
editor.remove(PRINTERFK).commit()
|
||||
editor.remove(PRINTERNAME).commit()
|
||||
|
||||
}
|
||||
fun saveData(name:String,value:String){
|
||||
|
||||
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
|
||||
val editor = prefs.edit()
|
||||
|
||||
// Log.d("VERDNATURA::","El name es "+name+":"+ "y el valor "+value)
|
||||
when (name) {
|
||||
|
||||
ANDROID_ID -> editor.putString(name, value)
|
||||
|
|
|
@ -7,43 +7,36 @@ import org.json.JSONObject
|
|||
abstract class BaseViewModel : ViewModel(), LifecycleObserver
|
||||
|
||||
|
||||
|
||||
fun nameofFunction(function: Any): String
|
||||
{
|
||||
fun nameofFunction(function: Any): String {
|
||||
// return Thread.currentThread().stackTrace[1].methodName
|
||||
try {
|
||||
return function.javaClass.enclosingMethod!!.name
|
||||
} catch (e: Exception){
|
||||
return "ActivityMain"
|
||||
}
|
||||
try {
|
||||
return function.javaClass.enclosingMethod!!.name
|
||||
} catch (e: Exception) {
|
||||
return "ActivityMain"
|
||||
}
|
||||
}
|
||||
|
||||
fun getMessageFromAllResponse(callFunction: String, ResponseMessage: String): String
|
||||
{
|
||||
fun getMessageFromAllResponse(callFunction: String, ResponseMessage: String): String {
|
||||
|
||||
var messageFromError: String
|
||||
var returnMessage: String
|
||||
val returnMessage: String
|
||||
|
||||
try
|
||||
{
|
||||
try {
|
||||
val answerError = JSONObject(ResponseMessage)
|
||||
messageFromError = answerError.get("Message").toString()
|
||||
} catch (e: Exception)
|
||||
{
|
||||
} catch (e: Exception) {
|
||||
messageFromError = ResponseMessage
|
||||
}
|
||||
|
||||
|
||||
//sergio:para personalizar los mensajes de respuesta según la llamada.
|
||||
when (callFunction)
|
||||
{
|
||||
"collection_getTickets" -> returnMessage ="No hay tickets para sacar. Llamada $callFunction."
|
||||
else ->
|
||||
{
|
||||
returnMessage = "Llamada $callFunction."
|
||||
when (callFunction) {
|
||||
//"collection_getTickets" -> returnMessage ="No hay tickets para sacar. Llamada $callFunction."
|
||||
else -> {
|
||||
returnMessage = "Callback: $callFunction."
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
return "$messageFromError.\r$returnMessage"
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@ package es.verdnatura.presentation.common
|
|||
class ResponseItemVO(
|
||||
var response: String = "",
|
||||
var isError: Boolean = false,
|
||||
var errorMessage: String = ""
|
||||
var errorMessage: String = "",
|
||||
var codeError:Int=0
|
||||
)
|
||||
|
||||
class ResponseItemMachineControl(
|
||||
|
|
|
@ -14,9 +14,10 @@ import java.text.SimpleDateFormat
|
|||
import java.util.*
|
||||
|
||||
|
||||
class CustomDialogHour(context: Context) : Dialog(context, R.style.DialogTheme) {
|
||||
class CustomDialogHour(context: Context) : Dialog(context, R.style.DialogTheme) {
|
||||
|
||||
private var binding: ComponentCustomHourBinding = ComponentCustomHourBinding.inflate(layoutInflater)
|
||||
private var binding: ComponentCustomHourBinding =
|
||||
ComponentCustomHourBinding.inflate(layoutInflater)
|
||||
|
||||
init {
|
||||
|
||||
|
@ -32,14 +33,14 @@ class CustomDialogHour(context: Context) : Dialog(context, R.style.DialogTheme)
|
|||
}
|
||||
|
||||
fun getDestinoValue(): String {
|
||||
// return custom_dialog_destino_value.text.toString()
|
||||
// return custom_dialog_destino_value.text.toString()
|
||||
return binding.customDialogDestinoValue.text.toString()
|
||||
}
|
||||
|
||||
fun setDestinoValue(value: String): CustomDialogHour {
|
||||
|
||||
binding.customDialogDestinoValue.setText(value)
|
||||
binding.customDialogDestinoValue.visibility=View.VISIBLE
|
||||
binding.customDialogDestinoValue.visibility = View.VISIBLE
|
||||
return this
|
||||
/*custom_dialog_destino_value.setText(value)
|
||||
custom_dialog_destino_value.visibility = View.VISIBLE
|
||||
|
@ -48,49 +49,55 @@ class CustomDialogHour(context: Context) : Dialog(context, R.style.DialogTheme)
|
|||
|
||||
|
||||
fun getHoraEditText(): TextInputEditText {
|
||||
return binding.customDialogHourValue
|
||||
//return custom_dialog_hour_value
|
||||
return binding.customDialogHourValue
|
||||
//return custom_dialog_hour_value
|
||||
}
|
||||
|
||||
fun getHoraValue(): String {
|
||||
return binding.customDialogHourValue.text.toString()
|
||||
//return custom_dialog_hour_value.text.toString()
|
||||
return binding.customDialogHourValue.text.toString()
|
||||
//return custom_dialog_hour_value.text.toString()
|
||||
}
|
||||
|
||||
@SuppressLint("SimpleDateFormat")
|
||||
fun setHoraValue(value: String): CustomDialogHour {
|
||||
|
||||
binding.customDialogHourValue.setText(value)
|
||||
binding.customDialogHourValue.visibility=View.VISIBLE
|
||||
binding.ibObtenerHora.setOnClickListener{
|
||||
binding.customDialogHourValue.setText(value)
|
||||
binding.customDialogHourValue.visibility = View.VISIBLE
|
||||
binding.ibObtenerHora.setOnClickListener {
|
||||
|
||||
}
|
||||
//custom_dialog_hour_value.setText(value)
|
||||
//custom_dialog_hour_value.visibility = View.VISIBLE
|
||||
// ib_obtener_hora.setOnClickListener {
|
||||
binding.ibObtenerHora.setOnClickListener{
|
||||
val cal = Calendar.getInstance()
|
||||
// ib_obtener_hora.setOnClickListener {
|
||||
binding.ibObtenerHora.setOnClickListener {
|
||||
val cal = Calendar.getInstance()
|
||||
val timeSetListener = TimePickerDialog.OnTimeSetListener { timePicker, hour, minute ->
|
||||
cal.set(Calendar.HOUR_OF_DAY, hour)
|
||||
cal.set(Calendar.MINUTE, minute)
|
||||
binding.customDialogHourValue.setText(SimpleDateFormat("HH:mm").format(cal.time))
|
||||
//custom_dialog_hour_value.setText(SimpleDateFormat("HH:mm").format(cal.time))
|
||||
binding.customDialogHourValue.setText(SimpleDateFormat(context.getString(R.string.timeFormat)).format(cal.time))
|
||||
//custom_dialog_hour_value.setText(SimpleDateFormat(getString(R.string.timeFormat)).format(cal.time))
|
||||
}
|
||||
TimePickerDialog(context, timeSetListener, cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE), true).show()
|
||||
TimePickerDialog(
|
||||
context,
|
||||
timeSetListener,
|
||||
cal.get(Calendar.HOUR_OF_DAY),
|
||||
cal.get(Calendar.MINUTE),
|
||||
true
|
||||
).show()
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
fun setTitle(title: String): CustomDialogHour {
|
||||
binding.customDialogTitle.visibility=View.VISIBLE
|
||||
binding.customDialogTitle.text=title
|
||||
// custom_dialog_title.visibility = View.VISIBLE
|
||||
binding.customDialogTitle.visibility = View.VISIBLE
|
||||
binding.customDialogTitle.text = title
|
||||
// custom_dialog_title.visibility = View.VISIBLE
|
||||
//custom_dialog_title.text = title
|
||||
return this
|
||||
}
|
||||
|
||||
fun setDescription(description: String): CustomDialogHour {
|
||||
binding.customDialogDescription.visibility=View.VISIBLE
|
||||
binding.customDialogDescription.visibility = View.VISIBLE
|
||||
binding.customDialogDescription.text = description
|
||||
|
||||
//custom_dialog_description.visibility = View.VISIBLE
|
||||
|
@ -99,13 +106,13 @@ class CustomDialogHour(context: Context) : Dialog(context, R.style.DialogTheme)
|
|||
}
|
||||
|
||||
fun setOkButton(text: String, onButtonClicked: () -> Unit): CustomDialogHour {
|
||||
binding.customDialogButtonOk.visibility=View.VISIBLE
|
||||
binding.customDialogButtonOk.text=text
|
||||
binding.customDialogButtonOk.visibility = View.VISIBLE
|
||||
binding.customDialogButtonOk.text = text
|
||||
|
||||
//custom_dialog_button_ok.visibility = View.VISIBLE
|
||||
// custom_dialog_button_ok.text = text
|
||||
// custom_dialog_button_ok.setOnClickListener { onButtonClicked() }
|
||||
binding.customDialogButtonOk.setOnClickListener{ onButtonClicked() }
|
||||
// custom_dialog_button_ok.text = text
|
||||
// custom_dialog_button_ok.setOnClickListener { onButtonClicked() }
|
||||
binding.customDialogButtonOk.setOnClickListener { onButtonClicked() }
|
||||
return this
|
||||
}
|
||||
|
||||
|
|
|
@ -129,7 +129,7 @@ class AjustesFragment :
|
|||
} else if (item.id == 3) {
|
||||
val listTagsType: ArrayList<String> = ArrayList()
|
||||
listTagsType.add(getString(R.string.stickers))
|
||||
listTagsType.add(getString(R.string.smarttags))
|
||||
// listTagsType.add(getString(R.string.smarttags))
|
||||
tagsList = listTagsType
|
||||
val array = arrayOfNulls<String>(listTagsType.size)
|
||||
showItemPickerType(array = listTagsType.toArray(array))
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.content.Context
|
|||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.domain.GetAjustesUserCase
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
|
@ -19,6 +20,8 @@ import timber.log.Timber.d
|
|||
|
||||
|
||||
class AjustesViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
private val contextApp=context
|
||||
|
||||
private val getAjustesUserCase: GetAjustesUserCase = GetAjustesUserCase(context)
|
||||
val version: String = "5.0.0"
|
||||
|
@ -61,7 +64,7 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
|||
_ajustesitem.add(
|
||||
AjustesItemVO(
|
||||
0,
|
||||
"Sector",
|
||||
contextApp.getString(R.string.sector),
|
||||
sectorDescrip,
|
||||
sectorFk,
|
||||
warehouseFk,
|
||||
|
@ -74,17 +77,17 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
|||
_ajustesitem.add(
|
||||
AjustesItemVO(
|
||||
1,
|
||||
"Carros",
|
||||
contextApp.getString(R.string.wagoons),
|
||||
carroDescrip,
|
||||
0,
|
||||
0,
|
||||
0, "Sin impresora"
|
||||
0, contextApp.getString(R.string.printerWithout)
|
||||
)
|
||||
)
|
||||
_ajustesitem.add(
|
||||
AjustesItemVO(
|
||||
2,
|
||||
"Impresora etiquetas",
|
||||
contextApp.getString(R.string.printerLabel),
|
||||
printerSelected,
|
||||
0,
|
||||
0,
|
||||
|
@ -94,37 +97,37 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
|||
_ajustesitem.add(
|
||||
AjustesItemVO(
|
||||
3,
|
||||
"Tipo etiqueta",
|
||||
contextApp.getString(R.string.labelType),
|
||||
TypeTags,
|
||||
0,
|
||||
0,
|
||||
0, "Sin impresora"
|
||||
0, contextApp.getString(R.string.printerWithout)
|
||||
)
|
||||
)
|
||||
_ajustesitem.add(
|
||||
AjustesItemVO(
|
||||
4,
|
||||
"Control de vehículos",
|
||||
contextApp.getString(R.string.vehicleControl),
|
||||
"",
|
||||
0,
|
||||
0,
|
||||
0, "Sin impresora"
|
||||
0, contextApp.getString(R.string.printerWithout)
|
||||
)
|
||||
)
|
||||
_ajustesitem.add(
|
||||
AjustesItemVO(
|
||||
5,
|
||||
"Cerrar Sesión",
|
||||
contextApp.getString(R.string.closeSession),
|
||||
"",
|
||||
0,
|
||||
0,
|
||||
0, "Sin impresora"
|
||||
0, contextApp.getString(R.string.printerWithout)
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
fun getSectors(user: String, password: String) {
|
||||
/* fun getSectors(user: String, password: String) {
|
||||
getAjustesUserCase.getSectors(user, password)
|
||||
.enqueue(object : Callback<List<SectorItemVO>> {
|
||||
override fun onFailure(call: Call<List<SectorItemVO>>, t: Throwable) {
|
||||
|
@ -155,7 +158,7 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
fun getSectorsSalix(token: String) {
|
||||
getAjustesUserCase.getSectorsSalix(token).enqueue(object : Callback<List<SectorItemVO>> {
|
||||
|
@ -221,7 +224,7 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
fun worker_updateSector(user: String, password: String, sectorFk: String) {
|
||||
d("El sector marcado dentro es %s", sectorFk)
|
||||
|
||||
getAjustesUserCase.worker_updateSector(user, password, sectorFk)
|
||||
.enqueue(object : Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
|
|
|
@ -175,8 +175,8 @@ class ItemCardFragment(
|
|||
binding.itemcardImage.setOnClickListener {
|
||||
|
||||
val i = Intent(activity, ImageViewActivity::class.java)
|
||||
i.putExtra("url", urlLarge)
|
||||
i.putExtra("title", titleImage)
|
||||
i.putExtra(getString(R.string.url), urlLarge)
|
||||
i.putExtra(getString(R.string.title), titleImage)
|
||||
startActivity(i)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -481,7 +481,7 @@ class CollectionFragment(
|
|||
// if (!goBack) {
|
||||
if (it.isError) {
|
||||
customDialog.setTitle(getString(R.string.disponibility))
|
||||
.setDescription(it.errorMessage)
|
||||
.setDescription(getString(R.string.errorCollectionNew)+it.errorMessage)
|
||||
.setKoButton(getString(R.string.close)) {
|
||||
scanRequest()
|
||||
customDialog.dismiss()
|
||||
|
@ -2139,7 +2139,7 @@ class CollectionFragment(
|
|||
val ticket =
|
||||
"[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + " del articulo " + sales[position].itemFk + " ticket " + ticket
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + getString(R.string.fromItem) + sales[position].itemFk + " ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = token,
|
||||
workerId = sales[position].salePersonFk,
|
||||
|
@ -2175,7 +2175,7 @@ class CollectionFragment(
|
|||
val ticket =
|
||||
"[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Basura " + totalQuantity + " del articulo " + sales[position].itemFk + " ticket " + ticket
|
||||
"Se ha enviado a Basura " + totalQuantity + getString(R.string.fromItem) + sales[position].itemFk + " ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = token,
|
||||
workerId = sales[position].salePersonFk,
|
||||
|
@ -2250,12 +2250,12 @@ class CollectionFragment(
|
|||
|
||||
"TRUE" -> {
|
||||
message =
|
||||
"Se ha enviado a Basura " + totalQuantity + " del articulo " + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
"Se ha enviado a Basura " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
|
||||
}
|
||||
"FALSE" -> {
|
||||
message =
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + " del articulo " + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
|
||||
}
|
||||
"reject" -> {
|
||||
|
|
|
@ -22,7 +22,9 @@ import retrofit2.Response
|
|||
|
||||
class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
val emptyMessage = context.getString(R.string.collectionNoTickets)
|
||||
// val emptyMessage = context.getString(R.string.collectionNoTickets)
|
||||
|
||||
private val contextApp=context
|
||||
|
||||
private val getSacadorControladorUserCase: GetSacadorControladorUserCase =
|
||||
GetSacadorControladorUserCase(context)
|
||||
|
@ -148,7 +150,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<CollectionVO>
|
||||
) {
|
||||
if (response.body() != null) {
|
||||
_collectionTicketList.value = response.body()?.let { it.map() }
|
||||
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
|
||||
} else {
|
||||
_collectionTicketList.value = CollectionVO(
|
||||
isError = true,
|
||||
|
|
|
@ -66,7 +66,7 @@ class CollectionShowTicketFragment(
|
|||
|
||||
override fun init() {
|
||||
customDialog = CustomDialog(requireContext())
|
||||
ma.hideBottomNavigation(GONE)
|
||||
//84ma.hideBottomNavigation(GONE)
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
setEvents()
|
||||
setToolBarIcon()
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package es.verdnatura.presentation.view.feature.collection.mapper
|
||||
|
||||
import android.util.Log
|
||||
import android.content.Context
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.presentation.common.convertToDateString
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
|
||||
fun CollectionVO.map(): CollectionVO {
|
||||
fun CollectionVO.map(context: Context): CollectionVO {
|
||||
try {
|
||||
|
||||
|
||||
|
@ -57,7 +58,7 @@ fun CollectionVO.map(): CollectionVO {
|
|||
}
|
||||
}
|
||||
placement.created =
|
||||
getCalendarFromDate(placement.created).convertToDateString()
|
||||
getCalendarFromDate(placement.created,context).convertToDateString()
|
||||
placement.visible =
|
||||
"(" + (if (placement.visible.toInt() > 0) placement.visible else "0") + ")"
|
||||
}
|
||||
|
@ -70,19 +71,19 @@ fun CollectionVO.map(): CollectionVO {
|
|||
} catch (e: Exception) {
|
||||
this.isError = true
|
||||
if (this.tickets == null || this.tickets.isEmpty()) {
|
||||
this.errorMessage = "La colección no tiene tickets"
|
||||
this.errorMessage = context.getString(R.string.collectionNoTickets)
|
||||
} else {
|
||||
|
||||
this.errorMessage =
|
||||
"Error al construir la colección. Descripción del error:" + e.message.toString()
|
||||
context.getString(R.string.collectionErrorBuilding) + e.message.toString()
|
||||
}
|
||||
|
||||
}
|
||||
return this
|
||||
}
|
||||
|
||||
private fun getCalendarFromDate(date: String): Calendar {
|
||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||
private fun getCalendarFromDate(date: String,context:Context): Calendar {
|
||||
val sdf = SimpleDateFormat(context.getString(R.string.dateFormat))
|
||||
val cal = Calendar.getInstance()
|
||||
cal.setTime(sdf.parse(date))
|
||||
return cal
|
||||
|
|
|
@ -16,6 +16,7 @@ import retrofit2.Response
|
|||
|
||||
class ControladorViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
private val contextApp=context
|
||||
private val _collectionTicketList by lazy { MutableLiveData<CollectionVO>() }
|
||||
private val getSacadorControladorUserCase: GetSacadorControladorUserCase = GetSacadorControladorUserCase(context)
|
||||
|
||||
|
@ -39,7 +40,7 @@ class ControladorViewModel(context: Context) : BaseViewModel() {
|
|||
) {
|
||||
if (response.body() != null){
|
||||
|
||||
_collectionTicketList.value = response.body()?.let { it.map()
|
||||
_collectionTicketList.value = response.body()?.let { it.map(contextApp)
|
||||
}
|
||||
/* response.body()?.let {
|
||||
Log.d("VERDNTURA::","el itempacking es "+it.tickets.get(0).itemPackingTypeFk)
|
||||
|
|
|
@ -43,7 +43,7 @@ class WebFragment(
|
|||
webSettings.builtInZoomControls = true
|
||||
webSettings.displayZoomControls = false
|
||||
webSettings.setSupportZoom(true)
|
||||
webSettings.defaultTextEncodingName = "utf-8"
|
||||
//webSettings.defaultTextEncodingName = "utf-8"
|
||||
|
||||
|
||||
binding.webView.loadUrl ("https://salix.verdnatura.es/#!/item/$entryPoint/summary")
|
||||
|
|
|
@ -11,8 +11,8 @@ class ImageViewActivity : BaseActivity<ActivityImageviewBinding>(){
|
|||
|
||||
|
||||
override fun init() {
|
||||
binding.mainToolbar.toolbarTitle.text = intent.getStringExtra("title")
|
||||
binding.imgView.loadUrl(intent.getStringExtra("url")!!)
|
||||
binding.mainToolbar.toolbarTitle.text = intent.getStringExtra(getString(R.string.title))
|
||||
binding.imgView.loadUrl(intent.getStringExtra(getString(R.string.url))!!)
|
||||
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
onBackPressed()
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.domain.GetInventaryUserCase
|
||||
import es.verdnatura.domain.GetItemCardUserCase
|
||||
import es.verdnatura.domain.GetWokerMistakeUSerCase
|
||||
|
@ -20,11 +21,9 @@ import es.verdnatura.presentation.view.feature.workermistake.model.*
|
|||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import timber.log.Timber.d
|
||||
|
||||
class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
|
||||
private val getInventaryUserCase: GetInventaryUserCase = GetInventaryUserCase(context)
|
||||
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
|
||||
private val getWorkerMistakeUserCase: GetWokerMistakeUSerCase = GetWokerMistakeUSerCase(context)
|
||||
|
@ -174,7 +173,6 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
//sergio: se modifica por CAU a itemTrash
|
||||
fun itemTrash(
|
||||
itemFk: String,
|
||||
|
@ -387,7 +385,6 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
.enqueue(object :
|
||||
Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
// d("Error message " + t.message)
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
|
@ -399,24 +396,16 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<Unit>
|
||||
) {
|
||||
if (!response.isSuccessful) {
|
||||
if (response.code() == 403) {
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
"Usuario sin permisos para realizar la acción"
|
||||
)
|
||||
)
|
||||
} else {
|
||||
//d("Error message:" + { response.errorBody() } + "-" + response.message() + "-" + response.raw())
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage =
|
||||
getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
}
|
||||
), codeError = response.code())
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
// sergio:refactor:solo debería haber un mensaje no un response o errorMessage
|
||||
|
|
|
@ -119,7 +119,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
|||
|
||||
private fun checkUser() {
|
||||
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
|
||||
if (prefs.getBoolean(RECORDAR, false)) {
|
||||
if (prefs.getBoolean(REMEMBER, false)) {
|
||||
binding.edittextUsername.setText(prefs.getString(USER, ""))
|
||||
binding.edittextPassword.setText(prefs.getString(PASSWORD, ""))
|
||||
if (binding.edittextPassword.text.toString().isNotEmpty()) {
|
||||
|
@ -297,8 +297,8 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
|||
//Log.d("VERDNATURA::",getString(R.string.error))
|
||||
} else {
|
||||
if (it.id != 0) {
|
||||
saveDataInt("sectorFk", it.id)
|
||||
saveData("sectordescrip", it.description)
|
||||
saveDataInt(SECTORFK, it.id)
|
||||
saveData(SECTORDESCRIP, it.description)
|
||||
it.warehouseFk?.let { it1 -> saveDataInt("warehouseFk", it1) }
|
||||
}
|
||||
}
|
||||
|
@ -311,6 +311,8 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
|||
|
||||
if (it.list.isEmpty()) {
|
||||
getString(R.string.selectPrinter).toast(context)
|
||||
removePrinter()
|
||||
|
||||
} else {
|
||||
if (!it.list.get(0).isError) {
|
||||
saveDataInt(PRINTERFK, it.list.get(0).id!!)
|
||||
|
@ -333,7 +335,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
|||
saveTokenPref("")
|
||||
customDialog.setTitle(getString(R.string.error))
|
||||
|
||||
.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})
|
||||
.setDescription(if (it.errorMessage.contains("Unauthorized")){getString(R.string.messageUserError)}else{it.errorMessage})
|
||||
.setOkButton(
|
||||
getString(R.string.accept)
|
||||
) {
|
||||
|
@ -393,7 +395,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
|||
private fun saveRemember(remember: Boolean) {
|
||||
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
|
||||
val editor = prefs.edit()
|
||||
editor.putBoolean(RECORDAR, remember)
|
||||
editor.putBoolean(REMEMBER, remember)
|
||||
editor.apply()
|
||||
}
|
||||
|
||||
|
|
|
@ -92,7 +92,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
setBottomMenuFragment()
|
||||
|
||||
if (haveSector() && havePrinter()) addFragment(
|
||||
PasilleroFragment.newInstance("Main", true),
|
||||
PasilleroFragment.newInstance(getString(R.string.main), true),
|
||||
R.id.main_frame_layout,
|
||||
PasilleroFragment.TAG,
|
||||
false
|
||||
|
@ -119,24 +119,6 @@ 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 havePrinter(): Boolean {
|
||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
|
@ -158,7 +140,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
bottomMenuItems.add(
|
||||
ItemMenuVO(
|
||||
0,
|
||||
title = getString(R.string.Pasilleros),
|
||||
title = getString(R.string.titleCorridors),
|
||||
defaultImage = ContextCompat.getDrawable(
|
||||
applicationContext, R.drawable.ic_init_ui
|
||||
),
|
||||
|
@ -243,11 +225,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
when (selectedItemMenu?.title) {
|
||||
|
||||
|
||||
getString(R.string.Pasilleros) -> {
|
||||
getString(R.string.titleCorridors) -> {
|
||||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
addFragment(
|
||||
PasilleroFragment.newInstance("Main", true),
|
||||
PasilleroFragment.newInstance(getString(R.string.main), true),
|
||||
R.id.main_frame_layout,
|
||||
PasilleroFragment.TAG,
|
||||
false
|
||||
|
@ -259,7 +241,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
addFragment(
|
||||
ShowTicketFragment.newInstance("Main"),
|
||||
ShowTicketFragment.newInstance(getString(R.string.main)),
|
||||
R.id.main_frame_layout,
|
||||
MAINACTIVITY.TAG,
|
||||
false
|
||||
|
@ -270,7 +252,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
addFragment(
|
||||
ParkingFragment.newInstance("Main"),
|
||||
ParkingFragment.newInstance(getString(R.string.main)),
|
||||
R.id.main_frame_layout,
|
||||
MAINACTIVITY.TAG,
|
||||
false
|
||||
|
@ -299,11 +281,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
when (it.title) {
|
||||
|
||||
getString(R.string.Pasilleros) -> {
|
||||
getString(R.string.titleCorridors) -> {
|
||||
fm.popBackStack(null, FragmentManager.POP_BACK_STACK_INCLUSIVE)
|
||||
delete_Fragments()
|
||||
addFragment(
|
||||
PasilleroFragment.newInstance("Main", true),
|
||||
PasilleroFragment.newInstance(getString(R.string.main), true),
|
||||
R.id.main_frame_layout,
|
||||
PasilleroFragment.TAG,
|
||||
false
|
||||
|
@ -346,31 +328,31 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
addFragmentOnTop(ExpeditionTruckListFragment.newInstance())
|
||||
}
|
||||
|
||||
getString(R.string.Paletizadores) -> {
|
||||
getString(R.string.titlePalletizers) -> {
|
||||
|
||||
addFragmentOnTop(
|
||||
PasilleroFragment.newInstance(
|
||||
getString(R.string.Paletizadores),
|
||||
getString(R.string.titlePalletizers),
|
||||
isInitMenu = false
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
}
|
||||
getString(R.string.Controladores) -> {
|
||||
getString(R.string.titleControllers) -> {
|
||||
addFragmentOnTop(ControladorFragment.newInstance())
|
||||
|
||||
|
||||
}
|
||||
|
||||
getString(R.string.Pasilleros) -> {
|
||||
getString(R.string.titleCorridors) -> {
|
||||
addFragmentOnTop(
|
||||
PasilleroFragment.newInstance(item.title, isInitMenu = false),
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
getString(R.string.ExpeditionState) -> {
|
||||
getString(R.string.titleExpeditionState) -> {
|
||||
// addFragment(ExpeditionStateFragment.newInstance(entryPoint),R.id.main_frame_layout, ExpeditionTruckListFragment.TAG,false)
|
||||
addFragmentOnTop(ExpeditionStateFragment.newInstance(item.title))
|
||||
}
|
||||
|
@ -400,15 +382,15 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
addFragmentOnTop(ControlVehiculoUsuarioFragment.newInstance(entryPoint))
|
||||
}
|
||||
|
||||
getString(R.string.titlePrePicker) -> {
|
||||
/* getString(R.string.titlePrePicker) -> {
|
||||
addFragmentOnTop(PreSacadorFragment.newInstance())
|
||||
}
|
||||
}*/
|
||||
getString(R.string.titleDayOfSale) -> {
|
||||
addFragmentOnTop(DayOfSaleFragment(item.title))
|
||||
}
|
||||
|
||||
getString(R.string.titleShowTicket) -> {
|
||||
addFragmentOnTop(ShowTicketFragment.newInstance(getString(R.string.Pasilleros)))
|
||||
addFragmentOnTop(ShowTicketFragment.newInstance(getString(R.string.titleCorridors)))
|
||||
}
|
||||
getString(R.string.titleHistoricalVehicle) -> {
|
||||
addFragmentOnTop(ControlVehiculoFragment.newInstance(HistoricoVehiculoFragment.TAG))
|
||||
|
@ -510,7 +492,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
}
|
||||
|
||||
getString(R.string.titlePrePicker) -> {
|
||||
addFragmentOnTop(InitPreSacadorFragment.newInstance(item.title))
|
||||
addFragmentOnTop(InitPreSacadorFragment.newInstance(getString(R.string.getPreviousCollection)))
|
||||
}
|
||||
|
||||
getString(R.string.titleClaimUbication) -> {
|
||||
|
@ -644,7 +626,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(getString(R.string.ExpeditionState)))
|
||||
addFragmentOnTop(ExpeditionStateFragment.newInstance(getString(R.string.titleExpeditionState)))
|
||||
|
||||
}
|
||||
|
||||
|
@ -658,7 +640,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
isError: Boolean,
|
||||
isPlayed: Boolean?,
|
||||
titleWithError: String = getString(R.string.error),
|
||||
isToasted: Boolean? = false
|
||||
isToasted: Boolean? = true
|
||||
) {
|
||||
|
||||
if (!isError) {
|
||||
|
|
|
@ -3,7 +3,6 @@ package es.verdnatura.presentation.view.feature.paletizador.fragment
|
|||
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
|
@ -15,33 +14,32 @@ import es.verdnatura.presentation.base.BaseFragment
|
|||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||
import es.verdnatura.presentation.common.OnPalletClickListener
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||
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.ExpeditionPalletViewAdapter
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletViewListVO
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class ExpeditionPalletDetailFragment(
|
||||
var itemExpeditionTruckVO: ItemExpeditionTruckVO? = null,
|
||||
var itemPallet: ItemPalletVO? = null
|
||||
) : BaseFragment<FragmentExpeditionPalletDetailBinding, ExpeditionPalletDetailViewModel>(
|
||||
ExpeditionPalletDetailViewModel::class) {
|
||||
ExpeditionPalletDetailViewModel::class
|
||||
) {
|
||||
|
||||
private var adapter : ExpeditionPalletViewAdapter? = null
|
||||
// private lateinit var customDialogList: CustomDialogList
|
||||
private var onPalletClickListener:OnPalletClickListener? = null
|
||||
private var adapter: ExpeditionPalletViewAdapter? = null
|
||||
|
||||
// private lateinit var customDialogList: CustomDialogList
|
||||
private var onPalletClickListener: OnPalletClickListener? = null
|
||||
|
||||
private lateinit var customDialog: CustomDialog
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(item: ItemExpeditionTruckVO,itemPallet: ItemPalletVO) =
|
||||
ExpeditionPalletDetailFragment(item,itemPallet)
|
||||
fun newInstance(item: ItemExpeditionTruckVO, itemPallet: ItemPalletVO) =
|
||||
ExpeditionPalletDetailFragment(item, itemPallet)
|
||||
}
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
|
@ -53,19 +51,22 @@ class ExpeditionPalletDetailFragment(
|
|||
|
||||
override fun init() {
|
||||
customDialog = CustomDialog(requireContext())
|
||||
binding.expeditionPalletDetailPallet.text = getString(R.string.pallet)+itemPallet!!.Pallet
|
||||
binding.expeditionPalletDetailPallet.text = getString(R.string.pallet) + itemPallet!!.Pallet
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.mainToolbar.toolbarTitle.text = getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + itemExpeditionTruckVO!!.Destino
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + itemExpeditionTruckVO!!.Destino
|
||||
|
||||
setToolBar()
|
||||
setEvents()
|
||||
viewModel.expeditionPallet_List(getData(USER),
|
||||
getData(PASSWORD),itemPallet!!.Pallet)
|
||||
viewModel.expeditionPallet_List(
|
||||
getData(USER),
|
||||
getData(PASSWORD), itemPallet!!.Pallet
|
||||
)
|
||||
super.init()
|
||||
}
|
||||
|
||||
private fun setEvents(){
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
|
@ -80,86 +81,110 @@ class ExpeditionPalletDetailFragment(
|
|||
}
|
||||
}
|
||||
|
||||
private fun setToolBar(){
|
||||
val listIcons:ArrayList<Drawable> = ArrayList()
|
||||
val iconReload : Drawable = resources.getDrawable(R.drawable.ic_autorenew_black_24dp,resources.newTheme())
|
||||
val iconEditar : Drawable = resources.getDrawable(R.drawable.ic_mode_edit_black_24dp,resources.newTheme())
|
||||
val iconBorrar : Drawable = resources.getDrawable(R.drawable.ic_delete_forever_black_24dp,resources.newTheme())
|
||||
val iconPrint : Drawable = resources.getDrawable(R.drawable.ic_print_black_24dp,resources.newTheme())
|
||||
private fun setToolBar() {
|
||||
val listIcons: ArrayList<Drawable> = ArrayList()
|
||||
val iconReload: Drawable =
|
||||
resources.getDrawable(R.drawable.ic_autorenew_black_24dp, resources.newTheme())
|
||||
val iconEditar: Drawable =
|
||||
resources.getDrawable(R.drawable.ic_mode_edit_black_24dp, resources.newTheme())
|
||||
val iconBorrar: Drawable =
|
||||
resources.getDrawable(R.drawable.ic_delete_forever_black_24dp, resources.newTheme())
|
||||
val iconPrint: Drawable =
|
||||
resources.getDrawable(R.drawable.ic_print_black_24dp, resources.newTheme())
|
||||
listIcons.add(iconEditar)
|
||||
listIcons.add(iconBorrar)
|
||||
listIcons.add(iconPrint)
|
||||
binding.mainToolbar.toolbarIcons.adapter = ToolBarAdapter(listIcons,object: OnOptionsSelectedListener {
|
||||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
if (item == iconReload){
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionPallet_List(getData(USER),
|
||||
getData(PASSWORD),itemPallet!!.Pallet)
|
||||
}else if(item == iconEditar){
|
||||
onPalletClickListener!!.onPalletClickListener(itemExpeditionTruckVO!!,itemPallet!!)
|
||||
}else if(item == iconBorrar){
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionPalletDel(getData(USER),
|
||||
getData(PASSWORD),itemPallet!!.Pallet)
|
||||
}else if(item == iconPrint){
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
||||
if (ma.havePrinter() && ma.haveSector()) {
|
||||
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(
|
||||
requireContext()
|
||||
)
|
||||
viewModel.expeditionPalletPrintSet(
|
||||
binding.mainToolbar.toolbarIcons.adapter =
|
||||
ToolBarAdapter(listIcons, object : OnOptionsSelectedListener {
|
||||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
if (item == iconReload) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionPallet_List(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
itemPallet!!.Pallet,
|
||||
getData(SECTORFK)
|
||||
getData(PASSWORD), itemPallet!!.Pallet
|
||||
)
|
||||
}else{
|
||||
ma.messageWithSound(getString(R.string.printerFault),isError = true,true,getString(R.string.printError),false)
|
||||
} else if (item == iconEditar) {
|
||||
onPalletClickListener!!.onPalletClickListener(
|
||||
itemExpeditionTruckVO!!,
|
||||
itemPallet!!
|
||||
)
|
||||
} else if (item == iconBorrar) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionPalletDel(
|
||||
getData(USER),
|
||||
getData(PASSWORD), itemPallet!!.Pallet
|
||||
)
|
||||
} else if (item == iconPrint) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
||||
if (ma.havePrinter() && ma.haveSector()) {
|
||||
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(
|
||||
requireContext()
|
||||
)
|
||||
viewModel.expeditionPalletPrintSet(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
itemPallet!!.Pallet,
|
||||
getData(SECTORFK)
|
||||
)
|
||||
} else {
|
||||
ma.messageWithSound(
|
||||
getString(R.string.printerFault),
|
||||
isError = true,
|
||||
true,
|
||||
getString(R.string.printError),
|
||||
false
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
binding.mainToolbar.toolbarIcons.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
})
|
||||
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
}
|
||||
|
||||
private fun getCURDATE(date:String):String{
|
||||
private fun getCURDATE(date: String): String {
|
||||
val c = Calendar.getInstance()
|
||||
val df = SimpleDateFormat("yyyy-mm-dd HH:mm")
|
||||
val df2 = SimpleDateFormat("HH:mm")
|
||||
val df = SimpleDateFormat(getString(R.string.dateCompleteFormat))
|
||||
val df2 = SimpleDateFormat(getString(R.string.timeFormat))
|
||||
c.time = df.parse(date)
|
||||
return df2.format(c.time)
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
with(viewModel){
|
||||
with(viewModel) {
|
||||
loadExpeditionPalletList.observe(viewLifecycleOwner, Observer { event ->
|
||||
event.getContentIfNotHandled().notNull {printExpeditionList(it) }
|
||||
event.getContentIfNotHandled().notNull { printExpeditionList(it) }
|
||||
})
|
||||
|
||||
response.observe(viewLifecycleOwner, Observer {
|
||||
if (it.isError){
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
}else{
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
} else {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
responsePrintPallet.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility=View.GONE
|
||||
if (it.isError){
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
}else{
|
||||
binding.splashProgress.visibility=View.VISIBLE
|
||||
viewModel.expeditionState_addByPallet( getData(USER),getData(PASSWORD),itemPallet!!.Pallet,"PALLETIZED")
|
||||
} else {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionState_addByPallet(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
itemPallet!!.Pallet,
|
||||
"PALLETIZED"
|
||||
)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
private fun printExpeditionList(it: ItemPalletViewListVO){
|
||||
private fun printExpeditionList(it: ItemPalletViewListVO) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
adapter = ExpeditionPalletViewAdapter(it.list)
|
||||
|
|
|
@ -112,8 +112,8 @@ class ExpeditionPalletFragment(
|
|||
|
||||
private fun getCURDATE(date:String):String{
|
||||
val c = Calendar.getInstance()
|
||||
val df = SimpleDateFormat("yyyy-mm-dd HH:mm")
|
||||
val df2 = SimpleDateFormat("HH:mm")
|
||||
val df = SimpleDateFormat(getString(R.string.dateCompleteFormat))
|
||||
val df2 = SimpleDateFormat(getString(R.string.timeFormat))
|
||||
c.time = df.parse(date)
|
||||
return df2.format(c.time)
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ class ExpeditionScanFragment (
|
|||
customDialog = CustomDialog(requireContext())
|
||||
customDialogList = CustomDialogList(requireContext())
|
||||
customDialogTwoButtons = CustomDialogTwoButtons(requireContext())
|
||||
binding.expeditionScanDetailPallet.text = "Pallet "+itemPalletVO!!.Pallet
|
||||
binding.expeditionScanDetailPallet.text = getString(R.string.pallet) + itemPalletVO!!.Pallet
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.mainToolbar.toolbarTitle.text = getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + itemExpeditionTruckVO!!.Destino
|
||||
|
@ -108,8 +108,8 @@ class ExpeditionScanFragment (
|
|||
|
||||
private fun getCURDATE(date:String):String{
|
||||
val c = Calendar.getInstance()
|
||||
val df = SimpleDateFormat("yyyy-mm-dd HH:mm")
|
||||
val df2 = SimpleDateFormat("HH:mm")
|
||||
val df = SimpleDateFormat(getString(R.string.dateCompleteFormat))
|
||||
val df2 = SimpleDateFormat(getString(R.string.timeFormat))
|
||||
c.time = df.parse(date)
|
||||
return df2.format(c.time)
|
||||
}
|
||||
|
@ -163,8 +163,8 @@ class ExpeditionScanFragment (
|
|||
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
adapter = ExpeditionScanAdapter(it.list,object: OnScanLongClickListener{
|
||||
override fun onScanLongClickListener(itemExpeditionScanVO: ItemExpeditionScanVO) {
|
||||
customDialogTwoButtons.setTitle("Ticket: "+itemExpeditionScanVO.Ticket+" Pallet: "+itemPalletVO!!.Pallet)
|
||||
.setDescription("Expedition: "+itemExpeditionScanVO!!.expeditionFk)
|
||||
customDialogTwoButtons.setTitle(getString(R.string.ticket)+itemExpeditionScanVO.Ticket+getString(R.string.pallet)+itemPalletVO!!.Pallet)
|
||||
.setDescription(getString(R.string.expedit)+itemExpeditionScanVO!!.expeditionFk)
|
||||
.setOkButton(getString(R.string.delete)){
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionScanDel(getData(USER),
|
||||
|
@ -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(getString(R.string.test)){
|
||||
customDialogList.setTitle(getString(R.string.pallet) + itemPalletVO!!.Pallet+" ("+binding.mainToolbar.toolbarTitle.text+")").setOkButton(getString(R.string.test)){
|
||||
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
|
@ -207,7 +207,8 @@ class ExpeditionScanFragment (
|
|||
ItemPalletVO(Pallet = it.list.get(0).palletFk)
|
||||
)
|
||||
}else{
|
||||
customDialog.setTitle(getString(R.string.info)).setDescription(getString(R.string.expeditionsError)).setOkButton("Ok"){
|
||||
customDialog.setTitle(getString(R.string.info)).setDescription(getString(R.string.expeditionsError)).setOkButton(getString(
|
||||
R.string.ok)){
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
}
|
||||
|
|
|
@ -15,40 +15,44 @@ import retrofit2.Response
|
|||
|
||||
class ExpeditionScanSorterViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
private val GetPaletizadoresUserCase: GetPaletizadoresUserCase = GetPaletizadoresUserCase(context)
|
||||
private val GetPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||
GetPaletizadoresUserCase(context)
|
||||
|
||||
private val _responsescan by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responsescan: LiveData<ResponseItemVO>
|
||||
get() = _responsescan
|
||||
|
||||
|
||||
fun expedition_scan(usuario:String,password:String,vExpeditionId:String){
|
||||
GetPaletizadoresUserCase.expedition_scan(usuario,password,vExpeditionId).enqueue(object : Callback<Void>{
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
fun expedition_scan(usuario: String, password: String, vExpeditionId: String) {
|
||||
GetPaletizadoresUserCase.expedition_scan(usuario, password, vExpeditionId)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
|
||||
_responsescan.value = messageError(getMessageFromAllResponse(nameofFunction(this),t.message!!),"expedition_scan")
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
if (!response.isSuccessful){
|
||||
_responsescan.value = messageError(response.message(),"expedition_scan")
|
||||
}else{
|
||||
_responsescan.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||
_responsescan.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
})
|
||||
if (!response.isSuccessful) {
|
||||
_responsescan.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
} else {
|
||||
_responsescan.value =
|
||||
ResponseItemVO(isError = false, response = response.message()!!)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
fun messageError(message: String,call: String ): ResponseItemVO {
|
||||
return ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = "Error en la llamada expedition_scan " + call + " . Descripción del error:" + message
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -18,9 +18,10 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
|
||||
class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
private val getPaletizadoresUserCase: GetPaletizadoresUserCase = GetPaletizadoresUserCase(context)
|
||||
private val getPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||
GetPaletizadoresUserCase(context)
|
||||
|
||||
private val _expeditionScanList by lazy { MutableLiveData<ItemExpeditionScanList>() }
|
||||
val loadExpeditionScanList = Transformations.map(_expeditionScanList) { Event(it) }
|
||||
|
@ -42,12 +43,17 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
|
|||
get() = _responseCheckexpeditionScanPut
|
||||
|
||||
|
||||
fun expeditionScanList(usuario:String,password:String,vPalletFk:String){
|
||||
getPaletizadoresUserCase.expeditionScanList(usuario,password,vPalletFk).enqueue(object :
|
||||
fun expeditionScanList(usuario: String, password: String, vPalletFk: String) {
|
||||
getPaletizadoresUserCase.expeditionScanList(usuario, password, vPalletFk).enqueue(object :
|
||||
Callback<List<ItemExpeditionScanVO>> {
|
||||
override fun onFailure(call: Call<List<ItemExpeditionScanVO>>, t: Throwable) {
|
||||
val listError:ArrayList<ItemExpeditionScanVO> = ArrayList()
|
||||
listError.add(ItemExpeditionScanVO(isError = true,errorMessage = t.message!!))
|
||||
val listError: ArrayList<ItemExpeditionScanVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemExpeditionScanVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
)
|
||||
_expeditionScanList.value = ItemExpeditionScanList(listError)
|
||||
}
|
||||
|
||||
|
@ -55,71 +61,128 @@ class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
|
|||
call: Call<List<ItemExpeditionScanVO>>,
|
||||
response: Response<List<ItemExpeditionScanVO>>
|
||||
) {
|
||||
if (response.body() != null){
|
||||
if (response.body() != null) {
|
||||
_expeditionScanList.value = response.body()?.let { ItemExpeditionScanList(it) }
|
||||
}else{
|
||||
val listError:ArrayList<ItemExpeditionScanVO> = ArrayList()
|
||||
listError.add(ItemExpeditionScanVO(isError = true,errorMessage = "Error en la llamada de expeditionScan_List"))
|
||||
} else {
|
||||
val listError: ArrayList<ItemExpeditionScanVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemExpeditionScanVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message())
|
||||
)
|
||||
)
|
||||
_expeditionScanList.value = ItemExpeditionScanList(listError)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
fun expeditionScanAdd(usuario:String,password:String,vPalletFk:String,vTruckFk:String){
|
||||
getPaletizadoresUserCase.expeditionScanAdd(usuario,password,vPalletFk,vTruckFk).enqueue(object :
|
||||
Callback<List<ItemScanVO>> {
|
||||
override fun onFailure(call: Call<List<ItemScanVO>>, t: Throwable) {
|
||||
val listError:ArrayList<ItemScanVO> = ArrayList()
|
||||
listError.add(ItemScanVO(isError = true,errorMessage ="Error en la llamada de expeditionScan_Add." + t.message!!))
|
||||
_scanList.value = ItemScanList(listError)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<ItemScanVO>>,
|
||||
response: Response<List<ItemScanVO>>
|
||||
) {
|
||||
if (response.body() != null){
|
||||
_scanList.value = response.body()?.let { ItemScanList(it) }
|
||||
}else{
|
||||
val listError:ArrayList<ItemScanVO> = ArrayList()
|
||||
listError.add(ItemScanVO(isError = true,errorMessage = "Error en la llamada de expeditionScan_Add"))
|
||||
fun expeditionScanAdd(usuario: String, password: String, vPalletFk: String, vTruckFk: String) {
|
||||
getPaletizadoresUserCase.expeditionScanAdd(usuario, password, vPalletFk, vTruckFk)
|
||||
.enqueue(object :
|
||||
Callback<List<ItemScanVO>> {
|
||||
override fun onFailure(call: Call<List<ItemScanVO>>, t: Throwable) {
|
||||
val listError: ArrayList<ItemScanVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemScanVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
)
|
||||
_scanList.value = ItemScanList(listError)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
override fun onResponse(
|
||||
call: Call<List<ItemScanVO>>,
|
||||
response: Response<List<ItemScanVO>>
|
||||
) {
|
||||
if (response.body() != null) {
|
||||
_scanList.value = response.body()?.let { ItemScanList(it) }
|
||||
} else {
|
||||
val listError: ArrayList<ItemScanVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemScanVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message())
|
||||
)
|
||||
)
|
||||
_scanList.value = ItemScanList(listError)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
fun expeditionScanPut(usuario:String,password:String,vPalletFk:String,vExpeditionFk:String){
|
||||
getPaletizadoresUserCase.expeditionScanPut(usuario,password,vPalletFk,vExpeditionFk).enqueue(object : Callback<Any>{
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),t.message!!)
|
||||
fun expeditionScanPut(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vPalletFk: String,
|
||||
vExpeditionFk: String
|
||||
) {
|
||||
getPaletizadoresUserCase.expeditionScanPut(usuario, password, vPalletFk, vExpeditionFk)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true, errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this), t.message!!
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()!!
|
||||
)
|
||||
)
|
||||
} else {
|
||||
_response.value =
|
||||
ResponseItemVO(isError = false, response = response.message())
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun checkRouteExpeditionScanPut(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vPalletFk: String,
|
||||
vExpeditionFk: String
|
||||
) {
|
||||
getPaletizadoresUserCase.checkRouteExpeditionScanPut(
|
||||
usuario,
|
||||
password,
|
||||
vPalletFk,
|
||||
vExpeditionFk
|
||||
).enqueue(object : Callback<String> {
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
_responseCheckexpeditionScanPut.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!response.isSuccessful){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()!!))
|
||||
}else{
|
||||
_response.value = ResponseItemVO(isError = false,response = response.message())
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun checkRouteExpeditionScanPut(usuario:String,password:String,vPalletFk:String,vExpeditionFk:String){
|
||||
getPaletizadoresUserCase.checkRouteExpeditionScanPut(usuario,password,vPalletFk,vExpeditionFk).enqueue(object : Callback<String>{
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
_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()!!)
|
||||
if (response.body() == null) {
|
||||
_responseCheckexpeditionScanPut.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message())
|
||||
)
|
||||
} else {
|
||||
_responseCheckexpeditionScanPut.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!)
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -127,22 +190,30 @@ 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 = getMessageFromAllResponse(
|
||||
nameofFunction(this),t.message!!))
|
||||
}
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!response.isSuccessful){
|
||||
_responseDeleteScan.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),response.message()!!))
|
||||
}else{
|
||||
_responseDeleteScan.value = ResponseItemVO(isError = false,response = response.message())
|
||||
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 = getMessageFromAllResponse(
|
||||
nameofFunction(this), t.message!!
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!response.isSuccessful) {
|
||||
_responseDeleteScan.value = ResponseItemVO(
|
||||
isError = true, errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this), response.message()!!
|
||||
)
|
||||
)
|
||||
} else {
|
||||
_responseDeleteScan.value =
|
||||
ResponseItemVO(isError = false, response = response.message())
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ class ExpeditionTruckListFragment : BaseFragment<FragmentExpeditionTruckListBin
|
|||
|
||||
private fun getCURDATE():String{
|
||||
val c: Date = getInstance1().getTime()
|
||||
val df = SimpleDateFormat("dd/MM/yyyy")
|
||||
val df = SimpleDateFormat(getString(R.string.dayFormat))
|
||||
return df.format(c)
|
||||
}
|
||||
|
||||
|
|
|
@ -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 ==getString(R.string.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
|
||||
|
@ -148,7 +148,7 @@ class ParkingFragment (var menuOrigin:String): BaseFragment<FragmentParkingBindi
|
|||
|
||||
@Throws(NumberFormatException::class)
|
||||
fun isLetter(text: String): Boolean {
|
||||
return text.matches("[a-zA-Z ]+".toRegex())
|
||||
return text.matches(getString(R.string.regExp).toRegex())
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ class PasillerosAdapter (
|
|||
try {
|
||||
(binding as ItemMainMenuBinding).itemImage.setImageResource(item.iconResource)
|
||||
}catch(exception:Exception){
|
||||
d("Exception::"+exception.message)
|
||||
// d("Exception::"+exception.message)
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
@ -97,7 +97,7 @@ class PasillerosAdapter (
|
|||
try {
|
||||
(binding as ItemPasillerosMainMenuBinding).itemImage.setImageResource(item.iconResource)
|
||||
}catch(exception:Exception){
|
||||
d("Exception::"+exception.message)
|
||||
//d("Exception::"+exception.message)
|
||||
}
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
|
|
@ -34,28 +34,27 @@ class PasilleroFragment(
|
|||
override fun init() {
|
||||
ma.hideBottomNavigation(View.VISIBLE)
|
||||
|
||||
when (tagName) {
|
||||
"Main" -> {
|
||||
binding.mainToolbarDesign.imageViewMenu.visibility = View.VISIBLE
|
||||
binding.mainToolbarDesign.backButton.visibility = View.GONE
|
||||
when (tagName) {
|
||||
getString(R.string.main)-> {
|
||||
binding.mainToolbarDesign.imageViewMenu.visibility = View.VISIBLE
|
||||
binding.mainToolbarDesign.backButton.visibility = View.GONE
|
||||
|
||||
|
||||
}
|
||||
|
||||
tagName -> {
|
||||
if (tagName == "Pasilleros") {
|
||||
binding.mainToolbarDesign.backButton.visibility = View.GONE
|
||||
}
|
||||
binding.mainToolbarDesign.backButton.visibility = View.VISIBLE
|
||||
binding.mainToolbarDesign.toolbarTitle.text = tagName
|
||||
binding.mainToolbarDesign.imageViewMenu.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
tagName -> {
|
||||
if (tagName == getString(R.string.titleCorridors)) {
|
||||
binding.mainToolbarDesign.backButton.visibility = View.GONE
|
||||
}
|
||||
binding.mainToolbarDesign.backButton.visibility = View.VISIBLE
|
||||
binding.mainToolbarDesign.toolbarTitle.text = tagName
|
||||
binding.mainToolbarDesign.imageViewMenu.visibility = View.GONE
|
||||
}
|
||||
}
|
||||
|
||||
binding.mainToolbarDesign.backButton.setOnClickListener {
|
||||
|
||||
requireActivity().onBackPressed()
|
||||
binding.mainToolbarDesign.backButton.setOnClickListener {
|
||||
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,14 +67,11 @@ class PasilleroFragment(
|
|||
|
||||
|
||||
when (tagName) {
|
||||
"Pasilleros" -> {
|
||||
viewModel.inititializeDefaultData()
|
||||
}
|
||||
|
||||
"Paletizadores" -> viewModel.inititializeDefaultPallet()
|
||||
getString(R.string.titleCorridors) -> { viewModel.inititializeDefaultData() }
|
||||
getString(R.string.titlePalletizers) -> viewModel.inititializeDefaultPallet()
|
||||
getString(R.string.titleBufferManegement) -> viewModel.inititializeDefaultBuffer()
|
||||
"Main" -> viewModel.inititializeDefaultDataInit()
|
||||
"Reclamaciones" -> viewModel.inititializeDefaultClaim()
|
||||
getString(R.string.main) -> viewModel.inititializeDefaultDataInit()
|
||||
getString(R.string.titleClaims) -> viewModel.inititializeDefaultClaim()
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,47 +1,60 @@
|
|||
package es.verdnatura.presentation.view.feature.pasillero.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
|
||||
class PasilleroViewModel : BaseViewModel() {
|
||||
class PasilleroViewModel(context: Context) : BaseViewModel() {
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private val contextApp = context
|
||||
private val _pasillerositem by lazy { ArrayList<PasillerosItemVO>() }
|
||||
val pasillerositem: List<PasillerosItemVO>
|
||||
get() = _pasillerositem
|
||||
|
||||
fun inititializeDefaultData() {
|
||||
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(20,
|
||||
R.drawable.barcode_scan,
|
||||
"Visor web",R.string.SmarttagAssociate)
|
||||
*/
|
||||
/* _pasillerositem.add(
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(20,
|
||||
R.drawable.barcode_scan,
|
||||
"Asociar Sacador SmartTags",R.string.SmarttagAssociate)
|
||||
) */
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(21,
|
||||
R.drawable.barcode_scan,
|
||||
"Registrar SmartTags",R.string.SmarttagRegister)
|
||||
)
|
||||
*/
|
||||
"Visor web",R.string.SmarttagAssociate)
|
||||
*/
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(20,
|
||||
R.drawable.barcode_scan,
|
||||
"Asociar Sacador SmartTags",R.string.SmarttagAssociate)
|
||||
) */
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(21,
|
||||
R.drawable.barcode_scan,
|
||||
"Registrar SmartTags",R.string.SmarttagRegister)
|
||||
)
|
||||
*/
|
||||
|
||||
//sergio para que aparezca el nuevo menu
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_streetview_black_24dp,
|
||||
"Pre Sacador", R.string.titlePrePicker,"Obtiene colecciones para sacar en previa"
|
||||
)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_streetview_black_24dp,
|
||||
contextApp.getString(R.string.titlePrePicker),
|
||||
R.string.titlePrePicker,
|
||||
contextApp.getString(
|
||||
R.string.titlePickerDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
//precontrol
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(7,
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_verified_user_black_24dp_selected,
|
||||
"Pre Control",R.string.titlePreControl,"Sirve para revisar un ticket de previa"
|
||||
contextApp.getString(R.string.titlePreControl),
|
||||
R.string.titlePreControl,
|
||||
contextApp.getString(
|
||||
R.string.titlePreControlDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -50,7 +63,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
10,
|
||||
R.drawable.ic_visibility_black_24dp,
|
||||
"Ver Ticket", R.string.verticket,"Muestra un ticket sin la posibilidad de modicarlo"
|
||||
contextApp.getString(R.string.titleShowTicket),
|
||||
R.string.titleShowTicket,
|
||||
contextApp.getString(
|
||||
R.string.titleShowTicketDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -58,7 +75,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
0,
|
||||
R.drawable.ic_loyalty_black_24dp,
|
||||
"Consultar artículo", R.string.titleItemConsult,"Busca información de un ítem"
|
||||
contextApp.getString(R.string.titleItemConsult),
|
||||
R.string.titleItemConsult,
|
||||
contextApp.getString(
|
||||
R.string.titleItemConsultDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -68,7 +89,9 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_local_parking_orange_24dp,
|
||||
"Parking", R.string.Parking,"Permite aparcar tickets o carros"
|
||||
contextApp.getString(R.string.Parking),
|
||||
R.string.Parking,
|
||||
contextApp.getString(R.string.titleParkingDescrip)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -76,30 +99,23 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
2,
|
||||
R.drawable.ic_visibility_black_24dp,
|
||||
"Buscar item", R.string.BuscarItem,"Busca donde se encuentra un ítem"
|
||||
contextApp.getString(R.string.titleItemSearch),
|
||||
R.string.titleItemSearch,
|
||||
contextApp.getString(
|
||||
R.string.titleItemSearchDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
/* _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(
|
||||
PasillerosItemVO(9,
|
||||
R.drawable.ic_visibility_black_24dp,
|
||||
"Buscar item full",R.string.test)
|
||||
)*/
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
1,
|
||||
R.drawable.ic_dashboard_black_24dp,
|
||||
"Ubicador", R.string.titleUbicator,"Permite ubicar/saber los ítems de un carro"
|
||||
contextApp.getString(R.string.titleUbicator),
|
||||
R.string.titleUbicator,
|
||||
contextApp.getString(
|
||||
R.string.titleUbicatorDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -107,7 +123,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
3,
|
||||
R.drawable.ic_spa_black_24dp,
|
||||
"Inventario", R.string.titleInventory, "Visualiza que falta o está desubicado"
|
||||
contextApp.getString(R.string.titleInventory),
|
||||
R.string.titleInventory,
|
||||
contextApp.getString(
|
||||
R.string.titleInventoryDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -115,7 +135,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.worker_mistake,
|
||||
"Fallo del trabajador", R.string.titleWorkerMistake,"Permite añadir fallos a un trabajador"
|
||||
contextApp.getString(R.string.titleWorkerMistake),
|
||||
R.string.titleWorkerMistake,
|
||||
contextApp.getString(
|
||||
R.string.titleWorkerMistakeDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -123,13 +147,22 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
10,
|
||||
R.drawable.revision_icon,
|
||||
"Histórico Shelving", R.string.itemShelvingLog,"Permite saber modificaciones de items en un carro"
|
||||
contextApp.getString(R.string.titleShelvingHistorical),
|
||||
R.string.titleShelvingHistorical,
|
||||
contextApp.getString(
|
||||
R.string.titleShelvingHistDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(7,
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_history_orange,
|
||||
"Log Shelving",R.string.shelvingLog,"Permite conocer los movimientos en un carro"
|
||||
contextApp.getString(R.string.titleLogShelving),
|
||||
R.string.titleLogShelving,
|
||||
contextApp.getString(
|
||||
R.string.titleLogShelvingDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -137,21 +170,33 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
22,
|
||||
R.drawable.car_info,
|
||||
"Historial del vehículo", R.string.vehiclediary,"Visualiza quien y cuando ha llevado un vehículo"
|
||||
contextApp.getString(R.string.titleHistoricalVehicle),
|
||||
R.string.titleHistoricalVehicle,
|
||||
contextApp.getString(
|
||||
R.string.titleHistVehicleDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
41,
|
||||
R.drawable.day_of_sale,
|
||||
"Día de venta", R.string.dayofSale,"Permite saber la fecha de venta de los items de un carro"
|
||||
contextApp.getString(R.string.titleDayOfSale),
|
||||
R.string.titleDayOfSale,
|
||||
contextApp.getString(
|
||||
R.string.titleDayDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_baseline_all_inbox_24,
|
||||
"Reposición", R.string.reposicion,"Indica que falta reponer"
|
||||
contextApp.getString(R.string.titleReplacement),
|
||||
R.string.titleReplacement,
|
||||
contextApp.getString(
|
||||
R.string.titleReplacDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -161,7 +206,9 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
4,
|
||||
R.drawable.ic_move_to_inbox_black_24dp,
|
||||
"Faltas", R.string.titleFaults,"Visualiza las faltas en almacén"
|
||||
contextApp.getString(R.string.titleFaults),
|
||||
R.string.titleFaults,
|
||||
contextApp.getString(R.string.titleFaultsDescrip)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -169,7 +216,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
5,
|
||||
R.drawable.ic_send_black_24dp,
|
||||
"Shelving Parking", R.string.titleShelvingParking,""
|
||||
contextApp.getString(R.string.titleShelvingParking),
|
||||
R.string.titleShelvingParking,
|
||||
contextApp.getString(
|
||||
R.string.titleShelParkDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -177,7 +228,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
8,
|
||||
R.drawable.ic_baseline_star_24,
|
||||
"Calidad", R.string.titleQuality,"Permite conocer la calidad de algunos productos por comprador"
|
||||
contextApp.getString(R.string.titleQuality),
|
||||
R.string.titleQuality,
|
||||
contextApp.getString(
|
||||
R.string.titleQualityDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -189,7 +244,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.pallet_shipping_selected,
|
||||
"Paletizar", R.string.scanPallet,"Permite escanear pallet para incorporarlo al sistema"
|
||||
contextApp.getString(R.string.titlePalletizar),
|
||||
R.string.titlePalletizar,
|
||||
contextApp.getString(
|
||||
R.string.titlePalletDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -197,14 +256,20 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
31,
|
||||
R.drawable.ic_visibility_black_24dp,
|
||||
"Consultar estado expedición", R.string.ExpeditionState,"Permite conocer el estado de una expedición"
|
||||
contextApp.getString(R.string.titleExpeditionState),
|
||||
R.string.titleExpeditionState,
|
||||
contextApp.getString(R.string.titleExpeditionDescrip)
|
||||
)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
40,
|
||||
R.drawable.barcode_scan,
|
||||
"Escanear expedición", R.string.ExpeditionScan,"Permite escanear expediciones que no han pasado por el sorter"
|
||||
contextApp.getString(R.string.titleExpeditionScan),
|
||||
R.string.titleExpeditionScan,
|
||||
contextApp.getString(
|
||||
R.string.titleExpScanDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -213,7 +278,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
32,
|
||||
R.drawable.buffer_outline,
|
||||
"Gestión de buffers", R.string.titleBufferManegement,"Se accede al menú de operaciones con los buffers del sorter"
|
||||
contextApp.getString(R.string.titleBufferManegement),
|
||||
R.string.titleBufferManegement,
|
||||
contextApp.getString(
|
||||
R.string.titleBufferMangDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -222,7 +291,9 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
33,
|
||||
R.drawable.qrcode_scan,
|
||||
"Lector Qr", R.string.titleQrReader,"Permite leer información en un qr"
|
||||
contextApp.getString(R.string.titleQrReader),
|
||||
R.string.titleQrReader,
|
||||
contextApp.getString(R.string.titleQrDescrip)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -234,7 +305,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.buffer_empty,
|
||||
"Vaciado buffer", R.string.titleBufferEmpty, "Pone en modo vaciado un buffer"
|
||||
contextApp.getString(R.string.titleBufferEmpty),
|
||||
R.string.titleBufferEmpty,
|
||||
contextApp.getString(
|
||||
R.string.titleBufferEmptyDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -243,7 +318,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
31,
|
||||
R.drawable.buffer_fill,
|
||||
"Llenado buffer", R.string.titleBufferFill,"Pone en modo llenado un buffer"
|
||||
contextApp.getString(R.string.titleBufferFill),
|
||||
R.string.titleBufferFill,
|
||||
contextApp.getString(
|
||||
R.string.titleBufferFillDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -252,7 +331,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
32,
|
||||
R.drawable.buffer_accumulation,
|
||||
"Acumulación buffer", R.string.titleBufferAccumulate,"Pone en modo acumulación un buffer"
|
||||
contextApp.getString(R.string.titleBufferAccumulate),
|
||||
R.string.titleBufferAccumulate,
|
||||
contextApp.getString(
|
||||
R.string.titleBufferAccDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -260,7 +343,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
31,
|
||||
R.drawable.buffer_off,
|
||||
"Desactivado buffer", R.string.titleBufferOff,"Pone en modo desactivado un buffer"
|
||||
contextApp.getString(R.string.titleBufferOff),
|
||||
R.string.titleBufferOff,
|
||||
contextApp.getString(
|
||||
R.string.titleBufferOffDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -268,7 +355,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
31,
|
||||
R.drawable.buffer_flejado,
|
||||
"Flejado buffer", R.string.titleBufferStrapping,"Pone en modo flejado un buffer"
|
||||
contextApp.getString(R.string.titleBufferStrapping),
|
||||
R.string.titleBufferStrapping,
|
||||
contextApp.getString(
|
||||
R.string.titleBufferStrapDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -277,24 +368,35 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
45,
|
||||
R.drawable.buffer_load,
|
||||
"Cargar expedición en buffer", R.string.titleBufferload, "Pone en modo cargar un buffer"
|
||||
contextApp.getString(R.string.titleBufferload),
|
||||
R.string.titleBufferload,
|
||||
contextApp.getString(
|
||||
R.string.titleBufferLoadDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
fun inititializeDefaultDataInit(){
|
||||
fun inititializeDefaultDataInit() {
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_corridor_ui,
|
||||
"Pasilleros", R.string.Pasilleros,"Accede menú de los pasilleros:presacar, ver ticket, ubicador..."
|
||||
contextApp.getString(R.string.titleCorridors),
|
||||
R.string.titleCorridors,
|
||||
contextApp.getString(R.string.titleCorridorsDescrip)
|
||||
)
|
||||
)
|
||||
//precontrol
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(7,
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_picker_ui,
|
||||
"Sacadores",R.string.titlePickers,"Accede a sacar pedidos"
|
||||
contextApp.getString(R.string.titlePickers),
|
||||
R.string.titlePickers,
|
||||
contextApp.getString(
|
||||
R.string.titlePickersDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -303,7 +405,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
10,
|
||||
R.drawable.ic_controller_ui,
|
||||
"Controladores", R.string.Controladores,"Accede a la revisión de los tickets"
|
||||
contextApp.getString(R.string.titleControllers),
|
||||
R.string.titleControllers,
|
||||
contextApp.getString(
|
||||
R.string.titleControlDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -311,7 +417,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
0,
|
||||
R.drawable.ic_pallet_ui,
|
||||
"Paletizadores", R.string.Paletizadores,"Accede al menú de paletizadores: paletizar, buffer..."
|
||||
contextApp.getString(R.string.titlePalletizers),
|
||||
R.string.titlePalletizers,
|
||||
contextApp.getString(
|
||||
R.string.titlePalletizDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -321,12 +431,12 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_claim_ui,
|
||||
"Reclamaciones", R.string.titleClaims,"Accede al menú de reclamaciones"
|
||||
contextApp.getString(R.string.titleClaims),
|
||||
R.string.titleClaims,
|
||||
contextApp.getString(R.string.titleClaimsDescrip)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -336,7 +446,11 @@ class PasilleroViewModel : BaseViewModel() {
|
|||
PasillerosItemVO(
|
||||
30,
|
||||
R.drawable.ic_claims,
|
||||
"Ubicación de Reclamación", R.string.titleClaimUbication, "Ubicación de reclamaciones"
|
||||
contextApp.getString(R.string.titleClaimUbication),
|
||||
R.string.titleClaimUbication,
|
||||
contextApp.getString(
|
||||
R.string.titleClaimDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@ import retrofit2.Response
|
|||
|
||||
class PreControladorViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
private val contextApp=context
|
||||
private val _collectionTicketList by lazy { MutableLiveData<CollectionVO>() }
|
||||
private val getPreControladorUserCase: GetPreControladorUserCase = GetPreControladorUserCase(context)
|
||||
|
||||
|
@ -33,7 +34,7 @@ class PreControladorViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<CollectionVO>
|
||||
) {
|
||||
if (response.body() != null){
|
||||
_collectionTicketList.value = response.body()?.let { it.map() }
|
||||
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
|
||||
}else{
|
||||
_collectionTicketList.value = CollectionVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
}
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
package es.verdnatura.presentation.view.feature.presacador.fragment
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.media.MediaPlayer
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
|
@ -170,7 +168,6 @@ class EndSacadorFragment(
|
|||
}
|
||||
}
|
||||
|
||||
@SuppressLint("LogNotTimber")
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
salesList.observe(viewLifecycleOwner, Observer {
|
||||
|
@ -210,7 +207,11 @@ class EndSacadorFragment(
|
|||
responseSalixMessage.observe(viewLifecycleOwner, Observer {
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
ma.messageWithSound(
|
||||
getString(R.string.rocketKO) + it.errorMessage,
|
||||
true,
|
||||
false
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -236,13 +237,10 @@ class EndSacadorFragment(
|
|||
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.accept)) {
|
||||
customDialog.dismiss()
|
||||
}.show()*/
|
||||
|
||||
} else {
|
||||
if (mpok != null) mpok!!.start()
|
||||
"Sale/s aparcada/s".toast(requireContext())
|
||||
getString(R.string.saleParked).toast(requireContext())
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -306,7 +304,12 @@ class EndSacadorFragment(
|
|||
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true, isToasted = true)
|
||||
ma.messageWithSound(
|
||||
getString(R.string.errorTicketAdd) + it.errorMessage,
|
||||
isError = true,
|
||||
true,
|
||||
isToasted = true
|
||||
)
|
||||
|
||||
} else {
|
||||
viewModel.sectorCollection_getSale(
|
||||
|
@ -324,7 +327,11 @@ class EndSacadorFragment(
|
|||
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
ma.messageWithSound(
|
||||
getString(R.string.errorChangeState) + it.errorMessage,
|
||||
isError = true,
|
||||
true
|
||||
)
|
||||
|
||||
} else {
|
||||
ma.messageWithSound(getString(R.string.previousOK), isError = false, false)
|
||||
|
@ -353,7 +360,11 @@ class EndSacadorFragment(
|
|||
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
ma.messageWithSound(
|
||||
getString(R.string.errorChangeState) + it.errorMessage,
|
||||
isError = true,
|
||||
true
|
||||
)
|
||||
|
||||
} else {
|
||||
if (positionUnmarked != -1) {
|
||||
|
@ -385,7 +396,8 @@ class EndSacadorFragment(
|
|||
binding.splashProgress.visibility = View.GONE
|
||||
if (!goBack2) {
|
||||
if (it.isError) {
|
||||
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||
customDialog.setTitle(getString(R.string.error))
|
||||
.setDescription(it.errorMessage)
|
||||
.setKoButton(getString(R.string.close)) {
|
||||
scanRequest()
|
||||
customDialog.dismiss()
|
||||
|
@ -460,7 +472,7 @@ class EndSacadorFragment(
|
|||
val ticket =
|
||||
"[" + sales[positionIncreaseQuantity].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionIncreaseQuantity].id + "/summary)"
|
||||
val message =
|
||||
"Se ha modificado desde previa la cantidad original " + sales[positionIncreaseQuantity].quantity + " del artículo " + sales[positionIncreaseQuantity].itemFk + " a nueva cantidad: " + quantityIncrease + " del ticket " + ticket
|
||||
getString(R.string.modifiedQuantityPrevious) + sales[positionIncreaseQuantity].quantity + getString(R.string.fromItem) + sales[positionIncreaseQuantity].itemFk + getString(R.string.toNewQuantity) + quantityIncrease + getString(R.string.fromTicket) + ticket
|
||||
|
||||
|
||||
|
||||
|
@ -504,13 +516,17 @@ class EndSacadorFragment(
|
|||
|
||||
"TRUE" -> {
|
||||
message =
|
||||
"Se ha enviado desde previa a Basura " + totalQuantity + " del articulo " + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
getString(R.string.sentToTrashPrevious) + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + getString(
|
||||
R.string.ticketSpaces
|
||||
) + ticket
|
||||
}
|
||||
|
||||
|
||||
"FALSE" -> {
|
||||
message =
|
||||
"Se ha enviado desde previa a Faltas la cantidad de " + totalQuantity + " del articulo " + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
getString(R.string.sentToTrashFaults) + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + getString(
|
||||
R.string.ticketSpaces
|
||||
) + ticket
|
||||
|
||||
}
|
||||
|
||||
|
@ -518,7 +534,9 @@ class EndSacadorFragment(
|
|||
"reject" -> {
|
||||
var quantityOriginal = totalQuantity.toInt() + quantityCollectionMissing.toInt()
|
||||
message =
|
||||
"Se ha modificado desde previa la cantidad de " + quantityOriginal + " del artículo " + sales[positionCollectionMissing].itemFk + " a nueva cantidad: " + quantityCollectionMissing + " del ticket " + ticket
|
||||
getString(R.string.modifiedQuantityPrevious) + quantityOriginal + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + getString(
|
||||
R.string.toNewQuantity
|
||||
) + quantityCollectionMissing + getString(R.string.fromTicket) + ticket
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -536,8 +554,7 @@ class EndSacadorFragment(
|
|||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = workerId,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
message = message
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -582,11 +599,13 @@ class EndSacadorFragment(
|
|||
getString(R.string.scanTicketsForAdd),
|
||||
false,
|
||||
false,
|
||||
"Pre Sacador"
|
||||
getString(R.string.titlePrePicker), isToasted = true
|
||||
)
|
||||
|
||||
} else {
|
||||
if (ticket.isNullOrBlank()){binding.mainToolbar.toolbarTitle.text = collection.collectionFk}
|
||||
if (ticket.isNullOrBlank()) {
|
||||
binding.mainToolbar.toolbarTitle.text = collection.collectionFk
|
||||
}
|
||||
sales = ArrayList()
|
||||
|
||||
salesList.forEach {
|
||||
|
@ -669,11 +688,13 @@ class EndSacadorFragment(
|
|||
if (it.saldo == it.picked)
|
||||
totalMark += 1
|
||||
}
|
||||
if (ticket.isNullOrBlank()){binding.mainToolbar.toolbarTitle.text = collection.collectionFk}
|
||||
if (ticket.isNullOrBlank()) {
|
||||
binding.mainToolbar.toolbarTitle.text = collection.collectionFk
|
||||
}
|
||||
|
||||
binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size
|
||||
if (totalMark == sales.size) {
|
||||
"Ticket completo".toast(this.context, Toast.LENGTH_SHORT)
|
||||
getString(R.string.ticketCompleted).toast(this.context, Toast.LENGTH_SHORT)
|
||||
|
||||
saleTracking_addPrevOK()
|
||||
|
||||
|
@ -709,12 +730,12 @@ class EndSacadorFragment(
|
|||
var isOk = false
|
||||
|
||||
for (saleVO in sales) {
|
||||
//Timber.tag("VERDNATURA::").d("El item buscado es " + saleVO.itemFk)
|
||||
//Timber.tag("VERDNATURA::").d("El item buscado es " + saleVO.itemFk)
|
||||
if (saleVO.quantity != saleVO.picked) {
|
||||
//1- Por carro
|
||||
var shelvingIndex = 0
|
||||
for (placementVO in saleVO.carros) {
|
||||
//Timber.tag("VERDNATURA::").d("La matric " + placementVO.shelving)
|
||||
//Timber.tag("VERDNATURA::").d("La matric " + placementVO.shelving)
|
||||
if (txtscan.uppercase() == placementVO.shelving.uppercase()) {
|
||||
if (mpok != null) mpok!!.start()
|
||||
isOk = true
|
||||
|
@ -733,7 +754,7 @@ class EndSacadorFragment(
|
|||
if (mperror != null) {
|
||||
mperror!!.start()
|
||||
}
|
||||
("Elemento escaneado no encontrado: " + txtscan).toast(requireContext())
|
||||
(getString(R.string.itemScanetNotFound) + txtscan).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -766,7 +787,7 @@ class EndSacadorFragment(
|
|||
if (mperror != null) {
|
||||
mperror!!.start()
|
||||
}
|
||||
("Elemento escaneado no encontrado: " + txtscan).toast(requireContext())
|
||||
("getString(R.string.itemScanetNotFound)" + txtscan).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -892,38 +913,40 @@ class EndSacadorFragment(
|
|||
listPlacementSupply.add(BarcodeVO(code = it.proposal))
|
||||
}
|
||||
|
||||
customDialogList.setTitle("$shelving($item) $total del $longName").setOkButton(getString( R.string.take)) {
|
||||
customDialogList.setTitle("$shelving($item) $total del $longName")
|
||||
.setOkButton(getString(R.string.take)) {
|
||||
|
||||
|
||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||
|
||||
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
mpok?.start()
|
||||
customDialogList.dismiss()
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
mpok?.start()
|
||||
customDialogList.dismiss()
|
||||
} else {
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getIdFromCode(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
code = customDialogList.getValueTwo()
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
} else {
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getIdFromCode(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
code = customDialogList.getValueTwo()
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
"getString(R.string.scanItemValidate) validar".toast(requireContext())
|
||||
}
|
||||
|
||||
|
||||
}.setKoButton(getString(R.string.close)) {
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
} else {
|
||||
"getString(R.string.scanItemValidate) validar".toast(requireContext())
|
||||
}
|
||||
|
||||
|
||||
}.setKoButton(getString(R.string.close)) {
|
||||
scanRequest()
|
||||
hideKeyboards()
|
||||
customDialogList.dismiss()
|
||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo(getString(R.string.scanItem))
|
||||
customDialogList.dismiss()
|
||||
}.setHintValue(getString(R.string.quantitySelect)).setValue(total)
|
||||
.setHintValueTwo(getString(R.string.scanItem))
|
||||
.setValueTwo("").show()
|
||||
|
||||
|
||||
|
@ -1106,7 +1129,8 @@ class EndSacadorFragment(
|
|||
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)
|
||||
}
|
||||
|
@ -1151,7 +1175,7 @@ class EndSacadorFragment(
|
|||
//OTROS
|
||||
private fun setToolBar() {
|
||||
binding.mainToolbar.toolbarSubtitle.visibility = VISIBLE
|
||||
binding.mainToolbar.toolbarTitle.text=collection.collectionFk
|
||||
binding.mainToolbar.toolbarTitle.text = collection.collectionFk
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
|
||||
|
@ -1176,14 +1200,14 @@ class EndSacadorFragment(
|
|||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
|
||||
|
||||
goBack=false
|
||||
goBack = false
|
||||
/*if (item == iconEraser) {
|
||||
|
||||
} else*/
|
||||
when (item) {
|
||||
iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = "Parking"
|
||||
title = getString(R.string.parking)
|
||||
), ""
|
||||
)
|
||||
|
||||
|
@ -1327,55 +1351,55 @@ class EndSacadorFragment(
|
|||
}
|
||||
|
||||
//FALTAS / BASURA / SPLIT
|
||||
private fun showQuantityDialogOld(position: Int) {
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad)).setValue("")
|
||||
.setOkButton(getString(R.string.titleFaults)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
trash(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
missing(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}.setOkButtonThree(getString(R.string.Reject)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
reject(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
/* private fun showQuantityDialogOld(position: Int) {
|
||||
customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad)).setValue("")
|
||||
.setOkButton(getString(R.string.titleFaults)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
trash(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
missing(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}.setOkButtonThree(getString(R.string.Reject)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
reject(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
|
||||
}.setOkButtonFour("Split") {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
split(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}.setOkButtonFour(getString(R.string.Split)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
split(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
|
||||
}.setOkButtonAdd(getString(R.string.Agregar)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
increaseQuantity(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}.show()
|
||||
}
|
||||
}.setOkButtonAdd(getString(R.string.Agregar)) {
|
||||
if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
|
||||
getString(R.string.Indicanuevacantidad).toast(requireContext())
|
||||
} else {
|
||||
increaseQuantity(position, customDialogThreeButtons.getValue())
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
scanRequest()
|
||||
customDialogThreeButtons.dismiss()
|
||||
}.show()
|
||||
}*/
|
||||
|
||||
private fun split(position: Int, quantity: String) {
|
||||
|
||||
|
@ -1388,14 +1412,14 @@ class EndSacadorFragment(
|
|||
} catch (e: Exception) {
|
||||
}
|
||||
|
||||
binding.splashProgress.visibility=VISIBLE
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
|
||||
viewModel.transferSalesSalix(
|
||||
getData(TOKEN),
|
||||
ticketFk = sales[position].id,
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString()
|
||||
)
|
||||
viewModel.transferSalesSalix(
|
||||
getData(TOKEN),
|
||||
ticketFk = sales[position].id,
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString()
|
||||
)
|
||||
|
||||
/*
|
||||
try {
|
||||
|
@ -1425,106 +1449,104 @@ class EndSacadorFragment(
|
|||
|
||||
}
|
||||
|
||||
private fun trash(position: Int, quantity: String) {
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].saldo.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
viewModel.collectionMissingTrash(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
type = "FALSE",
|
||||
originalQuantity = quantity
|
||||
)
|
||||
//sales[position].originalQuantity = quantity
|
||||
try {
|
||||
sales[position].saldo = quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
sales[position].saldo = 0
|
||||
}
|
||||
//sales[position].startQuantity = quantity
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
if (quantity == "0")
|
||||
markLine(position)
|
||||
/* private fun trash(position: Int, quantity: String) {
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].saldo.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
viewModel.collectionMissingTrash(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
type = "FALSE",
|
||||
originalQuantity = quantity
|
||||
)
|
||||
//sales[position].originalQuantity = quantity
|
||||
try {
|
||||
sales[position].saldo = quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
sales[position].saldo = 0
|
||||
}
|
||||
//sales[position].startQuantity = quantity
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
if (quantity == "0")
|
||||
markLine(position)
|
||||
|
||||
|
||||
//enviar mensaje a salix
|
||||
val ticket =
|
||||
"[" + sales[position].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].id + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + " del articulo " + sales[position].itemFk + " ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
)
|
||||
}
|
||||
//enviar mensaje a salix
|
||||
val ticket =
|
||||
"[" + sales[position].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].id + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + getString(R.string.fromItem) + sales[position].itemFk + " ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message
|
||||
)
|
||||
}
|
||||
|
||||
private fun missing(position: Int, quantity: String) {
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].saldo.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
viewModel.collectionMissingTrash(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
type = "TRUE",
|
||||
originalQuantity = quantity
|
||||
)
|
||||
//sales[position].originalQuantity = quantity
|
||||
try {
|
||||
sales[position].saldo = quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
sales[position].saldo = 0
|
||||
}
|
||||
private fun missing(position: Int, quantity: String) {
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].saldo.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
viewModel.collectionMissingTrash(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
type = "TRUE",
|
||||
originalQuantity = quantity
|
||||
)
|
||||
//sales[position].originalQuantity = quantity
|
||||
try {
|
||||
sales[position].saldo = quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
sales[position].saldo = 0
|
||||
}
|
||||
|
||||
//sales[position].startQuantity = quantity
|
||||
//sales[position].startQuantity = quantity
|
||||
|
||||
if (quantity == "0")
|
||||
markLine(position)
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
if (quantity == "0")
|
||||
markLine(position)
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
|
||||
|
||||
//enviar mensaje a salix
|
||||
val ticket =
|
||||
"[" + sales[position].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].id + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Basura " + totalQuantity + " del articulo " + sales[position].itemFk + " ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
)
|
||||
}
|
||||
//enviar mensaje a salix
|
||||
val ticket =
|
||||
"[" + sales[position].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].id + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Basura " + totalQuantity + getString(R.string.fromItem) + sales[position].itemFk + " ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message
|
||||
)
|
||||
}
|
||||
|
||||
private fun reject(position: Int, quantity: String) {
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].saldo.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
viewModel.collectionMissingTrash(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
type = "reject",
|
||||
originalQuantity = quantity
|
||||
)
|
||||
private fun reject(position: Int, quantity: String) {
|
||||
var totalQuantity: Int = 0
|
||||
try {
|
||||
totalQuantity = sales[position].saldo.toInt() - quantity.toInt()
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
viewModel.collectionMissingTrash(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
type = "reject",
|
||||
originalQuantity = quantity
|
||||
)
|
||||
|
||||
//enviar mensaje a salix
|
||||
/* val ticket =
|
||||
//enviar mensaje a salix
|
||||
*//* val ticket =
|
||||
"[" + ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + ticketFk + "/summary)"
|
||||
val message =
|
||||
"Se ha modificado la cantidad original desde previa" + sales[position].saldo + " del artículo " + sales[position].itemFk + " a nueva cantidad: " + quantity + " del ticket " + ticket
|
||||
|
@ -1533,7 +1555,7 @@ class EndSacadorFragment(
|
|||
workerId = sales[position].salesPersonFk,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
)*/
|
||||
)*//*
|
||||
|
||||
try {
|
||||
sales[position].saldo = quantity.toInt()
|
||||
|
@ -1566,8 +1588,8 @@ class EndSacadorFragment(
|
|||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
message = message
|
||||
|
||||
)
|
||||
|
||||
//Timber.d("VERDNATURA").d("el trabajador es " + sales[position].salesPersonFk)
|
||||
|
@ -1581,7 +1603,7 @@ class EndSacadorFragment(
|
|||
saleAdapter?.notifyDataSetChanged()
|
||||
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
private fun increaseQuantity(position: Int, quantity: String) {
|
||||
positionIncreaseQuantity = position
|
||||
|
|
|
@ -48,7 +48,6 @@ class InitPreSacadorFragment (
|
|||
customDialog = CustomDialog(requireContext())
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
binding.splashProgressTwo.visibility = View.GONE
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.getcollection)
|
||||
setToolBar()
|
||||
setEvents()
|
||||
viewModel.sectorCollection_get(getData(USER),getData(PASSWORD))
|
||||
|
@ -66,8 +65,10 @@ class InitPreSacadorFragment (
|
|||
private fun setToolBar() {
|
||||
|
||||
ma.hideBottomNavigation(View.VISIBLE)
|
||||
binding.mainToolbar.backButton.visibility = View.GONE
|
||||
binding.mainToolbar.toolbarTitle.text=entrypoint
|
||||
binding.mainToolbar.backButton.setOnClickListener{
|
||||
ma.onBackPressed()
|
||||
}
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconAdd = ImageView(context)
|
||||
|
@ -139,7 +140,7 @@ class InitPreSacadorFragment (
|
|||
binding.splashProgressTwo.visibility = View.GONE
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
ma.messageWithSound(getString(R.string.errorCollectionNew)+ it.errorMessage,true,false)
|
||||
|
||||
} else {
|
||||
//if (goBack)
|
||||
|
@ -172,11 +173,11 @@ class InitPreSacadorFragment (
|
|||
}
|
||||
}
|
||||
if (isNew) {
|
||||
collectionsList.add(CollectionVO(collectionFk = collection, created = "Nuevo"))
|
||||
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()
|
||||
|
|
|
@ -356,12 +356,12 @@ class PreSacadorFragment :
|
|||
when (typeCollectionMissing){
|
||||
|
||||
"TRUE"->{
|
||||
message = "Se ha enviado desde previa a Basura " + totalQuantity + " del articulo " + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
message = "Se ha enviado desde previa a Basura " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
}
|
||||
|
||||
|
||||
"FALSE"->{
|
||||
message= "Se ha enviado desde previa a Faltas la cantidad de " + totalQuantity + " del articulo " + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
message= "Se ha enviado desde previa a Faltas la cantidad de " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
|
||||
}
|
||||
|
||||
|
||||
|
@ -383,8 +383,7 @@ class PreSacadorFragment :
|
|||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = workerId,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
message = message
|
||||
)
|
||||
}
|
||||
//CREATE LIST
|
||||
|
@ -500,7 +499,7 @@ class PreSacadorFragment :
|
|||
binding.mainToolbar.toolbarTitle.text = ticket
|
||||
binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size
|
||||
if (totalMark == sales.size) {
|
||||
"Ticket completo".toast(this.context, Toast.LENGTH_SHORT)
|
||||
getString(R.string.ticketCompleted).toast(this.context, Toast.LENGTH_SHORT)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -546,7 +545,7 @@ class PreSacadorFragment :
|
|||
if (mperror != null) {
|
||||
mperror!!.start()
|
||||
}
|
||||
("Elemento escaneado no encontrado: " + txtscan).toast(requireContext())
|
||||
("getString(R.string.itemScanetNotFound)" + txtscan).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -579,7 +578,7 @@ class PreSacadorFragment :
|
|||
if (mperror != null) {
|
||||
mperror!!.start()
|
||||
}
|
||||
("Elemento escaneado no encontrado: " + txtscan).toast(requireContext())
|
||||
("getString(R.string.itemScanetNotFound)" + txtscan).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -719,7 +718,7 @@ class PreSacadorFragment :
|
|||
scanRequest()
|
||||
hideKeyboards()
|
||||
customDialogList.dismiss()
|
||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo(getString(R.string.scanItem))
|
||||
}.setHintValue("getString(R.string.quantitySelect))").setValue(total).setHintValueTwo(getString(R.string.scanItem))
|
||||
.setValueTwo("").show()
|
||||
|
||||
|
||||
|
@ -1230,12 +1229,11 @@ class PreSacadorFragment :
|
|||
val ticket =
|
||||
"[" + sales[position].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].id + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + " del articulo " + sales[position].itemFk + " ticket " + ticket
|
||||
"Se ha enviado a Faltas la cantidad de " + totalQuantity + getString(R.string.fromItem) + sales[position].itemFk + " ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
message = message
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -1272,12 +1270,11 @@ class PreSacadorFragment :
|
|||
val ticket =
|
||||
"[" + sales[position].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].id + "/summary)"
|
||||
val message =
|
||||
"Se ha enviado a Basura " + totalQuantity + " del articulo " + sales[position].itemFk + " ticket " + ticket
|
||||
"Se ha enviado a Basura " + totalQuantity + getString(R.string.fromItem) + sales[position].itemFk + " ticket " + ticket
|
||||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
message = message
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -1305,8 +1302,7 @@ class PreSacadorFragment :
|
|||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
message = message
|
||||
)
|
||||
|
||||
try {
|
||||
|
@ -1339,8 +1335,7 @@ class PreSacadorFragment :
|
|||
viewModel.sendChekingPresence(
|
||||
token = getData(TOKEN),
|
||||
workerId = sales[position].salesPersonFk,
|
||||
message = message,
|
||||
"sendChekingPresence"
|
||||
message = message
|
||||
)
|
||||
|
||||
Log.d("VERDNATURA","el trabajador es "+sales[position].salesPersonFk)
|
||||
|
|
|
@ -26,6 +26,8 @@ import retrofit2.Callback
|
|||
import retrofit2.Response
|
||||
|
||||
class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
private val contextApp=context
|
||||
private val getPreSacadorUseCase: GetPreSacadorUseCase = GetPreSacadorUseCase(context)
|
||||
private val getSacadorControladorUserCase: GetSacadorControladorUserCase =
|
||||
GetSacadorControladorUserCase(context)
|
||||
|
@ -538,7 +540,6 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
token: String,
|
||||
workerId: String,
|
||||
message: String,
|
||||
calledFunction: String
|
||||
) {
|
||||
try {
|
||||
getLoginUserCase.sendChekingPresence(token, workerId.toInt(), message)
|
||||
|
@ -547,7 +548,7 @@ class PreSacadorViewModel(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()
|
||||
)
|
||||
)
|
||||
|
@ -559,7 +560,7 @@ class PreSacadorViewModel(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!!
|
||||
)
|
||||
)
|
||||
|
@ -594,7 +595,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
) {
|
||||
if (response.body() != null) {
|
||||
_collectionList.value =
|
||||
response.body()?.let { CollectionListVO(it.toDateFormat()) }
|
||||
response.body()?.let { CollectionListVO(it.toDateFormat(contextApp)) }
|
||||
} else {
|
||||
val listError: ArrayList<CollectionVO> = ArrayList()
|
||||
listError.add(
|
||||
|
@ -643,7 +644,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
if (!response.isSuccessful) {
|
||||
_responseNew.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = "Error en la llamada al añadir colección." + getMessageFromAllResponse(
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this), response.message()
|
||||
)
|
||||
)
|
||||
|
@ -691,7 +692,6 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
.enqueue(object :
|
||||
Callback<List<PreSacadorItemVO>> {
|
||||
override fun onFailure(call: Call<List<PreSacadorItemVO>>, t: Throwable) {
|
||||
//Timber.tag("VERDNATURA::").d("ha fallado")
|
||||
_salesList.value = listOf()
|
||||
}
|
||||
|
||||
|
@ -702,7 +702,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
if (response.body() != null) {
|
||||
_salesList.value = response.body()?.let { it }
|
||||
} else {
|
||||
d("VERDNATURA::", "ES NULO")
|
||||
|
||||
_salesList.value = listOf()
|
||||
}
|
||||
}
|
||||
|
@ -744,7 +744,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
if (!response.isSuccessful) {
|
||||
_responseSaleGroupAdd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = "Error al añadir ticket a la colección." + getMessageFromAllResponse(
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this), response.message()
|
||||
)
|
||||
)
|
||||
|
@ -792,7 +792,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
if (!response.isSuccessful) {
|
||||
_responseSaleAddPrevOK.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = "Error al cambiar el estado a la colección de previa." + getMessageFromAllResponse(
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this), response.message()
|
||||
)
|
||||
)
|
||||
|
@ -843,7 +843,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
if (!response.isSuccessful) {
|
||||
_responseSaleupdateIsChecked.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = "Error al cambiar el estado a la colección de previa." + getMessageFromAllResponse(
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this), response.message()
|
||||
)
|
||||
)
|
||||
|
|
|
@ -2,12 +2,11 @@ package es.verdnatura.presentation.view.feature.qr
|
|||
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.domain.GetQrReaderUserCase
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
|
||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
|
@ -16,6 +15,7 @@ import retrofit2.Callback
|
|||
import retrofit2.Response
|
||||
|
||||
class QrFragmentViewModel(context: Context) : BaseViewModel() {
|
||||
private val contextApp =context
|
||||
private val GetQrReaderUserCase: GetQrReaderUserCase =
|
||||
GetQrReaderUserCase(context)
|
||||
|
||||
|
@ -46,9 +46,9 @@ class QrFragmentViewModel(context: Context) : BaseViewModel() {
|
|||
_qrresponse.value = ResponseItemVO(
|
||||
response = "",
|
||||
isError = true,
|
||||
errorMessage ="Usuario sin permisos para realizar la acción"
|
||||
|
||||
)
|
||||
errorMessage =contextApp.getString(
|
||||
R.string.userNotPermission
|
||||
))
|
||||
|
||||
} else if (response.body() != null) {
|
||||
_qrresponse.value = ResponseItemVO(
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.content.Context
|
|||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.fragment.app.setFragmentResultListener
|
||||
|
@ -56,7 +55,6 @@ class SacadorFragment :
|
|||
setToolBar()
|
||||
setEvents()
|
||||
|
||||
//Log.d("VERDNATURA::","getCollections es "+ getCollections)
|
||||
if (getCollections) {
|
||||
viewModel.collection_new_smart(
|
||||
getData(USER),
|
||||
|
@ -65,22 +63,20 @@ class SacadorFragment :
|
|||
getData(WAGON),
|
||||
getData(TAGSTYPE)
|
||||
)
|
||||
//getCollections = false
|
||||
|
||||
} else {
|
||||
var working_in_test=false //sergio: Ok en app
|
||||
if (!working_in_test) {
|
||||
viewModel.collectionGetSalix(token = getData(TOKEN))
|
||||
}else{
|
||||
viewModel.collectionGet( getData(USER),
|
||||
getData(PASSWORD))
|
||||
}
|
||||
var working_in_test = false //sergio: Ok en app
|
||||
if (!working_in_test) {
|
||||
viewModel.collectionGetSalix(token = getData(TOKEN))
|
||||
} else {
|
||||
viewModel.collectionGet(
|
||||
getData(USER),
|
||||
getData(PASSWORD)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
super.init()
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,13 +87,10 @@ class SacadorFragment :
|
|||
|
||||
val result = bundle.getString("tagMode")
|
||||
|
||||
//Timber.d("VERDNATURA::").d("el result es " + result)
|
||||
|
||||
resultTagMode = result
|
||||
if (result.equals("complete") && getData(TAGSTYPE).equals("SmartTags")) {
|
||||
if (result.equals(getString(R.string.complete)) && getData(TAGSTYPE).equals(getString(R.string.smarttags))) {
|
||||
getCollections = true
|
||||
|
||||
//Timber.d("VERDNATURA::").d("el getCollections es " + getCollections)
|
||||
} else {
|
||||
getCollections = false
|
||||
}
|
||||
|
@ -116,6 +109,9 @@ class SacadorFragment :
|
|||
|
||||
ma.hideBottomNavigation(View.VISIBLE)
|
||||
|
||||
binding.mainToolbar.backButton.setOnClickListener{
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconAdd = ImageView(context)
|
||||
|
@ -141,9 +137,13 @@ class SacadorFragment :
|
|||
|
||||
iconAdd.drawable -> {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
checkTagsMode()
|
||||
/* viewModel.collection_new_wagon(getData(USER),
|
||||
getData(PASSWORD),getData(SECTORFK),getData(WAGON),getData(TAGSTYPE),"collection_new_wagon")*/
|
||||
// checkTagsMode()
|
||||
viewModel.collectionNew(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(SECTORFK),
|
||||
getData(WAGON)
|
||||
)
|
||||
}
|
||||
iconVehicleIn.drawable -> ma.onVehicleSelected(SacadorFragment.TAG)
|
||||
}
|
||||
|
@ -168,31 +168,30 @@ class SacadorFragment :
|
|||
|
||||
private fun checkTagsMode() {
|
||||
|
||||
|
||||
if (getData(TAGSTYPE).equals("Stickers")) {
|
||||
//sergio:codigo smarttags
|
||||
if (getData(TAGSTYPE).equals(getString(R.string.stickers))) {
|
||||
viewModel.collectionNew(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(SECTORFK),
|
||||
getData(WAGON)
|
||||
)
|
||||
} else if (getCollections) {
|
||||
//Log.d("VERDNATURA::","getCollections sobrevive")
|
||||
viewModel.collection_new_smart(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(SECTORFK),
|
||||
getData(WAGON),
|
||||
getData(TAGSTYPE)
|
||||
)
|
||||
} else if (getCollections) {
|
||||
|
||||
} else {
|
||||
requireActivity().addFragment(
|
||||
AssociateSmartTagsFragment.newInstance(AssociateSmartTagsFragment.TAG),
|
||||
R.id.main_frame_layout,
|
||||
AssociateSmartTagsFragment.TAG
|
||||
)
|
||||
// }
|
||||
viewModel.collection_new_smart(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(SECTORFK),
|
||||
getData(WAGON),
|
||||
getData(TAGSTYPE)
|
||||
)
|
||||
|
||||
} else {
|
||||
requireActivity().addFragment(
|
||||
AssociateSmartTagsFragment.newInstance(AssociateSmartTagsFragment.TAG),
|
||||
R.id.main_frame_layout,
|
||||
AssociateSmartTagsFragment.TAG
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
@ -246,18 +245,17 @@ class SacadorFragment :
|
|||
responseCollectionSmart.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
||||
getCollections=false
|
||||
getCollections = false
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
// viewModel.smartTagInsertTicket(it.response)
|
||||
} else {
|
||||
//ma.messageWithSound(it.errorMessage, false, false)
|
||||
viewModel.smartTagInsertTicket(it.response)
|
||||
} else {
|
||||
|
||||
goBack = false
|
||||
}
|
||||
viewModel.smartTagInsertTicket(it.response)
|
||||
|
||||
goBack = false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -267,10 +265,10 @@ class SacadorFragment :
|
|||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
getCollections=true
|
||||
getCollections = true
|
||||
} else {
|
||||
ma.messageWithSound(it.errorMessage, false, false)
|
||||
getCollections=false
|
||||
ma.messageWithSound(getString(R.string.ticketInsert), false, false)
|
||||
getCollections = false
|
||||
viewModel.collectionGetSalix(getData(TOKEN))
|
||||
}
|
||||
goBack = false
|
||||
|
@ -302,7 +300,12 @@ class SacadorFragment :
|
|||
}
|
||||
}
|
||||
if (isNew) {
|
||||
collectionsList.add(CollectionVO(collectionFk = collection, created = getString(R.string.newCreated)))
|
||||
collectionsList.add(
|
||||
CollectionVO(
|
||||
collectionFk = collection,
|
||||
created = getString(R.string.newCreated)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
adapter?.notifyDataSetChanged()
|
||||
|
|
|
@ -24,8 +24,9 @@ import retrofit2.Response
|
|||
|
||||
class SacadorViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
val emptyMessage = "No tienes colecciones pendientes. Presiona sobre el + para crear colección"
|
||||
//val emptyMessage = "No tienes colecciones pendientes. Presiona sobre el + para crear colección"
|
||||
|
||||
private val contextApp=context
|
||||
private val getSacadorControladorUserCase: GetSacadorControladorUserCase = GetSacadorControladorUserCase(
|
||||
context
|
||||
)
|
||||
|
@ -85,7 +86,7 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<CollectionVO>
|
||||
) {
|
||||
if (response.body() != null) {
|
||||
_collectionTicketList.value = response.body()?.let { it.map() }
|
||||
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
|
||||
} else {
|
||||
_collectionTicketList.value = CollectionVO(
|
||||
isError = true,
|
||||
|
@ -205,7 +206,7 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
|
|||
) {
|
||||
if (response.body() != null) {
|
||||
_collectionList.value =
|
||||
response.body()?.let { CollectionListVO(it.toDateFormat()) }
|
||||
response.body()?.let { CollectionListVO(it.toDateFormat(contextApp)) }
|
||||
} else {
|
||||
val listError: ArrayList<CollectionVO> = ArrayList()
|
||||
listError.add(
|
||||
|
@ -238,7 +239,7 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
|
|||
) {
|
||||
if (response.body() != null) {
|
||||
_collectionList.value =
|
||||
response.body()?.let { CollectionListVO(it.toDateFormat()) }
|
||||
response.body()?.let { CollectionListVO(it.toDateFormat(contextApp)) }
|
||||
} else {
|
||||
val listError: ArrayList<CollectionVO> = ArrayList()
|
||||
listError.add(
|
||||
|
@ -271,7 +272,7 @@ class SacadorViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
if (response.isSuccessful){
|
||||
responseSmart = SmartTagRegister(
|
||||
message="Ticket insertado OK.",
|
||||
message="",
|
||||
isError = false,
|
||||
errorMessage = ""
|
||||
)
|
||||
|
|
|
@ -1,17 +1,19 @@
|
|||
package es.verdnatura.presentation.view.feature.sacador.mapper
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.presentation.common.convertToDateString
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
fun List<CollectionVO>.toDateFormat(): ArrayList<CollectionVO> {
|
||||
fun List<CollectionVO>.toDateFormat(context:Context): ArrayList<CollectionVO> {
|
||||
val collections : ArrayList<CollectionVO> = ArrayList()
|
||||
this.forEach {
|
||||
collections.add(CollectionVO(
|
||||
collectionFk = it.collectionFk,
|
||||
created = getCalendarFromDate(it.created).convertToDateString()
|
||||
created = getCalendarFromDate(it.created,context).convertToDateString()
|
||||
))
|
||||
|
||||
}
|
||||
|
@ -19,8 +21,8 @@ fun List<CollectionVO>.toDateFormat(): ArrayList<CollectionVO> {
|
|||
}
|
||||
|
||||
|
||||
private fun getCalendarFromDate(date:String): Calendar {
|
||||
val sdf = SimpleDateFormat("yyyy-MM-dd")
|
||||
private fun getCalendarFromDate(date:String,context:Context): Calendar {
|
||||
val sdf = SimpleDateFormat(context.getString(R.string.dateFormat))
|
||||
val cal = Calendar.getInstance()
|
||||
cal.setTime(sdf.parse(date))
|
||||
return cal
|
||||
|
|
|
@ -34,10 +34,11 @@ class ShowTicketFragment(var menuOrigin: String) :
|
|||
|
||||
override fun init() {
|
||||
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
// binding.splashProgress.visibility = View.GONE
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.verticket)
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
||||
if (menuOrigin == "Main") {
|
||||
if (menuOrigin == getString(R.string.main)) {
|
||||
hideBackButton(binding.mainToolbar)
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import retrofit2.Callback
|
|||
import retrofit2.Response
|
||||
|
||||
class ShowTicketViewModel(context: Context) : BaseViewModel() {
|
||||
|
||||
private val contextApp=context
|
||||
private val _collectionTicketList by lazy { MutableLiveData<CollectionVO>() }
|
||||
private val getPreControladorUserCase: GetPreControladorUserCase = GetPreControladorUserCase(context)
|
||||
|
||||
|
@ -37,7 +37,7 @@ class ShowTicketViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<CollectionVO>
|
||||
) {
|
||||
if (response.body() != null){
|
||||
_collectionTicketList.value = response.body()?.let { it.map() }
|
||||
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
|
||||
}else{
|
||||
_collectionTicketList.value = CollectionVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
}
|
||||
|
|
|
@ -81,8 +81,6 @@ class RegisterSmartTagsFragment(
|
|||
|
||||
private fun setToolBar() {
|
||||
|
||||
|
||||
// Log.d("VERDNATURA::","Title"+entryPoint)
|
||||
binding.mainToolbar.toolbarTitle.text = entryPoint
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
|
@ -241,7 +239,7 @@ class RegisterSmartTagsFragment(
|
|||
var message = ""
|
||||
|
||||
when (TagScaned) {
|
||||
1 -> message = "Carro:"
|
||||
1 -> message = getString(R.string.scannedWagon)
|
||||
2 -> message = getString(R.string.highLabel)
|
||||
3 -> message = getString(R.string.midLabel)
|
||||
4 -> message = getString(R.string.lowLabel)
|
||||
|
|
|
@ -243,7 +243,7 @@ class AssociateSmartTagsFragment(
|
|||
if (listSmartTags.size > 0) {
|
||||
// setFragmentResult("requestkey", bundleOf("tagMode" to "SmartTag"))
|
||||
customDialogList.dismiss()
|
||||
val result = "complete"
|
||||
val result = getString(R.string.complete)
|
||||
setFragmentResult("requestKey", bundleOf("tagMode" to result))
|
||||
ma.openFragmentPickers(true)
|
||||
/*listSmartTags.forEach {
|
||||
|
|
|
@ -1,22 +1,15 @@
|
|||
package es.verdnatura.presentation.view.feature.smarttag.sacador.fragment
|
||||
|
||||
import android.content.Context
|
||||
import android.os.Message
|
||||
import android.util.Log
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import com.google.gson.JsonObject
|
||||
import es.verdnatura.domain.GetSmarttagsUserCase
|
||||
import es.verdnatura.domain.GetVehicleControlTimeUserCase
|
||||
import es.verdnatura.domain.NodeJsService
|
||||
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.login.model.errorMessage
|
||||
import es.verdnatura.presentation.view.feature.smarttag.sacador.model.SmartTagRegister
|
||||
import org.json.JSONObject
|
||||
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
@ -51,96 +44,115 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
|||
get() = _registerSmarttagNode
|
||||
|
||||
|
||||
fun workerShelving_add(usuario:String,password:String,shelvingFK:String){
|
||||
GetSmarttagsUserCase.workerShelving_add(usuario,password,shelvingFK).enqueue(object : Callback<Void>{
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
fun workerShelving_add(usuario: String, password: String, shelvingFK: String) {
|
||||
GetSmarttagsUserCase.workerShelving_add(usuario, password, shelvingFK)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
|
||||
_responseadd.value = messageError(t.message!!, nameofFunction(this))
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
if (!response.isSuccessful){
|
||||
_responseadd.value = messageError(response.message(),nameofFunction(this))
|
||||
}else{
|
||||
_responseadd.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||
_responseadd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
if (!response.isSuccessful) {
|
||||
_responseadd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
} else {
|
||||
_responseadd.value = ResponseItemVO(
|
||||
isError = false,
|
||||
errorMessage = response.message()
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
fun messageError(message: String,call: String ): ResponseItemVO? {
|
||||
/* fun messageError(message: String, call: String): ResponseItemVO? {
|
||||
return ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = "Error al llamar a " + call + " . Descripción del error:" + message
|
||||
)
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
fun workerShelving_delete(usuario:String,password:String,vBarcode:String){
|
||||
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!!,nameofFunction(this))
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
if (!response.isSuccessful){
|
||||
_responseremove.value = messageError(response.message(),nameofFunction(this))
|
||||
}else{
|
||||
_responseremove.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||
fun workerShelving_delete(usuario: String, password: String, vBarcode: String) {
|
||||
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 = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
t.message!!
|
||||
))
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
}
|
||||
if (!response.isSuccessful) {
|
||||
_responseremove.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
} else {
|
||||
_responseremove.value =
|
||||
ResponseItemVO(isError = false, response = response.message()!!)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
fun smartTagRegister(smarttag: String, wagon: String, shelving: String)
|
||||
{
|
||||
fun smartTagRegister(smarttag: String, wagon: String, shelving: String) {
|
||||
GetSmarttagsUserCase.smartTagRegister(smarttag, wagon, shelving)
|
||||
.enqueue(object : Callback<SmartTagRegister>
|
||||
{
|
||||
.enqueue(object : Callback<SmartTagRegister> {
|
||||
override fun onResponse(
|
||||
call: Call<SmartTagRegister>,
|
||||
response: Response<SmartTagRegister>
|
||||
)
|
||||
{
|
||||
) {
|
||||
|
||||
val responseSmart: SmartTagRegister
|
||||
|
||||
if (response.isSuccessful){
|
||||
responseSmart = SmartTagRegister(
|
||||
message="Registrada smartTag.",
|
||||
isError = false,
|
||||
errorMessage = ""
|
||||
)
|
||||
if (response.isSuccessful) {
|
||||
responseSmart = SmartTagRegister(
|
||||
message = response.message(),
|
||||
isError = false,
|
||||
errorMessage = ""
|
||||
)
|
||||
|
||||
}else{
|
||||
} else {
|
||||
// sergio: buscar JSON obtindre el "message" Smarttag
|
||||
var text = JSONObject(response.errorBody()!!.string()).get("error")
|
||||
var message =JSONObject(text.toString()).get("message")
|
||||
var text = JSONObject(response.errorBody()!!.string()).get("error")
|
||||
var message = JSONObject(text.toString()).get("message")
|
||||
|
||||
responseSmart = SmartTagRegister(
|
||||
isError = true,
|
||||
errorMessage = message.toString()
|
||||
)
|
||||
|
||||
//Log.d("VERDNATURA::","" +message)
|
||||
}
|
||||
responseSmart = SmartTagRegister(
|
||||
isError = true,
|
||||
errorMessage = message.toString()
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
_registerSmarttagNode.value = responseSmart
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<SmartTagRegister>, t: Throwable)
|
||||
{
|
||||
override fun onFailure(call: Call<SmartTagRegister>, t: Throwable) {
|
||||
val responseSmart =
|
||||
SmartTagRegister(isError = true, errorMessage = t.message!!)
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ class UbicadorAdapter (
|
|||
fun bind(item: ItemUbicadorVO) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
multiText.text = item.stickers+"x"+item.packing
|
||||
multiText.text = "${item.stickers}x${item.packing}"
|
||||
imgItem.loadUrl("https://verdnatura.es/vn-image-data/catalog/200x200/"+item.item)
|
||||
imgItem.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(
|
||||
|
|
|
@ -23,33 +23,36 @@ import es.verdnatura.presentation.view.feature.workermistake.model.MistakeWorker
|
|||
import es.verdnatura.presentation.view.feature.workermistake.model.WorkerFromMistake
|
||||
import ir.mirrajabi.searchdialog.SimpleSearchDialogCompat
|
||||
|
||||
class WorkermistakeFragment( var entryPoint: String = ""
|
||||
class WorkermistakeFragment(
|
||||
var entryPoint: String = ""
|
||||
|
||||
) : BaseFragment<FragmentWorkermistakeBinding, InventaryViewModel>(
|
||||
InventaryViewModel::class) {
|
||||
InventaryViewModel::class
|
||||
) {
|
||||
|
||||
private var adapterworker:WorkermistakeAdapter? = null
|
||||
private var adapterworker: WorkermistakeAdapter? = null
|
||||
|
||||
private lateinit var customDialogInput: CustomDialogInput
|
||||
|
||||
|
||||
private var listWorker:MutableList<WorkerFromMistake> = ArrayList()
|
||||
private var listWorkerAuxiliary:MutableList<WorkerFromMistake> = ArrayList()
|
||||
private var listWorker: MutableList<WorkerFromMistake> = ArrayList()
|
||||
private var listWorkerAuxiliary: MutableList<WorkerFromMistake> = ArrayList()
|
||||
private lateinit var customDialog: CustomDialog
|
||||
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
|
||||
private var layoutManager : LinearLayoutManager? = null
|
||||
// private var firstVisiblePosition = 0
|
||||
private var layoutManager: LinearLayoutManager? = null
|
||||
|
||||
// private var firstVisiblePosition = 0
|
||||
private lateinit var customDialogList: CustomDialogList
|
||||
private var listMistakes: ArrayList<BarcodeVO> = ArrayList()
|
||||
private var listMistakesAdapter: BarcodeAdapter? = null
|
||||
private var workerMistakeName: WorkerFromMistake? = null
|
||||
private var workerMistakeName: WorkerFromMistake? = null
|
||||
|
||||
|
||||
private val departments=ArrayList<SearchDepartmentModel>()
|
||||
private lateinit var departmentId:String
|
||||
private val departments = ArrayList<SearchDepartmentModel>()
|
||||
private lateinit var departmentId: String
|
||||
|
||||
companion object {
|
||||
fun newInstance(entryPoint:String) = WorkermistakeFragment(entryPoint)
|
||||
fun newInstance(entryPoint: String) = WorkermistakeFragment(entryPoint)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_workermistake
|
||||
|
@ -62,11 +65,14 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
|
||||
|
||||
var working_in_test=false //sergio:No posar a true fins que Salix puje versió 8.3
|
||||
var working_in_test = false //sergio:No posar a true fins que Salix puje versió 8.3
|
||||
|
||||
if (!working_in_test){
|
||||
viewModel.department_getHasMistake(usuario = getData(USER),password = getData(PASSWORD))
|
||||
}else{
|
||||
if (!working_in_test) {
|
||||
viewModel.department_getHasMistake(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD)
|
||||
)
|
||||
} else {
|
||||
viewModel.department_getHasMistakeSalix(getData(TOKEN))
|
||||
}
|
||||
|
||||
|
@ -76,26 +82,38 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
|
||||
override fun init() {
|
||||
|
||||
|
||||
|
||||
binding.filterDepartment.setText(getData(DEPARTMENTMISTAKE))
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
departmentId=getData(DEPARTMENTMISTAKEID)
|
||||
|
||||
departmentId = getData(DEPARTMENTMISTAKEID)
|
||||
|
||||
customDialogList = CustomDialogList(requireContext())
|
||||
|
||||
if (!departmentId.isEmpty()){
|
||||
viewModel.worker_getFromHasMistake(getData(USER),getData(PASSWORD),getData(DEPARTMENTMISTAKEID))
|
||||
if (!departmentId.isEmpty()) {
|
||||
viewModel.worker_getFromHasMistake(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(DEPARTMENTMISTAKEID)
|
||||
)
|
||||
}
|
||||
|
||||
binding.filterDepartment.setOnClickListener{
|
||||
SimpleSearchDialogCompat(context,getString(R.string.departamentos),getString(R.string.escribirparteNombre),null,departments,
|
||||
binding.filterDepartment.setOnClickListener {
|
||||
SimpleSearchDialogCompat(context,
|
||||
getString(R.string.departamentos),
|
||||
getString(R.string.escribirparteNombre),
|
||||
null,
|
||||
departments,
|
||||
{ baseSearchDialogCompat, nombre, position ->
|
||||
|
||||
binding.filterDepartment.setText((nombre.title))
|
||||
|
||||
saveData(DEPARTMENTMISTAKE,nombre.getDepartmentName())
|
||||
saveData(DEPARTMENTMISTAKEID,nombre.getDepartmentId())
|
||||
viewModel.worker_getFromHasMistake(getData(USER),getData(PASSWORD),nombre.getDepartmentId())
|
||||
saveData(DEPARTMENTMISTAKE, nombre.getDepartmentName())
|
||||
saveData(DEPARTMENTMISTAKEID, nombre.getDepartmentId())
|
||||
viewModel.worker_getFromHasMistake(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
nombre.getDepartmentId()
|
||||
)
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
binding.filterItemFk.isEnabled = true
|
||||
baseSearchDialogCompat.dismiss()
|
||||
|
@ -112,47 +130,55 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
super.init()
|
||||
}
|
||||
|
||||
private fun setToolBar(){
|
||||
private fun setToolBar() {
|
||||
|
||||
binding.mainToolbar.toolbarTitle.text=entryPoint
|
||||
binding.mainToolbar.toolbarTitle.text = entryPoint
|
||||
|
||||
}
|
||||
|
||||
private fun setEvents(){
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
}
|
||||
if (binding.filterDepartment.text.isNullOrEmpty()){binding.filterItemFk.isEnabled = false}
|
||||
binding.filterItemFk.addTextChangedListener{ filter()}
|
||||
if (binding.filterDepartment.text.isNullOrEmpty()) {
|
||||
binding.filterItemFk.isEnabled = false
|
||||
}
|
||||
binding.filterItemFk.addTextChangedListener { filter() }
|
||||
|
||||
}
|
||||
|
||||
private fun filter() {
|
||||
|
||||
if (!listWorker.isNullOrEmpty())
|
||||
{listWorker.clear()
|
||||
listWorker.addAll(listWorkerAuxiliary.filter{it.firstName.uppercase().contains(binding.filterItemFk.text.toString().uppercase()) || it.lastName.uppercase().contains(binding.filterItemFk.text.toString().uppercase())} as MutableList<WorkerFromMistake>)
|
||||
adapterworker!!.notifyDataSetChanged()}
|
||||
if (!listWorker.isNullOrEmpty()) {
|
||||
listWorker.clear()
|
||||
listWorker.addAll(listWorkerAuxiliary.filter {
|
||||
it.firstName.uppercase().contains(
|
||||
binding.filterItemFk.text.toString().uppercase()
|
||||
) || it.lastName.uppercase()
|
||||
.contains(binding.filterItemFk.text.toString().uppercase())
|
||||
} as MutableList<WorkerFromMistake>)
|
||||
adapterworker!!.notifyDataSetChanged()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* override fun onPause() {
|
||||
super.onPause()
|
||||
firstVisiblePosition = layoutManager?.findFirstVisibleItemPosition() ?: 0
|
||||
}*/
|
||||
/* override fun onPause() {
|
||||
super.onPause()
|
||||
firstVisiblePosition = layoutManager?.findFirstVisibleItemPosition() ?: 0
|
||||
}*/
|
||||
|
||||
/* override fun onResume() {
|
||||
super.onResume()
|
||||
if (binding.workermistakeRecyclerview.layoutManager != null){
|
||||
if (firstVisiblePosition <= listInvetory.size){
|
||||
binding.workermistakeRecyclerview.layoutManager!!.scrollToPosition(firstVisiblePosition)
|
||||
}
|
||||
}
|
||||
}*/
|
||||
/* override fun onResume() {
|
||||
super.onResume()
|
||||
if (binding.workermistakeRecyclerview.layoutManager != null){
|
||||
if (firstVisiblePosition <= listInvetory.size){
|
||||
binding.workermistakeRecyclerview.layoutManager!!.scrollToPosition(firstVisiblePosition)
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
override fun observeViewModel() {
|
||||
with(viewModel){
|
||||
with(viewModel) {
|
||||
|
||||
|
||||
mistakeDepartmentList.observe(viewLifecycleOwner, {
|
||||
|
@ -161,25 +187,31 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
|
||||
})
|
||||
workerFromMistakeList.observe(viewLifecycleOwner, {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
createWorkerList(it.list)
|
||||
|
||||
adapterworker= WorkermistakeAdapter(listWorker,object:onMistakeWorkerClickListener{
|
||||
adapterworker =
|
||||
WorkermistakeAdapter(listWorker, object : onMistakeWorkerClickListener {
|
||||
|
||||
override fun onMistakeWorkerClickListener(item: WorkerFromMistake) {
|
||||
viewModel.workerMistakeType_get(usuario = getData(USER), password = getData(PASSWORD))
|
||||
workerMistakeName=WorkerFromMistake(item.id,item.firstName,item.lastName,true,"")
|
||||
override fun onMistakeWorkerClickListener(item: WorkerFromMistake) {
|
||||
viewModel.workerMistakeType_get(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD)
|
||||
)
|
||||
workerMistakeName =
|
||||
WorkerFromMistake(item.id, item.firstName, item.lastName, true, "")
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
binding.workermistakeRecyclerview.adapter = adapterworker
|
||||
layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
binding.workermistakeRecyclerview.layoutManager = layoutManager
|
||||
|
||||
})
|
||||
|
||||
mistakeWorkerList.observe(viewLifecycleOwner,{
|
||||
mistakeWorkerList.observe(viewLifecycleOwner, {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
showMistakeList(it.list)
|
||||
//goBack = false
|
||||
|
@ -188,13 +220,25 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
|
||||
responseAddMistake.observe(viewLifecycleOwner, {
|
||||
|
||||
ma.messageWithSound(if (it.isError){it.errorMessage}else{getString(R.string.errorCauseRegistered)},it.isError,true, isToasted = true)
|
||||
|
||||
ma.messageWithSound(
|
||||
if (it.isError) {
|
||||
if (it.codeError == 403) {
|
||||
getString(R.string.userNotPermission)
|
||||
} else {
|
||||
it.errorMessage
|
||||
}
|
||||
|
||||
} else {
|
||||
getString(R.string.errorCauseRegistered)
|
||||
}, it.isError, true, isToasted = true
|
||||
)
|
||||
|
||||
})
|
||||
|
||||
response.observe(viewLifecycleOwner, {
|
||||
if (it.isError){
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -210,10 +254,14 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
}
|
||||
|
||||
|
||||
customDialogList.setTitle(getString(R.string.errorCause)+ workerMistakeName!!.firstName).setKoButton(getString(
|
||||
R.string.cancel)) {
|
||||
customDialogList.dismiss()
|
||||
}.hideDialog().show()
|
||||
customDialogList.setTitle(getString(R.string.errorCause) + workerMistakeName!!.firstName)
|
||||
.setKoButton(
|
||||
getString(
|
||||
R.string.cancel
|
||||
)
|
||||
) {
|
||||
customDialogList.dismiss()
|
||||
}.hideDialog().show()
|
||||
|
||||
|
||||
listMistakesAdapter =
|
||||
|
@ -221,12 +269,13 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
override fun onBarcodeRowClickListener(item: BarcodeVO) {
|
||||
list.forEach {
|
||||
if (it.description == item.code) {
|
||||
viewModel.workerMistake_Add(usuario = getData(USER),
|
||||
viewModel.workerMistake_Add(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
vUserFk = workerMistakeName!!.id,
|
||||
vTypeFk = it.code
|
||||
)
|
||||
// getString(R.string.errorRegistered).toast(requireContext())
|
||||
// getString(R.string.errorRegistered).toast(requireContext())
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
}
|
||||
|
@ -242,24 +291,28 @@ class WorkermistakeFragment( var entryPoint: String = ""
|
|||
}
|
||||
|
||||
|
||||
private fun createDepartmentList(list: List<DepartmentMistake>){
|
||||
private fun createDepartmentList(list: List<DepartmentMistake>) {
|
||||
departments.clear()
|
||||
list.forEach { department ->
|
||||
if (!department.isError){
|
||||
if (!department.isError) {
|
||||
try {
|
||||
departments.add(SearchDepartmentModel(department.name,department.id))
|
||||
}catch (e:Exception){}
|
||||
departments.add(SearchDepartmentModel(department.name, department.id))
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
}}
|
||||
private fun createWorkerList(list: List<WorkerFromMistake>){
|
||||
}
|
||||
}
|
||||
|
||||
private fun createWorkerList(list: List<WorkerFromMistake>) {
|
||||
listWorker.clear()
|
||||
|
||||
list.forEach { worker ->
|
||||
|
||||
if (!worker.isError){
|
||||
try {
|
||||
listWorker.add(worker)
|
||||
}catch (e:Exception){}
|
||||
if (!worker.isError) {
|
||||
try {
|
||||
listWorker.add(worker)
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -45,9 +45,9 @@
|
|||
<string name="Close">Cerrar</string>
|
||||
<string name="Noexistessectores">No existes sectores.</string>
|
||||
<string name="Seleccionaunsector">Selecciona un sector</string>
|
||||
<string name="Pasilleros">Pasilleros</string>
|
||||
<string name="Controladores">Controladores</string>
|
||||
<string name="Paletizadores">Paletizadores</string>
|
||||
<string name="titleCorridors">Pasilleros</string>
|
||||
<string name="titleControllers">Controladores</string>
|
||||
<string name="titlePalletizers">Paletizadores</string>
|
||||
<string name="Ajustes">Ajustes</string>
|
||||
<string name="titleItemConsult">Consultar artículo</string>
|
||||
<string name="BuscarItem">Buscar Item</string>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<string name="deviceName">Nombre del dispositivo:</string>
|
||||
<string name="assigned_user">Dispositivo asignado a:</string>
|
||||
<string name="ScanPlateOrSmarttag">Escanea matrícula o smarttag</string>
|
||||
<string name="ExpeditionState">Consultar estado expedición</string>
|
||||
<string name="titleExpeditionState">Consultar estado expedición</string>
|
||||
<string name="BuffersManegement">Gestión de buffers</string>
|
||||
<string name="PalletMake">Paletizar</string>
|
||||
<string name="expedition">Expedición :</string>
|
||||
|
@ -134,7 +134,7 @@
|
|||
<string name="minQuantity">Cantidad mín.</string>
|
||||
<string name="producer">Productor</string>
|
||||
<string name="controlticket">Controlar ticket</string>
|
||||
<string name="ExpeditionScan">Escanear expedición</string>
|
||||
<string name="titleExpeditionScan">Escanear expedición</string>
|
||||
<string name="dayofSale">Día de venta</string>
|
||||
<string name="wagon">Carro</string>
|
||||
<string name="Referencia">Referencia</string>
|
||||
|
@ -200,7 +200,7 @@
|
|||
<string name="errorCause">Causa de error para :</string>
|
||||
<string name="scanShelving">Escanea una matrícula</string>
|
||||
<string name="parkingShelving">Aparcar carro</string>
|
||||
<string name="parking">Aparcar</string>
|
||||
<string name="parking">Parking</string>
|
||||
<string name="addItemShelving">Añade item al carro</string>
|
||||
<string name="save">Guardar</string>
|
||||
<string name="allowChangeShelving">Permite cambiar la matrícula a un carro</string>
|
||||
|
@ -229,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">"\"Calidad\" "</string>
|
||||
<string name="previousCollected">Previa recogida</string>
|
||||
<string name="disponibility">Disponibilidad</string>
|
||||
<string name="unmarkLine">Desmarcar línea</string>
|
||||
<string name="goUnmark">Vas a desmarcar la línea: </string>
|
||||
|
@ -342,7 +342,7 @@
|
|||
<string name="titleFaults">Faltas</string>
|
||||
<string name="titleShelvingParking">Shelving Parking</string>
|
||||
<string name="titleAuto">Automatic</string>
|
||||
<string name="titleQuality">Origen</string>
|
||||
<string name="titleQuality">Calidad</string>
|
||||
<string name="titlePickers">Sacadores</string>
|
||||
<string name="titleWebViewer">Visor web</string>
|
||||
<string name="titleBufferEmpty">Vaciado buffer</string>
|
||||
|
@ -365,7 +365,7 @@
|
|||
<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="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>
|
||||
|
@ -373,4 +373,72 @@
|
|||
<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>
|
||||
<string name="timeFormat">HH:mm</string>
|
||||
<string name="dateCompleteFormat">yyyy-mm-dd HH:mm</string>
|
||||
<string name="sector">Sector</string>
|
||||
<string name="wagoons">Carros</string>
|
||||
<string name="printerWithout">Sin impresora</string>
|
||||
<string name="printerLabel">Impresora etiquetas</string>
|
||||
<string name="labelType">Tipo etiqueta</string>
|
||||
<string name="vehicleControl">Control de vehículos</string>
|
||||
<string name="userNotPermission">Usuario sin permisos para realizar la acción</string>
|
||||
<string name="messageUserError">Revisa tu usuario y contraseña. En caso de no poder acceder contacta co Informática</string>
|
||||
<string name="ok">Ok</string>
|
||||
<string name="ticket">"Ticket: "</string>
|
||||
<string name="expedit">"Expedition: "</string>
|
||||
<string name="dayFormat">dd/MM/yyyy</string>
|
||||
<string name="regExp">[a-zA-Z ]+</string>
|
||||
<string name="ticketInsert">Ticket insertado OK</string>
|
||||
<string name="errorCollectionNew">Error en la llamada al añadir colección.</string>
|
||||
<string name="errorTicketAdd">Error al añadir ticket a la colección.</string>
|
||||
<string name="errorChangeState">Error al cambiar el estado a la colección de previa.</string>
|
||||
<string name="complete">complete</string>
|
||||
<string name="titlePickerDescrip">Obtiene colecciones para sacar en previa</string>
|
||||
<string name="titlePreControlDescrip">Sirve para revisar un ticket de previa</string>
|
||||
<string name="titleShowTicketDescrip">Muestra un ticket sin la posibilidad de modicarlo</string>
|
||||
<string name="titleItemConsultDescrip">Busca información de un ítem</string>
|
||||
<string name="titleParkingDescrip">Permite aparcar tickets o carros</string>
|
||||
<string name="titleItemSearchDescrip">Busca donde se encuentra un ítem</string>
|
||||
<string name="titleUbicatorDescrip">Permite ubicar/saber los ítems de un carro</string>
|
||||
<string name="titleInventoryDescrip">Visualiza que falta o está desubicado</string>
|
||||
<string name="titleWorkerMistakeDescrip">Permite añadir fallos a un trabajador</string>
|
||||
<string name="titleShelvingHistDescrip">Permite saber modificaciones de items en un carro</string>
|
||||
<string name="titleLogShelvingDescrip">Permite conocer los movimientos en un carro</string>
|
||||
<string name="titleHistVehicleDescrip">Visualiza quien y cuando ha llevado un vehículo</string>
|
||||
<string name="titleDayDescrip">Permite saber la fecha de venta de los items de un carro</string>
|
||||
<string name="titleReplacDescrip">Indica que falta reponer</string>
|
||||
<string name="titleFaultsDescrip">Visualiza las faltas en almacén</string>
|
||||
<string name="titleShelParkDescrip">Muestra parking de estanterías</string>
|
||||
<string name="titleQualityDescrip">Permite conocer la calidad de algunos productos por comprador</string>
|
||||
<string name="titlePalletDescrip">Permite escanear pallet para incorporarlo al sistema</string>
|
||||
<string name="titleExpeditionDescrip">Permite conocer el estado de una expedición</string>
|
||||
<string name="titleExpScanDescrip">Permite escanear expediciones que no han pasado por el sorter</string>
|
||||
<string name="titleBufferMangDescrip">Se accede al menú de operaciones con los buffers del sorter</string>
|
||||
<string name="titleQrDescrip">Permite leer información en un qr</string>
|
||||
<string name="titleBufferEmptyDescrip">Pone en modo vaciado un buffer</string>
|
||||
<string name="titleBufferFillDescrip">Pone en modo llenado un buffer</string>
|
||||
<string name="titleBufferAccDescrip">Pone en modo acumulación un buffer</string>
|
||||
<string name="titleBufferOffDescrip">Pone en modo desactivado un buffer</string>
|
||||
<string name="titleBufferStrapDescrip">Pone en modo flejado un buffer</string>
|
||||
<string name="titleBufferLoadDescrip">Pone en modo cargar un buffer</string>
|
||||
<string name="titleCorridorsDescrip">Accede menú de los pasilleros:presacar, ver ticket, ubicador...</string>
|
||||
<string name="titlePickersDescrip">Accede a sacar pedidos</string>
|
||||
<string name="titleControlDescrip">Accede a la revisión de los tickets</string>
|
||||
<string name="titlePalletizDescrip">Accede al menú de paletizadores: paletizar, buffer...</string>
|
||||
<string name="titleClaimsDescrip">Accede al menú de reclamaciones</string>
|
||||
<string name="titleClaimDescrip">Ubicación de reclamaciones</string>
|
||||
<string name="collectionErrorBuilding">Error al construir la colección. Descripción del error:</string>
|
||||
<string name="main">Principal</string>
|
||||
<string name="sentToTrashPrevious">"Se ha enviado desde previa a Basura "</string>
|
||||
<string name="sentToTrashFaults">"Se ha enviado desde previa a Faltas la cantidad de "</string>
|
||||
<string name="modifiedQuantityPrevious">"Se ha modificado desde previa la cantidad de "</string>
|
||||
<string name="fromItem">" del articulo "</string>
|
||||
<string name="ticketSpaces">" ticket "</string>
|
||||
<string name="ticketCompleted">Ticket completo</string>
|
||||
<string name="toNewQuantity">" a nueva cantidad: "</string>
|
||||
<string name="getPreviousCollection">Obtener colección previa</string>
|
||||
<string name="saleParked">Sale/s aparcada/s</string>
|
||||
<string name="modifiedOriginalQuantityPrevious">"Se ha modificado desde previa la cantidad de "</string>
|
||||
<string name="url">url</string>
|
||||
<string name="title">title</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="titleFaults">Fouls</string>
|
||||
<string name="titleFaults">Foults</string>
|
||||
<string name="Versión">Version</string>
|
||||
<string name="Usuario">User</string>
|
||||
<string name="Escaneaetiqueta">Scan label</string>
|
||||
|
@ -47,9 +47,9 @@
|
|||
<string name="Noprinters">There are no printers.</string>
|
||||
<string name="Seleccionaunsector">Select a sector</string>
|
||||
<string name="Selecccionaimpresoara">Select a printer</string>
|
||||
<string name="Pasilleros">Corridors</string>
|
||||
<string name="Controladores">Controller</string>
|
||||
<string name="Paletizadores">Palletizers</string>
|
||||
<string name="titleCorridors">Corridors</string>
|
||||
<string name="titleControllers">Controllers</string>
|
||||
<string name="titlePalletizers">Palletizers</string>
|
||||
<string name="Ajustes">Setting</string>
|
||||
<string name="BuscarItem">Search item</string>
|
||||
<string name="titleInventory">Inventory</string>
|
||||
|
@ -88,7 +88,7 @@
|
|||
<string name="packingType">Packing type</string>
|
||||
<string name="sinubicar">Downstairs</string>
|
||||
<string name="Seleccionauncarro">Select a wagon</string>
|
||||
<string name="itemShelvingRadar">Shelving Radar</string>
|
||||
<string name="itemShelvingRadar">Inventory Radar</string>
|
||||
<string name="buscarcomprador">Search buyer</string>
|
||||
<string name="escribirparteNombre">Write here</string>
|
||||
<string name="compradores">Buyers</string>
|
||||
|
@ -101,6 +101,7 @@
|
|||
<string name="mensajeseleccionencajado">Select packing type zone :</string>
|
||||
<string name="itemdiary">Item diary</string>
|
||||
<string name="getcollection">Get collection</string>
|
||||
<string name="getPreviousCollection">Get previous collection</string>
|
||||
<string name="getticketpre">Get previous ticket</string>
|
||||
<string name="locator">Locator</string>
|
||||
<string name="quality">Quality</string>
|
||||
|
@ -125,7 +126,7 @@
|
|||
<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">Expedition state</string>
|
||||
<string name="titleExpeditionState">Expedition state</string>
|
||||
<string name="BuffersManegement">Buffer Management</string>
|
||||
<string name="PalletMake">Pallet make</string>
|
||||
<string name="scanPallet">Scan pallet</string>
|
||||
|
@ -141,7 +142,7 @@
|
|||
<string name="minQuantity">Min quantity</string>
|
||||
<string name="producer">Producer</string>
|
||||
<string name="controlticket">Control ticket</string>
|
||||
<string name="ExpeditionScan">Scan expedition</string>
|
||||
<string name="titleExpeditionScan">Scan expedition</string>
|
||||
<string name="dayofSale">Day of sale</string>
|
||||
<string name="wagon">Wagon</string>
|
||||
<string name="Referencia">Reference</string>
|
||||
|
@ -176,202 +177,269 @@
|
|||
<string name="androidid">Android_id</string>
|
||||
<string name="baseurl">base_url</string>
|
||||
<string name="smarttagAssociate">Associate SmartTag Punch</string>
|
||||
<string name="insertedLabel">Carro/etiqueta insertado</string>
|
||||
<string name="insertedLabel">Wagon/label added</string>
|
||||
<string name="labelNovalid">Etiqueta o carro no válido</string>
|
||||
<string name="close">Cerrar</string>
|
||||
<string name="deletedLabel">Carro/etiqueta borrada</string>
|
||||
<string name="end">Finalizar</string>
|
||||
<string name="undone">Deshacer</string>
|
||||
<string name="labels">Etiquetas: </string>
|
||||
<string name="close">Close</string>
|
||||
<string name="deletedLabel">Wagon/label deleted</string>
|
||||
<string name="end">Finish</string>
|
||||
<string name="undone">Undo</string>
|
||||
<string name="labels">Labels:</string>
|
||||
<string name="nameApp">warehouse</string>
|
||||
<string name="scanSmarttagOrShelving">Escanea matrícula del carro/s</string>
|
||||
<string name="scanHighLabel">Escanea etiqueta superior</string>
|
||||
<string name="scanMedLabel">Escanea etiqueta del medio</string>
|
||||
<string name="scanLowLabel">Escanea etiqueta inferior</string>
|
||||
<string name="scannedWagon">Carro escaneado</string>
|
||||
<string name="scanned">Escaneado:</string>
|
||||
<string name="speedProblems">Problemas con la velocidad de internet. No se puede usar la voz</string>
|
||||
<string name="allowParking">Permite aparcar ticket/carro</string>
|
||||
<string name="allowTakeoffVehicle">Permite dejar el vehículo</string>
|
||||
<string name="newCollection">Genera colección para sacar</string>
|
||||
<string name="showFilter">"Ver filtro"</string>
|
||||
<string name="showFaults">Ver movimientos de Faltas</string>
|
||||
<string name="showTrash">Ver movimientos de Basura</string>
|
||||
<string name="filterFlower">Filtra por tipo de flor</string>
|
||||
<string name="noprinter">Sin impresora</string>
|
||||
<string name="scanSmarttagOrShelving">Scan wagoon plate</string>
|
||||
<string name="scanHighLabel">Scan high label</string>
|
||||
<string name="scanMedLabel">Scan mid label</string>
|
||||
<string name="scanLowLabel">Scan low label</string>
|
||||
<string name="scannedWagon">Wagoon:</string>
|
||||
<string name="scanned">Scanned:</string>
|
||||
<string name="speedProblems">Problems with Internet Speed</string>
|
||||
<string name="allowParking">Allows you to park a car</string>
|
||||
<string name="allowTakeoffVehicle">Allows you to take off a vehícle</string>
|
||||
<string name="newCollection">Get collection</string>
|
||||
<string name="showFilter">Show filter</string>
|
||||
<string name="showFaults">Show faults movements</string>
|
||||
<string name="showTrash">Show trash movements</string>
|
||||
<string name="filterFlower">Flower filter</string>
|
||||
<string name="noprinter">Without printer</string>
|
||||
<string name="dateFormat">yyyy-MM-dd</string>
|
||||
<string name="cancel">Cancelar</string>
|
||||
<string name="errorCause">Causa de error para :</string>
|
||||
<string name="scanShelving">Escanea una matrícula</string>
|
||||
<string name="parkingShelving">Aparcar carro</string>
|
||||
<string name="parking">Aparcar</string>
|
||||
<string name="addItemShelving">Añade item al carro</string>
|
||||
<string name="save">Guardar</string>
|
||||
<string name="allowChangeShelving">Permite cambiar la matrícula a un carro</string>
|
||||
<string name="deleteAllitems">Borra todos los items del carro</string>
|
||||
<string name="cancel">Cancel</string>
|
||||
<string name="errorCause">Cause of error for :</string>
|
||||
<string name="scanShelving">Scan plate</string>
|
||||
<string name="parkingShelving">Park wagoon</string>
|
||||
<string name="parking">Parking</string>
|
||||
<string name="addItemShelving">Add item to wagoon</string>
|
||||
<string name="save">Save</string>
|
||||
<string name="allowChangeShelving">Allow you to change a wagoon plate</string>
|
||||
<string name="deleteAllitems">Delete all items of wagoon</string>
|
||||
<string name="changePriority">Cambia la prioridad de los items del carro. Cuanto más alta antes cogerán los sacadores.</string>
|
||||
<string name="allowAutomaticAddItem">Permite añadir items al carro de manera continuada. No uno a uno</string>
|
||||
<string name="newItem">Nuevo Item</string>
|
||||
<string name="editItem">Editar item </string>
|
||||
<string name="fillFields">Rellena campos obligatorios</string>
|
||||
<string name="mandatoryPacking">Packing obligatorio</string>
|
||||
<string name="selectAction">Selecciona una acción</string>
|
||||
<string name="delete">Eliminar</string>
|
||||
<string name="newItem">New item</string>
|
||||
<string name="editItem">Edit item</string>
|
||||
<string name="fillFields">Fill required fields</string>
|
||||
<string name="mandatoryPacking">Packing required</string>
|
||||
<string name="selectAction">Select an action</string>
|
||||
<string name="delete">Delete</string>
|
||||
<string name="lookWithpermission">Solo puedes visualizar cuando has cogido tu mismo el vehículo a no ser que tengas permisos para ello.</string>
|
||||
<string name="info">Información</string>
|
||||
<string name="accept">Aceptar</string>
|
||||
<string name="selectPrinter">Tiene que seleccionar impresora.</string>
|
||||
<string name="newTruck">Nuevo Camión</string>
|
||||
<string name="info">Information</string>
|
||||
<string name="accept">Accept</string>
|
||||
<string name="selectPrinter">You have to select a printer</string>
|
||||
<string name="newTruck">New truck</string>
|
||||
<string name="psScan">PScan: </string>
|
||||
<string name="savedShelves">Baldas guardadas</string>
|
||||
<string name="operation">Operación </string>
|
||||
<string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string>
|
||||
<string name="confirm">Confirmar</string>
|
||||
<string name="scanItem">Escanea un item</string>
|
||||
<string name="itemNotFound">No hemos podido encontrar el articulo. Revisa el sector.</string>
|
||||
<string name="errorOperation">Error al realizar la operación</string>
|
||||
<string name="scanLabelExpedition">Escanea etiqueta de la expedición.</string>
|
||||
<string name="savedShelves">Shelvings saved</string>
|
||||
<string name="operation">Operation</string>
|
||||
<string name="closeOdrder">Are you sure to close the order ?</string>
|
||||
<string name="confirm">Confirm</string>
|
||||
<string name="scanItem">Scan item</string>
|
||||
<string name="itemNotFound">Item not found. Review sector</string>
|
||||
<string name="errorOperation">Error to perform action</string>
|
||||
<string name="scanLabelExpedition">Scan expedition label</string>
|
||||
<string name="buffer">Buffer:</string>
|
||||
<string name="packingSave">Packing guardado</string>
|
||||
<string name="previousCollected">Previa recogida</string>
|
||||
<string name="disponibility">availability</string>
|
||||
<string name="unmarkLine">Desmarcar linea</string>
|
||||
<string name="goUnmark">Vas a desmarcar la linea: </string>
|
||||
<string name="sure">¿Estás seguro?</string>
|
||||
<string name="unmark">Desmarcar</string>
|
||||
<string name="previousCollected">Previous collected</string>
|
||||
<string name="disponibility">Availability</string>
|
||||
<string name="unmarkLine">Unmark line</string>
|
||||
<string name="goUnmark">"You are going to unmark the line: "</string>
|
||||
<string name="sure">are you sure?</string>
|
||||
<string name="unmark">Unmark</string>
|
||||
<string name="sectorALGEMESI">ALGEMESI V</string>
|
||||
<string name="take">Coger</string>
|
||||
<string name="errorRegistered">Causa del error registrado</string>
|
||||
<string name="printerFault">Falta seleccionar impresora</string>
|
||||
<string name="observations">Observaciones</string>
|
||||
<string name="scanShelvingHistorical">Escanea matrícula para ver histórico</string>
|
||||
<string name="scanPlate">Escanea matrícula del vehículo</string>
|
||||
<string name="scanPlateTakeoff">Escanea matrícula para dejar vehículo</string>
|
||||
<string name="returnScan">Vuelva a escanear</string>
|
||||
<string name="doVehiclePlate">¿Qué desea hacer con el vehículo de matrícula</string>
|
||||
<string name="priorityChanged">Prioridad modificada</string>
|
||||
<string name="itemDeleteConfirm">Confirmas eliminar el artículo: </string>
|
||||
<string name="wagonIncorrect">Carro incorrecto</string>
|
||||
<string name="transfer">Transferir</string>
|
||||
<string name="shelvingNew">Nueva matrícula</string>
|
||||
<string name="selectDestiny">Introduce el destino para item: </string>
|
||||
<string name="empty">Vaciar carro</string>
|
||||
<string name="operationNoReturn">Esta operación no se puede rectificar.</string>
|
||||
<string name="take">Take</string>
|
||||
<string name="errorRegistered">Cause of error registered</string>
|
||||
<string name="printerFault">Select printer</string>
|
||||
<string name="observations">Observations</string>
|
||||
<string name="scanShelvingHistorical">"Scan plate for looking historical "</string>
|
||||
<string name="scanPlate">Scan vehicle plate</string>
|
||||
<string name="scanPlateTakeoff">"Scan plate to take off "</string>
|
||||
<string name="returnScan">Rescan</string>
|
||||
<string name="doVehiclePlate">"What do you want to do with the plate vehicle "</string>
|
||||
<string name="priorityChanged">Priority modified</string>
|
||||
<string name="itemDeleteConfirm">"Confirm for delete item: "</string>
|
||||
<string name="wagonIncorrect">Incorrect wagoon</string>
|
||||
<string name="transfer">Transfer</string>
|
||||
<string name="shelvingNew">New plate</string>
|
||||
<string name="selectDestiny">"Introduce item destiny: "</string>
|
||||
<string name="empty">Empty wagoon</string>
|
||||
<string name="operationNoReturn">This operation cannot be rectified.</string>
|
||||
<string name="label"> L: </string>
|
||||
<string name="pUppercase"> P: </string>
|
||||
<string name="itemSearch">Consultar artículo</string>
|
||||
<string name="quantityReal">Cantidad real(</string>
|
||||
<string name="pull">Tirar</string>
|
||||
<string name="titleItemSearch">Buscar item</string>
|
||||
<string name="titleHistorical">Histórico</string>
|
||||
<string name="titleSimilarItems">Artículos similares</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="fault">Falta</string>
|
||||
<string name="trash">Basura</string>
|
||||
<string name="errorNotNumber">El elemento introducido no es un número</string>
|
||||
<string name="itemSearch">Consult item</string>
|
||||
<string name="quantityReal">Real quantity (</string>
|
||||
<string name="pull">Throw</string>
|
||||
<string name="titleItemSearch">Search item</string>
|
||||
<string name="titleHistorical">Historical</string>
|
||||
<string name="titleSimilarItems">Similar items</string>
|
||||
<string name="currentVAlue">"Current value: "</string>
|
||||
<string name="titleSearchSimilarItems">Search similar items</string>
|
||||
<string name="deleteStock">Indicate the reason for removing stock:</string>
|
||||
<string name="quantityToRegister">Indicate the amount to register</string>
|
||||
<string name="quantityToUnregister">Indicate the amount to unregister</string>
|
||||
<string name="fault">Fault</string>
|
||||
<string name="trash">Trah</string>
|
||||
<string name="errorNotNumber">Element introduced is not a number</string>
|
||||
<string name="buyer">Buyer</string>
|
||||
<string name="accessSalix">Accede a Salix para ver más información</string>
|
||||
<string name="accessSalix">Access Salix to see more information</string>
|
||||
<string name="item">"Ítem : "</string>
|
||||
<string name="changeShelving">Cambiar matrícula</string>
|
||||
<string name="registerOneWagoon">Carro escaneado completamente.¿Registrar otro carro?</string>
|
||||
<string name="exit">Salir</string>
|
||||
<string name="scanUpToDown">Escanea matrícula del carro y etiquetas smartTags de arriba a abajo.</string>
|
||||
<string name="changeShelving">Change plate</string>
|
||||
<string name="registerOneWagoon">Wagoon scaned¿Do you want register another?</string>
|
||||
<string name="exit">Exit</string>
|
||||
<string name="scanUpToDown">Scans wagoon plate and smartTags from top to bottom.</string>
|
||||
<string name="visible">Visible:</string>
|
||||
<string name="visibleTotal"> Total visible: </string>
|
||||
<string name="printerUpdated">Impresora actualizada</string>
|
||||
<string name="sectorUpdated">sector actualizado</string>
|
||||
<string name="printerUpdated">Printer registered</string>
|
||||
<string name="sectorUpdated">sector registered</string>
|
||||
<string name="logAppName">warehouse</string>
|
||||
<string name="base_urlSalix">base_urlSalix</string>
|
||||
<string name="serverSalix">Apuntando a servidor Salix (</string>
|
||||
<string name="serverSalix">Ponting to server Salix (</string>
|
||||
<string name="qualityFragment">itemShelving_BuyerTask</string>
|
||||
<string name="dataCompllete">Datos completos</string>
|
||||
<string name="claimLabel">Reclamación:</string>
|
||||
<string name="shelving">Matrícula:</string>
|
||||
<string name="insertClaimCode">Inserta el código de reclamación.</string>
|
||||
<string name="scanBuffer">Escanea buffer</string>
|
||||
<string name="dataCompllete">Complete data</string>
|
||||
<string name="claimLabel">Claim:</string>
|
||||
<string name="shelving">Plate:</string>
|
||||
<string name="insertClaimCode">Insert claim code.</string>
|
||||
<string name="scanBuffer">Scan buffer</string>
|
||||
<string name="barcodes">Barcodes</string>
|
||||
<string name="collectionNoTickets">La colección no tiene tickets</string>
|
||||
<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="collectionNoTickets">Collection has no ticket</string>
|
||||
<string name="reviewCAllhistorical">Check vehicle registration call</string>
|
||||
<string name="takeVehicle">Pick up vehicle</string>
|
||||
<string name="noVehicle">Without vehicle</string>
|
||||
<string name="wagoonNoSaleToday">There is nothing sold for the scanned cart.</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="showParking">Scan Parking</string>
|
||||
<string name="lineNotExist">The purchase line of the scanned label does not exist.</string>
|
||||
<string name="pendingReview">"Pending review : "</string>
|
||||
<string name="review">Review</string>
|
||||
<string name="splitSent">"The article has been sent to Split "</string>
|
||||
<string name="fromTicket">" from ticket "</string>
|
||||
<string name="itemAdded">"Item added "</string>
|
||||
<string name="unityTicket">" unity to ticket "</string>
|
||||
<string name="with">" with "</string>
|
||||
<string name="quantityHigh">Quantity exceeds available</string>
|
||||
<string name="quantityError">" wrong amount entered"</string>
|
||||
<string name="scanItemValidate">" Scan item to validate"</string>
|
||||
<string name="quantitySelect">Amount you take:</string>
|
||||
<string name="errorMarkLine">Error when marking the line</string>
|
||||
<string name="printError">Error printing</string>
|
||||
<string name="shlevesNumber">" Number of ticket shelves"</string>
|
||||
<string name="shlevesNumberTicket">Indicates the number of shelves that the ticket occupies</string>
|
||||
<string name="packetNumberShelves">Number of packages on shelf</string>
|
||||
<string name="packetIndicate">Indicates the number of packages that fit on a shelf</string>
|
||||
<string name="test">Check</string>
|
||||
<string name="expeditionsError">You have not scanned expeditions</string>
|
||||
<string name="expeditionNoSorter">Scan expeditions that have not passed through the Sorter</string>
|
||||
<string name="added">Added</string>
|
||||
<string name="registerAdded">Added log</string>
|
||||
<string name="keepPlate">" saved with registration plate "</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="user">User:</string>
|
||||
<string name="warning">Warning</string>
|
||||
<string name="rocketKO">Error sending rocket message.</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="titleSmarttagPickerAssociate">Associate Punch SmartTags</string>
|
||||
<string name="titleSmarttagsRegister">Register SmartTags</string>
|
||||
<string name="titlePalletizar">Palletize</string>
|
||||
<string name="titleScanExpedition">Scan expedition</string>
|
||||
<string name="titleBufferManegement">Buffer management</string>
|
||||
<string name="titleClaims">Claims</string>
|
||||
<string name="titleUserControlVehicle">Vehicle User Control</string>
|
||||
<string name="titlePrePicker">Pre puncher</string>
|
||||
<string name="titleDayOfSale">Day of sale</string>
|
||||
<string name="titleShowTicket">Show ticket</string>
|
||||
<string name="titleHistoricalVehicle">vehicle history</string>
|
||||
<string name="titleReplacement">Replacement</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="titleWebViewer">Web viewer</string>
|
||||
<string name="titlePreControl">Pre Control</string>
|
||||
<string name="titleShelvingHistorical">Histórico Shelving</string>
|
||||
<string name="titleShelvingHistorical">Shelving historical</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="titlePickers">Pickers</string>
|
||||
<string name="itemScanetNotFound">"Scanned element not found: "</string>
|
||||
<string name="NotOrderReplacement">There are no requests to replace</string>
|
||||
<string name="orderCompleted">Completed order</string>
|
||||
<string name="shelvingSure">Make sure to scan a plate.</string>
|
||||
<string name="highLabel">High label:</string>
|
||||
<string name="midLabel">Mid label:</string>
|
||||
<string name="lowLabel">Low label:</string>
|
||||
<string name="newCreated">New</string>
|
||||
<string name="collectionPending">The following collection is still pending preparation:</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="answer">"The answer is: "</string>
|
||||
<string name="previousOK">Previous OK</string>
|
||||
<string name="scanTicketsForAdd">Colección no tickets. Scan tickets for adding</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>
|
||||
<string name="sureCloseSession">Are you sure to log out?</string>
|
||||
<string name="errorCauseRegistered">Error cause logged</string>
|
||||
<string name="itemPoints">"Item: "</string>
|
||||
<string name="originalQuantity">"Original amount: "</string>
|
||||
<string name="noSIP">" The call cannot be made. The user does not have the extension configured. Request it from IT."</string>
|
||||
<string name="titleHistoricalHide">Vehicle historical</string>
|
||||
<string name="timeFormat">HH:mm</string>
|
||||
<string name="dateCompleteFormat">yyyy-mm-dd HH:mm</string>
|
||||
<string name="sector">Sector</string>
|
||||
<string name="wagoons">Wagoons</string>
|
||||
<string name="printerWithout">Without printer</string>
|
||||
<string name="printerLabel">Label printers</string>
|
||||
<string name="labelType">Label type</string>
|
||||
<string name="vehicleControl">Vehicle control</string>
|
||||
<string name="userNotPermission">User without permissions to perform the action</string>
|
||||
<string name="messageUserError">Check your username and password. If you cannot access, contact Informatica</string>
|
||||
<string name="ok">OK</string>
|
||||
<string name="ticket">"Ticket: "</string>
|
||||
<string name="expedit">Expedition: </string>
|
||||
<string name="dayFormat">dd/MM/yyyy</string>
|
||||
<string name="regExp">[a-zA-Z ]+</string>
|
||||
<string name="ticketInsert">Inserted ticket OK</string>
|
||||
<string name="errorCollectionNew">Error in the call when adding collection.</string>
|
||||
<string name="errorTicketAdd">Error adding ticket to collection.</string>
|
||||
<string name="errorChangeState">Failed to change state to previous collection.</string>
|
||||
<string name="complete">complete</string>
|
||||
<string name="titlePickerDescrip">" Get preview collections"</string>
|
||||
<string name="titlePreControlDescrip">It is used to review a previous ticket</string>
|
||||
<string name="titleShowTicketDescrip">Show a ticket without the possibility to modify it</string>
|
||||
<string name="titleItemConsultDescrip">" Find information on an item"</string>
|
||||
<string name="titleParkingDescrip">Allows parking tickets or cars</string>
|
||||
<string name="titleItemSearchDescrip">Search where an item is located</string>
|
||||
<string name="titleUbicatorDescrip">" Allows you to locate/know the items in a wagoon"</string>
|
||||
<string name="titleInventoryDescrip">Visualize that it is missing or misplaced</string>
|
||||
<string name="titleWorkerMistakeDescrip">Allows to add faults to a worker</string>
|
||||
<string name="titleShelvingHistDescrip">Allows to know modifications of items in a wagoon</string>
|
||||
<string name="titleLogShelvingDescrip">Allows to know the movements in a wagoon</string>
|
||||
<string name="titleHistVehicleDescrip">Visualize who and when has taken a vehicle</string>
|
||||
<string name="titleDayDescrip">" Allows you to know the sale date of the items in a cart"</string>
|
||||
<string name="titleReplacDescrip">Indicates that it needs to be replenished</string>
|
||||
<string name="titleFaultsDescrip">View fault stock in warehouse</string>
|
||||
<string name="titleShelParkDescrip">Shelves Parking</string>
|
||||
<string name="titleQualityDescrip">It allows to know the quality of some products by buyer</string>
|
||||
<string name="titlePalletDescrip">Allows scanning pallet to incorporate it into the sytem</string>
|
||||
<string name="titleExpeditionDescrip">Allows you to know the status of an expedition</string>
|
||||
<string name="titleExpScanDescrip">Allows scanning shipments that have not passed through the sorter</string>
|
||||
<string name="titleBufferMangDescrip">Access to the operations menu with the sorter buffers</string>
|
||||
<string name="titleQrDescrip">Allows you to read information in a qr</string>
|
||||
<string name="titleBufferEmptyDescrip">Puts a buffer in flush mode</string>
|
||||
<string name="titleBufferFillDescrip">Puts a buffer in full mode</string>
|
||||
<string name="titleBufferAccDescrip">" Put a buffer in accumulation mode"</string>
|
||||
<string name="titleBufferOffDescrip">Puts a buffer in disabled mode</string>
|
||||
<string name="titleBufferStrapDescrip">" Puts a buffer in strapping mode"</string>
|
||||
<string name="titleBufferLoadDescrip">" Puts in load mode a buffer"</string>
|
||||
<string name="titleCorridorsDescrip">" Access the menu of the corridors: presacar, see ticket, locator…"</string>
|
||||
<string name="titlePickersDescrip">Access to order</string>
|
||||
<string name="titleControlDescrip">Access the ticket review</string>
|
||||
<string name="titlePalletizDescrip">Access the palletizers menu: palletize, buffer…</string>
|
||||
<string name="titleClaimsDescrip">Access the claims menu</string>
|
||||
<string name="titleClaimDescrip">Claims Location</string>
|
||||
<string name="collectionErrorBuilding">Error building collection. Error description:</string>
|
||||
<string name="main">Main</string>
|
||||
<string name="sentToTrashPrevious">" It has been sent from previous to Trash "</string>
|
||||
<string name="sentToTrashFaults">" It has been sent from previous to Fault the quantity of "</string>
|
||||
<string name="modifiedQuantityPrevious">"Changed from previous amount of "</string>
|
||||
<string name="modifiedOriginalQuantityPrevious">"Changed from previous amount of "</string>
|
||||
<string name="fromItem">" from item "</string>
|
||||
<string name="ticketSpaces"> ticket </string>
|
||||
<string name="ticketCompleted">Complete ticket</string>
|
||||
<string name="toNewQuantity">" to new quantity: "</string>
|
||||
<string name="saleParked">Sale/s park/ed</string>
|
||||
<string name="url">url</string>
|
||||
<string name="title">title</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue