From 50beca0cf3161a2ec58967bd7804b517a9a26df3 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Tue, 24 Sep 2024 10:27:05 +0200 Subject: [PATCH] feat: boxPickingPrepared refs #7855 --- .../pasillero/fragment/PasilleroFragment.kt | 10 +++---- .../pasillero/fragment/PasilleroViewModel.kt | 26 ++++++------------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroFragment.kt index 85aa0f39..934321f1 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroFragment.kt @@ -39,7 +39,6 @@ class PasilleroFragment( override fun init() { ma.hideBottomNavigation(View.VISIBLE) - if (getString(R.string.main) == tagName) { val myWorkSelected: String = mobileApplication.dataStoreApp.readDataStoreKey( @@ -47,7 +46,7 @@ class PasilleroFragment( ) binding.mainToolbarDesign.layoutTool.visibility = View.GONE - if ( myWorkSelected != "Producción" && myWorkSelected != "") { + if (myWorkSelected != "Producción" && myWorkSelected != "") { binding.pasillerosItems.setBackgroundColor(Color.RED) binding.mainToolbarDesign.toolbarTitle.setBackgroundColor(Color.RED) binding.mainToolbarDesign.toolbarTitle.text = @@ -88,9 +87,8 @@ class PasilleroFragment( ).ifBlank { tagName } when (showMenu) { - getString(R.string.titleCorridors) -> { + getString(R.string.titleCorridors) -> viewModel.inititializeDefaultData() - } getString(R.string.titlePalletizers) -> viewModel.inititializeDefaultPallet() getString(R.string.titleBufferManegement) -> viewModel.inititializeDefaultBuffer() @@ -117,7 +115,7 @@ class PasilleroFragment( PasillerosItemVO( R.drawable.ic_picker_ui, R.string.titlePickers, - R.string.titlePickersDescrip + R.string.titlePickersDescrip ) ) @@ -127,7 +125,7 @@ class PasilleroFragment( viewModel.inititializeDefaultDataInit() } } - + super.onCreate(savedInstanceState) } diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt index d4a2ab7a..fb9eed9a 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt @@ -21,7 +21,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) { val userId = (contextApp as MobileApplication).userId private val isOnReservationMode = (contextApp as MobileApplication).dataStoreApp.readDataStoreKey(RESERVATIONMODE) - + fun inititializeDefaultData() { workerActivityAdd(CodeWorkerAction.STORAGE) _pasillerositem.add( @@ -61,13 +61,13 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) { ) //tarea 7855 - /* _pasillerositem.add( - PasillerosItemVO( - R.drawable.ic_scan_prepared, - R.string.scanPreparedExpedition), - R.string.scanPreparedExpedition) - ) - )*/ + _pasillerositem.add( + PasillerosItemVO( + R.drawable.ic_scan_prepared, + R.string.scanPreparedExpedition, + R.string.scanPreparedExpedition + ) + ) _pasillerositem.add( @@ -423,16 +423,6 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) { ) ) - if (userId == 19591) { - _pasillerositem.add( - PasillerosItemVO( - R.drawable.ic_previous_precontrol, - R.string.titlePreControlTest, - R.string.titlePreControlDescrip - ) - ) - } - _pasillerositem.add( PasillerosItemVO( R.drawable.ic_ticket, R.string.titleShowTicket, R.string.titleShowTicketDescrip