From 0044fcfaa9abad3dc004a887f1df29098887b17b Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Fri, 19 Apr 2024 08:53:41 +0200 Subject: [PATCH] =?UTF-8?q?refs=20#3520=20feat:silex=E2=86=92salix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/base/BaseViewModel.kt | 1 - .../collection/fragment/CollectionFragment.kt | 510 ++++++++---------- .../fragment/CollectionFragmentPreChecker.kt | 103 +--- .../fragment/CollectionViewModel.kt | 195 ++----- .../fragment/ControladorFragment.kt | 14 +- .../presacador/fragment/EndSacadorFragment.kt | 22 +- .../fragment/AutomaticAddItemFragment.kt | 4 +- .../fragment/AutomaticAddItemViewModel.kt | 9 +- app/src/main/res/layout/activity_sign.xml | 4 +- .../layout/fragment_automatic_add_item.xml | 23 - .../main/res/layout/fragment_collection.xml | 52 +- .../res/layout/fragment_collection_new.xml | 18 - .../main/res/layout/fragment_controlador.xml | 22 - .../res/layout/fragment_general_black.xml | 24 +- .../main/res/layout/fragment_item_card.xml | 54 +- .../main/res/layout/fragment_packaging.xml | 30 +- .../res/layout/fragment_packaging_obs.xml | 25 +- .../res/layout/fragment_packaging_summary.xml | 30 +- .../main/res/layout/fragment_pre_sacador.xml | 26 +- .../fragment_reubication_collection.xml | 17 - app/src/main/res/layout/fragment_sacador.xml | 27 +- .../main/res/layout/fragment_show_ticket.xml | 26 +- .../res/layout/fragment_vehiclecontrol.xml | 27 +- 23 files changed, 340 insertions(+), 923 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/base/BaseViewModel.kt b/app/src/main/java/es/verdnatura/presentation/base/BaseViewModel.kt index ce31c23e..c4cb93bf 100644 --- a/app/src/main/java/es/verdnatura/presentation/base/BaseViewModel.kt +++ b/app/src/main/java/es/verdnatura/presentation/base/BaseViewModel.kt @@ -16,7 +16,6 @@ abstract class BaseViewModel : ViewModel, LifecycleObserver { constructor() : super() constructor(context: Context) : super() { app = context as MobileApplication - silex = app.silex salix = app.salix } } diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt index f383af84..a56385a7 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt @@ -15,7 +15,6 @@ import android.text.InputType.TYPE_CLASS_TEXT import android.util.Log.d import android.view.KeyEvent import android.view.KeyEvent.ACTION_DOWN -import android.view.View import android.view.View.GONE import android.view.View.VISIBLE import android.view.WindowManager @@ -78,8 +77,7 @@ import org.json.JSONObject @Suppress("UNUSED_ANONYMOUS_PARAMETER") class CollectionFragment( - var collection: CollectionVO = CollectionVO(0), - var type: String = SACADOR + var collection: CollectionVO = CollectionVO(0), var type: String = SACADOR ) : BaseFragment(CollectionViewModel::class) { private lateinit var dataMessageSalix: DataMessageSalix @@ -160,9 +158,13 @@ class CollectionFragment( collection.collectionFk ) - //tarea 6458 viewModel.ticketState(collection.collectionFk) - workerFkFromTicket = collection.tickets.get(0).sales.get(0).workerFk + try { + workerFkFromTicket = collection.tickets[0].sales[0].workerFk + } catch (ex: Exception) { + getString(R.string.ticketWithoutWorker).toast(requireContext()) + } + } if (collection.tickets.isEmpty()) { @@ -188,7 +190,7 @@ class CollectionFragment( customDialog = CustomDialog(requireContext()) customDialogThreeButtons = CustomDialogThreeButtons(requireContext()) ma.hideBottomNavigation(GONE) - binding.splashProgress.visibility = VISIBLE + setEvents() setToolBar() if (collection.tickets.isNotEmpty()) { @@ -285,7 +287,7 @@ class CollectionFragment( private fun updateScreen() { canChangeState = false - binding.splashProgress.visibility = VISIBLE + viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -351,7 +353,6 @@ class CollectionFragment( private fun getCollection() { - binding.splashProgress.visibility = VISIBLE if (!buttonPushedGetCollection) { //Tarea 3520 viewModel.collectionGetId( @@ -360,12 +361,6 @@ class CollectionFragment( print = "0", type ) - /* viewModel.collection_get( - collection.collectionFk, - mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), - print = "0", - type - )*/ buttonPushedGetCollection = true } else { viewModel.collectionTicketGet( @@ -453,12 +448,12 @@ class CollectionFragment( isMarking = false binding.collectionSwipe.isRefreshing = false // if (type != PRECHECKER) { - binding.splashProgress.visibility = VISIBLE + viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), print = "0", - "" + " " ) buttonPushedGetCollection = false binding.collectionSwipe.isRefreshing = false @@ -490,7 +485,7 @@ class CollectionFragment( @RequiresApi(Build.VERSION_CODES.O) override fun observeViewModel() { with(viewModel) { - binding.splashProgress.visibility = GONE + collectionTicketList.observe(viewLifecycleOwner, Observer { if (!it.isError) { @@ -513,38 +508,36 @@ class CollectionFragment( }) responseUsedShelves.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) { ma.messageWithSound( if (it.isError) it.errorMessage else getString(R.string.savedShelves), - it.isError, true + it.isError, + true ) } }) responseParking.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) { - binding.splashProgress.visibility = GONE + ma.messageWithSound( if (it.isError) it.errorMessage else getString(R.string.Aparcado), - it.isError, true + it.isError, + true ) } }) responsePrint.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) { if (it.isError) { ma.messageWithSound( - it.errorMessage, - it.isError, true + it.errorMessage, it.isError, true ) } else { (getString(R.string.Imprimiendo) + mobileApplication.dataStoreApp.readDataStoreKey( @@ -558,19 +551,16 @@ class CollectionFragment( }) responseSplit.observe(viewLifecycleOwner) { - binding.splashProgress.visibility = GONE if (!goBack) { if (it.isError) { ma.messageWithSound( - it.errorMessage, - it.isError, true + it.errorMessage, it.isError, true ) } else { ma.messageWithSound( - getString(R.string.splitOk), - it.isError, true + getString(R.string.splitOk), it.isError, true ) //responseSaleMoveSuccesful() } @@ -585,7 +575,7 @@ class CollectionFragment( ma.messageWithSound(it.errorMessage, true, true) } else { ma.messageWithSound(getString(R.string.previousCollected), false, true) - binding.splashProgress.visibility = VISIBLE + viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -595,19 +585,19 @@ class CollectionFragment( } }) placementSuppleyList.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + if (!goBack) printShelvingResult(it) goBack = false }) item.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + if (!goBack) toastDisponibility(it) goBack = false }) responseNew.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = View.GONE + // if (!goBack) { if (it.isError) { customDialog.setTitle(getString(R.string.disponibility)) @@ -618,10 +608,6 @@ class CollectionFragment( }.show() } else { - binding.splashProgress.visibility = - VISIBLE - - if (!goBack) { viewModel.collectionTicketGet( @@ -639,7 +625,7 @@ class CollectionFragment( }) responseCode.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = View.GONE + if (!goBack2) { if (it.isError) { customDialog.setTitle(getString(R.string.error)) @@ -674,7 +660,7 @@ class CollectionFragment( }) responseTicketState.observe(viewLifecycleOwner) { - binding.splashProgress.visibility = GONE + if (!goBack) { if ((it.code == "ON_CHECKING" || it.code == "CHECKED") && it.user.id != mobileApplication.userId) { var customDialogWarningChecking = CustomDialog(requireContext()) @@ -685,17 +671,16 @@ class CollectionFragment( } else { getString(R.string.checkedByUser, it.user.username) } - ) - .setOkButton(getString(R.string.aware)) { - customDialogWarningChecking.dismiss() - }.show() + ).setOkButton(getString(R.string.aware)) { + customDialogWarningChecking.dismiss() + }.show() } } } responseTicketClosure.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + if (!goBack) { if (it.response.toBoolean()) { var customDialogWarning = CustomDialog(requireContext()) @@ -732,9 +717,7 @@ class CollectionFragment( } else { ma.messageWithSound( - getString(R.string.errorRegistered), - isError = false, - false + getString(R.string.errorRegistered), isError = false, false ) goBack = true } @@ -744,19 +727,15 @@ class CollectionFragment( responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE - if (it.isError) { - if (!goMistakeBack) - ma.messageWithSound( - getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + workerFkFromTicket, - isError = true, - true - ) + if (!goMistakeBack) ma.messageWithSound( + getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + workerFkFromTicket, + isError = true, + true + ) } else { - if (!goMistakeBack) - callPicker(it.response) + if (!goMistakeBack) callPicker(it.response) } goMistakeBack = true @@ -764,17 +743,13 @@ class CollectionFragment( mistakeList.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE - /*sergio:se quita y se pone esta comprobacion porque si no aparece de nuevo otra vez al volver atrás */ - if (!goMistakeBack) - showMistakeList(it.list) + if (!goMistakeBack) showMistakeList(it.list) goMistakeBack = true }) //sergio: para si hay algun ticket por revisar antes de parkinear responseCollectionUnchecked.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = View.GONE if (it.isError) { ma.messageWithSound(it.errorMessage, it.isError, false) @@ -787,9 +762,7 @@ class CollectionFragment( .setOkButton(getString(R.string.accept)) { customDialog.dismiss() - } - .setKoButton(getString(R.string.review)) { - binding.splashProgress.visibility = View.VISIBLE + }.setKoButton(getString(R.string.review)) { viewModel.collectionTicketGet( it.response.toInt(), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -801,8 +774,7 @@ class CollectionFragment( customDialog.show() } else { viewModel.setParking( - ticketFk = tickets[0].toInt(), - parking = ticketScanTxt + ticketFk = tickets[0].toInt(), parking = ticketScanTxt ) } // if (!goBack)navigateToCollectionList(it) @@ -812,9 +784,8 @@ class CollectionFragment( loadResponseDel.observe(viewLifecycleOwner) { event -> event.getContentIfNotHandled().notNull { - binding.splashProgress.visibility = View.INVISIBLE if (it.isError) { - binding.splashProgress.visibility = GONE + if (!goBack) { ma.messageWithSound(it.errorMessage, it.isError, false) @@ -837,7 +808,7 @@ class CollectionFragment( /* responseDel.observe(viewLifecycleOwner, Observer { if (it.isError) { - binding.splashProgress.visibility = GONE + if (!goBack) { ma.messageWithSound(it.errorMessage, it.isError, false) @@ -874,14 +845,13 @@ class CollectionFragment( responseSaleReplace.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (it.isError) { if (!goBack) { ma.messageWithSound(it.errorMessage, it.isError, true) - binding.splashProgress.visibility = VISIBLE + viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -903,12 +873,12 @@ class CollectionFragment( loadResponseSaleTrackingMark.observe(viewLifecycleOwner) { event -> event.getContentIfNotHandled().notNull { - binding.splashProgress.visibility = GONE + if (it.isError) { if (!goBack) { ma.messageWithSound(it.errorMessage, it.isError, true) - binding.splashProgress.visibility = VISIBLE + viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -969,7 +939,7 @@ class CollectionFragment( var salePerson = "" for (it in sales) { if (it.ticketFk.equals(ticketFk)) { - salePerson = it.salePersonFk?:"" + salePerson = it.salePersonFk ?: "" break } } @@ -982,7 +952,6 @@ class CollectionFragment( state = 0 binding.mainToolbar.toolbarTitle.text = collection.collectionFk.toString() - binding.splashProgress.visibility = View.GONE var salesList: ArrayList = ArrayList() tickets = ArrayList() var observations = "" @@ -991,8 +960,9 @@ class CollectionFragment( ticket.sales.forEach { saleVO -> if (type == SACADOR && saleVO.quantity != 0) { salesList.add(saleVO) - if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty()) - tickets.add(saleVO.ticketFk) + if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty()) tickets.add( + saleVO.ticketFk + ) } else if (type == CONTROLADOR) { salesList.add(saleVO) //Tarea 6607 @@ -1002,19 +972,21 @@ class CollectionFragment( } else { saleVO.packingChecked = 1 }*/ - if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty()) - tickets.add(saleVO.ticketFk) + if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty()) tickets.add( + saleVO.ticketFk + ) } else if (type == PRECHECKER) { if (saleVO.saleGroupFk != "") { salesList.add(saleVO) - if (tickets.firstOrNull { it == saleVO.ticketFk }.isNullOrEmpty()) - tickets.add(saleVO.ticketFk) + if (tickets.firstOrNull { it == saleVO.ticketFk } + .isNullOrEmpty()) tickets.add(saleVO.ticketFk) } } } - observations = observations.takeIf { !it.isNullOrBlank() }?.plus(" ${ticket.observations}") ?: "" - }//} + observations = + observations.takeIf { !it.isNullOrBlank() }?.plus(" ${ticket.observations}") ?: "" + } sales = salesList.sortedWith(compareBy({ it.saleOrder })) myGroupList = groupSaleGroup(salesList).sortedWith(compareBy({ it.saleOrder })) @@ -1031,86 +1003,85 @@ class CollectionFragment( } else { myGroupList },*/ - saleAdapter = - SaleAdapter( - myGroupList, - pasillerosItemClickListener!!, - object : OnQuantityClickListener { + saleAdapter = SaleAdapter( + myGroupList, + pasillerosItemClickListener!!, + object : OnQuantityClickListener { - override fun onQuantityClick(sale: SaleVO) { + override fun onQuantityClick(sale: SaleVO) { - sales.forEachIndexed { index, saleVO -> - if (saleVO.saleFk == sale.saleFk) { - if (type != "PRECHECKER") { - showQuantityDialog(index) + sales.forEachIndexed { index, saleVO -> + if (saleVO.saleFk == sale.saleFk) { + if (type != "PRECHECKER") { + showQuantityDialog(index) + } + + } + } + + } + }, + object : OnSaleClickListener { + override fun onSaleClick(sale: SaleVO) { + + sales.forEachIndexed { index, saleVO -> + if (saleVO.saleFk == sale.saleFk) { + + if (type == CONTROLADOR || type == PRECHECKER) {// sergio:cuidado , esta es de lo último para marcar colores + isScanned = false + markLine(index, type) + /// Log.i("VERDNATURA:","marcamos linea") + } else if (type == SACADOR) { + + if (sale.isPrepared == "0" || sale.isPrepared.isNullOrEmpty()) { + showScanner(index, sale) + } else { + unMarkLine(index, OK) } } } } - }, - object : OnSaleClickListener { - override fun onSaleClick(sale: SaleVO) { + } - sales.forEachIndexed { index, saleVO -> - if (saleVO.saleFk == sale.saleFk) { + }, + object : OnMistakeClickListener { + override fun onMistakeClickListener(sale: SaleVO) { + //Tarea #4969 - if (type == CONTROLADOR || type == PRECHECKER) {// sergio:cuidado , esta es de lo último para marcar colores - isScanned = false - markLine(index, type) - /// Log.i("VERDNATURA:","marcamos linea") - } else if (type == SACADOR) { + viewModel.mistakeType() + mistakeSale = sale + goMistakeBack = false - if (sale.isPrepared == "0" || sale.isPrepared.isNullOrEmpty()) { - showScanner(index, sale) - } else { - unMarkLine(index, OK) - } + } + }, + object : onPackingClickListener { + override fun onPackingClick(sale: SaleVO) { + } + }, + object : OnTicketClickListener { + override fun onTicketClickListener(sale: SaleVO) { + if (type == CONTROLADOR) { + //var ticketFk = sale.ticketFk - } - } - - } - } - - }, - object : OnMistakeClickListener { - override fun onMistakeClickListener(sale: SaleVO) { - //Tarea #4969 - binding.splashProgress.visibility = VISIBLE - viewModel.mistakeType() - mistakeSale = sale - goMistakeBack = false - - } - }, - object : onPackingClickListener { - override fun onPackingClick(sale: SaleVO) { - } - }, - object : OnTicketClickListener { - override fun onTicketClickListener(sale: SaleVO) { - if (type == CONTROLADOR) { - //var ticketFk = sale.ticketFk - - var entryPoint = Gson().toJson( - mutableMapOf( - "entryPoint" to sale.ticketFk, - "web" to "${ - mobileApplication.dataStoreApp.getServerSalix() - }/#!/ticket/${sale.ticketFk}/sale" - ) + var entryPoint = Gson().toJson( + mutableMapOf( + "entryPoint" to sale.ticketFk, "web" to "${ + mobileApplication.dataStoreApp.getServerSalix() + }/#!/ticket/${sale.ticketFk}/sale" ) - ma.onPasillerosItemClickListener( - PasillerosItemVO( - title = getString(R.string.titleWebViewer), - ), entryPoint = entryPoint - ) - } + ) + ma.onPasillerosItemClickListener( + PasillerosItemVO( + title = getString(R.string.titleWebViewer), + ), entryPoint = entryPoint + ) } - }, type = type - ) + } + }, + type = type + ) @@ -1133,10 +1104,8 @@ class CollectionFragment( if (type == SACADOR) { setStoredPosition(true) } else { - if (storedPosition != 0) - setListPosition(storedPosition, true) - else if (storedBackPosition != 0) - setListPosition(storedBackPosition, true) + if (storedPosition != 0) setListPosition(storedPosition, true) + else if (storedBackPosition != 0) setListPosition(storedBackPosition, true) } } @@ -1223,8 +1192,7 @@ class CollectionFragment( if (tickets.size > 0) { viewModel.setParking( - ticketFk = tickets[0].toInt(), - parking = txtscan + ticketFk = tickets[0].toInt(), parking = txtscan ) } @@ -1306,8 +1274,7 @@ class CollectionFragment( it.itemFk == txtscan.toInt() } if (!hasItemSales) { - binding.splashProgress.visibility = - VISIBLE + viewModel.collectionTicketGet( myScan, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -1317,8 +1284,7 @@ class CollectionFragment( if (type.equals(CONTROLADOR)) { - binding.splashProgress.visibility = - VISIBLE + viewModel.ticketIsOutClosureZone( myScan ) @@ -1331,7 +1297,7 @@ class CollectionFragment( } } catch (ex: Exception) { - binding.splashProgress.visibility = GONE + getString(R.string.errorInput).toast(requireContext()) } @@ -1365,8 +1331,7 @@ class CollectionFragment( } shelvingIndex += 1 } - } - /* + }/* if (!isOk){ //3- Por barcode saleVO.Barcodes.forEach { barcode -> @@ -1382,8 +1347,7 @@ class CollectionFragment( if (txtscan.contains("-")) { tickets.forEach { viewModel.setParking( - ticketFk = it.toInt(), - parking = txtscan + ticketFk = it.toInt(), parking = txtscan ) } @@ -1420,8 +1384,7 @@ class CollectionFragment( saleAdapter!!.notifyDataSetChanged() saleTrackingReplace(position, newType) - setListPosition(position, false) - /* } else { + setListPosition(position, false)/* } else { sales[position].packingChecked = sales[position].packingChecked - 1 saleAdapter!!.notifyDataSetChanged() }*/ @@ -1501,8 +1464,7 @@ class CollectionFragment( SECTORDESCRIP ).uppercase() == getString( R.string.sectorALGEMESINEW - ) - || type == PRECHECKER + ) || type == PRECHECKER ) { var myPosition = position @@ -1548,7 +1510,6 @@ class CollectionFragment( private fun saleTrackingReplace(position: Int, type: String) { //Tarea #4371 se quita para ver si funciona correctamente - //binding.splashProgress.visibility=VISIBLE viewModel.saleTrackingReplace( saleFk = sales[position].saleFk, isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1", @@ -1564,7 +1525,6 @@ class CollectionFragment( //Tarea #4371 se quita para ver si funciona correctamente private fun saleTracking_mark(position: Int, type: String) { - binding.splashProgress.visibility = VISIBLE viewModel.run { saleTracking_mark( saleFk = sales[position].saleFk, @@ -1586,41 +1546,37 @@ class CollectionFragment( state = 0 if (sales[position].isPrepared == "1") { - customDialog.setTitle(getString(R.string.unmarkLine)) - .setDescription( - getString(R.string.goUnmark) + sales[position].itemFk + getString( - R.string.sure - ) + customDialog.setTitle(getString(R.string.unmarkLine)).setDescription( + getString(R.string.goUnmark) + sales[position].itemFk + getString( + R.string.sure ) - .setOkButton(getString(R.string.unmark)) { - sales[position].isPrepared = "0" - sales[position].pickedQuantity = 0 - saleAdapter!!.notifyDataSetChanged() - setListPosition(position, false) - if (type != PRECHECKER) { + ).setOkButton(getString(R.string.unmark)) { + sales[position].isPrepared = "0" + sales[position].pickedQuantity = 0 + saleAdapter!!.notifyDataSetChanged() + setListPosition(position, false) + if (type != PRECHECKER) { - binding.splashProgress.visibility = VISIBLE + viewModel.itemShelvingUpdateFromSale( + sales[position].saleFk + ) + positionUnmarked = position - viewModel.itemShelvingUpdateFromSale( - sales[position].saleFk - ) - positionUnmarked = position + /* viewModel.saleTrackingDel( + getData(USER), + getData(PASSWORD), + saleFk = sales[position].saleFk, + "saleTracking_del" + )*/ - /* viewModel.saleTrackingDel( - getData(USER), - getData(PASSWORD), - saleFk = sales[position].saleFk, - "saleTracking_del" - )*/ - - } - setTotalLines() - scanRequest() - customDialog.dismiss() - }.setKoButton(getString(R.string.cancel)) { - scanRequest() - customDialog.dismiss() - }.show() + } + setTotalLines() + scanRequest() + customDialog.dismiss() + }.setKoButton(getString(R.string.cancel)) { + scanRequest() + customDialog.dismiss() + }.show() } } @@ -1629,11 +1585,10 @@ class CollectionFragment( private fun showShelving(position: Int, shelvingPosition: Int) { storedShelvingPosition = shelvingPosition storedPosition = position - binding.splashProgress.visibility = VISIBLE + var quantityGet = 0 try { - quantityGet = - (sales[position].quantity!! - sales[position].pickedQuantity!!.toInt()) + quantityGet = (sales[position].quantity!! - sales[position].pickedQuantity!!.toInt()) } catch (e: Exception) { } //Log.i("VERDNATURA:","Aparece para enviar") @@ -1656,8 +1611,7 @@ class CollectionFragment( if (!placementSupplyListVO.list.isEmpty()) { var placement: PlacementSupplyVO? = null placementSupplyListVO.list.forEach { placementVO -> - if (placementVO.stock != "0" && placement == null) - placement = placementVO + if (placementVO.stock != "0" && placement == null) placement = placementVO } if (placement != null) { shelving = placement!!.shelving @@ -1670,8 +1624,7 @@ class CollectionFragment( } listPlacementSupply = ArrayList() placementSupplyListVO.list.forEach { - if (it.stock != "0") - listPlacementSupply.add(BarcodeVO(code = it.proposal)) + if (it.stock != "0") listPlacementSupply.add(BarcodeVO(code = it.proposal)) //////Log.i("VERDNATURA:","Array de placementsupply") } try { @@ -1683,13 +1636,10 @@ class CollectionFragment( ) { if (customDialogList.getValueTwo().isNotEmpty()) { - isScanned = false - /*Tarea #5109*/ + isScanned = false/*Tarea #5109*/ customDialogList.setValueTwo( itemScanValue( - customDialogList.getValueTwo(), - "buy", - "more" + customDialogList.getValueTwo(), "buy", "more" ).toString() ) @@ -1705,8 +1655,7 @@ class CollectionFragment( if (checkItemScan(customDialogList.getValueTwo())) { onQuantityOfShelvingSelected(itemShelvingFk) //Log.i("VERDNATURA:","Cantidad seleccionada") - mpok?.start() - /* Se quita para comprobar al final de saleTracking_mark + mpok?.start()/* Se quita para comprobar al final de saleTracking_mark ReviewQuantityForRefreshingAndSorting( customDialogList.getValue().toInt(), sales[storedPosition].quantity!!.toInt(), @@ -1715,8 +1664,7 @@ class CollectionFragment( customDialogList.dismiss() } else { itemShelvingFkStored = itemShelvingFk - binding.splashProgress.visibility = - VISIBLE + viewModel.getIdFromCodeSalix( code = customDialogList.getValueTwo(), @@ -1739,8 +1687,7 @@ class CollectionFragment( hideKeyboards() customDialogList.dismiss() }.setHintValue(getString(R.string.quantitySelect)).setValue(total) - .setHintValueTwo(getString(R.string.scanItem)) - .setValueTwo("").show() + .setHintValueTwo(getString(R.string.scanItem)).setValueTwo("").show() } catch (e: Exception) { ma.messageWithSound(e.message.toString(), true, true) } @@ -1771,9 +1718,7 @@ class CollectionFragment( customDialogList.setValueTwo( itemScanValue( - customDialogList.getValueTwo(), - "buy", - "more" + customDialogList.getValueTwo(), "buy", "more" ).toString() ) @@ -1789,8 +1734,7 @@ class CollectionFragment( if (checkItemScan(customDialogList.getValueTwo())) { onQuantityOfShelvingSelected(itemShelvingFk) - mpok?.start() - /* ReviewQuantityForRefreshingAndSorting( + mpok?.start()/* ReviewQuantityForRefreshingAndSorting( customDialogList.getValue().toInt(), sales[storedPosition].quantity!!.toInt(), sales[storedPosition].pickedQuantity.toInt() @@ -1800,7 +1744,6 @@ class CollectionFragment( customDialogList.dismiss() } else { itemShelvingFkStored = itemShelvingFk - binding.splashProgress.visibility = View.VISIBLE viewModel.getIdFromCodeSalix( @@ -1831,22 +1774,20 @@ class CollectionFragment( ma.messageWithSound(e.message.toString(), true, true) } - placementSupplyAdapter = - BarcodeAdapter( - listPlacementSupply, - object : OnBarcodeRowClickListener { - override fun onBarcodeRowClickListener(item: BarcodeVO) { - placementSupplyListVO.list.forEach { - if (it.proposal == item.code) { - customDialogList.setValue(it.total) - total = it.total - itemShelvingFk = it.itemShelvingFk - } + placementSupplyAdapter = BarcodeAdapter( + listPlacementSupply, object : OnBarcodeRowClickListener { + override fun onBarcodeRowClickListener(item: BarcodeVO) { + placementSupplyListVO.list.forEach { + if (it.proposal == item.code) { + customDialogList.setValue(it.total) + total = it.total + itemShelvingFk = it.itemShelvingFk } - } - }, showDelete = false - ) + + } + }, showDelete = false + ) customDialogList.getRecyclerView().adapter = placementSupplyAdapter @@ -1856,8 +1797,7 @@ class CollectionFragment( } private fun ReviewQuantityForRefreshingAndSorting( - quantityTotal: Int, - quantityPicked: Int + quantityTotal: Int, quantityPicked: Int ) { if (quantityPicked < quantityTotal) { @@ -1876,8 +1816,7 @@ class CollectionFragment( } - private fun setStoredPosition(isFromBack: Boolean) { - /* if (type == SACADOR) { + private fun setStoredPosition(isFromBack: Boolean) {/* if (type == SACADOR) { for (indice in myGroupList.indices) { if (myGroupList[indice].isPrepared == "0") { @@ -1898,12 +1837,10 @@ class CollectionFragment( if (storedPosition >= 0 && sales.size > storedPosition) { val saleToCheck = sales[storedPosition] - if (saleToCheck.itemFk.toString() == valueToCheck) - return true + if (saleToCheck.itemFk.toString() == valueToCheck) return true else { saleToCheck.barcodes.forEach { barcode -> - if (barcode == valueToCheck) - return true + if (barcode == valueToCheck) return true } } } @@ -1917,8 +1854,7 @@ class CollectionFragment( try { val shelvingVisible = sales[storedPosition].placements[storedShelvingPosition].visible.substring( - 1, - sales[storedPosition].placements[storedShelvingPosition].visible.indexOf(")") + 1, sales[storedPosition].placements[storedShelvingPosition].visible.indexOf(")") ) if (quantity == 0) { @@ -1937,12 +1873,10 @@ class CollectionFragment( try { if (quantity == 0) { sales[storedPosition].pickedQuantity = - (sales[storedPosition].pickedQuantity!! + customDialogList.getValue() - .toInt()) + (sales[storedPosition].pickedQuantity!! + customDialogList.getValue().toInt()) } else { sales[storedPosition].pickedQuantity = - (sales[storedPosition].pickedQuantity!! + quantity - .toInt()) + (sales[storedPosition].pickedQuantity!! + quantity.toInt()) } } catch (e: Exception) { } @@ -2002,8 +1936,6 @@ class CollectionFragment( ) { getString(R.string.Todosloscampossonobligatorios).toast(requireContext()) } else { - binding.splashProgress.visibility = - VISIBLE //sergio datos para mensaje salix @@ -2042,9 +1974,7 @@ class CollectionFragment( try { customDialogList.setValue( itemScanValue( - customDialogList.getValue(), - "buy", - "more" + customDialogList.getValue(), "buy", "more" ).toString() ) @@ -2072,8 +2002,6 @@ class CollectionFragment( ) { getString(R.string.Todosloscampossonobligatorios).toast(requireContext()) } else { - binding.splashProgress.visibility = - VISIBLE dataMessageSalix = DataMessageSalix( ticket = ticketSelected, @@ -2142,8 +2070,7 @@ class CollectionFragment( totalMark += 1 } } else if (type == CONTROLADOR) { - if ((it.isControlled == "1" || it.isControlled == "2") && !it.isParent) - totalMark += 1 + if ((it.isControlled == "1" || it.isControlled == "2") && !it.isParent) totalMark += 1 }//Refactor #4030 else if (type == PRECHECKER) { @@ -2187,8 +2114,7 @@ class CollectionFragment( R.string.sectorALGEMESI ) && sectorDesciption.uppercase() != getString( R.string.sectorALGEMESINEW - ) - )) + ))) ) { customDialogInput.setTitle(getString(R.string.shlevesNumber)) @@ -2196,7 +2122,6 @@ class CollectionFragment( .setOkButton(getString(R.string.accept)) { if (!customDialogInput.getValue().isNullOrEmpty()) { - binding.splashProgress.visibility = VISIBLE viewModel.ticketCollection_setUsedShelves( ticketFk = collection.collectionFk, usedShelves = customDialogInput.getValue().toInt() @@ -2225,7 +2150,6 @@ class CollectionFragment( if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) { if (!customDialogInput.getValue().isNullOrEmpty()) { - binding.splashProgress.visibility = VISIBLE viewModel.ticketCollection_setUsedShelves( ticketFk = collection.collectionFk, usedShelves = customDialogInput.getValue().toInt() @@ -2251,8 +2175,7 @@ class CollectionFragment( try { customDialogThreeButtons.setDescription(getString(R.string.txtnuevacantidad)) - .setValue("") - .setOkButtonAdd(getString(R.string.Agregar)) { + .setValue("").setOkButtonAdd(getString(R.string.Agregar)) { increaseQuantity(position, customDialogThreeButtons.getValue().toInt()) scanRequest() customDialogThreeButtons.dismiss() @@ -2273,8 +2196,7 @@ class CollectionFragment( sales[positionCollectionMissing].quantity = quantityCollectionMissing saleAdapter!!.notifyDataSetChanged() - if (quantityCollectionMissing == 0) - markLine(positionCollectionMissing, type) + if (quantityCollectionMissing == 0) markLine(positionCollectionMissing, type) var totalQuantity: Int = 0 try { @@ -2285,7 +2207,7 @@ class CollectionFragment( saleAdapter!!.notifyDataSetChanged() - binding.splashProgress.visibility = VISIBLE + viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -2316,8 +2238,7 @@ class CollectionFragment( quantityIncrease = quantity viewModel.collectionIncreaseQuantitySalix( - saleFk = sales[position].saleFk, - quantity = quantity.toString() + saleFk = sales[position].saleFk, quantity = quantity.toString() ) } @@ -2327,15 +2248,13 @@ class CollectionFragment( if (type == CONTROLADOR) { tickets.forEach { viewModel.ticketStateTodaySetState( - ticketFk = it.toInt(), - state = "CHECKED" + ticketFk = it.toInt(), state = "CHECKED" ) } } else if (type == SACADOR) { tickets.forEach { viewModel.ticketStateTodaySetState( - ticketFk = it.toInt(), - state = "PREPARED" + ticketFk = it.toInt(), state = "PREPARED" ) } ////Refactor #4030 @@ -2343,8 +2262,7 @@ class CollectionFragment( } else if (type == PRECHECKER) { tickets.forEach { viewModel.ticketStateTodaySetState( - ticketFk = it.toInt(), - state = "PREVIOUS_CONTROLLED" + ticketFk = it.toInt(), state = "PREVIOUS_CONTROLLED" ) } } @@ -2404,8 +2322,7 @@ class CollectionFragment( val labelCount = arrayOf("1", "2", "3", "4", "5", "6", "7", "8", "9", "10") builder.setItems(labelCount) { dialog, which -> viewModel.collectionStickerPrint( - collectionFk = collection.collectionFk, - labelCount = (which + 1) + collectionFk = collection.collectionFk, labelCount = (which + 1) ) (getString(R.string.Imprimiendo) + mobileApplication.dataStoreApp.readDataStoreKey( PRINTERNAME @@ -2416,8 +2333,7 @@ class CollectionFragment( dialog.show() } else { viewModel.collectionStickerPrint( - collectionFk = collection.collectionFk, - null + collectionFk = collection.collectionFk, null ) } @@ -2427,21 +2343,20 @@ class CollectionFragment( private fun showMistakeList(list: List) { customDialogInput.dismiss() - binding.splashProgress.visibility = GONE + // listPlacementSupply = ArrayList() list.forEach { listPlacementSupply.add(BarcodeVO(code = it.description)) } customDialogList.setTitle(getString(R.string.errorCause)) - customDialogList.hideTextInput() - .setKoButton(getString(R.string.cancel)) { - scanRequest() - hideKeyboards() - listPlacementSupply.clear() - customDialogList.dismiss() + customDialogList.hideTextInput().setKoButton(getString(R.string.cancel)) { + scanRequest() + hideKeyboards() + listPlacementSupply.clear() + customDialogList.dismiss() - }.show() + }.show() placementSupplyAdapter = @@ -2451,8 +2366,7 @@ class CollectionFragment( if (it.description == item.code) { viewModel.saleMistakeAdd( - saleFk = mistakeSale?.saleFk!!, - typeFk = it.id + saleFk = mistakeSale?.saleFk!!, typeFk = it.id ) @@ -2505,7 +2419,7 @@ class CollectionFragment( isPrepared = value[0].isPrepared, isPreviousPrepared = value[0].isPreviousPrepared, isControlled = value[0].isControlled, - line3 = value[0].code?:"", //6676 + line3 = value[0].code ?: "", //6676 picked = value[0].picked, ticketFk = value[0].ticketFk, level = value[0].level @@ -2519,8 +2433,8 @@ class CollectionFragment( mySale.line1 = "Previa :${mySale.saleGroupFk}" mySale.line2 = "Líneas: ${value.size}" - mySale.line3 = value[0].code?:"" //6276 - mySale.placements = listOf(PlacementVO(shelving = value[0].code?:"")) //6276 + mySale.line3 = value[0].code ?: "" //6276 + mySale.placements = listOf(PlacementVO(shelving = value[0].code ?: "")) //6276 myList.add(mySale) } else { diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt index df413e6e..a488b973 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt @@ -14,7 +14,6 @@ import android.text.InputType.TYPE_CLASS_NUMBER import android.text.InputType.TYPE_CLASS_TEXT import android.view.KeyEvent import android.view.KeyEvent.ACTION_DOWN -import android.view.View import android.view.View.GONE import android.view.View.VISIBLE import android.view.WindowManager @@ -183,7 +182,6 @@ class CollectionFragmentPreChecker( customDialog = CustomDialog(requireContext()) customDialogThreeButtons = CustomDialogThreeButtons(requireContext()) ma.hideBottomNavigation(GONE) - binding.splashProgress.visibility = VISIBLE setEvents() setToolBar() if (collection.tickets.isNotEmpty()) { @@ -278,7 +276,6 @@ class CollectionFragmentPreChecker( } private fun updateScreen() { - binding.splashProgress.visibility = VISIBLE viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -342,30 +339,6 @@ class CollectionFragmentPreChecker( hideKeyboard() } - /* private fun getCollection() { - - binding.splashProgress.visibility = VISIBLE - if (!buttonPushedGetCollection) { - //Tarea 3520 - viewModel.collection_get( - collection.collectionFk, - mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), - print = "0", - type - ) - buttonPushedGetCollection = true - } else { - viewModel.collectionTicketGet( - lastScanned, - mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), - print = "0", - type - - ) - buttonPushedGetCollection = false - } - lastScanned = collection.collectionFk - }*/ private fun scanRequest() { binding.scanInput.requestFocus() @@ -473,7 +446,7 @@ class CollectionFragmentPreChecker( isMarking = false binding.collectionSwipe.isRefreshing = false // if (type != PRECHECKER) { - binding.splashProgress.visibility = VISIBLE + // viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -510,7 +483,7 @@ class CollectionFragmentPreChecker( @RequiresApi(Build.VERSION_CODES.O) override fun observeViewModel() { with(viewModel) { - binding.splashProgress.visibility = GONE + // collectionTicketList.observe(viewLifecycleOwner, Observer { if (!it.isError) { @@ -533,7 +506,7 @@ class CollectionFragmentPreChecker( }) responseUsedShelves.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + // if (!goBack) { ma.messageWithSound( @@ -544,10 +517,10 @@ class CollectionFragmentPreChecker( }) responseParking.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + // if (!goBack) { - binding.splashProgress.visibility = GONE + // ma.messageWithSound( if (it.isError) it.errorMessage else getString(R.string.Aparcado), it.isError, true @@ -557,7 +530,7 @@ class CollectionFragmentPreChecker( }) responsePrint.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + // if (!goBack) { @@ -578,7 +551,7 @@ class CollectionFragmentPreChecker( }) responseSplit.observe(viewLifecycleOwner) { - binding.splashProgress.visibility = GONE + // if (!goBack) { @@ -605,7 +578,7 @@ class CollectionFragmentPreChecker( ma.messageWithSound(it.errorMessage, true, true) } else { ma.messageWithSound(getString(R.string.previousCollected), false, true) - binding.splashProgress.visibility = VISIBLE + viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -615,19 +588,17 @@ class CollectionFragmentPreChecker( } }) placementSuppleyList.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) printShelvingResult(it) goBack = false }) item.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) toastDisponibility(it) goBack = false }) responseNew.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = View.GONE + // if (!goBack) { if (it.isError) { customDialog.setTitle(getString(R.string.disponibility)) @@ -638,10 +609,6 @@ class CollectionFragmentPreChecker( }.show() } else { - binding.splashProgress.visibility = - VISIBLE - - if (!goBack) { viewModel.collectionTicketGet( @@ -660,7 +627,7 @@ class CollectionFragmentPreChecker( }) responseCode.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = View.GONE + if (!goBack2) { if (it.isError) { customDialog.setTitle(getString(R.string.error)) @@ -711,7 +678,7 @@ class CollectionFragmentPreChecker( })*/ //Tarea 4280 responseTicketClosure.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + // if (!goBack) { if (it.response.toBoolean()) { var customDialogWarning = CustomDialog(requireContext()) @@ -771,7 +738,6 @@ class CollectionFragmentPreChecker( })*/ responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (it.isError) { if (!goMistakeBack) @@ -791,7 +757,7 @@ class CollectionFragmentPreChecker( mistakeList.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + /*sergio:se quita y se pone esta comprobacion porque si no aparece de nuevo otra vez al volver atrás */ if (!goMistakeBack) @@ -801,7 +767,7 @@ class CollectionFragmentPreChecker( //sergio: para si hay algun ticket por revisar antes de parkinear responseCollectionUnchecked.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = View.GONE + // if (it.isError) { ma.messageWithSound(it.errorMessage, it.isError, false) @@ -816,7 +782,7 @@ class CollectionFragmentPreChecker( } .setKoButton(getString(R.string.review)) { - binding.splashProgress.visibility = View.VISIBLE + // viewModel.collectionTicketGet( it.response.toInt(), mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -839,9 +805,8 @@ class CollectionFragmentPreChecker( loadResponseDel.observe(viewLifecycleOwner) { event -> event.getContentIfNotHandled().notNull { - binding.splashProgress.visibility = View.INVISIBLE + if (it.isError) { - binding.splashProgress.visibility = GONE if (!goBack) { ma.messageWithSound(it.errorMessage, it.isError, false) @@ -863,7 +828,7 @@ class CollectionFragmentPreChecker( /* responseDel.observe(viewLifecycleOwner, Observer { if (it.isError) { - binding.splashProgress.visibility = GONE + // if (!goBack) { ma.messageWithSound(it.errorMessage, it.isError, false) @@ -898,14 +863,13 @@ class CollectionFragmentPreChecker( responseSaleReplace.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (it.isError) { if (!goBack) { ma.messageWithSound(it.errorMessage, it.isError, true) - binding.splashProgress.visibility = VISIBLE + // viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -927,12 +891,12 @@ class CollectionFragmentPreChecker( loadResponseSaleTrackingMark.observe(viewLifecycleOwner) { event -> event.getContentIfNotHandled().notNull { - binding.splashProgress.visibility = GONE + if (it.isError) { if (!goBack) { ma.messageWithSound(it.errorMessage, it.isError, true) - binding.splashProgress.visibility = VISIBLE + // viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -1014,7 +978,6 @@ class CollectionFragmentPreChecker( state = 0 binding.mainToolbar.toolbarTitle.text = collection.collectionFk.toString() - binding.splashProgress.visibility = View.GONE var salesList: ArrayList = ArrayList() tickets = ArrayList() var observations = "" @@ -1100,7 +1063,7 @@ class CollectionFragmentPreChecker( object : OnMistakeClickListener { override fun onMistakeClickListener(sale: SaleVO) { //Tarea #4969 - binding.splashProgress.visibility = VISIBLE + viewModel.mistakeType() mistakeSale = sale goMistakeBack = false @@ -1299,8 +1262,6 @@ class CollectionFragmentPreChecker( } } else { - binding.splashProgress.visibility = - VISIBLE storedPosition = 0 storedBackPosition = 0 // if (type != PRECHECKER) { @@ -1314,7 +1275,7 @@ class CollectionFragmentPreChecker( ) } catch (ex: Exception) { - binding.splashProgress.visibility = GONE + ma.messageWithSound( getString(R.string.error), isError = false, @@ -1520,7 +1481,6 @@ class CollectionFragmentPreChecker( } private fun saleTrackingReplace(position: Int, type: String) { - //binding.splashProgress.visibility=VISIBLE viewModel.saleTrackingReplace( saleFk = sales[position].saleFk, isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1", @@ -1536,7 +1496,7 @@ class CollectionFragmentPreChecker( //Tarea #4371 se quita para ver si funciona correctamente private fun saleTracking_mark(position: Int, type: String) { - binding.splashProgress.visibility = VISIBLE + viewModel.run { saleTracking_mark( saleFk = sales[position].saleFk, @@ -1566,7 +1526,7 @@ class CollectionFragmentPreChecker( setListPosition(position, false) if (type != PRECHECKER) { - binding.splashProgress.visibility = VISIBLE + viewModel.itemShelvingUpdateFromSale( sales[position].saleFk @@ -1596,7 +1556,7 @@ class CollectionFragmentPreChecker( private fun showShelving(position: Int, shelvingPosition: Int) { storedShelvingPosition = shelvingPosition storedPosition = position - binding.splashProgress.visibility = VISIBLE + var quantityGet = 0 try { quantityGet = @@ -1675,9 +1635,6 @@ class CollectionFragmentPreChecker( customDialogList.dismiss() } else { itemShelvingFkStored = itemShelvingFk - binding.splashProgress.visibility = - VISIBLE - viewModel.getIdFromCodeSalix( code = customDialogList.getValueTwo(), ) @@ -1760,7 +1717,7 @@ class CollectionFragmentPreChecker( customDialogList.dismiss() } else { itemShelvingFkStored = itemShelvingFk - binding.splashProgress.visibility = View.VISIBLE + viewModel.getIdFromCodeSalix( @@ -1960,8 +1917,6 @@ class CollectionFragmentPreChecker( ) { getString(R.string.Todosloscampossonobligatorios).toast(requireContext()) } else { - binding.splashProgress.visibility = - VISIBLE //sergio datos para mensaje salix @@ -2028,8 +1983,6 @@ class CollectionFragmentPreChecker( ) { getString(R.string.Todosloscampossonobligatorios).toast(requireContext()) } else { - binding.splashProgress.visibility = - VISIBLE dataMessageSalix = DataMessageSalix( ticket = ticketSelected, @@ -2176,7 +2129,7 @@ class CollectionFragmentPreChecker( private fun customDialogSetUsed() { if (!customDialogInput.getValue().isNullOrEmpty()) { - binding.splashProgress.visibility = VISIBLE + viewModel.ticketCollection_setUsedShelves( ticketFk = collection.collectionFk, usedShelves = customDialogInput.getValue().toInt() @@ -2262,7 +2215,7 @@ class CollectionFragmentPreChecker( } saleAdapter!!.notifyDataSetChanged() - binding.splashProgress.visibility = VISIBLE + viewModel.collectionTicketGet( collection.collectionFk, mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK), @@ -2402,7 +2355,7 @@ class CollectionFragmentPreChecker( private fun showMistakeList(list: List) { customDialogInput.dismiss() - binding.splashProgress.visibility = GONE + listPlacementSupply = ArrayList() list.forEach { listPlacementSupply.add(BarcodeVO(code = it.description)) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt index 4e2f4cdc..8e3964ed 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt @@ -199,6 +199,10 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) { val loadResponseItemShelvingUpdate: LiveData> = _responseItemShelvingUpdate.map { Event(it) } + private val _responseSaleAddPrevOK by lazy { MutableLiveData() } + val responseSaleAddPrevOK: LiveData + get() = _responseSaleAddPrevOK + fun getSales( collectionFk: Int, print: String, @@ -233,48 +237,9 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) { print: String, type: String ) { - if (type == "PRECHECKER" || type == "PREPARED" || type == "CHECKER" || type == "SHOWTICKET") { - getSales(collectionFk, print, type) - } else { - silex.collection_getTickets( - collectionFk, - sectorFk, - print, - type - ) + getSales(collectionFk, print, type) - .enqueue(object : - SilexCallback(context) { - override fun onError(t: Throwable) { - _collectionTicketList.value = CollectionVO( - 0, - isError = true, - errorMessage = getMessageFromAllResponse( - nameofFunction(this), - t.message!! - ) - ) - } - - override fun onSuccess(response: Response) { - - if (response.body() != null) { - _collectionTicketList.value = - response.body()?.let { it.map(contextApp) } - } else { - _collectionTicketList.value = CollectionVO( - 0, - isError = true, - errorMessage = getMessageFromAllResponse( - nameofFunction(this), - response.message() - ) - ) - } - } - }) - } } //Tarea 6276 Salix collection_getTickets @@ -314,47 +279,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) { }) } -/* fun collection_get( - collectionFk: Int, - sectorFk: Int, - print: String, - type: String - ) { - //Falta back de Salix - // salix.collectionGet(params = arrayListOf(collectionFk, sectorFk, print, type).formatWithQuotes()) - silex.collection_get( - collectionFk, - sectorFk, - print, - type - ) - .enqueue(object : - SalixCallback(context) { - override fun onError(t: Throwable) { - _collectionTicketList.value = CollectionVO( - 0, - isError = true, - errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) - ) - } - override fun onSuccess(response: Response) { - - if (response.body() != null) { - _collectionTicketList.value = response.body()?.let { it.map(contextApp) } - } else { - _collectionTicketList.value = CollectionVO( - 0, - isError = true, - errorMessage = getMessageFromAllResponse( - nameofFunction(this), - response.message() - ) - ) - } - } - }) - }*/ fun collectionGetId( ticketFk: Int, @@ -1119,76 +1044,40 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) { }) } -/* fun collection_getUncheckedTicket( - collectionFk: Int - ) { - silex.collection_getUncheckedTicket( - collectionFk - ).enqueue(object : - SalixCallback(context) { - override fun onError(t: Throwable) { - _responseCollectionUnchecked.value = ResponseItemVO( - isError = true, - errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) - ) - } - - override fun onSuccess(response: Response) { - if (response.body() != null) { - - _responseCollectionUnchecked.value = ResponseItemVO( - isError = false, - response = response.body()!!, - errorMessage = "" - ) - } else { - _responseCollectionUnchecked.value = ResponseItemVO( - isError = true, - response = response.body()!!.toString(), - errorMessage = getMessageFromAllResponse( - nameofFunction(this), - response.message() - ) - ) - } - } - }) - }*/ - fun hasUncheckedTicket( collectionFk: Int ) { salix.hasUncheckedTicket(collectionFk) - //silex.collection_getUncheckedTicket(collectionFk) + //silex.collection_getUncheckedTicket(collectionFk) .enqueue(object : - SalixCallback(context) { - override fun onError(t: Throwable) { - _responseCollectionUnchecked.value = ResponseItemVO( - isError = true, - errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) - ) - } - - override fun onSuccess(response: Response) { - if (response.body() != null) { - - _responseCollectionUnchecked.value = ResponseItemVO( - isError = false, - response = response.body()!!, - errorMessage = "" - ) - } else { + SalixCallback(context) { + override fun onError(t: Throwable) { _responseCollectionUnchecked.value = ResponseItemVO( isError = true, - response = response.body()!!.toString(), - errorMessage = getMessageFromAllResponse( - nameofFunction(this), - response.message() - ) + errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) ) } - } - }) + + override fun onSuccess(response: Response) { + if (response.body() != null) { + + _responseCollectionUnchecked.value = ResponseItemVO( + isError = false, + response = response.body()!!, + errorMessage = "" + ) + } else { + _responseCollectionUnchecked.value = ResponseItemVO( + isError = true, + response = response.body()!!.toString(), + errorMessage = getMessageFromAllResponse( + nameofFunction(this), + response.message() + ) + ) + } + } + }) } fun collection_setState( @@ -1219,4 +1108,28 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) { }) } + fun saleTrackingAddPrevOK( + sectorCollectionFk: Int + ) { + salix.saleTrackingAddPrevOK(arrayListOf(sectorCollectionFk)) + .enqueue(object : SalixCallback(context) { + override fun onError(t: Throwable) { + _responseSaleAddPrevOK.value = ResponseItemVO( + isError = true, errorMessage = getMessageFromAllResponse( + nameofFunction(this), t.message!! + ) + ) + + } + + override fun onSuccess(response: Response) { + _responseSaleAddPrevOK.value = ResponseItemVO( + isError = false, errorMessage = "" + getMessageFromAllResponse( + nameofFunction(this), response.message() + ) + ) + } + }) + } + } diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/ControladorFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/ControladorFragment.kt index 93f33130..5779c47b 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/ControladorFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/controlador/fragment/ControladorFragment.kt @@ -1,7 +1,6 @@ package es.verdnatura.presentation.view.feature.controlador.fragment import android.content.Context -import android.view.View import android.view.View.VISIBLE import android.view.inputmethod.EditorInfo import androidx.lifecycle.Observer @@ -34,7 +33,7 @@ class ControladorFragment : override fun init() { - binding.splashProgress.visibility = View.GONE + binding.scanInput.visibility = VISIBLE binding.mainToolbar.toolbarTitle.text = getString(R.string.controlticket) setEvents() @@ -58,7 +57,7 @@ class ControladorFragment : 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 = VISIBLE + binding.scanInput.setText(textScanned_filterDouble(binding.scanInput.text!!.toString())) //Tarea 6458 descomentar si ok collectionViewModel = CollectionViewModel(mobileApplication) @@ -66,7 +65,7 @@ class ControladorFragment : collectionViewModel!!.responseTicketState.observe( viewLifecycleOwner, Observer { it -> - binding.splashProgress.visibility = View.GONE + if ((it.code == "ON_CHECKING" || it.code == "CHECKED") && it.user.id != mobileApplication.userId) { var customDialogWarning = CustomDialog(requireContext()) customDialogWarning.setTitle(getString(R.string.info)) @@ -79,8 +78,6 @@ class ControladorFragment : ) .setOkButton(getString(R.string.aware)) { customDialogWarning.dismiss() - - binding.splashProgress.visibility = VISIBLE viewModel.collectionTicketGet( sectorFk = mobileApplication.dataStoreApp.readDataStoreKey( ConstAndValues.SECTORFK @@ -88,7 +85,7 @@ class ControladorFragment : collectionFk = binding.scanInput.text.toString() .toInt(), print = "0", - type = ConstAndValues.CONTROLADOR + type = ConstAndValues.ON_CHECKING ) }.setKoButton(getString(R.string.cancel)){ binding.scanInput.setText("") @@ -103,7 +100,7 @@ class ControladorFragment : ), collectionFk = binding.scanInput.text.toString().toInt(), print = "0", - type = ConstAndValues.CONTROLADOR + type = ConstAndValues.ON_CHECKING ) } }) @@ -120,7 +117,6 @@ class ControladorFragment : override fun observeViewModel() { with(viewModel) { collectionTicketList.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = View.GONE binding.scanInput.setText("") if (it.isError) { ma.messageWithSound(it.errorMessage, isError = true, isPlayed = false) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt index fe7239ed..f236d6fb 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt @@ -115,7 +115,6 @@ class EndSacadorFragment( customDialogInput = CustomDialogInput(requireContext()) customDialogInputParking = CustomDialogInput(requireContext()) customDialogThreeButtons = CustomDialogThreeButtons(requireContext()) - binding.splashProgress.visibility = GONE binding.mainToolbar.toolbarTitle.text = getString(R.string.getticketpre) setToolBar() setEvents() @@ -191,7 +190,6 @@ class EndSacadorFragment( override fun observeViewModel() { with(viewModel) { salesList.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE createSaleList(it) }) @@ -212,7 +210,6 @@ class EndSacadorFragment( }) placementSuppleyList.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) printShelvingResult(it) goBack = false }) @@ -232,7 +229,6 @@ class EndSacadorFragment( responseParkingAdd.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (it.isError) { ma.messageWithSound(it.errorMessage, true, false) @@ -255,7 +251,6 @@ class EndSacadorFragment( }) responseSplit.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) { if (it.isError) { ma.messageWithSound(it.errorMessage, isError = true, true) @@ -271,7 +266,6 @@ class EndSacadorFragment( loadResponseSaleGropAdd.observe(viewLifecycleOwner) { event -> event.getContentIfNotHandled().notNull { - binding.splashProgress.visibility = GONE if (!goBack) { if (it.isError) { @@ -294,7 +288,6 @@ class EndSacadorFragment( responseSaleAddPrevOK.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) { if (it.isError) { @@ -312,7 +305,6 @@ class EndSacadorFragment( goBack = false }) response.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) { if (it.isError) { @@ -326,7 +318,6 @@ class EndSacadorFragment( goBack = false }) responseSaleupdateIsChecked.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) { @@ -351,7 +342,6 @@ class EndSacadorFragment( }) responseItemShelvingSaleSupplyAdd.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE if (!goBack) { if (it.isError) { @@ -364,7 +354,7 @@ class EndSacadorFragment( }) responseCode.observe(viewLifecycleOwner, Observer { - binding.splashProgress.visibility = GONE + if (!goBack2) { if (it.isError) { customDialog.setTitle(getString(R.string.error)) @@ -427,7 +417,7 @@ class EndSacadorFragment( //CREATE LIST private fun searchSaleCollection() { - binding.splashProgress.visibility = VISIBLE + viewModel.sectorCollectionGetSale( collection.collectionFk, sectorFk = mobileApplication.dataStoreApp.readDataStoreKey(SECTORFK) @@ -439,7 +429,6 @@ class EndSacadorFragment( ticket = ticketFk if (ticketFk != 0) - binding.splashProgress.visibility = VISIBLE viewModel.sectorCollectionSaleGroupAdd( ticketFk, collection.collectionFk @@ -447,7 +436,7 @@ class EndSacadorFragment( } private fun createSaleList(salesList: List) { - binding.splashProgress.visibility = GONE + if (salesList.isNullOrEmpty()) { ma.messageWithSound( @@ -547,8 +536,6 @@ class EndSacadorFragment( binding.mainToolbar.toolbarSubtitle.text = "" + totalMark + "/" + sales.size if (totalMark == sales.size) { getString(R.string.ticketCompleted).toast(this.context, Toast.LENGTH_SHORT) - - binding.splashProgress.visibility = VISIBLE viewModel.saleTrackingAddPrevOK( sectorCollectionFk = collection.collectionFk ) @@ -684,7 +671,6 @@ class EndSacadorFragment( private fun showShelving(position: Int, shelvingPosition: Int) { storedShelvingPosition = shelvingPosition storedPosition = position - binding.splashProgress.visibility = VISIBLE var quantityGet = 0 try { quantityGet = (sales[position].saldo!! - sales[position].picked!!) @@ -739,7 +725,6 @@ class EndSacadorFragment( customDialogList.dismiss() } else { itemShelvingFkStored = itemShelvingFk - binding.splashProgress.visibility = View.VISIBLE viewModel.getIdFromCode( code = customDialogList.getValueTwo() ) @@ -797,7 +782,6 @@ class EndSacadorFragment( customDialogList.dismiss() } else { itemShelvingFkStored = itemShelvingFk - binding.splashProgress.visibility = View.VISIBLE viewModel.getIdFromCode( code = customDialogList.getValueTwo() ) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt index 6a914512..f255d544 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt @@ -70,7 +70,7 @@ class AutomaticAddItemFragment( binding.editMatricula.requestFocus() binding.editMatricula.setOnEditorActionListener { v, actionId, event -> - if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE ||actionId == 0 || actionId == 5) { + if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) { if (!binding.editMatricula.text.toString().isNullOrEmpty()) { contador += 1 setSubtitle() @@ -118,7 +118,6 @@ class AutomaticAddItemFragment( mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK) ) } else { - binding.splashAnimation.visibility = View.VISIBLE viewModel.itemShelvingMakeMulti( shelvingFk, listString, @@ -134,7 +133,6 @@ class AutomaticAddItemFragment( override fun observeViewModel() { with(viewModel) { - binding.splashAnimation.visibility = View.INVISIBLE response.observe(viewLifecycleOwner, Observer { ma.onMyBackPressed() }) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt index 71a26550..bae0f7e3 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt @@ -9,6 +9,7 @@ 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.workermistake.model.MakeMultiSalix import retrofit2.Response class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) { @@ -22,11 +23,8 @@ class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) { items: List, warehouseFk: Int ) { - //Tarea 6276 A MODIFICAR SI O SI. MAÑANA // Falta cambiar el - //salix.upsertItem(MakeMultiSalix(shelvingFk,items,warehouseFk)) - //falta cambiar el procedimiento si no no coge bien las cantidades, no las multiplica si el packing es 2 por ejemplo. - // Escanear dos veces un 10 pero pone un dos = 2x20 cuando debería ser 40. - silex.itemShelvingMake_multi(shelvingFk, items, warehouseFk) + + salix.upsertItem(MakeMultiSalix(shelvingFk, items, warehouseFk)) .enqueue(object : SalixCallback(context) { override fun onError(t: Throwable) { @@ -44,6 +42,7 @@ class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) { } }) + } fun itemShelvingAddList( diff --git a/app/src/main/res/layout/activity_sign.xml b/app/src/main/res/layout/activity_sign.xml index 36ab2b63..c9b509fb 100644 --- a/app/src/main/res/layout/activity_sign.xml +++ b/app/src/main/res/layout/activity_sign.xml @@ -51,7 +51,7 @@ android:layout_height="wrap_content" android:layout_weight="1" android:gravity="start" - android:text="@string/Entrada" + android:text="@string/entry" android:textColor="@color/verdnatura_pumpkin_orange" android:textSize="@dimen/body1" /> @@ -123,7 +123,7 @@ - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_collection.xml b/app/src/main/res/layout/fragment_collection.xml index 2693acaa..baead6cd 100644 --- a/app/src/main/res/layout/fragment_collection.xml +++ b/app/src/main/res/layout/fragment_collection.xml @@ -1,17 +1,14 @@ - - - + android:background="@color/verdnatura_black"> + app:layout_constraintTop_toTopOf="@+id/main_toolbar" /> + app:srcCompat="@drawable/ic_streetview_black_24dp" /> - + 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_fragment" /> - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_general_black.xml b/app/src/main/res/layout/fragment_general_black.xml index 7b89766d..a29abd0d 100644 --- a/app/src/main/res/layout/fragment_general_black.xml +++ b/app/src/main/res/layout/fragment_general_black.xml @@ -31,27 +31,5 @@ app:layout_constraintTop_toTopOf="parent" /> - - - - - - - - - - + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_item_card.xml b/app/src/main/res/layout/fragment_item_card.xml index 81da79ce..bf438f05 100644 --- a/app/src/main/res/layout/fragment_item_card.xml +++ b/app/src/main/res/layout/fragment_item_card.xml @@ -207,55 +207,5 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - - - - - - - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_packaging.xml b/app/src/main/res/layout/fragment_packaging.xml index 69536e5a..142ca667 100644 --- a/app/src/main/res/layout/fragment_packaging.xml +++ b/app/src/main/res/layout/fragment_packaging.xml @@ -143,31 +143,5 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_packaging_obs.xml b/app/src/main/res/layout/fragment_packaging_obs.xml index 84b3f5ed..fa7149c3 100644 --- a/app/src/main/res/layout/fragment_packaging_obs.xml +++ b/app/src/main/res/layout/fragment_packaging_obs.xml @@ -85,26 +85,5 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_packaging_summary.xml b/app/src/main/res/layout/fragment_packaging_summary.xml index bbd75e48..5a2f132b 100644 --- a/app/src/main/res/layout/fragment_packaging_summary.xml +++ b/app/src/main/res/layout/fragment_packaging_summary.xml @@ -174,31 +174,5 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_pre_sacador.xml b/app/src/main/res/layout/fragment_pre_sacador.xml index fa284e12..9b939043 100644 --- a/app/src/main/res/layout/fragment_pre_sacador.xml +++ b/app/src/main/res/layout/fragment_pre_sacador.xml @@ -50,27 +50,5 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_reubication_collection.xml b/app/src/main/res/layout/fragment_reubication_collection.xml index 8003fe23..dcb8047e 100644 --- a/app/src/main/res/layout/fragment_reubication_collection.xml +++ b/app/src/main/res/layout/fragment_reubication_collection.xml @@ -47,23 +47,6 @@ tools:listitem="@layout/item_article_row_reubication_fragment" /> - - - - - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_show_ticket.xml b/app/src/main/res/layout/fragment_show_ticket.xml index d6b54b51..724674d7 100644 --- a/app/src/main/res/layout/fragment_show_ticket.xml +++ b/app/src/main/res/layout/fragment_show_ticket.xml @@ -64,27 +64,5 @@ app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - - - - - - - - - \ No newline at end of file + + \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_vehiclecontrol.xml b/app/src/main/res/layout/fragment_vehiclecontrol.xml index adc91d3f..f0dd216b 100644 --- a/app/src/main/res/layout/fragment_vehiclecontrol.xml +++ b/app/src/main/res/layout/fragment_vehiclecontrol.xml @@ -32,28 +32,5 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> - - - - - - - - \ No newline at end of file + + \ No newline at end of file