This commit is contained in:
Sergio De la torre 2023-03-27 10:20:59 +02:00
parent c43e4f7ccf
commit 6c58e8012f
9 changed files with 265 additions and 158 deletions

View File

@ -83,10 +83,16 @@
</select> </select>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="EntrySalix"> <list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="refs #4021">
<change afterPath="$PROJECT_DIR$/app/beta/release/output-metadata.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/InitPreSacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/InitPreSacadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -134,7 +140,7 @@
</option> </option>
</component> </component>
<component name="GenerateSignedApkSettings"> <component name="GenerateSignedApkSettings">
<option name="KEY_STORE_PATH" value="C:\Users\sergiodt\proyectos\androidkeys_quique\keystore.jks" /> <option name="KEY_STORE_PATH" value="Z:\KEYSTORE\keystore.jks" />
<option name="KEY_ALIAS" value="keystore" /> <option name="KEY_ALIAS" value="keystore" />
<option name="REMEMBER_PASSWORDS" value="true" /> <option name="REMEMBER_PASSWORDS" value="true" />
<option name="BUILD_TARGET_KEY" value="apk" /> <option name="BUILD_TARGET_KEY" value="apk" />
@ -242,7 +248,7 @@
&quot;ScreenRecorder.SavePath&quot;: &quot;C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4&quot;, &quot;ScreenRecorder.SavePath&quot;: &quot;C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4&quot;,
&quot;cidr.known.project.marker&quot;: &quot;true&quot;, &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;com.google.services.firebase.aqiPopupShown&quot;: &quot;true&quot;, &quot;com.google.services.firebase.aqiPopupShown&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/sergiodt&quot;, &quot;last_opened_file_path&quot;: &quot;Z:/KEYSTORE/keystore.jks&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;, &quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.17&quot;, &quot;project.structure.proportion&quot;: &quot;0.17&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;, &quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
@ -251,7 +257,7 @@
}, },
&quot;keyToStringList&quot;: { &quot;keyToStringList&quot;: {
&quot;ExportApk.BuildVariants&quot;: [ &quot;ExportApk.BuildVariants&quot;: [
&quot;generalRelease&quot; &quot;betaRelease&quot;
] ]
} }
}</component> }</component>
@ -781,7 +787,7 @@
<entry key="branch"> <entry key="branch">
<value> <value>
<list> <list>
<option value="testBeta_5109_Agrupar_sales_exandible_simple" /> <option value="testBeta" />
</list> </list>
</value> </value>
</entry> </entry>

View File

@ -0,0 +1,20 @@
{
"version": 3,
"artifactType": {
"type": "APK",
"kind": "Directory"
},
"applicationId": "es.verdnatura.sfusion",
"variantName": "betaRelease",
"elements": [
{
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 174,
"versionName": "23.10.2Beta",
"outputFile": "app-beta-release.apk"
}
],
"elementType": "File"
}

View File

@ -13,9 +13,9 @@ android {
applicationId "es.verdnatura" applicationId "es.verdnatura"
minSdkVersion 24 //21 minSdkVersion 24 //21
targetSdkVersion 33 targetSdkVersion 33
versionCode 172 versionCode 174
versionName = "23.10Beta" versionName = "23.10.2Beta"
//versionName = "23.8Beta" versionCode 170 //versionName = "23.10Beta" versionCode 172
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }

View File

@ -165,6 +165,12 @@ interface VerdnaturaService {
): ):
Call<List<CollectionVO>> Call<List<CollectionVO>>
@POST("almacennew/ticket_printLabelPrevious") //NO SALIX
fun ticket_printLabelPrevious(
@Body vararg params: Any
):
Call<Any>
@POST("almacennew/collection_assign")//NO SALIX @POST("almacennew/collection_assign")//NO SALIX
fun collection_assign( fun collection_assign(
): ):

View File

@ -1120,7 +1120,7 @@ class CollectionFragment(
sales = salesList.sortedWith(compareBy({ it.saleOrder })) sales = salesList.sortedWith(compareBy({ it.saleOrder }))
myGroupList = groupSaleGroup(salesList).sortedWith(compareBy({ it.saleOrder })) myGroupList = groupSaleGroup(salesList).sortedWith(compareBy({ it.saleOrder }))
if (type == CONTROLADOR) { if (type == CONTROLADOR || type == PRECHECKER) {
sales = salesList.sortedWith(compareBy({ it.picked })) sales = salesList.sortedWith(compareBy({ it.picked }))
myGroupList = groupSaleGroup(salesList).sortedWith(compareBy({ it.picked })) myGroupList = groupSaleGroup(salesList).sortedWith(compareBy({ it.picked }))
@ -1918,7 +1918,8 @@ class CollectionFragment(
} }
private fun setStoredPosition(isFromBack: Boolean) { private fun setStoredPosition(isFromBack: Boolean) {
if (type == SACADOR) { /* if (type == SACADOR) {
for (indice in myGroupList.indices) { for (indice in myGroupList.indices) {
if (myGroupList[indice].isPrepared == "0") { if (myGroupList[indice].isPrepared == "0") {
storedPosition = if (indice != 0) { storedPosition = if (indice != 0) {
@ -1928,8 +1929,8 @@ class CollectionFragment(
} }
break break
} }
} }*/
}
setListPosition(storedPosition, isFromBack) setListPosition(storedPosition, isFromBack)
} }
@ -2842,7 +2843,7 @@ class CollectionFragment(
mySale.totalSales = value.size //total líneas mySale.totalSales = value.size //total líneas
mySale.isParent = true mySale.isParent = true
value as MutableList<SaleVO> value as MutableList<SaleVO>
mySale.sonSales = value as MutableList<SaleVO> mySale.sonSales = value.sortedWith(compareBy { it.picked }) as MutableList<SaleVO>
mySale.line1 = "Previa :${mySale.saleGroupFk}" mySale.line1 = "Previa :${mySale.saleGroupFk}"
mySale.line2 = "Líneas: ${value.size}" mySale.line2 = "Líneas: ${value.size}"

View File

@ -3,7 +3,6 @@ package es.verdnatura.presentation.view.feature.presacador.fragment
import android.content.Context import android.content.Context
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.util.Log.d
import android.view.View import android.view.View
import android.widget.ImageView import android.widget.ImageView
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
@ -11,179 +10,222 @@ import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.FragmentSacadorBinding import es.verdnatura.databinding.FragmentSacadorBinding
import es.verdnatura.domain.ConstAndValues.PREITEMPICKER import es.verdnatura.domain.ConstAndValues.PREITEMPICKER
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnCollectionSelectedListener import es.verdnatura.presentation.common.OnCollectionSelectedListener
import es.verdnatura.presentation.common.OnOptionsSelectedListener import es.verdnatura.presentation.common.OnOptionsSelectedListener
import es.verdnatura.presentation.common.ToolBarAdapterTooltip import es.verdnatura.presentation.common.ToolBarAdapterTooltip
import es.verdnatura.presentation.view.component.CustomDialog import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.presacador.adapter.PreCollectionAdapter import es.verdnatura.presentation.view.component.CustomDialogInput
import es.verdnatura.presentation.view.feature.sacador.adapter.CollectionAdapter import es.verdnatura.presentation.view.feature.sacador.adapter.CollectionAdapter
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
class InitPreSacadorFragment ( class InitPreSacadorFragment(
var entrypoint:String = "" var entrypoint: String = ""
) : ) :
BaseFragment<FragmentSacadorBinding, PreSacadorViewModel>(PreSacadorViewModel::class) { BaseFragment<FragmentSacadorBinding, PreSacadorViewModel>(PreSacadorViewModel::class) {
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
private var goBack: Boolean = false private var goBack: Boolean = false
private var goBack2: Boolean = false private var goBack2: Boolean = false
private lateinit var customDialog: CustomDialog private lateinit var customDialog: CustomDialog
private var collectionsList: ArrayList<CollectionVO> = ArrayList() private var collectionsList: ArrayList<CollectionVO> = ArrayList()
private var adapter: CollectionAdapter? = null private var adapter: CollectionAdapter? = null
private lateinit var customDialogInput: CustomDialogInput
companion object { companion object {
fun newInstance(entryPoint:String) = InitPreSacadorFragment(entryPoint) fun newInstance(entryPoint: String) = InitPreSacadorFragment(entryPoint)
}
override fun onAttach(context: Context) {
super.onAttach(context)
if (context is OnCollectionSelectedListener) onCollectionSelectedListener = context
}
override fun getLayoutId(): Int = R.layout.fragment_sacador
override fun init() {
customDialog = CustomDialog(requireContext())
customDialogInput = CustomDialogInput(requireContext())
binding.splashProgress.visibility = View.VISIBLE
binding.splashProgressTwo.visibility = View.GONE
setToolBar()
setEvents()
viewModel.sectorCollection_get()
super.init()
}
override fun onPause() {
goBack = true
goBack2 = true
super.onPause()
}
private fun setToolBar() {
ma.hideBottomNavigation(View.VISIBLE)
binding.mainToolbar.toolbarTitle.text = entrypoint
binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed()
} }
override fun onAttach(context: Context) { val listIcons: ArrayList<ImageView> = ArrayList()
super.onAttach(context) val iconAdd = ImageView(context)
if (context is OnCollectionSelectedListener) onCollectionSelectedListener = context val iconPrint = ImageView(context)
} iconPrint.setImageResource(R.drawable.ic_print_black_24dp)
iconAdd.setImageResource(R.drawable.ic_add_black_24dp)
iconPrint.setImageResource(R.drawable.ic_print_black_24dp)
override fun getLayoutId(): Int = R.layout.fragment_sacador
override fun init() {
customDialog = CustomDialog(requireContext()) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
binding.splashProgress.visibility = View.VISIBLE
binding.splashProgressTwo.visibility = View.GONE iconAdd.tooltipText = getTooltip(R.drawable.ic_add_black_24dp)
setToolBar() // Tarea 4731
setEvents() // iconPrint.tooltipText = getTooltip(R.drawable.ic_print_black_24dp)
viewModel.sectorCollection_get()
super.init()
} }
override fun onPause() {
goBack = true
goBack2 = true
super.onPause()
}
private fun setToolBar() { listIcons.add(iconAdd)
listIcons.add(iconPrint)
ma.hideBottomNavigation(View.VISIBLE) binding.mainToolbar.toolbarIcons.adapter =
binding.mainToolbar.toolbarTitle.text=entrypoint ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
binding.mainToolbar.backButton.setOnClickListener{
ma.onBackPressed()
}
val listIcons: ArrayList<ImageView> = ArrayList()
val iconAdd = ImageView(context)
iconAdd.setImageResource(R.drawable.ic_add_black_24dp)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
iconAdd.tooltipText=getTooltip(R.drawable.ic_add_black_24dp)
}
listIcons.add(iconAdd)
binding.mainToolbar.toolbarIcons.adapter = ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) { override fun onOptionsItemSelected(item: Drawable) {
when(item){ when (item) {
iconAdd.drawable -> { iconAdd.drawable -> {
binding.splashProgress.visibility = View.VISIBLE binding.splashProgress.visibility = View.VISIBLE
viewModel.sectorCollection_new(getDataInt(SECTORFK)) viewModel.sectorCollection_new(getDataInt(SECTORFK))
} }
iconPrint.drawable -> {
showPrintPrevious()
}
} }
} }
}) })
binding.mainToolbar.toolbarIcons.layoutManager = binding.mainToolbar.toolbarIcons.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false) LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
} }
private fun setEvents() { private fun showPrintPrevious() {
binding.sacadorSwipe.setOnRefreshListener {
viewModel.sectorCollection_get()
binding.sacadorSwipe.isRefreshing = false
}
}
customDialogInput.setInputText()
customDialogInput.setTitle(getString(R.string.printTicket))
customDialogInput.setDescription(getString(R.string.printPreviousGroup))
.setValue("")
.setOkButton(getString(R.string.print)) {
try {
binding.splashProgress.visibility = View.VISIBLE
viewModel.ticket_printLabelPrevious(customDialogInput.getValue().toInt())
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(
requireContext())
} catch (ex: Exception) {
override fun observeViewModel() {
with(viewModel) {
collectionList.observe(viewLifecycleOwner, Observer {
if (!goBack2) binding.splashProgress.visibility = View.GONE
createCollectionList(it.list)
binding.splashProgress.visibility = View.GONE
goBack2 = false
})
response.observe(viewLifecycleOwner, Observer {
binding.splashProgressTwo.visibility = View.GONE
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage,true,false)
} else {
if (goBack) addCollectionToList(it.response.toInt())
}
goBack = false
//sergio:para asegurarnos que aparece en pantalla. En mi movil personal y trabajo no hacia falta.
//viewModel.PrecollectionGetSalix(token=getData(TOKEN))
})
responseNew.observe(viewLifecycleOwner, Observer {
binding.splashProgressTwo.visibility = View.GONE
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(getString(R.string.errorCollectionNew)+ it.errorMessage,true,false)
} else {
//if (goBack)
viewModel.sectorCollection_get()
}
goBack = false
//sergio:para asegurarnos que aparece en pantalla. En mi movil personal y trabajo no hacia falta.
//viewModel.PrecollectionGetSalix(token=getData(TOKEN))
})
}
}
private fun createCollectionList(collections: List<CollectionVO>) {
collectionsList = ArrayList()
collections.forEach {
collectionsList.add(it)
}
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
adapter = CollectionAdapter(collectionsList, onCollectionSelectedListener!!,PREITEMPICKER)
binding.fragmentSacadorCollections.layoutManager = lm
binding.fragmentSacadorCollections.adapter = adapter
}
private fun addCollectionToList(collection: Int) {
var isNew = true
collectionsList.forEach {
if (it.collectionFk == collection) {
isNew = false
} }
} customDialogInput.dismiss()
if (isNew) {
collectionsList.add(CollectionVO(collectionFk = collection, created = getString(R.string.newCreated))) }.setKoButton(getString(R.string.cancel)) {
adapter?.notifyDataSetChanged() customDialogInput.dismiss()
} else { }.show()
customDialog.setTitle(getString(R.string.info)) customDialogInput.setFocusText()
.setDescription(getString(R.string.collectionPending) + collection) }
.setOkButton(getString(R.string.accept)) {
customDialog.dismiss() private fun setEvents() {
}.show() binding.sacadorSwipe.setOnRefreshListener {
} viewModel.sectorCollection_get()
//sergio:para asegurarnos que se actualiza pantalla. binding.sacadorSwipe.isRefreshing = false
adapter?.notifyDataSetChanged()
} }
}
override fun observeViewModel() {
with(viewModel) {
collectionList.observe(viewLifecycleOwner, Observer {
if (!goBack2) binding.splashProgress.visibility = View.GONE
createCollectionList(it.list)
binding.splashProgress.visibility = View.GONE
goBack2 = false
})
response.observe(viewLifecycleOwner, Observer {
binding.splashProgressTwo.visibility = View.GONE
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
} else {
if (goBack) addCollectionToList(it.response.toInt())
}
goBack = false
//sergio:para asegurarnos que aparece en pantalla. En mi movil personal y trabajo no hacia falta.
//viewModel.PrecollectionGetSalix(token=getData(TOKEN))
})
responseNew.observe(viewLifecycleOwner, Observer {
binding.splashProgressTwo.visibility = View.GONE
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(
getString(R.string.errorCollectionNew) + it.errorMessage,
true,
false
)
} else {
//if (goBack)
viewModel.sectorCollection_get()
}
goBack = false
//sergio:para asegurarnos que aparece en pantalla. En mi movil personal y trabajo no hacia falta.
//viewModel.PrecollectionGetSalix(token=getData(TOKEN))
})
}
}
private fun createCollectionList(collections: List<CollectionVO>) {
collectionsList = ArrayList()
collections.forEach {
collectionsList.add(it)
}
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
adapter = CollectionAdapter(collectionsList, onCollectionSelectedListener!!, PREITEMPICKER)
binding.fragmentSacadorCollections.layoutManager = lm
binding.fragmentSacadorCollections.adapter = adapter
} }
private fun addCollectionToList(collection: Int) {
var isNew = true
collectionsList.forEach {
if (it.collectionFk == collection) {
isNew = false
}
}
if (isNew) {
collectionsList.add(
CollectionVO(
collectionFk = collection,
created = getString(R.string.newCreated)
)
)
adapter?.notifyDataSetChanged()
} else {
customDialog.setTitle(getString(R.string.info))
.setDescription(getString(R.string.collectionPending) + collection)
.setOkButton(getString(R.string.accept)) {
customDialog.dismiss()
}.show()
}
//sergio:para asegurarnos que se actualiza pantalla.
adapter?.notifyDataSetChanged()
}
}

View File

@ -71,9 +71,9 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
val responseSalixMessage: LiveData<ResponseItemVO> val responseSalixMessage: LiveData<ResponseItemVO>
get() = _responseSalixMessage get() = _responseSalixMessage
/* private val _responseMissingTrash by lazy { MutableLiveData<ResponseItemVO>() } /* private val _responseMissingTrash by lazy { MutableLiveData<ResponseItemVO>() }
val responseMissingTrash: LiveData<ResponseItemVO> val responseMissingTrash: LiveData<ResponseItemVO>
get() = _responseMissingTrash*/ get() = _responseMissingTrash*/
private val _responseItemShelvingUpdate by lazy { MutableLiveData<ResponseItemVO>() } private val _responseItemShelvingUpdate by lazy { MutableLiveData<ResponseItemVO>() }
val responseItemShelvingUpdate: LiveData<ResponseItemVO> val responseItemShelvingUpdate: LiveData<ResponseItemVO>
@ -456,6 +456,25 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
} }
fun ticket_printLabelPrevious(saleGroup: Int) {
silex.ticket_printLabelPrevious(saleGroup).enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
})
}
fun sectorCollection_get() { fun sectorCollection_get() {
silex.sectorCollection_get().enqueue(object : silex.sectorCollection_get().enqueue(object :
@ -466,7 +485,10 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
CollectionVO( CollectionVO(
0, 0,
isError = true, isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
) )
) )
_collectionList.value = CollectionListVO(listError) _collectionList.value = CollectionListVO(listError)
@ -622,9 +644,9 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
fun saleTracking_updateIsChecked( fun saleTracking_updateIsChecked(
vSaleFk: Int, vSaleFk: Int,
vIsChecked: Boolean, vIsChecked: Boolean,
vIsScanned:Boolean? vIsScanned: Boolean?
) { ) {
silex.saleTracking_updateIsChecked(vSaleFk, vIsChecked,vIsScanned) silex.saleTracking_updateIsChecked(vSaleFk, vIsChecked, vIsScanned)
.enqueue( .enqueue(
object : object :
SilexCallback<Any>(context) { SilexCallback<Any>(context) {
@ -665,7 +687,10 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
_responseItemShelvingUpdate.value = ResponseItemVO( _responseItemShelvingUpdate.value = ResponseItemVO(
isError = true, isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
) )
} }
@ -691,7 +716,10 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
_responseSplit.value = ResponseItemVO( _responseSplit.value = ResponseItemVO(
isError = true, isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
) )
} }

View File

@ -546,5 +546,7 @@
<string name="deleteQuantity">Va a eliminar para Autoconsumo la cantidad del artículo:</string> <string name="deleteQuantity">Va a eliminar para Autoconsumo la cantidad del artículo:</string>
<string name="tickets">" Tickets:"</string> <string name="tickets">" Tickets:"</string>
<string name="problemUpdate">No es posible actualizar. Problema con la descarga de la app</string> <string name="problemUpdate">No es posible actualizar. Problema con la descarga de la app</string>
<string name="printPreviousGroup">Introduce el número de previa a imprimir</string>
<string name="print">Imprimir</string>
</resources> </resources>

View File

@ -81,6 +81,7 @@
<string name="txtnuevacantidad">Indicate the new quantity and the action you want to take with the rest.</string> <string name="txtnuevacantidad">Indicate the new quantity and the action you want to take with the rest.</string>
<string name="BasuraRechazar">Garbage</string> <string name="BasuraRechazar">Garbage</string>
<string name="Indicanuevacantidad">Indicates new quantity</string> <string name="Indicanuevacantidad">Indicates new quantity</string>
<string name="printPreviousGroup">Indicates previous number for printing</string>
<string name="Coleccióncompleta">Complete collection</string> <string name="Coleccióncompleta">Complete collection</string>
<string name="Parking">Parking</string> <string name="Parking">Parking</string>
<string name="titleShelvingParking">Shelving Parking</string> <string name="titleShelvingParking">Shelving Parking</string>
@ -426,6 +427,7 @@
<string name="wagoons">Wagoons</string> <string name="wagoons">Wagoons</string>
<string name="printerWithout">Without printer</string> <string name="printerWithout">Without printer</string>
<string name="printerLabel">Label printers</string> <string name="printerLabel">Label printers</string>
<string name="print">Print</string>
<string name="labelType">Label type</string> <string name="labelType">Label type</string>
<string name="vehicleControl">Vehicle control</string> <string name="vehicleControl">Vehicle control</string>
<string name="userNotPermission">User without permissions to perform the action</string> <string name="userNotPermission">User without permissions to perform the action</string>