Version 23.2 Modificado actualizar pantalla al transferir en Ubicador. Subida version

This commit is contained in:
Sergio De la torre 2023-01-27 10:58:52 +01:00
parent 6e4c2524b7
commit 09ba6b3e89
13 changed files with 143 additions and 43 deletions

View File

@ -83,10 +83,20 @@
</select> </select>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 23.2-Fallo item_card"> <list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 23.2 Modificado orden ubicador y revisión anterior falta activar icono">
<change afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_shopping_self.xml" 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/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/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/google-services.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/google-services.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/release/output-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/release/output-metadata.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/itemScanned.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/itemScanned.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorViewModel.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-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" />
@ -198,6 +208,7 @@
</file-type-list> </file-type-list>
</component> </component>
<component name="HighlightingSettingsPerFile"> <component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/app/build.gradle" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseViewModel.kt" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseViewModel.kt" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" root0="FORCE_HIGHLIGHTING" />
@ -209,6 +220,7 @@
<setting file="file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/app/src/main/res/layout/toolbar_fragment.xml" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/app/src/main/res/layout/toolbar_fragment.xml" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" root0="FORCE_HIGHLIGHTING" /> <setting file="file://$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/app/src/main/res/values/strings.xml" root0="FORCE_HIGHLIGHTING" />
</component> </component>
<component name="MarkdownSettingsMigration"> <component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" /> <option name="stateVersion" value="1" />
@ -387,13 +399,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1618825571576</updated> <updated>1618825571576</updated>
</task> </task>
<task id="LOCAL-00058" summary="Version 8.4Beta, return &quot;finish&quot; y apptesters">
<created>1653400494828</created>
<option name="number" value="00058" />
<option name="presentableId" value="LOCAL-00058" />
<option name="project" value="LOCAL" />
<updated>1653400494829</updated>
</task>
<task id="LOCAL-00059" summary="Version 8.4.1Beta, return &quot;finish&quot;, strings y quitado test rocket"> <task id="LOCAL-00059" summary="Version 8.4.1Beta, return &quot;finish&quot;, strings y quitado test rocket">
<created>1653577349342</created> <created>1653577349342</created>
<option name="number" value="00059" /> <option name="number" value="00059" />
@ -730,7 +735,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1674486271876</updated> <updated>1674486271876</updated>
</task> </task>
<option name="localTasksCounter" value="107" /> <task id="LOCAL-00107" summary="Version 23.2 Modificado orden ubicador y revisión anterior falta activar icono">
<created>1674660080703</created>
<option name="number" value="00107" />
<option name="presentableId" value="LOCAL-00107" />
<option name="project" value="LOCAL" />
<updated>1674660080704</updated>
</task>
<option name="localTasksCounter" value="108" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.History.Properties"> <component name="Vcs.Log.History.Properties">
@ -831,7 +843,6 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="Version 9.2.1 Refactor Inicio" />
<MESSAGE value="Version 9.2.1 Refactor Inicio, pintar a través del rgb, modificado diseño,se añade shelvingLog y muestra colección a través de ticket" /> <MESSAGE value="Version 9.2.1 Refactor Inicio, pintar a través del rgb, modificado diseño,se añade shelvingLog y muestra colección a través de ticket" />
<MESSAGE value="Version 9.2.1 Modificado fragment" /> <MESSAGE value="Version 9.2.1 Modificado fragment" />
<MESSAGE value="Version 9.2.1 Modificado fragment a fragment_general" /> <MESSAGE value="Version 9.2.1 Modificado fragment a fragment_general" />
@ -856,7 +867,8 @@
<MESSAGE value="Version 9.6Beta. TEST6-13122022. Dos revisiones de ubicador." /> <MESSAGE value="Version 9.6Beta. TEST6-13122022. Dos revisiones de ubicador." />
<MESSAGE value="Version 23.2 Cambiado collection_assign a String." /> <MESSAGE value="Version 23.2 Cambiado collection_assign a String." />
<MESSAGE value="Version 23.2-Fallo item_card" /> <MESSAGE value="Version 23.2-Fallo item_card" />
<option name="LAST_COMMIT_MESSAGE" value="Version 23.2-Fallo item_card" /> <MESSAGE value="Version 23.2 Modificado orden ubicador y revisión anterior falta activar icono" />
<option name="LAST_COMMIT_MESSAGE" value="Version 23.2 Modificado orden ubicador y revisión anterior falta activar icono" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
@ -911,6 +923,11 @@
<line>616</line> <line>616</line>
<option name="timeStamp" value="12" /> <option name="timeStamp" value="12" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" type="kotlin-line">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt</url>
<line>163</line>
<option name="timeStamp" value="15" />
</line-breakpoint>
</breakpoints> </breakpoints>
</breakpoint-manager> </breakpoint-manager>
<pin-to-top-manager> <pin-to-top-manager>

View File

@ -13,10 +13,11 @@ android {
applicationId "es.verdnatura" applicationId "es.verdnatura"
minSdkVersion 24 //21 minSdkVersion 24 //21
targetSdkVersion 33 targetSdkVersion 33
versionCode 154 versionCode 157
//versionName = "9.8Beta" version 148 //versionName = "9.8Beta" version 148
//versionName = "23.2Beta" 150 //versionName = "23.2Beta" 154
versionName = "23.2Beta" //versionName = "23.2" 157
versionName = "23.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
@ -32,9 +33,9 @@ android {
getByName("debug") { getByName("debug") {
applicationIdSuffix = ".debug" applicationIdSuffix = ".debug"
}*/ }*/
getByName("release") { /* getByName("release") {
applicationIdSuffix = ".sfusion" applicationIdSuffix = ".sfusion"
} }*/
} }

View File

@ -10,7 +10,7 @@
"client_info": { "client_info": {
"mobilesdk_app_id": "1:519813071137:android:3de54686c580a6f79dfe60", "mobilesdk_app_id": "1:519813071137:android:3de54686c580a6f79dfe60",
"android_client_info": { "android_client_info": {
"package_name": "es.verdnatura.sfusion" "package_name": "es.verdnatura"
} }
}, },
"oauth_client": [ "oauth_client": [

View File

@ -4,15 +4,15 @@
"type": "APK", "type": "APK",
"kind": "Directory" "kind": "Directory"
}, },
"applicationId": "es.verdnatura.sfusion", "applicationId": "es.verdnatura",
"variantName": "release", "variantName": "release",
"elements": [ "elements": [
{ {
"type": "SINGLE", "type": "SINGLE",
"filters": [], "filters": [],
"attributes": [], "attributes": [],
"versionCode": 154, "versionCode": 157,
"versionName": "23.2Beta", "versionName": "23.2",
"outputFile": "app-release.apk" "outputFile": "app-release.apk"
} }
], ],

View File

@ -166,7 +166,6 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
} }
private fun initDataBinding() { private fun initDataBinding() {
binding = DataBindingUtil.bind<T>(requireView())!! binding = DataBindingUtil.bind<T>(requireView())!!
binding.lifecycleOwner = viewLifecycleOwner binding.lifecycleOwner = viewLifecycleOwner
@ -227,7 +226,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
R.drawable.ic_logo_salix -> getString(R.string.accessSalix) R.drawable.ic_logo_salix -> getString(R.string.accessSalix)
R.drawable.ic_eye_ui -> getString(R.string.icViewCollection) R.drawable.ic_eye_ui -> getString(R.string.icViewCollection)
R.drawable.ic_collection -> getString(R.string.icViewCollection) R.drawable.ic_collection -> getString(R.string.icViewCollection)
R.drawable.ic_ubicator_check-> getString(R.string.checkerUbication) R.drawable.ic_ubicator_check -> getString(R.string.checkerUbication)
else -> { else -> {
"" ""
} }
@ -506,6 +505,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
} }
} }
fun getData(name: String): String { fun getData(name: String): String {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0) val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
return when (name) { return when (name) {
@ -594,10 +594,16 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
} }
fun deleteWorkForm(nameWorkForm: String) { fun deleteWorkForm(nameWorkForm: String) {
var prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_SERVER, 0) var prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_SERVER, 0)
var editor = prefs.edit() var editor = prefs.edit()
if (nameWorkForm == "all") {
editor.clear().apply()
} else {
editor.remove(nameWorkForm).commit() editor.remove(nameWorkForm).commit()
} }
}
fun getWorkForm(): List<WorkForms> { fun getWorkForm(): List<WorkForms> {
@ -647,7 +653,8 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
urlSalix = "https://test-salix.verdnatura.es/api/" urlSalix = "https://test-salix.verdnatura.es/api/"
) )
) )
var working_in_test = false
if (working_in_test) {
saveWorkForm( saveWorkForm(
WorkForms( WorkForms(
"TestLocalhost", "TestLocalhost",
@ -670,7 +677,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
urlSalix = "http://localhost:3000/api/" urlSalix = "http://localhost:3000/api/"
) )
) )
}
saveWorkForm( saveWorkForm(
WorkForms( WorkForms(
"Añadir...", "Añadir...",
@ -704,11 +711,11 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
editorPref.putString("base_urlSalix", value.toString()) editorPref.putString("base_urlSalix", value.toString())
editorPref.commit() editorPref.commit()
} }
DEPARTMENTMISTAKEID->{ DEPARTMENTMISTAKEID -> {
editor.putInt(name,value as Int) editor.putInt(name, value as Int)
} }
"SUPPLIERID"->{ "SUPPLIERID" -> {
editor.putString(name,value.toString()) editor.putString(name, value.toString())
} }
else -> { else -> {
editor.putString(name, value.toString()) editor.putString(name, value.toString())

View File

@ -1,8 +1,34 @@
package es.verdnatura.presentation.common package es.verdnatura.presentation.common
import android.os.Build
import androidx.annotation.RequiresApi
import org.json.JSONObject import org.json.JSONObject
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
data class itemScanned(var scanned: JSONObject) { data class itemScanned(var scanned: JSONObject) {
var table: String = scanned.get("table").toString() var table: String = scanned.get("table").toString()
var id: Int = scanned.get("id").toString().toInt() var id: Int = scanned.get("id").toString().toInt()
} }
//Tarea#5109
@RequiresApi(Build.VERSION_CODES.O)
data class itemScannedAll(var scanned: JSONObject) {
var company: String = scanned.get("company").toString()
var user: Int = scanned.get("user").toString().toInt()
var created: LocalDateTime = LocalDateTime.parse(scanned.get("created").toString(), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))
var table: String = scanned.get("table").toString()
var id: String = scanned.get("id").toString()
var more: String = scanned.get("more").toString()
}
//Tarea #5109
private fun itemScanIsQr(value: String): Boolean {
return try {
itemScanned(JSONObject(value))
return true
} catch (Ex: Exception) {
return false
}
}

View File

@ -73,6 +73,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
binding.edittextPassword.setText("nightmare") binding.edittextPassword.setText("nightmare")
} }
// se crean/listan las opciones de formas de trabajo // se crean/listan las opciones de formas de trabajo
deleteWorkForm("all")
listForms = getWorkForm().sortedBy { it.created } listForms = getWorkForm().sortedBy { it.created }
binding.edittextServer.keyListener = null binding.edittextServer.keyListener = null

View File

@ -119,7 +119,19 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
) )
) )
//Tarea #3754 --> Falta arreglar la colección que se le pasa a ReubicationCollectionFragment //Tarea_5052
/* _pasillerositem.add(
PasillerosItemVO(
1,
R.drawable.ic_shopping_self,
contextApp.getString(R.string.selfConsumption),
R.string.titleSelfConsumption,
contextApp.getString(
R.string.titleSelfConsumption
)
)
)*/
_pasillerositem.add( _pasillerositem.add(
PasillerosItemVO( PasillerosItemVO(
1, 1,
@ -510,7 +522,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
) )
)*/ )*/
val working_in_test=true val working_in_test=false
if (working_in_test){ if (working_in_test){
_pasillerositem.add( _pasillerositem.add(
PasillerosItemVO( PasillerosItemVO(

View File

@ -218,6 +218,7 @@ class UbicadorFragment(
shelvingFk = binding.editMatricula.text.toString() shelvingFk = binding.editMatricula.text.toString()
binding.editPrioridad.setText("") binding.editPrioridad.setText("")
binding.splashProgress.visibility = VISIBLE binding.splashProgress.visibility = VISIBLE
isShelvinLogfromMainScreen = true
viewModel.itemShelvingList( viewModel.itemShelvingList(
binding.editMatricula.text.toString() binding.editMatricula.text.toString()
) )
@ -514,6 +515,7 @@ class UbicadorFragment(
if (isShelvinLogfromMainScreen) { if (isShelvinLogfromMainScreen) {
viewModel.shelvinLog_add(shelvingFk) viewModel.shelvinLog_add(shelvingFk)
} }
if (modeCheckUbication) { if (modeCheckUbication) {
listItems.sortedBy { it.isChecked }.forEachIndexed { index, item -> listItems.sortedBy { it.isChecked }.forEachIndexed { index, item ->
@ -531,7 +533,7 @@ class UbicadorFragment(
} }
}) })
responseAddList.observe(viewLifecycleOwner, Observer { responseAddList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility= GONE
if (it.isError) { if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, false) ma.messageWithSound(it.errorMessage, it.isError, false)
@ -548,10 +550,22 @@ class UbicadorFragment(
} else { } else {
viewModel.itemShelvingList(shelvingFk)
ma.messageWithSound("", it.isError, true, isToasted = false) ma.messageWithSound("", it.isError, true, isToasted = false)
} }
}) })
responseLog.observe(viewLifecycleOwner, Observer {
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, false)
} else {
isShelvinLogfromMainScreen = false
}
})
responseCode.observe(viewLifecycleOwner, Observer { responseCode.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE binding.splashProgress.visibility = GONE
if (it.isError) { if (it.isError) {
@ -821,6 +835,7 @@ class UbicadorFragment(
.setDescription(getString(R.string.selectDestiny) + item.item).setValue("") .setDescription(getString(R.string.selectDestiny) + item.item).setValue("")
.setOkButton(getString(R.string.transfer)) { .setOkButton(getString(R.string.transfer)) {
if (customDialogInput.getValue().isNotEmpty()) { if (customDialogInput.getValue().isNotEmpty()) {
binding.splashProgress.visibility= VISIBLE
viewModel.itemShelvingTransfer( viewModel.itemShelvingTransfer(
item.id, item.id,
customDialogInput.getValue() customDialogInput.getValue()

View File

@ -21,9 +21,11 @@ import retrofit2.Response
class UbicadorViewModel(val context: Context) : BaseViewModel(context) { class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
private val _shelvingList by lazy { MutableLiveData<ItemUbicadorListVO>() } private val _shelvingList by lazy { MutableLiveData<ItemUbicadorListVO>() }
private val _response by lazy { MutableLiveData<ResponseItemVO>() } private val _response by lazy { MutableLiveData<ResponseItemVO>() }
val response: LiveData<ResponseItemVO> val response: LiveData<ResponseItemVO>
get() = _response get() = _response
private val _responsepriority by lazy { MutableLiveData<ResponseItemVO>() } private val _responsepriority by lazy { MutableLiveData<ResponseItemVO>() }
val responsepriority: LiveData<ResponseItemVO> val responsepriority: LiveData<ResponseItemVO>
get() = _responsepriority get() = _responsepriority
@ -44,6 +46,10 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
private val _responseAddList by lazy { MutableLiveData<ResponseItemVO>() } private val _responseAddList by lazy { MutableLiveData<ResponseItemVO>() }
val responseAddList: LiveData<ResponseItemVO> = _responseAddList val responseAddList: LiveData<ResponseItemVO> = _responseAddList
private val _responseLog by lazy { MutableLiveData<ResponseItemVO>() }
val responseLog: LiveData<ResponseItemVO>
get() = _responseLog
fun itemShelvingList( fun itemShelvingList(
vShelvingFk: String vShelvingFk: String
) { ) {
@ -274,14 +280,14 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
silex.shelvingLog_add(code) silex.shelvingLog_add(code)
.enqueue(object : SilexCallback<Any>(context) { .enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
_response.value = ResponseItemVO( _responseLog.value = ResponseItemVO(
isError = true, isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
) )
} }
override fun onSuccess(response: Response<Any>) { override fun onSuccess(response: Response<Any>) {
_response.value = _responseLog.value =
ResponseItemVO(isError = false, response = response.message()!!) ResponseItemVO(isError = false, response = response.message()!!)
} }

View File

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="20dp"
android:height="20dp"
android:viewportWidth="20"
android:viewportHeight="20">
<path
android:fillColor="#F7931E"
android:pathData="M7,16.5C7,17.33 6.33,18 5.5,18S4,17.33 4,16.5S4.67,15 5.5,15S7,15.67 7,16.5zM14.5,15c-0.83,0 -1.5,0.67 -1.5,1.5s0.67,1.5 1.5,1.5s1.5,-0.67 1.5,-1.5S15.33,15 14.5,15zM6.6,11h6.67c0.6,0 1.14,-0.36 1.38,-0.91L17,4.59L15.62,4l-2.35,5.5H6.99L3.77,2H1v1.5h1.79l2.73,6.37l-1.08,1.88c-0.58,1 0.14,2.25 1.3,2.25H16v-1.5H5.73L6.6,11zM8.94,3.06l1.19,1.19H7v1.5h3.13L8.94,6.94L10,8l3,-3l-3,-3L8.94,3.06z" />
</vector>

View File

@ -527,5 +527,8 @@
<string name="formatError">Formato expedición no válido</string> <string name="formatError">Formato expedición no válido</string>
<string name="errorQuantity">Inserta la cantidad correctamente</string> <string name="errorQuantity">Inserta la cantidad correctamente</string>
<string name="operationSuccessful">Operación realizada correctamente</string> <string name="operationSuccessful">Operación realizada correctamente</string>
<string name="selfConsumption">Autoconsumo</string>
<string name="titleSelfConsumption">Autoconsumo</string>
<string name="titleSelfDescription">Permite consumo de materiales del almacén</string>
</resources> </resources>

View File

@ -380,6 +380,8 @@
<string name="titleReplacement">Replacement</string> <string name="titleReplacement">Replacement</string>
<string name="titleItemConsult">Consult item</string> <string name="titleItemConsult">Consult item</string>
<string name="titleUbicator">Ubicator</string> <string name="titleUbicator">Ubicator</string>
<string name="titleSelfConsumption">Self-autoconsumption</string>
<string name="titleSelfDescription">Self-autoconsumption from your warehouse</string>
<string name="titleReUbicator">Reubication</string> <string name="titleReUbicator">Reubication</string>
<string name="titleAuto">Add Automatically items to shelving</string> <string name="titleAuto">Add Automatically items to shelving</string>
<string name="titleQuality">Quality</string> <string name="titleQuality">Quality</string>
@ -525,5 +527,6 @@
<string name="formatError">Expedition format no valid</string> <string name="formatError">Expedition format no valid</string>
<string name="errorQuantity">Insert the amount correctly</string> <string name="errorQuantity">Insert the amount correctly</string>
<string name="operationSuccessful">Operación realizada correctamente</string> <string name="operationSuccessful">Operación realizada correctamente</string>
<string name="selfConsumption">Self-consumption</string>
</resources> </resources>