From 8e413e7f600e7a28fbff5be4ddba7190a1e62131 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Thu, 2 Jan 2025 13:55:53 +0100 Subject: [PATCH 01/44] feat: refs#8301 deprecatedOlderItem --- .../feature/main/activity/MainActivity.kt | 13 +- ...dorFragment6869.kt => UbicadorFragment.kt} | 8 +- .../ubicador/fragment/UbicadorFragmentNew.kt | 1231 ----------------- 3 files changed, 6 insertions(+), 1246 deletions(-) rename app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/{UbicadorFragment6869.kt => UbicadorFragment.kt} (99%) delete mode 100644 app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragmentNew.kt diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt index e2406613..64b114c2 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt @@ -135,7 +135,7 @@ 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.UbicadorFragment6869 +import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment import es.verdnatura.presentation.view.feature.workermistake.fragment.PackingMistakeFragment import es.verdnatura.presentation.view.feature.workermistake.fragment.WorkermistakeFragment import kotlinx.coroutines.DelicateCoroutinesApi @@ -673,13 +673,9 @@ class MainActivity : BaseActivity(), OnPasillerosItemClickL } getString(R.string.titleUbicator) -> { - //addFragmentOnTop(UbicadorFragmentNew.newInstance(entryPoint)) - addFragmentOnTop(UbicadorFragment6869.newInstance(entryPoint)) + + addFragmentOnTop(UbicadorFragment.newInstance(entryPoint)) } - //Tarea 6869 - /* getString(R.string.ubicatorNew) -> { - addFragmentOnTop(UbicadorFragment6869.newInstance(entryPoint)) - }*/ //Tarea 7855 getString(R.string.scanPreparedExpedition) -> { @@ -830,8 +826,7 @@ class MainActivity : BaseActivity(), OnPasillerosItemClickL } getString(R.string.selfConsumption) -> { - // addFragmentOnTop(UbicadorFragmentNew.newInstance(entryPoint, true)) - addFragmentOnTop(UbicadorFragment6869.newInstance(entryPoint, true)) + addFragmentOnTop(UbicadorFragment.newInstance(entryPoint, true)) } getString(R.string.titlePackingHolland) -> { diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment6869.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt similarity index 99% rename from app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment6869.kt rename to app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt index e6895a12..e6548e5b 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment6869.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt @@ -57,7 +57,7 @@ import java.util.Locale import kotlin.math.ceil @Suppress("UNUSED_ANONYMOUS_PARAMETER") -class UbicadorFragment6869 : BaseFragment( +class UbicadorFragment : BaseFragment( UbicadorViewModel::class ) { private var shelvingFk: String = "" @@ -89,7 +89,7 @@ class UbicadorFragment6869 : BaseFragment( - UbicadorViewModel::class -) { - private var shelvingFk: String = "" - private var isAutoSelf: Boolean = false - - private var adapter: UbicadorAdapterNew? = null - private lateinit var customDialogInput: CustomDialogInput - private lateinit var customDialogUbicador: CustomDialogUbicadorNew - private lateinit var customDialogTwoButtons: CustomDialogTwoButtons - private var listItems: MutableList = mutableListOf() - private var listLocalItems: ArrayList = ArrayList() - private lateinit var customDialog: CustomDialog - private lateinit var customDialogOlder: CustomDialog - private var parking: String = "" - private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null - private var isShelvinLogfromMainScreen = false - private var modeCheckUbication = false - private var itemScannedScreen: Long = 0 - private var isBack = false - var listIcons: ArrayList = ArrayList() - private lateinit var textWatcher: TextWatcher - private var buyScanned: String = "" - private lateinit var customDialogList: CustomDialogList - private var listShelvings: ArrayList = ArrayList() - private var listShelvingsAdapter: BarcodeAdapter? = null - private var locateMultipleShelvings: Boolean = false - - companion object { - private const val ARG_SHELVINGFK = "shelvingFk" - private const val ARG_ISAUTOSELF = "autoSelf" - fun newInstance(shelvingFk: String, isAutoSelf: Boolean = false) = - UbicadorFragmentNew().apply { - arguments = Bundle().apply { - putString(ARG_SHELVINGFK, shelvingFk) - putBoolean(ARG_ISAUTOSELF, isAutoSelf) - } - } - } - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - arguments?.let { - shelvingFk = it.getString(ARG_SHELVINGFK).toString() - isAutoSelf = it.getBoolean(ARG_ISAUTOSELF) - } - } - - /*fun newInstance(entryPoint: String, autoSelf: Boolean = false) = - UbicadorFragmentNew(entryPoint, autoSelf) - }*/ - - override fun getLayoutId(): Int = R.layout.fragment_ubicador - override fun onPause() { - super.onPause() - isBack = true - } - - override fun onAttach(context: Context) { - if (context is OnPasillerosItemClickListener) pasillerosItemClickListener = context - super.onAttach(context) - - } - - override fun init() { - - setDialogs() - setEvents() - setToolBar() - - //setNewIcons() - ma.hideBottomNavigation(GONE) - - if (shelvingFk.isNotEmpty()) { - isShelvinLogfromMainScreen = false - setIconsActions(true) - //setIcons() - binding.mainToolbar.toolbarTitle.text = shelvingFk - viewModel.itemShelvingListNew(shelvingFk) - binding.mainToolbar.switchButton.visibility = VISIBLE - } else { - isShelvinLogfromMainScreen = true - setIconsActions(false) - //Tarea 7805 - // setIcons(true) - } - super.init() - } - - private fun setIconsActions(showIcons: Boolean) { - - binding.layoutIconsActions.visibility = if (showIcons) { - VISIBLE - } else { - GONE - } - setIcons(!showIcons) - } - - private fun setDialogs() { - customDialogInput = CustomDialogInput(requireContext()) - customDialog = CustomDialog(requireContext()) - customDialogOlder = CustomDialog(requireContext()) - customDialogTwoButtons = CustomDialogTwoButtons(requireContext()) - } - - private fun setToolBar() { - binding.mainToolbar.switchButton.visibility = GONE - binding.mainToolbar.toolbarTitle.text = if (!isAutoSelf) { - getString(R.string.locator) - } else { - getString(R.string.selfConsumption) - } - } - - private fun setIcons(isInitMenu: Boolean = false) { - - listIcons.clear() - val iconAdd = ImageView(context) - iconAdd.setImageResource(R.drawable.ic_add_black_24dp) - val iconAddMultiple = ImageView(context) - iconAddMultiple.setImageResource(R.drawable.ic_add_multiple) - val iconReload = ImageView(context) - iconReload.setImageResource(R.drawable.ic_autorenew_black_24dp) - val iconReset = ImageView(context) - iconReset.setImageResource(R.drawable.ic_remove_checks) - - binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked -> - if (binding.mainToolbar.toolbarTitle.text == getString(R.string.titleUbicator)) { - getString(R.string.scanShelving).toast(requireContext()) - binding.mainToolbar.switchButton.isChecked = false - } else { - modeCheckUbication = isChecked - binding.mainToolbar.switchButton.tooltipText = - if (isChecked) getString(R.string.activateModoChecking) else getString(R.string.allowCheckingMode) - binding.textinputlayoutMatricula.hint = - if (isChecked) getString(R.string.scanItem) else { - getString(R.string.scanPlate) - - } - if (!isChecked) { - listIcons.removeAt(listIcons.size - 1) - binding.mainToolbar.toolbarIcons.adapter!!.notifyItemRemoved(listIcons.size) - - } else { - listIcons.add(iconReset) - binding.mainToolbar.toolbarIcons.adapter!!.notifyItemInserted(listIcons.size - 1) - - } - - //binding.mainToolbar.toolbarIcons.adapter!!.notifyDataSetChanged() - } - } - - - iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp) - iconAdd.tooltipText = - if (isInitMenu) getString(R.string.addItemMultipleShelving) else getString(R.string.addItemShelving) - iconAddMultiple.tooltipText = getTooltip(R.drawable.ic_add_multiple) - iconReset.tooltipText = getTooltip(R.drawable.ic_remove_checks) - - listIcons.add(iconAdd) - - if (!isInitMenu) { - listIcons.add(iconReload) - } else { - listIcons.add(iconAddMultiple) - } - locateMultipleShelvings = isInitMenu - - binding.mainToolbar.toolbarIcons.adapter = - ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener { - override fun onOptionsItemSelected(item: Drawable) { - - when (item) { - iconAdd.drawable -> { - showAddItemNew( - isEditItem = false, null - ) - } - - iconAddMultiple.drawable -> { - ma.onPasillerosItemClickListener( - PasillerosItemVO( - title = R.string.addItemMultipleShelving, - ), entryPoint = getString(R.string.addItemMultipleShelving) - ) - } - - iconReload.drawable -> { - listItems.clear() - if (shelvingFk.isNotBlank()) { - binding.editPrioridad.setText("") - viewModel.itemShelvingListNew( - shelvingFk - ) - } else { - getString(R.string.scanShelving).toast( - requireActivity(), Toast.LENGTH_SHORT - ) - } - } - - iconReset.drawable -> { - if (shelvingFk.isNotBlank()) { - val customDialogReset = CustomDialog(requireContext()) - customDialogReset.setTitle(getString(R.string.checkItemShelvingDescrip)) - .setDescription(getString(R.string.checkItemShelving)) - .setOkButton(getString(R.string.ok)) { - if (listItems.isNotEmpty()) - viewModel.itemShelvingDeleteChecked(listItems[0].shelvingFk!!) - customDialogReset.dismiss() - }.setKoButton(getString(R.string.cancel)) { - customDialogReset.dismiss() - - }.show() - } else { - ma.messageWithSound( - getString(R.string.scanPlate), - isError = true, - isPlayed = true, - isToasted = true - ) - } - } - } - } - - }) - binding.mainToolbar.toolbarIcons.layoutManager = - LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false) - } - - @SuppressLint("SetTextI18n") - private fun setEvents() { - binding.mainToolbar.backButton.setOnClickListener { - ma.onMyBackPressed() - } - - setTooltips() - 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 (binding.editMatricula.text.toString().isNotEmpty()) { - setIconsActions(true) - //setIcons() - if (!modeCheckUbication || (modeCheckUbication && (binding.editMatricula.text.toString() - .isShelving()) && !binding.editMatricula.text!![0].isDigit()) - ) { - binding.mainToolbar.toolbarTitle.text = - binding.editMatricula.text.toString() - shelvingFk = binding.editMatricula.text.toString() - parking = "" - binding.editPrioridad.setText("") - isShelvinLogfromMainScreen = true - viewModel.itemShelvingListNew( - binding.editMatricula.text.toString() - ) - } else { - try { - buyScanned = itemScanValue( - binding.editMatricula.text.toString(), arrayOf("buy"), "more" - ).toString() - viewModel.getIdFromCode( - code = buyScanned - ) - } catch (ex: Exception) { - ma.messageWithSound( - ex.message.toString(), isError = true, isPlayed = true - ) - } - - } - } - binding.mainToolbar.switchButton.visibility = VISIBLE - - binding.editMatricula.setText("") - ma.hideKeyboard(binding.editMatricula) - return@setOnEditorActionListener true - } - - return@setOnEditorActionListener false - } - - 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().isNotEmpty()) { - viewModel.shelvingPriorityUpdate( - binding.editPrioridad.toInt(), shelvingFk - ) - isBack = false - - } - ma.hideKeyboard(binding.editPrioridad) - } - - binding.editMatricula.requestFocus() - return@setOnEditorActionListener false - } - - - binding.automaticImg.setOnClickListener { - - if (shelvingFk.isNotBlank()) ma.onPasillerosItemClickListener( - PasillerosItemVO(title = R.string.titleAuto), entryPoint = shelvingFk - ) - else getString(R.string.scanShelving).toast( - requireActivity(), Toast.LENGTH_SHORT - ) - } - - binding.parkingImg.setOnClickListener { - if (shelvingFk.isNotBlank()) { - customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("") - .setOkButton( - getString( - R.string.parking - ) - ) { - customDialogActionParking() - - }.setKoButton(getString(R.string.cancel)) { - customDialogInput.dismiss() - }.show() - } else { - - getString(R.string.errorShelving).toast( - requireContext() - ) - } - customDialogInput.getEditText().requestFocus() - ma.hideKeyboard(customDialogInput.getEditText()) - - customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event -> - if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) { - customDialogActionParking() - - return@setOnEditorActionListener true - } - false - } - - } - - binding.editImg.setOnClickListener { - if (shelvingFk.isNotBlank()) { - customDialogInput = CustomDialogInput(requireContext()) - customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("") - .setOkButton(getString(R.string.save)) { - if (customDialogInput.getValue().isNotBlank()) { - customDialogActionChange() - } else { - getString(R.string.errorShelving).toast( - requireContext() - ) - } - customDialogInput.dismiss() - }.setKoButton(getString(R.string.cancel)) { - customDialogInput.dismiss() - }.show() - } else { - getString(R.string.errorShelving).toast( - requireContext() - ) - } - customDialogInput.getEditText().requestFocus() - ma.hideKeyboard(customDialogInput.getEditText()) - - customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event -> - if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) { - customDialogActionChange() - return@setOnEditorActionListener true - } - false - } - - } - - binding.deleteImg.setOnClickListener { - if (shelvingFk.isNotBlank()) { - val customDialogDelete = CustomDialog(requireContext()) - customDialogDelete.setTitle(getString(R.string.empty)) - .setDescription(getString(R.string.operationNoReturn)) - .setOkButton(getString(R.string.empty)) { - if (listItems.isNotEmpty()) { - viewModel.clearShelvingList( - //Tarea 7920 - listItems[0].shelvingFk?.toString() ?: shelvingFk - ) - } - - listItems.forEach { - it.stickers = 0 - it.visible = 0 - it.available = 0 - } - - - if (adapter != null) { - adapter!!.notifyDataSetChanged() - } - customDialogDelete.dismiss() - } - - customDialogDelete.setKoButton(getString(R.string.cancel)) { - customDialogDelete.dismiss() - }.show() - } else { - getString(R.string.errorShelving).toast( - requireContext() - ) - - } - - } - } - - private fun customDialogActionParking() { - parking = customDialogInput.getValue() - //tarea 6964 - viewModel.hasItemOlder( - shelvingFk, customDialogInput.getValue(), itemFk = null, action = null - ) - - customDialogInput.dismiss() - } - - private fun customDialogActionChange() { - - //Tarea 7920 - if (listItems.isNotEmpty() && listItems[0].shelvingFk == null) { - viewModel.shelvingChangeSalix( - shelvingFk, customDialogInput.getValue() - ) - } else { - viewModel.getShelvingFkFromCode( - listItems[0].shelvingFk!!, customDialogInput.getValue() - ) - } - shelvingFk = customDialogInput.getValue() - - customDialogInput.dismiss() - } - - private fun checkUbications(itemScanned: Long) { - itemScannedScreen = itemScanned - val listInt: ArrayList = ArrayList() - - if (listItems.none { it.item == itemScanned }) { - try { - listInt.add(buyScanned.toLong()) - } catch (_: Exception) { - } - - } else { - listItems.sortedBy { it.isChecked }.forEachIndexed { index, item -> - if (item.item == itemScanned) { - item.checked = true - listInt.add(item.item) - ma.messageWithSound( - "", isError = false, isPlayed = true, titleWithError = "", false - ) - } - } - - } - if (listInt.isNotEmpty()) { - viewModel.itemShelvingAddList( - shelvingFk, - "" + listInt + "", - true, - mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK) - ) - } - - adapter!!.notifyDataSetChanged() - } - - private fun setTooltips() { - - binding.editImg.tooltipText = getTooltip(R.drawable.ic_mode_edit_black_24dp) - binding.deleteImg.tooltipText = getTooltip(R.drawable.ic_delete_forever_black_24dp) - binding.editPrioridad.tooltipText = getString(R.string.changePriority) - binding.parkingImg.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp) - binding.automaticImg.tooltipText = getTooltip(R.drawable.ic_flash_auto_black_24dp) - - } - - @SuppressLint("SetTextI18n") - override fun observeViewModel() { - - with(viewModel) { - - loadShelvingListNew.observe(viewLifecycleOwner) { event -> - listItems.clear() - event.getContentIfNotHandled().notNull { it -> - if (isShelvinLogfromMainScreen) { - viewModel.shelvingLogAdd(shelvingFk) - } - listItems.addAll(it.list) - listItems.forEach { item -> - if (item.description.isNullOrEmpty()) { - item.description = - item.longName ?: "${item.name ?: ""} ${item.size ?: ""}" - } - item.stickers = - if (item.packing == null) 0 else ceil((item.visible.toDouble() / item.packing!!.toDouble())).toInt() - } - val totalStickers = listItems.sumOf { item -> item.stickers } - parking = it.list.firstOrNull { item -> item.code != null }?.code ?: "" - - binding.mainToolbar.toolbarTitle.text = - shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString( - R.string.label - ) + totalStickers - if (listItems.isNotEmpty()) binding.editPrioridad.setText(listItems[0].priority?.toString()) - - if (!binding.mainToolbar.switchButton.isChecked && listItems.isNotEmpty()) { - listItems = listItems.asReversed() - } - - if (listItems.isNotEmpty()) { - binding.deleteImg.visibility = VISIBLE - - } else { - binding.deleteImg.visibility = View.INVISIBLE - } - setAdapter(listItems) - setPosition() - - } - } - loadAddList.observe(viewLifecycleOwner) { event -> - event.getContentIfNotHandled().notNull { - viewModel.itemShelvingListNew(shelvingFk) - } - } - - /*response.observe(viewLifecycleOwner) { - viewModel.itemShelvingListNew(shelvingFk) - }*/ - //parking, isChecked, responseOlder, responseMake Add - responseUbicator.observe(viewLifecycleOwner) { - - if (shelvingFk.isNotEmpty()) { - binding.mainToolbar.toolbarTitle.text = shelvingFk - viewModel.itemShelvingListNew( - shelvingFk - ) - - } - } - responseLogAdd.observe(viewLifecycleOwner) { - isShelvinLogfromMainScreen = false - if (it == false) { - setIconsActions(false) - //setIcons() - } - } - loadResponseCode.observe(viewLifecycleOwner) { event -> - event.getContentIfNotHandled().notNull { - checkUbications(it.toLong()) - } - } - - loadAddList.observe(viewLifecycleOwner) { - - if (shelvingFk.isNotEmpty()) { - binding.mainToolbar.toolbarTitle.text = shelvingFk - viewModel.itemShelvingListNew( - shelvingFk - ) - - } - } - - loadShelvingListItemNewer.observe(viewLifecycleOwner) { event -> - event.getContentIfNotHandled().notNull { - - if (it.list.isNotEmpty()) { - val formattedList = it.list.map { item -> - val itemFk = item.itemFk - val shelvingFk = item.shelvingFk - "$itemFk (${shelvingFk.uppercase()})" - } - val resultString = formattedList.joinToString(separator = "\n") - val finalOutput = "\n$resultString" - customDialogOlder.setTitle(getString(R.string.info)).setDescription( - getString( - R.string.itemOlderInfo, Action.PARKINEAR - ) + getString(R.string.listItems) + finalOutput - ).setOkButton( - getString(R.string.ok) - ) { - viewModel.setParking( - it.originalShelvingFk, it.originalParking - ) - - customDialogOlder.dismiss() - - }.setKoButton(getString(R.string.cancel)) { - customDialogOlder.dismiss() - }.show() - - } - } - } - - loadResponseHasOlder.observe(viewLifecycleOwner) { event -> - event.getContentIfNotHandled().notNull { - - customDialogOlder.setTitle(getString(R.string.info)).setDescription( - getString( - R.string.itemOlderInfo, responseHasOlder.value!!.action - ) - ).setOkButton( - getString(R.string.ok) - ) { - when (responseHasOlder.value!!.action) { - Action.PARKINEAR -> viewModel.setParking( - responseHasOlder.value!!.shelvingFkIn, parking - ) - - Action.TRANSFERIR -> viewModel.itemShelvingTransfer( - responseHasOlder.value!!.itemFk!!, - responseHasOlder.value!!.shelvingFkOut!! - ) - } - customDialogOlder.dismiss() - - }.setKoButton(getString(R.string.cancel)) { - customDialogOlder.dismiss() - }.show() - } - } - loadBuyUltimateResponse.observe(viewLifecycleOwner) { event -> - event.getContentIfNotHandled().notNull { - ma.messageWithSound( - getString(R.string.errorPrintBuy), isError = true, isPlayed = true - ) - } - } - } - - } - - private fun setPosition() { - 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 - ) - } - } - - private fun setAdapter(listItems: MutableList) { - listItems.sortWith { item1, item2 -> - val compareItem = item1.item.compareTo(item2.item) - if (compareItem == 0) { - item2.visible.compareTo(item1.visible) // Invertir el orden - } else { - compareItem - } - } - adapter = UbicadorAdapterNew(listItems.sortedBy { it.isChecked }, - onPasillerosItemClickListener = pasillerosItemClickListener!!, - onVisibleClickListener = object : OnVisibleClickListenerNew { - override fun onVisibleClickListener(item: ItemUbicador) { - - if (!isAutoSelf) { - - if (item.isChecked == 0) { - viewModel.updateIsChecked(itemShelvingFk = item.id) - } - - showAddItemNew( - itemUbicador = item, isEditItem = true - ) - } else { - - showAutoSelfConsumption(item) - } - - } - - }, - onMoreClickListener = object : OnMoreClickListenerNew { - override fun onMoreClickListener(item: ItemUbicador) { - showMoreOptions(item) - } - - }) - - binding.locationRecyclerview.adapter = adapter - binding.locationRecyclerview.layoutManager = LinearLayoutManager( - requireContext(), LinearLayoutManager.VERTICAL, false - ) - } - - private fun showAutoSelfConsumption(item: ItemUbicador) { - - customDialogInput.setInputText(InputType.TYPE_CLASS_NUMBER) - customDialogInput.setTitle(getString(R.string.selfConsumption)) - customDialogInput.setDescription(getString(R.string.quantityTake)).setValue("") - .setOkButton(getString(R.string.take)) { - try { - if (customDialogInput.getValue().toInt() > 0) { - val quantity = - if (item.visible - customDialogInput.getValue().toInt() > 0) { - item.visible - customDialogInput.getValue().toInt() - } else { - 0 - } - viewModel.itemShelvingSelfConsumption( - shelvingFk, item.item.toInt(), quantity - ) - } else { - throw Exception("") - } - } catch (err: Exception) { - (getString(R.string.errorQuantity).toast(requireContext())) - } - customDialogInput.dismiss() - - }.setKoButton(getString(R.string.cancel)) { - customDialogInput.dismiss() - }.show() - customDialogInput.setFocusText() - } - - private fun showAddItemNew( - isEditItem: Boolean, - itemUbicador: ItemUbicador?, - ) { - customDialogUbicador = CustomDialogUbicadorNew(requireContext()) - - - if (isEditItem) { - customDialogUbicador.setTitle(getString(R.string.editItem) + itemUbicador!!.item) - .setItemValue(itemUbicador.item.toString()) - .setPackingValue(itemUbicador.packing.toString()) - .setVisibleValue(itemUbicador.visible.toString()) - //.setEtiquetaValue((itemUbicador.visible / (itemUbicador.packing ?: 0)).toString()) - .setEtiquetaValue(itemUbicador.stickers.toString()).setUnits( - if (itemUbicador.stickers != 0) { - (itemUbicador.visible % itemUbicador.stickers).toString() - } else { - "0" - } - ).setOkButton(getString(R.string.save)) { - setShowAddItemAction(itemUbicador) - }.setKoButton(getString(R.string.close)) { - customDialogUbicador.dismiss() - }.show() - } else { - customDialogUbicador.setTitle(getString(R.string.newItem)) - .setOkButton(getString(R.string.save)) { - setShowAddItemAction(null) - }.setKoButton(getString(R.string.close)) { - customDialogUbicador.dismiss() - }.show() - } - - customDialogUbicador.getEditItem().setOnEditorActionListener { v, actionId, event -> - if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) { - - if (customDialogUbicador.getItemValue().isNotEmpty()) { - try { - - customDialogUbicador.setItemValue( - itemScanValue( - customDialogUbicador.getItemValue(), arrayOf("buy"), "more" - ).toString() - ) - - } catch (ex: Exception) { - ma.messageWithSound( - ex.message.toString(), isError = true, isPlayed = true - ) - customDialogUbicador.setItemValue("") - } - } - - return@setOnEditorActionListener true - } - - customDialogUbicador.getPackingItem().requestFocus() - } - - setWatcher() - customDialogUbicador.getEditItem().requestFocus() - ma.hideKeyboard(customDialogUbicador.getEditItem()) - - } - - private fun setShowAddItemAction(itemUbicador: ItemUbicador?) { - try { - - if (customDialogUbicador.getItemValue() - .isEmpty() || customDialogUbicador.getPackingValue().isBlank() - ) { - getString(R.string.itemAndPackingMandatory).toast(context) - } else { - saveItemCall(customDialogUbicador, itemUbicador) - customDialogUbicador.dismiss() - } - } catch (ex: Exception) { - ex.message.toString().toast(requireContext()) - } - } - - private fun saveItemCall( - customDialogUbicador: CustomDialogUbicadorNew, - itemUbicador: ItemUbicador?, - ) { - - if (itemUbicador?.id == null) { - //item nuevo sin shelving - try { - if (locateMultipleShelvings) insertShelvingsForUbicator( - customDialogUbicador.getItemValue().toLong(), - customDialogUbicador.getVisibleValue().toInt(), - customDialogUbicador.getPackingValue().toIntOrNull() - - ) else { - - viewModel.itemShelvingAdd( - shelving = shelvingFk, - item = customDialogUbicador.getItemValue().toLong(), - quantity = customDialogUbicador.getVisibleValue().toInt(), - packing = customDialogUbicador.getPackingValue().toIntOrNull(), - warehouse = mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK), - grouping = null - ) - } - - } catch (ex: Exception) { - ma.messageWithSound( - getString(R.string.reviewData), - isError = true, - isPlayed = true, - isToasted = true - ) - } - } else { - viewModel.itemShelvingMakeEdit( - customDialogUbicador.getVisibleValue().toIntOrNull()!!, - customDialogUbicador.getPackingValue().toInt(), - itemUbicador.id, - itemUbicador.grouping, - updateAvailable( - itemUbicador.available, - customDialogUbicador.getVisibleValue().toIntOrNull(), - itemUbicador.visible - ) - ) - - } - - } - - private fun updateAvailable(newAvailable: Int?, newVisible: Int?, oldVisible: Int?): Int { - val available = newAvailable ?: 0 - val visible = newVisible ?: 0 - val old = oldVisible ?: 0 - return maxOf(available + visible - old, 0) - } - - private fun insertShelvingsForUbicator(barCode: Number, visible: Int, packing: Int?) { - if (listShelvings.isNotEmpty()) listShelvings.clear() - customDialogList = CustomDialogList(requireContext()) - customDialogList.setTitle( - getString(R.string.shelvingsLocate) - ) - customDialogList.setDescription( - getString(R.string.scanShelvingsLocate) - ).setOkButton(getString(R.string.locate)) { - listShelvings.forEach { - viewModel.itemShelvingAdd( - shelving = it.code!!, - item = barCode, - quantity = visible, - packing = packing, - warehouse = mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK), - grouping = null - ) - - } - customDialogList.dismiss() - - }.setKoButton(getString(R.string.cancel)) { - ma.hideKeyboard(customDialogList.getEditText()) - customDialogList.dismiss() - - }.setValue("").show() - - customDialogList.getEditText().requestFocus() - ma.hideKeyboard(customDialogList.getEditText()) - - customDialogList.getEditText().setOnEditorActionListener { v, actionId, event -> - if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) { - if (customDialogList.getValue().isNotEmpty()) { - - try { - customDialogList.setValue( - itemScanValue( - customDialogList.getValue(), arrayOf("saleGroup"), field = "id" - ).toString() - ) - if (customDialogList.getValue().isShelving()) { - if (listShelvings.firstOrNull { it.code == customDialogList.getValue() } == null) { - listShelvings.add(BarcodeVO(code = customDialogList.getValue()))/*viewModel.sectorCollectionSaleGroupAdd( - customDialogList.getValue().toInt(), collectionFk - )*/ - } else { - throw Exception(getString(R.string.errorRepeatedShelving)) - } - } else { - throw Exception() - } - - } catch (ex: Exception) { - ma.messageWithSound( - getString(R.string.errorInput), - isError = true, - isPlayed = true, - isToasted = true - ) - listShelvings.removeAt(0) - } - - listShelvingsAdapter!!.notifyItemChanged(0) - } - customDialogList.setValue("") - ma.hideKeyboard(customDialogList.getEditText()) - return@setOnEditorActionListener true - } - false - } - - listShelvingsAdapter = BarcodeAdapter( - listShelvings, object : OnBarcodeRowClickListener { - override fun onBarcodeRowClickListener(item: BarcodeVO) { - - } - }, showDelete = false - ) - customDialogList.getRecyclerView().adapter = listShelvingsAdapter - - customDialogList.getRecyclerView().layoutManager = - LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) - - } - - private fun setWatcher() { - customDialogUbicador.addTextWatcher(customDialogUbicador.getPackingItem()) { s -> - - setValueVisible() - } - - customDialogUbicador.addTextWatcher(customDialogUbicador.getEtiquetaItem()) { s -> - - setValueVisible() - } - - customDialogUbicador.addTextWatcher(customDialogUbicador.getUnitsItem()) { s -> - - setValueVisible() - } - - } - - private fun setValueVisible() { - customDialogUbicador.setVisibleValue("") - customDialogUbicador.setVisibleValue( - (((customDialogUbicador.getEtiquetaValue().toIntOrNull() - ?: 0) * (customDialogUbicador.getPackingValue().toIntOrNull() - ?: 0)) + (customDialogUbicador.getUnitsValue().toIntOrNull() ?: 0)).toString() - ) - } - - private fun showMoreOptions(item: ItemUbicador) { - customDialogTwoButtons.setTitle(item.item.toString()) - .setDescription(getString(R.string.selectAction)) - .setOkButton(getString(R.string.transfer)) { - customDialogInput.setTitle(getString(R.string.shelvingNew)) - .setDescription(getString(R.string.selectDestiny) + item.item).setValue("") - .setOkButton(getString(R.string.transfer)) { - customDialogTransferAction(item) - - }.setKoButton(getString(R.string.cancel)) { - customDialogInput.dismiss() - }.show() - customDialogInput.getEditText().requestFocus() - ma.hideKeyboard(customDialogInput.getEditText()) - customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event -> - if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) { - customDialogTransferAction(item) - return@setOnEditorActionListener true - } - false - } - customDialogTwoButtons.dismiss() - }.setOkButtonTwo(getString(R.string.delete)) { - val customDialogConfirm = CustomDialog(requireContext()) - customDialogConfirm.setTitle(getString(R.string.confirm)).setDescription( - if (!isAutoSelf) { - getString(R.string.itemDeleteConfirm) + item.item + "?" - } else { - getString(R.string.deleteQuantity) + item.item - } - ).setOkButton(getString(R.string.delete)) { - if (!isAutoSelf) { - listItems.remove(item) - adapter!!.notifyItemRemoved(listItems.indexOf(item)) - viewModel.itemShelvingDelete( - item.id - ) - customDialogTwoButtons.dismiss() - customDialogConfirm.dismiss() - } else { - viewModel.itemShelvingSelfConsumption( - shelvingFk, item.item.toInt(), 0 - ) - customDialogConfirm.dismiss() - customDialogTwoButtons.dismiss() - } - }.setKoButton(getString(R.string.cancel)) { - customDialogConfirm.dismiss() - customDialogTwoButtons.dismiss() - } - customDialogConfirm.show() - } - //Tarea 7266 - .setOkButtonThree(getString(R.string.print)) { - val printerDialogManager = PrinterDialogManager(requireContext()) - printerDialogManager.showPrintDialog( - item.item, - item.description ?: "" - ) { id, labelType, packing, copies -> - - if (item.buyFk == null) { - viewModel.buyUltimate( - itemFk = item.id, - warehouseFk = mobileApplication.dataStoreApp.readDataStoreKey( - WAREHOUSEFK - ), - dated = LocalDate.now() - .format( - DateTimeFormatter.ofPattern("yyyy-dd-MM") - ), - reportName = "LabelBuy", - printerFk = mobileApplication.dataStoreApp.readDataStoreKey( - ConstAndValues.PRINTERFK - ), - userFk = mobileApplication.userId!!, - priority = "normal", - copies = copies, - labelType = labelType, - packing = packing - ) - customDialogTwoButtons.dismiss() - } else { - printItem( - item.buyFk!!, labelType, packing, copies - ) - customDialogTwoButtons.dismiss() - } - } - customDialogInput.getEditText().requestFocus() - } - //Tarea 7763 - /* - .setOkButtonThree(getString(R.string.rename)) { - customDialogInput.setTitle(getString(R.string.itemNew)) - .setDescription(getString(R.string.scanItem)).setValue("") - .setOkButton(getString(R.string.rename)) { - - actionRename(item, customDialogInput.getValue()) - - }.setKoButton(getString(R.string.cancel)) { - customDialogInput.dismiss() - customDialogTwoButtons.dismiss() - }.show() - customDialogInput.getEditText().setOnEditorActionListener { _, actionId, _ -> - if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) { - - actionRename(item, customDialogInput.getValue()) - return@setOnEditorActionListener true - } - false - } - customDialogInput.getEditText().requestFocus() - } - */ - customDialogTwoButtons.setKoButton(getString(R.string.cancel)) { - customDialogTwoButtons.dismiss() - } - - customDialogTwoButtons.show() - } - - private fun printItem(id: Number?, labelType: String, packing: Int?, copies: Int?) { - - try { - viewModel.printItem( - reportName = "LabelBuy", - printerFk = mobileApplication.dataStoreApp.readDataStoreKey( - ConstAndValues.PRINTERFK - ), - userFk = mobileApplication.userId!!, - priority = "normal", - params = JSONObject().apply { - put("copies", copies) - put("id", id) - put("labelType", labelType) - put("packing", packing) - }.toString().replace("\"", "\\\"") - ) - } catch (ex: Exception) { - ma.messageWithSound(message = ex.message.toString(), isError = true, isPlayed = true) - } - hideKeyboard() - } - - private fun actionRename(item: ItemUbicador, itemScan: String) { - - if (itemScan.isNotEmpty()) { - - renameItem( - item, itemScanValue( - itemScan, arrayOf("buy"), "id" - ).toString().toLong() - ) - customDialogInput.dismiss() - customDialogTwoButtons.dismiss() - } else { - getString(R.string.scanItem).toast(requireContext()) - } - - } - - private fun renameItem(item: ItemUbicador, barCode: Long) { - try { - viewModel.getInfoFromBuy(item.id, buyFk = barCode) - } catch (ex: Exception) { - ma.messageWithSound(ex.message.toString(), isError = true, isPlayed = true) - - } - - } - - private fun customDialogTransferAction(item: ItemUbicador) { - if (customDialogInput.getValue().isNotEmpty()) {/*tearea 6964*//* - viewModel.hasItemOlder( - shelvingFkIn = shelvingFk, - shelvingFkOut = customDialogInput.getValue(), - itemFk = item.id, - action = Action.TRANSFERIR - )*/ - viewModel.itemShelvingTransfer( - item.id, customDialogInput.getValue() - ) - listItems.remove(item) - adapter!!.notifyItemRemoved(listItems.indexOf(item)) - //adapter!!.notifyDataSetChanged() - customDialogInput.dismiss() - } else { - getString(R.string.wagonIncorrect).toast(requireContext()) - - } - } -} From df764e0960a62896a5d1a185f1af6becee1bdbc5 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Thu, 9 Jan 2025 16:23:11 +0100 Subject: [PATCH 02/44] feat: refs#6413 refactorUbicador --- .../view/feature/ubicador/fragment/UbicadorFragment.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt index e6548e5b..598a58e5 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt @@ -865,7 +865,6 @@ class UbicadorFragment : BaseFragment Date: Mon, 13 Jan 2025 16:38:45 +0100 Subject: [PATCH 03/44] feat: refs#6861 reservas --- .../view/component/CustomDialogList.kt | 11 +++++++ .../feature/collection/adapter/SaleAdapter.kt | 6 ++-- .../collection/adapter/SaleAdapterNew.kt | 10 +++++- .../CollectionFragmentPickerPreviousNew.kt | 32 ++++++++++++++++--- .../feature/sacador/model/TicketItemVO.kt | 3 +- app/src/main/res/layout/sale_row_fragment.xml | 12 ++++++- app/src/main/res/values-es/strings.xml | 2 +- app/src/main/res/values-fr/strings.xml | 2 +- app/src/main/res/values-pt/strings.xml | 2 +- app/src/main/res/values/strings.xml | 2 +- 10 files changed, 68 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogList.kt b/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogList.kt index aaeaa032..94b41569 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogList.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogList.kt @@ -69,6 +69,12 @@ class CustomDialogList(context: Context) : Dialog(context, R.style.DialogTheme) return this } + fun setTitleSpannable(title: CharSequence): CustomDialogList { + binding.customDialogTitle.visibility = View.VISIBLE + binding.customDialogTitle.text = title + return this + } + fun setDescription(title: String): CustomDialogList { binding.customDialogDescription.visibility = View.VISIBLE binding.customDialogDescription.text = title @@ -148,4 +154,9 @@ class CustomDialogList(context: Context) : Dialog(context, R.style.DialogTheme) fun getFocusThree() { binding.customDialogValueThree.requestFocus() } + + fun setTextSize(size: Float): CustomDialogList { + binding.customDialogValue.textSize = size + return this + } } \ No newline at end of file diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt index 5002a4a1..27a7d528 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt @@ -278,10 +278,10 @@ class SaleAdapter( )*/ } else if (sale.isPreviousPrepared == "1") { contentLayout.setBackgroundColor( - getColor( + if (sale.picked == null) getColor( context!!, - R.color.verdnatura_dark_sky_blue - ) + R.color.verdnatura_black + ) else getColor(context!!, R.color.verdnatura_dark_sky_blue) ) } else { contentLayout.setBackgroundColor(getColor(context!!, R.color.verdnatura_black)) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt index bf0f30e6..3d57c353 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt @@ -354,7 +354,15 @@ class SaleAdapterNew( println("parkingCodePrevia ${sale.parkingCodePrevia}") println("parkingCode ${sale.parkingCode}") - + if (type == PREITEMPICKERTEST) { + binding.level.visibility = GONE + binding.levelTxt.visibility = GONE + binding.ticketOrder.visibility = VISIBLE + } else { + binding.level.visibility = VISIBLE + binding.levelTxt.visibility = VISIBLE + binding.ticketOrder.visibility = GONE + } this.sale = sale } diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerPreviousNew.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerPreviousNew.kt index e8281925..eb2e295b 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerPreviousNew.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerPreviousNew.kt @@ -7,7 +7,11 @@ import android.os.Bundle import android.os.Handler import android.os.Looper import android.text.InputType +import android.text.Spannable +import android.text.SpannableString +import android.text.style.AbsoluteSizeSpan import android.util.Log.d +import android.util.TypedValue import android.view.KeyEvent import android.view.View import android.view.View.VISIBLE @@ -708,8 +712,21 @@ class CollectionFragmentPickerPreviousNew( val longName = myGroupList[pos].longName val totalReserved = myGroupList[pos].reservedQuantity + val spannable = SpannableString("$item\n$longName") + + spannable.setSpan( + AbsoluteSizeSpan( + TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, 16f, resources.displayMetrics) + .toInt(), true + ), + 0, + item.toString().length, + Spannable.SPAN_EXCLUSIVE_EXCLUSIVE + ) + try { - customDialogList.setTitle("$shelving($item) $totalReserved de $longName").setOkButton( + customDialogList.setTitleSpannable(spannable) + customDialogList.setOkButton( getString( R.string.take ) @@ -721,7 +738,9 @@ class CollectionFragmentPickerPreviousNew( customDialogList.dismiss() scanRequest() - }.setHintValue(getString(R.string.quantitySelect)).setValue(totalReserved.toString()) + }.setHintValue(getString(R.string.quantitySelect)) + .setTextSize(20f) + .setValue(totalReserved.toString()) .setHintValueTwo(getString(R.string.scanItem)).setValueTwo("").show() customDialogList.getEditTextTwo().setOnEditorActionListener { v, actionId, event -> @@ -784,7 +803,11 @@ class CollectionFragmentPickerPreviousNew( mpok?.start() ma.hideKeyboard(customDialogList.getEditTextTwo()) customDialogList.dismiss() - requireContext().showToastCenterWithBackground(myGroupList[position].ticketFk.toString()) + requireContext().showToastCenterWithBackground( + if (type == PREITEMPICKERTEST) "(" + myGroupList[position].ticketOrder + ")" + myGroupList[position].ticketFk.toString() else { + myGroupList[position].ticketFk.toString() + } + ) scanRequest() } else { @@ -1144,7 +1167,8 @@ class CollectionFragmentPickerPreviousNew( size = value[0].size, itemShelvingSaleFk = value[0].itemShelvingSaleFk, longName = value[0].parkingCode ?: "", - itemShelvingFk = 0 + itemShelvingFk = 0, + ticketOrder = value[0].ticketOrder ?: null ) //prime elemento//hay que hacer una copia si no queda la referencia diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt index 2ed5f732..c859e692 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/model/TicketItemVO.kt @@ -69,7 +69,8 @@ data class Sale( var accumulatedQuantity: Int = 0, var totalItemShelving: Int = 0, var currentItemShelving: Int = 0, - var stateCode: String? = "" + var stateCode: String? = "", + var ticketOrder: Int? = null ) diff --git a/app/src/main/res/layout/sale_row_fragment.xml b/app/src/main/res/layout/sale_row_fragment.xml index 2ce1cc86..c42f4b77 100644 --- a/app/src/main/res/layout/sale_row_fragment.xml +++ b/app/src/main/res/layout/sale_row_fragment.xml @@ -72,12 +72,22 @@ android:layout_height="wrap_content" android:text="@{Integer.toString(sale.ticketFk)}" android:textColor="@color/verdnatura_black" - android:textSize="@dimen/h8" + android:textSize="@dimen/h7" android:textStyle="bold" tool:text="123456789" /> + + %1$d:%2$d %1$02d-%2$02d-%3$04d Nivel: - -T: + T: Firma: Observaciones: Imágenes adjuntas: diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml index d8948307..4f8a62d5 100644 --- a/app/src/main/res/values-fr/strings.xml +++ b/app/src/main/res/values-fr/strings.xml @@ -730,7 +730,7 @@ %1$d:%2$d %1$02d-%2$02d-%3$04d Nivel: - -T: + T: Firma: Observaciones: Imágenes adjuntas: diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml index 1323bab0..736d1de2 100644 --- a/app/src/main/res/values-pt/strings.xml +++ b/app/src/main/res/values-pt/strings.xml @@ -730,7 +730,7 @@ %1$d:%2$d %1$02d-%2$02d-%3$04d Nivel: - -T: + T: Firma: Observaciones: Imágenes adjuntas: diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 9ef3eb13..8bb05574 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -731,7 +731,7 @@ %1$d:%2$d %1$02d-%2$02d-%3$04d Nivel: - -T: + T: Firma: Observaciones: Imágenes adjuntas: From 0709fe3127f744cb6fac33c1a8ba23173e5f9362 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Mon, 13 Jan 2025 16:39:27 +0100 Subject: [PATCH 04/44] feat: refs#4488 packingMistake --- .idea/workspace.xml | 162 +++++++++++------- .../presentation/view/commom/WebFragment.kt | 34 +++- .../delivery/fragments/TicketsFragment.kt | 2 +- .../fragment/PackingMistakeFragment.kt | 11 +- 4 files changed, 137 insertions(+), 72 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 24a6a185..7458e311 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -34,6 +34,7 @@ + es false android-27 @@ -285,6 +286,11 @@ @style/AppTheme + + + @style/AppTheme + + @style/AppTheme @@ -431,6 +437,11 @@ @style/AppTheme + + + @style/AppTheme + + @style/AppTheme @@ -493,12 +504,24 @@ - - - + + + + + + + - - + + + + + + + + + +