refs #5135 feat: refactor animation.

This commit is contained in:
Sergio De la torre 2024-01-16 07:07:31 +01:00
parent d787d8e861
commit b33511a3ed
101 changed files with 1063 additions and 4269 deletions

View File

@ -127,44 +127,113 @@
</select>
</component>
<component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="version 24.2Beta">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="refs #5135 feat: refactor animation. HotFix phones cambiar a String(varchar en bbdd)">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/beta/release/output-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/beta/release/output-metadata.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/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/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/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/BaseFragmentSalix.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragmentSalix.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragmentSalix.kt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/UICallbacks.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/UICallbacks.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/testing/testPrint.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/testing/testPrint.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemProposalFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemProposalFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/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/claim/fragment/ClaimFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/claim/fragment/ClaimFragment.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/adapter/SaleAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.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/CollectionFragmentPicker.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerNew.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerNew.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoFragment.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/collection/fragment/CollectionFragmentPreChecker.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.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/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/controlador/fragment/WebFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/WebFragment.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/delivery/fragments/InfoFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/InfoFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LogExpeditionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LogExpeditionFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/RoutesFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/RoutesFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/SummaryFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/SummaryFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/activity/SignedActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/activity/SignedActivity.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/TicketsFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/TicketsFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/ClientTicket.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/ClientTicket.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/viewmodels/DeliveryViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/viewmodels/DeliveryViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/CmrExpeditionPalletFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/CmrExpeditionPalletFragment.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/ExpeditionScanSorterFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanSorterFragment.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/historicoarticulo/fragment/HistoricoArticuloFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/historicoarticulo/fragment/HistoricoArticuloFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/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/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/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/packaging/fragment/ObservFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/ObservFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingCountFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingCountFragment.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/packaging/fragment/SupplierFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packingHolland/fragment/PackingHollandFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packingHolland/fragment/PackingHollandFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/adapter/ExpeditionListAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/adapter/ExpeditionListAdapter.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/adapter/ExpeditionPalletAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/adapter/ExpeditionPalletAdapter.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/adapter/ExpeditionScanAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/adapter/ExpeditionScanAdapter.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionPalletDetailFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/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/ExpeditionScanFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanFragment.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/PalletScanFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanFragment.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/res/layout/fragment_buffer.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer_loadexpedition.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer_loadexpedition.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_loadunload_delivery.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_loadunload_delivery.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_log_delivery.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_log_delivery.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_summary.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_summary.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expeditionscan_sorter.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expeditionscan_sorter.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_info_delivery.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_info_delivery.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_route.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_route.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_tickets.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_tickets.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_vehiclecontrol_user.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_vehiclecontrol_user.xml" 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/pasillero/adapter/PasillerosAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/adapter/PasillerosAdapter.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/photos/fragment/PhotosViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/photos/fragment/PhotosViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/precontrol/PreControladorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/precontrol/PreControladorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/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/EndSacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/InitPreSacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/InitPreSacadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/qr/QrFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/qr/QrFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reubication/fragment/ReubicationFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/reubication/fragment/ReubicationFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorFragmentNew.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorFragmentNew.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/showticket/ShowTicketFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/showticket/ShowTicketFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ticket/fragment/TicketAdvanceFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ticket/fragment/TicketAdvanceFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ticket/fragment/TicketViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ticket/fragment/TicketViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/transferencia/fragment/TransferenciaFragment.kt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/transferencia/fragment/TransferenciaViewModel.kt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragmentTEST.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragmentTEST.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/res/layout/activity_login.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/activity_login.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/activity_sign.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/activity_sign.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/buyers_fragment.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_ajustes.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_ajustes.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_automatic_add_item.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_automatic_add_item.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer_load.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer_load.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buscar_item_all.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_pallet_detail.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_pallet_detail.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_scan.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_scan.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_general_black.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_general_black.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_historico.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_historico.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_inventary_old.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_itemproposal.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_itemproposal.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_itemshelvingdayofsale.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_login.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_login.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_count.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_count.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_obs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_obs.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_summary.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_summary.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_qr.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_qr.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_sacador.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_sacador.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_sacador_associatesmarttag.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_shelving_parking.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_testing_print.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_testing_print.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_transferencia.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_ubicador.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_ubicador.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_web.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_web.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/reposicion_fragment.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/toolbar_fragment.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/toolbar_fragment.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -178,7 +247,7 @@
<component name="CodeInsightWorkspaceSettings">
<option name="optimizeImportsOnTheFly" value="true" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[21114523025303]" />
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[C:\Users\sergiodt\.android\avd\Pixel_6a_API_24.avd]" />
<component name="ExportToHTMLSettings">
<option name="OPEN_IN_BROWSER" value="true" />
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
@ -323,44 +392,44 @@
<option name="showLibraryContents" value="true" />
<option name="showMembers" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"ApkExportedModule": "Gestor_Almacén.app",
"ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
"KotlinFunctionFindUsagesOptions.isSearchForTextOccurrences": "true",
"PROJECT_TRUSTED_KEY": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.cidr.known.project.marker": "true",
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
"ScreenRecorder.SavePath": "C:\\Users\\sergiodt",
"android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED": "RecyclerView",
"android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-29/android/widget/TextView.java_SELECTED": "TextView",
"android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-33/android/view/View.java_SELECTED": "View",
"cidr.known.project.marker": "true",
"com.android.tools.idea.devicemanager.tab": "Physical",
"com.developerphil.adbidea.selecteddevices": "21114523025303",
"com.google.services.firebase.aqiPopupShown": "true",
"git-widget-placeholder": "dev",
"last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
"project.structure.last.edited": "Suggestions",
"project.structure.proportion": "0.17",
"project.structure.side.proportion": "0.2",
"run.code.analysis.last.selected.profile": "pProject Default",
"settings.editor.selected.configurable": "preferences.sourceCode.Kotlin"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;ApkExportedModule&quot;: &quot;Gestor_Almacén.app&quot;,
&quot;ExportApk.ApkPathForGestor_Almacén.app&quot;: &quot;C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app&quot;,
&quot;KotlinFunctionFindUsagesOptions.isSearchForTextOccurrences&quot;: &quot;true&quot;,
&quot;PROJECT_TRUSTED_KEY&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;ScreenRecorder.SavePath&quot;: &quot;C:\\Users\\sergiodt&quot;,
&quot;android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED&quot;: &quot;RecyclerView&quot;,
&quot;android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-29/android/widget/TextView.java_SELECTED&quot;: &quot;TextView&quot;,
&quot;android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-33/android/view/View.java_SELECTED&quot;: &quot;View&quot;,
&quot;cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;com.android.tools.idea.devicemanager.tab&quot;: &quot;Physical&quot;,
&quot;com.developerphil.adbidea.selecteddevices&quot;: &quot;21114523025303&quot;,
&quot;com.google.services.firebase.aqiPopupShown&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;dev&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable&quot;,
&quot;project.structure.last.edited&quot;: &quot;Suggestions&quot;,
&quot;project.structure.proportion&quot;: &quot;0.17&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
&quot;run.code.analysis.last.selected.profile&quot;: &quot;pProject Default&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.sourceCode.Kotlin&quot;
},
"keyToStringList": {
"ExportApk.BuildVariants": [
"betaRelease"
&quot;keyToStringList&quot;: {
&quot;ExportApk.BuildVariants&quot;: [
&quot;betaRelease&quot;
],
"com.android.tools.idea.sqlite.queryhistory": [
"select * from expedition where routeFk=182933;",
"select * from expedition;",
"select * from expeditionPending;",
"select * from expedition where id = 7753995;\n\n",
"\nselect * from expedition where id = 7753995;"
&quot;com.android.tools.idea.sqlite.queryhistory&quot;: [
&quot;select * from expedition where routeFk=182933;&quot;,
&quot;select * from expedition;&quot;,
&quot;select * from expeditionPending;&quot;,
&quot;select * from expedition where id = 7753995;\n\n&quot;,
&quot;\nselect * from expedition where id = 7753995;&quot;
]
}
}]]></component>
}</component>
<component name="PsdUISettings">
<option name="MODULE_TAB" value="Properties" />
<option name="LAST_EDITED_SIGNING_CONFIG" value="debug" />
@ -532,13 +601,6 @@
<option name="presentableId" value="Default" />
<updated>1618825571576</updated>
</task>
<task id="LOCAL-00181" summary="refs #5764 modify dayOfSale">
<created>1694769010620</created>
<option name="number" value="00181" />
<option name="presentableId" value="LOCAL-00181" />
<option name="project" value="LOCAL" />
<updated>1694769010621</updated>
</task>
<task id="LOCAL-00182" summary="refs #5134 Refactor silex→salix">
<created>1695100583023</created>
<option name="number" value="00182" />
@ -875,7 +937,14 @@
<option name="project" value="LOCAL" />
<updated>1704875974711</updated>
</task>
<option name="localTasksCounter" value="230" />
<task id="LOCAL-00230" summary="refs #5135 feat: refactor animation. HotFix phones cambiar a String(varchar en bbdd)">
<created>1705049073158</created>
<option name="number" value="00230" />
<option name="presentableId" value="LOCAL-00230" />
<option name="project" value="LOCAL" />
<updated>1705049073160</updated>
</task>
<option name="localTasksCounter" value="231" />
<servers />
</component>
<component name="Vcs.Log.History.Properties">
@ -976,7 +1045,6 @@
</component>
<component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="refs #5890" />
<MESSAGE value="refs #5802 ticketSetState" />
<MESSAGE value="version 23.40.1-hotFix OrderPrevia" />
<MESSAGE value="version 23.40.1-hotFix Ubicador" />
@ -1001,7 +1069,8 @@
<MESSAGE value="version 24.2Beta" />
<MESSAGE value="refs #6275 fix: filter getTickets y driver" />
<MESSAGE value="refs #5135 feat: refactor animation" />
<option name="LAST_COMMIT_MESSAGE" value="refs #5135 feat: refactor animation" />
<MESSAGE value="refs #5135 feat: refactor animation. HotFix phones cambiar a String(varchar en bbdd)" />
<option name="LAST_COMMIT_MESSAGE" value="refs #5135 feat: refactor animation. HotFix phones cambiar a String(varchar en bbdd)" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>

View File

@ -12,7 +12,9 @@ import es.verdnatura.domain.SalixService
import es.verdnatura.domain.VerdnaturaService
import es.verdnatura.domain.toast
import es.verdnatura.presentation.common.InteceptorListener
import es.verdnatura.presentation.common.LoginListener
import es.verdnatura.presentation.common.MainActivityListener
import es.verdnatura.presentation.common.SignListener
import es.verdnatura.presentation.view.component.CustomDialogMainActivity
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.loadKoinModules
@ -21,10 +23,20 @@ import org.koin.core.context.startKoin
class MobileApplication : Application(), InteceptorListener {
private lateinit var interceptoreListener: InteceptorListener
private var mainActivityListener: MainActivityListener? = null
private var loginListener: LoginListener? = null
private var signListener: SignListener? = null
fun setMainListener(listener: MainActivityListener) {
mainActivityListener = listener
}
fun setLoginListener(listener: LoginListener) {
loginListener = listener
}
fun setSignListener(listener: SignListener) {
signListener = listener
}
lateinit var silex: VerdnaturaService
lateinit var salix: SalixService
var userId: Int? = null
@ -90,11 +102,19 @@ class MobileApplication : Application(), InteceptorListener {
override fun onInterceptionResult(visibility: Int) {
if (mainActivityListener != null) {
handler.post {
val mainActivityListener = this.mainActivityListener
mainActivityListener?.onApplicationEventAnimation(visibility)
(this.mainActivityListener)?.onApplicationEventAnimation(visibility)
}
}
if (loginListener != null) {
handler.post {
(this.loginListener)?.onApplicationEventAnimation(visibility)
}
}
if (signListener != null) {
handler.post {
(this.signListener)?.onApplicationEventAnimation(visibility)
}
}
}
}

View File

@ -73,18 +73,6 @@ interface SalixService {
fun getCurrentUserData(
): Call<DataUserSalix>
/* @POST("chats/sendCheckingPresence")
fun sendChekingPresence(
@Body params: SalixMessageVO
):
Call<Boolean>
@POST("chats/send")
fun sendGroup(
@Body params: SalixGrupo
):
Call<Boolean>*/
@GET("collections/getSectors")
fun getSectorsSalix(
): Call<List<SectorItemVO>>

View File

@ -62,9 +62,6 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(
protected val ITEMPACKING = "itemPackingType"
protected val ITEMPACKINGFK = "itemPackingTypeFk"
//protected val VOZ = "voz"
//nuevo campo número carros ajustes y campos para guardar el buyerid y buyernickname
protected val BUYER = "buyernickname"
protected val BUYERID = "buyerid"
protected val WAGON = "wagon"

View File

@ -1,591 +0,0 @@
package es.verdnatura.presentation.base
import android.content.Context
import android.content.SharedPreferences
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import androidx.annotation.LayoutRes
import androidx.databinding.DataBindingUtil
import androidx.databinding.ViewDataBinding
import androidx.fragment.app.Fragment
import androidx.preference.PreferenceManager
import androidx.room.Room
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import es.verdnatura.MobileApplication
import es.verdnatura.R
import es.verdnatura.databinding.ToolbarFragmentBinding
import es.verdnatura.db.DeliveryDatabase
import es.verdnatura.domain.ConstAndValues.SECTORFKDEFAULT
import es.verdnatura.domain.ConstAndValues.WAREHOUSEFKDEFAULT
import es.verdnatura.presentation.view.feature.login.model.OperatorSalix
import es.verdnatura.presentation.view.feature.login.model.WorkForms
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import org.json.JSONObject
import org.koin.androidx.viewmodel.ext.android.viewModel
import java.util.*
import kotlin.collections.Map.*
import kotlin.reflect.KClass
abstract class BaseFragmentSalix<T : ViewDataBinding, V : BaseViewModel, W : BaseViewModel>(
viewModelClass: KClass<V>,
viewModelClass2: KClass<W>
) : Fragment() {
protected lateinit var mobileApplication: MobileApplication
protected val TAG = "VERDNATURA::"
protected val PREFS_USER = "es.verdnatura.user.prefs"
protected val PREFS_SERVER = "es.verdnatura.server.prefs"
protected val USERFK = "userFk"
protected val USER = "user"
protected val PASSWORD = "password"
protected val TOKEN = "token"
protected val TTL = "ttl"
protected val TOKENCREATED = "tokenCreated"
protected val SECTORDESCRIP = "sectordescrip"
protected val SECTORFK = "sectorFk"
protected val NUMBEROFWAGONS = "operatorNumberOfWagons"
protected val PRINTERNAME = "printername"
protected val PRINTERFK = "printerFk"
protected val WAREHOUSEFK = "warehouseFk"
protected val REMEMBER = "recordar"
protected val ANDROID_ID = "ANDROID_ID"
protected val DEVICENAME = "devicename"
protected val TRAINNAME = "trainName"
protected val TRAINFK = "trainFk"
protected val WORKFORMSELECTED = "workFormSelected"
protected val SUPPLIERID = "SUPPLIERID"
protected val ITEMPACKING = "itemPackingType"
protected val ITEMPACKINGFK = "itemPackingTypeFk"
protected val BUYER = "buyernickname"
protected val BUYERID = "buyerid"
protected val WAGON = "wagon"
protected val TAGSTYPE = "tagstype"
protected val WAREHOUSEFK_DEFAULT = 60
protected val DATENOVEHICLE = "DATENOVEHICLE"
protected val DEPARTMENTMISTAKE = "DEPARTMENTMISTAKE"
protected val DEPARTMENTMISTAKEID = "DEPARTMENTMISTAKEID"
protected val viewModel: V by viewModel(viewModelClass)
protected val viewModelSalix: W by viewModel(viewModelClass2)
protected lateinit var binding: T
protected lateinit var ma: MainActivity
protected lateinit var layoutAnimation:LinearLayout
override fun onAttach(context: Context) {
super.onAttach(context)
if ((requireActivity().componentName).toString().contains("MainActivity")) {
ma = activity as MainActivity
}
mobileApplication = requireActivity().application as MobileApplication
}
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? = inflater.inflate(getLayoutId(), container, false)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
initDataBinding()
observeViewModel()
init()
}
@LayoutRes
abstract fun getLayoutId(): Int
open fun init() {}
open fun observeViewModel() {
}
open fun stopAnimation(){
if (::layoutAnimation.isInitialized)
layoutAnimation.visibility = View.GONE
}
private fun initDataBinding() {
binding = DataBindingUtil.bind<T>(requireView())!!
}
fun callBack(function:Unit, splashProgress: LinearLayout = layoutAnimation) {
splashProgress.visibility = View.VISIBLE
function
stopAnimation()
}
fun textScanned_filterDouble(textScanned: String): String {
if (textScanned.length > 13) {
val size = textScanned.length
if (textScanned.substring((size / 2), size) == textScanned.substring(0, size / 2)
) {
return textScanned.substring(0, size / 2)
}
}
return textScanned
}
fun getTooltip(image: Int): String {
return when (image) {
//itemCard
R.drawable.ic_autorenew_black_24dp -> {
getString(R.string.reloadItemData)
}
R.drawable.ic_history_black_24dp -> getString(R.string.showHistoricalItem)
//presacador
R.drawable.ic_local_parking_black_24dp -> getString(R.string.allowParking)
//collection
R.drawable.ic_print_black_24dp -> getString(R.string.printTicket)
R.drawable.ic_playlist_add_black_24dp -> getString(R.string.addItem)
R.drawable.ic_worker -> getString(R.string.showFacePicker)
R.drawable.phone_call -> getString(R.string.callPicker)
R.drawable.car -> getString(R.string.allowSelectVehicle)
R.drawable.car_off -> getString(R.string.allowTakeoffVehicle)
//REPETIDO:R.drawable.ic_history_black_24dp->"Realiza llamada al sacador"
//sacador
R.drawable.ic_add_black_24dp -> getString(R.string.newCollection)
//REPETIDO: R.drawable.car->"Permite coger vehículo"
//ubicador:
//REPETIDO: R.drawable.ic_add_black_24dp->"Genera colección para sacar"
//REPETIDO: ic_autorenew_black_24dp
//historico articulo
R.drawable.ic_transaction -> getString(R.string.showFilter)
R.drawable.alpha_f_circle_outline -> getString(R.string.showFaults)
R.drawable.alpha_b_circle_outline -> getString(R.string.showTrash)
R.drawable.filter_outline -> getString(R.string.filterFlower)
R.drawable.ic_mode_edit_black_24dp -> getString(R.string.allowChangeShelving)
R.drawable.ic_delete_forever_black_24dp -> getString(R.string.deleteAllitems)
R.drawable.ic_flash_auto_black_24dp -> getString(R.string.allowAutomaticAddItem)
R.drawable.ic_logo_salix -> getString(R.string.accessSalix)
R.drawable.ic_eye_ui -> getString(R.string.icViewCollection)
R.drawable.ic_collection -> getString(R.string.icViewCollection)
R.drawable.ic_ubicator_check -> getString(R.string.checkerUbication)
R.drawable.ic_delivery_truck -> getString(R.string.loadRoute)
R.drawable.ic_confirm -> getString(R.string.confirmDescription)
R.drawable.camion -> getString(R.string.openLoadingConsignee)
R.drawable.exit -> getString(R.string.exitScreen)
R.drawable.ic_image_upload -> getString(R.string.messageUpload)
R.drawable.expedition_find -> getString(R.string.showLogExpedition)
R.drawable.ic_info_refresh -> getString(R.string.udpateRoutes)
R.drawable.ic_info_delivery -> getString(R.string.info)
R.drawable.ic_filter_inventory -> getString(R.string.filterNoReview)
R.drawable.ic_remove_checks -> getString(R.string.resetReviewItems)
R.drawable.ic_eye_inventory -> getString(R.string.inventoryShowParking)
R.drawable.ic_sort -> getString(R.string.sortRouteSalix)
R.drawable.ic_sign_ticket -> getString(R.string.signed)
R.drawable.ic_send -> getString(R.string.sendDriverRoute)
else -> {
""
}
}
}
fun hideBackButton(tool: ToolbarFragmentBinding) {
tool.backButton.visibility = View.INVISIBLE
}
private fun getDefaults(key: String?, context: Context?): String? {
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
return preferences.getString(key, null)
}
fun getDataInt(name: String): Int {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
return when (name) {
SECTORFK -> prefs.getInt(name, SECTORFKDEFAULT)
WAREHOUSEFK -> prefs.getInt(name, WAREHOUSEFKDEFAULT)
PRINTERFK -> prefs.getInt(name, 0)
USERFK -> prefs.getInt(USERFK, 0)
SUPPLIERID -> prefs.getInt(SUPPLIERID, 0)
else -> {
0
}
}
}
fun getData(name: String): String {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
return when (name) {
TOKEN -> prefs.getString(name, "").toString()
ANDROID_ID -> prefs.getString(name, "0").toString()
USERFK -> prefs.getString(USERFK, "").toString() //el id
USER -> prefs.getString(USER, "").toString()
PASSWORD -> prefs.getString(PASSWORD, "").toString()
SECTORFK -> prefs.getInt(name, SECTORFKDEFAULT).toString()
WAREHOUSEFK -> prefs.getInt(name, WAREHOUSEFKDEFAULT).toString()
WAGON -> prefs.getInt(name, 2).toString()
TAGSTYPE -> prefs.getString(name, getString(R.string.stickers)).toString()
SECTORDESCRIP -> prefs.getString(name, getString(R.string.Sinsector)).toString()
BUYER -> prefs.getString(name, "").toString()
BUYERID -> prefs.getString(name, "").toString()
DATENOVEHICLE -> prefs.getString(name, "0").toString()
DEPARTMENTMISTAKE -> 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()
TRAINFK -> prefs.getString(name, "").toString()
TRAINNAME -> prefs.getString(name, "").toString()
ITEMPACKING -> prefs.getString(name, "").toString()
ITEMPACKINGFK -> prefs.getString(name, "").toString()
WORKFORMSELECTED -> prefs.getString(name, "Producción").toString()
"SUPPLIERNAME" -> prefs.getString(name, "").toString()
"SUPPLIERID" -> prefs.getInt(name, 0).toString()
"ENTRYTYPE" -> prefs.getString(name, "").toString()
"ENTRYNUMBERIMAGES" -> prefs.getString(name, "0").toString()
"ENTRYOBSERVATIONS" -> prefs.getString(name, "").toString()
"SERIALNUMBER" -> prefs.getString(name, "").toString()
"base_url" -> {
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
preferences.getString(getString(R.string.baseurl), "").toString()
}
"base_urlSalix" -> {
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
var serverSalix =
preferences.getString(getString(R.string.base_urlSalix), "").toString()
if (serverSalix.isNullOrEmpty()) {
serverSalix = "https://salix.verdnatura.es"
}
return serverSalix
}
else -> {
prefs.getString(name, "").toString()
}
}
}
fun removeSector() {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val editor = prefs.edit()
editor.remove(SECTORFK).commit()
editor.remove(SECTORDESCRIP).commit()
editor.remove(WAREHOUSEFK).commit()
}
fun setDefaults(key: String?, value: String?, context: Context?) {
val preferences: SharedPreferences = PreferenceManager.getDefaultSharedPreferences(context)
val editor = preferences.edit()
editor.putString(key, value)
editor.commit()
}
fun removePrinter() {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val editor = prefs.edit()
editor.remove(PRINTERFK).commit()
editor.remove(PRINTERNAME).commit()
}
fun saveWorkForm(workForm: WorkForms) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_SERVER, 0)
val editor = prefs.edit()
val gson = Gson()
val json = gson.toJson(workForm)
editor.putString(workForm.name, json)
editor.commit()
saveData("base_url", workForm.urlSilex)
saveData("base_urlSalix", workForm.urlSalix)
}
fun deleteWorkForm(nameWorkForm: String) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_SERVER, 0)
val editor = prefs.edit()
if (nameWorkForm == "all") {
editor.clear().apply()
} else {
editor.remove(nameWorkForm).commit()
}
}
fun getWorkForm(): List<WorkForms> {
val listForms: ArrayList<WorkForms> = ArrayList()
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_SERVER, 0)
val editor = prefs.edit()
val keys: Map<String, *> = prefs.all
for (Map in keys) {
val json2 = JSONObject(Map.value.toString())
listForms.add(
WorkForms(
Map.key,
json2.get("urlSilex").toString(),
json2.get("urlSalix").toString(),
json2.get("isShowDelete").toString().toBoolean(),
json2.get("created") as Long
)
)
}
editor.commit()
if (listForms.isEmpty()) {
createWorksDefault()
}
return listForms.sortedBy { it.created }
}
fun createWorksDefault() {
saveWorkForm(
WorkForms(
"Producción",
"https://app.verdnatura.es",
"https://salix.verdnatura.es"
)
)
saveWorkForm(
WorkForms(
"Test",
"https://test-app.verdnatura.es",
urlSalix = "https://test-salix.verdnatura.es"
)
)
val working_in_test = true
if (working_in_test) {
saveWorkForm(
WorkForms(
"TestLocalhost",
"http://10.1.4.42:9000",
urlSalix = "https://test-salix.verdnatura.es"
)
)
saveWorkForm(
WorkForms(
"TestHome",
"http://192.168.1.132:9000",
urlSalix = "https://test-salix.verdnatura.es"
)
)
saveWorkForm(
WorkForms(
"TestLOCAL",
"http://10.1.4.42:9000",
urlSalix = "http://10.1.4.42:3000"
)
)
saveWorkForm(
WorkForms(
"TestLOCALHOME",
"http://192.168.1.132:9000",
urlSalix = "http://192.168.1.132:3000"
)
)
} else {
deleteWorkForm("all")
}
saveWorkForm(
WorkForms(
"Añadir...",
"",
"",
created = Calendar.getInstance().timeInMillis + Calendar.getInstance().timeInMillis
)
)
}
fun saveData(name: String, value: Any) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val editor = prefs.edit()
when (name) {
"base_url" -> {
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
val editorPref = preferences.edit()
editorPref.putString("base_url", value.toString())
editorPref.commit()
}
"base_urlSalix" -> {
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
val editorPref = preferences.edit()
editorPref.putString("base_urlSalix", value.toString())
editorPref.commit()
}
DEPARTMENTMISTAKEID -> {
editor.putInt(name, value as Int)
}
"SUPPLIERID" -> {
editor.putString(name, value.toString())
}
else -> {
editor.putString(name, value.toString())
}
}
editor.commit()
}
fun saveDataInt(name: String, value: Int) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val editor = prefs.edit()
when (name) {
name -> editor.putInt(name, value)
}
editor.apply()
}
fun saveDataOperator(operator: OperatorSalix) {
if (operator.sector == null) {
removeSector()
} else {
saveDataInt(SECTORFK, operator.sector.id)
saveData(SECTORDESCRIP, operator.sector.description)
saveDataInt(WAREHOUSEFK, operator.sector.warehouseFk)
}
if (operator.printer == null) {
removePrinter()
} else {
saveDataInt(PRINTERFK, operator.printer.id)
saveData(PRINTERNAME, operator.printer.name)
}
if (operator.train != null) {
saveData(TRAINNAME, operator.train.name)
}
saveDataInt(NUMBEROFWAGONS, operator.numberOfWagons)
}
fun saveDataLong(name: String, value: Long) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val editor = prefs.edit()
when (name) {
name -> editor.putLong(name, value)
}
editor.apply()
}
fun saveWorkingForms(list: ArrayList<String>) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val editor = prefs.edit()
editor.putString("workingForms", list.toString())
editor.apply()
}
fun getWorkingForms(): Array<String> {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val jsonStr: String? = prefs.getString("workingForms", null)
val gson = Gson()
val lista: Array<String> = gson.fromJson(jsonStr, Array<String>::class.java)
return lista
}
fun saveBuyer(buyernickname: String) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val editor = prefs.edit()
editor.putString(BUYER, buyernickname)
editor.apply()
}
fun saveBuyerId(buyerid: String) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val editor = prefs.edit()
editor.putString(BUYERID, buyerid)
editor.apply()
}
fun getIMEI(): String {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER, 0)
val imei = prefs.getString("IMEI", "0")
return imei.toString()
}
fun getMessageFromJSON(json: String): String {
val gson = Gson()
var message = ""
// val mapType = object : TypeToken<Map<String, Any>>() {}.type
val tutorialMap: Map<String, Any> =
gson.fromJson(json, object : TypeToken<Map<String, Any>>() {}.type)
tutorialMap.forEach {
if (it.key.equals("Message")) {
message = it.value.toString()
}
}
return message
}
fun getListFromJSON(json: String): List<String> {
val gson = Gson()
val list = mutableListOf<String>()
// val mapType = object : TypeToken<Map<String, Any>>() {}.type
val tutorialMap: Map<String, Any> =
gson.fromJson(json, object : TypeToken<Map<String, Any>>() {}.type)
tutorialMap.forEach {
list.add(it.key + ":" + it.value)
}
return list
}
}
fun databaseNew(myContext: Context): DeliveryDatabase {
val db = Room.databaseBuilder(
myContext,
DeliveryDatabase::class.java, "expediciones.db"
).build()
return db
}

View File

@ -30,16 +30,18 @@ interface OnOptionsSelectedListener {
fun onOptionsItemSelected(item: Drawable)
}
interface OnPasillerosItemClickListener {
fun onPasillerosItemClickListener(item: PasillerosItemVO, entryPoint: String,param:Any? =null)
fun onPasillerosItemClickListener(
item: PasillerosItemVO,
entryPoint: String,
param: Any? = null
)
}
interface onMistakeWorkerClickListener {
fun onMistakeWorkerClickListener(item: WorkerFromMistake)
}
interface hideBottomNavigation {
fun hideBottomNavigation(entryPoint: String)
}
@ -48,7 +50,6 @@ interface OnAjustesItemClickListener {
fun onAjustesItemClickListener(item: AjustesItemVO)
}
interface OnItemCardRowClickListener {
fun onItemCardRowClickListener(item: ItemCardRowVO)
}
@ -175,17 +176,19 @@ interface OnQuantityClickSaleListener {
interface onPackingClickListener {
fun onPackingClick(sale: SaleVO)
}
interface OnPackingClickSaleListener {
fun onPackingClick(sale: Sale)
}
interface OnSaleClickListener {
fun onSaleClick(sale: SaleVO)
}
interface OnSaleClickSaleListener {
fun onSaleClick(sale: Sale)
}
interface OnReubicationClickListener {
fun onReubicationClick(reubication: Reubication)
}
@ -197,6 +200,7 @@ interface OnMistakeClickListener {
interface OnTicketClickListener {
fun onTicketClickListener(sale: SaleVO)
}
interface OnTicketClickSaleListener {
fun onTicketClickListener(sale: Sale)
}
@ -216,6 +220,7 @@ interface onVehicleSelected {
interface OnClickDynamic {
fun onClickDynamic(addressFK: Int)
}
interface InteceptorListener {
fun onInterceptionResult(visibility: Int)
}
@ -223,3 +228,11 @@ interface InteceptorListener {
interface MainActivityListener {
fun onApplicationEventAnimation(visibility: Int)
}
interface LoginListener {
fun onApplicationEventAnimation(visibility: Int)
}
interface SignListener {
fun onApplicationEventAnimation(visibility: Int)
}

View File

@ -12,13 +12,12 @@ import android.os.Bundle
import android.os.Parcel
import android.os.ParcelFileDescriptor
import android.os.ResultReceiver
import android.util.Log
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.Toast
import androidx.lifecycle.Observer
import es.verdnatura.R
import es.verdnatura.databinding.FragmentTestingPrintBinding
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.qr.QrFragmentViewModel
@ -46,12 +45,9 @@ class testPrint(
override fun init() {
binding.splashProgress.visibility = View.GONE
customDialog = CustomDialog(requireContext())
setToolbar()
setEvents()
val i = Intent()
i.setClassName("verdnatura.es.repartoverdnatura", "verdnatura.es.repartoverdnatura.MainActivity")
i.putExtra("token",getData(TOKEN))
@ -110,10 +106,6 @@ class testPrint(
goBack = false
if (!binding.scanInput.text.isNullOrEmpty()) {
binding.splashProgress.visibility = View.VISIBLE
/* viewModel.qr_getCall(
binding.scanInput.text.toString()
)*/
itemscaned = binding.scanInput.text.toString()
}
@ -313,9 +305,9 @@ class testPrint(
// Convert template ZPL string to a UTF-8 encoded byte array, which will be sent as an extra with the intent
//templateBytes = templateData.getBytes("UTF-8");
templateBytes = templateData.toByteArray()
} catch (e: UnsupportedEncodingException) {
} catch (ex: UnsupportedEncodingException) {
// Handle exception
Log.d("VERDNATURA::","Error"+e.message)
ex.toast(requireContext())
}
val intent = Intent()
intent.component = ComponentName(
@ -402,7 +394,6 @@ class testPrint(
"com.zebra.printconnect",
"com.zebra.printconnect.print.GetPrinterStatusService"
)
Log.d("VERDNATURA::","Entrando en prinStatus")
intent.putExtra(
"com.zebra.printconnect.PrintService.RESULT_RECEIVER",
buildIPCSafeReceiver(object : ResultReceiver(null) {
@ -411,7 +402,6 @@ class testPrint(
super.onReceiveResult(resultCode, resultData)
if (resultCode == 0) {
Log.d("VERDNATURA::","Result 0")
// Result code 0 indicates success
val printerStatusMap =
resultData!!.getSerializable("PrinterStatusMap") as HashMap<String, String>?
@ -419,7 +409,6 @@ class testPrint(
} else {
// Handle unsuccessful print
// Error message (null on successful print)
Log.d("VERDNATURA::","Result <>0")
val errorMessage =
resultData?.getString("com.zebra.printconnect.PrintService.ERROR_MESSAGE")
Toast.makeText(context, errorMessage, Toast.LENGTH_LONG).show()
@ -477,7 +466,6 @@ class testPrint(
with(viewModel) {
qrresponse.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage + " " + itemscaned, true, false)

View File

@ -7,7 +7,6 @@ import android.content.Context.CLIPBOARD_SERVICE
import android.content.SharedPreferences
import android.os.Bundle
import android.view.View
import android.view.View.VISIBLE
import androidx.appcompat.widget.TooltipCompat.setTooltipText
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.MobileApplication
@ -64,8 +63,8 @@ class AjustesFragment :
override fun init() {
binding.mainToolbar.toolbarTitle.text = getString(R.string.settings)
binding.splashProgress.visibility = VISIBLE
hideBackButton(binding.mainToolbar)
viewModel.worker_isF11Allowed()
binding.userText.text = mobileApplication.userName
@ -78,11 +77,9 @@ class AjustesFragment :
// Tarea 4815
binding.serialNumber.text = mobileApplication.serialNumber
binding.txtserver.setText(getData(getString(R.string.baseurl)))
super.init()
// binding.txtserver.setText(getData(getString(R.string.baseurl)))
setEvents()
super.init()
}
@ -116,7 +113,6 @@ class AjustesFragment :
if (item.action) {
if (item.id == 0) {
binding.splashProgress.visibility = VISIBLE
viewModel.getSectorsSalix()
} else if (item.id == 5) {
requireActivity().onBackPressed()
@ -149,7 +145,6 @@ class AjustesFragment :
)
} else if (item.id == 6) {
binding.splashProgress.visibility = VISIBLE
viewModel.train_get()
} else if (item.id == 7) {
viewModel.getItemPackingTypeSalix()
@ -160,7 +155,6 @@ class AjustesFragment :
})
operatorGetItemPackingType.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, true)
@ -173,7 +167,6 @@ class AjustesFragment :
workerAllowedResponse.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, true)
@ -198,7 +191,6 @@ class AjustesFragment :
}
actionUpdate.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
ma.messageWithSound(
if (it.isError) it.errorMessage else {
@ -206,7 +198,6 @@ class AjustesFragment :
}, it.isError, false
)
binding.splashProgress.visibility = VISIBLE
messagePrinter =
getString(R.string.Selecccionaimpresoara) + "\n" + getString(R.string.printerRemoved)
viewModel.printer_get()
@ -214,15 +205,13 @@ class AjustesFragment :
}
loadUpdatePacking.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.GONE
}
}
actionUpdatePacking.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
ma.messageWithSound(
if (it.isError) it.errorMessage else {
getString(R.string.itemUpdated)
@ -230,20 +219,12 @@ class AjustesFragment :
)
}
isLoadingProgress.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = it
}
binding.ajustessItems.adapter = ajustesAdapter
binding.ajustessItems.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
loadSectorList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.INVISIBLE
if (it.list.isNotEmpty() && it.list.get(0).isError) {
customDialog.setTitle(getString(R.string.error))
.setDescription(it.list.get(0).errorMessage)
@ -276,7 +257,6 @@ class AjustesFragment :
}
loadItemPackingList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.INVISIBLE
if (it.list.isNotEmpty() && it.list.get(0).isError) {
customDialog.setTitle(getString(R.string.error))
.setDescription(it.list.get(0).errorMessage)
@ -307,7 +287,6 @@ class AjustesFragment :
}
loadPrintersList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.INVISIBLE
if (it.list.isNotEmpty() && it.list.get(0).isError) {
customDialog.setTitle(getString(R.string.error))
.setDescription(it.list.get(0).errorMessage)
@ -338,7 +317,7 @@ class AjustesFragment :
}
loadTrainList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty() && it.list.get(0).isError) {
customDialog.setTitle(getString(R.string.error))
.setDescription(it.list.get(0).errorMessage)
@ -385,6 +364,7 @@ class AjustesFragment :
actionIsAllowed = actionIsAllowed
)
binding.splashProgress.visibility = View.GONE
}
private fun showDialogPrinters(array: Array<String>) {
@ -436,7 +416,6 @@ class AjustesFragment :
editor.apply()
viewModel.ajustesitem[3].selected = it.name
binding.splashProgress.visibility = VISIBLE
viewModel.operatorUpdateTrain(
workerId = mobileApplication.userId!!,
trainFk = it.id!!

View File

@ -1,8 +1,6 @@
package es.verdnatura.presentation.view.feature.ajustes.fragment
import android.content.Context
import android.view.View.GONE
import android.view.View.VISIBLE
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
@ -10,7 +8,6 @@ import com.google.gson.JsonObject
import es.verdnatura.MobileApplication
import es.verdnatura.R
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
@ -89,6 +86,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
val loadTrainList = Transformations.map(_trainList) { Event(it) }
val loadUpdatePacking = Transformations.map(_actionUpdatePackingTicket) { Event(it) }
/*
private val _isLoadingProgress by lazy { MutableLiveData<Int>() }
val isLoadingProgress: LiveData<Int>
get() = _isLoadingProgress
@ -96,6 +94,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
fun ProgressLoading(visibility: Int) {
_isLoadingProgress.value = visibility
}
*/
fun inititializeDefaultAjusts(
sectorDescrip: String,
@ -233,7 +232,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
}
fun getSectorsSalix() {
salix.getSectorsSalix().enqueue(object : SilexCallback<List<SectorItemVO>>(context) {
salix.getSectorsSalix().enqueue(object : SalixCallback<List<SectorItemVO>>(context) {
override fun onError(t: Throwable) {
val listError: ArrayList<SectorItemVO> = ArrayList()
@ -263,7 +262,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
fun printer_get() {
//Tarea 6276
//salix.getprinters().enqueue(object : SalixCallback<List<Printers>>(context) {
silex.printer_get().enqueue(object : SilexCallback<List<Printers>>(context) {
silex.printer_get().enqueue(object : SalixCallback<List<Printers>>(context) {
override fun onSuccess(response: Response<List<Printers>>) {
if (response.body() != null) {
_printerList.value = response.body()?.let { PrintersList(it) }
@ -290,7 +289,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
}
fun train_get() {
salix.getTrain().enqueue(object : SilexCallback<List<Train>>(context) {
salix.getTrain().enqueue(object : SalixCallback<List<Train>>(context) {
override fun onSuccess(response: Response<List<Train>>) {
_trainList.value = response.body()?.let { TrainList(it) }
}
@ -307,7 +306,7 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
fun operator_updateItemPackingType(itemPackingTypeFk: String) {
silex.operator_updateItemPackingType(itemPackingTypeFk)
.enqueue(object : SilexCallback<Unit>(context) {
.enqueue(object : SalixCallback<Unit>(context) {
override fun onError(t: Throwable) {
_actionUpdatePacking.value = ResponseItemVO(
@ -330,83 +329,6 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
})
}
/* fun operator_getNumberOfWagons() {
silex.operator_getNumberOfWagons()
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_operatorGetNumberOfWagons.value = ResponseItemNumber(
null,
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
if (response.body() != null)
_operatorGetNumberOfWagons.value =
ResponseItemNumber(
if (response.body() is Number) {
(response.body() as Double).roundToInt()
} else {
0
}, isError = false
)
}
})
}
*/
/* fun operator_getTrain() {
silex.operator_getTrain()
.enqueue(object : SilexCallback<String?>(context) {
override fun onError(t: Throwable) {
_operatorGetTrainResponse.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<String?>) {
_operatorGetTrainResponse.value =
ResponseItemVO(
if (response.body().toString() == "false") "" else {
response.body().toString()
}, false
)
}
})
}*/
/* fun operator_getItemPackingType() {
silex.operator_getItemPackingType()
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_operatorGetItemPackingType.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
_operatorGetItemPackingType.value =
ResponseItemVO(
if (response.body().toString() == "false") "" else {
response.body().toString()
}, false
)
}
})
}*/
fun worker_isF11Allowed() {
salix.worker_isF11Allowed("""{"where":{"id":${(context as MobileApplication).userId}},"fields":{"isF11Allowed":true}}""")
.enqueue(object : SalixCallback<JsonObject>(context) {
@ -417,22 +339,13 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
)
}
override fun onError(t: Throwable) {
_workerAllowedResponse.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
})
}
fun worker_updateOperatorSalix(entity: String, workerFk: Int, sectorFk: Int?, labelerFk: Int?) {
ProgressLoading(VISIBLE)
salix.update_operator(id = workerFk, Operator(sectorFk, labelerFk))
.enqueue(object : SilexCallback<Unit>(context) {
.enqueue(object : SalixCallback<Unit>(context) {
override fun onError(t: Throwable) {
ProgressLoading(GONE)
_actionUpdate.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
@ -441,7 +354,6 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
}
override fun onSuccess(response: Response<Unit>) {
ProgressLoading(GONE)
if (entity == "sector") {
_actionUpdate.value = ResponseItemVO(
response = response.message(),
@ -458,16 +370,14 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
}
fun operatorUpdateTrain(workerId: Int, trainFk: Int) {
ProgressLoading(VISIBLE)
salix.update_operator(id = workerId, params = hashMapOf("trainFk" to trainFk))
.enqueue(object : SalixCallback<Unit>(context) {
override fun onSuccess(response: Response<Unit>) {
ProgressLoading(GONE)
super.onSuccess(response)
}
override fun onError(t: Throwable) {
ProgressLoading(GONE)
throw t
}

View File

@ -240,7 +240,6 @@ class ItemCardFragment(
binding.splashProgress.visibility = GONE
getItemCard(itemInfoG!!.id.toString())
})
addressLosesList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
@ -372,7 +371,6 @@ class ItemCardFragment(
action = "updatePacking"
)
)
//sergio: quitar de back cuando ya tengan la app actualizada todos
listItemsRow.add(
ItemCardRowVO(
title = getString(R.string.stems),
@ -560,63 +558,63 @@ class ItemCardFragment(
private fun prepareItemStockUpdate2(itemB: ItemCardRowVO, value: Int) {
//Tarea 5652 , quitar código cuando está asignada tarea
val test = true
if (test) {
// binding.splashProgress.visibility = View.VISIBLE
viewModel.getAddress()
quantityToDiscard = value
/* val test = true
if (test) {*/
} else {
try {
viewModel.getAddress()
quantityToDiscard = value
if (itemB.action == "itemStockUpdateRemove") {
/* } else {
try {
customDialogTwo.setTitle(itemB.title!!)
.setDescription(getString(R.string.deleteStock))
.setOkButton(getString(R.string.fault)) {
viewModel.itemTrash(
itemFk = itemInfoG!!.id,
warehouseFk = warehouseFk!!,
newValue = value,
isTrash = false
if (itemB.action == "itemStockUpdateRemove") {
)
showProgress()
customDialogTwo.dismiss()
customDialogTwo.setTitle(itemB.title!!)
.setDescription(getString(R.string.deleteStock))
.setOkButton(getString(R.string.fault)) {
viewModel.itemTrash(
itemFk = itemInfoG!!.id,
warehouseFk = warehouseFk!!,
newValue = value,
isTrash = false
}.setOkButtonTwo(getString(R.string.trash)) {
viewModel.itemTrash(
itemFk = itemInfoG!!.id,
warehouseFk = warehouseFk!!,
newValue = value,
isTrash = true
)
)
showProgress()
customDialogTwo.dismiss()
showProgress()
customDialogTwo.dismiss()
}.setOkButtonTwo(getString(R.string.trash)) {
viewModel.itemTrash(
itemFk = itemInfoG!!.id,
warehouseFk = warehouseFk!!,
newValue = value,
isTrash = true
)
}.setKoButton(getString(R.string.cancel)) {
showProgress()
customDialogTwo.dismiss()
customDialogTwo.dismiss()
}.show()
}.setKoButton(getString(R.string.cancel)) {
} else {
customDialogTwo.dismiss()
}.show()
showProgress()
viewModel.itemTrash(
itemFk = itemInfoG!!.id,
warehouseFk = warehouseFk!!,
newValue = (value * -1),
isTrash = false
} else {
)
}
} catch (e: Exception) {
// binding.itemcardLayout.visibility = View.GONE
ma.messageWithSound(getString(R.string.errorNotNumber), true, true)
showProgress()
viewModel.itemTrash(
itemFk = itemInfoG!!.id,
warehouseFk = warehouseFk!!,
newValue = (value * -1),
isTrash = false
}
}
)
}
} catch (e: Exception) {
// binding.itemcardLayout.visibility = View.GONE
ma.messageWithSound(getString(R.string.errorNotNumber), true, true)
}
}*/
}
private fun showDialogTrashFault(listAddress: List<AddressLoses>) {

View File

@ -98,17 +98,6 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
ItemProposalList(it)
}
}
override fun onError(t: Throwable) {
val listError: ArrayList<ItemProposal> = ArrayList()
listError.add(
ItemProposal(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
)
_itemProposallist.value = ItemProposalList(listError)
}
})
}
@ -141,10 +130,12 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
addressFk: Int?,
) {
1
salix.setVisibleDiscard(
ItemDiscardSalixShortage(itemFk, warehouseFk, quantity, addressFk)
)
.enqueue(object : SilexCallback<Any>(context) {
.enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
@ -193,18 +184,13 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
fun updatePackingTypeSalix(itemFk: Int, itemPackingTypeFk: String) {
salix.updateItem(itemFk, hashMapOf("itemPackingTypeFk" to itemPackingTypeFk))
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
.enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
}
})
}
@ -267,13 +253,7 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
salix.barcodes_edit(
ItemBarCodeSalix(itemFk, barCodeValue)
)
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
.enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value =

View File

@ -58,7 +58,6 @@ class ItemProposalFragment(
}
setToolBar()
setEvents()
binding.splashProgress.visibility = View.VISIBLE
viewModel.itemGetSimilar(
itemFk,
getDataInt(WAREHOUSEFK),
@ -84,7 +83,6 @@ class ItemProposalFragment(
override fun onOptionsItemSelected(item: Drawable) {
when (item) {
iconFilter.drawable -> {
binding.splashProgress.visibility = View.VISIBLE
iconFilter.drawable.setTint(
ContextCompat.getColor(
context!!,
@ -119,9 +117,7 @@ class ItemProposalFragment(
with(viewModel) {
itemProposallist.observe(viewLifecycleOwner) { it ->
binding.splashProgress.visibility = View.INVISIBLE
if (hideLoad) {
binding.splashProgress.visibility = View.GONE
} else {
hideLoad = true
}

View File

@ -12,8 +12,6 @@ import es.verdnatura.presentation.common.ResponseItemVO
import retrofit2.Response
class BufferFragmentViewModel(val context: Context) : BaseViewModel(context) {
/* private val GetPaletizadoresUserCase: GetPaletizadoresUserCase =
GetPaletizadoresUserCase(context)*/
private val _itembuffertype by lazy { MutableLiveData<ResponseItemVO>() }
val itembuffertype: LiveData<ResponseItemVO>

View File

@ -37,7 +37,6 @@ class ClaimFragment(
override fun init() {
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
binding.splashProgress.visibility = GONE
setEvents()
setToolBar()
setAdapter()

View File

@ -13,8 +13,6 @@ import retrofit2.Response
class ClaimViewModel(val context: Context) : BaseViewModel(context) {
//private val GetClaimUserCase: GetClaimUserCase = GetClaimUserCase(context)
private val _responseadd by lazy { MutableLiveData<ResponseItemVO>() }
val responseadd: LiveData<ResponseItemVO>
get() = _responseadd

View File

@ -155,7 +155,6 @@ class SaleAdapter(
}
//3969 Refactor collectionColors
paintTicketcolor(sale.rgb, itemTicketColor)
//paintTicketcolorOld(sale.level, itemTicketColor)
val backgroundDrawableSac: Drawable = binding.itemArticleRowSemaforoSac.background
val backgroundDrawablePre: Drawable = binding.itemArticleRowSemaforoPre.background
@ -165,7 +164,6 @@ class SaleAdapter(
layoutError.visibility = View.GONE
}
//SEMAFORO
if (sale.isPreviousPrepared == "1") {
DrawableCompat.setTint(

View File

@ -603,12 +603,7 @@ class CollectionFragment(
if (!goBack) {
/* sendSalixMessage(
item = dataMessageSalix.item,
ticketFk = dataMessageSalix.ticket,
quantity = dataMessageSalix.quantity,
salePerson = dataMessageSalix.personSale
)*/
viewModel.collectionTicketGet(
collection.collectionFk,
getDataInt(SECTORFK),
@ -616,10 +611,8 @@ class CollectionFragment(
type
)
// //Log.i("VERDNATURA:","La collection es ${collection.collectionFk}")
}
}
// }
goBack = false
@ -723,18 +716,7 @@ class CollectionFragment(
}
})
/* responseSaleMove.observe(viewLifecycleOwner, Observer {
if (it.isError) {
ma.messageWithSound(it.errorMessage, isError = true, true)
} else {
if (!goBack)
responseSaleMoveSuccesful()
goBack = false
}
})*/
responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
@ -979,41 +961,9 @@ class CollectionFragment(
})
responseSalixMessage.observe(viewLifecycleOwner, Observer {
if (it.isError) {
if (!goBack) {
ma.messageWithSound(
getString(R.string.rocketKO) + it.errorMessage,
it.isError,
false
)
} else {
goBack = false
}
}
})
}
}
/* private fun responseSaleMoveSuccesful() {
sales[positionCollectionSplit].quantity = quantityCollectionSplit
if (quantityCollectionSplit == 0)
markLine(positionCollectionSplit, type)
saleAdapter!!.notifyDataSetChanged()
val ticket =
"[" + sales[positionCollectionSplit].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].ticketFk + "/summary)"
val message =
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)
}*/
private fun callPicker(extensionNumber: String) {
try {
@ -1023,7 +973,7 @@ class CollectionFragment(
startActivity(intent)
} catch (e: Exception) {
// d("VERDNATURA::" + e.message)
e.toast(requireContext())
}
}
@ -1039,23 +989,6 @@ class CollectionFragment(
return salePerson
}
/* private fun sendSalixMessage(
item: String,
ticketFk: Int,
quantity: String,
salePerson: String
) {
val ticket =
"[" + ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + ticketFk + "/summary)"
val message =
getString(R.string.itemAdded) + item + getString(R.string.with) + quantity + getString(R.string.unityTicket) + ticket
viewModel.sendChekingPresence(
workerId = salePerson,
message = message
)
}*/
//CREATE LIST
private fun createCollectionList() {
@ -2337,32 +2270,6 @@ class CollectionFragment(
saleAdapter!!.notifyDataSetChanged()
/*val ticket =
"[" + sales[positionCollectionMissing].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionMissing].ticketFk + "/summary)"
when (typeCollectionMissing) {
"TRUE" -> {
message =
"Se ha enviado a Basura " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
}
"FALSE" -> {
message =
"Se ha enviado a Faltas la cantidad de " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
}
"reject" -> {
message =
"Se ha modificado la cantidad de " + sales[positionCollectionMissing].originalQuantity + " del artículo " + sales[positionCollectionMissing].itemFk + " a nueva cantidad: " + sales[positionCollectionMissing].quantity + " del ticket " + ticket
}
}*/
//sergio:ahora desde encajado
// sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
binding.splashProgress.visibility = VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
@ -2384,31 +2291,11 @@ class CollectionFragment(
} catch (e: Exception) {
}
saleAdapter?.notifyDataSetChanged()
//enviar mensaje a salix
/* val ticket =
"[" + sales[positionIncreaseQuantity].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionIncreaseQuantity].ticketFk + "/summary)"
val message =
"Se ha modificado la cantidad original " + sales[positionIncreaseQuantity].originalQuantity + " del artículo " + sales[positionIncreaseQuantity].itemFk + " a nueva cantidad: " + sales[positionIncreaseQuantity].quantity + " del ticket " + ticket
*/
//sergio: ahora desde encajadores
// sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
}
/*
private fun sendSalixMessageNew(message: String, workerId: String) {
viewModel.sendChekingPresence(
workerId = workerId,
message = message
)
}
*/
private fun increaseQuantity(position: Int, quantity: Int) {
positionIncreaseQuantity = position

View File

@ -10,7 +10,6 @@ import android.os.Build
import android.os.Bundle
import android.os.Parcelable
import android.text.InputType
import android.util.Log
import android.util.Log.d
import android.view.KeyEvent
import android.view.View
@ -600,12 +599,7 @@ class CollectionFragmentPicker(
if (!goBack) {
/* sendSalixMessage(
item = dataMessageSalix.item,
ticketFk = dataMessageSalix.ticket,
quantity = dataMessageSalix.quantity,
salePerson = dataMessageSalix.personSale
)*/
viewModel.collectionTicketGet(
collection.collectionFk,
getDataInt(SECTORFK),
@ -613,10 +607,8 @@ class CollectionFragmentPicker(
type
)
// //Log.i("VERDNATURA:","La collection es ${collection.collectionFk}")
}
}
// }
goBack = false
@ -860,27 +852,6 @@ class CollectionFragmentPicker(
}
}
/* responseItemShelvingUpdate.observe(viewLifecycleOwner, Observer {
if (it.isError) {
if (!goBack) {
ma.messageWithSound(it.errorMessage, it.isError, false)
}
} else {
//Test volver atrás
if (!goBack){
viewModel.saleTrackingDel(
saleFk = sales[positionUnmarked].saleFk
)}
goBack = false
}
})*/
responseSaleReplace.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
@ -995,23 +966,6 @@ class CollectionFragmentPicker(
}
})
responseSalixMessage.observe(viewLifecycleOwner, Observer {
if (it.isError) {
if (!goBack) {
ma.messageWithSound(
getString(R.string.rocketKO) + it.errorMessage,
it.isError,
false
)
} else {
goBack = false
}
}
})
}
}
@ -1022,12 +976,6 @@ class CollectionFragmentPicker(
markLine(positionCollectionSplit, type)
saleAdapter!!.notifyDataSetChanged()
/* val ticket =
"[" + sales[positionCollectionSplit].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].ticketFk + "/summary)"
val message =
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)*/
}
@ -1040,7 +988,7 @@ class CollectionFragmentPicker(
startActivity(intent)
} catch (e: Exception) {
// d("VERDNATURA::" + e.message)
e.toast(requireContext())
}
}
@ -1056,24 +1004,6 @@ class CollectionFragmentPicker(
return salePerson
}
/* private fun sendSalixMessage(
item: String,
ticketFk: Int,
quantity: String,
salePerson: String
) {
val ticket =
"[" + ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + ticketFk + "/summary)"
val message =
getString(R.string.itemAdded) + item + getString(R.string.with) + quantity + getString(
R.string.unityTicket) + ticket
viewModel.sendChekingPresence(
workerId = salePerson,
message = message
)
}*/
//CREATE LIST
private fun createCollectionList() {
@ -1983,7 +1913,6 @@ class CollectionFragmentPicker(
}
}
}
Log.d("VERDNATURA::", "SAlimos de ver el checkItem")
return false
}
@ -2414,33 +2343,8 @@ class CollectionFragmentPicker(
}
saleAdapter!!.notifyDataSetChanged()
/*
val ticket =
"[" + sales[positionCollectionMissing].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionMissing].ticketFk + "/summary)"
when (typeCollectionMissing) {
"TRUE" -> {
message =
"Se ha enviado a Basura " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
}
"FALSE" -> {
message =
"Se ha enviado a Faltas la cantidad de " + totalQuantity + getString(R.string.fromItem) + sales[positionCollectionMissing].itemFk + " ticket " + ticket
}
"reject" -> {
message =
"Se ha modificado la cantidad de " + sales[positionCollectionMissing].originalQuantity + " del artículo " + sales[positionCollectionMissing].itemFk + " a nueva cantidad: " + sales[positionCollectionMissing].quantity + " del ticket " + ticket
}
}*/
//sergio:ahora desde encajado
// sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
binding.splashProgress.visibility = View.VISIBLE
viewModel.collectionTicketGet(
collection.collectionFk,
@ -2462,30 +2366,11 @@ class CollectionFragmentPicker(
} catch (e: Exception) {
}
saleAdapter?.notifyDataSetChanged()
//enviar mensaje a salix
/* val ticket =
"[" + sales[positionIncreaseQuantity].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionIncreaseQuantity].ticketFk + "/summary)"
val message =
"Se ha modificado la cantidad original " + sales[positionIncreaseQuantity].originalQuantity + " del artículo " + sales[positionIncreaseQuantity].itemFk + " a nueva cantidad: " + sales[positionIncreaseQuantity].quantity + " del ticket " + ticket
*/
//sergio: ahora desde encajadores
// sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
}
/* private fun sendSalixMessageNew(message: String, workerId: String) {
viewModel.sendChekingPresence(
workerId = workerId,
message = message
)
}*/
private fun increaseQuantity(position: Int, quantity: Int) {
positionIncreaseQuantity = position
quantityIncrease = quantity

View File

@ -621,12 +621,7 @@ class CollectionFragmentPreChecker(
if (!goBack) {
/* sendSalixMessage(
item = dataMessageSalix.item,
ticketFk = dataMessageSalix.ticket,
quantity = dataMessageSalix.quantity,
salePerson = dataMessageSalix.personSale
)*/
viewModel.collectionTicketGet(
collection.collectionFk,
getDataInt(SECTORFK),
@ -634,7 +629,7 @@ class CollectionFragmentPreChecker(
type
)
// //Log.i("VERDNATURA:","La collection es ${collection.collectionFk}")
}
}
// }
@ -996,23 +991,6 @@ class CollectionFragmentPreChecker(
}
})
responseSalixMessage.observe(viewLifecycleOwner, Observer {
if (it.isError) {
if (!goBack) {
ma.messageWithSound(
getString(R.string.rocketKO) + it.errorMessage,
it.isError,
false
)
} else {
goBack = false
}
}
})
}
}
@ -1023,13 +1001,6 @@ class CollectionFragmentPreChecker(
markLine(positionCollectionSplit, type)
saleAdapter!!.notifyDataSetChanged()
/* val ticket =
"[" + sales[positionCollectionSplit].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].ticketFk + "/summary)"
val message =
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)*/
}
private fun callPicker(extensionNumber: String) {
@ -1057,23 +1028,6 @@ class CollectionFragmentPreChecker(
return salePerson
}
/* private fun sendSalixMessage(
item: String,
ticketFk: Int,
quantity: String,
salePerson: String
) {
val ticket =
"[" + ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + ticketFk + "/summary)"
val message =
getString(R.string.itemAdded) + item + getString(R.string.with) + quantity + getString(R.string.unityTicket) + ticket
viewModel.sendChekingPresence(
workerId = salePerson,
message = message
)
}*/
//CREATE LIST
private fun createCollectionList() {
@ -1283,7 +1237,7 @@ class CollectionFragmentPreChecker(
if (placementVO.shelving != null && placementVO.visible != null && txtscan.uppercase() == placementVO.shelving.uppercase() && placementVO.visible != "(0)") {
if (mpok != null) mpok!!.start()
isOk = true
//////Log.i("VERDNATURA:","encontrado producto")
showShelving(index, shelvingIndex)
isBreak = true
break
@ -1460,7 +1414,6 @@ class CollectionFragmentPreChecker(
//Tarea #4371
private fun markLine(position: Int, newType: String) {
state = 0
//////Log.i("VERDNATURA:","Marcamos linea y enviamos saleTracking")
if (type == SACADOR) {
sales[position].isPrepared = if (sales[position].isPrepared == "1") "0" else "1"
if (sales[position].isPrepared == "1") {
@ -1678,7 +1631,6 @@ class CollectionFragmentPreChecker(
@RequiresApi(Build.VERSION_CODES.O)
private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO) {
//////Log.i("VERDNATURA:","Print CustomDialog")
var shelving = ""
var item = ""
var longName = ""
@ -1703,7 +1655,6 @@ class CollectionFragmentPreChecker(
placementSupplyListVO.list.forEach {
if (it.stock != "0")
listPlacementSupply.add(BarcodeVO(code = it.proposal))
//////Log.i("VERDNATURA:","Array de placementsupply")
}
try {
// Log.i("VERDNATURA:","Pulso COGER-1")
@ -1737,12 +1688,7 @@ class CollectionFragmentPreChecker(
onQuantityOfShelvingSelected(itemShelvingFk)
//Log.i("VERDNATURA:","Cantidad seleccionada")
mpok?.start()
/* Se quita para comprobar al final de saleTracking_mark
ReviewQuantityForRefreshingAndSorting(
customDialogList.getValue().toInt(),
sales[storedPosition].quantity!!.toInt(),
sales[storedPosition].pickedQuantity.toInt()
)*/
customDialogList.dismiss()
} else {
itemShelvingFkStored = itemShelvingFk
@ -2366,16 +2312,6 @@ class CollectionFragmentPreChecker(
} catch (e: Exception) {
}
saleAdapter?.notifyDataSetChanged()
//enviar mensaje a salix
/*val ticket =
"[" + sales[positionIncreaseQuantity].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionIncreaseQuantity].ticketFk + "/summary)"
val message =
"Se ha modificado la cantidad original " + sales[positionIncreaseQuantity].originalQuantity + " del artículo " + sales[positionIncreaseQuantity].itemFk + " a nueva cantidad: " + sales[positionIncreaseQuantity].quantity + " del ticket " + ticket
*/
//sergio: ahora desde encajadores
// sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
@ -2408,7 +2344,6 @@ class CollectionFragmentPreChecker(
state = "PREPARED"
)
}
////Refactor #4030
} else if (type == PRECHECKER) {
tickets.forEach {

View File

@ -16,9 +16,7 @@ import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.collection.ItemVO
import es.verdnatura.presentation.view.feature.collection.SalesModifiedList
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
import es.verdnatura.presentation.view.feature.collection.listSaleSalix
import es.verdnatura.presentation.view.feature.collection.mapper.map
import es.verdnatura.presentation.view.feature.collection.saleSalix
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeListVO
@ -171,9 +169,6 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
val mistakeList: LiveData<MistakeTypeListVO>
get() = _mistakeList
private val _responseSalixMessage by lazy { MutableLiveData<ResponseItemVO>() }
val responseSalixMessage: LiveData<ResponseItemVO>
get() = _responseSalixMessage
private val _item by lazy { MutableLiveData<ItemVO>() }
val item: LiveData<ItemVO>
@ -194,6 +189,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
print: String,
type: String
) {
//Tarea 6276 Salix collection_getTickets
silex.collection_getTickets(
collectionFk,
sectorFk,
@ -405,7 +401,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
params = arrayListOf(itemShelvingSaleFk, quantity, isItemShelvingSaleEmpty)
//salix.itemShelvingSaleSetQuantity(
// params = ItemShelvingSaleSalix(itemShelvingSaleFk, quantity, isItemShelvingSaleEmpty)
).enqueue(object : SilexCallback<Any>(context) {
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseConfirmReservedItemShelvingSale.value = ResponseItemVO(
isError = true,
@ -459,7 +455,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
) {
salix.itemShelvingsReservedUpdate(
id = itemShelvingSaleFk, params = hashMapOf("isPicked" to isPicked)
).enqueue(object : SilexCallback<Any>(context) {
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseConfirmReservedUpdate.value = ResponseItemVO(
isError = true,
@ -563,7 +559,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
"""where={"ticketFk":$ticketFk}""",
hashMapOf("usedShelves" to usedShelves)
)
.enqueue(object : SilexCallback<Unit>(context) {
.enqueue(object : SalixCallback<Unit>(context) {
override fun onError(t: Throwable) {
_responseUsedShelves.value = ResponseItemVO(
@ -673,7 +669,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
})
}
/* fun saleMove(
/* fun saleMove(
usuario: String,
password: String,
saleFk: String,
@ -712,7 +708,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
})
}*/
fun transferSalesSalix(
/* fun transferSalesSalix(
ticketFk: String,
saleFk: Int,
quantity: String,
@ -748,9 +744,10 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
}
}
})
}
}*/
fun saleTrackingDel(saleFk: Int) {
//Tarea 6276
//salix.saleTrackingDel(SaleTrackingDelSalix(saleFk = saleFk, stateCodes = listOf("CHECKED","OK","PREPARED")))
silex.saleTrackingDel(saleFk)
.enqueue(object : SilexCallback<Any>(context) {
@ -832,7 +829,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
fun getIdFromCodeSalix(code: String) {
salix.barcodes_toitem(code)
.enqueue(object : SilexCallback<String?>(context) {
.enqueue(object : SalixCallback<String?>(context) {
override fun onError(t: Throwable) {
_responseCode.value = ResponseItemVO(
isError = true,
@ -860,7 +857,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
) {
salix.collectionIncreaseQuantitySalix(
SalixSaleQuantity(saleId = saleFk, quantity = quantity.toInt())
).enqueue(object : SilexCallback<Any>(context) {
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseIncQuantity.value = ResponseItemVO(
isError = true,
@ -877,47 +874,6 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
})
}
/* fun sendChekingPresence(
workerId: String,
message: String
) {
try {
salix.sendChekingPresence(
SalixMessageVO(
workerId = workerId.toInt(),
message = message
)
)
.enqueue(object : Callback<Boolean> {
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
if (!response.isSuccessful || response.message() == "false") {
_responseSalixMessage.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
}
override fun onFailure(call: Call<Boolean>, t: Throwable) {
_responseSalixMessage.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
)
//Log.i("Salix Error",""+t.message)
}
})
} catch (e: Exception) {
}
}*/
fun saleMistakeAdd(
saleFk: Int,
@ -932,7 +888,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
)
)
.enqueue(object :
SilexCallback<Any>(context) {
SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseSaleMistakeAdd.value = ResponseItemVO(
isError = true,
@ -999,7 +955,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
salix.ticketIsOutClosureZone(
params = arrayListOf(ticketFk)
).enqueue(object :
SilexCallback<Any>(context) {
SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseTicketClosure.value = ResponseItemVO(
isError = true,
@ -1049,7 +1005,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
silex.collection_getUncheckedTicket(
collectionFk
).enqueue(object :
SilexCallback<String>(context) {
SalixCallback<String>(context) {
override fun onError(t: Throwable) {
_responseCollectionUnchecked.value = ResponseItemVO(
isError = true,

View File

@ -29,6 +29,7 @@ class ControladorViewModel(var context: Context) : BaseViewModel(context) {
fun collectionTicketGet(collectionFk: Int, sectorFk: Int, print: String, type: String) {
//Tarea 6276 collection_getTickets
silex.collection_getTickets(collectionFk, sectorFk, print, type).enqueue(object :
SilexCallback<CollectionVO>(context) {
override fun onError(t: Throwable) {

View File

@ -2,14 +2,11 @@ package es.verdnatura.presentation.view.feature.controlador.fragment
import android.content.Context
import android.content.Intent
import android.graphics.drawable.Drawable
import android.net.Uri
import android.os.Build
import android.print.PrintAttributes
import android.print.PrintManager
import android.webkit.WebChromeClient
import android.webkit.WebSettings
import android.webkit.WebView
import android.widget.ImageView
import androidx.recyclerview.widget.LinearLayoutManager
@ -46,10 +43,6 @@ class WebFragment(
private fun setWeb() {
binding.webView.webChromeClient = WebChromeClient()
//binding.webView.getSettings (). setJavaScriptEnabled (true)
// sergio:deprecated
//webView.getSettings (). setPluginState (WebSettings.PluginState.ON)
val webSettings = binding.webView.settings
webSettings.javaScriptEnabled = true
webSettings.domStorageEnabled = true
@ -91,7 +84,6 @@ class WebFragment(
//listIcons.add(iconPrint)
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {

View File

@ -229,7 +229,7 @@ class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) {
) {
salix.sip_getExtension(
workerId
).enqueue(object : SilexCallback<Any>(context) {
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseGetExtensionFromUserId.value = ResponseItemVO(
isError = true,

View File

@ -4,7 +4,6 @@ import android.Manifest
import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.location.Location
import android.view.View
import androidx.appcompat.app.AlertDialog
import androidx.core.app.ActivityCompat
import androidx.lifecycle.lifecycleScope
@ -19,6 +18,7 @@ import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseActivity
import es.verdnatura.presentation.base.LocationUpdateCallback
import es.verdnatura.presentation.base.database
import es.verdnatura.presentation.common.SignListener
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketSalix
import es.verdnatura.presentation.view.feature.delivery.model.MyLocation
@ -35,8 +35,7 @@ import java.text.SimpleDateFormat
import java.util.Date
import java.util.Locale
class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallback {
class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallback, SignListener {
override fun getLayoutId(): Int = R.layout.activity_sign
@ -52,15 +51,15 @@ class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallba
"ticket" -> {
binding.mainToolbar.toolbarTitle.text = getString(R.string.sign)
clientTicket = intent.extras!!.getSerializable("clientTicketList") as ClientTicketSalix
clientTicket =
intent.extras!!.getSerializable("clientTicketList") as ClientTicketSalix
setViews(clientTicket)
setLocation()
}
}
setEvents()
binding.splashProgress.visibility = View.GONE
(application as MobileApplication).setSignListener(this)
db = database(this.applicationContext)
}
@ -95,12 +94,16 @@ class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallba
}
if (clientTicket.latitude != null && clientTicket.longitude != null) {
if (locationCurrent.distanceTo(locationClient) > 100 ) {
if (clientTicket.latitude != null && clientTicket.longitude != null) {
if (locationCurrent.distanceTo(locationClient) > 100) {
val customDialogDistance = CustomDialog(this)
customDialogDistance.setTitle(getString(R.string.confirm))
.setDescription(getString(R.string.locationDiferent)+ getString(R.string.distance) + locationCurrent.distanceTo(locationClient))
.setDescription(
getString(R.string.locationDiferent) + getString(R.string.distance) + locationCurrent.distanceTo(
locationClient
)
)
.setOkButton(getString(R.string.keep)) {
uploadImage(MyLocation(locationClient.latitude, locationClient.longitude))
@ -111,36 +114,12 @@ class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallba
customDialogDistance.dismiss()
}
.show()
}else{
} else {
uploadImage(MyLocation(locationClient.longitude, locationClient.latitude))
}
}else{
} else {
uploadImage(lastLocationCurrent)
}
/* if (locationCurrent.distanceTo(locationClient) > 100 && clientTicket.Latitude != null && clientTicket.Longitude != null) {
val customDialogDistance = CustomDialog(this)
customDialogDistance.setTitle(getString(R.string.confirm))
.setDescription(getString(R.string.locationDiferent))
.setOkButton(getString(R.string.keep)) {
uploadImage(MyLocation(locationClient.latitude, locationClient.longitude))
customDialogDistance.dismiss()
}.setKoButton(getString(R.string.modify)) {
uploadImage(lastLocationCurrent)
customDialogDistance.dismiss()
}
.show()
} else {
if (locationClient.latitude != null && locationClient.longitude != null) {
uploadImage(MyLocation(locationClient.longitude, locationClient.latitude))
} else {
uploadImage(MyLocation(locationCurrent.longitude, locationCurrent.latitude))
}
}*/
}
private fun setEvents() {
@ -152,7 +131,6 @@ class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallba
}
}
private fun setViews(clientTicketList: ClientTicketSalix) {
if (clientTicketList != null) {
@ -189,13 +167,11 @@ class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallba
baseContext.externalCacheDir.toString() + "/" + file.name
)
binding.splashProgress.visibility = View.VISIBLE
deliveryViewModel.saveSign(
mySign.fileName, mySign.queryMapList,
)
deliveryViewModel.responseSign.observe(this) {
binding.splashProgress.visibility = View.GONE
if (!it.isError) {
getString(R.string.ok).toast(this)
finish()
@ -245,7 +221,6 @@ class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallba
locationUpdateCallback = this
requestLocationUpdates(fusedLocationClient)
}
override fun onRequestPermissionsResult(
@ -294,7 +269,6 @@ class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallba
111
)
}
setNegativeButton(
getString(R.string.cancel)
@ -315,12 +289,14 @@ class SignedActivity : BaseActivity<ActivitySignBinding>(), LocationUpdateCallba
if (location.locations.isNotEmpty()) {
lastLocationCurrent.Longitude = location.locations.last().longitude
lastLocationCurrent.Latitude = location.locations.last().latitude
println("ubicación - Latitud: $lastLocationCurrent.Latitude, Longitud: $lastLocationCurrent.Longitude")
} else {
println("ubicación vacía")
}
}
override fun onApplicationEventAnimation(visibility: Int) {
binding.splashProgress.visibility = visibility
}
}

View File

@ -255,11 +255,8 @@ class TicketsFragment(
clientTicketList.observe(viewLifecycleOwner) {
if (it.list.isNotEmpty()) {
println("llegan los tickets")
createLisTickets(it.list)
}else{
println("tickets vacios")
}
}
responseStateAdd.observe(viewLifecycleOwner) {}
@ -274,7 +271,6 @@ class TicketsFragment(
setToolBar()
}
responseLoadList.observe(viewLifecycleOwner) {
println("tickets responseLoadList")
ma.messageWithSound(getString(R.string.offline), true, false, "", true)
createLisTickets(mutableListOf(), getSaved = true)
}

View File

@ -5,7 +5,6 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.formatWithQuotes
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.common.Event
@ -198,25 +197,6 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
}
/* fun expeditionState_add(expeditions: Any?, state: String) {
silex.expeditionState_add(expeditions, state)
.enqueue(object : SilexCallback<Unit>(context) {
override fun onSuccess(response: Response<Unit>) {
_responseStateAdd.value = ResponseItemVO(state, false, "", 0)
}
override fun onError(t: Throwable) {
super.onError(t)
_responseStateAdd.value = ResponseItemVO()
}
override fun onFailure(call: Call<Unit>, t: Throwable) {
_responseStateList.value = ResponseItemVO("", true, t.message.toString(), 0)
}
})
}*/
fun expeditionStateAddSalix(expeditions: Any) {
salix.addExpeditionState(expeditions).enqueue(object : SalixCallback<Unit>(context) {
@ -305,16 +285,10 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
salix.getTickets("""{"id":$routeId,"order":["priority","id"],"limit":1}""")
.enqueue(object : SalixCallback<MutableList<ClientTicketSalix>>(context) {
override fun onSuccess(response: Response<MutableList<ClientTicketSalix>>) {
println("ticketsss entrando")
for (list in response.body()!!){
println("ticketsss ${list.clientFk}")
}
_clientTicketList.value = response.body()?.let { ClientTicketList(it) }
}
override fun onError(t: Throwable) {
println("ticketsss fallando")
println("tickets fallando ${t.message}")
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
}
@ -366,7 +340,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
file: MultipartBody.Part
) {
salix.imageUpload(warehouseId, companyId, dmsTypeId, reference, description, hasFile, file)
.enqueue(object : SilexCallback<Any>(context) {})
.enqueue(object : SalixCallback<Any>(context) {})
}
fun saveSign(filePath: String, mapQuery: Map<String?, String?>) {

View File

@ -29,9 +29,6 @@ class HistoricoArticuloFragment(
HistoricoArticuloViewModel::class
) {
private var adapter: HistoricoAdapter? = null
// private lateinit var customDialogInput: CustomDialogInput
// private lateinit var customDialog: CustomDialog
private var listHistoric: ArrayList<ItemHistoricoVO> = ArrayList()
private var listHistoryAux: ArrayList<ItemHistoricoVO> = ArrayList()
private var filter: String = ""
@ -107,7 +104,6 @@ class HistoricoArticuloFragment(
private fun viewModelwithFilter(keyfilter: String) {
filter = keyfilter
binding.splashProgress.visibility = View.VISIBLE
itemFk?.let { viewModel.itemGetBalance(it, getDataInt(WAREHOUSEFK)) }
}
@ -131,8 +127,7 @@ class HistoricoArticuloFragment(
listHistoryAux.forEach {
if (it.name?.contains(
binding.filterNameordateitem.text.toString(),
true
binding.filterNameordateitem.text.toString(), true
) == true
) {
listHistoric.add(it)
@ -155,8 +150,6 @@ class HistoricoArticuloFragment(
with(viewModel) {
loadHistoricoList.observe(viewLifecycleOwner, Observer { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.GONE
listToAdapter(it.list, filter)
navigateToToday(it)
@ -190,6 +183,7 @@ class HistoricoArticuloFragment(
}
@RequiresApi(Build.VERSION_CODES.O)
private fun navigateToToday(it: ItemHistoricoListVO) {
var positionToday = 0
val sdf = SimpleDateFormat(getString(R.string.dateFormat))

View File

@ -6,8 +6,6 @@ import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.SalixCallback
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.historicoarticulo.model.ItemHistoricoListVO
import es.verdnatura.presentation.view.feature.historicoarticulo.model.ItemHistoricoVO
@ -22,25 +20,14 @@ class HistoricoArticuloViewModel(val context: Context) : BaseViewModel(context)
val loadHistoricoList = Transformations.map(_historicoList) { Event(it) }
fun itemGetBalance(itemFk: Int, vWarehouseFk: Int) {
//salix falla fecha -- No tiene hora.
silex.itemDiary(itemFk, vWarehouseFk)
// salix.itemGetBalance(arrayListOf(itemFk, vWarehouseFk, null))
salix.itemGetBalance(arrayListOf(itemFk, vWarehouseFk, null))
.enqueue(object :
SalixCallback<List<ItemHistoricoVO>>(context) {
override fun onSuccess(response: Response<List<ItemHistoricoVO>>) {
_historicoList.value = response.body()?.let { ItemHistoricoListVO(it) }
}
override fun onError(t: Throwable) {
val listError: ArrayList<ItemHistoricoVO> = ArrayList()
listError.add(
ItemHistoricoVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
)
_historicoList.value = ItemHistoricoListVO(listError)
}
})
}
}

View File

@ -7,7 +7,6 @@ import androidx.lifecycle.Transformations
import com.google.gson.JsonObject
import es.verdnatura.MobileApplication
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.formatWithQuotes
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
@ -123,13 +122,13 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
salix.itemShelvingsUpdate(where, params).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responseReset.value =
ResponseItemVO(isError = false, response = response.message())
super.onSuccess(response)
}
override fun onSuccess(response: Response<Any>) {
_responseReset.value =
ResponseItemVO(isError = false, response = response.message())
super.onSuccess(response)
}
})
})
}
fun itemTrash(
@ -178,14 +177,14 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
}
fun workerMistakeTypeGet() {
salix.workerMistakesTypes().enqueue(object : SilexCallback<List<MistakeType>>(context) {
salix.workerMistakesTypes().enqueue(object : SalixCallback<List<MistakeType>>(context) {
override fun onSuccess(response: Response<List<MistakeType>>) {
_mistakeWorkerList.value = response.body()?.let { workerMistakeTypeList(it) }
override fun onSuccess(response: Response<List<MistakeType>>) {
_mistakeWorkerList.value = response.body()?.let { workerMistakeTypeList(it) }
}
}
})
})
}
fun workerMistakeAdd(
@ -195,11 +194,10 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
.enqueue(object : SalixCallback<Any>(context) {})
}
fun expeditionMistake_add(
fun expeditionMistakeAdd(
vExpeditionFk: Int,
vTypeFk: String,
) {
//Tarea 5134
salix.expeditionMistakesAdd(
ExpeditionMistakeSalix(
expeditionFk = vExpeditionFk,
@ -207,21 +205,7 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
workerFk = (context as MobileApplication).userId!!
)
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseAddMistake.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
// sergio:refactor:solo debería haber un mensaje no un response o errorMessage
_responseAddMistake.value = ResponseItemVO(
isError = false, response = response.message()
)
}
})
})
}
fun getInventoryParking(
@ -393,62 +377,16 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
)
)
)
// _inventoryListParking.value = myList
/*silex.itemShelving_inventory(vParkingFromFk, vParkingToFk)
.enqueue(object :
SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseAddMistake.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
// sergio:refactor:solo debería haber un mensaje no un response o errorMessage
_responseAddMistake.value =
ResponseItemVO(
isError = false,
response = response.message()
)
}
})*/
}
fun expeditionMistakeType_get() {
// Tarea 5134 pasar a salix
fun expeditionMistakeTypeGet() {
salix.getExpeditionMistakeTypes()
.enqueue(object : SalixCallback<List<MistakeType>>(context) {
override fun onError(t: Throwable) {
val listError: ArrayList<MistakeType> = ArrayList()
listError.add(
MistakeType(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
), description = ""
)
)
_mistakeWorkerList.value = workerMistakeTypeList(listError)
}
override fun onSuccess(response: Response<List<MistakeType>>) {
if (response.body() != null) {
_mistakeWorkerList.value =
response.body()?.let { workerMistakeTypeList(it) }
} else {
val listError: ArrayList<MistakeType> = ArrayList()
listError.add(
MistakeType(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), response.message()
), description = ""
)
)
_mistakeWorkerList.value = workerMistakeTypeList(listError)
}
_mistakeWorkerList.value =
response.body()?.let { workerMistakeTypeList(it) }
}
})
@ -456,10 +394,10 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
fun getIdFromCodeSalix(code: String) {
salix.barcodes_toitem(code).enqueue(object : SalixCallback<String?>(context) {
override fun onSuccess(response: Response<String?>) {
_responseCode.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
}
})
override fun onSuccess(response: Response<String?>) {
_responseCode.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
}
})
}
}

View File

@ -2,26 +2,27 @@ package es.verdnatura.presentation.view.feature.login.activity
import android.content.Intent
import android.net.Uri
import es.verdnatura.MobileApplication
import es.verdnatura.R
import es.verdnatura.databinding.ActivityLoginBinding
import es.verdnatura.presentation.base.BaseActivity
import es.verdnatura.presentation.common.LoginListener
import es.verdnatura.presentation.common.TAG
import es.verdnatura.presentation.common.addFragment
import es.verdnatura.presentation.view.feature.login.fragment.LoginFragment
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
class LoginActivity : BaseActivity<ActivityLoginBinding>() {
class LoginActivity : BaseActivity<ActivityLoginBinding>(), LoginListener {
private var imageUri: Uri? = null
override fun getLayoutId(): Int = R.layout.activity_login
override fun init() {
(application as MobileApplication).setLoginListener(this)
val intent = intent
val action = intent.action
val type = intent.type
//Tarea 5322
if (Intent.ACTION_SEND == action && type?.startsWith("image/") == true) {
val clipData = intent.clipData
if (clipData != null) {
@ -38,5 +39,9 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
finish()
}
override fun onApplicationEventAnimation(visibility: Int) {
binding.splashAnimation.visibility = visibility
}
}

View File

@ -10,7 +10,6 @@ import android.os.Build
import android.os.Environment
import android.provider.Settings
import android.util.Log.d
import android.view.View
import androidx.annotation.RequiresApi
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
@ -51,14 +50,12 @@ class LoginFragment(var imageUri: Uri?) :
@RequiresApi(Build.VERSION_CODES.O)
override fun init() {
customDialogList = CustomDialogList(requireContext())
customDialog = CustomDialog(requireContext())
createFolderSerial()
saveIdentifiers()
checkUser()
binding.buttonLogin.setOnClickListener {
binding.splashProgress.visibility = View.VISIBLE
viewModel.loginSalix(
user = binding.edittextUsername.text.toString(),
password = binding.edittextPassword.text.toString()
@ -250,7 +247,6 @@ class LoginFragment(var imageUri: Uri?) :
versionappitem.observe(viewLifecycleOwner) {
if (it.isError) {
binding.splashProgress.visibility = View.GONE
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
.setOkButton(getString(R.string.close)) {
customDialog.dismiss()
@ -295,7 +291,6 @@ class LoginFragment(var imageUri: Uri?) :
logindevice.observe(viewLifecycleOwner) {
if (it.isError) {
binding.splashProgress.visibility = View.GONE
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
.setOkButton(getString(R.string.close)) {
customDialog.dismiss()
@ -307,11 +302,9 @@ class LoginFragment(var imageUri: Uri?) :
.setDescription(it.vMessage!!)
.setOkButton(getString(R.string.close)) {
customDialog.dismiss()
binding.splashProgress.visibility = View.GONE
}.show()
} else {
//sergio: se añade el log
if (binding.switchRemember.isChecked) {
saveRemember(true)
@ -388,7 +381,6 @@ class LoginFragment(var imageUri: Uri?) :
loginSalixItem.observe(viewLifecycleOwner) {
if (it.isError) {
binding.splashProgress.visibility = View.GONE
saveTokenPref("", 0)
customDialog.setTitle(getString(R.string.error))
@ -419,7 +411,6 @@ class LoginFragment(var imageUri: Uri?) :
}
}
loadAccessConfigSalixList.observe(viewLifecycleOwner, Observer { event ->
binding.splashProgress.visibility = View.GONE
event.getContentIfNotHandled().notNull {
@ -475,12 +466,10 @@ class LoginFragment(var imageUri: Uri?) :
val intent = Intent(activity, MainActivity::class.java)
intent.data = imageUri
startActivity(intent)
binding.splashProgress.visibility = View.GONE
requireActivity().finish()
}
private fun getVersion() {
binding.splashProgress.visibility = View.VISIBLE
viewModel.checkVersion(
nameApp = getString(R.string.nameApp)

View File

@ -63,7 +63,7 @@ class LoginViewModel(val context: Context) : BaseViewModel(context) {
fun loginSalix(user: String, password: String) {
salix.login(LoginSalixVO(user, password)).enqueue(
object : SilexCallback<LoginSalixVO>(context) {
object : SalixCallback<LoginSalixVO>(context) {
override fun onSuccess(response: Response<LoginSalixVO>) {
val loginSalixVO: LoginSalixVO?
@ -149,7 +149,7 @@ class LoginViewModel(val context: Context) : BaseViewModel(context) {
android_id: String,
serialnumber: String? = null
) {
salix.getCurrentUserData().enqueue(object : SilexCallback<DataUserSalix>(context) {
salix.getCurrentUserData().enqueue(object : SalixCallback<DataUserSalix>(context) {
override fun onSuccess(response: Response<DataUserSalix>) {
app.userName = response.body()?.nickname
app.userId = response.body()?.id
@ -194,7 +194,7 @@ class LoginViewModel(val context: Context) : BaseViewModel(context) {
serialNumber = serialnumber
)
)
.enqueue(object : SilexCallback<Unit>(context) {
.enqueue(object : SalixCallback<Unit>(context) {
override fun onSuccess(response: Response<Unit>) {
}
@ -287,7 +287,7 @@ class LoginViewModel(val context: Context) : BaseViewModel(context) {
val filter =
"""{"fields":["itemPackingTypeFk","numberOfWagons","sectorFk","trainFk","labelerFk"],"include":[{"relation":"sector","scope":{"fields":["description","warehouseFk"]}},{"relation":"printer","scope":{"fields":["name"]}},{"relation":"train","scope":{"fields":["name"]}}]}"""
salix.operator_getData(id = workerId, filter)
.enqueue(object : SilexCallback<OperatorSalix>(context) {
.enqueue(object : SalixCallback<OperatorSalix>(context) {
override fun onError(t: Throwable) {
_workerOperator.value = OperatorSalix(
@ -324,7 +324,7 @@ class LoginViewModel(val context: Context) : BaseViewModel(context) {
) {
salix.getAccessTokenConfigs()
.enqueue(object : SilexCallback<List<accessConfigSalix>>(context) {
.enqueue(object : SalixCallback<List<accessConfigSalix>>(context) {
override fun onError(t: Throwable) {
val listError: ArrayList<accessConfigSalix> = ArrayList()
listError.add(
@ -369,7 +369,7 @@ class LoginViewModel(val context: Context) : BaseViewModel(context) {
fun renewToken(
) {
salix.renewToken()
.enqueue(object : SilexCallback<RenewToken>(context) {
.enqueue(object : SalixCallback<RenewToken>(context) {
override fun onSuccess(response: Response<RenewToken>) {

View File

@ -80,11 +80,10 @@ import es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowT
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import es.verdnatura.presentation.view.feature.ticket.fragment.TicketAdvanceFragment
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragment
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragmentTEST
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment
import es.verdnatura.presentation.view.feature.workermistake.fragment.WorkermistakeFragment
import es.verdnatura.presentation.view.feature.workermistake.fragment.PackingMistakeFragment
import es.verdnatura.presentation.view.feature.workermistake.fragment.WorkermistakeFragment
import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
@ -579,9 +578,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
addFragmentOnTop(AutomaticAddItemFragmentTEST.newInstance(entryPoint, item.title))
}
getString(R.string.titleControllersAction) -> {
/* getString(R.string.titleControllersAction) -> {
addFragmentOnTop(AutomaticAddItemFragment.newInstance(entryPoint, item.title))
}
}*/
getString(R.string.titlePickers) -> {
//addFragmentOnTop(SacadorFragment.newInstance())

View File

@ -51,7 +51,6 @@ class ObservFragment(
override fun init() {
customDialog = CustomDialog(requireContext())
ma.hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.GONE
setToolBar()
setEvents()
super.init()

View File

@ -56,8 +56,6 @@ class PackagingCountFragment(
getString(R.string.titlePackagingObs)
)
}
binding.splashProgress.visibility = View.VISIBLE
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
ma.hideBottomNavigation(View.GONE)
@ -111,7 +109,6 @@ class PackagingCountFragment(
with(viewModel) {
itemSupplierList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
adapteritemsupplier =
ItemSupplierAdapter(it.list, object : OnImageUpdateClickListener {

View File

@ -69,7 +69,6 @@ class PackagingSummaryFragment(
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
ma.hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.GONE
setToolBar()
setEvents()
super.init()
@ -115,14 +114,11 @@ class PackagingSummaryFragment(
with(viewModel) {
mistakeDepartmentList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createDepartmentList(it.list)
}
workerFromMistakeList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createWorkerList(it.list)
adapterworker =
WorkermistakeAdapter(listWorker, object : onMistakeWorkerClickListener {
@ -148,7 +144,6 @@ class PackagingSummaryFragment(
}
mistakeWorkerList.observe(viewLifecycleOwner, {
binding.splashProgress.visibility = View.GONE
showMistakeList(it.list)
//goBack = false
@ -181,7 +176,6 @@ class PackagingSummaryFragment(
}
private fun showMistakeList(list: List<MistakeType>) {
binding.splashProgress.visibility = View.GONE
listMistakes = ArrayList()
list.forEach {
listMistakes.add(BarcodeVO(code = it.description))

View File

@ -3,15 +3,17 @@ package es.verdnatura.presentation.view.feature.packaging.fragment.PackagingView
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.SalixCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.packaging.model.*
import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
import es.verdnatura.presentation.view.feature.packaging.model.SupplierList
import es.verdnatura.presentation.view.feature.packaging.model.itemSupplierList
import okhttp3.MultipartBody
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
class PackagingViewModel(val context: Context) : BaseViewModel(context) {
@ -36,7 +38,7 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
fun getSuppliers() {
salix.getSuppliers()
.enqueue(object :
SilexCallback<List<Supplier>>(context) {
SalixCallback<List<Supplier>>(context) {
override fun onError(t: Throwable) {
val listError: ArrayList<Supplier> = ArrayList()
listError.add(
@ -76,7 +78,7 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
fun supplier_getItems(supplierFk: Int) {
silex.supplier_getItems(supplierFk)
.enqueue(object : SilexCallback<List<ItemSupplier>>(context) {
.enqueue(object : SalixCallback<List<ItemSupplier>>(context) {
override fun onError(t: Throwable) {
val listError: ArrayList<ItemSupplier> = ArrayList()
listError.add(
@ -108,7 +110,7 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
fun entry_addSalix(entry: EntrySalix) {
salix.Entries(entry = entry)
.enqueue(object :
SilexCallback<EntrySalix> (context){
SalixCallback<EntrySalix> (context){
override fun onError(t: Throwable) {
_entry.value = EntrySalix(
isError = true,
@ -138,11 +140,11 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
fun entry_uploadPhotoSalix(id: Number, warehouseId: Number, companyId: Number, dmsTypeId: Number, reference: String, description: String, hasFile: Boolean, file: MultipartBody.Part) {
salix.uploadEntryPhoto(id, warehouseId, companyId, dmsTypeId, reference, description, hasFile, file)
.enqueue(object : SilexCallback<Any>(context){})
.enqueue(object : SalixCallback<Any>(context){})
}
fun entry_addFromBuy(id: Number, item: Number, printedStickers: Number) {
salix.addFromBuy(id, item, printedStickers)
.enqueue(object : SilexCallback<Any>(context){})
.enqueue(object : SalixCallback<Any>(context){})
}
}

View File

@ -18,7 +18,6 @@ import okhttp3.MultipartBody
import okhttp3.RequestBody
import java.io.File
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class SupplierFragment(
var entryPoint: String = ""
@ -32,7 +31,6 @@ class SupplierFragment(
private var onBack = false
private val suppliers = ArrayList<SearchSupplierModel>()
companion object {
fun newInstance(entryPoint: String) = SupplierFragment(entryPoint)
}
@ -52,7 +50,6 @@ class SupplierFragment(
val drawableId: Int =
R.drawable.background_test // Reemplaza "mi_drawable" con el nombre de tu recurso Drawable
/* val uri: Uri = Uri.parse(
ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
context!!.resources.getResourcePackageName(drawableId) + '/' +
@ -62,7 +59,6 @@ class SupplierFragment(
val rutaAbsoluta: String = uri.toString()*/
val file =
File("/storage/emulated/0/Android/data/es.verdnatura.sfusion/files/Pictures/test.png")
val filePart = MultipartBody.Part.createFormData(
@ -92,7 +88,6 @@ class SupplierFragment(
override fun init() {
binding.splashProgress.visibility = View.VISIBLE
binding.filterSupplier.setOnClickListener {
SimpleSearchDialogCompat(
context,
@ -104,8 +99,6 @@ class SupplierFragment(
binding.filterSupplier.setText((nombre.getName()))
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
saveData("SUPPLIERNAME", nombre.getName())
println("el id es " + nombre.getId())
println("el nombre es " + nombre.getName())
saveDataInt("SUPPLIERID", nombre.getId().toInt())
baseSearchDialogCompat.dismiss()
}.show()
@ -142,7 +135,6 @@ class SupplierFragment(
}
if (!onBack) {
binding.splashProgress.visibility = View.VISIBLE
//viewModel.addFromPackaging(getDataInt("SUPPLIERID"), getData("ENTRYTYPE")=="Rec")
@ -152,11 +144,9 @@ class SupplierFragment(
}
}
override fun observeViewModel() {
with(viewModel) {
supplierList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createSupplierList(it.list)
}
@ -167,14 +157,12 @@ class SupplierFragment(
}
}
entry.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
println("Entrada")
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
} else {
saveDataInt("ENTRY", it.id!!)
println("Entrada" + it.id)
ma.onPasillerosItemClickListener(
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
getString(R.string.titlePackagingCount)
@ -184,7 +172,6 @@ class SupplierFragment(
}
}
private fun createSupplierList(list: List<Supplier>) {
suppliers.clear()
list.forEach { supplier ->

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.packingHolland.fragment
import android.text.InputType
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo
import es.verdnatura.R
@ -27,7 +26,6 @@ class PackingHollandFragment(var entrypoint: String) :
override fun init() {
customDialogInput = CustomDialogInput(requireContext())
binding.mainToolbar.toolbarTitle.text = entrypoint
binding.splashProgress.visibility = GONE
binding.scanInput.visibility = VISIBLE
setEvents()
super.init()
@ -45,9 +43,7 @@ class PackingHollandFragment(var entrypoint: String) :
try {
shelvingScaned = itemScanValue(
binding.scanInput.text.toString(),
"buy",
"more"
binding.scanInput.text.toString(), "buy", "more"
).toString().toInt()
showQuantityPacking()
} catch (ex: Exception) {
@ -69,8 +65,7 @@ class PackingHollandFragment(var entrypoint: String) :
customDialogInput.setInputText(InputType.TYPE_CLASS_NUMBER)
customDialogInput.setTitle(getString(R.string.titlePackingHolland))
customDialogInput.setDescription(getString(R.string.packingQuantity) + shelvingScaned)
.setValue("")
.setOkButton(getString(R.string.modify)) {
.setValue("").setOkButton(getString(R.string.modify)) {
callPacking(customDialogInput.getValue())
}.setKoButton(getString(R.string.cancel)) {
customDialogInput.dismiss()
@ -96,8 +91,7 @@ class PackingHollandFragment(var entrypoint: String) :
ma.hideKeyboard(customDialogInput.getEditText())
customDialogInput.dismiss()
viewModel.travelUpdatePacking(
itemFk = shelvingScaned,
packingFk = value.toInt()
itemFk = shelvingScaned, packingFk = value.toInt()
)
binding.scanInput.requestFocus()
} catch (ex: Exception) {
@ -108,5 +102,3 @@ class PackingHollandFragment(var entrypoint: String) :
}
}
}

View File

@ -26,7 +26,7 @@ class ExpeditionListAdapter (
holder.bind(items[position])
holder.binding.root.setOnClickListener {
onTruckClickListener.onTruckClickListener(items[position],"")
////Log.i("VERDNATURA:","3-ontruckClickListener")
}
}

View File

@ -34,8 +34,6 @@ class ExpeditionPalletAdapter (
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
holder.bind(items[position])
holder.binding.root.setOnClickListener {
//Tarea #4125
Log.d("VERDNATURA::","Entrando en el pallet")
onPalletClickListener.onPalletClickListener(itemExpeditionTruckVO,items[position])
}
holder.binding.root.setOnLongClickListener {

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.paletizador.adapter
import android.content.Context
import android.util.Log
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
@ -27,8 +26,6 @@ class ExpeditionScanAdapter (
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
holder.bind(items[position])
holder.binding.root.setOnClickListener {
//Tarea #4125
Log.d("VERDNATURA::","ENtranado en las expediciones del pallet")
onScanLongClickListener.onScanLongClickListener(items[position])
}
}

View File

@ -1,6 +1,5 @@
package es.verdnatura.presentation.view.feature.paletizador.fragment
import android.content.Context
import android.graphics.drawable.Drawable
import android.view.View
@ -30,13 +29,9 @@ class ExpeditionPalletDetailFragment(
) {
private var adapter: ExpeditionPalletViewAdapter? = null
// private lateinit var customDialogList: CustomDialogList
private var onPalletClickListener: OnPalletClickListener? = null
private lateinit var customDialog: CustomDialog
companion object {
fun newInstance(item: ItemExpeditionTruckVO, itemPallet: ItemPalletVO) =
ExpeditionPalletDetailFragment(item, itemPallet)
@ -53,20 +48,19 @@ class ExpeditionPalletDetailFragment(
customDialog = CustomDialog(requireContext())
binding.expeditionPalletDetailPallet.text =
getString(R.string.pallet) + " " + itemPallet!!.Pallet
binding.splashProgress.visibility = View.VISIBLE
ma.hideBottomNavigation(View.GONE)
binding.mainToolbar.toolbarTitle.text =
itemExpeditionTruckVO!!.eta.toString() + " " + if (itemExpeditionTruckVO!!.Destino.isNullOrEmpty()) {
itemExpeditionTruckVO!!.eta.toString() + " " + if (itemExpeditionTruckVO!!.Destino.isNullOrEmpty()) {
itemExpeditionTruckVO!!.description
}else{
} else {
itemExpeditionTruckVO!!.Destino
}
setToolBar()
setEvents()
viewModel.expeditionPalletView(
itemPallet!!.Pallet
itemPallet!!.Pallet
)
super.init()
}
@ -79,7 +73,6 @@ class ExpeditionPalletDetailFragment(
binding.buttonOk.setOnClickListener {
requireActivity().onBackPressed()
}
}
@ -100,7 +93,6 @@ class ExpeditionPalletDetailFragment(
ToolBarAdapter(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
if (item == iconReload) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionPalletView(
itemPallet!!.Pallet
)
@ -114,9 +106,8 @@ class ExpeditionPalletDetailFragment(
customDialog.setTitle(getString(R.string.info))
customDialog.setDescription(getString(R.string.messageConfirm))
customDialog.setOkButton(getString(R.string.delete)) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionPalletDel(
itemPallet!!.Pallet
itemPallet!!.Pallet
)
customDialog.dismiss()
}
@ -126,7 +117,6 @@ class ExpeditionPalletDetailFragment(
customDialog.show()
} else if (item == iconPrint) {
binding.splashProgress.visibility = View.VISIBLE
if (ma.havePrinter() && ma.haveSector()) {
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(
@ -174,12 +164,10 @@ class ExpeditionPalletDetailFragment(
})
responsePrintPallet.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, true, isToasted = false)
} else {
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionStateAddByPallet(
itemPallet!!.Pallet,
"PALLETIZED"
@ -191,7 +179,6 @@ class ExpeditionPalletDetailFragment(
}
private fun printExpeditionList(it: ItemPalletViewListVO) {
binding.splashProgress.visibility = View.GONE
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
adapter = ExpeditionPalletViewAdapter(it.list)
binding.expeditionPalletRecyclerview.adapter = adapter

View File

@ -5,7 +5,6 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.formatWithQuotes
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
@ -93,7 +92,7 @@ class ExpeditionPalletDetailViewModel(var context: Context) : BaseViewModel(cont
vPalletFk: Int
) {
salix.expeditionPalletPrintLabel(arrayListOf(vPalletFk))
.enqueue(object : SilexCallback<Any>(context) {
.enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responsePrintPallet.value =
ResponseItemVO(isError = false, response = response.message())

View File

@ -27,8 +27,8 @@ import java.util.*
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class ExpeditionScanFragment(
var itemExpeditionTruckVO: ItemExpeditionTruckVO? = null,
var itemPalletVO: ItemPalletVO? = null
private var itemExpeditionTruckVO: ItemExpeditionTruckVO? = null,
private var itemPalletVO: ItemPalletVO? = null
) : BaseFragment<FragmentExpeditionScanBinding, ExpeditionScanViewModel>(
ExpeditionScanViewModel::class
) {
@ -70,7 +70,6 @@ class ExpeditionScanFragment(
customDialogTwoButtons = CustomDialogTwoButtons(requireContext())
binding.expeditionScanDetailPallet.text =
getString(R.string.pallet) + " " + itemPalletVO!!.Pallet
binding.splashProgress.visibility = View.VISIBLE
ma.hideBottomNavigation(View.GONE)
binding.mainToolbar.toolbarTitle.text =
itemExpeditionTruckVO!!.eta.toString() + " " + if (itemExpeditionTruckVO!!.Destino.isNullOrBlank()) {
@ -107,7 +106,6 @@ class ExpeditionScanFragment(
ToolBarAdapter(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
if (item == iconReload) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionScanList(itemPalletVO!!.Pallet)
} else if (item == iconPlus) {
expeditionScanAdd()
@ -172,7 +170,6 @@ class ExpeditionScanFragment(
private fun printExpeditionList(it: ItemExpeditionScanList) {
binding.splashProgress.visibility = View.GONE
val lm = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
adapter = ExpeditionScanAdapter(it.list, object : OnScanLongClickListener {
override fun onScanLongClickListener(itemExpeditionScan: ItemExpeditionScanVO) {
@ -183,7 +180,6 @@ class ExpeditionScanFragment(
)
.setDescription(getString(R.string.expedit) + itemExpeditionScan.expeditionFk)
.setOkButton(getString(R.string.delete)) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionScanDel(
itemExpeditionScan.id
)
@ -201,7 +197,6 @@ class ExpeditionScanFragment(
}
private fun expeditionScanAdd() {
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionScanAdd(
vPalletFk = itemPalletVO!!.Pallet,
vTruckFk = itemExpeditionTruckVO!!.id
@ -212,7 +207,6 @@ class ExpeditionScanFragment(
private fun showScanExpeditions(it: ItemScanList) {
listExpeditions = ArrayList()
binding.splashProgress.visibility = View.GONE
it.list.forEach {
if (it.expeditionFk != "0")
listExpeditions.add(BarcodeVO(code = it.expeditionFk))

View File

@ -5,7 +5,6 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
@ -82,7 +81,7 @@ class ExpeditionScanViewModel(val context: Context) : BaseViewModel(context) {
fun expeditionScanAdd(vPalletFk: Int, vTruckFk: Int) {
salix.expeditionScanAdd(arrayListOf(vPalletFk, vTruckFk))
.enqueue(object :
SilexCallback<List<ItemScanVO>>(context) {
SalixCallback<List<ItemScanVO>>(context) {
override fun onSuccess(response: Response<List<ItemScanVO>>) {
if (response.body() != null) {
_scanList.value = response.body()?.let { ItemScanList(it) }
@ -179,11 +178,8 @@ class ExpeditionScanViewModel(val context: Context) : BaseViewModel(context) {
}
fun expeditionScanDel(vScanFk: Int) {
//Tarea 5134 // no se cambia hasta que se suba test→master 11-17-23
salix.expeditionScanDel(vScanFk)
.enqueue(object : SalixCallback<Any>(context) {
//silex.expeditionScanDel(vScanFk)
//.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseDeleteScan.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(

View File

@ -29,7 +29,6 @@ class PalletScanFragment(
customDialogList = CustomDialogInput(requireContext())
ma.hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.GONE
setEvents()
setToolBar()
showPalletScan()

View File

@ -4,7 +4,6 @@ import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.formatWithQuotes
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
@ -33,7 +32,7 @@ class PalletScanViewModel(val context: Context) : BaseViewModel(context) {
vStatePallet
).formatWithQuotes()
)
.enqueue(object : SilexCallback<Unit>(context) {
.enqueue(object : SalixCallback<Unit>(context) {
override fun onError(t: Throwable) {
_responseScan.value = ResponseItemVO(

View File

@ -1,6 +1,5 @@
package es.verdnatura.presentation.view.feature.parking.fragment
import android.media.MediaPlayer
import android.os.Bundle
import android.view.inputmethod.EditorInfo
@ -16,37 +15,36 @@ import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import es.verdnatura.presentation.view.feature.parking.adapter.ParkingAdapter
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class ParkingFragment (var menuOrigin:String): BaseFragment<FragmentParkingBinding,ParkingViewModel>(ParkingViewModel::class) {
class ParkingFragment(var menuOrigin: String) :
BaseFragment<FragmentParkingBinding, ParkingViewModel>(ParkingViewModel::class) {
// private lateinit var customDialog: CustomDialog
private var scanerList:ArrayList<BarcodeVO> = ArrayList()
private var adapter : ParkingAdapter? = null
private var numParking : Int = 0
private var scanerList: ArrayList<BarcodeVO> = ArrayList()
private var adapter: ParkingAdapter? = null
private var numParking: Int = 0
var mperror: MediaPlayer? = null
var mpok: MediaPlayer? = null
override fun getLayoutId(): Int = R.layout.fragment_parking
companion object {
fun newInstance(menuOrigin: String) = ParkingFragment(menuOrigin = menuOrigin)
}
override fun init() {
// ma.progressAnimation(View.INVISIBLE)
setEvents()
binding.mainToolbar.toolbarTitle.text = getString(R.string.Parking)
if (menuOrigin ==getString(R.string.main)){hideBackButton(binding.mainToolbar)}
//sergio: después de las últimas actualizaciones se queda activo. Se cambia opción visibilidad.
//viewModel.hideProgressLoading()
// binding.splashProgress.visibility=View.GONE
if (menuOrigin == getString(R.string.main)) {
hideBackButton(binding.mainToolbar)
}
setList()
super.init()
}
private fun setEvents(){
private fun setEvents() {
binding.scanInput.requestFocus()
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
@ -66,44 +64,29 @@ class ParkingFragment (var menuOrigin:String): BaseFragment<FragmentParkingBindi
}
override fun observeViewModel() {
with(viewModel){
with(viewModel) {
response.observe(viewLifecycleOwner, Observer {
/* if (it.isError){
ma.messageWithSound(it.errorMessage, isError = true,isPlayed = true)
}else{*/
ma.messageWithSound(message=getString(R.string.Aparcado), isError = false,isPlayed = false, isToasted = true)
numParking -= 1
if (numParking <= 0) {
mpok?.start()
setList()
ma.messageWithSound(
message = getString(R.string.Aparcado),
isError = false,
isPlayed = false,
isToasted = true
)
numParking -= 1
if (numParking <= 0) {
mpok?.start()
setList()
}
// }
}
})
/* isLoading.observe(viewLifecycleOwner, Observer {
if (it){
binding.splashProgress.visibility = View.VISIBLE
}else{
binding.splashProgress.visibility = View.GONE
}
})
isLoadingProgress.observe(viewLifecycleOwner, {
binding.splashProgress.visibility = it
})*/
}
}
private fun setList(){
private fun setList() {
scanerList = ArrayList()
adapter = ParkingAdapter(scanerList,object: OnBarcodeRowClickListener{
adapter = ParkingAdapter(scanerList, object : OnBarcodeRowClickListener {
override fun onBarcodeRowClickListener(item: BarcodeVO) {
scanerList.removeAt(scanerList.indexOf(item))
adapter?.notifyDataSetChanged()
@ -115,31 +98,31 @@ class ParkingFragment (var menuOrigin:String): BaseFragment<FragmentParkingBindi
binding.fragmentParkingScanList.layoutManager = lm
}
private fun checkScan(txtScan:String){
var isParking:Boolean = false
if (txtScan.trim().length == 4 && isLetter(txtScan.substring(txtScan.length - 1)) || txtScan.contains("-")){
private fun checkScan(txtScan: String) {
var isParking = false
if (txtScan.trim().length == 4 && isLetter(txtScan.substring(txtScan.length - 1)) || txtScan.contains(
"-"
)
) {
isParking = true
}
if (isParking){
if (isParking) {
numParking = scanerList.size
scanerList.forEach {
// binding.splashProgress.visibility = View.VSIIBLE
viewModel.setParking(
parking = txtScan,
scanItem = it.code!!
parking = txtScan, scanItem = it.code!!
)
}
}else{
} else {
scanerList.add(BarcodeVO(code = txtScan))
adapter?.notifyDataSetChanged()
}
}
override fun onCreate(savedInstanceState: Bundle?) {
// val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER,0)
mperror = MediaPlayer.create((activity as MainActivity),R.raw.error)
mpok = MediaPlayer.create((activity as MainActivity),R.raw.ok)
mperror = MediaPlayer.create((activity as MainActivity), R.raw.error)
mpok = MediaPlayer.create((activity as MainActivity), R.raw.ok)
super.onCreate(savedInstanceState)
}
@ -148,5 +131,4 @@ class ParkingFragment (var menuOrigin:String): BaseFragment<FragmentParkingBindi
return text.matches(getString(R.string.regExp).toRegex())
}
}

View File

@ -2,7 +2,6 @@ package es.verdnatura.presentation.view.feature.pasillero.adapter
import android.content.Context
import android.os.Build
import android.util.Log
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.databinding.DataBindingUtil
@ -12,9 +11,9 @@ import es.verdnatura.BR
import es.verdnatura.R
import es.verdnatura.databinding.ItemMainMenuBinding
import es.verdnatura.databinding.ItemPasillerosMainMenuBinding
import es.verdnatura.domain.toast
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import timber.log.Timber.d
class PasillerosAdapter (
private val items: List<PasillerosItemVO>,
@ -84,7 +83,7 @@ class PasillerosAdapter (
try {
(binding as ItemMainMenuBinding).itemImage.setImageResource(item.iconResource)
}catch(exception:Exception){
// d("Exception::"+exception.message)
exception.toast(context)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -97,7 +96,7 @@ class PasillerosAdapter (
try {
(binding as ItemPasillerosMainMenuBinding).itemImage.setImageResource(item.iconResource)
}catch(exception:Exception){
//d("Exception::"+exception.message)
exception.toast(context)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
@ -106,20 +105,6 @@ class PasillerosAdapter (
}
/* binding.apply {
this.item = item
this.title = context?.getString(item.titleToShow)
try {
itemImage.setImageResource(item.iconResource)
}catch(exception:Exception){
d("Exception::"+exception.message)
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
itemImage.tooltipText=item.description
}
}*/
}
}
}

View File

@ -3,7 +3,7 @@ package es.verdnatura.presentation.view.feature.photos.fragment
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.SalixCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
@ -12,11 +12,8 @@ import okhttp3.MediaType
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Response
import retrofit2.http.Header
import retrofit2.http.Part
import retrofit2.http.QueryMap
import java.io.File
import java.util.*
import java.util.Date
class PhotosViewModel(val context: Context) : BaseViewModel(context) {
@ -44,7 +41,7 @@ class PhotosViewModel(val context: Context) : BaseViewModel(context) {
) {
salix.uploadImage("catalog",itemFK,filePart)
.enqueue(object : SilexCallback<Any>(context) {
.enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseinsert.value = ResponseItemVO(
isError = true,

View File

@ -35,7 +35,6 @@ class PreControladorFragment :
override fun init() {
binding.splashProgress.visibility = View.GONE
binding.mainToolbar.toolbarTitle.text = getString(R.string.titlePreControl)
setEvents()
super.init()

View File

@ -16,7 +16,8 @@ class PreControladorViewModel(val context: Context) : BaseViewModel(context) {
private val _collectionTicketList by lazy { MutableLiveData<CollectionVO>() }
val collectionTicketList: LiveData<CollectionVO>
get() = _collectionTicketList
//Tarea 6276
//a salix
fun collectionTicketGet(collectionFk: String, sectorFk: String, type: String) {
silex.collection_getTickets(collectionFk, sectorFk, "0", type).enqueue(object :
SilexCallback<CollectionVO>(context) {

View File

@ -189,13 +189,6 @@ class EndSacadorFragment(
} else {
saleTrackingReplace(positionUnmarked)
setTotalLines()
/* viewModel.saleTrackingDel(
getData(USER),
getData(PASSWORD),
saleFk = sales[positionUnmarked].saleFk,
"saleTracking_del"
)*/
goBack = false
}
@ -208,21 +201,6 @@ class EndSacadorFragment(
goBack = false
})
responseSalixMessage.observe(viewLifecycleOwner, Observer {
if (!goBack) {
if (it.isError) {
ma.messageWithSound(
getString(R.string.rocketKO) + it.errorMessage,
true,
false
)
}
}
goBack = false
})
responseIncQuantity.observe(viewLifecycleOwner, Observer {
if (!goBack) {
@ -401,7 +379,6 @@ class EndSacadorFragment(
private fun responseSaleMoveSuccesful() {
//Timber.d("responseSaleMove succesful")
try {
sales[positionCollectionSplit].saldo = quantityCollectionSplit.toInt()
} catch (e: Exception) {
@ -413,19 +390,6 @@ class EndSacadorFragment(
markLine(positionCollectionSplit)
saleAdapter!!.notifyDataSetChanged()
//enviar mensaje a salix
/* val ticket =
"[" + sales[positionCollectionSplit].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].id + "/summary)"
val message =
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket*/
/* viewModel.sendChekingPresence(
token = getData(TOKEN),
workerId = sales[positionCollectionSplit].salesPersonFk,
message = message,
"sendChekingPresence"
)*/
/* sendSalixMessageNew(message, sales[positionCollectionSplit].salesPersonFk)*/
}
@ -439,18 +403,6 @@ class EndSacadorFragment(
saleAdapter?.notifyDataSetChanged()
/* val ticket =
"[" + sales[positionIncreaseQuantity].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionIncreaseQuantity].id + "/summary)"
val message =
getString(R.string.modifiedQuantityPrevious) + sales[positionIncreaseQuantity].quantity + getString(
R.string.fromItem
) + sales[positionIncreaseQuantity].itemFk + getString(R.string.toNewQuantity) + quantityIncrease + getString(
R.string.fromTicket
) + ticket
sendSalixMessageNew(message, sales[positionIncreaseQuantity].salesPersonFk)*/
searchSaleCollection()
}
@ -466,7 +418,7 @@ class EndSacadorFragment(
}
private fun searchTicket(ticketFk: Int) {
//Log.i(TAG, "Escaneamos ticket en previa" + ticketFk)
ticket = ticketFk
if (ticketFk != 0)
@ -604,12 +556,10 @@ class EndSacadorFragment(
var isOk = false
for (saleVO in sales) {
//Timber.tag("VERDNATURA::").d("El item buscado es " + saleVO.itemFk)
if (saleVO.quantity != saleVO.picked) {
//1- Por carro
var shelvingIndex = 0
for (placementVO in saleVO.carros) {
//Timber.tag("VERDNATURA::").d("La matric " + placementVO.shelving)
if (txtscan.uppercase() == placementVO.shelving.uppercase()) {
if (mpok != null) mpok!!.start()
isOk = true
@ -703,15 +653,6 @@ class EndSacadorFragment(
saleFk = sales[position].idMovimiento
)
positionUnmarked = position
//sergio: anterior previa
/* viewModel.saleTrackingDel(
usuario =getData(USER),
password = getData(PASSWORD),
saleFk = sales[position].idMovimiento, "saleTracking_del"
)*/
//sergio: previa se pone después itemshelving_update
//saleTrackingReplace(positionUnmarked)
//setTotalLines()
scanRequest()
customDialog.dismiss()
}.setKoButton(getString(R.string.cancel)) {
@ -830,7 +771,7 @@ class EndSacadorFragment(
).toString()
)
originalItemScan = customDialogList.getValueTwo()
////Log.i("VERDNATURA:","el item original es $originalItemScan")
if (customDialogList.getValueTwo().isNotEmpty()) {
if (checkItemScan(customDialogList.getValueTwo())) {

View File

@ -24,8 +24,7 @@ import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
class InitPreSacadorFragment(
var entrypoint: String = ""
) :
BaseFragment<FragmentSacadorBinding, PreSacadorViewModel>(PreSacadorViewModel::class) {
) : BaseFragment<FragmentSacadorBinding, PreSacadorViewModel>(PreSacadorViewModel::class) {
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
private var goBack: Boolean = false
@ -50,8 +49,6 @@ class InitPreSacadorFragment(
customDialog = CustomDialog(requireContext())
customDialogInput = CustomDialogInput(requireContext())
binding.splashProgress.visibility = View.VISIBLE
binding.splashProgressTwo.visibility = View.GONE
setToolBar()
setEvents()
viewModel.sectorCollectionGet()
@ -87,19 +84,13 @@ class InitPreSacadorFragment(
}
listIcons.add(iconAdd)
// Tarea 4731
//listIcons.add(iconPrint)
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
when (item) {
iconAdd.drawable -> {
binding.splashProgress.visibility = View.VISIBLE
viewModel.sectorCollection_new(getDataInt(SECTORFK))
}
@ -115,7 +106,6 @@ class InitPreSacadorFragment(
private fun print() {
if (ma.havePrinter()) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.ticketPrintLabelPrevious(customDialogInput.getValue().toInt())
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(
requireContext()
@ -129,12 +119,10 @@ class InitPreSacadorFragment(
customDialogInput.setInputText(InputType.TYPE_CLASS_NUMBER)
customDialogInput.setTitle(getString(R.string.printTicket))
customDialogInput.setDescription(getString(R.string.printPreviousGroup))
.setValue("")
customDialogInput.setDescription(getString(R.string.printPreviousGroup)).setValue("")
.setOkButton(getString(R.string.print)) {
try {
if (customDialogInput.getValue().isNotEmpty()
) {
if (customDialogInput.getValue().isNotEmpty()) {
print()
}
} catch (ex: Exception) {
@ -152,10 +140,9 @@ class InitPreSacadorFragment(
ma.hideKeyboard(customDialogInput.getEditText())
customDialogInput.getEditText().setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (customDialogInput.getValue().isNotEmpty()
) {
if (customDialogInput.getValue().isNotEmpty()) {
print()
}
@ -177,43 +164,15 @@ class InitPreSacadorFragment(
with(viewModel) {
collectionList.observe(viewLifecycleOwner, Observer {
if (!goBack2) binding.splashProgress.visibility = View.GONE
createCollectionList(it.list)
binding.splashProgress.visibility = View.GONE
if (!goBack2) createCollectionList(it.list)
goBack2 = false
})
response.observe(viewLifecycleOwner, Observer {
binding.splashProgressTwo.visibility = View.GONE
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
} else {
if (goBack) addCollectionToList(it.response.toInt())
}
if (goBack) addCollectionToList(it.response.toInt())
goBack = false
//sergio:para asegurarnos que aparece en pantalla. En mi movil personal y trabajo no hacia falta.
//viewModel.PrecollectionGetSalix(token=getData(TOKEN))
})
responseNew.observe(viewLifecycleOwner, Observer {
binding.splashProgressTwo.visibility = View.GONE
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(
getString(R.string.errorCollectionNew) + it.errorMessage,
true,
false
)
} else {
//if (goBack)
viewModel.sectorCollectionGet()
}
goBack = false
//sergio:para asegurarnos que aparece en pantalla. En mi movil personal y trabajo no hacia falta.
//viewModel.PrecollectionGetSalix(token=getData(TOKEN))
})
}
}
@ -239,8 +198,7 @@ class InitPreSacadorFragment(
if (isNew) {
collectionsList.add(
CollectionVO(
collectionFk = collection,
created = getString(R.string.newCreated)
collectionFk = collection, created = getString(R.string.newCreated)
)
)
adapter?.notifyDataSetChanged()

View File

@ -12,8 +12,6 @@ import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
import es.verdnatura.presentation.view.feature.collection.listSaleSalix
import es.verdnatura.presentation.view.feature.collection.saleSalix
import es.verdnatura.presentation.view.feature.presacador.model.PreSacadorItemVO
import es.verdnatura.presentation.view.feature.sacador.mapper.toDateFormat
import es.verdnatura.presentation.view.feature.sacador.model.CollectionListVO
@ -68,13 +66,6 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
val responseIncQuantity: LiveData<ResponseItemVO>
get() = _responseIncQuantity
private val _responseSalixMessage by lazy { MutableLiveData<ResponseItemVO>() }
val responseSalixMessage: LiveData<ResponseItemVO>
get() = _responseSalixMessage
/* private val _responseMissingTrash by lazy { MutableLiveData<ResponseItemVO>() }
val responseMissingTrash: LiveData<ResponseItemVO>
get() = _responseMissingTrash*/
private val _responseItemShelvingUpdate by lazy { MutableLiveData<ResponseItemVO>() }
val responseItemShelvingUpdate: LiveData<ResponseItemVO>
@ -89,10 +80,6 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
val collectionList: LiveData<CollectionListVO>
get() = _collectionList
private val _responseNew by lazy { MutableLiveData<ResponseItemVO>() }
val responseNew: LiveData<ResponseItemVO>
get() = _responseNew
private val _responseSaleGroupAdd by lazy { MutableLiveData<ResponseItemVO>() }
val responseSaleGroupAdd: LiveData<ResponseItemVO>
get() = _responseSaleGroupAdd
@ -106,14 +93,12 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
get() = _responseSaleupdateIsChecked
fun parking(
ticketFk: String,
parking: String
ticketFk: String, parking: String
) {
salix.setParking(arrayListOf(ticketFk, parking).formatWithQuotes())
.enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message())
_response.value = ResponseItemVO(isError = false, response = response.message())
}
override fun onError(t: Throwable) {
@ -126,18 +111,13 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
}
fun itemPlacementSupplyAiming(
shelvingFk: String,
quantity: Int,
itemFk: Int
shelvingFk: String, quantity: Int, itemFk: Int
) {
salix.itemPlacementSupplyAiming(
arrayListOf(
shelvingFk,
quantity,
itemFk
shelvingFk, quantity, itemFk
).formatWithQuotes()
).enqueue(object :
SalixCallback<List<PlacementSupplyVO>>(context) {
).enqueue(object : SalixCallback<List<PlacementSupplyVO>>(context) {
override fun onSuccess(response: Response<List<PlacementSupplyVO>>) {
if (response.body() != null) {
_placementSuppleyList.value = response.body()?.let { PlacementSupplyListVO(it) }
@ -148,8 +128,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
itemShelvingFk = 0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
nameofFunction(this), response.message()
)
)
)
@ -172,17 +151,13 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
}
fun itemShelvingSaleAdd(
itemShelvingFk: Int,
saleFk: Int,
quantity: Int
itemShelvingFk: Int, saleFk: Int, quantity: Int
) {
salix.itemShelvingSaleAdd(
arrayListOf(
itemShelvingFk,
saleFk,
quantity
itemShelvingFk, saleFk, quantity
).formatWithQuotes()
).enqueue(object : SilexCallback<Any>(context) {
).enqueue(object : SalixCallback<Any>(context) {
override fun onResponse(call: Call<Any>, response: Response<Any>) {
_responseItemShelvingSaleSupplyAdd.value =
ResponseItemVO(isError = false, response = response.message())
@ -197,7 +172,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
})
}
fun saleTrackingReplace(
/* fun saleTrackingReplace(
saleFk: String,
vOriginalQuantity: String,
vStateFk: String,
@ -206,11 +181,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
) {
silex.saleTrackingReplace(
saleFk,
vOriginalQuantity,
vStateFk,
vIsChecked,
vBuyFk
saleFk, vOriginalQuantity, vStateFk, vIsChecked, vBuyFk
).enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
@ -223,64 +194,58 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
_response.value = ResponseItemVO(isError = false, response = "")
}
})
}
}*/
fun getIdFromCode(code: String) {
salix.barcodes_toitem(code)
.enqueue(object : SilexCallback<String?>(context) {
override fun onError(t: Throwable) {
salix.barcodes_toitem(code).enqueue(object : SalixCallback<String?>(context) {
override fun onError(t: Throwable) {
_responseCode.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<String?>) {
//sergio: espera item en el body
if (response.body() == null) {
_responseCode.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
isError = true, errorMessage = context.getString(R.string.itemNotValid)
)
} else {
_responseCode.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
}
override fun onSuccess(response: Response<String?>) {
//sergio: espera item en el body
if (response.body() == null) {
_responseCode.value = ResponseItemVO(
isError = true,
errorMessage = context.getString(R.string.itemNotValid)
)
} else {
_responseCode.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
}
}
})
}
})
}
fun saleTrackingDel(saleFk: String) {
silex.saleTrackingDel(saleFk)
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
/* fun saleTrackingDel(saleFk: String) {
silex.saleTrackingDel(saleFk).enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message())
_response.value = ResponseItemVO(isError = false, response = response.message())
}
})
}
}
})
}*/
fun collectionIncreaseQuantity(
saleFk: Int,
quantity: Int
saleFk: Int, quantity: Int
) {
salix.collectionIncreaseQuantitySalix(
SalixSaleQuantity(
saleFk,
quantity
saleFk, quantity
)
).enqueue(object : SilexCallback<Any>(context) {
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseIncQuantity.value = ResponseItemVO(
isError = true,
@ -297,249 +262,169 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
fun ticketPrintLabelPrevious(ticketFk: Int) {
salix.ticketPrintLabelPrevious(arrayListOf(ticketFk))
.enqueue(object : SilexCallback<Any>(context) {
.enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
})
}
fun sectorCollectionGet() {
salix.sectorCollectionGet(params = null).enqueue(object :
SalixCallback<List<CollectionVO>>(context) {
override fun onSuccess(response: Response<List<CollectionVO>>) {
if (response.body() != null) {
salix.sectorCollectionGet(params = null)
.enqueue(object : SalixCallback<List<CollectionVO>>(context) {
override fun onSuccess(response: Response<List<CollectionVO>>) {
_collectionList.value =
response.body()?.let { CollectionListVO(it.toDateFormat(context)) }
} else {
val listError: ArrayList<CollectionVO> = ArrayList()
listError.add(
CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
)
_collectionList.value = CollectionListVO(listError)
}
}
override fun onError(t: Throwable) {
val listError: ArrayList<CollectionVO> = ArrayList()
listError.add(
CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
)
_collectionList.value = CollectionListVO(listError)
}
})
}
})
}
fun sectorCollection_new(
sectorFk: Int
) {
salix.sectorCollectionNew(sectorFk).enqueue(
object :
SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(
isError = false,
errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
salix.sectorCollectionNew(sectorFk).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(
isError = false, errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
override fun onError(t: Throwable) {
_response.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
}
})
}
})
}
fun sectorCollection_getSale(
sectorCollectionFK: Int,
sectorFk: Int
sectorCollectionFK: Int, sectorFk: Int
) {
//Tarea 6276
//salix.sectorCollectionGetSale(sectorCollectionFK, sectorFk)
silex.sectorCollection_getSale(
sectorCollectionFK,
sectorFk.toString()
)
.enqueue(object :
SilexCallback<List<PreSacadorItemVO>>(context) {
override fun onError(t: Throwable) {
silex.sectorCollection_getSale(
sectorCollectionFK, sectorFk.toString()
).enqueue(object : SilexCallback<List<PreSacadorItemVO>>(context) {
override fun onError(t: Throwable) {
_salesList.value = listOf()
}
override fun onSuccess(response: Response<List<PreSacadorItemVO>>) {
if (response.body() != null) {
_salesList.value = response.body()?.let { it }
} else {
_salesList.value = listOf()
}
override fun onSuccess(response: Response<List<PreSacadorItemVO>>) {
if (response.body() != null) {
_salesList.value = response.body()?.let { it }
} else {
_salesList.value = listOf()
}
}
})
}
})
}
fun sectorCollectionSaleGroupAdd(
vSaleGroupFk: Int,
vSectorCollectionFk: Int
vSaleGroupFk: Int, vSectorCollectionFk: Int
) {
salix.sectorCollectionSaleGroupAdd(
arrayListOf(
vSaleGroupFk,
vSectorCollectionFk
vSaleGroupFk, vSectorCollectionFk
).formatWithQuotes()
).enqueue(
object :
SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responseSaleGroupAdd.value = ResponseItemVO(
isError = false,
errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responseSaleGroupAdd.value = ResponseItemVO(
isError = false, errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
}
)
}
override fun onError(t: Throwable) {
_response.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
)
}
})
}
})
}
fun saleTrackingAddPrevOK(
sectorCollectionFk: Int
) {
salix.saleTrackingAddPrevOK(arrayListOf(sectorCollectionFk))
.enqueue(
object :
SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseSaleAddPrevOK.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
}
override fun onSuccess(response: Response<Any>) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = false,
errorMessage = ""
+ getMessageFromAllResponse(
nameofFunction(this), response.message()
)
.enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
}
})
)
}
override fun onSuccess(response: Response<Any>) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = false, errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
})
}
fun saleTrackingUpdateIsChecked(
vSaleFk: Int,
vIsChecked: Boolean,
vIsScanned: Boolean?
vSaleFk: Int, vIsChecked: Boolean, vIsScanned: Boolean?
) {
salix.saleTrackingUpdateIsChecked(
arrayListOf(
vSaleFk,
vIsChecked,
vIsScanned
vSaleFk, vIsChecked, vIsScanned
).formatWithQuotes()
)
.enqueue(
object :
SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responseSaleupdateIsChecked.value = ResponseItemVO(
isError = false,
errorMessage = ""
+ getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responseSaleupdateIsChecked.value = ResponseItemVO(
isError = false, errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
override fun onError(t: Throwable) {
_responseSaleupdateIsChecked.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
override fun onError(t: Throwable) {
_responseSaleupdateIsChecked.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
)
}
})
}
})
}
fun itemShelving_updateFromSale(
saleFk: Int
) {
//Tarea 6276 pasar a Salix
//salix.itemShelvingUpdateFromSale(saleFk). Revisar si ok
silex.itemShelving_updateFromSale(
saleFk
)
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
).enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseItemShelvingUpdate.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
_responseItemShelvingUpdate.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
}
)
}
override fun onSuccess(response: Response<Any>) {
_responseItemShelvingUpdate.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
})
override fun onSuccess(response: Response<Any>) {
_responseItemShelvingUpdate.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
})
}
fun transferSalesSalix(
/* fun transferSalesSalix(
ticketFk: String,
saleFk: Int,
quantity: String,
@ -553,10 +438,8 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
).enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseSplit.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
)
}
@ -565,10 +448,8 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
//segio: salix devuelve id
if (response.body() == null) {
_responseSplit.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
} else {
@ -577,6 +458,6 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
}
}
})
}
}*/
}

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.qr
import android.view.View
import android.view.inputmethod.EditorInfo
import androidx.lifecycle.Observer
import es.verdnatura.R
@ -27,9 +26,7 @@ class QrFragment(
override fun init() {
binding.splashProgress.visibility = View.GONE
customDialog = CustomDialog(requireContext())
setToolbar()
setEvents()
super.init()
@ -60,8 +57,7 @@ class QrFragment(
goBack = false
if (!binding.scanInput.text.isNullOrEmpty()) {
binding.splashProgress.visibility = View.VISIBLE
/*viewModel.qr_getCall(
/* viewModel.qr_getCall(
binding.scanInput.text.toString()
)*/
itemscaned = binding.scanInput.text.toString()
@ -79,7 +75,7 @@ class QrFragment(
with(viewModel) {
qrresponse.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage + " " + itemscaned, true, false)

View File

@ -12,7 +12,6 @@ import es.verdnatura.presentation.common.OnCollectionSelectedListener
import es.verdnatura.presentation.view.feature.reubication.model.Reubication
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorViewModel
//Tarea #3754
class ReubicationFragment(var entrypoint: String) :
BaseFragment<FragmentGeneralBlackBinding, UbicadorViewModel>(
UbicadorViewModel::class
@ -35,7 +34,6 @@ class ReubicationFragment(var entrypoint: String) :
override fun init() {
binding.mainToolbar.toolbarTitle.text = entrypoint
binding.splashProgress.visibility = GONE
binding.scanInput.visibility = VISIBLE
setEvents()

View File

@ -22,7 +22,6 @@ import es.verdnatura.presentation.view.component.CustomDialogInput
import es.verdnatura.presentation.view.feature.sacador.adapter.CollectionAdapter
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
class SacadorFragment(
var type: String
) :
@ -36,7 +35,6 @@ class SacadorFragment(
private var collectionsList: ArrayList<CollectionVO> = ArrayList()
private var adapter: CollectionAdapter? = null
companion object {
fun newInstance(type: String) = SacadorFragment(type)
}
@ -59,7 +57,7 @@ class SacadorFragment(
}
private fun callBack(type: String) {
binding.splashProgress.visibility = View.VISIBLE
when (type) {
"PREPARED" -> {
viewModel.collectionGetSalix()
@ -70,7 +68,7 @@ class SacadorFragment(
}
else -> {
binding.splashProgress.visibility = View.GONE
}
}
}
@ -165,7 +163,6 @@ class SacadorFragment(
false
}
}
private fun printAction() {
@ -197,23 +194,17 @@ class SacadorFragment(
override fun observeViewModel() {
with(viewModel) {
binding.splashProgress.visibility = View.GONE
collectionList.observe(viewLifecycleOwner, Observer {
if (!goBack2) binding.splashProgress.visibility = View.GONE
createCollectionList(it.list)
binding.splashProgress.visibility = View.GONE
goBack2 = false
})
response.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
} else {
if (goBack) {
if (!it.response.isNullOrBlank()) addCollectionToList(it.response.toInt())
}
if (goBack) {
if (!it.response.isNullOrBlank()) addCollectionToList(it.response.toInt())
}
goBack = false
callBack(type)

View File

@ -51,6 +51,8 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
print: String,
type: String
) {
//Tarea 6276, falta modificar
silex.collection_getTickets(
collectionFk,
sectorFk,
@ -123,13 +125,6 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
})
}
@ -139,36 +134,24 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
//salix.collectionAssign()
silex.collection_assign()
.enqueue(
object :
SilexCallback<Int>(context) {
override fun onError(t: Throwable) {
_response.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
object :
SilexCallback<Int>(context) {
override fun onError(t: Throwable) {
_response.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
)
}
}
override fun onSuccess(response: Response<Int>) {
if (response.body() != null) {
override fun onSuccess(response: Response<Int>) {
_response.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
} else {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
})
}
fun collection_assignNew() {
@ -282,7 +265,7 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
fun sectorCollectionGet() {
salix.sectorCollectionGet().enqueue(object :
SilexCallback<List<CollectionVO>>(context) {
SalixCallback<List<CollectionVO>>(context) {
override fun onSuccess(response: Response<List<CollectionVO>>) {
if (response.body() != null) {
@ -304,6 +287,7 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
}
}
override fun onError(t: Throwable) {
val listError: ArrayList<CollectionVO> = ArrayList()
listError.add(
@ -323,39 +307,10 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
fun collectionGetSalix() {
salix.getCollectionSalix().enqueue(object :
SilexCallback<List<CollectionVO>>(context) {
override fun onError(t: Throwable) {
val listError: ArrayList<CollectionVO> = ArrayList()
listError.add(
CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
)
_collectionList.value = CollectionListVO(listError)
}
SalixCallback<List<CollectionVO>>(context) {
override fun onSuccess(response: Response<List<CollectionVO>>) {
if (response.body() != null) {
_collectionList.value =
response.body()?.let { CollectionListVO(it.toDateFormat(context)) }
} else {
val listError: ArrayList<CollectionVO> = ArrayList()
listError.add(
CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
)
_collectionList.value = CollectionListVO(listError)
}
_collectionList.value =
response.body()?.let { CollectionListVO(it.toDateFormat(context)) }
}
})
@ -363,7 +318,7 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
fun collectionGetSalixLocal() {
salix.getCollectionSalixLocal().enqueue(object :
SilexCallback<List<CollectionTicket>>(context) {
SalixCallback<List<CollectionTicket>>(context) {
override fun onError(t: Throwable) {
val listError: ArrayList<CollectionTicket> = ArrayList()
listError.add(

View File

@ -39,8 +39,6 @@ class ShowTicketFragment(var menuOrigin: String) :
binding.scanInput.visibility = View.VISIBLE
binding.mainToolbar.toolbarTitle.text = getString(R.string.verticket)
ma.hideBottomNavigation(View.VISIBLE)
binding.splashProgress.visibility = View.GONE
if (menuOrigin == getString(R.string.main)) {
hideBackButton(binding.mainToolbar)
}

View File

@ -1,13 +1,11 @@
package es.verdnatura.presentation.view.feature.ticket.fragment
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo
import es.verdnatura.R
import es.verdnatura.databinding.FragmentGeneralBlackBinding
import es.verdnatura.presentation.base.BaseFragment
class TicketAdvanceFragment(var title: String) :
BaseFragment<FragmentGeneralBlackBinding, TicketViewModel>(
TicketViewModel::class
@ -24,13 +22,11 @@ class TicketAdvanceFragment(var title: String) :
binding.scanInput.visibility = VISIBLE
binding.scanInput.hint = getString(R.string.scanLabelTicket)
binding.mainToolbar.toolbarTitle.text = title
binding.splashProgress.visibility = GONE
setEvents()
super.init()
}
private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener {
@ -41,10 +37,9 @@ class TicketAdvanceFragment(var title: String) :
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (!binding.scanInput.text.isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
try {
viewModel.ticket_advancePackaging(
viewModel.ticketAdvancePackaging(
binding.scanInput.text.toString().toInt(),
mobileApplication.userId!!
)
@ -61,24 +56,5 @@ class TicketAdvanceFragment(var title: String) :
}
}
override fun observeViewModel() {
with(viewModel) {
response.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
ma.messageWithSound(
if (it.isError) {
it.errorMessage
} else {
getString(R.string.ticketAdvancePagkaging)
}, it.isError, true, isToasted = true
)
}
}
}
}

View File

@ -1,47 +1,18 @@
package es.verdnatura.presentation.view.feature.ticket.fragment
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.SalixCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.common.packingSiteSalix
import retrofit2.Response
class TicketViewModel(val context: Context) : BaseViewModel(context) {
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
val response: LiveData<ResponseItemVO>
get() = _response
fun ticket_advancePackaging(
ticketFk: Int,
workerFk: Int
fun ticketAdvancePackaging(
ticketFk: Int, workerFk: Int
) {
salix.ticket_advancePackaging(packingSiteSalix(ticketFk, workerFk))
.enqueue(object : SilexCallback<Unit>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Unit>) {
_response.value =
ResponseItemVO(isError = false, response = response.message())
}
})
.enqueue(object : SalixCallback<Unit>(context) {})
}
}

View File

@ -1,16 +0,0 @@
package es.verdnatura.presentation.view.feature.transferencia.fragment
import es.verdnatura.R
import es.verdnatura.databinding.FragmentTransferenciaBinding
import es.verdnatura.presentation.base.BaseFragment
class TransferenciaFragment : BaseFragment<FragmentTransferenciaBinding,TransferenciaViewModel>(TransferenciaViewModel::class) {
companion object {
fun newInstance() = TransferenciaFragment()
}
override fun getLayoutId(): Int = R.layout.fragment_transferencia
}

View File

@ -1,29 +0,0 @@
package es.verdnatura.presentation.view.feature.transferencia.fragment
import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.common.ResponseItemVO
class TransferenciaViewModel(context: Context) : BaseViewModel(context) {
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
val response: LiveData<ResponseItemVO>
get() = _response
/* fun itemShelvingTransfer(usuario:String,password:String,itemFk:String,shelvingFk:String){
getUbicadorUserCase.itemShelvingTransfer(usuario,password,itemFk,shelvingFk).enqueue(object :
Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(isError = true,errorMessage ="Error en llamada itemShelvingTransfer."+t.message!!)
}
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessul == null){
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelvingTransfer")
}else{
_response.value = ResponseItemVO(isError = false,response = response.message()!!)
}
}
})
}*/
}

View File

@ -106,7 +106,6 @@ class AutomaticAddItemFragment(
listString.add(it.item)
listInt.add(it.item)
}
binding.splashProgress.visibility = View.VISIBLE
if (binding.mainToolbar.toolbarTitle.text.equals(getString(R.string.titleChecker))) {
@ -133,12 +132,8 @@ class AutomaticAddItemFragment(
override fun observeViewModel() {
with(viewModel) {
response.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
} else {
requireActivity().onBackPressed()
}
})
}
}

View File

@ -14,8 +14,8 @@ import java.lang.Boolean.TRUE
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class AutomaticAddItemFragmentTEST(
var shelvingFk: String = "",
var titleAction: String? = null
private var shelvingFk: String = "",
private var titleAction: String? = null
) : BaseFragment<FragmentAutomaticAddItemBinding, AutomaticAddItemViewModel>(
AutomaticAddItemViewModel::class
) {
@ -108,7 +108,7 @@ class AutomaticAddItemFragmentTEST(
listString.add(it)
listInt.add(it)
}
binding.splashProgress.visibility = View.VISIBLE
if (binding.mainToolbar.toolbarTitle.text.equals(getString(R.string.titleChecker))) {
@ -136,12 +136,7 @@ class AutomaticAddItemFragmentTEST(
override fun observeViewModel() {
with(viewModel) {
response.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
} else {
requireActivity().onBackPressed()
}
})
}
}

View File

@ -4,7 +4,6 @@ import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.formatWithQuotes
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
@ -27,7 +26,7 @@ class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) {
//salix.itemShelvingMakeMulti(MakeMultiSalix(shelvingFk,items,warehouseFk))
silex.itemShelvingMake_multi(shelvingFk, items, warehouseFk)
.enqueue(object :
SilexCallback<Any>(context) {
SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(

View File

@ -7,7 +7,6 @@ import android.media.MediaPlayer
import android.os.Build
import android.os.Bundle
import android.text.InputType
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo
@ -31,7 +30,6 @@ import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
import java.lang.Boolean.TRUE
import kotlin.math.roundToInt
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class UbicadorFragment(
var shelvingFk: String = "",
@ -59,7 +57,6 @@ class UbicadorFragment(
var mpok: MediaPlayer? = null
var isBack = false
companion object {
fun newInstance(entryPoint: String, autoSelf: Boolean = false) =
UbicadorFragment(entryPoint, autoSelf)
@ -94,7 +91,6 @@ class UbicadorFragment(
setToolBar()
if (!shelvingFk.isNullOrEmpty()) {
isShelvinLogfromMainScreen = false
binding.splashProgress.visibility = VISIBLE
binding.mainToolbar.toolbarTitle.text = shelvingFk
viewModel.itemShelvingList(shelvingFk)
} else {
@ -123,7 +119,6 @@ class UbicadorFragment(
val iconReset = ImageView(context)
iconReset.setImageResource(R.drawable.ic_remove_checks)
//Tarea#5052
binding.mainToolbar.switchButton.visibility = VISIBLE
binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked ->
if (binding.mainToolbar.toolbarTitle.text == getString(R.string.titleUbicator)) {
@ -143,7 +138,7 @@ class UbicadorFragment(
if (!isChecked) {
listLocalItems.clear()
listIcons.remove(iconReset)
}else{
} else {
listIcons.add(iconReset)
}
binding.mainToolbar.toolbarIcons.adapter!!.notifyDataSetChanged()
@ -180,7 +175,6 @@ class UbicadorFragment(
if (!shelvingFk.isNullOrEmpty()) {
binding.editPrioridad.setText("")
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingList(
shelvingFk
)
@ -192,14 +186,12 @@ class UbicadorFragment(
}
}
iconReset.drawable -> {
if (!shelvingFk.isNullOrBlank()) {
customDialog.setTitle(getString(R.string.checkItemShelvingDescrip))
.setDescription(getString(R.string.checkItemShelving))
.setOkButton(getString(R.string.ok)) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.itemShelving_deleteChecked(shelvingFk)
viewModel.itemShelvingDeleteChecked(shelvingFk)
customDialog.dismiss()
}
.setKoButton(getString(R.string.cancel)) {
@ -237,22 +229,18 @@ class UbicadorFragment(
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (!binding.editMatricula.text.toString().isNullOrEmpty()) {
/*Tarea 5336 */
if (!modeCheckUbication || (modeCheckUbication && binding.editMatricula.text.toString().length == 3 && !binding.editMatricula.text!![0].isDigit())) {
binding.mainToolbar.toolbarTitle.text =
binding.editMatricula.text.toString()
shelvingFk = binding.editMatricula.text.toString()
parking = ""
binding.editPrioridad.setText("")
binding.splashProgress.visibility = VISIBLE
isShelvinLogfromMainScreen = true
viewModel.itemShelvingList(
binding.editMatricula.text.toString()
)
} else {
try {
binding.splashProgress.visibility = VISIBLE
viewModel.getIdFromCode(
code = itemScanValue(
binding.editMatricula.text.toString(),
@ -260,8 +248,8 @@ class UbicadorFragment(
"more"
).toString()
)
} catch (Ex: Exception) {
ma.messageWithSound(Ex.message.toString(), true, true)
} catch (ex: Exception) {
ma.messageWithSound(ex.message.toString(), true, true)
}
}
@ -277,11 +265,11 @@ class UbicadorFragment(
binding.editPrioridad.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (!binding.editPrioridad.text.toString().isNullOrEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.shelvingPriorityUpdate(
binding.editPrioridad.toInt(),
shelvingFk
)
isBack = false
}
ma.hideKeyboard(binding.editPrioridad)
@ -297,7 +285,6 @@ class UbicadorFragment(
ma.onPasillerosItemClickListener(
PasillerosItemVO(title = getString(R.string.titleAuto)),
//PasillerosItemVO(title = getString(R.string.titleChecker)),
entryPoint = shelvingFk
)
else
@ -369,7 +356,7 @@ class UbicadorFragment(
customDialogInput.getEditText()
.setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 ) {
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
customDialogActionChange()
return@setOnEditorActionListener true
}
@ -473,7 +460,6 @@ class UbicadorFragment(
binding.automaticImg.tooltipText =
getTooltip(R.drawable.ic_flash_auto_black_24dp)
}
}
@ -486,147 +472,120 @@ class UbicadorFragment(
event.getContentIfNotHandled().notNull {
deep = it.list.size
if (it.list.isNotEmpty() && it.list.get(0).isError) {
binding.splashProgress.visibility = View.GONE
ma.messageWithSound(
it.list.get(0).errorMessage,
it.list.get(0).isError,
isPlayed = false
listItems = ArrayList()
var contEtiquetas = 0
it.list.forEach { item ->
try {
contEtiquetas += item.stickers.toInt()
parking = item.code
} catch (ex: Exception) {
ex.message!!.toast(requireContext())
}
listItems.add(item)
}
etiquetas = contEtiquetas.toString()
binding.mainToolbar.toolbarTitle.text =
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
R.string.label
) + etiquetas
if (it.list.size > 0)
binding.editPrioridad.setText(it.list[0].priority)
for (item in listItems) {
for (localItem in listLocalItems) {
if (item.item == localItem.item) {
item.isNew = localItem.isNew
item.checked = localItem.checked
if (item.isNew && item.visible != "0") {
item.isNew = false
item.checked = true
}
binding.locationRecyclerview.postInvalidate()
}
}
}
if (!binding.mainToolbar.switchButton.isChecked && listItems.isNotEmpty()) {
listItems = listItems.asReversed()
}
adapter = UbicadorAdapter(
listItems.sortedBy { it.isChecked },
onPasillerosItemClickListener = pasillerosItemClickListener!!,
onVisibleClickListener = object : OnVisibleClickListener {
override fun onVisibleClickListener(item: ItemUbicadorVO) {
if (!isAutoSelf) {
showAddItem(
item.item.toString(),
item.packing,
item.stickers,
item.visible,
true,
item,
grouping = if (item.grouping.isNullOrEmpty()) {
""
} else item.grouping
)
} else {
showAutoSelfConsumption(item)
}
}
},
onMoreClickListener = object : OnMoreClickListener {
override fun onMoreClickListener(item: ItemUbicadorVO) {
showMoreOptions(item)
}
})
binding.locationRecyclerview.adapter = adapter
binding.locationRecyclerview.layoutManager =
LinearLayoutManager(
requireContext(),
LinearLayoutManager.VERTICAL,
false
)
if (isShelvinLogfromMainScreen) {
viewModel.shelvinLog_add(shelvingFk)
}
if (modeCheckUbication) {
listItems.sortedBy { it.isChecked }
.forEachIndexed { index, item ->
if (item.item == itemScannedScreen) {
binding.locationRecyclerview.scrollToPosition(
index
)
}
}
} else {
listItems = ArrayList()
var contEtiquetas = 0
it.list.forEach { item ->
try {
contEtiquetas += item.stickers.toInt()
parking = item.code
} catch (e: Exception) {
}
listItems.add(item)
}
etiquetas = contEtiquetas.toString()
binding.mainToolbar.toolbarTitle.text =
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
R.string.label
) + etiquetas
if (it.list.size > 0)
binding.editPrioridad.setText(it.list[0].priority)
binding.splashProgress.visibility = View.GONE
for (item in listItems) {
for (localItem in listLocalItems) {
if (item.item == localItem.item) {
item.isNew = localItem.isNew
item.checked = localItem.checked
if (item.isNew && item.visible != "0") {
item.isNew = false
item.checked = true
}
binding.locationRecyclerview.postInvalidate()
}
}
}
if (!binding.mainToolbar.switchButton.isChecked && listItems.isNotEmpty()) {
listItems = listItems.asReversed()
}
adapter = UbicadorAdapter(
listItems.sortedBy { it.isChecked },
onPasillerosItemClickListener = pasillerosItemClickListener!!,
onVisibleClickListener = object : OnVisibleClickListener {
override fun onVisibleClickListener(item: ItemUbicadorVO) {
if (!isAutoSelf) {
showAddItem(
item.item.toString(),
item.packing,
item.stickers,
item.visible,
true,
item,
grouping = if (item.grouping.isNullOrEmpty()) {
""
} else item.grouping
)
} else {
showAutoSelfConsumption(item)
}
}
},
onMoreClickListener = object : OnMoreClickListener {
override fun onMoreClickListener(item: ItemUbicadorVO) {
showMoreOptions(item)
}
})
binding.locationRecyclerview.adapter = adapter
binding.locationRecyclerview.layoutManager =
LinearLayoutManager(
requireContext(),
LinearLayoutManager.VERTICAL,
false
)
if (isShelvinLogfromMainScreen) {
viewModel.shelvinLog_add(shelvingFk)
}
if (modeCheckUbication) {
listItems.sortedBy { it.isChecked }
.forEachIndexed { index, item ->
if (item.item == itemScannedScreen) {
binding.locationRecyclerview.scrollToPosition(
index
)
}
}
} else {
(binding.locationRecyclerview.layoutManager as LinearLayoutManager).scrollToPosition(
0
)
}
(binding.locationRecyclerview.layoutManager as LinearLayoutManager).scrollToPosition(
0
)
}
}
})
loadAddList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, false)
} else {
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingList(shelvingFk)
}
}
}
response.observe(viewLifecycleOwner, Observer {
if (it.isError) {
binding.splashProgress.visibility = GONE
ma.messageWithSound(it.errorMessage, it.isError, true)
} else {
viewModel.itemShelvingList(shelvingFk)
ma.messageWithSound("", it.isError, true, isToasted = false)
}
viewModel.itemShelvingList(shelvingFk)
})
responseLog.observe(viewLifecycleOwner, Observer {
@ -636,7 +595,6 @@ class UbicadorFragment(
})
loadResponseCode.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, it.isError, true)
@ -646,33 +604,14 @@ class UbicadorFragment(
}
}
responsepriority.observe(viewLifecycleOwner, Observer {
if (!isBack) {
binding.splashProgress.visibility = GONE
ma.messageWithSound(
if (it.isError) it.errorMessage else {
getString(R.string.priorityChanged)
}, it.isError, true
)
}
isBack = false
})
responseMake.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, true, isToasted = true)
} else {
if (!shelvingFk.isNullOrEmpty()) {
binding.mainToolbar.toolbarTitle.text = shelvingFk
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingList(
shelvingFk
)
if (!shelvingFk.isNullOrEmpty()) {
binding.mainToolbar.toolbarTitle.text = shelvingFk
viewModel.itemShelvingList(
shelvingFk
)
}
}
})
}
@ -688,7 +627,6 @@ class UbicadorFragment(
.setOkButton(getString(R.string.take)) {
try {
if (customDialogInput.getValue().toInt() > 0) {
binding.splashProgress.visibility = VISIBLE
var quantity =
if (item.visible.toInt() - customDialogInput.getValue()
.toInt() > 0
@ -717,7 +655,6 @@ class UbicadorFragment(
customDialogInput.setFocusText()
}
private fun showAddItem(
itemFk: String,
packing: String,
@ -878,8 +815,6 @@ class UbicadorFragment(
if (packing != null) {
if (updatePacking == null) {
if (itemFk != null && visible != null) {
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingAdd(
shelvingFk,
itemFk,
@ -898,7 +833,6 @@ class UbicadorFragment(
} else if (itemFk != null && etiquetas != null) {
val visible_calc = (etiquetas * packing!!.toInt())
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingAdd(
shelving = shelvingFk,
item = itemFk,
@ -923,7 +857,6 @@ class UbicadorFragment(
}
} else {
if (itemFk != null && visible != null && !updatePacking) {
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingMakeEdit(
visible,
packing!!.toInt(),
@ -945,7 +878,6 @@ class UbicadorFragment(
visible_calc = (etiquetas * packing.toInt())
} catch (e: Exception) {
}
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingMakeEdit(
visible_calc,
packing.toInt(),
@ -1036,9 +968,8 @@ class UbicadorFragment(
}.show()
}
private fun customDialogInputAction(item:ItemUbicadorVO) {
private fun customDialogInputAction(item: ItemUbicadorVO) {
if (customDialogInput.getValue().isNotEmpty()) {
binding.splashProgress.visibility = VISIBLE
viewModel.itemShelvingTransfer(
item.id,
customDialogInput.getValue()

View File

@ -20,7 +20,6 @@ import es.verdnatura.presentation.view.feature.reubication.model.ReubicationList
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorListVO
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
@ -63,28 +62,28 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
vShelvingFk: String
) {
salix.itemShelvingList(params = listOf(vShelvingFk.uppercase()).formatWithQuotes()).enqueue(
object : SalixCallback<List<ItemUbicadorVO>>(context) {
override fun onSuccess(response: Response<List<ItemUbicadorVO>>) {
_shelvingList.value = response.body()?.let { ItemUbicadorListVO(it) }
}
object : SalixCallback<List<ItemUbicadorVO>>(context) {
override fun onSuccess(response: Response<List<ItemUbicadorVO>>) {
_shelvingList.value = response.body()?.let { ItemUbicadorListVO(it) }
}
override fun onError(t: Throwable) {
val listError: ArrayList<ItemUbicadorVO> = ArrayList()
listError.add(
ItemUbicadorVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!,
),
override fun onError(t: Throwable) {
val listError: ArrayList<ItemUbicadorVO> = ArrayList()
listError.add(
ItemUbicadorVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!,
),
)
_shelvingList.value = ItemUbicadorListVO(listError)
}
),
)
_shelvingList.value = ItemUbicadorListVO(listError)
}
},
)
},
)
}
fun shelvingPriorityUpdate(
@ -95,17 +94,6 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
where = JsonObject().apply { addProperty("code", shelving) },
params = hashMapOf("priority" to priority)
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responsepriority.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
_responsepriority.value =
ResponseItemVO(isError = false, response = response.message())
}
})
}
@ -114,21 +102,13 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
) {
salix.itemShelvingAddList(
arrayListOf(shelving, items, isChecking, warehouse).formatWithQuotes()
).enqueue(object : SilexCallback<Any>(context) {
).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responseAddList.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
override fun onError(t: Throwable) {
_responseAddList.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
)
}
})
}
@ -145,17 +125,11 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
packing,
warehouse,
).formatWithQuotes()
).enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseMake.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
).enqueue(object : SalixCallback<Any>(context) {
override fun onResponse(call: Call<Any>, response: Response<Any>) {
_responseMake.value =
ResponseItemVO(isError = false, response = response.message()!!)
super.onResponse(call, response)
}
})
@ -169,14 +143,6 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
params = ItemShelvingSalix(visible = quantity, packing = packing, grouping = grouping),
id = itemShelvingFk,
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseMake.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
_responseMake.value =
ResponseItemVO(isError = false, response = response.message()!!)
@ -189,25 +155,12 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
shelving: String, parking: String
) {
salix.setParking(arrayListOf(shelving, parking).formatWithQuotes())
.enqueue(object : Callback<Any> {
.enqueue(object : SalixCallback<Any>(context) {
override fun onResponse(call: Call<Any>, response: Response<Any>) {
if (!response.isSuccessful) {
_response.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
} else {
_response.value =
ResponseItemVO(isError = false, response = response.message())
}
}
_response.value =
ResponseItemVO(isError = false, response = response.message())
super.onResponse(call, response)
override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
})
}
@ -220,34 +173,29 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
where = JsonObject().apply { addProperty("id", vShelf) },
params = hashMapOf("shelvingFk" to vShelvingFk)
).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
super.onSuccess(response)
}
})
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
super.onSuccess(response)
}
})
}
fun itemShelving_deleteChecked(
fun itemShelvingDeleteChecked(
vShelvingFk: String
) {
salix.itemShelvingsUpdate(
where = JsonObject().apply { addProperty("shelvingFk", vShelvingFk) },
params = hashMapOf("isChecked" to null)
).enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
})
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
super.onSuccess(response)
}
})
}
fun shelvinLog_add(
@ -257,19 +205,19 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
// salix.shelvingLogAdd(hashMapOf("code" to code))
silex.shelvingLog_add(code).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_responseLog.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
override fun onSuccess(response: Response<Any>) {
_responseLog.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
})
})
}
fun itemShelving_return(
shelvingFk: String,
) {
//Tarea 6273
//Tarea 6276
// salix.itemShelvingReturn(shelvingFk)
silex.itemShelving_return(shelvingFk)
.enqueue(object : SilexCallback<ArrayList<Reubication>>(context) {
@ -316,17 +264,12 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
where = JsonObject().apply { addProperty("shelvingFk", shelvingFk) },
hashMapOf("visible" to 0)
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(isError = false, response = response.message())
}
})
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(isError = false, response = response.message())
super.onSuccess(response)
}
})
}
fun shelvingChangeSalix(
@ -338,17 +281,12 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
where = JsonObject().apply { addProperty("shelvingFk", shelvingFkIn) },
hashMapOf("shelvingFk" to shelvingFkOut)
).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(isError = false, response = response.message())
}
})
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(isError = false, response = response.message())
super.onSuccess(response)
}
})
}
fun itemShelvingTransfer(
@ -373,19 +311,19 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
fun itemShelvingDelete(itemFk: Int) {
salix.itemShelvingsDelete(itemFk).enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
override fun onError(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 onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(isError = false, response = response.message())
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(isError = false, response = response.message())
}
})
}
})
}
fun itemShelvingSelfConsumption(shelvingFk: String, itemFk: Int, quantity: Int) {
@ -394,41 +332,33 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
shelvingFk, itemFk, quantity
).formatWithQuotes()
).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(isError = false, response = response.message())
}
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
})
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(isError = false, response = response.message())
}
})
}
fun getIdFromCode(code: String) {
salix.barcodes_toitem(code).enqueue(object : SilexCallback<String?>(context) {
override fun onError(t: Throwable) {
salix.barcodes_toitem(code).enqueue(object : SalixCallback<String?>(context) {
override fun onError(t: Throwable) {
_responseCode.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<String?>) {
if (response.body() == null) {
_responseCode.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
isError = true, errorMessage = context.getString(R.string.itemNotValid)
)
} else {
_responseCode.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
}
override fun onSuccess(response: Response<String?>) {
if (response.body() == null) {
_responseCode.value = ResponseItemVO(
isError = true, errorMessage = context.getString(R.string.itemNotValid)
)
} else {
_responseCode.value =
ResponseItemVO(isError = false, response = response.body()!!.toString())
}
}
})
}
})
}
}

View File

@ -3,8 +3,6 @@ package es.verdnatura.presentation.view.feature.workermistake.fragment
import android.content.Context
import android.os.Bundle
import android.view.View
import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
@ -19,7 +17,6 @@ import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel
import es.verdnatura.presentation.view.feature.workermistake.model.MistakeType
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
class PackingMistakeFragment(var menuOrigin: String) :
BaseFragment<FragmentGeneralBlackBinding, InventaryViewModel>(
@ -49,11 +46,8 @@ class PackingMistakeFragment(var menuOrigin: String) :
binding.scanInput.visibility = View.VISIBLE
binding.scanInput.hint = getString(R.string.scanLabelExpedition)
binding.mainToolbar.toolbarTitle.text = getString(R.string.titlePackingMistake)
binding.splashProgress.visibility = View.GONE
customDialogList = CustomDialogList(requireContext())
setEvents()
super.init()
}
@ -79,9 +73,8 @@ class PackingMistakeFragment(var menuOrigin: String) :
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
goBack = false
if (!binding.scanInput.text.isNullOrEmpty()) {
binding.splashProgress.visibility = View.VISIBLE
expeditionScan = binding.scanInput.text.toString()
viewModel.expeditionMistakeType_get()
viewModel.expeditionMistakeTypeGet()
}
binding.scanInput.setText("")
ma.hideKeyboard(binding.scanInput)
@ -94,32 +87,12 @@ class PackingMistakeFragment(var menuOrigin: String) :
override fun observeViewModel() {
with(viewModel) {
mistakeWorkerList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
showMistakeList(it.list)
}
responseAddMistake.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
ma.messageWithSound(
if (it.isError) {
if (it.codeError == 403) {
getString(R.string.userNotPermission)
} else {
it.errorMessage
}
} else {
getString(R.string.errorCauseRegistered)
}, it.isError, true, isToasted = true
)
}
}
}
private fun showMistakeList(list: List<MistakeType>) {
binding.splashProgress.visibility = View.GONE
listMistakes = ArrayList()
list.forEach {
listMistakes.add(GeneralItem(code = it.code, text = it.description))
@ -140,15 +113,13 @@ class PackingMistakeFragment(var menuOrigin: String) :
override fun OnGeneralItemRowClickListener(item: GeneralItem) {
list.forEach {
if (it.description == item.text) {
binding.splashProgress.visibility = VISIBLE
try {
viewModel.expeditionMistake_add(
viewModel.expeditionMistakeAdd(
vExpeditionFk = expeditionScan.toInt(),
vTypeFk = item.code.toString()
)
} catch (ex: Exception) {
binding.splashProgress.visibility = GONE
ma.messageWithSound(
getString(R.string.formatError),
true,
@ -166,7 +137,6 @@ class PackingMistakeFragment(var menuOrigin: String) :
})
customDialogList.getRecyclerView().adapter = listMistakesAdapter
customDialogList.getRecyclerView().layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)

View File

@ -156,14 +156,6 @@ class WorkermistakeFragment(
mistakeWorkerList.observe(viewLifecycleOwner) {
showMistakeList(it.list)
}
/*responseAddMistake.observe(viewLifecycleOwner) {
ma.messageWithSound(
message = getString(R.string.errorCauseRegistered),
it.isError,
true,
isToasted = true
)
}*/
}
}

View File

@ -16,6 +16,28 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_animation"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center"
>
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -2,7 +2,6 @@
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -20,10 +19,8 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
</LinearLayout>
<LinearLayout
@ -46,7 +43,6 @@
android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
@ -54,9 +50,7 @@
android:gravity="left"
android:text="@string/tickets"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2"
/>
android:textSize="@dimen/body2" />
<TextView
android:id="@+id/idTickets"
@ -87,7 +81,6 @@
android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" />
</LinearLayout>
<LinearLayout
@ -112,7 +105,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout4" />
<TextView
android:id="@+id/btnSave"
android:layout_width="match_parent"
@ -130,8 +122,6 @@
</LinearLayout>
'
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
@ -147,22 +137,21 @@
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
android:visibility="visible"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>

View File

@ -1,55 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/buyers_items"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_marginTop="50dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:listitem="@layout/item_card_row" />
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center"
>
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -190,9 +190,9 @@
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
@ -206,7 +206,6 @@
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"

View File

@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<data>
<variable
name="viewModel"
type="es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO"/>
type="es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
@ -18,17 +18,18 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="@dimen/toolbar_height"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_matricula"
android:layout_width="match_parent"
@ -48,6 +49,7 @@
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
<Button
android:id="@+id/button_finalizar"
style="@style/DefaultButton"
@ -70,15 +72,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/item_escaner_row"/>
tools:listitem="@layout/item_escaner_row" />
</LinearLayout>
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
@ -86,34 +84,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -8,40 +8,12 @@
android:layout_height="match_parent"
android:background="@color/verdnatura_black">
' <include
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,132 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColorHint="@android:color/darker_gray">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edit_itemFk"
style="@style/InputLineTextSearch"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:hint="@string/Escaneaetiqueta"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Parking"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Matrícula"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Visible"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Fecha"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/location_all_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
/>
</LinearLayout>
' <include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -7,8 +7,8 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black"
>
android:background="@color/verdnatura_black">
<LinearLayout
android:id="@+id/linearLayout"
android:layout_width="match_parent"
@ -20,15 +20,17 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
<TextView
android:id="@+id/expedition_pallet_detail_pallet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/verdnatura_pumpkin_orange"
android:text="@string/Pallet"
android:gravity="center"
android:textSize="@dimen/h6"/>
android:text="@string/Pallet"
android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/h6" />
</LinearLayout>
<LinearLayout
android:id="@+id/linearLayout2"
android:layout_width="match_parent"
@ -60,7 +62,6 @@
android:textSize="@dimen/body2" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
@ -77,7 +78,7 @@
tools:listitem="@layout/item_expedition_view_row" />
' <include
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
@ -99,28 +100,5 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -7,8 +7,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black"
>
android:background="@color/verdnatura_black">
<LinearLayout
android:id="@+id/linearLayout"
@ -21,14 +20,15 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
<TextView
android:id="@+id/expedition_scan_detail_pallet"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColor="@color/verdnatura_pumpkin_orange"
android:text="Pallet: "
android:gravity="center"
android:textSize="@dimen/h6"/>
android:text="Pallet: "
android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/h6" />
</LinearLayout>
<LinearLayout
@ -71,7 +71,6 @@
android:textSize="@dimen/body2" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
@ -87,35 +86,12 @@
tools:listitem="@layout/item_expeditionscan_row" />
' <include
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -38,7 +38,7 @@
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
android:visibility="invisible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
@ -12,11 +12,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="@dimen/toolbar_height"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
@ -39,7 +39,6 @@
android:textColorHint="@android:color/darker_gray" />
<ImageView
android:id="@+id/item_image"
@ -50,62 +49,70 @@
android:src="@drawable/ic_chevron_right_black_24dp"
android:visibility="gone" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:orientation="horizontal"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/Fecha"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/Cliente"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/Entrada"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/Salida"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Balance"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
android:gravity="center"
android:text="@string/Balance"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/historico_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/item_historico_row"/>
tools:listitem="@layout/item_historico_row" />
</LinearLayout>
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
@ -113,35 +120,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,133 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textColorHint="@android:color/darker_gray">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/filter_itemFk"
style="@style/InputLineTextSearch"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:layout_weight="1"
android:hint="@string/Filtro"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/ubicado"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/altillo"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/sinubicar"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/location_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/item_inventary_row"/>
</LinearLayout>
' <include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
@ -13,20 +12,19 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="@dimen/toolbar_height"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:orientation="horizontal"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min">
@ -64,47 +62,16 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/item_proposal_row"/>
tools:listitem="@layout/item_proposal_row" />
</LinearLayout>
' <include
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,118 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ItemFk"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="left"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="vDated"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="left"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="atShelving"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="balance"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/itemshelvingdayofsale_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/item_shelvingdayofsale_row"/>
</LinearLayout>
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
@ -9,8 +8,6 @@
android:layout_height="match_parent"
android:background="@drawable/background_login">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/constrainlayout_login"
android:layout_width="match_parent"
@ -42,25 +39,24 @@
android:layout_marginTop="0dp"
android:textColorHint="@android:color/darker_gray"
app:layout_constraintStart_toStartOf="@id/textview_welcome"
app:layout_constraintTop_toBottomOf="@id/textview_welcome"
>
app:layout_constraintTop_toBottomOf="@id/textview_welcome">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edittext_server"
style="@style/InputLineText"
inputType="none"
android:layout_width="match_parent"
android:layout_margin="8dp"
android:backgroundTint="@android:color/white"
android:hint="Server:"
inputType="none"
android:clickable="true"
android:drawableRight="@drawable/ic_chevron_right_black_24dp"
android:hint="Server:"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray"
android:drawableRight="@drawable/ic_chevron_right_black_24dp" />
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
@ -176,33 +172,6 @@
app:layout_constraintTop_toBottomOf="@id/button_login" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
@ -12,11 +11,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="@dimen/toolbar_height"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
app:layout_constraintTop_toTopOf="parent">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_username"
@ -40,10 +39,10 @@
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:visibility="gone"
android:textAlignment="center"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
android:textColorHint="@android:color/darker_gray"
android:visibility="gone" />
<TextView
android:id="@+id/filter_supplier"
@ -73,11 +72,12 @@
android:id="@+id/radiobuttonTypePackaging"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_marginTop="25dp"
android:gravity="center_horizontal"
android:visibility="invisible"
>
<RadioButton
android:id="@+id/radioButtonRec"
android:layout_width="wrap_content"
@ -96,48 +96,16 @@
android:text="@string/comeback"
android:textColor="@color/verdnatura_white" />
</RadioGroup>
</LinearLayout>
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent"
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -68,9 +68,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:orientation="horizontal"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min">
@ -97,10 +97,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.75"
android:paddingStart="@dimen/layout_margin_3"
android:text="Total"
android:textAlignment="textStart"
android:textColor="@color/verdnatura_white"
android:paddingStart="@dimen/layout_margin_3"
android:textSize="@dimen/body2" />
</LinearLayout>
@ -123,30 +123,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
@ -40,19 +40,20 @@
android:textSize="18dp"
app:layout_constraintStart_toEndOf="@+id/observations"
app:layout_constraintTop_toBottomOf="@+id/observations" />
<LinearLayout
android:id="@+id/textImages"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:orientation="horizontal"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min"
app:layout_constraintStart_toEndOf="@+id/textImage"
app:layout_constraintTop_toBottomOf="@+id/textImage" >
app:layout_constraintTop_toBottomOf="@+id/textImage">
<TextView
<TextView
android:id="@+id/openPickerImages"
android:layout_width="match_parent"
android:layout_height="48dp"
@ -61,7 +62,7 @@
android:text="Añadir nueva..."
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
</LinearLayout>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/listImagesRecycler"
@ -70,8 +71,7 @@
android:visibility="visible"
app:layout_constraintStart_toEndOf="@+id/textImages"
app:layout_constraintTop_toBottomOf="@+id/textImages"
tools:listitem="@layout/item_image_row"
/>
tools:listitem="@layout/item_image_row" />
<include
@ -81,25 +81,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -27,7 +27,7 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"/>
android:orientation="horizontal" />
<LinearLayout
@ -282,27 +282,6 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
tools:layout_editor_absoluteX="0dp"
tools:layout_editor_absoluteY="0dp">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
@ -9,20 +8,17 @@
android:layout_height="match_parent"
android:background="@color/verdnatura_black">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:hint="@string/Escaneaetiqueta"
android:inputType="textVisiblePassword"
android:lines="1"
android:maxLines="1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:hint="@string/Escaneaetiqueta"
android:inputType="textVisiblePassword"
android:lines="1"
android:maxLines="1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
<include
android:id="@+id/main_toolbar"
@ -31,27 +27,5 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
@ -36,16 +36,16 @@
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
@ -56,28 +56,5 @@
app:lottie_speed="2" />
</LinearLayout>
<LinearLayout
android:id="@+id/splash_progress_two"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,118 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black">
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/scan"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="50dp"
android:layout_marginEnd="25dp"
android:textColorHint="@android:color/darker_gray"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
style="@style/InputLineTextSearch"
android:layout_width="match_parent"
android:layout_marginStart="50dp"
android:layout_marginTop="75dp"
android:layout_marginEnd="50dp"
android:gravity="center_horizontal"
android:backgroundTint="@color/colorPrimary"
android:hint="@string/ScanPlateOrSmarttag"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray"
android:textDirection="firstStrong" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/scan_smarttag"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="25dp"
android:layout_marginTop="150dp"
android:layout_marginEnd="25dp"
android:textColorHint="@android:color/darker_gray"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input_smarttag"
style="@style/InputLineTextSearch"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_marginStart="50dp"
android:layout_marginTop="100dp"
android:layout_marginEnd="50dp"
android:backgroundTint="@color/colorPrimary"
android:gravity="center_horizontal"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray"
android:textDirection="firstStrong" />
<Button
android:id="@+id/button_punch"
style="@style/DefaultButton"
android:layout_width="250dp"
android:layout_gravity="center"
android:layout_marginTop="0dp"
android:background="@drawable/btn_orange"
android:visibility="gone"
android:text="ESCANEAR CARROS"
android:textColor="@color/verdnatura_white"
tools:visibility="gone" />
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="visible">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,163 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColorHint="@android:color/darker_gray">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/shelvingText"
style="@style/InputLineTextSearch"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:hint="@string/Escaneashelving"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_dayrange"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColorHint="@android:color/darker_gray">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/dayrange"
style="@style/InputLineTextSearch"
android:layout_width="match_parent"
android:backgroundTint="@android:color/white"
android:hint="Day Range"
android:inputType="number"
android:text="1"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:paddingLeft="@dimen/layout_margin_min"
android:paddingRight="@dimen/layout_margin_min">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="ItemFk"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Concepto"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/SinServir"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Aparcado"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="center"/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/location_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/item_shelvingparking_row"/>
</LinearLayout>
' <include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
@ -58,11 +56,13 @@
android:layout_width="200dp"
android:layout_height="wrap_content"
android:text="Print all ZPL" />
<Button
android:id="@+id/button_print_status"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:text="Print status" />
<Button
android:id="@+id/button_print_disconnect"
android:layout_width="200dp"
@ -83,31 +83,5 @@
app:srcCompat="@drawable/alpha_b_circle_outline" />
</LinearLayout>
<LinearLayout
android:id="@+id/splash_progress"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,156 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_margin="@dimen/default_layout_margin"
android:paddingTop="@dimen/toolbar_height">
<TextView
android:id="@+id/textView13"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Escaneaetiqueta"
android:textColor="@color/verdnatura_white"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<EditText
android:id="@+id/editText7"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="@color/verdnatura_white"
android:ems="10"
android:hint="@string/Etiquetas"
android:inputType="number"
android:padding="8dp" />
<EditText
android:id="@+id/numEtiquetas"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:layout_weight="1"
android:background="@color/verdnatura_white"
android:ems="10"
android:hint="@string/cantidad"
android:inputType="number"
android:padding="8dp" />
</LinearLayout>
<TextView
android:id="@+id/textView19"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/carrodeorigen"
android:textColor="@color/verdnatura_white"
android:textSize="18sp" />
<EditText
android:id="@+id/editText10"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:background="@color/verdnatura_white"
android:padding="8dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:hint="@string/carrodeorigen"/>
<TextView
android:id="@+id/textView21"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/Carrodestino"
android:textColor="@color/verdnatura_white"
android:textSize="18sp" />
<EditText
android:id="@+id/editText11"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:background="@color/verdnatura_white"
android:padding="8dp"
android:layout_marginTop="10dp"
android:hint="@string/Carrodestino"/>
<Button
style="@style/DefaultButton"
android:id="@+id/button15"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/transfer"
android:background="@drawable/btn_orange"
android:layout_marginTop="20dp"
android:textColor="@color/verdnatura_white"
android:onClick="transferir"/>
</LinearLayout>
' <include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout
@ -12,17 +12,18 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="@dimen/toolbar_height"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:paddingTop="@dimen/toolbar_height">
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_matricula"
android:layout_width="match_parent"
@ -42,6 +43,7 @@
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_prioridad"
android:layout_width="match_parent"
@ -61,30 +63,34 @@
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" />
</com.google.android.material.textfield.TextInputLayout>
<ImageView
android:id="@+id/delete_img"
android:layout_width="@dimen/options_image_width"
android:layout_height="match_parent"
android:src="@drawable/ic_delete_forever_black_24dp"
android:padding="@dimen/options_image_padding"/>
android:padding="@dimen/options_image_padding"
android:src="@drawable/ic_delete_forever_black_24dp" />
<ImageView
android:id="@+id/edit_img"
android:layout_width="@dimen/options_image_width"
android:layout_height="match_parent"
android:src="@drawable/ic_mode_edit_black_24dp"
android:padding="@dimen/options_image_padding"/>
android:padding="@dimen/options_image_padding"
android:src="@drawable/ic_mode_edit_black_24dp" />
<ImageView
android:id="@+id/parking_img"
android:layout_width="@dimen/options_image_width"
android:layout_height="match_parent"
android:src="@drawable/ic_local_parking_black_24dp"
android:padding="@dimen/options_image_padding"/>
android:padding="@dimen/options_image_padding"
android:src="@drawable/ic_local_parking_black_24dp" />
<ImageView
android:id="@+id/automatic_img"
android:layout_width="@dimen/options_image_width"
android:layout_height="match_parent"
android:src="@drawable/ic_flash_auto_black_24dp"
android:padding="@dimen/options_image_padding"/>
android:padding="@dimen/options_image_padding"
android:src="@drawable/ic_flash_auto_black_24dp" />
</LinearLayout>
@ -93,16 +99,11 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
tools:listitem="@layout/item_ubication_row"/>
tools:listitem="@layout/item_ubication_row" />
</LinearLayout>
' <include
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
@ -110,33 +111,5 @@
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -9,43 +9,19 @@
android:background="@color/verdnatura_black">
<include
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center">
<WebView
android:id="@+id/webView"
android:layout_width="match_parent"
android:layout_marginTop="30dp"
android:layout_height="match_parent" />
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
android:visibility="invisible"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
android:layout_marginTop="0dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -1,111 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/verdnatura_black"
>
<EditText
android:id="@+id/scan_input"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@android:color/white"
android:hint="@string/Escaner"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray"
android:textSize="@dimen/body2"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar"
android:paddingLeft="@dimen/default_layout_margin"
android:visibility="gone"/>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/collection_swipe"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/btn_obtener"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/scan_input">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/fragment_sacador_collections"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="8dp"
tools:listitem="@layout/item_article_row" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
<Button
android:id="@+id/btn_obtener"
style="@style/DefaultButton"
android:layout_width="0dp"
android:layout_height="48dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/btn_orange"
android:text="@string/obtener"
android:textColor="@color/verdnatura_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/btn_cancelar"
app:layout_constraintStart_toStartOf="parent" />
<Button
android:id="@+id/btn_cancelar"
style="@style/DefaultButton"
android:layout_width="wrap_content"
android:layout_marginEnd="16dp"
android:layout_marginBottom="16dp"
android:background="@drawable/btn_blue"
android:text="@string/cancel"
android:textColor="@color/verdnatura_white"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
' <include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="visible"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

Some files were not shown because too many files have changed in this diff Show More