refs #6284 feat:update && deprecated

This commit is contained in:
Sergio De la torre 2024-02-29 08:46:54 +01:00
parent 6c2855a7a4
commit ff00e0a5ef
74 changed files with 327 additions and 284 deletions

View File

@ -29,7 +29,7 @@ import es.verdnatura.presentation.view.feature.paletizador.fragment.PalletScanVi
import es.verdnatura.presentation.view.feature.parking.fragment.ParkingViewModel import es.verdnatura.presentation.view.feature.parking.fragment.ParkingViewModel
import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroViewModel import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroViewModel
import es.verdnatura.presentation.view.feature.photos.fragment.PhotosViewModel import es.verdnatura.presentation.view.feature.photos.fragment.PhotosViewModel
import es.verdnatura.presentation.view.feature.precontrol.ShowTicketViewModel import es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowTicketViewModel
import es.verdnatura.presentation.view.feature.presacador.fragment.PreSacadorViewModel import es.verdnatura.presentation.view.feature.presacador.fragment.PreSacadorViewModel
import es.verdnatura.presentation.view.feature.qr.QrFragmentViewModel import es.verdnatura.presentation.view.feature.qr.QrFragmentViewModel
import es.verdnatura.presentation.view.feature.sacador.fragment.SacadorViewModel import es.verdnatura.presentation.view.feature.sacador.fragment.SacadorViewModel

View File

@ -1,8 +1,8 @@
package es.verdnatura.presentation.common package es.verdnatura.presentation.common
import android.graphics.Rect; import android.graphics.Rect
import android.view.View; import android.view.View
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView
class ItemDescorationCustomized(private val verticalSpaceHeight: Int) : RecyclerView.ItemDecoration() { class ItemDescorationCustomized(private val verticalSpaceHeight: Int) : RecyclerView.ItemDecoration() {

View File

@ -71,7 +71,7 @@ class testPrint(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.buttonPrintTemplate.setOnClickListener { binding.buttonPrintTemplate.setOnClickListener {

View File

@ -7,16 +7,13 @@ import android.view.View
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputEditText
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.ComponentCustomEditDialogBinding
import es.verdnatura.databinding.ComponentCustomEditDialogNotesBinding import es.verdnatura.databinding.ComponentCustomEditDialogNotesBinding
class CustomDialogInputNotes(context: Context) : Dialog(context, R.style.DialogTheme) { class CustomDialogInputNotes(context: Context) : Dialog(context, R.style.DialogTheme) {
private var binding: ComponentCustomEditDialogNotesBinding = private var binding: ComponentCustomEditDialogNotesBinding =
ComponentCustomEditDialogNotesBinding.inflate(layoutInflater) ComponentCustomEditDialogNotesBinding.inflate(layoutInflater)
init { init {
setContentView(binding.root) setContentView(binding.root)
@ -82,6 +79,7 @@ class CustomDialogInputNotes(context: Context) : Dialog(context, R.style.DialogT
fun setFocusText() { fun setFocusText() {
binding.customDialogValue.requestFocus() binding.customDialogValue.requestFocus()
} }
fun getRecyclerView(): RecyclerView { fun getRecyclerView(): RecyclerView {
return binding.recyclerItems return binding.recyclerItems
} }

View File

@ -2,32 +2,26 @@ package es.verdnatura.presentation.view.component
import android.app.Dialog import android.app.Dialog
import android.content.Context import android.content.Context
import android.text.InputType
import android.view.View import android.view.View
import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputEditText
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.ComponentCustomEditDialogThreeValuesBinding import es.verdnatura.databinding.ComponentCustomEditDialogThreeValuesBinding
import es.verdnatura.databinding.ComponentCustomEditDialogTwoValuesBinding
class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.DialogTheme) { class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.DialogTheme) {
private var binding: ComponentCustomEditDialogThreeValuesBinding = private var binding: ComponentCustomEditDialogThreeValuesBinding =
ComponentCustomEditDialogThreeValuesBinding.inflate(layoutInflater) ComponentCustomEditDialogThreeValuesBinding.inflate(layoutInflater)
init { init {
setContentView(binding.root) setContentView(binding.root)
} }
fun getEditText(): TextInputEditText { fun getEditText(): TextInputEditText {
return binding.customDialogValueOne return binding.customDialogValueOne
} }
fun getEditTextTwo(): TextInputEditText { fun getEditTextTwo(): TextInputEditText {
@ -40,7 +34,6 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
return binding.customDialogValueOne.text.toString() return binding.customDialogValueOne.text.toString()
} }
fun getValueTwo(): String { fun getValueTwo(): String {
@ -48,6 +41,7 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
return binding.customDialogValueTwo.text.toString() return binding.customDialogValueTwo.text.toString()
} }
fun getValueThree(): String { fun getValueThree(): String {
return binding.customDialogValueThree.text.toString() return binding.customDialogValueThree.text.toString()
@ -62,6 +56,7 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
return this return this
} }
fun setValueTwo(value: String): CustomDialogInputThreeValues { fun setValueTwo(value: String): CustomDialogInputThreeValues {
binding.customDialogValueTwo.setText(value) binding.customDialogValueTwo.setText(value)
@ -70,6 +65,7 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
return this return this
} }
fun setEnableValue(isEnabled: Boolean): CustomDialogInputThreeValues { fun setEnableValue(isEnabled: Boolean): CustomDialogInputThreeValues {
binding.customDialogValueOne.isEnabled = isEnabled binding.customDialogValueOne.isEnabled = isEnabled
@ -77,6 +73,7 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
return this return this
} }
fun setTitle(title: String): CustomDialogInputThreeValues { fun setTitle(title: String): CustomDialogInputThreeValues {
binding.customDialogTitle.visibility = View.VISIBLE binding.customDialogTitle.visibility = View.VISIBLE
@ -113,18 +110,16 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
return this return this
} }
fun setInfoTex(text: String, text2: String, text3: String) { fun setInfoTex(text: String, text2: String, text3: String) {
binding.customDialogValueOne.hint = text binding.customDialogValueOne.hint = text
binding.customDialogValueTwo.hint = text2 binding.customDialogValueTwo.hint = text2
binding.customDialogValueThree.hint = text3 binding.customDialogValueThree.hint = text3
} }
fun setInputTextTwoVisibility() { fun setInputTextTwoVisibility() {
binding.textinputlayoutTwo.visibility = View.VISIBLE binding.textinputlayoutTwo.visibility = View.VISIBLE
} }
fun setInputTextVisibility(visibility: Int) { fun setInputTextVisibility(visibility: Int) {
binding.textinputlayoutTwo.visibility = visibility binding.textinputlayoutTwo.visibility = visibility
} }
@ -136,6 +131,7 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
fun setFocusTextTwo() { fun setFocusTextTwo() {
binding.customDialogValueTwo.requestFocus() binding.customDialogValueTwo.requestFocus()
} }
fun setFocusTextThree() { fun setFocusTextThree() {
binding.customDialogValueThree.requestFocus() binding.customDialogValueThree.requestFocus()
} }

View File

@ -2,19 +2,16 @@ package es.verdnatura.presentation.view.component
import android.app.Dialog import android.app.Dialog
import android.content.Context import android.content.Context
import android.text.InputType
import android.view.View import android.view.View
import com.google.android.material.textfield.TextInputEditText import com.google.android.material.textfield.TextInputEditText
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.ComponentCustomEditDialogTwoValuesBinding import es.verdnatura.databinding.ComponentCustomEditDialogTwoValuesBinding
class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.DialogTheme) { class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.DialogTheme) {
private var binding: ComponentCustomEditDialogTwoValuesBinding = private var binding: ComponentCustomEditDialogTwoValuesBinding =
ComponentCustomEditDialogTwoValuesBinding.inflate(layoutInflater) ComponentCustomEditDialogTwoValuesBinding.inflate(layoutInflater)
init { init {
setContentView(binding.root) setContentView(binding.root)
@ -27,7 +24,6 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
return binding.customDialogValue return binding.customDialogValue
} }
fun getEditTextTwo(): TextInputEditText { fun getEditTextTwo(): TextInputEditText {
@ -40,7 +36,6 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
return binding.customDialogValue.text.toString() return binding.customDialogValue.text.toString()
} }
fun getValueTwo(): String { fun getValueTwo(): String {
@ -66,6 +61,7 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
return this return this
} }
fun setEnableValue(isEnabled: Boolean): CustomDialogInputTwoValues { fun setEnableValue(isEnabled: Boolean): CustomDialogInputTwoValues {
binding.customDialogValue.isEnabled = isEnabled binding.customDialogValue.isEnabled = isEnabled
@ -73,6 +69,7 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
return this return this
} }
fun setTitle(title: String): CustomDialogInputTwoValues { fun setTitle(title: String): CustomDialogInputTwoValues {
binding.customDialogTitle.visibility = View.VISIBLE binding.customDialogTitle.visibility = View.VISIBLE
@ -81,7 +78,6 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
return this return this
} }
fun setDescription(description: String): CustomDialogInputTwoValues { fun setDescription(description: String): CustomDialogInputTwoValues {
binding.customDialogDescription.visibility = View.VISIBLE binding.customDialogDescription.visibility = View.VISIBLE
@ -117,9 +113,11 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
fun setInputTextTwo() { fun setInputTextTwo() {
// binding.customDialogValueTwo.inputType = InputType.TYPE_CLASS_NUMBER // binding.customDialogValueTwo.inputType = InputType.TYPE_CLASS_NUMBER
} }
fun setInfoTex(text: String) { fun setInfoTex(text: String) {
binding.textinputlayoutUsername.hint = text binding.textinputlayoutUsername.hint = text
} }
fun setHint(visible: Boolean) { fun setHint(visible: Boolean) {
binding.textinputlayoutUsername.isHintEnabled = visible binding.textinputlayoutUsername.isHintEnabled = visible
binding.textinputlayoutTwo.isHintEnabled = visible binding.textinputlayoutTwo.isHintEnabled = visible
@ -129,10 +127,10 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
binding.textinputlayoutTwo.hint = text binding.textinputlayoutTwo.hint = text
} }
fun setInputTextTwoVisibility() { fun setInputTextTwoVisibility() {
binding.textinputlayoutTwo.visibility = View.VISIBLE binding.textinputlayoutTwo.visibility = View.VISIBLE
} }
fun setInputTextVisibility(visibility: Int) { fun setInputTextVisibility(visibility: Int) {
binding.textinputlayoutTwo.visibility = visibility binding.textinputlayoutTwo.visibility = visibility
} }

View File

@ -134,7 +134,7 @@ class AjustesFragment :
if (item.id == 0) { if (item.id == 0) {
viewModel.getSectorsSalix() viewModel.getSectorsSalix()
} else if (item.id == 5) { } else if (item.id == 5) {
ma.onBackPressed() ma.onMyBackPressed()
} else if (item.id == 1) { } else if (item.id == 1) {
ma.messageWithSound( ma.messageWithSound(

View File

@ -178,7 +178,7 @@ class ItemCardFragment(
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
customDynamic.removeViewsDialog() customDynamic.removeViewsDialog()
customDynamic.cancel() customDynamic.cancel()

View File

@ -110,7 +110,7 @@ class ItemProposalFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -30,7 +30,7 @@ class BufferFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.requestFocus() binding.scanInput.requestFocus()

View File

@ -80,7 +80,7 @@ class BufferLoadFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
@ -129,7 +129,7 @@ class BufferLoadFragment(
ma.hideKeyboard(customDialogList.getEditText()) ma.hideKeyboard(customDialogList.getEditText())
listTags.clear() listTags.clear()
customDialogList.dismiss() customDialogList.dismiss()
ma.onBackPressed() ma.onMyBackPressed()
}.setValue("").show() }.setValue("").show()

View File

@ -64,7 +64,7 @@ class BuscarItemFragment(
} }
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -64,7 +64,7 @@ class ClaimFragment(
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
customDialogList.dismiss() customDialogList.dismiss()
ma.onBackPressed() ma.onMyBackPressed()
} }
@ -118,7 +118,7 @@ class ClaimFragment(
ma.hideKeyboard(customDialogList.getEditText()) ma.hideKeyboard(customDialogList.getEditText())
customDialogList.dismiss() customDialogList.dismiss()
ma.onBackPressed() ma.onMyBackPressed()
}.setValue("").show() }.setValue("").show()

View File

@ -1,7 +1,5 @@
package es.verdnatura.presentation.view.feature.collection package es.verdnatura.presentation.view.feature.collection
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyVO
class ItemVO( class ItemVO(
var id: String = "", var id: String = "",
var longName: String = "", var longName: String = "",
@ -10,6 +8,7 @@ class ItemVO(
var isError: Boolean = false, var isError: Boolean = false,
var errorMessage: String = "" var errorMessage: String = ""
) )
class SalixSaleQuantity( class SalixSaleQuantity(
var saleId: Int = 0, var saleId: Int = 0,
var quantity: Int = 0 var quantity: Int = 0
@ -18,6 +17,7 @@ class SalixSaleQuantity(
class listSaleSalix( class listSaleSalix(
var sales: ArrayList<saleSalix> var sales: ArrayList<saleSalix>
) )
class saleSalix( class saleSalix(
var id: Int = 0, var id: Int = 0,
var quantity: Int = 0 var quantity: Int = 0
@ -33,6 +33,7 @@ class SalesModified(
var errorMessage: String = "" var errorMessage: String = ""
) )
class SalesModifiedList( class SalesModifiedList(
var list: List<SalesModified> = listOf() var list: List<SalesModified> = listOf()
) )

View File

@ -369,7 +369,7 @@ class CollectionFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
//ESCANER ========= //ESCANER =========
hideKeyboards() hideKeyboards()
@ -478,7 +478,7 @@ class CollectionFragment(
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage) customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
.setOkButton(getString(R.string.accept)) { .setOkButton(getString(R.string.accept)) {
customDialog.dismiss() customDialog.dismiss()
if (activity != null) ma.onBackPressed() if (activity != null) ma.onMyBackPressed()
}.show() }.show()
} }
@ -1467,7 +1467,7 @@ class CollectionFragment(
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1", isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
originalQuantity = sales[position].pickedQuantity!!, originalQuantity = sales[position].pickedQuantity!!,
code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(), code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
buyFk = originalItemScan!!, buyFk = originalItemScan,
isScanned = isScanned isScanned = isScanned
) )
@ -1484,7 +1484,7 @@ class CollectionFragment(
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1", isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
originalQuantity = sales[position].pickedQuantity!!, originalQuantity = sales[position].pickedQuantity!!,
code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(), code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
buyFk = originalItemScan!!, buyFk = originalItemScan,
itemShelvingFk = itemShelvingTracking_mark, itemShelvingFk = itemShelvingTracking_mark,
quantity = customDialogList.getValue().toInt(), quantity = customDialogList.getValue().toInt(),
isScanned = isScanned isScanned = isScanned
@ -1661,7 +1661,7 @@ class CollectionFragment(
requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
lManager.hideSoftInputFromWindow( lManager.hideSoftInputFromWindow(
customDialogList.getEditTextTwo().windowToken, customDialogList.getEditTextTwo().windowToken,
InputMethodManager.SHOW_FORCED InputMethodManager.SHOW_IMPLICIT
) )
} }

View File

@ -12,7 +12,6 @@ import android.os.Parcelable
import android.text.InputType import android.text.InputType
import android.text.InputType.TYPE_CLASS_NUMBER import android.text.InputType.TYPE_CLASS_NUMBER
import android.text.InputType.TYPE_CLASS_TEXT import android.text.InputType.TYPE_CLASS_TEXT
import android.util.Log.d
import android.view.KeyEvent import android.view.KeyEvent
import android.view.KeyEvent.ACTION_DOWN import android.view.KeyEvent.ACTION_DOWN
import android.view.View import android.view.View
@ -30,7 +29,6 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.gson.Gson import com.google.gson.Gson
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.FragmentCollectionBinding import es.verdnatura.databinding.FragmentCollectionBinding
import es.verdnatura.domain.ConstAndValues.BASEURLSALIX
import es.verdnatura.domain.ConstAndValues.CONTROLADOR import es.verdnatura.domain.ConstAndValues.CONTROLADOR
import es.verdnatura.domain.ConstAndValues.OK import es.verdnatura.domain.ConstAndValues.OK
import es.verdnatura.domain.ConstAndValues.PRECHECKER import es.verdnatura.domain.ConstAndValues.PRECHECKER
@ -129,7 +127,6 @@ class CollectionFragmentPreChecker(
override fun getLayoutId(): Int = R.layout.fragment_collection override fun getLayoutId(): Int = R.layout.fragment_collection
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
d("VERDNATURA::", "Precontrol test. No operativo todavia")
mperror = MediaPlayer.create((activity as MainActivity), R.raw.error) mperror = MediaPlayer.create((activity as MainActivity), R.raw.error)
mpok = MediaPlayer.create((activity as MainActivity), R.raw.ok) mpok = MediaPlayer.create((activity as MainActivity), R.raw.ok)
if (type.equals(CONTROLADOR)) { if (type.equals(CONTROLADOR)) {
@ -366,7 +363,7 @@ class CollectionFragmentPreChecker(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
//ESCANER ========= //ESCANER =========
hideKeyboards() hideKeyboards()
@ -493,7 +490,7 @@ class CollectionFragmentPreChecker(
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage) customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
.setOkButton(getString(R.string.accept)) { .setOkButton(getString(R.string.accept)) {
customDialog.dismiss() customDialog.dismiss()
if (activity != null) ma.onBackPressed() if (activity != null) ma.onMyBackPressed()
}.show() }.show()
} }
@ -1014,7 +1011,8 @@ class CollectionFragmentPreChecker(
if (type == CONTROLADOR || type == PRECHECKER) { if (type == CONTROLADOR || type == PRECHECKER) {
if (salesList.filter { it.sectorFk != null && it.sectorFk!! > 0 }.isNotEmpty()) { if (salesList.filter { it.sectorFk != null && it.sectorFk!! > 0 }.isNotEmpty()) {
sales = salesList.filter { it.sectorFk == mobileApplication.dataStoreApp.readDataStoreKey<Int>(SECTORFK) sales = salesList.filter {
it.sectorFk == mobileApplication.dataStoreApp.readDataStoreKey<Int>(SECTORFK)
}.sortedWith(compareBy({ it.picked })) }.sortedWith(compareBy({ it.picked }))
} else { } else {
sales = salesList.sortedWith(compareBy({ it.picked })) sales = salesList.sortedWith(compareBy({ it.picked }))
@ -1139,7 +1137,6 @@ class CollectionFragmentPreChecker(
binding.fragmentSacadorCollections.addOnScrollListener(object : binding.fragmentSacadorCollections.addOnScrollListener(object :
RecyclerView.OnScrollListener() { RecyclerView.OnScrollListener() {
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) { override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
d("VERDNA:TURA:", "onScrollListener ${lm!!.findFirstVisibleItemPosition()}")
storedBackPosition = lm.findFirstVisibleItemPosition() storedBackPosition = lm.findFirstVisibleItemPosition()
super.onScrolled(recyclerView, dx, dy) super.onScrolled(recyclerView, dx, dy)
} }
@ -1682,7 +1679,7 @@ class CollectionFragmentPreChecker(
requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
lManager.hideSoftInputFromWindow( lManager.hideSoftInputFromWindow(
customDialogList.getEditTextTwo().windowToken, customDialogList.getEditTextTwo().windowToken,
InputMethodManager.SHOW_FORCED InputMethodManager.SHOW_IMPLICIT
) )
} }
@ -1824,7 +1821,6 @@ class CollectionFragmentPreChecker(
} }
private fun checkItemScan(valueToCheck: String): Boolean { private fun checkItemScan(valueToCheck: String): Boolean {
d("VERDNATURA::", "Entramos a ver el checkItem")
if (storedPosition >= 0 && sales.size > storedPosition) { if (storedPosition >= 0 && sales.size > storedPosition) {
val saleToCheck = sales[storedPosition] val saleToCheck = sales[storedPosition]
@ -1837,7 +1833,7 @@ class CollectionFragmentPreChecker(
} }
} }
} }
d("VERDNATURA::", "SAlimos de ver el checkItem")
return false return false
} }

View File

@ -179,7 +179,7 @@ class CollectionShowTicketFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.setOnEditorActionListener { _, actionId, _ -> binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
@ -248,7 +248,7 @@ class CollectionShowTicketFragment(
} }
} else { } else {
ma.messageWithSound(it.errorMessage, it.isError, false) ma.messageWithSound(it.errorMessage, it.isError, false)
if (activity != null) ma.onBackPressed() if (activity != null) ma.onMyBackPressed()
} }

View File

@ -50,7 +50,7 @@ class ControladorFragment :
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.requestFocus() binding.scanInput.requestFocus()

View File

@ -138,7 +138,7 @@ class ControlVehiculoFragment(
.setKoButton(getString(R.string.cancel)) { .setKoButton(getString(R.string.cancel)) {
customDialogInput.dismiss() customDialogInput.dismiss()
if (tagName.equals(HistoricoVehiculoFragment.TAG)) { if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
ma.onBackPressed() ma.onMyBackPressed()
} }
}.setValue("").show() }.setValue("").show()

View File

@ -120,7 +120,7 @@ class ControlVehiculoUsuarioFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -6,16 +6,13 @@ import androidx.core.content.ContextCompat.getColor
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.ItemExpeditionLoadunloadRowBinding import es.verdnatura.databinding.ItemExpeditionLoadunloadRowBinding
import es.verdnatura.presentation.common.OnItemCardRowClickListener
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
class ExpeditionLoadUnloadAdapter( class ExpeditionLoadUnloadAdapter(
private val items: List<ExpeditionInfoLoadUnload>, private val items: List<ExpeditionInfoLoadUnload>,
) : RecyclerView.Adapter<ExpeditionLoadUnloadAdapter.ItemHolder>() { ) : RecyclerView.Adapter<ExpeditionLoadUnloadAdapter.ItemHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
return ItemHolder( return ItemHolder(
ItemExpeditionLoadunloadRowBinding.inflate( ItemExpeditionLoadunloadRowBinding.inflate(
@ -45,6 +42,7 @@ class ExpeditionLoadUnloadAdapter(
getColor(expeditionView.context, R.color.verdnatura_pumpkin_orange) getColor(expeditionView.context, R.color.verdnatura_pumpkin_orange)
) )
} }
"DELIVERED" -> expeditionView.setBackgroundColor( "DELIVERED" -> expeditionView.setBackgroundColor(
getColor(expeditionView.context, R.color.verdnatura_dark_mint) getColor(expeditionView.context, R.color.verdnatura_dark_mint)
) )
@ -52,6 +50,7 @@ class ExpeditionLoadUnloadAdapter(
"PALLETIZED" -> expeditionView.setBackgroundColor( "PALLETIZED" -> expeditionView.setBackgroundColor(
getColor(expeditionView.context, R.color.verdnatura_black_5) getColor(expeditionView.context, R.color.verdnatura_black_5)
) )
else -> { else -> {
expeditionView.setBackgroundColor( expeditionView.setBackgroundColor(
getColor(expeditionView.context, R.color.verdnatura_black_5) getColor(expeditionView.context, R.color.verdnatura_black_5)

View File

@ -4,26 +4,18 @@ import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R
import es.verdnatura.databinding.ItemExpeditionSummaryRowBinding
import es.verdnatura.databinding.ItemRouteRowBinding import es.verdnatura.databinding.ItemRouteRowBinding
import es.verdnatura.domain.toDateString import es.verdnatura.domain.toDateString
import es.verdnatura.presentation.common.OnAddressRowClickListener
import es.verdnatura.presentation.common.OnItemCardRowClickListener
import es.verdnatura.presentation.common.OnItemImageLoadRowClickListener
import es.verdnatura.presentation.common.OnItemImageRouteRowClickListener import es.verdnatura.presentation.common.OnItemImageRouteRowClickListener
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
import es.verdnatura.presentation.view.feature.delivery.model.RouteLoaded import es.verdnatura.presentation.view.feature.delivery.model.RouteLoaded
class RouteAdapter( class RouteAdapter(
private var items: MutableList<RouteInfo>, private var items: MutableList<RouteInfo>,
private val OnItemImageRouteRowClickListener: OnItemImageRouteRowClickListener, private val OnItemImageRouteRowClickListener: OnItemImageRouteRowClickListener,
private val routeLoaded: List<RouteLoaded> = listOf() private val routeLoaded: List<RouteLoaded> = listOf()
) : RecyclerView.Adapter<RouteAdapter.ItemHolder>() { ) : RecyclerView.Adapter<RouteAdapter.ItemHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
items = setHeaders(items) items = setHeaders(items)
return ItemHolder( return ItemHolder(
@ -46,6 +38,7 @@ class RouteAdapter(
} }
return list return list
} }
fun updateList(newList: MutableList<RouteInfo>) { fun updateList(newList: MutableList<RouteInfo>) {
items = setHeaders(newList) items = setHeaders(newList)
notifyDataSetChanged() notifyDataSetChanged()
@ -70,18 +63,29 @@ class RouteAdapter(
fun bind(item: RouteInfo) { fun bind(item: RouteInfo) {
binding.apply { binding.apply {
showTickets.setOnClickListener { showTickets.setOnClickListener {
OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"showTickets") OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(
item,
"showTickets"
)
} }
imageLoadVan.setOnClickListener { imageLoadVan.setOnClickListener {
OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"loadVan") OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(
item,
"loadVan"
)
} }
linearLayoutShowTickets.setOnClickListener { linearLayoutShowTickets.setOnClickListener {
OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"showTickets") OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(
item,
"showTickets"
)
} }
linearLayoutLoadVan.setOnClickListener { linearLayoutLoadVan.setOnClickListener {
OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"loadVan") OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(
item,
"loadVan"
)
} }
if (item.header) { if (item.header) {
@ -90,7 +94,6 @@ class RouteAdapter(
} else { } else {
headerRouteLayout.visibility = View.GONE headerRouteLayout.visibility = View.GONE
} }
if (routeLoaded.filter { it.id == item.id }.isNotEmpty()) { if (routeLoaded.filter { it.id == item.id }.isNotEmpty()) {

View File

@ -25,7 +25,7 @@ class InfoFragment(var title: String) :
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -212,13 +212,13 @@ class LoadUnloadFragment(
intent.putExtra("objectSigned", "ticket") //cmr intent.putExtra("objectSigned", "ticket") //cmr
startActivity(intent) startActivity(intent)
ma.onBackPressed() ma.onMyBackPressed()
} }
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.setOnEditorActionListener { _, actionId, _ -> binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
@ -319,7 +319,7 @@ class LoadUnloadFragment(
if (state == "DELIVERED") { if (state == "DELIVERED") {
openSignActivity() openSignActivity()
} else { } else {
ma.onBackPressed() ma.onMyBackPressed()
} }
} else { } else {
binding.mainToolbar.switchButton.isChecked = false binding.mainToolbar.switchButton.isChecked = false

View File

@ -84,7 +84,7 @@ class LogExpeditionFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.setOnEditorActionListener { _, actionId, _ -> binding.scanInput.setOnEditorActionListener { _, actionId, _ ->

View File

@ -187,7 +187,7 @@ class RoutesFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }

View File

@ -205,7 +205,7 @@ class SummaryFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }

View File

@ -212,7 +212,7 @@ class TicketsFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
if (!binding.itemcardLayout.isVisible) { if (!binding.itemcardLayout.isVisible) {
ma.onBackPressed() ma.onMyBackPressed()
} else { } else {
setSettingsRoute() setSettingsRoute()

View File

@ -92,7 +92,7 @@ class DayOfSaleFragment(
} }
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -118,7 +118,7 @@ class HistoricoArticuloFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.filterNameordateitem.setOnKeyListener { v, keyCode, event -> binding.filterNameordateitem.setOnKeyListener { v, keyCode, event ->

View File

@ -61,7 +61,7 @@ class ItemShelvingLogFragment(
false false
} }
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -7,7 +7,6 @@ import androidx.recyclerview.widget.LinearLayoutManager
import com.google.gson.Gson import com.google.gson.Gson
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.FragmentShelvinglogBinding import es.verdnatura.databinding.FragmentShelvinglogBinding
import es.verdnatura.domain.ConstAndValues.BASEURLSALIX
import es.verdnatura.domain.notNull import es.verdnatura.domain.notNull
import es.verdnatura.presentation.base.BaseFragment import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.view.component.CustomDialog import es.verdnatura.presentation.view.component.CustomDialog
@ -63,7 +62,7 @@ class ShelvingLogFragment(
} }
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -41,7 +41,7 @@ class HistoricoVehiculoFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -148,7 +148,7 @@ class InventaryFragment :
@SuppressLint("NotifyDataSetChanged") @SuppressLint("NotifyDataSetChanged")
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.filterItemFk.setOnKeyListener { v, keyCode, event -> binding.filterItemFk.setOnKeyListener { v, keyCode, event ->
if (binding.filterItemFk.text.toString().isEmpty()) { if (binding.filterItemFk.text.toString().isEmpty()) {

View File

@ -336,7 +336,7 @@ class InventaryParkingFragment(
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
isBack = true isBack = true
if (shelvingSaved.isNullOrBlank()) { if (shelvingSaved.isNullOrBlank()) {
ma.onBackPressed() ma.onMyBackPressed()
} else { } else {
resetChecking() resetChecking()

View File

@ -1,7 +1,5 @@
package es.verdnatura.presentation.view.feature.login.model package es.verdnatura.presentation.view.feature.login.model
import java.util.*
class errorMessage( class errorMessage(
val message: String = "" val message: String = ""
) { ) {

View File

@ -1,12 +1,16 @@
package es.verdnatura.presentation.view.feature.main.activity package es.verdnatura.presentation.view.feature.main.activity
import PhotosFragment import PhotosFragment
import android.content.Context
import android.content.Intent import android.content.Intent
import android.media.MediaPlayer import android.media.MediaPlayer
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import android.util.AttributeSet
import android.view.Menu import android.view.Menu
import android.view.View
import android.widget.Toast import android.widget.Toast
import androidx.activity.OnBackPressedCallback
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment import androidx.fragment.app.Fragment
@ -121,6 +125,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
private lateinit var networkUtils: NetworkUtilsApp private lateinit var networkUtils: NetworkUtilsApp
private var myTimeUserInteraction = (System.currentTimeMillis() / 1000 / 3600) private var myTimeUserInteraction = (System.currentTimeMillis() / 1000 / 3600)
private var comeFromDelivery: Boolean? = null private var comeFromDelivery: Boolean? = null
private lateinit var mainActivityViewmodel: MainActivityViewModel
val backDispatcher = onBackPressedDispatcher
override fun getLayoutId(): Int = R.layout.activity_main override fun getLayoutId(): Int = R.layout.activity_main
override fun onPause() { override fun onPause() {
@ -143,6 +149,16 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
} }
override fun onCreateView(name: String, context: Context, attrs: AttributeSet): View? {
backDispatcher.addCallback(object : OnBackPressedCallback(true) {
override fun handleOnBackPressed() {
onMyBackPressed()
}
})
return super.onCreateView(name, context, attrs)
}
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
override fun init() { override fun init() {
@ -152,13 +168,19 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
customDialog = CustomDialogMainActivity(this) customDialog = CustomDialogMainActivity(this)
setFragments() setFragments()
setBottomMenuFragment() setBottomMenuFragment()
setViewModel()
setRegisterNetwork() setRegisterNetwork()
(application as MobileApplication).setMainListener(this) (application as MobileApplication).setMainListener(this)
//Tarea //Tarea
//printBluetooth() //printBluetooth()
} }
private fun setViewModel() {
mainActivityViewmodel = MainActivityViewModel(application as MobileApplication)
}
private fun printBluetooth() { private fun printBluetooth() {
/*var str = /*var str =
@ -428,6 +450,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
} }
} }
@RequiresApi(Build.VERSION_CODES.O)
override fun onPasillerosItemClickListener( override fun onPasillerosItemClickListener(
item: PasillerosItemVO, entryPoint: String, param: Any? item: PasillerosItemVO, entryPoint: String, param: Any?
) { ) {
@ -467,7 +490,14 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
) )
} }
getString(R.string.titleChecker) -> { getString(R.string.titleChecker) -> {/* mainActivityViewmodel.workerActivityAdd(
WorkerActionSalix(
workerFk = mobileApplication!!.userId!!,
workerActivityTypeFk = "ON_CHECKING",
inTimed = (LocalDate.now()).toString()
)
)*/
addFragmentOnTop(ControladorFragment.newInstance()) addFragmentOnTop(ControladorFragment.newInstance())
} }
@ -824,9 +854,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
} }
override fun onBackPressed() { fun onMyBackPressed() {
var index = supportFragmentManager.backStackEntryCount - 1 val index = supportFragmentManager.backStackEntryCount - 1
var backEntry = "" var backEntry = ""
if (index >= 0) { if (index >= 0) {
backEntry = supportFragmentManager.getBackStackEntryAt(index).name.toString() backEntry = supportFragmentManager.getBackStackEntryAt(index).name.toString()
@ -854,6 +884,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
} else { } else {
backStackFragments(backEntry) backStackFragments(backEntry)
} }
} }
private fun backStackFragments(backEntry: String) { private fun backStackFragments(backEntry: String) {
@ -869,10 +900,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
if (!backEntry.isNullOrBlank()) if (!backEntry.isNullOrBlank())
if (backEntry!!.contains("fragment.ExpeditionPalletDetailFragment.Companion")) { if (backEntry.contains("fragment.ExpeditionPalletDetailFragment.Companion")) {
addFragmentOnTop(ExpeditionTruckListFragment.newInstance()) addFragmentOnTop(ExpeditionTruckListFragment.newInstance())
} }
if (backEntry!!.contains(getString(R.string.titleLog)) || backEntry!!.contains( if (backEntry.contains(getString(R.string.titleLog)) || backEntry.contains(
getString( getString(
R.string.titleInfo R.string.titleInfo
) )
@ -1040,7 +1071,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
isToasted: Boolean? = true isToasted: Boolean? = true
) { ) {
if (isError != null) { if (isError != null) {
if (!isError!!) { if (!isError) {
if (isPlayed == true) (mpok?.start()) if (isPlayed == true) (mpok?.start())
if (isToasted!!) message.toast(this, Toast.LENGTH_LONG) if (isToasted!!) message.toast(this, Toast.LENGTH_LONG)

View File

@ -125,7 +125,7 @@ class ObservFragment(
} }
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.openPickerImages.setOnClickListener { binding.openPickerImages.setOnClickListener {
val config = ImagePickerConfig { val config = ImagePickerConfig {

View File

@ -102,7 +102,7 @@ class PackagingCountFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -113,7 +113,7 @@ class PackagingSummaryFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -129,7 +129,7 @@ class SupplierFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.radiobuttonTypePackaging.setOnCheckedChangeListener { buttonView, isChecked -> binding.radiobuttonTypePackaging.setOnCheckedChangeListener { buttonView, isChecked ->

View File

@ -34,7 +34,7 @@ class PackingHollandFragment(var entrypoint: String) :
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.requestFocus() binding.scanInput.requestFocus()
binding.scanInput.setOnEditorActionListener { _, actionId, _ -> binding.scanInput.setOnEditorActionListener { _, actionId, _ ->

View File

@ -1,6 +1,5 @@
package es.verdnatura.presentation.view.feature.paletizador.adapter package es.verdnatura.presentation.view.feature.paletizador.adapter
import android.util.Log
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
@ -13,10 +12,13 @@ class ExpeditionListAdapter (
private val onTruckClickListener: OnTruckClickListener private val onTruckClickListener: OnTruckClickListener
) : RecyclerView.Adapter<ExpeditionListAdapter.ItemHolder>() { ) : RecyclerView.Adapter<ExpeditionListAdapter.ItemHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
return ItemHolder( return ItemHolder(
ItemExpeditiontruckRowBinding.inflate(LayoutInflater.from(parent.context),parent,false) ItemExpeditiontruckRowBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
) )
} }

View File

@ -51,7 +51,7 @@ class CmrExpeditionPalletFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }

View File

@ -68,11 +68,11 @@ class ExpeditionPalletDetailFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.buttonOk.setOnClickListener { binding.buttonOk.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }
@ -160,7 +160,7 @@ class ExpeditionPalletDetailFragment(
if (it.isError) { if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false) ma.messageWithSound(it.errorMessage, true, false)
} else { } else {
ma.onBackPressed() ma.onMyBackPressed()
} }
}) })

View File

@ -87,7 +87,7 @@ class ExpeditionPalletFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -89,7 +89,7 @@ class ExpeditionScanFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -44,7 +44,7 @@ class ExpeditionScanSorterFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -66,7 +66,7 @@ class ExpeditionStateFragment(
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -51,7 +51,7 @@ class ExpeditionTruckListFragment :
customDialogHor = CustomDialogHour(requireContext()) customDialogHor = CustomDialogHour(requireContext())
binding.mainToolbar.toolbarTitle.text = getString(R.string.psScan) + getCURDATE() binding.mainToolbar.toolbarTitle.text = getString(R.string.psScan) + getCURDATE()
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
setToolBar() setToolBar()

View File

@ -42,7 +42,7 @@ class PalletScanFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
@ -94,7 +94,7 @@ class PalletScanFragment(
customDialogList.setOkButton(getString(R.string.end)) { customDialogList.setOkButton(getString(R.string.end)) {
customDialogList.dismiss() customDialogList.dismiss()
ma.onBackPressed() ma.onMyBackPressed()
}.setValue("").show() }.setValue("").show()

View File

@ -59,7 +59,7 @@ class ParkingFragment(var menuOrigin: String) :
} }
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }

View File

@ -78,7 +78,7 @@ class PasilleroFragment(
} }
binding.mainToolbarDesign.backButton.setOnClickListener { binding.mainToolbarDesign.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }

View File

@ -11,6 +11,7 @@ import android.provider.MediaStore
import android.view.View.* import android.view.View.*
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import android.widget.ImageView import android.widget.ImageView
import androidx.activity.result.contract.ActivityResultContracts
import androidx.annotation.RequiresApi import androidx.annotation.RequiresApi
import androidx.core.net.toUri import androidx.core.net.toUri
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
@ -40,6 +41,23 @@ class PhotosFragment(
private val REQUEST_IMAGE_CAPTURE = 2 private val REQUEST_IMAGE_CAPTURE = 2
private val imageUri: Uri? = null private val imageUri: Uri? = null
private var originalItem: String = "" private var originalItem: String = ""
private val pickImageLauncher = registerForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result ->
if (result.resultCode == RESULT_OK) {
// Handle image selection or capture result
val imageUri = result.data?.data
if (imageUri != null) {
// Image selected from gallery
binding.itemcardImage.setImageURI(imageUri)
} else {
// Image captured from camera
val bitmap = result.data?.extras?.get("data") as Bitmap
val uri = saveBitmapAsTempFile(requireContext(), bitmap).toUri()
binding.itemcardImage.setImageURI(uri)
}
}
}
override fun getLayoutId(): Int = R.layout.fragment_photos override fun getLayoutId(): Int = R.layout.fragment_photos
@ -102,7 +120,7 @@ class PhotosFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.editItemFk.setOnEditorActionListener { _, actionId, _ -> binding.editItemFk.setOnEditorActionListener { _, actionId, _ ->
@ -232,23 +250,7 @@ class PhotosFragment(
val captureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE) val captureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)
val chooserIntent = Intent.createChooser(pickIntent, getString(R.string.selectImage)) val chooserIntent = Intent.createChooser(pickIntent, getString(R.string.selectImage))
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, arrayOf(captureIntent)) chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, arrayOf(captureIntent))
startActivityForResult(chooserIntent, PICK_IMAGE_REQUEST) pickImageLauncher.launch(chooserIntent)
} }
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK) {
if (data != null && data.data != null) {
// Imagen seleccionada desde la galería
binding.itemcardImage.setImageURI(data.data)
} else {
// Imagen cámara
val uri = saveBitmapAsTempFile(
requireContext(),
data?.extras?.get("data") as Bitmap
).toUri()
binding.itemcardImage.setImageURI(uri)
}
}
}
} }

View File

@ -12,6 +12,7 @@ import es.verdnatura.domain.ConstAndValues
import es.verdnatura.domain.ConstAndValues.SECTORFK import es.verdnatura.domain.ConstAndValues.SECTORFK
import es.verdnatura.presentation.base.BaseFragment import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnCollectionSelectedListener import es.verdnatura.presentation.common.OnCollectionSelectedListener
import es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowTicketViewModel
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
@ -55,7 +56,7 @@ class PreControladorFragment :
private fun setEvents() { private fun setEvents() {
binding.scanInput.visibility = VISIBLE binding.scanInput.visibility = VISIBLE
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.requestFocus() binding.scanInput.requestFocus()

View File

@ -7,7 +7,6 @@ import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.ItemArticleRowBinding
import es.verdnatura.databinding.ItemArticleRowPresacadorBinding import es.verdnatura.databinding.ItemArticleRowPresacadorBinding
import es.verdnatura.presentation.common.OnPasillerosItemClickListener import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.common.OnQuantityClickListener import es.verdnatura.presentation.common.OnQuantityClickListener
@ -30,8 +29,11 @@ class PreSacadorAdapter (
this.context = parent.context this.context = parent.context
return AjustesItemHolder( return AjustesItemHolder(
ItemArticleRowPresacadorBinding.inflate(LayoutInflater.from(parent.context),parent,false) ItemArticleRowPresacadorBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
) )
} }
@ -54,7 +56,8 @@ class PreSacadorAdapter (
if (sale.pickedQuantity == null) if (sale.pickedQuantity == null)
sale.pickedQuantity = 0 sale.pickedQuantity = 0
val childLayoutManager = LinearLayoutManager(context!!, RecyclerView.HORIZONTAL, false) val childLayoutManager =
LinearLayoutManager(context!!, RecyclerView.HORIZONTAL, false)
itemArticlePlacements.apply { itemArticlePlacements.apply {
layoutManager = childLayoutManager layoutManager = childLayoutManager
@ -67,7 +70,11 @@ class PreSacadorAdapter (
} }
itemArticleItemFk.setOnClickListener { itemArticleItemFk.setOnClickListener {
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = binding.root.context.resources.getString(R.string.titleItemConsult)),sale.itemFk.toString()) onPasillerosItemClickListener.onPasillerosItemClickListener(
PasillerosItemVO(
title = binding.root.context.resources.getString(R.string.titleItemConsult)
), sale.itemFk.toString()
)
} }
itemArticleQuantity.setOnClickListener { itemArticleQuantity.setOnClickListener {
@ -86,20 +93,39 @@ class PreSacadorAdapter (
//SEMAFORO //SEMAFORO
if (sale.isPreviousPrepared == "1") { if (sale.isPreviousPrepared == "1") {
itemArticleRowSemaforoPre.setBackgroundColor(ContextCompat.getColor(context!!, R.color.verdnatura_dark_sky_blue)) itemArticleRowSemaforoPre.setBackgroundColor(
ContextCompat.getColor(
context!!,
R.color.verdnatura_dark_sky_blue
)
)
} else { } else {
itemArticleRowSemaforoPre.setBackgroundColor(ContextCompat.getColor(context!!, R.color.verdnatura_warm_grey)) itemArticleRowSemaforoPre.setBackgroundColor(
ContextCompat.getColor(
context!!,
R.color.verdnatura_warm_grey
)
)
} }
if (sale.isPreviousPrepared == "1") { if (sale.isPreviousPrepared == "1") {
contentLayout.setBackgroundColor(ContextCompat.getColor(context!!, R.color.verdnatura_dark_sky_blue)) contentLayout.setBackgroundColor(
ContextCompat.getColor(
context!!,
R.color.verdnatura_dark_sky_blue
)
)
} else { } else {
contentLayout.setBackgroundColor(ContextCompat.getColor(context!!, R.color.verdnatura_black)) contentLayout.setBackgroundColor(
ContextCompat.getColor(
context!!,
R.color.verdnatura_black
)
)
} }
//ASIGNAMOS VALOR A LA VSITA //ASIGNAMOS VALOR A LA VSITA
this.sale = sale this.sale = sale

View File

@ -118,7 +118,7 @@ class EndSacadorFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
//ESCANER =========f //ESCANER =========f
@ -779,7 +779,7 @@ private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO) {
requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
lManager.hideSoftInputFromWindow( lManager.hideSoftInputFromWindow(
customDialogList.getEditTextTwo().windowToken, customDialogList.getEditTextTwo().windowToken,
InputMethodManager.SHOW_FORCED InputMethodManager.SHOW_IMPLICIT
) )
}) })

View File

@ -69,7 +69,7 @@ class InitPreSacadorFragment(
ma.hideBottomNavigation(View.VISIBLE) ma.hideBottomNavigation(View.VISIBLE)
binding.mainToolbar.toolbarTitle.text = entrypoint binding.mainToolbar.toolbarTitle.text = entrypoint
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
val listIcons: ArrayList<ImageView> = ArrayList() val listIcons: ArrayList<ImageView> = ArrayList()

View File

@ -46,7 +46,7 @@ class QrFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.requestFocus() binding.scanInput.requestFocus()

View File

@ -1,17 +1,14 @@
package es.verdnatura.presentation.view.feature.reubication.adapter package es.verdnatura.presentation.view.feature.reubication.adapter
import android.content.Context import android.content.Context
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.ViewGroup import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.ItemPlacementReubicationRowBinding import es.verdnatura.databinding.ItemPlacementReubicationRowBinding
import es.verdnatura.databinding.ItemPlacementRowBinding
import es.verdnatura.presentation.common.OnPasillerosItemClickListener import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import es.verdnatura.presentation.view.feature.reubication.model.PlacementReubication import es.verdnatura.presentation.view.feature.reubication.model.PlacementReubication
import es.verdnatura.presentation.view.feature.sacador.model.PlacementVO
class ReubicatorPlacementAdapter( class ReubicatorPlacementAdapter(
private val items: List<PlacementReubication>, private val items: List<PlacementReubication>,
@ -21,7 +18,11 @@ package es.verdnatura.presentation.view.feature.reubication.adapter
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
this.context = parent.context this.context = parent.context
return AjustesItemHolder( return AjustesItemHolder(
ItemPlacementReubicationRowBinding.inflate(LayoutInflater.from(parent.context),parent,false) ItemPlacementReubicationRowBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
) )
} }
@ -44,8 +45,12 @@ package es.verdnatura.presentation.view.feature.reubication.adapter
itemRootLayout.setOnClickListener { itemRootLayout.setOnClickListener {
onPasillerosItemClickListener.onPasillerosItemClickListener( onPasillerosItemClickListener.onPasillerosItemClickListener(
PasillerosItemVO(title = binding.root.context.getString( PasillerosItemVO(
R.string.titleUbicator)),placement.plate) title = binding.root.context.getString(
R.string.titleUbicator
)
), placement.plate
)
} }
} }
} }

View File

@ -85,7 +85,7 @@ class ReubicationCollectionFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.collectionSwipe.setOnRefreshListener { binding.collectionSwipe.setOnRefreshListener {
@ -210,7 +210,7 @@ class ReubicationCollectionFragment(
R.string.info R.string.info
) )
) )
ma.onBackPressed() ma.onMyBackPressed()
} else { } else {
if (it.list[0].isError) { if (it.list[0].isError) {
ma.messageWithSound( ma.messageWithSound(

View File

@ -49,7 +49,7 @@ class ReubicationFragment(var entrypoint: String) :
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.requestFocus() binding.scanInput.requestFocus()

View File

@ -85,7 +85,7 @@ class SacadorFragment(
ma.hideBottomNavigation(View.VISIBLE) ma.hideBottomNavigation(View.VISIBLE)
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
val listIcons: ArrayList<ImageView> = ArrayList() val listIcons: ArrayList<ImageView> = ArrayList()

View File

@ -12,7 +12,6 @@ import es.verdnatura.domain.ConstAndValues
import es.verdnatura.domain.ConstAndValues.SECTORFK import es.verdnatura.domain.ConstAndValues.SECTORFK
import es.verdnatura.presentation.base.BaseFragment import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnCollectionSelectedListener import es.verdnatura.presentation.common.OnCollectionSelectedListener
import es.verdnatura.presentation.view.feature.precontrol.ShowTicketViewModel
import es.verdnatura.presentation.view.feature.sacador.adapter.TicketLastStateAdapter import es.verdnatura.presentation.view.feature.sacador.adapter.TicketLastStateAdapter
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import es.verdnatura.presentation.view.feature.sacador.model.TicketStateSalix import es.verdnatura.presentation.view.feature.sacador.model.TicketStateSalix
@ -66,7 +65,7 @@ class ShowTicketFragment(var menuOrigin: String) :
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.sacadorSwipe.setOnRefreshListener { binding.sacadorSwipe.setOnRefreshListener {
binding.sacadorSwipe.isRefreshing = true binding.sacadorSwipe.isRefreshing = true

View File

@ -1,4 +1,4 @@
package es.verdnatura.presentation.view.feature.precontrol package es.verdnatura.presentation.view.feature.sacador.fragment.showticket
import android.content.Context import android.content.Context
import android.os.Build import android.os.Build

View File

@ -30,7 +30,7 @@ class TicketAdvanceFragment(var title: String) :
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.requestFocus() binding.scanInput.requestFocus()

View File

@ -5,14 +5,12 @@ import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.databinding.ItemEscanerRowBinding import es.verdnatura.databinding.ItemEscanerRowBinding
import es.verdnatura.presentation.common.OnAutomaticItemClickListener import es.verdnatura.presentation.common.OnAutomaticItemClickListener
import es.verdnatura.presentation.view.feature.ubicador.model.ItemEscanerVO
class AutomaticAdapterTEST( class AutomaticAdapterTEST(
private val items: List<Long>, private val items: List<Long>,
private val onAutomaticItemClickListener: OnAutomaticItemClickListener private val onAutomaticItemClickListener: OnAutomaticItemClickListener
) : RecyclerView.Adapter<AutomaticAdapterTEST.ItemHolder>() { ) : RecyclerView.Adapter<AutomaticAdapterTEST.ItemHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
return ItemHolder( return ItemHolder(
ItemEscanerRowBinding.inflate(LayoutInflater.from(parent.context), parent, false) ItemEscanerRowBinding.inflate(LayoutInflater.from(parent.context), parent, false)

View File

@ -128,7 +128,7 @@ class AutomaticAddItemFragment(
} }
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }
@ -136,7 +136,7 @@ class AutomaticAddItemFragment(
with(viewModel) { with(viewModel) {
binding.splashAnimation.visibility = View.INVISIBLE binding.splashAnimation.visibility = View.INVISIBLE
response.observe(viewLifecycleOwner, Observer { response.observe(viewLifecycleOwner, Observer {
ma.onBackPressed() ma.onMyBackPressed()
}) })
} }
} }

View File

@ -126,14 +126,14 @@ class AutomaticAddItemFragmentOld(
} }
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
} }
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
response.observe(viewLifecycleOwner, Observer { response.observe(viewLifecycleOwner, Observer {
ma.onBackPressed() ma.onMyBackPressed()
}) })
} }

View File

@ -221,7 +221,7 @@ class UbicadorFragment(
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
setTooltips() setTooltips()

View File

@ -105,13 +105,6 @@ class UbicadorFragmentNew(
} }
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
}
return super.onOptionsItemSelected(item)
}
private fun setDialogs() { private fun setDialogs() {
customDialogInput = CustomDialogInput(requireContext()) customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext()) customDialog = CustomDialog(requireContext())
@ -227,7 +220,7 @@ class UbicadorFragmentNew(
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
setTooltips() setTooltips()

View File

@ -65,7 +65,7 @@ class PackingMistakeFragment(var menuOrigin: String) :
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
binding.scanInput.requestFocus() binding.scanInput.requestFocus()

View File

@ -75,7 +75,7 @@ class WorkermistakeFragment(
var departmentId = mobileApplication.dataStoreApp.readDataStoreKey<Int>("DEPARTMENTMISTAKEID") var departmentId = mobileApplication.dataStoreApp.readDataStoreKey<Int>("DEPARTMENTMISTAKEID")
if (departmentId != 0) { if (departmentId != 0) {
viewModel.workerGetFromHasMistake( viewModel.workerGetFromHasMistake(
departmentId!! departmentId
) )
} }
} }
@ -123,7 +123,7 @@ class WorkermistakeFragment(
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed() ma.onMyBackPressed()
} }
if (binding.filterDepartment.text.isNullOrEmpty()) { if (binding.filterDepartment.text.isNullOrEmpty()) {
binding.filterItemFk.isEnabled = false binding.filterItemFk.isEnabled = false

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android" <navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/nav_graph"> android:id="@+id/nav_graph">
<fragment <fragment
android:id="@+id/ajustesFragment" android:id="@+id/ajustesFragment"