From caa3116f5cb4d3f69346b9f302f600af70aeac94 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Wed, 1 Feb 2023 12:33:20 +0100 Subject: [PATCH] =?UTF-8?q?Version=2023.3Beta=20A=C3=B1adido=20error=20si?= =?UTF-8?q?=20falla=20el=20ubicador=20y=20solucionado=20al=20leer=20art?= =?UTF-8?q?=C3=ADculos.=20Modificado=20saleMistakeAdd=20para=20que=20solo?= =?UTF-8?q?=20env=C3=ADe=20dos=20par=C3=A1metros.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/misc.xml | 2 +- .idea/workspace.xml | 39 +++++++++---------- app/build.gradle | 8 ++-- app/google-services.json | 2 +- .../presentation/base/BaseFragment.kt | 6 +-- .../collection/fragment/CollectionFragment.kt | 2 +- .../fragment/CollectionViewModel.kt | 5 ++- .../presacador/fragment/EndSacadorFragment.kt | 2 +- .../ubicador/fragment/UbicadorFragment.kt | 11 ++++-- 9 files changed, 40 insertions(+), 37 deletions(-) diff --git a/.idea/misc.xml b/.idea/misc.xml index 63d3027a..97b3f254 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -276,7 +276,7 @@ - + diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 6cad8606..b9a06f20 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -83,20 +83,17 @@ - - + + - - - - + + + + - - - @@ -784,7 +781,7 @@ - @@ -843,7 +840,6 @@ diff --git a/app/build.gradle b/app/build.gradle index e7e95c63..b2500822 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,11 +13,11 @@ android { applicationId "es.verdnatura" minSdkVersion 24 //21 targetSdkVersion 33 - versionCode 157 + versionCode 160 //versionName = "9.8Beta" version 148 //versionName = "23.2Beta" 154 //versionName = "23.2" 157 - versionName = "23.2" + versionName = "23.3Beta" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } @@ -33,9 +33,9 @@ android { getByName("debug") { applicationIdSuffix = ".debug" }*/ - /* getByName("release") { + getByName("release") { applicationIdSuffix = ".sfusion" - }*/ + } } diff --git a/app/google-services.json b/app/google-services.json index 57c27ec5..1f9a4fd1 100644 --- a/app/google-services.json +++ b/app/google-services.json @@ -10,7 +10,7 @@ "client_info": { "mobilesdk_app_id": "1:519813071137:android:3de54686c580a6f79dfe60", "android_client_info": { - "package_name": "es.verdnatura" + "package_name": "es.verdnatura.sfusion" } }, "oauth_client": [ diff --git a/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt b/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt index ce773840..4dda29f8 100644 --- a/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt @@ -653,7 +653,7 @@ abstract class BaseFragment(viewModelCla urlSalix = "https://test-salix.verdnatura.es/api/" ) ) - var working_in_test = false + var working_in_test = true if (working_in_test) { saveWorkForm( WorkForms( @@ -666,14 +666,14 @@ abstract class BaseFragment(viewModelCla saveWorkForm( WorkForms( "TestHome", - "http://192.168.1.132:9000", + "http://192.168.1.128:9000", urlSalix = "https://test-salix.verdnatura.es/api/" ) ) saveWorkForm( WorkForms( "TestLOCAL", - "http://192.168.1.132:9000", + "http://192.168.1.128:9000", urlSalix = "http://localhost:3000/api/" ) ) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt index c5a9b1d0..bbbc875f 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt @@ -2519,9 +2519,9 @@ class CollectionFragment( override fun onBarcodeRowClickListener(item: BarcodeVO) { list.forEach { if (it.description == item.code) { + viewModel.saleMistakeAdd( vSaleFk = mistakeSale?.saleFk!!, - vUserFk = mistakeSale?.workerFk!!.toInt(), vTypeFk = it.id ) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt index 09477350..e1feb798 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt @@ -816,10 +816,11 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) { fun saleMistakeAdd( vSaleFk: Int, - vUserFk: Int, vTypeFk: Int ) { - silex.saleMistakeAdd(vSaleFk, vUserFk, vTypeFk) + /*#4742 + Tiene que estar en produc la parte de Silex referente a saleMistakeAdd dos parámetros no tres-quitar tercer parámetro cuando esté subido*/ + silex.saleMistakeAdd(vSaleFk, vTypeFk, vTypeFk) .enqueue(object : SilexCallback(context) { override fun onError(t: Throwable) { diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt index f789d39b..4d0010d2 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt @@ -1020,7 +1020,7 @@ class EndSacadorFragment( private fun checkItemScan(valueToCheck: String): Boolean { val saleToCheck = sales[storedPosition] - return saleToCheck.itemFk == valueToCheck.toInt() + return saleToCheck.itemFk.toDouble() == valueToCheck.toDouble() } private fun showScanner(index: Int, sale: PreSacadorItemVO) { diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt index 3f9ee972..16d01d99 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt @@ -114,7 +114,8 @@ class UbicadorFragment( iconReload.setImageResource(R.drawable.ic_autorenew_black_24dp) - //Tarea#5052 binding.mainToolbar.switchButton.visibility = VISIBLE + //Tarea#5052 + binding.mainToolbar.switchButton.visibility = VISIBLE binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked -> if (binding.mainToolbar.toolbarTitle.text == getString(R.string.titleUbicator)) { ma.messageWithSound(getString(R.string.scanShelving), false, false) @@ -145,7 +146,7 @@ class UbicadorFragment( } listIcons.add(iconAdd) listIcons.add(iconReload) - listIcons.add(iconChecker) + //listIcons.add(iconChecker) binding.mainToolbar.toolbarIcons.adapter = @@ -590,6 +591,10 @@ class UbicadorFragment( }) responseMake.observe(viewLifecycleOwner, Observer { + binding.splashProgress.visibility=GONE + if (it.isError){ + ma.messageWithSound(it.errorMessage,true,true,isToasted = true) + }else{ if (!shelvingFk.isNullOrEmpty()) { binding.mainToolbar.toolbarTitle.text = shelvingFk @@ -598,7 +603,7 @@ class UbicadorFragment( shelvingFk ) - } + }} }) }