Version 9.6Beta Añadido a BaseFragment(context). Quitado código repetido de las llamadas
This commit is contained in:
parent
827fd35d78
commit
d4b101d9bb
|
@ -82,60 +82,85 @@
|
|||
</select>
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 9.5Beta añadido inteceptor y modificado código worker_getId. Subida como 9.4.2Beta">
|
||||
<change afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixInterceptor.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="Version 9.6Beta Interteptors, quitando userCase y arreglado click sobre carita. Cambiado .gitignore">
|
||||
<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" afterPath="$PROJECT_DIR$/app/release/vn-picking.apk" 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/ApiSalixUtils.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/ApiSalixUtils.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetAjustesUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetAjustesUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/di/viewModelModule.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/di/viewModelModule.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetDayOfSaleUSerCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetDayOfSaleUSerCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetInventaryUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetInventaryUserCase.kt" afterDir="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/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/GetPaletizadoresUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetPaletizadoresUserCase.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/GetPackagingUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetPackagingUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetQualityUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetQualityUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetSmarttagsUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetSmarttagsUserCase.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetUbicadorUserCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/GetUbicadorUserCase.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/domain/itemShelvingLogUSerCase.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/itemShelvingLogUSerCase.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/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/buscaritem/fragment/BuscarItemFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragmentViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragmentViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buscaritem/fragment/BuscarItemViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/BuyersFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/BuyersFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/BuyersViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/BuyersViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/QaualityViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/calidad/fragment/QaualityViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/claim/fragment/ClaimViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/claim/fragment/ClaimViewModel.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/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/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/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/diadeventa/fragment/DayOfSaleFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/diadeventa/fragment/DayOfSaleFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/diadeventa/fragment/DayOfSaleViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/diadeventa/fragment/DayOfSaleViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/faltas/fragment/FaltasFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/faltas/fragment/FaltasFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/faltas/fragment/FaltasViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/faltas/fragment/FaltasViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelving/fragment/ItemShelvingLogViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelving/fragment/ItemShelvingLogViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelvinglog/fragment/shelvingLogFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelvinglog/fragment/shelvingLogFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelvinglog/fragment/shelvingLogViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoshelvinglog/fragment/shelvingLogViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicovehiculo/fragment/HistoricoVehiculoViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicovehiculo/fragment/HistoricoVehiculoViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/adapter/InventoryAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/adapter/InventoryAdapter.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/inventario/fragment/InventaryViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/activity/LoginActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/activity/LoginActivity.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/inventario/fragment/SearchBuyerModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/SearchBuyerModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/model/ItemInventaryVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/model/ItemInventaryVO.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/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/PreSacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingSummaryFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingSummaryFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/CmrExpeditionPalletViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/CmrExpeditionPalletViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanSorterViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanSorterViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionStateViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionStateViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionTruckListViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionTruckListViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/parking/fragment/ParkingFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/parking/fragment/ParkingFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/parking/fragment/ParkingViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/parking/fragment/ParkingViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/parkingSale/fragment/ParkingSaleFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/parkingSale/fragment/ParkingSaleFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/parkingSale/fragment/ParkingViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/parkingSale/fragment/ParkingViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/precontrol/PreControladorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/precontrol/PreControladorViewModel.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/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/qr/QrFragmentViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/qr/QrFragmentViewModel.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/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/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/shelvingparking/fragment/ShelvingParkingViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/shelvingparking/fragment/ShelvingParkingViewModel.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/smarttag/sacador/fragment/AssociateSmartTagsFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/smarttag/sacador/fragment/AssociateSmartTagsFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/smarttag/sacador/fragment/SmartTagsViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/smarttag/sacador/fragment/SmartTagsViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/transferencia/fragment/TransferenciaViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/transferencia/fragment/TransferenciaViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.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/workermistake/fragment/PackingMistakeFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/fragment/PackingMistakeFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/fragment/WorkermistakeFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/fragment/WorkermistakeFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/fragment/WorkermistakeViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/fragment/WorkermistakeViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/fragment/WorkermistakeViewModel.kt" beforeDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/model/mistakeWorkerType.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/model/mistakeWorkerType.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_inventary_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_inventary_row.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_workermistake_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_workermistake_row.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -454,13 +479,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1618825571576</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00046" summary="Version 7.9, seleccionar impresora y movimiento recyclerViewer para el sacador. Llamadas smarttags al servidor ok">
|
||||
<created>1648617906228</created>
|
||||
<option name="number" value="00046" />
|
||||
<option name="presentableId" value="LOCAL-00046" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1648617906228</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00047" summary="Version 8, impresora obligatoria, controlador se desplaza al pulsar, Ubicar Reclamación y líneas controlador = orden saca el sacador">
|
||||
<created>1649233788632</created>
|
||||
<option name="number" value="00047" />
|
||||
|
@ -797,7 +815,14 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1668156827444</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="95" />
|
||||
<task id="LOCAL-00095" summary="Version 9.6Beta Interteptors, quitando userCase y arreglado click sobre carita. Cambiado .gitignore">
|
||||
<created>1668763686581</created>
|
||||
<option name="number" value="00095" />
|
||||
<option name="presentableId" value="LOCAL-00095" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1668763686582</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="96" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.History.Properties">
|
||||
|
@ -899,8 +924,6 @@
|
|||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
||||
<MESSAGE value="Version 8.7 Reubicación, sector = SACADOR V, controlador no puede hacer parking si no están revisados todos los tickets," />
|
||||
<MESSAGE value="Version 8.8Beta precio coste artículo, modificar tallos, mensajes error para items sin buyFk y ticket eliminado o viejo" />
|
||||
<MESSAGE value="Version 9Beta, dos opciones a Paletizadores y carros de operator" />
|
||||
<MESSAGE value="Version 9Beta-Tarea3420" />
|
||||
<MESSAGE value="Version 9Beta-Borrados comentarios" />
|
||||
|
@ -924,14 +947,16 @@
|
|||
<MESSAGE value="Version 9.4Beta Cmr, Control ubicación, volver atrás de Controlador, botón llamadas, volver pantalla anterior parking," />
|
||||
<MESSAGE value="Modificado control ubicación" />
|
||||
<MESSAGE value="Version 9.5Beta añadido inteceptor y modificado código worker_getId. Subida como 9.4.2Beta" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Version 9.5Beta añadido inteceptor y modificado código worker_getId. Subida como 9.4.2Beta" />
|
||||
<MESSAGE value="Version 9.6Beta Interteceptors, quitando userCase y arreglado click sobre carita. Cambiado .gitignore" />
|
||||
<MESSAGE value="Version 9.6Beta Interteptors, quitando userCase y arreglado click sobre carita. Cambiado .gitignore" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Version 9.6Beta Interteptors, quitando userCase y arreglado click sobre carita. Cambiado .gitignore" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<breakpoints>
|
||||
<line-breakpoint enabled="true" suspend="THREAD" type="kotlin-line">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt</url>
|
||||
<line>61</line>
|
||||
<line>60</line>
|
||||
<option name="timeStamp" value="3" />
|
||||
</line-breakpoint>
|
||||
<line-breakpoint enabled="true" suspend="THREAD" type="kotlin-line">
|
||||
|
|
|
@ -18,11 +18,6 @@ android {
|
|||
//versionName = "9.5Beta" versionCode 143
|
||||
versionName = "9.6Beta"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ import es.verdnatura.presentation.view.feature.shelvingparking.fragment.Shelving
|
|||
import es.verdnatura.presentation.view.feature.smarttag.sacador.fragment.SmartTagsViewModel
|
||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemViewModel
|
||||
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorViewModel
|
||||
import es.verdnatura.presentation.view.feature.workermistake.fragment.WorkermistakeViewModel
|
||||
import org.koin.android.ext.koin.androidContext
|
||||
import org.koin.androidx.viewmodel.dsl.viewModel
|
||||
import org.koin.dsl.module
|
||||
|
@ -38,9 +37,9 @@ import org.koin.dsl.module
|
|||
val viewModelModule = module {
|
||||
|
||||
|
||||
viewModel {
|
||||
WorkermistakeViewModel(androidContext())
|
||||
}
|
||||
/* viewModel {
|
||||
WorkermistakeViewModel()
|
||||
}*/
|
||||
|
||||
// Login
|
||||
viewModel {
|
||||
|
|
|
@ -6,29 +6,6 @@ import retrofit2.Call
|
|||
|
||||
class GetDayOfSaleUSerCase(context: Context) : RestClient(context) {
|
||||
|
||||
/*fun itemShelving_updateSpam(usuario: String, password: String,vShelvingFK:String): Call<Boolean> {
|
||||
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(vShelvingFK)
|
||||
return restClient!!.itemShelving_updateSpam("json", "1", usuario, password, "application/json",params=params)
|
||||
}*/
|
||||
/* fun itemShelving_getSaleDateOld(
|
||||
usuario: String,
|
||||
password: String,
|
||||
expeditionFk: String
|
||||
): Call<JsonObject> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(expeditionFk)
|
||||
return restClient!!.itemShelving_getSaleDate(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params = params
|
||||
)
|
||||
}*/
|
||||
|
||||
fun itemShelving_getSaleDate(
|
||||
usuario: String,
|
||||
password: String,
|
||||
|
@ -45,16 +22,14 @@ class GetDayOfSaleUSerCase(context: Context) : RestClient(context) {
|
|||
params
|
||||
)
|
||||
}
|
||||
|
||||
//mirar abans el fragment Parking per a llevar el paramssdl
|
||||
|
||||
fun shelvingPark(
|
||||
usuario: String,
|
||||
password: String,
|
||||
shelving: String,
|
||||
parking: String
|
||||
): Call<Any> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(shelving)
|
||||
params.add(parking)
|
||||
return restClient!!.shelvingPark("json", "1", usuario, password, "application/json", params)
|
||||
return restClient!!.shelvingPark(shelving,parking)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -56,8 +56,8 @@ class GetInventaryUserCase(context: Context) : RestClient(context) {
|
|||
)
|
||||
}
|
||||
|
||||
fun itemShelvingBuyerGet(usuario: String, password: String): Call<List<BuyerVO>> {
|
||||
return restClient!!.itemShelvingBuyerGet("json", "1", usuario, password, "application/json")
|
||||
fun itemShelvingBuyerGet(): Call<List<BuyerVO>> {
|
||||
return restClient!!.itemShelvingBuyerGet()
|
||||
}
|
||||
|
||||
}
|
|
@ -72,76 +72,29 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
|
|||
}
|
||||
|
||||
fun itemStockUpdate(
|
||||
usuario: String,
|
||||
password: String,
|
||||
itemFk: String,
|
||||
warehouseFk: String,
|
||||
newVisible: String,
|
||||
isTrash: String
|
||||
): Call<Any> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
params.add(newVisible)
|
||||
params.add(isTrash)
|
||||
|
||||
//sergio: se modifica por CAU a itemTrash// Faltas también accede a itemStockUpdate)
|
||||
|
||||
//return restClient!!.itemStockUpdate("json","1",usuario,password,"application/json",params = params)
|
||||
return restClient!!.itemTrash(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params = params
|
||||
return restClient!!.itemTrash(itemFk,warehouseFk,newVisible,isTrash
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
fun itemTrash(
|
||||
usuario: String,
|
||||
password: String,
|
||||
itemFk: Int,
|
||||
warehouseFk: Int,
|
||||
newVisible: Int,
|
||||
isTrash: Boolean
|
||||
): Call<Any> {
|
||||
val params: ArrayList<Any> = ArrayList()
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
params.add(newVisible)
|
||||
params.add(isTrash)
|
||||
return restClient!!.itemTrash(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params = params
|
||||
)
|
||||
return restClient!!.itemTrash(itemFk,warehouseFk,newVisible,isTrash)
|
||||
}
|
||||
|
||||
/* fun itemPlacementSave(
|
||||
usuario: String,
|
||||
password: String,
|
||||
itemFk: String,
|
||||
warehouseFk: String,
|
||||
value: String
|
||||
): Call<String> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(itemFk)
|
||||
params.add(warehouseFk)
|
||||
params.add(value)
|
||||
return restClient!!.itemPlacementSave(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params = params
|
||||
)
|
||||
}*/
|
||||
|
||||
fun updateGrouping(
|
||||
usuario: String,
|
||||
password: String,
|
||||
|
@ -183,25 +136,6 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
|
|||
params = params
|
||||
)
|
||||
}
|
||||
/*
|
||||
fun updatePackingType(
|
||||
usuario: String,
|
||||
password: String,
|
||||
itemFk: String,
|
||||
ItemPackingType: String
|
||||
): Call<Boolean> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(itemFk)
|
||||
params.add(ItemPackingType)
|
||||
return restClient!!.updatePackingType(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params = params
|
||||
)
|
||||
}*/
|
||||
|
||||
fun updatePackingTypeSalix(
|
||||
token: String,
|
||||
|
|
|
@ -36,9 +36,9 @@ class GetPackagingUserCase(context: Context) : RestClient(context) {
|
|||
)
|
||||
}
|
||||
|
||||
fun itemShelvingBuyerGet(usuario: String, password: String): Call<List<BuyerVO>> {
|
||||
return restClient!!.itemShelvingBuyerGet("json", "1", usuario, password, "application/json")
|
||||
}
|
||||
/* fun itemShelvingBuyerGet(): Call<List<BuyerVO>> {
|
||||
return restClient!!.itemShelvingBuyerGet()
|
||||
}*/
|
||||
|
||||
fun supplier_getItems(
|
||||
usuario: String,
|
||||
|
|
|
@ -7,8 +7,8 @@ import retrofit2.Call
|
|||
|
||||
class GetQualityUserCase(context: Context) : RestClient(context) {
|
||||
|
||||
fun itemShelvingBuyerGet(usuario: String, password: String): Call<List<BuyerVO>> {
|
||||
return restClient!!.itemShelvingBuyerGet("json", "1", usuario, password, "application/json")
|
||||
fun itemShelvingBuyerGet(): Call<List<BuyerVO>> {
|
||||
return restClient!!.itemShelvingBuyerGet()
|
||||
}
|
||||
|
||||
fun itemShelvingBuyerTask(
|
||||
|
|
|
@ -19,7 +19,7 @@ class GetSmarttagsUserCase(context: Context) : RestClient(context) {
|
|||
)
|
||||
}
|
||||
|
||||
fun workerShelving_delete(usuario: String, password: String, vBarcode: String): Call<Void> {
|
||||
/*fun workerShelving_delete(usuario: String, password: String, vBarcode: String): Call<Void> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(vBarcode)
|
||||
return restClient!!.workerShelving_delete(
|
||||
|
@ -30,7 +30,7 @@ class GetSmarttagsUserCase(context: Context) : RestClient(context) {
|
|||
"application/json",
|
||||
params
|
||||
)
|
||||
}
|
||||
}*/
|
||||
fun smartTagRegister(
|
||||
smarttag: String,
|
||||
shelving: String,
|
||||
|
|
|
@ -155,15 +155,13 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
|
|||
}
|
||||
|
||||
fun shelvingPark(
|
||||
usuario: String,
|
||||
password: String,
|
||||
shelving: String,
|
||||
parking: String
|
||||
): Call<Any> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(shelving)
|
||||
params.add(parking)
|
||||
return restClient!!.shelvingPark("json", "1", usuario, password, "application/json", params)
|
||||
return restClient!!.shelvingPark(params)
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -23,21 +23,11 @@ class GetWokerMistakeUSerCase(context: Context) : RestClient(context) {
|
|||
|
||||
|
||||
fun workerMistake_Add(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vUserFk: String,
|
||||
vUserFk: Int,
|
||||
vTypeFk: String
|
||||
): Call<Unit> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(vUserFk)
|
||||
params.add(vTypeFk)
|
||||
return restClient!!.workerMistake_Add(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params
|
||||
|
||||
return restClient!!.workerMistake_Add(vUserFk,vTypeFk
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -50,13 +40,8 @@ class GetWokerMistakeUSerCase(context: Context) : RestClient(context) {
|
|||
)
|
||||
}
|
||||
|
||||
fun workerMistakeType_get(usuario: String, password: String): Call<List<MistakeWorkerType>> {
|
||||
fun workerMistakeType_get(): Call<List<MistakeWorkerType>> {
|
||||
return restClient!!.workerMistakeType_get(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json"
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -77,19 +62,10 @@ class GetWokerMistakeUSerCase(context: Context) : RestClient(context) {
|
|||
|
||||
|
||||
fun worker_getFromHasMistake(
|
||||
usuario: String,
|
||||
password: String,
|
||||
department: String
|
||||
): Call<List<WorkerFromMistake>> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(department)
|
||||
return restClient!!.worker_getFromHasMistake(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params
|
||||
department
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ class SalixInterceptor : Interceptor {
|
|||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
override fun intercept(chain: Interceptor.Chain): Response {
|
||||
override fun intercept(chain: Interceptor.Chain, ): Response {
|
||||
|
||||
val prefs: SharedPreferences =
|
||||
this.context.getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||
|
|
|
@ -166,10 +166,7 @@ interface SalixService {
|
|||
|
||||
@GET("Shelvings")
|
||||
fun Shelvings(
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Header("Authorization") authorization: String,
|
||||
@Query("filter") filter: String
|
||||
|
||||
):
|
||||
Call<List<ShelvingLogSalix>>
|
||||
}
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package es.verdnatura.domain
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.util.Log.d
|
||||
import android.widget.Toast
|
||||
import es.verdnatura.MobileApplication
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
|
@ -52,9 +48,7 @@ abstract class SilexCallback<T>(val context: Context) : Callback<T> {
|
|||
}
|
||||
|
||||
fun defaultErrorHandler(t: Throwable) {
|
||||
// Reemplazar por Toast
|
||||
t.message!!.toast(context)
|
||||
d("VERDNATURA::SilexError", t.message!!)
|
||||
}
|
||||
|
||||
abstract fun onSuccess(response: Response<T>)
|
||||
|
|
|
@ -604,12 +604,7 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/workerMistake_Add")//REVISADA
|
||||
fun workerMistake_Add(
|
||||
@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<Unit>
|
||||
|
||||
|
@ -632,11 +627,6 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/workerMistakeType_get")//REVISADA
|
||||
fun workerMistakeType_get(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String
|
||||
):
|
||||
Call<List<MistakeWorkerType>>
|
||||
|
||||
|
@ -652,12 +642,7 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/worker_getFromHasMistake")//REVISADA
|
||||
fun worker_getFromHasMistake(
|
||||
@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<List<WorkerFromMistake>>
|
||||
|
||||
|
@ -711,12 +696,7 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/itemTrash")//REVISADA
|
||||
fun itemTrash(
|
||||
@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<Any>
|
||||
@Body vararg params: Any
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
|
@ -967,12 +947,7 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/shelvingPark")//REVISADA
|
||||
fun shelvingPark(
|
||||
@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>
|
||||
|
||||
|
@ -1142,12 +1117,7 @@ interface VerdnaturaService {
|
|||
|
||||
@POST("almacennew/itemShelving_getSaleDate")//REVISADA
|
||||
fun itemShelving_getSaleDate(
|
||||
@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<List<ItemShelvingSaleDate>>
|
||||
|
||||
|
@ -1341,11 +1311,6 @@ interface VerdnaturaService {
|
|||
//CALIDAD
|
||||
@POST("almacennew/itemShelvingBuyerGet")//REVISADA
|
||||
fun itemShelvingBuyerGet(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String
|
||||
):
|
||||
Call<List<BuyerVO>>
|
||||
|
||||
|
@ -1394,7 +1359,7 @@ interface VerdnaturaService {
|
|||
):
|
||||
Call<Void>
|
||||
|
||||
@POST("almacennew/workerShelving_delete")//REVISADA
|
||||
/* @POST("almacennew/workerShelving_delete")//REVISADA
|
||||
fun workerShelving_delete(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
|
@ -1403,7 +1368,7 @@ interface VerdnaturaService {
|
|||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>
|
||||
):
|
||||
Call<Void>
|
||||
Call<Void>*/
|
||||
|
||||
//SUPPLIERS
|
||||
@POST("almacennew/supplier_getItems")//REVISADA
|
||||
|
|
|
@ -49,12 +49,9 @@ class itemShelvingLogUSerCase(context: Context) : RestClient(context) {
|
|||
|
||||
|
||||
fun Shelvings(
|
||||
token: String,
|
||||
vShelvingFilter: String,
|
||||
): Call<List<ShelvingLogSalix>> {
|
||||
return salixClient!!.Shelvings(
|
||||
content_type = "application/json",
|
||||
authorization = token,
|
||||
filter = vShelvingFilter
|
||||
)
|
||||
}
|
||||
|
|
|
@ -511,7 +511,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
BUYERID -> prefs.getString(name, "").toString()
|
||||
DATENOVEHICLE -> prefs.getString(name, "0").toString()
|
||||
DEPARTMENTMISTAKE -> prefs.getString(name, "").toString()
|
||||
DEPARTMENTMISTAKEID -> prefs.getString(name, "").toString()
|
||||
DEPARTMENTMISTAKEID -> prefs.getInt(name, 0).toString()
|
||||
PRINTERFK -> prefs.getInt(name, 0).toString()
|
||||
PRINTERNAME -> prefs.getString(name, getString(R.string.noprinter)).toString()
|
||||
NUMBEROFWAGONS -> prefs.getInt(name, 1).toString()
|
||||
|
@ -662,30 +662,32 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
)
|
||||
}
|
||||
|
||||
fun saveData(name: String, value: String) {
|
||||
fun saveData(name: String, value: Any) {
|
||||
|
||||
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
|
||||
val editor = prefs.edit()
|
||||
|
||||
when (name) {
|
||||
|
||||
ANDROID_ID -> editor.putString(name, value)
|
||||
//ANDROID_ID -> editor.putString(name, value.toString())
|
||||
"base_url" -> {
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
val editorPref = preferences.edit()
|
||||
editorPref.putString("base_url", value)
|
||||
editorPref.putString("base_url", value.toString())
|
||||
editorPref.commit()
|
||||
|
||||
}
|
||||
"base_urlSalix" -> {
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
val editorPref = preferences.edit()
|
||||
editorPref.putString("base_urlSalix", value)
|
||||
editorPref.putString("base_urlSalix", value.toString())
|
||||
editorPref.commit()
|
||||
}
|
||||
|
||||
DEPARTMENTMISTAKEID->{
|
||||
editor.putInt(name,value as Int)
|
||||
}
|
||||
else -> {
|
||||
editor.putString(name, value)
|
||||
editor.putString(name, value.toString())
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,15 +10,15 @@ import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
|||
import org.json.JSONObject
|
||||
|
||||
abstract class BaseViewModel : ViewModel, LifecycleObserver {
|
||||
var app: MobileApplication? = null
|
||||
var silex: VerdnaturaService? = null
|
||||
var salix: SalixService? = null
|
||||
lateinit var app: MobileApplication
|
||||
lateinit var silex: VerdnaturaService
|
||||
lateinit var salix: SalixService
|
||||
|
||||
constructor(): super()
|
||||
constructor(context: Context): super() {
|
||||
app = context as MobileApplication
|
||||
silex = app!!.silex
|
||||
salix = app!!.salix
|
||||
silex = app.silex
|
||||
salix = app.salix
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -619,8 +619,6 @@ class ItemCardFragment(
|
|||
viewModel.itemTrash(
|
||||
itemFk = itemFk.toInt(),
|
||||
warehouseFk = warehouseFk!!,
|
||||
user = user,
|
||||
password = password,
|
||||
newValue = value,
|
||||
isTrash = false
|
||||
|
||||
|
@ -633,8 +631,6 @@ class ItemCardFragment(
|
|||
viewModel.itemTrash(
|
||||
itemFk = itemFk.toInt(),
|
||||
warehouseFk = warehouseFk!!,
|
||||
user = user,
|
||||
password = password,
|
||||
newValue = value,
|
||||
isTrash = true
|
||||
|
||||
|
@ -653,8 +649,6 @@ class ItemCardFragment(
|
|||
viewModel.itemTrash(
|
||||
itemFk = itemFk.toInt(),
|
||||
warehouseFk = warehouseFk!!,
|
||||
user = user,
|
||||
password = password,
|
||||
newValue = (value * -1),
|
||||
isTrash = false
|
||||
|
||||
|
|
|
@ -14,9 +14,8 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||
class ItemCardViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
|
||||
val version: String = "5.0.0"
|
||||
|
||||
private val _itemcard by lazy { MutableLiveData<ItemCardVO>() }
|
||||
val itemcard: LiveData<ItemCardVO>
|
||||
|
@ -214,12 +213,10 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
|||
fun itemTrash(
|
||||
itemFk: Int,
|
||||
warehouseFk: Int,
|
||||
user: String,
|
||||
password: String,
|
||||
newValue: Int,
|
||||
isTrash: Boolean
|
||||
) {
|
||||
getItemCardUserCase.itemTrash(user, password, itemFk, warehouseFk, newValue, isTrash)
|
||||
silex!!.itemTrash( itemFk, warehouseFk, newValue, isTrash)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(
|
||||
|
|
|
@ -12,7 +12,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class BufferFragmentViewModel(context: Context) : BaseViewModel() {
|
||||
class BufferFragmentViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val GetPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||
GetPaletizadoresUserCase(context)
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class BuscarItemViewModel(context: Context) : BaseViewModel() {
|
||||
class BuscarItemViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val getBuscarItemUserCase: GetBuscarItemUserCase = GetBuscarItemUserCase(context)
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class BuyersFragment : BaseFragment<BuyersFragmentBinding,BuyersViewModel>(Buyer
|
|||
}
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
viewModel.itemShelvingBuyerGet(user = getData(USER),password = getData(PASSWORD))
|
||||
viewModel.itemShelvingBuyerGet()
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
||||
|
@ -58,7 +58,6 @@ class BuyersFragment : BaseFragment<BuyersFragmentBinding,BuyersViewModel>(Buyer
|
|||
|
||||
private fun setToolBar(){
|
||||
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconReload = ImageView(context)
|
||||
iconReload.setImageResource(R.drawable.ic_autorenew_black_24dp)
|
||||
|
@ -74,7 +73,7 @@ class BuyersFragment : BaseFragment<BuyersFragmentBinding,BuyersViewModel>(Buyer
|
|||
when(item){
|
||||
iconReload.drawable->{
|
||||
binding.splashProgress.visibility= View.VISIBLE
|
||||
viewModel.itemShelvingBuyerGet(user = getData(USER),password = getData(PASSWORD))
|
||||
viewModel.itemShelvingBuyerGet()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class BuyersViewModel(context: Context) : BaseViewModel() {
|
||||
class BuyersViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getQualityUserCase: GetQualityUserCase = GetQualityUserCase(context)
|
||||
|
||||
|
@ -21,8 +21,8 @@ class BuyersViewModel(context: Context) : BaseViewModel() {
|
|||
val buyersList: LiveData<BuyerListVO>
|
||||
get() = _buyersList
|
||||
|
||||
fun itemShelvingBuyerGet(user:String,password:String){
|
||||
getQualityUserCase.itemShelvingBuyerGet(user,password).enqueue(object :
|
||||
fun itemShelvingBuyerGet(){
|
||||
silex!!.itemShelvingBuyerGet().enqueue(object :
|
||||
Callback<List<BuyerVO>> {
|
||||
override fun onFailure(call: Call<List<BuyerVO>>, t: Throwable) {
|
||||
val listError:ArrayList<BuyerVO> = ArrayList()
|
||||
|
|
|
@ -14,7 +14,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class QaualityViewModel(context: Context) : BaseViewModel() {
|
||||
class QaualityViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getQualityUserCase: GetQualityUserCase = GetQualityUserCase(context)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ package es.verdnatura.presentation.view.feature.claim.fragment
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ClaimViewModel(context: Context) : BaseViewModel() {
|
||||
class ClaimViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val GetClaimUserCase: GetClaimUserCase = GetClaimUserCase(context)
|
||||
|
||||
|
|
|
@ -782,8 +782,6 @@ class CollectionFragment(
|
|||
customDialog.show()
|
||||
} else {
|
||||
viewModel.parking(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
ticketFk = tickets[0],
|
||||
parking = ticketScanTxt
|
||||
)
|
||||
|
@ -1220,8 +1218,6 @@ class CollectionFragment(
|
|||
|
||||
|
||||
viewModel.parking(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
ticketFk = tickets[0],
|
||||
parking = txtscan
|
||||
)
|
||||
|
@ -1349,8 +1345,6 @@ class CollectionFragment(
|
|||
if (txtscan.contains("-")) {
|
||||
tickets.forEach {
|
||||
viewModel.parking(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
ticketFk = it,
|
||||
parking = txtscan
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||
class CollectionViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
// val emptyMessage = context.getString(R.string.collectionNoTickets)
|
||||
|
||||
|
@ -776,12 +776,10 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
fun parking(
|
||||
usuario: String,
|
||||
password: String,
|
||||
ticketFk: String,
|
||||
parking: String
|
||||
) {
|
||||
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
||||
silex!!.shelvingPark(ticketFk, parking)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseParking.value = ResponseItemVO(
|
||||
|
|
|
@ -14,7 +14,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ControladorViewModel(context: Context) : BaseViewModel() {
|
||||
class ControladorViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val contextApp=context
|
||||
private val _collectionTicketList by lazy { MutableLiveData<CollectionVO>() }
|
||||
|
|
|
@ -14,7 +14,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
||||
class ControlVehiculoViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getVehicleControlTimeUserCase: GetVehicleControlTimeUserCase =
|
||||
GetVehicleControlTimeUserCase(context)
|
||||
|
|
|
@ -102,7 +102,7 @@ class DayOfSaleFragment(
|
|||
|
||||
private fun getItemsSaleDate(vShelvingFK: String) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.itemShelving_getSaleDate(getData(USER), getData(PASSWORD),vShelvingFK)
|
||||
viewModel.itemShelving_getSaleDate(vShelvingFK)
|
||||
|
||||
}
|
||||
|
||||
|
@ -194,8 +194,6 @@ class DayOfSaleFragment(
|
|||
|
||||
fun parking(parking:String){
|
||||
viewModel.parking(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
parking = parking,
|
||||
scanItem = itemScan)
|
||||
customDialogList.dismiss()
|
||||
|
|
|
@ -5,18 +5,19 @@ import androidx.lifecycle.LiveData
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import es.verdnatura.domain.GetDayOfSaleUSerCase
|
||||
import es.verdnatura.presentation.base.*
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.Event
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDate
|
||||
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDateList
|
||||
import es.verdnatura.presentation.view.feature.paletizador.model.itemExpedetionState
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
import timber.log.Timber.i
|
||||
|
||||
class DayOfSaleViewModel(context: Context) : BaseViewModel() {
|
||||
class DayOfSaleViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val GetDayOfSaleUSerCase: GetDayOfSaleUSerCase =
|
||||
GetDayOfSaleUSerCase(context)
|
||||
|
||||
|
@ -32,36 +33,51 @@ class DayOfSaleViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
val loadItemShelvingSaleDateList = Transformations.map(_itemShelvingSaleDateList) { Event(it) }
|
||||
|
||||
fun itemShelving_getSaleDate(usuario:String,password:String,vShelvingFK: String){
|
||||
GetDayOfSaleUSerCase.itemShelving_getSaleDate(usuario,password,vShelvingFK).enqueue(object :
|
||||
fun itemShelving_getSaleDate(vShelvingFK: String) {
|
||||
silex!!.itemShelving_getSaleDate(vShelvingFK).enqueue(object :
|
||||
Callback<List<ItemShelvingSaleDate>> {
|
||||
override fun onFailure(call: Call<List<ItemShelvingSaleDate>>, t: Throwable) {
|
||||
val listError:ArrayList<ItemShelvingSaleDate> = ArrayList()
|
||||
listError.add(ItemShelvingSaleDate(isError = true,errorMessage =getMessageFromAllResponse(nameofFunction(this),t.message!!)))
|
||||
val listError: ArrayList<ItemShelvingSaleDate> = ArrayList()
|
||||
listError.add(
|
||||
ItemShelvingSaleDate(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
)
|
||||
_itemShelvingSaleDateList.value = ItemShelvingSaleDateList(listError)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<ItemShelvingSaleDate>>,
|
||||
response: Response<List<ItemShelvingSaleDate>>
|
||||
) {
|
||||
) {
|
||||
|
||||
if (!response.isSuccessful){
|
||||
if (!response.isSuccessful) {
|
||||
|
||||
}
|
||||
if (response.body() != null){
|
||||
if (response.body() != null) {
|
||||
|
||||
_itemShelvingSaleDateList.value = response.body()?.let { ItemShelvingSaleDateList(it)
|
||||
_itemShelvingSaleDateList.value = response.body()?.let {
|
||||
ItemShelvingSaleDateList(it)
|
||||
}
|
||||
i("finalizada la lista ${response.body()}")
|
||||
|
||||
}else{
|
||||
if (!response.isSuccessful){
|
||||
} else {
|
||||
if (!response.isSuccessful) {
|
||||
|
||||
|
||||
val listError:ArrayList<ItemShelvingSaleDate> = ArrayList()
|
||||
listError.add(ItemShelvingSaleDate(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())))
|
||||
_itemShelvingSaleDateList.value = ItemShelvingSaleDateList(listError) }
|
||||
val listError: ArrayList<ItemShelvingSaleDate> = ArrayList()
|
||||
listError.add(
|
||||
ItemShelvingSaleDate(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
)
|
||||
_itemShelvingSaleDateList.value = ItemShelvingSaleDateList(listError)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,77 +85,44 @@ class DayOfSaleViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
|
||||
/* fun getListFromJSON(json: JsonObject): MutableList<itemsExpeditionDynamics> {
|
||||
val gson = Gson()
|
||||
var list = mutableListOf<itemsExpeditionDynamics>()
|
||||
var expeditionState: Map<String, Any> = gson.fromJson(json, object : TypeToken<Map<String, Any>>() {}.type)
|
||||
expeditionState.forEach {
|
||||
|
||||
/*fun itemShelving_getSaleDateOld(expeditionFk: String, user: String, password: String) {
|
||||
GetDayOfSaleUSerCase.itemShelving_getSaleDate(user, password, expeditionFk)
|
||||
.enqueue(object : Callback<JsonObject> {
|
||||
override fun onFailure(call: Call<JsonObject>, t: Throwable) {
|
||||
list.add(itemsExpeditionDynamics(key=it.key,value=it.value.toString()))
|
||||
|
||||
var listProperties: MutableList<itemsExpeditionDynamics> = mutableListOf()
|
||||
}
|
||||
return list
|
||||
}*/
|
||||
|
||||
_itemexpedition.value = itemExpedetionState(
|
||||
isError = true,
|
||||
errorMessage = "Error en la llamada itemShelving_getSaleDate " + expeditionFk + " Respuesta:" + t.message!!, list= listProperties
|
||||
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<JsonObject>, response: Response<JsonObject>) {
|
||||
|
||||
|
||||
var listProperties: MutableList<itemsExpeditionDynamics> = mutableListOf()
|
||||
|
||||
if (response.body() != null) {
|
||||
|
||||
listProperties=getListFromJSON(response.body()!!.asJsonObject)
|
||||
|
||||
_itemexpedition.value = itemExpedetionState(
|
||||
isError = false,
|
||||
errorMessage = "Error al obtener el estado de la expedición",list = listProperties)
|
||||
|
||||
|
||||
} else {
|
||||
_itemexpedition.value = itemExpedetionState(
|
||||
isError = true,
|
||||
errorMessage = "Error en la llamada itemShelving_getSaleDate",list = listProperties
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}*/
|
||||
|
||||
|
||||
/* fun getListFromJSON(json: JsonObject): MutableList<itemsExpeditionDynamics> {
|
||||
val gson = Gson()
|
||||
var list = mutableListOf<itemsExpeditionDynamics>()
|
||||
var expeditionState: Map<String, Any> = gson.fromJson(json, object : TypeToken<Map<String, Any>>() {}.type)
|
||||
expeditionState.forEach {
|
||||
|
||||
list.add(itemsExpeditionDynamics(key=it.key,value=it.value.toString()))
|
||||
|
||||
}
|
||||
return list
|
||||
}*/
|
||||
|
||||
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
||||
|
||||
GetDayOfSaleUSerCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
||||
fun parking( scanItem: String, parking: String) {
|
||||
GetDayOfSaleUSerCase.shelvingPark(scanItem, parking).enqueue(object :
|
||||
Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
|
||||
/*
|
||||
/*
|
||||
if (response.isSuccessful == null){
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
}else{*/
|
||||
if (response.isSuccessful)
|
||||
_response.value = ResponseItemVO(isError = false,response = response.message())
|
||||
else
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
|
||||
if (response.isSuccessful)
|
||||
_response.value = ResponseItemVO(isError = false, response = response.message())
|
||||
else
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
})
|
||||
|
|
|
@ -146,8 +146,6 @@ class FaltasFragment :
|
|||
viewModel.itemStockUpdate(
|
||||
item.itemFk,
|
||||
getData(WAREHOUSEFK),
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
customDialogInput.getValue(),
|
||||
"0"
|
||||
|
||||
|
@ -166,8 +164,6 @@ class FaltasFragment :
|
|||
viewModel.itemStockUpdate(
|
||||
item.itemFk,
|
||||
getData(WAREHOUSEFK),
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
customDialogInput.getValue(),
|
||||
"0"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class FaltasViewModel(context: Context) : BaseViewModel() {
|
||||
class FaltasViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
|
||||
private val getInventaryUserCase: GetInventaryUserCase = GetInventaryUserCase(context)
|
||||
|
@ -75,12 +75,10 @@ class FaltasViewModel(context: Context) : BaseViewModel() {
|
|||
fun itemStockUpdate(
|
||||
itemFk: String,
|
||||
warehouseFk: String,
|
||||
user: String,
|
||||
password: String,
|
||||
newValue: String,
|
||||
isTrash: String
|
||||
) {
|
||||
getItemCardUserCase.itemStockUpdate(user, password, itemFk, warehouseFk, newValue, isTrash)
|
||||
getItemCardUserCase.itemStockUpdate( itemFk, warehouseFk, newValue, isTrash)
|
||||
.enqueue(object :
|
||||
Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
|
|
|
@ -15,7 +15,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class HistoricoArticuloViewModel(context: Context) : BaseViewModel() {
|
||||
class HistoricoArticuloViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
|
||||
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ import retrofit2.Callback
|
|||
import retrofit2.Response
|
||||
import timber.log.Timber.i
|
||||
|
||||
class itemShelvingLogViewModel(context: Context) : BaseViewModel() {
|
||||
class itemShelvingLogViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val itemShelvingLogUSerCase: itemShelvingLogUSerCase =
|
||||
itemShelvingLogUSerCase(context)
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment
|
||||
|
||||
import android.util.Base64.encodeToString
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.lifecycle.Observer
|
||||
|
@ -14,7 +12,6 @@ import es.verdnatura.presentation.base.BaseFragment
|
|||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.feature.historicoshelvinglog.adapter.ShelvingLogAdapter
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import java.net.URLEncoder
|
||||
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
class shelvingLogFragment(
|
||||
|
@ -23,7 +20,6 @@ class shelvingLogFragment(
|
|||
) : BaseFragment<FragmentShelvinglogBinding, shelvingLogViewModel>(
|
||||
shelvingLogViewModel::class
|
||||
) {
|
||||
// private lateinit var customDialogList: CustomDialogList
|
||||
private var adapter: ShelvingLogAdapter? = null
|
||||
private var itemScan = ""
|
||||
|
||||
|
@ -38,8 +34,7 @@ class shelvingLogFragment(
|
|||
override fun init() {
|
||||
|
||||
customDialog = CustomDialog(requireContext())
|
||||
// customDialogList = CustomDialogList(requireContext())
|
||||
binding.linearHeader.visibility=View.GONE
|
||||
binding.linearHeader.visibility = View.GONE
|
||||
setEvents()
|
||||
setToolBar(getString(R.string.shelvingLog))
|
||||
super.init()
|
||||
|
@ -49,7 +44,6 @@ class shelvingLogFragment(
|
|||
private fun setToolBar(title: String) {
|
||||
binding.mainToolbar.toolbarTitle.text = title
|
||||
|
||||
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
|
@ -78,8 +72,7 @@ class shelvingLogFragment(
|
|||
|
||||
private fun shelvingLog_get(vShelvingFK: String) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
// viewModel.shelvingLog_get(getData(USER), getData(PASSWORD),vShelvingFK)
|
||||
viewModel.Shelvings(getData(TOKEN), setFilter(vShelvingFK))
|
||||
viewModel.Shelvings(setFilter(vShelvingFK))
|
||||
|
||||
}
|
||||
|
||||
|
@ -93,36 +86,36 @@ class shelvingLogFragment(
|
|||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
|
||||
loadShelvingLogList.observe(viewLifecycleOwner, Observer { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
adapter = ShelvingLogAdapter(it.list)
|
||||
binding.itemshelvinglogRecyclerview.adapter = adapter
|
||||
binding.itemshelvinglogRecyclerview.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
setToolBar(getString(R.string.shelvingLog) + ":" + itemScan)
|
||||
/* loadShelvingLogList.observe(viewLifecycleOwner, Observer { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
adapter = ShelvingLogAdapter(it.list)
|
||||
binding.itemshelvinglogRecyclerview.adapter = adapter
|
||||
binding.itemshelvinglogRecyclerview.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
setToolBar(getString(R.string.shelvingLog) + ":" + itemScan)
|
||||
|
||||
if (it.list.isEmpty()) {
|
||||
customDialog.setTitle(getString(R.string.noResults))
|
||||
.setDescription(getString(R.string.noDataLabelScanned))
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
} else {
|
||||
if (it.list.isEmpty()) {
|
||||
customDialog.setTitle(getString(R.string.noResults))
|
||||
.setDescription(getString(R.string.noDataLabelScanned))
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
} else {
|
||||
|
||||
if (it.list.get(0).isError) {
|
||||
customDialog.setTitle(getString(R.string.error))
|
||||
.setDescription(it.list.get(0).errorMessage)
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
}
|
||||
}
|
||||
if (it.list.get(0).isError) {
|
||||
customDialog.setTitle(getString(R.string.error))
|
||||
.setDescription(it.list.get(0).errorMessage)
|
||||
.setOkButton(getString(R.string.close)) {
|
||||
customDialog.dismiss()
|
||||
}.show()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
*/
|
||||
loadShelvingLogSalixList.observe(viewLifecycleOwner, Observer { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
@ -150,12 +143,18 @@ class shelvingLogFragment(
|
|||
}
|
||||
} else {
|
||||
|
||||
var itemId= it.list[0].id
|
||||
val itemId = it.list[0].id
|
||||
//val entrypoint = mutableMapOf("entryPoint" to itemScan, "web" to "https://test-salix.verdnatura.es/#!/shelving/$itemId/log")
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = getString(R.string.titleWebViewer),
|
||||
), entryPoint = Gson().toJson(mutableMapOf("entryPoint" to itemId, "web" to "https://salix.verdnatura.es/#!/shelving/$itemId/log"))
|
||||
),
|
||||
entryPoint = Gson().toJson(
|
||||
mutableMapOf(
|
||||
"entryPoint" to itemId,
|
||||
"web" to "https://salix.verdnatura.es/#!/shelving/$itemId/log"
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,16 +2,12 @@ package es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment
|
|||
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import es.verdnatura.domain.itemShelvingLogUSerCase
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.Event
|
||||
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLog
|
||||
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLogList
|
||||
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLogSalix
|
||||
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLogSalixList
|
||||
import retrofit2.Call
|
||||
|
@ -19,21 +15,21 @@ import retrofit2.Callback
|
|||
import retrofit2.Response
|
||||
|
||||
|
||||
class shelvingLogViewModel(context: Context) : BaseViewModel() {
|
||||
private val itemShelvingLogUSerCase: itemShelvingLogUSerCase =
|
||||
itemShelvingLogUSerCase(context)
|
||||
class shelvingLogViewModel(context: Context) : BaseViewModel(context) {
|
||||
/* private val itemShelvingLogUSerCase: itemShelvingLogUSerCase =
|
||||
itemShelvingLogUSerCase(context)*/
|
||||
|
||||
private val _itemShelvingLogList by lazy { MutableLiveData<ShelvingLogList>() }
|
||||
val loadShelvingLogList = Transformations.map(_itemShelvingLogList) { Event(it) }
|
||||
/*private val _itemShelvingLogList by lazy { MutableLiveData<ShelvingLogList>() }
|
||||
val loadShelvingLogList = Transformations.map(_itemShelvingLogList) { Event(it) }*/
|
||||
|
||||
private val _itemShelvingLogSalixList by lazy { MutableLiveData<ShelvingLogSalixList>() }
|
||||
val loadShelvingLogSalixList = Transformations.map(_itemShelvingLogSalixList) { Event(it) }
|
||||
|
||||
private val _shelvingResponse by lazy { MutableLiveData<ShelvingLogSalix>() }
|
||||
val shelvingResponse: LiveData<ShelvingLogSalix>
|
||||
get() = _shelvingResponse
|
||||
/* private val _shelvingResponse by lazy { MutableLiveData<ShelvingLogSalix>() }
|
||||
val shelvingResponse: LiveData<ShelvingLogSalix>
|
||||
get() = _shelvingResponse*/
|
||||
|
||||
fun shelvingLog_get(usuario: String, password: String, vShelvingFK: String) {
|
||||
/*fun shelvingLog_get(usuario: String, password: String, vShelvingFK: String) {
|
||||
itemShelvingLogUSerCase.shelvingLog_get(usuario, password, vShelvingFK).enqueue(object :
|
||||
Callback<List<ShelvingLog>> {
|
||||
override fun onFailure(call: Call<List<ShelvingLog>>, t: Throwable) {
|
||||
|
@ -79,10 +75,10 @@ class shelvingLogViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
fun Shelvings(token: String, vShelvingFK: String) {
|
||||
itemShelvingLogUSerCase.Shelvings(token, vShelvingFK).enqueue(object :
|
||||
fun Shelvings(vShelvingFK: String) {
|
||||
salix!!.Shelvings(vShelvingFK).enqueue(object :
|
||||
Callback<List<ShelvingLogSalix>> {
|
||||
override fun onFailure(call: Call<List<ShelvingLogSalix>>, t: Throwable) {
|
||||
val listError: ArrayList<ShelvingLogSalix> = ArrayList()
|
||||
|
|
|
@ -16,7 +16,7 @@ import retrofit2.Response
|
|||
import timber.log.Timber.d
|
||||
import timber.log.Timber.i
|
||||
|
||||
class HistoricoVehiculoViewModel (context: Context) : BaseViewModel() {
|
||||
class HistoricoVehiculoViewModel (context: Context) : BaseViewModel(context) {
|
||||
private val GetVehicleControlTimeUserCase: GetVehicleControlTimeUserCase = GetVehicleControlTimeUserCase(context)
|
||||
|
||||
|
||||
|
|
|
@ -47,15 +47,15 @@ class InventoryAdapter (
|
|||
}
|
||||
itemFk.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(
|
||||
R.string.titleItemConsult)),item.itemFk)
|
||||
R.string.titleItemConsult)),item.itemFk.toString())
|
||||
}
|
||||
itemUp.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(
|
||||
R.string.titleItemSearch)),item.itemFk)
|
||||
R.string.titleItemSearch)),item.itemFk.toString())
|
||||
}
|
||||
itemDown.setOnClickListener {
|
||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(
|
||||
R.string.titleItemSearch)),item.itemFk)
|
||||
R.string.titleItemSearch)),item.itemFk.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ class InventaryFragment :
|
|||
override fun init() {
|
||||
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.itemShelvingBuyerGet(user = getData(USER), password = getData(PASSWORD))
|
||||
viewModel.itemShelvingBuyerGet()
|
||||
|
||||
binding.filterBuyer.text = getData(BUYER)
|
||||
buyerId = getData(BUYERID)
|
||||
|
@ -160,7 +160,7 @@ class InventaryFragment :
|
|||
listInvetory.removeAll(listInvetoryAux)
|
||||
|
||||
listInvetory.addAll(listInvetoryAux.filter {
|
||||
it.itemFk.contains(
|
||||
it.itemFk!!.toString().contains(
|
||||
binding.filterItemFk.text.toString(),
|
||||
true
|
||||
) || it.producer.contains(
|
||||
|
@ -216,15 +216,13 @@ class InventaryFragment :
|
|||
adapter = InventoryAdapter(listInvetory, object : OnInvetoryNichoClickListener {
|
||||
override fun onInvetoryNichoClickListener(item: ItemInventaryVO) {
|
||||
|
||||
customDialog.setTitle(item.itemFk + "\n" + item.longName + " " + item.size)
|
||||
customDialog.setTitle(item.itemFk.toString() + "\n" + item.longName + " " + item.size)
|
||||
.setDescription(getString(R.string.quantityReal) + item.nicho + ")")
|
||||
.setOkButton(getString(R.string.pull)) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.itemTrash(
|
||||
item.itemFk.toInt(),
|
||||
item.itemFk!!.toInt(),
|
||||
getData(WAREHOUSEFK).toInt(),
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
item.nicho,
|
||||
false
|
||||
)
|
||||
|
|
|
@ -21,11 +21,11 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class InventaryViewModel(context: Context) : BaseViewModel() {
|
||||
class InventaryViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getInventaryUserCase: GetInventaryUserCase = GetInventaryUserCase(context)
|
||||
private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
|
||||
private val getWorkerMistakeUserCase: GetWokerMistakeUSerCase = GetWokerMistakeUSerCase(context)
|
||||
//private val getInventaryUserCase: GetInventaryUserCase = GetInventaryUserCase(context)
|
||||
//private val getItemCardUserCase: GetItemCardUserCase = GetItemCardUserCase(context)
|
||||
//private val getWorkerMistakeUserCase: GetWokerMistakeUSerCase = GetWokerMistakeUSerCase(context)
|
||||
|
||||
private val _inventaryList by lazy { MutableLiveData<InventaryListVO>() }
|
||||
val inventaryList: LiveData<InventaryListVO>
|
||||
|
@ -40,7 +40,6 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
val buyersList: LiveData<BuyerListVO>
|
||||
get() = _buyersList
|
||||
|
||||
//********************** a borrar, solo para montar fragment ****************/
|
||||
private val _mistakeDepartmentList by lazy { MutableLiveData<departmentMistakeList>() }
|
||||
val mistakeDepartmentList: LiveData<departmentMistakeList>
|
||||
get() = _mistakeDepartmentList
|
||||
|
@ -58,8 +57,8 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
get() = _responseAddMistake
|
||||
|
||||
//sergio para obtener comprador
|
||||
fun itemShelvingBuyerGet(user: String, password: String) {
|
||||
getInventaryUserCase.itemShelvingBuyerGet(user, password).enqueue(object :
|
||||
fun itemShelvingBuyerGet() {
|
||||
silex!!.itemShelvingBuyerGet().enqueue(object :
|
||||
Callback<List<BuyerVO>> {
|
||||
override fun onFailure(call: Call<List<BuyerVO>>, t: Throwable) {
|
||||
val listError: ArrayList<BuyerVO> = ArrayList()
|
||||
|
@ -99,8 +98,8 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
val loadInventaryList = Transformations.map(_inventaryList) { Event(it) }
|
||||
|
||||
fun getInventory( buyerFk: Int, warehouseFk: Int) {
|
||||
getInventaryUserCase.itemShelvingRadarFilterBuyer( buyerFk, warehouseFk)
|
||||
fun getInventory(buyerFk: Int, warehouseFk: Int) {
|
||||
silex!!.itemShelvingRadarFilterBuyer(buyerFk, warehouseFk)
|
||||
.enqueue(object :
|
||||
Callback<List<ItemInventaryVO>> {
|
||||
override fun onFailure(call: Call<List<ItemInventaryVO>>, t: Throwable) {
|
||||
|
@ -147,14 +146,12 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
fun itemTrash(
|
||||
itemFk: Int,
|
||||
warehouseFk: Int,
|
||||
user: String,
|
||||
password: String,
|
||||
newValue: Int,
|
||||
isTrash: Boolean
|
||||
) {
|
||||
|
||||
|
||||
getItemCardUserCase.itemTrash(user, password, itemFk, warehouseFk, newValue, isTrash)
|
||||
silex!!.itemTrash(itemFk, warehouseFk, newValue, isTrash)
|
||||
.enqueue(object : Callback<Any> {
|
||||
|
||||
|
||||
|
@ -184,7 +181,8 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
fun department_getHasMistakeSalix(token: String) {
|
||||
//En test encara,no provat en Salix
|
||||
/* fun department_getHasMistakeSalix(token: String) {
|
||||
|
||||
getWorkerMistakeUserCase.department_getHasMistakeSalix(token)
|
||||
|
||||
|
@ -212,17 +210,17 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
response.body()?.let { departmentMistakeList(it) }
|
||||
} else {
|
||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||
listError.add(DepartmentMistake("0", ""))
|
||||
listError.add(DepartmentMistake(0, ""))
|
||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
fun department_getHasMistake() {
|
||||
|
||||
getWorkerMistakeUserCase.department_getHasMistake()
|
||||
silex!!.department_getHasMistake()
|
||||
.enqueue(object : Callback<List<DepartmentMistake>> {
|
||||
override fun onFailure(call: Call<List<DepartmentMistake>>, t: Throwable) {
|
||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||
|
@ -247,7 +245,7 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
response.body()?.let { departmentMistakeList(it) }
|
||||
} else {
|
||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||
listError.add(DepartmentMistake("0", ""))
|
||||
listError.add(DepartmentMistake(0, ""))
|
||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
||||
}
|
||||
}
|
||||
|
@ -255,8 +253,8 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
fun worker_getFromHasMistake(usuario: String, password: String, departmentFk: String) {
|
||||
getWorkerMistakeUserCase.worker_getFromHasMistake(usuario, password, departmentFk)
|
||||
fun worker_getFromHasMistake( departmentFk: Int) {
|
||||
silex!!.worker_getFromHasMistake(departmentFk)
|
||||
.enqueue(object :
|
||||
Callback<List<WorkerFromMistake>> {
|
||||
override fun onFailure(call: Call<List<WorkerFromMistake>>, t: Throwable) {
|
||||
|
@ -299,8 +297,8 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
fun workerMistakeType_get(usuario: String, password: String) {
|
||||
getWorkerMistakeUserCase.workerMistakeType_get(usuario, password)
|
||||
fun workerMistakeType_get() {
|
||||
silex!!.workerMistakeType_get()
|
||||
.enqueue(object : Callback<List<MistakeWorkerType>> {
|
||||
override fun onFailure(call: Call<List<MistakeWorkerType>>, t: Throwable) {
|
||||
val listError: ArrayList<MistakeWorkerType> = ArrayList()
|
||||
|
@ -346,55 +344,12 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
|
||||
|
||||
fun workerMistake_Add(
|
||||
usuario: String,
|
||||
password: String,
|
||||
vUserFk: String,
|
||||
|
||||
vUserFk: Int,
|
||||
vTypeFk: String
|
||||
) {
|
||||
getWorkerMistakeUserCase.workerMistake_Add(usuario, password, vUserFk, vTypeFk)
|
||||
.enqueue(object :
|
||||
Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<Unit>,
|
||||
response: Response<Unit>
|
||||
) {
|
||||
if (!response.isSuccessful) {
|
||||
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage =
|
||||
getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
), codeError = response.code())
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
// sergio:refactor:solo debería haber un mensaje no un response o errorMessage
|
||||
_responseAddMistake.value =
|
||||
ResponseItemVO(
|
||||
isError = false,
|
||||
response = response.message()
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
fun expeditionMistake_add(
|
||||
vExpeditionFk: Int,
|
||||
vTypeFk: String
|
||||
) {
|
||||
getWorkerMistakeUserCase.expeditionMistake_add(vExpeditionFk, vTypeFk)
|
||||
silex!!.workerMistake_Add(vUserFk, vTypeFk)
|
||||
.enqueue(object :
|
||||
Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
|
@ -416,7 +371,8 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
), codeError = response.code())
|
||||
), codeError = response.code()
|
||||
)
|
||||
|
||||
|
||||
} else {
|
||||
|
@ -431,8 +387,52 @@ class InventaryViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun expeditionMistake_add(
|
||||
vExpeditionFk: Int,
|
||||
vTypeFk: String
|
||||
) {
|
||||
silex!!.expeditionMistake_add(vExpeditionFk, vTypeFk)
|
||||
.enqueue(object :
|
||||
Callback<Unit> {
|
||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<Unit>,
|
||||
response: Response<Unit>
|
||||
) {
|
||||
if (!response.isSuccessful) {
|
||||
|
||||
_responseAddMistake.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage =
|
||||
getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
), codeError = response.code()
|
||||
)
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
// sergio:refactor:solo debería haber un mensaje no un response o errorMessage
|
||||
_responseAddMistake.value =
|
||||
ResponseItemVO(
|
||||
isError = false,
|
||||
response = response.message()
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun expeditionMistakeType_get() {
|
||||
getWorkerMistakeUserCase.expeditionMistakeType_get()
|
||||
silex!!.expeditionMistakeType_get()
|
||||
.enqueue(object : Callback<List<MistakeWorkerType>> {
|
||||
override fun onFailure(call: Call<List<MistakeWorkerType>>, t: Throwable) {
|
||||
val listError: ArrayList<MistakeWorkerType> = ArrayList()
|
||||
|
|
|
@ -20,7 +20,7 @@ class SearchBuyerModel(private var nickname: String?, private var buyerId: Strin
|
|||
|
||||
}
|
||||
|
||||
class SearchDepartmentModel(private var name: String?, private var departmentId: String?) :
|
||||
class SearchDepartmentModel(private var name: String?, private var departmentId: Int?) :
|
||||
Searchable {
|
||||
|
||||
override fun getTitle(): String {
|
||||
|
@ -28,7 +28,7 @@ class SearchDepartmentModel(private var name: String?, private var departmentId:
|
|||
return name!!
|
||||
}
|
||||
|
||||
fun getDepartmentId(): String {
|
||||
fun getDepartmentId(): Int {
|
||||
return departmentId!!
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package es.verdnatura.presentation.view.feature.inventario.model
|
||||
|
||||
class ItemInventaryVO(
|
||||
var itemFk: String = "",
|
||||
var itemFk: Int? = null,
|
||||
var longName: String? = "",
|
||||
var size: String = "",
|
||||
var producer: String = "",
|
||||
|
|
|
@ -189,7 +189,7 @@ class LoginViewModel(var context: Context) : BaseViewModel(context) {
|
|||
|
||||
fun worker_getId() {
|
||||
|
||||
silex!!.worker_getId().enqueue(object : SilexCallback<Int>(context) {
|
||||
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
|
||||
|
@ -197,51 +197,42 @@ class LoginViewModel(var context: Context) : BaseViewModel(context) {
|
|||
prefs.commit()
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
d("VERDNATURA::", "Entramos al fallo" + t.message!!)
|
||||
throw t
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
fun deviceLog_add(app: String, versionApp: String, android_id: String
|
||||
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) {
|
||||
//d("VERDNATURA::", "Entramos al fallo" + t.message!!)
|
||||
//throw t
|
||||
throw Error(nameofFunction((this))+"->"+t.message)
|
||||
}
|
||||
|
||||
override fun onSuccess(response: Response<Void>) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
/* getLoginUserCase.deviceLog_add(user, password, app, versionApp, android_id)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
if (!response.isSuccessful) {
|
||||
|
||||
messageError(nameofFunction(this), response.message())
|
||||
|
||||
}
|
||||
silex!!.deviceLog_add(app, versionApp, android_id)
|
||||
.enqueue(object : SilexCallback<Void>(context) {
|
||||
override fun onError(t: Throwable) {
|
||||
throw Error(nameofFunction((this)) + "->" + t.message)
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
override fun onSuccess(response: Response<Void>) {
|
||||
|
||||
messageError(nameofFunction(this), t.message!!)
|
||||
}
|
||||
|
||||
})*/
|
||||
})
|
||||
|
||||
/* getLoginUserCase.deviceLog_add(user, password, app, versionApp, android_id)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||
|
||||
if (!response.isSuccessful) {
|
||||
|
||||
messageError(nameofFunction(this), response.message())
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
|
||||
messageError(nameofFunction(this), t.message!!)
|
||||
}
|
||||
|
||||
})*/
|
||||
}
|
||||
|
||||
fun messageError(callFunction: String, message: String) {
|
||||
|
|
|
@ -71,9 +71,7 @@ class PackagingSummaryFragment(
|
|||
|
||||
if (!departmentId.isEmpty()) {
|
||||
viewModel.worker_getFromHasMistake(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(DEPARTMENTMISTAKEID)
|
||||
getData(DEPARTMENTMISTAKEID).toInt()
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -143,8 +141,6 @@ class PackagingSummaryFragment(
|
|||
|
||||
override fun onMistakeWorkerClickListener(item: WorkerFromMistake) {
|
||||
viewModel.workerMistakeType_get(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD)
|
||||
)
|
||||
workerMistakeName =
|
||||
WorkerFromMistake(
|
||||
|
@ -223,12 +219,10 @@ class PackagingSummaryFragment(
|
|||
override fun onBarcodeRowClickListener(item: BarcodeVO) {
|
||||
list.forEach {
|
||||
if (it.description == item.code) {
|
||||
viewModel.workerMistake_Add(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
vUserFk = workerMistakeName!!.id,
|
||||
/* viewModel.workerMistake_Add(
|
||||
vUserFk = workerMistakeName!!.id!!,
|
||||
vTypeFk = it.code
|
||||
)
|
||||
)*/
|
||||
// getString(R.string.errorRegistered).toast(requireContext())
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
|
@ -270,10 +264,10 @@ class PackagingSummaryFragment(
|
|||
}
|
||||
|
||||
}
|
||||
listWorker.add(WorkerFromMistake("0", "Añadir nuevo", "", false))
|
||||
listWorker.add(WorkerFromMistake(0, "Añadir nuevo", "", false))
|
||||
listWorkerAuxiliary.clear()
|
||||
listWorkerAuxiliary.addAll(listWorker)
|
||||
listWorkerAuxiliary.add(WorkerFromMistake("0", "Añadir nuevo", "", false))
|
||||
listWorkerAuxiliary.add(WorkerFromMistake(0, "Añadir nuevo", "", false))
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class PackagingViewModel(context: Context) : BaseViewModel() {
|
||||
class PackagingViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getInventaryUserCase: GetInventaryUserCase = GetInventaryUserCase(context)
|
||||
private val getPackagingUserCase: GetPackagingUserCase = GetPackagingUserCase(context)
|
||||
|
|
|
@ -13,7 +13,7 @@ import retrofit2.Callback
|
|||
import retrofit2.Response
|
||||
|
||||
|
||||
class CmrExpeditionPalletViewModel(context: Context) : BaseViewModel() {
|
||||
class CmrExpeditionPalletViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val GetPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||
GetPaletizadoresUserCase(context)
|
||||
|
|
|
@ -17,7 +17,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel() {
|
||||
class ExpeditionPalletDetailViewModel(context: Context): BaseViewModel(context) {
|
||||
|
||||
private val getPaletizadoresUserCase: GetPaletizadoresUserCase = GetPaletizadoresUserCase(context)
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ExpeditionPalletViewModel (context: Context) : BaseViewModel() {
|
||||
class ExpeditionPalletViewModel (context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getPaletizadoresUserCase: GetPaletizadoresUserCase = GetPaletizadoresUserCase(context)
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ExpeditionScanSorterViewModel(context: Context) : BaseViewModel() {
|
||||
class ExpeditionScanSorterViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val GetPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||
GetPaletizadoresUserCase(context)
|
||||
|
|
|
@ -18,7 +18,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ExpeditionScanViewModel(context: Context) : BaseViewModel() {
|
||||
class ExpeditionScanViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||
GetPaletizadoresUserCase(context)
|
||||
|
|
|
@ -26,10 +26,9 @@ import retrofit2.Callback
|
|||
import retrofit2.Response
|
||||
|
||||
|
||||
class ExpeditionStateViewModel(context: Context) : BaseViewModel() {
|
||||
class ExpeditionStateViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val GetPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||
GetPaletizadoresUserCase(context)
|
||||
val version: String = "5.0.0"
|
||||
|
||||
private val _itemcard by lazy { MutableLiveData<ItemCardVO>() }
|
||||
val itemcard: LiveData<ItemCardVO>
|
||||
|
|
|
@ -17,7 +17,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ExpeditionTruckListViewModel(context: Context) : BaseViewModel() {
|
||||
class ExpeditionTruckListViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getPaletizadoresUserCase: GetPaletizadoresUserCase = GetPaletizadoresUserCase(context)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ import retrofit2.Callback
|
|||
import retrofit2.Response
|
||||
|
||||
|
||||
class PalletScanViewModel(context: Context) : BaseViewModel() {
|
||||
class PalletScanViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val GetPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||
GetPaletizadoresUserCase(context)
|
||||
|
|
|
@ -132,8 +132,6 @@ class ParkingFragment (var menuOrigin:String): BaseFragment<FragmentParkingBindi
|
|||
scanerList.forEach {
|
||||
// binding.splashProgress.visibility = View.VSIIBLE
|
||||
viewModel.parking(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
parking = txtScan,
|
||||
scanItem = it.code!!
|
||||
)
|
||||
|
|
|
@ -15,8 +15,8 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ParkingViewModel(context: Context) : BaseViewModel() {
|
||||
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase(context)
|
||||
class ParkingViewModel(context: Context) : BaseViewModel(context) {
|
||||
// private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase(context)
|
||||
|
||||
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val response: LiveData<ResponseItemVO>
|
||||
|
@ -39,9 +39,9 @@ class ParkingViewModel(context: Context) : BaseViewModel() {
|
|||
_isLoadingProgress.value = visibility
|
||||
}
|
||||
|
||||
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
||||
fun parking(scanItem: String,parking:String){
|
||||
ProgressLoading(VISIBLE)
|
||||
getUbicadorUserCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
||||
silex!!.shelvingPark(scanItem,parking).enqueue(object :
|
||||
Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
|
|
|
@ -127,8 +127,6 @@ class ParkingSaleFragment : BaseFragment<FragmentParkingBinding,ParkingSaleViewM
|
|||
scanerList.forEach {
|
||||
// binding.splashProgress.visibility = View.VSIIBLE
|
||||
viewModel.parking(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
parking = txtScan,
|
||||
scanItem = it.code!!
|
||||
)
|
||||
|
|
|
@ -15,7 +15,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ParkingSaleViewModel(context: Context) : BaseViewModel() {
|
||||
class ParkingSaleViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase(context)
|
||||
|
||||
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
|
@ -45,9 +45,9 @@ class ParkingSaleViewModel(context: Context) : BaseViewModel() {
|
|||
_isLoadingProgress.value = visibility
|
||||
}
|
||||
|
||||
fun parking(usuario: String,password: String,scanItem: String,parking:String){
|
||||
fun parking(scanItem: String,parking:String){
|
||||
ProgressLoading(VISIBLE)
|
||||
getUbicadorUserCase.shelvingPark(usuario,password,scanItem,parking).enqueue(object :
|
||||
silex!!.shelvingPark(scanItem,parking).enqueue(object :
|
||||
Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(isError = true,errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!))
|
||||
|
|
|
@ -6,7 +6,7 @@ import es.verdnatura.R
|
|||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
|
||||
class PasilleroViewModel(context: Context) : BaseViewModel() {
|
||||
class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
||||
@SuppressLint("StaticFieldLeak")
|
||||
private val contextApp = context
|
||||
private val _pasillerositem by lazy { ArrayList<PasillerosItemVO>() }
|
||||
|
|
|
@ -14,7 +14,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class PreControladorViewModel(context: Context) : BaseViewModel() {
|
||||
class PreControladorViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val contextApp=context
|
||||
private val _collectionTicketList by lazy { MutableLiveData<CollectionVO>() }
|
||||
|
|
|
@ -25,7 +25,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||
class PreSacadorViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val contextApp=context
|
||||
private val getPreSacadorUseCase: GetPreSacadorUseCase = GetPreSacadorUseCase(context)
|
||||
|
@ -169,12 +169,10 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
fun parking(
|
||||
usuario: String,
|
||||
password: String,
|
||||
ticketFk: String,
|
||||
parking: String
|
||||
) {
|
||||
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
||||
silex!!.shelvingPark(ticketFk, parking)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(
|
||||
|
|
|
@ -14,7 +14,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class QrFragmentViewModel(context: Context) : BaseViewModel() {
|
||||
class QrFragmentViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val contextApp =context
|
||||
private val GetQrReaderUserCase: GetQrReaderUserCase =
|
||||
GetQrReaderUserCase(context)
|
||||
|
|
|
@ -18,7 +18,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ReposicionViewModel(context: Context) : BaseViewModel() {
|
||||
class ReposicionViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val getPreSacadorUseCase: GetPreSacadorUseCase = GetPreSacadorUseCase(context)
|
||||
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase(context)
|
||||
private val getSacadorControladorUserCase: GetSacadorControladorUserCase =
|
||||
|
@ -71,13 +71,11 @@ class ReposicionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
fun parking(
|
||||
usuario: String,
|
||||
password: String,
|
||||
ticketFk: String,
|
||||
parking: String
|
||||
|
||||
) {
|
||||
getUbicadorUserCase.shelvingPark(usuario, password, ticketFk, parking)
|
||||
silex!!.shelvingPark(ticketFk, parking)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(
|
||||
|
|
|
@ -22,7 +22,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class SacadorViewModel(context: Context) : BaseViewModel() {
|
||||
class SacadorViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
//val emptyMessage = "No tienes colecciones pendientes. Presiona sobre el + para crear colección"
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ShelvingParkingViewModel(context: Context) : BaseViewModel() {
|
||||
class ShelvingParkingViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
|
||||
private val getShelvingParkingUserCase: GetShelvingParkingUserCase = GetShelvingParkingUserCase(context)
|
||||
|
|
|
@ -14,7 +14,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class ShowTicketViewModel(context: Context) : BaseViewModel() {
|
||||
class ShowTicketViewModel(context: Context) : BaseViewModel(context) {
|
||||
private val contextApp=context
|
||||
|
||||
private val getPreControladorUserCase: GetPreControladorUserCase = GetPreControladorUserCase(context)
|
||||
|
|
|
@ -113,8 +113,8 @@ class AssociateSmartTagsFragment(
|
|||
//ponser el unbindshleving aqui
|
||||
//sergio:esto se debe hacer en
|
||||
|
||||
viewModel.workerShelving_delete(getData(USER),
|
||||
getData(PASSWORD), listSmartTags.last().code.toString())
|
||||
/*viewModel.workerShelving_delete(getData(USER),
|
||||
getData(PASSWORD), listSmartTags.last().code.toString())*/
|
||||
|
||||
/* ("http://localhost:7777/unbindShelving/${listSmartTags.first().code}" + "&" + listSmartTags.last().code + "&${listSmartTags.size}").toast(
|
||||
requireContext()
|
||||
|
|
|
@ -14,7 +14,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
||||
class SmartTagsViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val GetSmarttagsUserCase: GetSmarttagsUserCase = GetSmarttagsUserCase(context)
|
||||
|
||||
|
@ -86,7 +86,7 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
|||
}*/
|
||||
|
||||
|
||||
fun workerShelving_delete(usuario: String, password: String, vBarcode: String) {
|
||||
/*fun workerShelving_delete(usuario: String, password: String, vBarcode: String) {
|
||||
GetSmarttagsUserCase.workerShelving_delete(usuario, password, vBarcode)
|
||||
.enqueue(object : Callback<Void> {
|
||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||
|
@ -119,7 +119,7 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
})
|
||||
}
|
||||
|
||||
*/
|
||||
fun smartTagRegister(smarttag: String, wagon: String, shelving: String) {
|
||||
GetSmarttagsUserCase.smartTagRegister(smarttag, wagon, shelving)
|
||||
.enqueue(object : Callback<SmartTagRegister> {
|
||||
|
|
|
@ -10,7 +10,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class TransferenciaViewModel(context: Context) : BaseViewModel() {
|
||||
class TransferenciaViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase(context)
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ import retrofit2.Call
|
|||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class AutomaticAddItemViewModel(context: Context) : BaseViewModel() {
|
||||
class AutomaticAddItemViewModel(context: Context) : BaseViewModel(context) {
|
||||
|
||||
|
||||
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase(context)
|
||||
|
|
|
@ -264,8 +264,6 @@ class UbicadorFragment(
|
|||
)
|
||||
) {
|
||||
viewModel.shelvingPark(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
shelvingFk,
|
||||
customDialogInput.getValue()
|
||||
)
|
||||
|
@ -286,8 +284,6 @@ class UbicadorFragment(
|
|||
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
viewModel.shelvingPark(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
shelvingFk,
|
||||
customDialogInput.getValue()
|
||||
)
|
||||
|
|
|
@ -225,12 +225,11 @@ class UbicadorViewModel(context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun shelvingPark(
|
||||
usuario: String,
|
||||
password: String,
|
||||
|
||||
shelving: String,
|
||||
parking: String
|
||||
) {
|
||||
getUbicadorUserCase.shelvingPark(usuario, password, shelving, parking)
|
||||
silex!!.shelvingPark(shelving, parking)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(
|
||||
|
|
|
@ -69,7 +69,7 @@ class WorkermistakeFragment(
|
|||
viewModel.department_getHasMistake(
|
||||
)
|
||||
} else {
|
||||
viewModel.department_getHasMistakeSalix(getData(TOKEN))
|
||||
// viewModel.department_getHasMistakeSalix(getData(TOKEN))
|
||||
}
|
||||
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -87,9 +87,7 @@ class WorkermistakeFragment(
|
|||
|
||||
if (!departmentId.isEmpty()) {
|
||||
viewModel.worker_getFromHasMistake(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(DEPARTMENTMISTAKEID)
|
||||
getData(DEPARTMENTMISTAKEID).toInt()
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -106,8 +104,6 @@ class WorkermistakeFragment(
|
|||
saveData(DEPARTMENTMISTAKE, nombre.getDepartmentName())
|
||||
saveData(DEPARTMENTMISTAKEID, nombre.getDepartmentId())
|
||||
viewModel.worker_getFromHasMistake(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
nombre.getDepartmentId()
|
||||
)
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
@ -191,8 +187,7 @@ class WorkermistakeFragment(
|
|||
|
||||
override fun onMistakeWorkerClickListener(item: WorkerFromMistake) {
|
||||
viewModel.workerMistakeType_get(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD)
|
||||
|
||||
)
|
||||
workerMistakeName =
|
||||
WorkerFromMistake(item.id, item.firstName, item.lastName, true, "")
|
||||
|
@ -266,13 +261,10 @@ class WorkermistakeFragment(
|
|||
list.forEach {
|
||||
if (it.description == item.code) {
|
||||
viewModel.workerMistake_Add(
|
||||
usuario = getData(USER),
|
||||
password = getData(PASSWORD),
|
||||
vUserFk = workerMistakeName!!.id,
|
||||
vUserFk = workerMistakeName!!.id!!,
|
||||
vTypeFk = it.code
|
||||
)
|
||||
// getString(R.string.errorRegistered).toast(requireContext())
|
||||
customDialogList.dismiss()
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,90 +0,0 @@
|
|||
package es.verdnatura.presentation.view.feature.workermistake.fragment
|
||||
|
||||
import android.content.Context
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import es.verdnatura.domain.GetWokerMistakeUSerCase
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.view.feature.workermistake.model.DepartmentMistake
|
||||
import es.verdnatura.presentation.view.feature.workermistake.model.departmentMistakeList
|
||||
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class WorkermistakeViewModel (context: Context) : BaseViewModel() {
|
||||
|
||||
private val getWorkerMistakeUserCase: GetWokerMistakeUSerCase = GetWokerMistakeUSerCase(context)
|
||||
|
||||
private val _mistakeDepartmentList by lazy { MutableLiveData<departmentMistakeList>() }
|
||||
val mistakeDepartmentList: LiveData<departmentMistakeList>
|
||||
get() = _mistakeDepartmentList
|
||||
|
||||
|
||||
|
||||
|
||||
/* fun mistakeWorker(usuario: String, password: String)
|
||||
{
|
||||
getWorkerMistakeUserCase.mistakeType(usuario, password)
|
||||
.enqueue(object : Callback<List<mistakeWorkerType>>
|
||||
{
|
||||
override fun onFailure(call: Call<List<mistakeWorkerType>>, t: Throwable)
|
||||
{
|
||||
val listError: ArrayList<mistakeWorkerType> = ArrayList()
|
||||
listError.add(mistakeWorkerType("0", ""))
|
||||
_mistakeDepartmentList.value = workerMistakeTypeList(listError)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<mistakeWorkerType>>,
|
||||
response: Response<List<mistakeWorkerType>>
|
||||
)
|
||||
{
|
||||
if (response.body() != null)
|
||||
{
|
||||
_mistakeDepartmentList.value = response.body()?.let { workerMistakeTypeList(it) }
|
||||
} else
|
||||
{
|
||||
val listError: ArrayList<mistakeWorkerType> = ArrayList()
|
||||
listError.add(mistakeWorkerType("0", ""))
|
||||
_mistakeDepartmentList.value = workerMistakeTypeList(listError)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}*/
|
||||
|
||||
fun department_getHasMistake()
|
||||
{
|
||||
getWorkerMistakeUserCase.department_getHasMistake()
|
||||
.enqueue(object : Callback<List<DepartmentMistake>>
|
||||
{
|
||||
override fun onFailure(call: Call<List<DepartmentMistake>>, t: Throwable)
|
||||
{
|
||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||
listError.add(DepartmentMistake("0", ""))
|
||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<List<DepartmentMistake>>,
|
||||
response: Response<List<DepartmentMistake>>
|
||||
)
|
||||
{
|
||||
if (response.body() != null)
|
||||
{
|
||||
_mistakeDepartmentList.value = response.body()?.let { departmentMistakeList(it) }
|
||||
} else
|
||||
{
|
||||
val listError: ArrayList<DepartmentMistake> = ArrayList()
|
||||
listError.add(DepartmentMistake("0", ""))
|
||||
_mistakeDepartmentList.value = departmentMistakeList(listError)
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -11,7 +11,7 @@ class MistakeWorkerType (
|
|||
|
||||
class DepartmentMistake(
|
||||
|
||||
var id:String ="",
|
||||
var id:Int? =null,
|
||||
var name:String="",
|
||||
var isError:Boolean = false,
|
||||
var errorMessage:String = ""
|
||||
|
@ -19,7 +19,7 @@ class DepartmentMistake(
|
|||
|
||||
class WorkerFromMistake(
|
||||
|
||||
var id:String="",
|
||||
var id:Int?=null,
|
||||
var firstName: String="",
|
||||
var lastName: String="",
|
||||
var isError:Boolean = false,
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left"
|
||||
android:text="@{item.itemFk}"
|
||||
android:text="@{Integer.toString(item.itemFk)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h7"
|
||||
android:textStyle="bold"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:paddingRight="@dimen/pasilleros_margin_main_menu"
|
||||
android:text="@{item.id}"
|
||||
android:text="{Integer.toString(item.id)}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/row"
|
||||
android:textStyle="bold"
|
||||
|
|
Loading…
Reference in New Issue