Version 9.6Beta. TEST6-final: Modificando llamadas a SilexCallback (AjustesFragment)
This commit is contained in:
parent
70ba354321
commit
47667d1cd8
|
@ -44,6 +44,7 @@
|
|||
</shared>
|
||||
</component>
|
||||
<component name="AndroidLogFilters">
|
||||
<option name="TOOL_WINDOW_CUSTOM_FILTER" value="verdnatura" />
|
||||
<option name="TOOL_WINDOW_LOG_LEVEL" value="error" />
|
||||
<option name="TOOL_WINDOW_CONFIGURED_FILTER" value="No Filters" />
|
||||
<option name="TOOL_WINDOW_REGEXP_FILTER" value="false" />
|
||||
|
@ -83,43 +84,55 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 9.6Beta. TEST5: imprimir ok, ubicador ok, no se cierra app sacador">
|
||||
<change afterPath="$PROJECT_DIR$/app/beta/app-beta.apk" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/beta/output-metadata.json" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/debug/app-debug.apk" afterDir="false" />
|
||||
<change afterPath="$PROJECT_DIR$/app/debug/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$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" 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/release/vn-picking.apk" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetItemCardUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetItemCardUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/MobileApplication.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/MobileApplication.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetLoginUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetLoginUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetSacadorControladorUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetSacadorControladorUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetVehicleControlTimeUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetVehicleControlTimeUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetWokerMistakeUSerCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetWokerMistakeUSerCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixInterceptor.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixInterceptor.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SilexCallback.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SilexCallback.kt" 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/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/ResponseItemVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/ResponseItemVO.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/SalixBackItems.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/SalixBackItems.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/model/ItemCardVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/model/ItemCardVO.kt" 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/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemProposalFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemProposalFragment.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/CollectionViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/ShowTicketFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/mapper/CollectionMapper.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/mapper/CollectionMapper.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/ControladorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/ControladorFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/ControladorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/ControladorViewModel.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/precontrol/PreControladorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/precontrol/PreControladorFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/adapter/PreSacadorAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/adapter/PreSacadorAdapter.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoUsuarioFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoUsuarioFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/adapter/PreCollectionAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/adapter/PreCollectionAdapter.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.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/java/es/verdnatura/presentation/view/feature/presacador/mapper/SaleMapper.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/mapper/SaleMapper.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/model/PreSacadorItemVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/model/PreSacadorItemVO.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/adapter/ReposicionAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/adapter/ReposicionAdapter.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/fragment/ReposicionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/fragment/ReposicionFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/fragment/ReposicionViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reposicion/fragment/ReposicionViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/showticket/ShowTicketFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/showticket/ShowTicketFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/showticket/ShowTicketViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/showticket/ShowTicketViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/adapter/UbicadorAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/adapter/UbicadorAdapter.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.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/java/es/verdnatura/presentation/view/feature/ubicador/model/ItemUbicadorVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/model/ItemUbicadorVO.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row_fragment.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row_fragment.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row_presacador.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_article_row_presacador.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_escaner_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_escaner_row.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_ubication_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_ubication_row.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>
|
||||
|
@ -261,7 +274,7 @@
|
|||
<property name="DeviceAndSnapshotComboBoxAction.selectedDevice" value="SerialNumber@20211523021031" />
|
||||
<property name="DeviceAndSnapshotComboBoxAction.selectionTime" value="2021-08-12T14:29:19.760785500Z" />
|
||||
<property name="ExportApk.ApkPath" value="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app" />
|
||||
<property name="ExportApk.BuildVariants" value="release" />
|
||||
<property name="ExportApk.BuildVariants" value="debug release" />
|
||||
<property name="ExportApk.SignV1" value="true" />
|
||||
<property name="ExportApk.SignV2" value="true" />
|
||||
<property name="I18N_FIX_LAST_USED_CONTEXT" value="Gestor_Almacén.app.main" />
|
||||
|
@ -440,13 +453,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1618825571576</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00053" summary="Version 8.2 Subida de ficheros que no estaban versionados">
|
||||
<created>1651647225421</created>
|
||||
<option name="number" value="00053" />
|
||||
<option name="presentableId" value="LOCAL-00053" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1651647225421</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00054" summary="Revert "Version 8.2 Subida de ficheros que no estaban versionados" This reverts commit 3c0f949e">
|
||||
<created>1651647601790</created>
|
||||
<option name="number" value="00054" />
|
||||
|
@ -783,7 +789,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1669720979790</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="102" />
|
||||
<task id="LOCAL-00102" summary="Version 9.6Beta. TEST5: imprimir ok, ubicador ok, no se cierra app sacador">
|
||||
<created>1669975009865</created>
|
||||
<option name="number" value="00102" />
|
||||
<option name="presentableId" value="LOCAL-00102" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1669975009872</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="103" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.History.Properties">
|
||||
|
@ -825,7 +838,7 @@
|
|||
<entry key="branch">
|
||||
<value>
|
||||
<list>
|
||||
<option value="test" />
|
||||
<option value="test_4744" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
|
@ -925,6 +938,21 @@
|
|||
<line>347</line>
|
||||
<option name="timeStamp" value="10" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" suspend="THREAD" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt</url>
|
||||
<line>697</line>
|
||||
<option name="timeStamp" value="13" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" suspend="THREAD" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt</url>
|
||||
<line>698</line>
|
||||
<option name="timeStamp" value="14" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" suspend="THREAD" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt</url>
|
||||
<line>702</line>
|
||||
<option name="timeStamp" value="15" />
|
||||
</line-breakpoint>
|
||||
</breakpoints>
|
||||
</breakpoint-manager>
|
||||
<pin-to-top-manager>
|
||||
|
@ -933,6 +961,7 @@
|
|||
<PinnedItemInfo parentTag="es.verdnatura.MobileApplication" memberName="silex" />
|
||||
<PinnedItemInfo parentTag="retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall" memberName="delegate" />
|
||||
<PinnedItemInfo parentTag="retrofit2.Response" memberName="errorBody" />
|
||||
<PinnedItemInfo parentTag="java.lang.Error" memberName="shadow$_klass_" />
|
||||
<PinnedItemInfo parentTag="es.verdnatura.presentation.view.feature.sacador.fragment.SacadorViewModel" memberName="_registerSmarttagInsert$delegate" />
|
||||
</pinned-members>
|
||||
</pin-to-top-manager>
|
||||
|
@ -940,6 +969,8 @@
|
|||
<configuration name="app">
|
||||
<watch expression="((SocketTimeoutException)((SocketTimeoutException)t).cause).cause" custom="java.net.SocketTimeoutException" />
|
||||
<watch expression="this" />
|
||||
<watch expression="t" />
|
||||
<watch expression="t" />
|
||||
</configuration>
|
||||
</watches-manager>
|
||||
</component>
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura.beta",
|
||||
"variantName": "beta",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 144,
|
||||
"versionName": "9.6Beta",
|
||||
"outputFile": "app-beta.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
|
@ -26,6 +26,17 @@ android {
|
|||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
|
||||
/*scaleFusion
|
||||
//cambiar a beta "package_name": "es.verdnatura.beta"
|
||||
getByName("debug") {
|
||||
applicationIdSuffix = ".debug"
|
||||
}
|
||||
getByName("release") {
|
||||
applicationIdSuffix = ".release"
|
||||
}*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"version": 3,
|
||||
"artifactType": {
|
||||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura",
|
||||
"variantName": "debug",
|
||||
"elements": [
|
||||
{
|
||||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 144,
|
||||
"versionName": "9.6Beta",
|
||||
"outputFile": "app-debug.apk"
|
||||
}
|
||||
],
|
||||
"elementType": "File"
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
"type": "APK",
|
||||
"kind": "Directory"
|
||||
},
|
||||
"applicationId": "es.verdnatura",
|
||||
"applicationId": "es.verdnatura.releasex",
|
||||
"variantName": "release",
|
||||
"elements": [
|
||||
{
|
||||
|
|
Binary file not shown.
|
@ -43,4 +43,8 @@ class MobileApplication : Application() {
|
|||
return prefs.edit()
|
||||
}
|
||||
|
||||
fun playSoundIsOK(bool: Boolean) {
|
||||
if (bool) mpok!!.start() else mperror!!.start()
|
||||
}
|
||||
|
||||
}
|
|
@ -57,16 +57,12 @@ class GetLoginUserCase(context: Context) : RestClient(context) {
|
|||
var working_in_test = false // Enviar a grupo test Android o a los usuarios
|
||||
if (!working_in_test) {
|
||||
|
||||
return salixClient!!.sendChekingPresence(
|
||||
content_type = "application/json",
|
||||
authorization = token,
|
||||
return salixClient.sendChekingPresence(
|
||||
params = SalixMessageVO(workerId = workerId, message = message)
|
||||
)
|
||||
} else {
|
||||
|
||||
return salixClientSend!!.sendGroup(
|
||||
content_type = "application/json",
|
||||
authorization = token,
|
||||
return salixClientSend.sendGroup(
|
||||
params = SalixGrupo(to = "#android-test", message = message)
|
||||
)
|
||||
}
|
||||
|
|
|
@ -109,11 +109,9 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
|||
}
|
||||
|
||||
|
||||
fun collectionGetSalix(token: String): Call<List<CollectionVO>> {
|
||||
fun collectionGetSalix(): Call<List<CollectionVO>> {
|
||||
// val params:ArrayList<String> = ArrayList()
|
||||
return salixClient!!.getCollectionSalix(
|
||||
content_type = "application/json",
|
||||
authorization = token
|
||||
return salixClient.getCollectionSalix(
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -431,11 +429,9 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
|||
)
|
||||
}
|
||||
|
||||
fun getIdFromCodeSalix(token: String, barCodeValue: String): Call<String> {
|
||||
fun getIdFromCodeSalix(barCodeValue: String): Call<String> {
|
||||
|
||||
return salixClient!!.barcodes_toitem(
|
||||
"application/json",
|
||||
authorization = token,
|
||||
return salixClient.barcodes_toitem(
|
||||
barCodeValue = barCodeValue
|
||||
|
||||
)
|
||||
|
|
|
@ -97,7 +97,7 @@ class GetVehicleControlTimeUserCase(context: Context) : RestClient(context) {
|
|||
params
|
||||
)
|
||||
}
|
||||
fun sip_getExtensionSalix(
|
||||
/* fun sip_getExtensionSalix(
|
||||
token:String,
|
||||
WorkerId: String
|
||||
): Call<Any> {
|
||||
|
@ -108,5 +108,5 @@ class GetVehicleControlTimeUserCase(context: Context) : RestClient(context) {
|
|||
authorization = token,
|
||||
idWorker=WorkerId
|
||||
)
|
||||
}
|
||||
}*/
|
||||
}
|
|
@ -16,9 +16,9 @@ class GetWokerMistakeUSerCase(context: Context) : RestClient(context) {
|
|||
return restClient!!.collectionGet()
|
||||
}
|
||||
|
||||
fun collectionGetSalix(token: String): Call<List<CollectionVO>> {
|
||||
fun collectionGetSalix(): Call<List<CollectionVO>> {
|
||||
// val params:ArrayList<String> = ArrayList()
|
||||
return salixClient!!.getCollectionSalix(content_type = "application/json", token)
|
||||
return salixClient!!.getCollectionSalix()
|
||||
}
|
||||
|
||||
|
||||
|
@ -54,13 +54,11 @@ class GetWokerMistakeUSerCase(context: Context) : RestClient(context) {
|
|||
}
|
||||
|
||||
fun department_getHasMistakeSalix(token: String): Call<List<DepartmentMistake>> {
|
||||
return salixClient!!.department_getHasMistake(
|
||||
content_type = "application/json",
|
||||
authorization = token
|
||||
return salixClient.department_getHasMistake(
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
fun worker_getFromHasMistake(
|
||||
department: String
|
||||
): Call<List<WorkerFromMistake>> {
|
||||
|
|
|
@ -27,7 +27,7 @@ class SalixInterceptor : Interceptor {
|
|||
.addHeader("Content-Type", "application/json")
|
||||
.addHeader("Authorization", prefs.getString("token", ""))
|
||||
.build()
|
||||
d("VERDNATURA::", newRequest.headers().toString() + newRequest.url())
|
||||
|
||||
return chain.proceed(newRequest)
|
||||
} else
|
||||
return chain.proceed(request)
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.JsonObject
|
||||
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
|
||||
import es.verdnatura.presentation.common.itemBarCodeSalix
|
||||
import es.verdnatura.presentation.common.itemPackingTypeSalix
|
||||
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
||||
|
@ -14,9 +11,9 @@ import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
|||
import es.verdnatura.presentation.view.feature.login.model.SalixGrupo
|
||||
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
|
||||
import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
|
||||
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
import es.verdnatura.presentation.view.feature.workermistake.model.DepartmentMistake
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Call
|
||||
import retrofit2.http.*
|
||||
|
||||
|
@ -31,36 +28,29 @@ interface SalixService {
|
|||
|
||||
@POST("chats/sendCheckingPresence")
|
||||
fun sendChekingPresence(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
@Body params: SalixMessageVO
|
||||
):
|
||||
Call<Boolean>
|
||||
|
||||
@POST("chats/send")
|
||||
fun sendGroup(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
@Body params: SalixGrupo
|
||||
):
|
||||
Call<Boolean>
|
||||
|
||||
@GET("collections/getSectors")
|
||||
fun getSectorsSalix(
|
||||
):
|
||||
):
|
||||
Call<List<SectorItemVO>>
|
||||
|
||||
@GET("collections/getCollection")
|
||||
fun getCollectionSalix(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
):
|
||||
Call<List<CollectionVO>>
|
||||
|
||||
|
||||
@GET("collections/sectorCollection_get")
|
||||
fun sectorCollection_get(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
):
|
||||
Call<List<CollectionVO>>
|
||||
|
||||
|
@ -85,8 +75,6 @@ interface SalixService {
|
|||
// @GET("api/Departments?filter={\"fields\": {\"id\": true, \"name\": true},\"where\": {\"hasToMistake\": \"FALSE\"}}")
|
||||
@GET("Departments")
|
||||
fun department_getHasMistake(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
@Query("filter") filter: String = "{\"fields\": {\"id\": true, \"name\": true},\"where\": {\"name\": \"INFORMATICA\"}}"
|
||||
// @Query("name") name:String ="COMPRAS"
|
||||
):
|
||||
|
@ -94,10 +82,7 @@ interface SalixService {
|
|||
|
||||
@GET("Workers/{idWorker}/sip")
|
||||
fun sip_getExtension(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
@Path("idWorker") idWorker: String
|
||||
|
||||
@Path("idWorker") idWorker: Int,
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
|
@ -112,7 +97,7 @@ interface SalixService {
|
|||
@GET("ItemPackingTypes")
|
||||
fun get_ItemPackingType(
|
||||
|
||||
):
|
||||
):
|
||||
Call<List<ItemPackingType>>
|
||||
|
||||
|
||||
|
@ -125,8 +110,6 @@ interface SalixService {
|
|||
|
||||
@GET("ItemBarCodes/{barCodeValue}/toItem")//REVISADA
|
||||
fun barcodes_toitem(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
@Path("barCodeValue") barCodeValue: String
|
||||
):
|
||||
Call<String>
|
||||
|
@ -134,17 +117,17 @@ interface SalixService {
|
|||
@GET("Suppliers")//REVISADA
|
||||
fun getSuppliers(
|
||||
//@Body params:JSONObject=JSONObject("""filter"={"fields":{"id":true,"name":true},"include":[{"relation":"contacts","scope":{"fields":["email"],"order":"id DESC","limit":1,"where":{"email":{"neq":null}}}}]}""")
|
||||
/* @Query("filter") filter:String="{\"fields\":{\"id\":true,\"name\":true},\"include\":[{\"relation\":\"contacts\"," +
|
||||
"\"scope\":{" +
|
||||
"\"fields\":[\"email\"],\"order\":\"id DESC\",\"limit\":1," +
|
||||
"\"where\":{ \"email\":{\"neq\":null } }}}]})"*/
|
||||
/* @Query("filter") filter:String="{\"fields\":{\"id\":true,\"name\":true},\"include\":[{\"relation\":\"contacts\"," +
|
||||
"\"scope\":{" +
|
||||
"\"fields\":[\"email\"],\"order\":\"id DESC\",\"limit\":1," +
|
||||
"\"where\":{ \"email\":{\"neq\":null } }}}]})"*/
|
||||
|
||||
):
|
||||
Call<List<Supplier>>
|
||||
|
||||
@PUT("Entries")//REVISADA
|
||||
fun Entries(
|
||||
@Body entry:EntrySalix
|
||||
@Body entry: EntrySalix
|
||||
):
|
||||
Call<EntrySalix>
|
||||
|
||||
|
@ -160,8 +143,6 @@ interface SalixServiceSend {
|
|||
|
||||
@POST("chats/send")
|
||||
fun sendGroup(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
@Body params: SalixGrupo
|
||||
):
|
||||
Call<Boolean>
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log.d
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
|
@ -47,11 +49,16 @@ abstract class SilexCallback<T>(val context: Context) : Callback<T> {
|
|||
}
|
||||
}
|
||||
|
||||
fun defaultErrorHandler(t: Throwable) {
|
||||
t.message!!.toast(context)
|
||||
private fun defaultErrorHandler(t: Throwable) {
|
||||
(nameofFunction((this)) + t.message).toast(context)
|
||||
//(context as MobileApplication).playSoundIsOK(false)
|
||||
}
|
||||
|
||||
open fun onSuccess(response: Response<T>) {
|
||||
context.getString(R.string.operationSuccessful).toast(context)
|
||||
//(context as MobileApplication).playSoundIsOK(true)
|
||||
}
|
||||
|
||||
abstract fun onSuccess(response: Response<T>)
|
||||
open fun onError(t: Throwable) {
|
||||
throw t
|
||||
}
|
||||
|
|
|
@ -405,12 +405,7 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/saleTrackingDel")//REVISADA
|
||||
fun saleTrackingDel(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
|
@ -714,13 +709,13 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/itemShelvingMake")//REVISADA
|
||||
fun itemShelvingMake(
|
||||
@Body vararg params: Any
|
||||
@Body vararg params: Any?
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
@POST("almacennew/itemShelvingMakeEdit")//REVISADA
|
||||
fun itemShelvingMakeEdit(
|
||||
@Body vararg params: Any
|
||||
@Body vararg params: Any?
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
|
|
|
@ -498,6 +498,8 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
return when (name) {
|
||||
SECTORFK -> prefs.getInt(name, SECTORFKDEFAULT)
|
||||
WAREHOUSEFK -> prefs.getInt(name, WAREHOUSEFKDEFAULT)
|
||||
PRINTERFK -> prefs.getInt(name, 0)
|
||||
USERFK -> prefs.getInt(USERFK, 0)
|
||||
else -> {
|
||||
0
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import androidx.lifecycle.ViewModel
|
|||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.domain.SalixService
|
||||
import es.verdnatura.domain.VerdnaturaService
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import org.json.JSONObject
|
||||
|
||||
abstract class BaseViewModel : ViewModel, LifecycleObserver {
|
||||
|
@ -14,8 +13,9 @@ abstract class BaseViewModel : ViewModel, LifecycleObserver {
|
|||
lateinit var silex: VerdnaturaService
|
||||
lateinit var salix: SalixService
|
||||
|
||||
constructor(): super()
|
||||
constructor(context: Context): super() {
|
||||
|
||||
constructor() : super()
|
||||
constructor(context: Context) : super() {
|
||||
app = context as MobileApplication
|
||||
silex = app.silex
|
||||
salix = app.salix
|
||||
|
@ -26,9 +26,9 @@ abstract class BaseViewModel : ViewModel, LifecycleObserver {
|
|||
fun nameofFunction(function: Any): String {
|
||||
// return Thread.currentThread().stackTrace[1].methodName
|
||||
try {
|
||||
return function.javaClass.enclosingMethod!!.name
|
||||
return function.javaClass.enclosingMethod!!.name + "->"
|
||||
} catch (e: Exception) {
|
||||
return "ActivityMain"
|
||||
return "ActivityMain->"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -46,12 +46,12 @@ fun getMessageFromAllResponse(callFunction: String, ResponseMessage: String): St
|
|||
|
||||
|
||||
//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 = "Callback: $callFunction."
|
||||
// }
|
||||
// }
|
||||
/* when (callFunction) {
|
||||
//"collection_getTickets_" -> returnMessage ="No hay tickets para sacar. Llamada $callFunction."
|
||||
else -> {*/
|
||||
returnMessage = "Callback: $callFunction."
|
||||
// }
|
||||
// }
|
||||
|
||||
return "$messageFromError.\r$returnMessage"
|
||||
|
||||
|
|
|
@ -120,10 +120,11 @@ class AjustesFragment :
|
|||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = getString(R.string.titleUserControlVehicle)
|
||||
), getData(USERFK)
|
||||
), getDataInt(USERFK).toString()
|
||||
)
|
||||
|
||||
} else if (item.id == 6) {
|
||||
binding.splashProgress.visibility=VISIBLE
|
||||
viewModel.train_get()
|
||||
} else if (item.id == 7) {
|
||||
viewModel.getItemPackingTypeSalix()
|
||||
|
@ -201,7 +202,21 @@ class AjustesFragment :
|
|||
viewModel.printer_get()
|
||||
|
||||
}
|
||||
loadUpdatePacking.observe(viewLifecycleOwner) { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility=View.GONE
|
||||
/* ma.messageWithSound(
|
||||
if (it.isError) it.errorMessage else {
|
||||
getString(R.string.itemUpdated)
|
||||
}, it.isError, false
|
||||
)*/
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
actionUpdatePacking.observe(viewLifecycleOwner) {
|
||||
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
||||
ma.messageWithSound(
|
||||
|
@ -320,7 +335,7 @@ class AjustesFragment :
|
|||
}
|
||||
loadTrainList.observe(viewLifecycleOwner) { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility = View.INVISIBLE
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty() && it.list.get(0).isError) {
|
||||
customDialog.setTitle(getString(R.string.error))
|
||||
.setDescription(it.list.get(0).errorMessage)
|
||||
|
@ -357,10 +372,10 @@ class AjustesFragment :
|
|||
|
||||
viewModel.inititializeDefaultAjusts(
|
||||
getData(SECTORDESCRIP),
|
||||
getData(SECTORFK).toInt(),
|
||||
getData(WAREHOUSEFK).toInt(),
|
||||
getDataInt(SECTORFK),
|
||||
getDataInt(WAREHOUSEFK),
|
||||
getData(NUMBEROFWAGONS),
|
||||
getData(PRINTERFK).toInt(),
|
||||
getDataInt(PRINTERFK),
|
||||
getData(PRINTERNAME),
|
||||
getData(TRAINNAME),
|
||||
getData(ITEMPACKING),
|
||||
|
@ -415,6 +430,7 @@ class AjustesFragment :
|
|||
editor.apply()
|
||||
|
||||
viewModel.ajustesitem[3].selected = it.name
|
||||
binding.splashProgress.visibility=VISIBLE
|
||||
viewModel.operator_updateTrain(
|
||||
it.id!!
|
||||
)
|
||||
|
|
|
@ -6,6 +6,7 @@ import androidx.lifecycle.LiveData
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.domain.SilexCallback
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
|
@ -47,6 +48,10 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
val actionUpdatePacking: LiveData<ResponseItemVO>
|
||||
get() = _actionUpdatePacking
|
||||
|
||||
private val _actionUpdatePackingTicket by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val actionUpdatePackingTicket: LiveData<ResponseItemVO>
|
||||
get() = _actionUpdatePackingTicket
|
||||
|
||||
private val _workerupdatePrinter by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val workerupdatePrinter: LiveData<ResponseItemVO>
|
||||
get() = _workerupdatePrinter
|
||||
|
@ -83,6 +88,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
val loadPrintersList = Transformations.map(_printerList) { Event(it) }
|
||||
val loadItemPackingList = Transformations.map(_itemspackinglist) { Event(it) }
|
||||
val loadTrainList = Transformations.map(_trainList) { Event(it) }
|
||||
val loadUpdatePacking = Transformations.map(_actionUpdatePackingTicket) { Event(it) }
|
||||
|
||||
fun inititializeDefaultAjusts(
|
||||
sectorDescrip: String,
|
||||
|
@ -262,7 +268,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun printer_get() {
|
||||
silex.printer_get().enqueue(object : Callback<List<Printers>> {
|
||||
silex.printer_get().enqueue(object : Callback<List<Printers>> {
|
||||
override fun onFailure(call: Call<List<Printers>>, t: Throwable) {
|
||||
val listError: ArrayList<Printers> = ArrayList()
|
||||
listError.add(Printers(0, "", true, t.message!!))
|
||||
|
@ -294,7 +300,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun train_get() {
|
||||
silex.train_get().enqueue(object : Callback<List<Train>> {
|
||||
silex.train_get().enqueue(object : Callback<List<Train>> {
|
||||
override fun onFailure(call: Call<List<Train>>, t: Throwable) {
|
||||
val listError: ArrayList<Train> = ArrayList()
|
||||
listError.add(Train(0, "", true, t.message!!))
|
||||
|
@ -327,7 +333,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun worker_updateSector(sectorFk: Int) {
|
||||
|
||||
silex.worker_updateSector(sectorFk)
|
||||
silex.worker_updateSector(sectorFk)
|
||||
.enqueue(object : Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
|
||||
|
@ -367,7 +373,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun operator_updateItemPackingType(itemPackingTypeFk: String) {
|
||||
|
||||
silex.operator_updateItemPackingType(itemPackingTypeFk)
|
||||
silex.operator_updateItemPackingType(itemPackingTypeFk)
|
||||
.enqueue(object : Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
|
||||
|
@ -407,7 +413,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun operator_getNumberOfWagons() {
|
||||
|
||||
silex.operator_getNumberOfWagons()
|
||||
silex.operator_getNumberOfWagons()
|
||||
.enqueue(object : Callback<Int?> {
|
||||
override fun onFailure(call: Call<Int?>, t: Throwable) {
|
||||
|
||||
|
@ -447,7 +453,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun operator_getTrain() {
|
||||
|
||||
silex.operator_getTrain()
|
||||
silex.operator_getTrain()
|
||||
.enqueue(object : Callback<String?> {
|
||||
override fun onFailure(call: Call<String?>, t: Throwable) {
|
||||
|
||||
|
@ -488,7 +494,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun operator_getItemPackingType() {
|
||||
|
||||
silex.operator_getItemPackingType()
|
||||
silex.operator_getItemPackingType()
|
||||
.enqueue(object : Callback<String?> {
|
||||
override fun onFailure(call: Call<String?>, t: Throwable) {
|
||||
|
||||
|
@ -529,7 +535,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun worker_isF11Allowed() {
|
||||
|
||||
silex.worker_isF11Allowed()
|
||||
silex.worker_isF11Allowed()
|
||||
.enqueue(object : Callback<Boolean> {
|
||||
override fun onFailure(call: Call<Boolean>, t: Throwable) {
|
||||
|
||||
|
@ -565,7 +571,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun worker_updatePrinter(printerFk: Int) {
|
||||
silex.worker_updatePrinter(printerFk)
|
||||
silex.worker_updatePrinter(printerFk)
|
||||
.enqueue(object : Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
|
||||
|
@ -604,39 +610,61 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun operator_updateTrain(trainFk: Int) {
|
||||
|
||||
silex.operator_updateTrain(trainFk)
|
||||
.enqueue(object : Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
silex.operator_updateTrain(trainFk)
|
||||
.enqueue(object : SilexCallback<Unit>(context) {
|
||||
/* override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
|
||||
_actionUpdatePacking.value = ResponseItemVO(
|
||||
_actionUpdatePacking.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<Unit>,
|
||||
response: Response<Unit>
|
||||
) {
|
||||
|
||||
if (!response.isSuccessful) {
|
||||
_actionUpdatePacking.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
} else {
|
||||
_actionUpdatePacking.value = ResponseItemVO(
|
||||
response = response.message(),
|
||||
isError = false,
|
||||
errorMessage = ""
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
}*/
|
||||
override fun onError(t: Throwable) {
|
||||
//throw Error(nameofFunction((this)) + t.message)
|
||||
_actionUpdatePackingTicket.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
t.message!!
|
||||
)
|
||||
)
|
||||
throw t
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<Unit>,
|
||||
response: Response<Unit>
|
||||
) {
|
||||
|
||||
if (!response.isSuccessful) {
|
||||
_actionUpdatePacking.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
override fun onSuccess(response: Response<Unit>) {
|
||||
_actionUpdatePackingTicket.value = ResponseItemVO(
|
||||
isError = false,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
} else {
|
||||
_actionUpdatePacking.value = ResponseItemVO(
|
||||
response = response.message(),
|
||||
isError = false,
|
||||
errorMessage = ""
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
)
|
||||
super.onSuccess(response)
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
@ -184,7 +184,7 @@ class ItemCardFragment(
|
|||
|
||||
user = getData(USER)
|
||||
password = getData(PASSWORD)
|
||||
warehouseFk = getData(WAREHOUSEFK).toInt()
|
||||
warehouseFk = getDataInt(WAREHOUSEFK)
|
||||
|
||||
this.itemFk = itemFk.toString()
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ class ItemProposalFragment(
|
|||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
viewModel.item_getSimilar(
|
||||
itemFk,
|
||||
getData(WAREHOUSEFK).toInt(),
|
||||
getDataInt(WAREHOUSEFK),
|
||||
vShipped = currentDay(),
|
||||
vIsShowedByType = filter,
|
||||
)
|
||||
|
@ -99,7 +99,7 @@ class ItemProposalFragment(
|
|||
|
||||
viewModel.item_getSimilar(
|
||||
itemFk,
|
||||
getData(WAREHOUSEFK).toInt(),
|
||||
getDataInt(WAREHOUSEFK),
|
||||
vIsShowedByType = filter,
|
||||
vShipped = currentDay(),
|
||||
)
|
||||
|
|
|
@ -68,7 +68,7 @@ class CollectionFragment(
|
|||
private var goMistakeBack: Boolean = false
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
private var itemShelvingFkStored: String = ""
|
||||
private var itemShelvingFkStored: Int = 0
|
||||
private var storedBackPosition: Int = 0
|
||||
private var tickets: ArrayList<String> = ArrayList()
|
||||
private var mistakeSale: SaleVO? = null
|
||||
|
@ -94,9 +94,9 @@ class CollectionFragment(
|
|||
private var mIsListening = false
|
||||
private var placementPicked: PlacementVO? = null
|
||||
private var lastPlacementPicked: PlacementVO? = null
|
||||
private var originalItemScan: String = ""
|
||||
private var workerFkFromTicket = ""
|
||||
private var itemShelvingTracking_mark: String = ""
|
||||
private var originalItemScan: Int = 0
|
||||
private var workerFkFromTicket: String? = null
|
||||
private var itemShelvingTracking_mark: Int = 0
|
||||
private var recylerViewState: Parcelable? = null
|
||||
|
||||
companion object {
|
||||
|
@ -131,7 +131,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print ="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
}
|
||||
|
@ -297,8 +297,8 @@ class CollectionFragment(
|
|||
if (!buttonPushedGetCollection) {
|
||||
viewModel.collection_get(
|
||||
collection.collectionFk,
|
||||
getData(SECTORFK).toInt(),
|
||||
print="0",
|
||||
getDataInt(SECTORFK),
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
buttonPushedGetCollection = true
|
||||
|
@ -306,7 +306,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
lastScanned,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
|
||||
)
|
||||
|
@ -324,7 +324,7 @@ class CollectionFragment(
|
|||
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titleUserControlVehicle)),
|
||||
workerFkFromTicket
|
||||
workerFkFromTicket.toString()
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
buttonPushedGetCollection = false
|
||||
|
@ -494,7 +494,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
}
|
||||
|
@ -555,7 +555,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
|
||||
|
@ -735,7 +735,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
it.response.toInt(),
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
customDialog.dismiss()
|
||||
|
@ -766,7 +766,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
it.response.toInt(),
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
customDialog.dismiss()
|
||||
|
@ -796,7 +796,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
|
||||
|
@ -820,9 +820,7 @@ class CollectionFragment(
|
|||
|
||||
} else {
|
||||
viewModel.saleTrackingDel(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
saleFk = sales[positionUnmarked].saleFk.toString()
|
||||
saleFk = sales[positionUnmarked].saleFk
|
||||
)
|
||||
|
||||
goBack = false
|
||||
|
@ -841,7 +839,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
}
|
||||
|
@ -857,7 +855,7 @@ class CollectionFragment(
|
|||
binding.splashProgress.visibility = GONE
|
||||
if (it.isError) {
|
||||
//TEST3
|
||||
if (getData(USERFK) == "18890" || getData(USERFK) == "19591") {
|
||||
if (getDataInt(USERFK) == 18890 || getDataInt(USERFK) == 19591) {
|
||||
"La línea NO se ha marcado correctamente".toast(context)
|
||||
}
|
||||
|
||||
|
@ -867,7 +865,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
}
|
||||
|
@ -875,7 +873,7 @@ class CollectionFragment(
|
|||
} else {
|
||||
// pintar línea
|
||||
//TEST3
|
||||
if (getData(USERFK) == "18890" || getData(USERFK) == "19591") {
|
||||
if (getDataInt(USERFK) == 18890 || getDataInt(USERFK) == 19591) {
|
||||
"La línea se ha marcado correctamente".toast(context)
|
||||
}
|
||||
saleAdapter!!.notifyDataSetChanged()
|
||||
|
@ -1272,7 +1270,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
txtscan.toInt(),
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
|
||||
|
@ -1419,7 +1417,7 @@ class CollectionFragment(
|
|||
vIsChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
|
||||
vOriginalQuantity = sales[position].pickedQuantity!!,
|
||||
vStateFk = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
|
||||
vBuyFk = originalItemScan
|
||||
vBuyFk = originalItemScan!!
|
||||
|
||||
)
|
||||
|
||||
|
@ -1436,9 +1434,9 @@ class CollectionFragment(
|
|||
vIsChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
|
||||
vOriginalQuantity = sales[position].pickedQuantity!!,
|
||||
vStateFk = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
|
||||
vBuyFk = originalItemScan,
|
||||
vBuyFk = originalItemScan!!,
|
||||
vItemShelvingFk = itemShelvingTracking_mark,
|
||||
vQuantity = customDialogList.getValue()
|
||||
vQuantity = customDialogList.getValue().toInt()
|
||||
|
||||
|
||||
)
|
||||
|
@ -1510,7 +1508,7 @@ class CollectionFragment(
|
|||
var item = ""
|
||||
var longName = ""
|
||||
var total = "0"
|
||||
var itemShelvingFk = "0"
|
||||
var itemShelvingFk = 0
|
||||
if (!placementSupplyListVO.list.isEmpty()) {
|
||||
var placement: PlacementSupplyVO? = null
|
||||
placementSupplyListVO.list.forEach { placementVO ->
|
||||
|
@ -1545,7 +1543,7 @@ class CollectionFragment(
|
|||
) {
|
||||
getString(R.string.quantityHigh).toast(requireContext())
|
||||
} else if (isNumber(customDialogList.getValue())) {
|
||||
originalItemScan = customDialogList.getValueTwo()
|
||||
originalItemScan = customDialogList.getValueTwo().toInt()
|
||||
// Log.i("VERDATURA","Le pasamos el siguiente item $originalItemScan que es el escaneado")
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
|
@ -1564,7 +1562,6 @@ class CollectionFragment(
|
|||
VISIBLE
|
||||
|
||||
viewModel.getIdFromCodeSalix(
|
||||
token = getData(TOKEN),
|
||||
code = customDialogList.getValueTwo(),
|
||||
)
|
||||
/* } else {
|
||||
|
@ -1625,7 +1622,7 @@ class CollectionFragment(
|
|||
) {
|
||||
getString(R.string.quantityHigh).toast(requireContext())
|
||||
} else if (isNumber(customDialogList.getValue())) {
|
||||
originalItemScan = customDialogList.getValueTwo()
|
||||
originalItemScan = customDialogList.getValueTwo().toInt()
|
||||
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||
|
@ -1644,7 +1641,6 @@ class CollectionFragment(
|
|||
|
||||
|
||||
viewModel.getIdFromCodeSalix(
|
||||
getData(TOKEN),
|
||||
code = customDialogList.getValueTwo()
|
||||
)
|
||||
/*
|
||||
|
@ -1710,7 +1706,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
|
||||
|
@ -1737,7 +1733,7 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
//Tarea #4371
|
||||
private fun onQuantityOfShelvingSelected(itemShelvingFk: String, quantity: Int = 0) {
|
||||
private fun onQuantityOfShelvingSelected(itemShelvingFk: Int, quantity: Int = 0) {
|
||||
//1 - MODIFICAR CANTIDAD DEL CARRO
|
||||
try {
|
||||
val shelvingVisible =
|
||||
|
@ -1852,7 +1848,7 @@ class CollectionFragment(
|
|||
itemFk = customDialogList.getValue().toInt(),
|
||||
ticketFk = ticketSelected,
|
||||
quantityFk = customDialogList.getValueTwo().toInt(),
|
||||
warehouseFk = getData(WAREHOUSEFK)
|
||||
warehouseFk = getDataInt(WAREHOUSEFK)
|
||||
)
|
||||
|
||||
|
||||
|
@ -1904,7 +1900,7 @@ class CollectionFragment(
|
|||
itemFk = customDialogList.getValue().toInt(),
|
||||
ticketFk = ticketSelected,
|
||||
quantityFk = customDialogList.getValueTwo().toInt(),
|
||||
warehouseFk = getData(WAREHOUSEFK)
|
||||
warehouseFk = getDataInt(WAREHOUSEFK)
|
||||
)
|
||||
scanRequest()
|
||||
customDialogList.dismiss()
|
||||
|
@ -2353,7 +2349,7 @@ class CollectionFragment(
|
|||
viewModel.collectionTicketGet(
|
||||
collection.collectionFk,
|
||||
getDataInt(SECTORFK),
|
||||
print="0",
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
|
||||
|
@ -2536,7 +2532,7 @@ class CollectionFragment(
|
|||
if (it.description == item.code) {
|
||||
viewModel.saleMistakeAdd(
|
||||
vSaleFk = mistakeSale?.saleFk!!,
|
||||
vUserFk = mistakeSale?.workerFk!!,
|
||||
vUserFk = mistakeSale?.workerFk!!.toInt(),
|
||||
vTypeFk = it.id
|
||||
)
|
||||
|
||||
|
|
|
@ -147,7 +147,7 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
fun collectionTicketGet(
|
||||
collectionFk: Int,
|
||||
sectorFk: Int,
|
||||
print:String,
|
||||
print: String,
|
||||
type: String
|
||||
) {
|
||||
silex.collection_getTickets(
|
||||
|
@ -158,7 +158,8 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
).enqueue(object :
|
||||
Callback<CollectionVO> {
|
||||
override fun onFailure(call: Call<CollectionVO>, t: Throwable) {
|
||||
_collectionTicketList.value = CollectionVO(0,
|
||||
_collectionTicketList.value = CollectionVO(
|
||||
0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
|
@ -171,7 +172,8 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
if (response.body() != null) {
|
||||
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
|
||||
} else {
|
||||
_collectionTicketList.value = CollectionVO(0,
|
||||
_collectionTicketList.value = CollectionVO(
|
||||
0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
@ -186,7 +188,7 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
fun collection_get(
|
||||
collectionFk: Int,
|
||||
sectorFk: Int,
|
||||
print:String,
|
||||
print: String,
|
||||
type: String
|
||||
) {
|
||||
silex.collection_get(
|
||||
|
@ -197,7 +199,8 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
).enqueue(object :
|
||||
Callback<CollectionVO> {
|
||||
override fun onFailure(call: Call<CollectionVO>, t: Throwable) {
|
||||
_collectionTicketList.value = CollectionVO(0,
|
||||
_collectionTicketList.value = CollectionVO(
|
||||
0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
|
@ -210,7 +213,8 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
if (response.body() != null) {
|
||||
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
|
||||
} else {
|
||||
_collectionTicketList.value = CollectionVO(0,
|
||||
_collectionTicketList.value = CollectionVO(
|
||||
0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
@ -227,13 +231,13 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
vOriginalQuantity: Int,
|
||||
vStateFk: String,
|
||||
vIsChecked: String,
|
||||
vBuyFk: String
|
||||
vBuyFk: Int
|
||||
) {
|
||||
silex.saleTrackingReplace(
|
||||
saleFk,
|
||||
vOriginalQuantity,
|
||||
vStateFk,
|
||||
vIsChecked,
|
||||
vIsChecked != "0",
|
||||
vBuyFk
|
||||
).enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
|
@ -264,15 +268,15 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
vOriginalQuantity: Int,
|
||||
vStateFk: String,
|
||||
vIsChecked: String,
|
||||
vBuyFk: String,
|
||||
vItemShelvingFk: String,
|
||||
vQuantity: String
|
||||
vBuyFk: Int,
|
||||
vItemShelvingFk: Int,
|
||||
vQuantity: Int
|
||||
) {
|
||||
silex.saleTracking_mark(
|
||||
saleFk,
|
||||
vOriginalQuantity,
|
||||
vStateFk,
|
||||
vIsChecked,
|
||||
vIsChecked != "0",
|
||||
vBuyFk,
|
||||
vItemShelvingFk,
|
||||
vQuantity
|
||||
|
@ -317,6 +321,7 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
val listError: ArrayList<PlacementSupplyVO> = ArrayList()
|
||||
listError.add(
|
||||
PlacementSupplyVO(
|
||||
itemShelvingFk = 0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
|
@ -334,6 +339,7 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
val listError: ArrayList<PlacementSupplyVO> = ArrayList()
|
||||
listError.add(
|
||||
PlacementSupplyVO(
|
||||
itemShelvingFk = 0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
@ -515,7 +521,7 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
itemFk: Int,
|
||||
quantityFk: Int,
|
||||
ticketFk: Int,
|
||||
warehouseFk: String
|
||||
warehouseFk: Int
|
||||
) {
|
||||
silex.collectionAddItem(
|
||||
itemFk,
|
||||
|
@ -596,9 +602,10 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
quantity: String,
|
||||
|
||||
) {
|
||||
var saleTransfer = listSaleSalix(arrayListOf(saleSalix(id = saleFk, quantity = quantity.toInt())))
|
||||
var saleTransfer =
|
||||
listSaleSalix(arrayListOf(saleSalix(id = saleFk, quantity = quantity.toInt())))
|
||||
salix.transferSalesSalix(
|
||||
ticketFk,saleTransfer
|
||||
ticketFk, saleTransfer
|
||||
|
||||
|
||||
).enqueue(object : Callback<Any> {
|
||||
|
@ -666,8 +673,8 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
|
||||
fun saleTrackingDel(usuario: String, password: String, saleFk: String) {
|
||||
getSacadorControladorUserCase.saleTrackingDel(usuario, password, saleFk)
|
||||
fun saleTrackingDel(saleFk: Int) {
|
||||
silex.saleTrackingDel(saleFk)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseDel.value = ResponseItemVO(
|
||||
|
@ -846,8 +853,8 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}
|
||||
|
||||
fun getIdFromCodeSalix(token: String, code: String) {
|
||||
getSacadorControladorUserCase.getIdFromCodeSalix(token, code)
|
||||
fun getIdFromCodeSalix(code: String) {
|
||||
salix.barcodes_toitem(code)
|
||||
.enqueue(object : Callback<String> {
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
_responseCode.value = ResponseItemVO(
|
||||
|
@ -992,8 +999,8 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun saleMistakeAdd(
|
||||
vSaleFk: Int,
|
||||
vUserFk: String,
|
||||
vTypeFk: String
|
||||
vUserFk: Int,
|
||||
vTypeFk: Int
|
||||
) {
|
||||
silex.saleMistakeAdd(vSaleFk, vUserFk, vTypeFk)
|
||||
.enqueue(object :
|
||||
|
@ -1030,7 +1037,7 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
.enqueue(object : Callback<List<MistakeTypeVO>> {
|
||||
override fun onFailure(call: Call<List<MistakeTypeVO>>, t: Throwable) {
|
||||
val listError: ArrayList<MistakeTypeVO> = ArrayList()
|
||||
listError.add(MistakeTypeVO("0", ""))
|
||||
listError.add(MistakeTypeVO(0, ""))
|
||||
_mistakeList.value = MistakeTypeListVO(listError)
|
||||
}
|
||||
|
||||
|
@ -1042,7 +1049,7 @@ class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
|||
_mistakeList.value = response.body()?.let { MistakeTypeListVO(it) }
|
||||
} else {
|
||||
val listError: ArrayList<MistakeTypeVO> = ArrayList()
|
||||
listError.add(MistakeTypeVO("0", ""))
|
||||
listError.add(MistakeTypeVO(0, ""))
|
||||
_mistakeList.value = MistakeTypeListVO(listError)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@ class CollectionShowTicketFragment(
|
|||
if (!buttonPushedGetCollection) {
|
||||
viewModel.collection_get(
|
||||
collection.collectionFk,
|
||||
getData(SECTORFK).toInt(),
|
||||
getDataInt(SECTORFK),
|
||||
print = "0",
|
||||
type
|
||||
)
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.content.Intent
|
|||
import android.graphics.drawable.Drawable
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.util.Log.d
|
||||
import android.view.View.*
|
||||
import android.widget.ImageView
|
||||
import androidx.annotation.RequiresApi
|
||||
|
@ -16,22 +15,21 @@ import es.verdnatura.presentation.base.BaseFragment
|
|||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
|
||||
import es.verdnatura.presentation.common.loadUrl
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
|
||||
|
||||
class ControlVehiculoUsuarioFragment(
|
||||
var vUserFK: String = ""
|
||||
var vUserFK: Int
|
||||
) : BaseFragment<FragmentVehiclecontrolUserBinding, ControlVehiculoViewModel>(
|
||||
ControlVehiculoViewModel::class
|
||||
) {
|
||||
|
||||
private var userFk = ""
|
||||
private var userFk = 0
|
||||
private var goBack: Boolean = false
|
||||
override fun getLayoutId(): Int = R.layout.fragment_vehiclecontrol_user
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(vUserFK: String) = ControlVehiculoUsuarioFragment(vUserFK)
|
||||
fun newInstance(vUserFK: Int) = ControlVehiculoUsuarioFragment(vUserFK)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
|
@ -41,7 +39,6 @@ class ControlVehiculoUsuarioFragment(
|
|||
binding.splashProgress.visibility = GONE
|
||||
setEvents()
|
||||
setToolBar()
|
||||
d("VERDNATURA::","el worker es"+vUserFK)
|
||||
setControlVehicleUser()
|
||||
super.init()
|
||||
}
|
||||
|
@ -77,7 +74,7 @@ class ControlVehiculoUsuarioFragment(
|
|||
private fun getExtensionFromUser() {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.sip_getExtensionSalix(getData(TOKEN), vUserFK)
|
||||
viewModel.sip_getExtensionSalix(vUserFK)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
@ -86,10 +83,9 @@ class ControlVehiculoUsuarioFragment(
|
|||
}
|
||||
|
||||
private fun setControlVehicleUser() {
|
||||
userFk = getData(USERFK)
|
||||
|
||||
if (userFk.equals(vUserFK)) {
|
||||
userFk = getDataInt(USERFK)
|
||||
|
||||
if (userFk==vUserFK.toInt()) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.machine_getWorkerPlate()
|
||||
viewModel.deviceProduction_getnameDevice(
|
||||
|
@ -100,23 +96,20 @@ class ControlVehiculoUsuarioFragment(
|
|||
)
|
||||
|
||||
} else {
|
||||
userFk = vUserFK
|
||||
|
||||
userFk = vUserFK.toInt()
|
||||
binding.userInformation.visibility = INVISIBLE
|
||||
binding.nameVehiclecontrol.visibility = INVISIBLE
|
||||
binding.userInformation.setOnClickListener({ binding.mainToolbar.backButton.performClick() })
|
||||
binding.userImage.setOnClickListener { binding.mainToolbar.backButton.performClick() }
|
||||
viewModel.machine_getWorkerPlate()
|
||||
}
|
||||
|
||||
binding.userImage.loadUrl(
|
||||
getData("base_urlSalix")+"/Images/user/160x160/$userFk/download?access_token=${
|
||||
getData("base_urlSalix") + "/Images/user/160x160/$userFk/download?access_token=${
|
||||
getData(
|
||||
TOKEN
|
||||
)
|
||||
}"
|
||||
)
|
||||
|
||||
|
||||
binding.nameVehiclecontrol.text = getData(USER)
|
||||
binding.registeredVehiclecontrol.text = ""
|
||||
binding.deviceName.text = ""
|
||||
|
@ -124,7 +117,6 @@ class ControlVehiculoUsuarioFragment(
|
|||
|
||||
}
|
||||
|
||||
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
|
@ -151,15 +143,16 @@ class ControlVehiculoUsuarioFragment(
|
|||
if (it.response == "false") {
|
||||
if (it.type.equals("getWorker")) {
|
||||
binding.assignedDevicename.text =
|
||||
getString(R.string.noAssigned)}
|
||||
getString(R.string.noAssigned)
|
||||
}
|
||||
} else {
|
||||
|
||||
when (it.type){
|
||||
"getnameDevice"-> binding.deviceName.text = it.response
|
||||
"getWorker"-> binding.assignedDevicename.text =
|
||||
it.response
|
||||
"getWorkerPlate"-> binding.registeredVehiclecontrol.text = it.response
|
||||
}
|
||||
when (it.type) {
|
||||
"getnameDevice" -> binding.deviceName.text = it.response
|
||||
"getWorker" -> binding.assignedDevicename.text =
|
||||
it.response
|
||||
"getWorkerPlate" -> binding.registeredVehiclecontrol.text = it.response
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -171,15 +164,15 @@ class ControlVehiculoUsuarioFragment(
|
|||
binding.splashProgress.visibility = GONE
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(
|
||||
getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + vUserFK,
|
||||
isError = true,
|
||||
true
|
||||
)
|
||||
ma.messageWithSound(
|
||||
getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + vUserFK,
|
||||
isError = true,
|
||||
true
|
||||
)
|
||||
|
||||
} else {
|
||||
|
||||
callPicker(it.response)
|
||||
callPicker(it.response)
|
||||
}
|
||||
|
||||
})
|
||||
|
@ -187,6 +180,7 @@ class ControlVehiculoUsuarioFragment(
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
private fun callPicker(extensionNumber: String) {
|
||||
|
||||
|
||||
|
|
|
@ -242,11 +242,9 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}
|
||||
fun sip_getExtensionSalix(
|
||||
token: String,
|
||||
workerId: String
|
||||
workerId: Int
|
||||
) {
|
||||
getVehicleControlTimeUserCase.sip_getExtensionSalix(
|
||||
token,
|
||||
salix.sip_getExtension(
|
||||
workerId
|
||||
).enqueue(object :
|
||||
Callback<Any> {
|
||||
|
|
|
@ -48,7 +48,7 @@ class HistoricoArticuloFragment(
|
|||
// customDialog = CustomDialog(requireContext())
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
filter = "all"
|
||||
itemFk?.let { viewModel.itemDiary(it, getData(WAREHOUSEFK).toInt()) }
|
||||
itemFk?.let { viewModel.itemDiary(it, getDataInt(WAREHOUSEFK)) }
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.itemdiary) + ":" + itemFk
|
||||
setToolBar()
|
||||
setEvents()
|
||||
|
@ -111,7 +111,7 @@ class HistoricoArticuloFragment(
|
|||
private fun viewModelwithFilter(keyfilter: String) {
|
||||
filter = keyfilter
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
itemFk?.let { viewModel.itemDiary(it, getData(WAREHOUSEFK).toInt()) }
|
||||
itemFk?.let { viewModel.itemDiary(it, getDataInt(WAREHOUSEFK)) }
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
|
|
|
@ -69,7 +69,7 @@ class InventaryFragment :
|
|||
buyerId = getData(BUYERID)
|
||||
if (!buyerId.isBlank()) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.getInventory( buyerId.toInt(), getData(WAREHOUSEFK).toInt())
|
||||
viewModel.getInventory( buyerId.toInt(), getDataInt(WAREHOUSEFK))
|
||||
}
|
||||
binding.filterBuyer.setOnClickListener {
|
||||
//SimpleSearchDialogCompat(context,getString(R.string.compradores),getString(R.string.escribirparteNombre),null,initData(),
|
||||
|
@ -86,7 +86,7 @@ class InventaryFragment :
|
|||
buyerId = nombre.getBuyerId()
|
||||
viewModel.getInventory(
|
||||
nombre.getBuyerId().toInt(),
|
||||
getData(WAREHOUSEFK).toInt()
|
||||
getDataInt(WAREHOUSEFK)
|
||||
)
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
baseSearchDialogCompat.dismiss()
|
||||
|
@ -127,7 +127,7 @@ class InventaryFragment :
|
|||
firstVisiblePosition = layoutManager?.findFirstVisibleItemPosition() ?: 0
|
||||
viewModel.getInventory(
|
||||
buyerId.toInt(),
|
||||
getData(WAREHOUSEFK).toInt()
|
||||
getDataInt(WAREHOUSEFK)
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ class InventaryFragment :
|
|||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.itemTrash(
|
||||
item.itemFk!!.toInt(),
|
||||
getData(WAREHOUSEFK).toInt(),
|
||||
getDataInt(WAREHOUSEFK),
|
||||
item.nicho,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -182,26 +182,28 @@ class LoginViewModel(var context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun worker_getId() {
|
||||
|
||||
silex.worker_getId().enqueue(object : SilexCallback<Int>(context) {
|
||||
override fun onSuccess(response: Response<Int>) {
|
||||
val prefs = app!!.getPrefs()
|
||||
//de moment string , a revisar casos ja que si no dona problemes
|
||||
response.body()?.let { prefs.putString("userFk", it.toString()) }
|
||||
response.body()?.let { prefs.putInt("userFk", it) }
|
||||
prefs.commit()
|
||||
|
||||
}
|
||||
|
||||
// Esto no estava:
|
||||
override fun onError(t: Throwable) {
|
||||
throw Error(nameofFunction((this)) + t.message)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
fun deviceLog_add(
|
||||
app: String, versionApp: String, android_id: String
|
||||
) {
|
||||
silex.deviceLog_add(app, versionApp, android_id)
|
||||
.enqueue(object : SilexCallback<Void>(context) {
|
||||
override fun onError(t: Throwable) {
|
||||
throw Error(nameofFunction((this)) + "->" + t.message)
|
||||
throw Error(nameofFunction((this)) + t.message)
|
||||
}
|
||||
|
||||
override fun onSuccess(response: Response<Void>) {
|
||||
|
|
|
@ -370,7 +370,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
}
|
||||
|
||||
getString(R.string.titleUserControlVehicle) -> {
|
||||
addFragmentOnTop(ControlVehiculoUsuarioFragment.newInstance(entryPoint))
|
||||
addFragmentOnTop(ControlVehiculoUsuarioFragment.newInstance(entryPoint.toInt()))
|
||||
}
|
||||
|
||||
/* getString(R.string.titlePrePicker) -> {
|
||||
|
|
|
@ -134,7 +134,7 @@ class ExpeditionPalletDetailFragment(
|
|||
)
|
||||
viewModel.expeditionPalletPrintSet(
|
||||
itemPallet!!.Pallet,
|
||||
getData(SECTORFK).toInt()
|
||||
getDataInt(SECTORFK)
|
||||
)
|
||||
} else {
|
||||
ma.messageWithSound(
|
||||
|
|
|
@ -1,46 +1,44 @@
|
|||
package es.verdnatura.presentation.view.feature.presacador.adapter
|
||||
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.databinding.ItemCollectionRowBinding
|
||||
import es.verdnatura.domain.ConstAndValues.PREITEMPICKER
|
||||
|
||||
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||
|
||||
|
||||
class PreCollectionAdapter (
|
||||
private val items: List<CollectionVO>,
|
||||
private val onCollectionSelected: OnCollectionSelectedListener
|
||||
): RecyclerView.Adapter<PreCollectionAdapter.AjustesItemHolder> () {
|
||||
class PreCollectionAdapter(
|
||||
private val items: List<CollectionVO>,
|
||||
private val onCollectionSelected: OnCollectionSelectedListener
|
||||
) : RecyclerView.Adapter<PreCollectionAdapter.AjustesItemHolder>() {
|
||||
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
|
||||
return AjustesItemHolder(
|
||||
ItemCollectionRowBinding.inflate(LayoutInflater.from(parent.context),parent,false)
|
||||
)
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
|
||||
return AjustesItemHolder(
|
||||
ItemCollectionRowBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() = items.size
|
||||
|
||||
override fun onBindViewHolder(holder: AjustesItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
holder.binding.root.setOnClickListener {
|
||||
onCollectionSelected.onCollectionSelected(items[position], PREITEMPICKER)
|
||||
// Log.d("VERDNATURA::","2-Click item ${items[position].collectionFk}+PREITEMPICKER")
|
||||
}
|
||||
}
|
||||
|
||||
override fun getItemCount() =items.size
|
||||
|
||||
override fun onBindViewHolder(holder: AjustesItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
holder.binding.root.setOnClickListener {
|
||||
onCollectionSelected.onCollectionSelected(items[position],PREITEMPICKER)
|
||||
// Log.d("VERDNATURA::","2-Click item ${items[position].collectionFk}+PREITEMPICKER")
|
||||
class AjustesItemHolder(
|
||||
val binding: ItemCollectionRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
fun bind(item: CollectionVO) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class AjustesItemHolder(
|
||||
val binding: ItemCollectionRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root){
|
||||
fun bind(item: CollectionVO) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -5,6 +5,7 @@ import android.graphics.drawable.Drawable
|
|||
import android.media.MediaPlayer
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log.d
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
|
@ -55,7 +56,7 @@ class EndSacadorFragment(
|
|||
private var storedPosition: Int = 0
|
||||
private var storedBackPosition: Int = 0
|
||||
private var storedShelvingPosition: Int = 0
|
||||
private var itemShelvingFkStored: String = ""
|
||||
private var itemShelvingFkStored: Int = 0
|
||||
private var goBack: Boolean = false
|
||||
private var goBack2: Boolean = false
|
||||
private var listPlacementSupply: ArrayList<BarcodeVO> = ArrayList()
|
||||
|
@ -173,6 +174,7 @@ class EndSacadorFragment(
|
|||
with(viewModel) {
|
||||
salesList.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = GONE
|
||||
//d("VERDNATURA::","la lista es {$it}")
|
||||
createSaleList(it)
|
||||
})
|
||||
|
||||
|
@ -315,7 +317,7 @@ class EndSacadorFragment(
|
|||
} else {
|
||||
viewModel.sectorCollection_getSale(
|
||||
collection.collectionFk,
|
||||
getData(SECTORFK).toInt()
|
||||
getDataInt(SECTORFK)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -566,7 +568,7 @@ class EndSacadorFragment(
|
|||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.sectorCollection_getSale(
|
||||
collection.collectionFk,
|
||||
vSectorFk = getData(SECTORFK).toInt()
|
||||
vSectorFk = getDataInt(SECTORFK)
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -850,7 +852,7 @@ class EndSacadorFragment(
|
|||
private fun showShelving(position: Int, shelvingPosition: Int) {
|
||||
storedShelvingPosition = shelvingPosition
|
||||
storedPosition = position
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
var quantityGet = 0
|
||||
try {
|
||||
quantityGet = (sales[position].saldo - sales[position].picked)
|
||||
|
@ -868,7 +870,7 @@ class EndSacadorFragment(
|
|||
var item = ""
|
||||
var longName = ""
|
||||
var total = "0"
|
||||
var itemShelvingFk = "0"
|
||||
var itemShelvingFk = 0
|
||||
if (!placementSupplyListVO.list.isEmpty()) {
|
||||
val placement = placementSupplyListVO.list[0]
|
||||
shelving = placement.shelving
|
||||
|
@ -983,7 +985,7 @@ class EndSacadorFragment(
|
|||
|
||||
}
|
||||
|
||||
private fun onQuantityOfShelvingSelected(itemShelvingFk: String) {
|
||||
private fun onQuantityOfShelvingSelected(itemShelvingFk: Int) {
|
||||
//1 - MODIFICAR CANTIDAD DEL CARRO
|
||||
try {
|
||||
val shelvingVisible = sales[storedPosition].carros[storedShelvingPosition].stockTotal
|
||||
|
@ -1003,7 +1005,7 @@ class EndSacadorFragment(
|
|||
viewModel.itemShelvingSaleSupplyAdd(
|
||||
itemShelvingFk = itemShelvingFk,
|
||||
saleFk = sales[storedPosition].idMovimiento,
|
||||
quantity = customDialogList.getValue()
|
||||
quantity = customDialogList.getValue().toInt()
|
||||
)
|
||||
|
||||
} catch (e: Exception) {
|
||||
|
@ -1241,7 +1243,7 @@ class EndSacadorFragment(
|
|||
viewModel.collectionMissingTrash(
|
||||
saleFk = sales[position].idMovimiento,
|
||||
quantity = totalQuantity.toString(),
|
||||
warehouseFk = getData(WAREHOUSEFK),
|
||||
warehouseFk = getDataInt(WAREHOUSEFK),
|
||||
type = "FALSE",
|
||||
originalQuantity = quantity
|
||||
)
|
||||
|
|
|
@ -3,6 +3,7 @@ package es.verdnatura.presentation.view.feature.presacador.fragment
|
|||
import android.content.Context
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.os.Build
|
||||
import android.util.Log.d
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.lifecycle.Observer
|
||||
|
@ -89,7 +90,7 @@ class InitPreSacadorFragment (
|
|||
|
||||
iconAdd.drawable -> {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.sectorCollection_new(getData(SECTORFK).toInt())
|
||||
viewModel.sectorCollection_new(getDataInt(SECTORFK))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
override fun onFailure(call: Call<List<PlacementSupplyVO>>, t: Throwable) {
|
||||
val listError: ArrayList<PlacementSupplyVO> = ArrayList()
|
||||
listError.add(
|
||||
PlacementSupplyVO(
|
||||
PlacementSupplyVO(itemShelvingFk = 0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
|
@ -257,7 +257,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
} else {
|
||||
val listError: ArrayList<PlacementSupplyVO> = ArrayList()
|
||||
listError.add(
|
||||
PlacementSupplyVO(
|
||||
PlacementSupplyVO(itemShelvingFk = 0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
@ -272,9 +272,9 @@ class PreSacadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun itemShelvingSaleSupplyAdd(
|
||||
itemShelvingFk: String,
|
||||
itemShelvingFk: Int,
|
||||
saleFk: Int,
|
||||
quantity: String
|
||||
quantity: Int
|
||||
) {
|
||||
silex.itemShelvingSaleSupplyAdd(
|
||||
itemShelvingFk,
|
||||
|
@ -443,7 +443,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
saleFk: Int,
|
||||
quantity: String,
|
||||
type: String,
|
||||
warehouseFk: String,
|
||||
warehouseFk: Int,
|
||||
originalQuantity: Int
|
||||
) {
|
||||
silex.collectionMissingTrash(
|
||||
|
@ -692,7 +692,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
) {
|
||||
silex.sectorCollection_getSale(
|
||||
sectorCollectionFK,
|
||||
vSectorFk
|
||||
vSectorFk.toString()
|
||||
)
|
||||
.enqueue(object :
|
||||
Callback<List<PreSacadorItemVO>> {
|
||||
|
@ -706,8 +706,8 @@ class PreSacadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
) {
|
||||
if (response.body() != null) {
|
||||
_salesList.value = response.body()?.let { it }
|
||||
} else {
|
||||
|
||||
} else {
|
||||
_salesList.value = listOf()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,10 +15,10 @@ fun PreSacadorItemVO.toSale() : SaleVO {
|
|||
line1 = longName,
|
||||
line2 = if (subName.isNullOrEmpty()) "" else subName,//sergio:cuando subida versión de tarea #3510 se puede quitar isNullOrEmpty
|
||||
pickedQuantity = picked,
|
||||
workerFk = if (trabajador.isNullOrEmpty()) { "0" } else trabajador,
|
||||
workerFk = trabajador,
|
||||
originalQuantity = quantity,
|
||||
placements = carros,
|
||||
agencyName = if (trabajador.isNullOrEmpty()) { "" } else trabajador,
|
||||
agencyName = trabajador.toString(),
|
||||
packingType=packingType,
|
||||
salePersonFk=if (salesPersonFk.isNullOrEmpty()){""}else salesPersonFk,
|
||||
rgb= null
|
||||
|
@ -40,10 +40,10 @@ fun PreSacadorItemVO.toSaleReposicion() : SaleVO {
|
|||
line1 = longName,
|
||||
line2 = if (subName.isNullOrEmpty()) "" else subName,
|
||||
pickedQuantity = (quantity - saldo),
|
||||
workerFk = if (trabajador.isNullOrEmpty()) { "0" } else trabajador,
|
||||
workerFk =trabajador,
|
||||
originalQuantity = quantity,
|
||||
placements = carros,
|
||||
agencyName = if (trabajador.isNullOrEmpty()) { "" } else trabajador,
|
||||
agencyName = trabajador.toString(),
|
||||
rgb=null
|
||||
)
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
binding.btnObtener.setOnClickListener {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.itemPlacementSupplyGetOrder(
|
||||
sectorFk = getData(SECTORFK).toInt()
|
||||
sectorFk = getDataInt(SECTORFK)
|
||||
|
||||
)
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
binding.collectionSwipe.setOnRefreshListener {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.itemPlacementSupplyGetOrder(
|
||||
sectorFk = getData(SECTORFK).toInt()
|
||||
sectorFk = getDataInt(SECTORFK)
|
||||
|
||||
)
|
||||
binding.collectionSwipe.isRefreshing = false
|
||||
|
@ -179,8 +179,8 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
|
||||
placementSuppleyList.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (!goBack) printShelvingResult(it)
|
||||
goBack = false
|
||||
/* if (!goBack) printShelvingResult(it)
|
||||
goBack = false*/
|
||||
})
|
||||
|
||||
responseCode.observe(viewLifecycleOwner, Observer {
|
||||
|
@ -351,7 +351,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
)
|
||||
}
|
||||
|
||||
private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO) {
|
||||
/* private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO) {
|
||||
var shelving = ""
|
||||
var item = ""
|
||||
var longName = ""
|
||||
|
@ -458,7 +458,7 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
customDialogList.getRecyclerView().layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
private fun onQuantityOfShelvingSelected(itemShelvingFk: String) {
|
||||
//1 - MODIFICAR CANTIDAD DEL CARRO
|
||||
|
@ -468,14 +468,14 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
|||
sales[storedPosition].carros[storedShelvingPosition].stockTotal =
|
||||
(shelvingVisible.toInt() - customDialogList.getValue().toInt()).toString()
|
||||
|
||||
viewModel.itemShelvingPlacementSupplyAdd(
|
||||
/* viewModel.itemShelvingPlacementSupplyAdd(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
itemShelvingFk = itemShelvingFk,
|
||||
itemPlacementSupplyFk = sales[storedPosition].id,
|
||||
quantity = customDialogList.getValue()
|
||||
)
|
||||
|
||||
*/
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
|
||||
|
|
|
@ -114,7 +114,7 @@ class ReposicionViewModel(context: Context) : BaseViewModel(context) {
|
|||
override fun onFailure(call: Call<List<PlacementSupplyVO>>, t: Throwable) {
|
||||
val listError: ArrayList<PlacementSupplyVO> = ArrayList()
|
||||
listError.add(
|
||||
PlacementSupplyVO(
|
||||
PlacementSupplyVO(itemShelvingFk = 0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
|
@ -131,7 +131,7 @@ class ReposicionViewModel(context: Context) : BaseViewModel(context) {
|
|||
} else {
|
||||
val listError: ArrayList<PlacementSupplyVO> = ArrayList()
|
||||
listError.add(
|
||||
PlacementSupplyVO(
|
||||
PlacementSupplyVO(itemShelvingFk = 0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
|
|
@ -67,7 +67,7 @@ class SacadorFragment :
|
|||
} else {*/
|
||||
val working_in_test = true //sergio: Ok en app
|
||||
if (!working_in_test) {
|
||||
viewModel.collectionGetSalix(token = getData(TOKEN))
|
||||
viewModel.collectionGetSalix()
|
||||
} else {
|
||||
viewModel.collectionGet(
|
||||
)
|
||||
|
@ -154,7 +154,7 @@ class SacadorFragment :
|
|||
|
||||
private fun setEvents() {
|
||||
binding.sacadorSwipe.setOnRefreshListener {
|
||||
viewModel.collectionGetSalix(token = getData(TOKEN))
|
||||
viewModel.collectionGetSalix()
|
||||
binding.sacadorSwipe.isRefreshing = false
|
||||
}
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ class SacadorFragment :
|
|||
|
||||
val working_in_test = true //sergio: ok en app SACADOR
|
||||
if (!working_in_test) {
|
||||
viewModel.collectionGetSalix(token = getData(TOKEN))
|
||||
viewModel.collectionGetSalix()
|
||||
} else {
|
||||
viewModel.collectionGet()
|
||||
}
|
||||
|
|
|
@ -175,8 +175,8 @@ class SacadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}
|
||||
|
||||
fun collectionGetSalix(token:String){
|
||||
getSacadorControladorUserCase.collectionGetSalix(token).enqueue(object :
|
||||
fun collectionGetSalix(){
|
||||
salix.getCollectionSalix().enqueue(object :
|
||||
Callback<List<CollectionVO>> {
|
||||
override fun onFailure(call: Call<List<CollectionVO>>, t: Throwable) {
|
||||
val listError: ArrayList<CollectionVO> = ArrayList()
|
||||
|
|
|
@ -55,7 +55,7 @@ class SaleVO(
|
|||
var line3: String = "",
|
||||
var isAdded: String = "",
|
||||
var pickedQuantity: Int? = 0,
|
||||
var workerFk: String = "",
|
||||
var workerFk: String,
|
||||
var placements: List<PlacementVO> = listOf(),
|
||||
var Barcodes: List<String> = listOf(),
|
||||
var isNew: Boolean = false,
|
||||
|
@ -98,7 +98,7 @@ class PlacementSupplyVO(
|
|||
var longName: String = "",
|
||||
var size: String = "",
|
||||
var subName: String = "",
|
||||
var itemShelvingFk: String = "",
|
||||
var itemShelvingFk: Int,
|
||||
var shelving: String = "",
|
||||
var stock: String = "",
|
||||
var total: String = "",
|
||||
|
@ -112,7 +112,7 @@ class PlacementSupplyListVO(
|
|||
)
|
||||
|
||||
class MistakeTypeVO(
|
||||
var id: String = "",
|
||||
var id: Int,
|
||||
var description: String = ""
|
||||
)
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class UbicadorAdapter(
|
|||
title = res.getString(
|
||||
R.string.itemSearch
|
||||
)
|
||||
), item.item
|
||||
), item.item.toString()
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -84,7 +84,7 @@ class UbicadorAdapter(
|
|||
onPasillerosItemClickListener.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = res.getString(R.string.itemSearch)
|
||||
), item.item
|
||||
), item.item.toString()
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
@ -101,14 +101,14 @@ class AutomaticAddItemFragment(
|
|||
shelvingFk,
|
||||
"" + listInt + "",
|
||||
TRUE,
|
||||
getData(WAREHOUSEFK).toInt()
|
||||
getDataInt(WAREHOUSEFK)
|
||||
)
|
||||
} else {
|
||||
viewModel.itemShelving_addList(
|
||||
shelvingFk,
|
||||
"" + listInt + "",
|
||||
FALSE,
|
||||
getData(WAREHOUSEFK).toInt())
|
||||
getDataInt(WAREHOUSEFK))
|
||||
/* viewModel.itemShelvingMake_multi(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
|
|
|
@ -54,7 +54,7 @@ class UbicadorFragment(
|
|||
private var modeCheckUbication = false
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
var isBack=false
|
||||
var isBack = false
|
||||
|
||||
|
||||
companion object {
|
||||
|
@ -64,8 +64,9 @@ class UbicadorFragment(
|
|||
override fun getLayoutId(): Int = R.layout.fragment_ubicador
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
isBack=true
|
||||
isBack = true
|
||||
}
|
||||
|
||||
override fun onAttach(context: Context) {
|
||||
if (context is OnPasillerosItemClickListener) pasillerosItemClickListener = context
|
||||
super.onAttach(context)
|
||||
|
@ -137,7 +138,7 @@ class UbicadorFragment(
|
|||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
||||
iconAdd.tooltipText = getString(R.string.addItemShelving)
|
||||
iconChecker.tooltipText=getTooltip(R.drawable.ic_ubicator_check)
|
||||
iconChecker.tooltipText = getTooltip(R.drawable.ic_ubicator_check)
|
||||
|
||||
}
|
||||
listIcons.add(iconAdd)
|
||||
|
@ -150,7 +151,15 @@ class UbicadorFragment(
|
|||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
|
||||
when (item) {
|
||||
iconAdd.drawable -> showAddItem("", "", "", "", false, ItemUbicadorVO(), "")
|
||||
iconAdd.drawable -> showAddItem(
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
false,
|
||||
ItemUbicadorVO(0),
|
||||
""
|
||||
)
|
||||
iconReload.drawable -> {
|
||||
|
||||
if (!shelvingFk.isNullOrEmpty()) {
|
||||
|
@ -231,7 +240,7 @@ class UbicadorFragment(
|
|||
binding.editPrioridad.setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
if (!binding.editPrioridad.text.toString().isNullOrEmpty()) {
|
||||
binding.splashProgress.visibility=VISIBLE
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.shelvingPriorityUpdate(
|
||||
binding.editPrioridad.toInt(),
|
||||
shelvingFk
|
||||
|
@ -254,8 +263,8 @@ class UbicadorFragment(
|
|||
|
||||
//Tarea #4778 Para llamar a Revisar items poner R.string.titleChecker
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titleAuto)),
|
||||
//PasillerosItemVO(title = getString(R.string.titleChecker)),
|
||||
PasillerosItemVO(title = getString(R.string.titleAuto)),
|
||||
//PasillerosItemVO(title = getString(R.string.titleChecker)),
|
||||
entryPoint = shelvingFk
|
||||
)
|
||||
else
|
||||
|
@ -376,7 +385,7 @@ class UbicadorFragment(
|
|||
|
||||
}
|
||||
|
||||
private fun checkUbications(itemScanned: String) {
|
||||
private fun checkUbications(itemScanned: Int) {
|
||||
|
||||
for (item in listItems) {
|
||||
if (item.item == itemScanned) {
|
||||
|
@ -399,13 +408,12 @@ class UbicadorFragment(
|
|||
listLocalItems = listItems.clone() as ArrayList<ItemUbicadorVO>
|
||||
|
||||
viewModel.itemShelvingMake(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
|
||||
shelving = shelvingFk,
|
||||
item = itemScanned,
|
||||
quantity = "0",
|
||||
quantity = 0,
|
||||
packing = null,
|
||||
warehouse = getData(WAREHOUSEFK),
|
||||
warehouse = getDataInt(WAREHOUSEFK),
|
||||
grouping = null
|
||||
)
|
||||
}
|
||||
|
@ -489,8 +497,9 @@ class UbicadorFragment(
|
|||
onVisibleClickListener = object : OnVisibleClickListener {
|
||||
override fun onVisibleClickListener(item: ItemUbicadorVO) {
|
||||
|
||||
"el item es ${item.item}".toast(context)
|
||||
showAddItem(
|
||||
item.item,
|
||||
item.item.toString(),
|
||||
item.packing,
|
||||
item.stickers,
|
||||
item.visible,
|
||||
|
@ -544,20 +553,21 @@ class UbicadorFragment(
|
|||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, true)
|
||||
} else {
|
||||
checkUbications(it.response)
|
||||
checkUbications(it.response.toInt())
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
responsepriority.observe(viewLifecycleOwner, Observer {
|
||||
if (!isBack){
|
||||
binding.splashProgress.visibility=GONE
|
||||
if (!isBack) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
ma.messageWithSound(
|
||||
if (it.isError) it.errorMessage else {
|
||||
getString(R.string.priorityChanged)
|
||||
}, it.isError, true
|
||||
)}
|
||||
isBack=false
|
||||
if (it.isError) it.errorMessage else {
|
||||
getString(R.string.priorityChanged)
|
||||
}, it.isError, true
|
||||
)
|
||||
}
|
||||
isBack = false
|
||||
|
||||
})
|
||||
|
||||
|
@ -595,13 +605,25 @@ class UbicadorFragment(
|
|||
packingUpdate = true
|
||||
}
|
||||
saveNewItem(
|
||||
customDialogUbicador.getItemValue(),
|
||||
customDialogUbicador.getEtiquetaValue(),
|
||||
customDialogUbicador.getPackingValue(),
|
||||
customDialogUbicador.getVisibleValue(),
|
||||
customDialogUbicador.getItemValue().toInt(),
|
||||
customDialogUbicador.getEtiquetaValue().toInt(),
|
||||
if (customDialogUbicador.getPackingValue().isNullOrEmpty()) {
|
||||
null
|
||||
} else {
|
||||
customDialogUbicador.getPackingValue().toInt()
|
||||
},
|
||||
if (customDialogUbicador.getVisibleValue().isNullOrEmpty()) {
|
||||
null
|
||||
} else {
|
||||
customDialogUbicador.getVisibleValue().toInt()
|
||||
},
|
||||
if (delete) packingUpdate else null,
|
||||
itemUbicador.id,
|
||||
customDialogUbicador.getGroupingValue()
|
||||
if (customDialogUbicador.getGroupingValue().isNullOrEmpty()) {
|
||||
null
|
||||
} else {
|
||||
customDialogUbicador.getGroupingValue().toInt()
|
||||
}
|
||||
)
|
||||
}.setKoButton(getString(R.string.close)) {
|
||||
customDialogUbicador.dismiss()
|
||||
|
@ -617,13 +639,21 @@ class UbicadorFragment(
|
|||
packingUpdate = true
|
||||
}
|
||||
saveNewItem(
|
||||
customDialogUbicador.getItemValue(),
|
||||
customDialogUbicador.getEtiquetaValue(),
|
||||
customDialogUbicador.getPackingValue(),
|
||||
customDialogUbicador.getVisibleValue(),
|
||||
customDialogUbicador.getItemValue().toInt(),
|
||||
customDialogUbicador.getEtiquetaValue().toInt(),
|
||||
if (customDialogUbicador.getPackingValue().isNullOrEmpty()) {
|
||||
null
|
||||
} else {
|
||||
customDialogUbicador.getPackingValue().toInt()
|
||||
},
|
||||
if (customDialogUbicador.getVisibleValue().isNullOrEmpty()) {
|
||||
null
|
||||
} else {
|
||||
customDialogUbicador.getVisibleValue().toInt()
|
||||
},
|
||||
if (delete) packingUpdate else null,
|
||||
itemUbicador.id,
|
||||
customDialogUbicador.getGroupingValue()
|
||||
customDialogUbicador.getGroupingValue().toInt()
|
||||
)
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
|
@ -637,13 +667,21 @@ class UbicadorFragment(
|
|||
packingUpdate = true
|
||||
}
|
||||
saveNewItem(
|
||||
customDialogUbicador.getItemValue(),
|
||||
customDialogUbicador.getEtiquetaValue(),
|
||||
customDialogUbicador.getPackingValue(),
|
||||
customDialogUbicador.getVisibleValue(),
|
||||
customDialogUbicador.getItemValue().toInt(),
|
||||
customDialogUbicador.getEtiquetaValue().toInt(),
|
||||
if (customDialogUbicador.getPackingValue().isNullOrEmpty()) {
|
||||
null
|
||||
} else {
|
||||
customDialogUbicador.getPackingValue().toInt()
|
||||
},
|
||||
if (customDialogUbicador.getVisibleValue().isNullOrEmpty()) {
|
||||
null
|
||||
} else {
|
||||
customDialogUbicador.getVisibleValue().toInt()
|
||||
},
|
||||
if (delete) packingUpdate else null,
|
||||
itemUbicador.id,
|
||||
customDialogUbicador.getGroupingValue()
|
||||
customDialogUbicador.getGroupingValue().toInt()
|
||||
)
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
|
@ -653,64 +691,49 @@ class UbicadorFragment(
|
|||
}
|
||||
|
||||
private fun saveNewItem(
|
||||
itemFk: String,
|
||||
etiquetas: String,
|
||||
packing: String,
|
||||
visible: String,
|
||||
itemFk: Int?,
|
||||
etiquetas: Int,
|
||||
packing: Int?,
|
||||
visible: Int?,
|
||||
updatePacking: Boolean? = null,
|
||||
itemShelvingFk: Int,
|
||||
groupingPack: String
|
||||
groupingPack: Int?
|
||||
) {
|
||||
if (!packing.isNullOrEmpty()) {
|
||||
if (packing != null) {
|
||||
if (updatePacking == null) {
|
||||
if (!itemFk.isNullOrEmpty() && !visible.isNullOrEmpty()) {
|
||||
if (itemFk != null && visible != null) {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelvingMake(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
shelvingFk,
|
||||
itemFk,
|
||||
visible,
|
||||
packing,
|
||||
getData(WAREHOUSEFK),
|
||||
getDataInt(WAREHOUSEFK),
|
||||
groupingPack
|
||||
)
|
||||
/*changeOfflineValue(
|
||||
ItemUbicadorVO(
|
||||
item = itemFk,
|
||||
visible = visible,
|
||||
packing = packing
|
||||
)
|
||||
)*/
|
||||
customDialogUbicador.setItemValue("").setPackingValue("").setGroupingValue("")
|
||||
|
||||
customDialogUbicador.setItemValue("").setPackingValue("")
|
||||
.setGroupingValue("")
|
||||
.setEtiquetaValue("").setVisibleValue("")
|
||||
customDialogUbicador.getEditItem().requestFocus()
|
||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
||||
customDialogUbicador.dismiss()
|
||||
|
||||
} else if (!itemFk.isNullOrEmpty() && !etiquetas.isNullOrEmpty()) {
|
||||
val visible_calc = (etiquetas.toInt() * packing.toInt()).toString()
|
||||
} else if (itemFk != null && etiquetas != null) {
|
||||
val visible_calc = (etiquetas * packing!!.toInt())
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelvingMake(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
shelvingFk,
|
||||
itemFk,
|
||||
visible_calc,
|
||||
packing,
|
||||
getData(WAREHOUSEFK),
|
||||
getDataInt(WAREHOUSEFK),
|
||||
groupingPack
|
||||
)
|
||||
/*changeOfflineValue(
|
||||
ItemUbicadorVO(
|
||||
item = itemFk,
|
||||
visible = visible_calc,
|
||||
packing = packing,
|
||||
stickers = etiquetas
|
||||
)
|
||||
)*/
|
||||
customDialogUbicador.setItemValue("").setPackingValue("").setGroupingValue("")
|
||||
|
||||
customDialogUbicador.setItemValue("").setPackingValue("")
|
||||
.setGroupingValue("")
|
||||
.setEtiquetaValue("").setVisibleValue("")
|
||||
customDialogUbicador.getEditItem().requestFocus()
|
||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
||||
|
@ -723,32 +746,27 @@ class UbicadorFragment(
|
|||
)
|
||||
}
|
||||
} else {
|
||||
if (!itemFk.isNullOrEmpty() && !visible.isNullOrEmpty() && !updatePacking) {
|
||||
if (itemFk != null && visible != null && !updatePacking) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.itemShelvingMakeEdit(
|
||||
visible.toInt(),
|
||||
packing.toInt(),
|
||||
visible,
|
||||
packing!!.toInt(),
|
||||
itemShelvingFk,
|
||||
groupingPack.toInt()
|
||||
groupingPack
|
||||
|
||||
)
|
||||
/* changeOfflineValue(
|
||||
ItemUbicadorVO(
|
||||
item = itemFk,
|
||||
visible = visible,
|
||||
packing = packing
|
||||
)
|
||||
)*/
|
||||
customDialogUbicador.setItemValue("").setPackingValue("").setGroupingValue("")
|
||||
|
||||
customDialogUbicador.setItemValue("").setPackingValue("")
|
||||
.setGroupingValue("")
|
||||
.setEtiquetaValue("").setVisibleValue("")
|
||||
customDialogUbicador.getEditItem().requestFocus()
|
||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
||||
customDialogUbicador.dismiss()
|
||||
|
||||
} else if (!itemFk.isNullOrEmpty() && !etiquetas.isNullOrEmpty() && updatePacking) {
|
||||
} else if (itemFk != null && etiquetas != null && updatePacking) {
|
||||
var visible_calc = 0
|
||||
try {
|
||||
visible_calc = (etiquetas.toInt() * packing.toInt())
|
||||
visible_calc = (etiquetas * packing.toInt())
|
||||
} catch (e: Exception) {
|
||||
}
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
|
@ -756,18 +774,12 @@ class UbicadorFragment(
|
|||
visible_calc,
|
||||
packing.toInt(),
|
||||
itemShelvingFk,
|
||||
groupingPack.toInt()
|
||||
groupingPack
|
||||
|
||||
)
|
||||
/* changeOfflineValue(
|
||||
ItemUbicadorVO(
|
||||
item = itemFk,
|
||||
visible = visible_calc,
|
||||
packing = packing,
|
||||
stickers = etiquetas
|
||||
)
|
||||
)*/
|
||||
customDialogUbicador.setItemValue("").setPackingValue("").setGroupingValue("")
|
||||
|
||||
customDialogUbicador.setItemValue("").setPackingValue("")
|
||||
.setGroupingValue("")
|
||||
.setEtiquetaValue("").setVisibleValue("")
|
||||
customDialogUbicador.getEditItem().requestFocus()
|
||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
||||
|
@ -790,7 +802,8 @@ class UbicadorFragment(
|
|||
}
|
||||
|
||||
private fun showMoreOptions(item: ItemUbicadorVO) {
|
||||
customDialogTwoButtons.setTitle(item.item).setDescription(getString(R.string.selectAction))
|
||||
customDialogTwoButtons.setTitle(item.item.toString())
|
||||
.setDescription(getString(R.string.selectAction))
|
||||
.setOkButton(getString(R.string.transfer)) {
|
||||
customDialogInput.setTitle(getString(R.string.shelvingNew))
|
||||
.setDescription(getString(R.string.selectDestiny) + item.item).setValue("")
|
||||
|
@ -813,19 +826,20 @@ class UbicadorFragment(
|
|||
}.show()
|
||||
customDialogInput.getEditText().requestFocus()
|
||||
ma.hideKeyboard(customDialogInput.getEditText())
|
||||
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
viewModel.itemShelvingTransfer(
|
||||
item.id,
|
||||
customDialogInput.getValue()
|
||||
)
|
||||
listItems.remove(item)
|
||||
adapter!!.notifyDataSetChanged()
|
||||
customDialogInput.dismiss()
|
||||
return@setOnEditorActionListener true
|
||||
customDialogInput.getEditText()
|
||||
.setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
viewModel.itemShelvingTransfer(
|
||||
item.id,
|
||||
customDialogInput.getValue()
|
||||
)
|
||||
listItems.remove(item)
|
||||
adapter!!.notifyDataSetChanged()
|
||||
customDialogInput.dismiss()
|
||||
return@setOnEditorActionListener true
|
||||
}
|
||||
false
|
||||
}
|
||||
false
|
||||
}
|
||||
customDialogTwoButtons.dismiss()
|
||||
}.setOkButtonTwo(getString(R.string.delete)) {
|
||||
customDialog.setTitle(getString(R.string.confirm))
|
||||
|
@ -834,7 +848,7 @@ class UbicadorFragment(
|
|||
listItems.remove(item)
|
||||
adapter!!.notifyDataSetChanged()
|
||||
viewModel.itemShelvingDelete(
|
||||
item.id
|
||||
item.id
|
||||
)
|
||||
customDialogTwoButtons.dismiss()
|
||||
customDialog.dismiss()
|
||||
|
|
|
@ -54,7 +54,7 @@ class UbicadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
override fun onFailure(call: Call<List<ItemUbicadorVO>>, t: Throwable) {
|
||||
val listError: ArrayList<ItemUbicadorVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemUbicadorVO(
|
||||
ItemUbicadorVO(0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
@ -74,7 +74,7 @@ class UbicadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
} else {
|
||||
val listError: ArrayList<ItemUbicadorVO> = ArrayList()
|
||||
listError.add(
|
||||
ItemUbicadorVO(
|
||||
ItemUbicadorVO(0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
@ -125,18 +125,14 @@ class UbicadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
|
||||
|
||||
fun itemShelvingMake(
|
||||
usuario: String,
|
||||
password: String,
|
||||
shelving: String,
|
||||
item: String,
|
||||
quantity: String,
|
||||
packing: String?,
|
||||
warehouse: String,
|
||||
grouping: String?
|
||||
item: Int,
|
||||
quantity: Int,
|
||||
packing: Int?,
|
||||
warehouse: Int,
|
||||
grouping: Int?
|
||||
) {
|
||||
getUbicadorUserCase.itemShelvingMake(
|
||||
usuario,
|
||||
password,
|
||||
silex.itemShelvingMake(
|
||||
shelving,
|
||||
item,
|
||||
quantity,
|
||||
|
@ -174,7 +170,7 @@ class UbicadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
quantity: Int,
|
||||
packing: Int,
|
||||
itemShelvingFk: Int,
|
||||
grouping: Int
|
||||
grouping: Int?
|
||||
|
||||
) {
|
||||
silex.itemShelvingMakeEdit(
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package es.verdnatura.presentation.view.feature.ubicador.model
|
||||
|
||||
class ItemUbicadorVO(
|
||||
var item: String = "",
|
||||
var item: Int ,
|
||||
var description: String = "",
|
||||
var visible: String = "",
|
||||
var stickers: String = "",
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
android:layout_weight="1"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:text="@{item.item}"
|
||||
android:text="@{Integer.toString(item.item)}"
|
||||
android:textStyle="bold"/>
|
||||
<TextView
|
||||
android:id="@+id/longname_text"
|
||||
|
|
|
@ -526,5 +526,6 @@
|
|||
<string name="selectLabeltoPrint">Selecciona etiqueta a imprimir</string>
|
||||
<string name="formatError">Formato expedición no válido</string>
|
||||
<string name="errorQuantity">Inserta la cantidad correctamente</string>
|
||||
<string name="operationSuccessful">Operación realizada correctamente</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -524,5 +524,6 @@
|
|||
<string name="selectLabeltoPrint">Select label to print</string>
|
||||
<string name="formatError">Expedition format no valid</string>
|
||||
<string name="errorQuantity">Insert the amount correctly</string>
|
||||
<string name="operationSuccessful">Operación realizada correctamente</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue