Version 9.2.1 Modificado fragment a fragment_general
This commit is contained in:
parent
733489514a
commit
ef32ed1461
|
@ -2,24 +2,23 @@ package es.verdnatura.presentation.view.feature.controlador.fragment
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.View.VISIBLE
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentControladorBinding
|
import es.verdnatura.databinding.FragmentGeneralBlackBinding
|
||||||
import es.verdnatura.domain.ConstAndValues
|
import es.verdnatura.domain.ConstAndValues
|
||||||
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.component.CustomDialog
|
|
||||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||||
|
|
||||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||||
class ControladorFragment :
|
class ControladorFragment :
|
||||||
BaseFragment<FragmentControladorBinding, ControladorViewModel>(ControladorViewModel::class) {
|
BaseFragment<FragmentGeneralBlackBinding, ControladorViewModel>(ControladorViewModel::class) {
|
||||||
|
|
||||||
private var goBack: Boolean = false
|
private var goBack: Boolean = false
|
||||||
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
|
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
|
||||||
override fun getLayoutId(): Int = R.layout.fragment_controlador
|
override fun getLayoutId(): Int = R.layout.fragment_general_black
|
||||||
//private lateinit var customDialog: CustomDialog
|
//private lateinit var customDialog: CustomDialog
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -34,10 +33,11 @@ class ControladorFragment :
|
||||||
override fun init() {
|
override fun init() {
|
||||||
|
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
// customDialog = CustomDialog(requireContext())
|
binding.scanInput.visibility = VISIBLE
|
||||||
|
|
||||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.controlticket)
|
binding.mainToolbar.toolbarTitle.text = getString(R.string.controlticket)
|
||||||
setEvents()
|
setEvents()
|
||||||
ma.hideBottomNavigation(View.VISIBLE)
|
ma.hideBottomNavigation(VISIBLE)
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ class ControladorFragment :
|
||||||
// d("Action id "+actionId)
|
// d("Action id "+actionId)
|
||||||
goBack = false
|
goBack = false
|
||||||
if (!binding.scanInput.text.isNullOrEmpty()) {
|
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
|
|
||||||
|
|
||||||
//sergio: para ver si ha marcado dos veces el mismo ticket. El laser falla
|
//sergio: para ver si ha marcado dos veces el mismo ticket. El laser falla
|
||||||
|
|
|
@ -3,10 +3,11 @@ package es.verdnatura.presentation.view.feature.precontrol
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
import android.view.View.VISIBLE
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentControladorBinding
|
import es.verdnatura.databinding.FragmentGeneralBlackBinding
|
||||||
import es.verdnatura.domain.ConstAndValues
|
import es.verdnatura.domain.ConstAndValues
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||||
|
@ -14,10 +15,11 @@ import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||||
|
|
||||||
|
|
||||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||||
class PreControladorFragment: BaseFragment<FragmentControladorBinding,ShowTicketViewModel>(ShowTicketViewModel::class) {
|
class PreControladorFragment :
|
||||||
|
BaseFragment<FragmentGeneralBlackBinding, ShowTicketViewModel>(ShowTicketViewModel::class) {
|
||||||
private var goBack: Boolean = false
|
private var goBack: Boolean = false
|
||||||
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
|
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
|
||||||
override fun getLayoutId(): Int = R.layout.fragment_controlador
|
override fun getLayoutId(): Int = R.layout.fragment_general_black
|
||||||
private var type = ""
|
private var type = ""
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -51,7 +53,7 @@ class PreControladorFragment: BaseFragment<FragmentControladorBinding,ShowTicket
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setEvents() {
|
private fun setEvents() {
|
||||||
|
binding.scanInput.visibility = VISIBLE
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
requireActivity().onBackPressed()
|
requireActivity().onBackPressed()
|
||||||
}
|
}
|
||||||
|
@ -59,9 +61,9 @@ class PreControladorFragment: BaseFragment<FragmentControladorBinding,ShowTicket
|
||||||
binding.scanInput.requestFocus()
|
binding.scanInput.requestFocus()
|
||||||
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
|
binding.scanInput.setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
goBack=false;
|
goBack = false
|
||||||
if (!binding.scanInput.text.isNullOrEmpty()) {
|
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
|
|
||||||
viewModel.collectionTicketGet(
|
viewModel.collectionTicketGet(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package es.verdnatura.presentation.view.feature.reubication.fragment
|
package es.verdnatura.presentation.view.feature.reubication.fragment
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.View
|
|
||||||
import android.view.View.GONE
|
import android.view.View.GONE
|
||||||
|
import android.view.View.VISIBLE
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentControladorBinding
|
import es.verdnatura.databinding.FragmentGeneralBlackBinding
|
||||||
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.common.OnCollectionSelectedListener
|
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||||
|
@ -14,13 +14,13 @@ import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorViewMod
|
||||||
|
|
||||||
//Tarea #3754
|
//Tarea #3754
|
||||||
class ReubicationFragment(var entrypoint: String) :
|
class ReubicationFragment(var entrypoint: String) :
|
||||||
BaseFragment<FragmentControladorBinding, UbicadorViewModel>(
|
BaseFragment<FragmentGeneralBlackBinding, UbicadorViewModel>(
|
||||||
UbicadorViewModel::class
|
UbicadorViewModel::class
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private var goBack: Boolean = false
|
private var goBack: Boolean = false
|
||||||
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
|
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
|
||||||
override fun getLayoutId(): Int = R.layout.fragment_controlador
|
override fun getLayoutId(): Int = R.layout.fragment_general_black
|
||||||
private var shelvingScaned: String = ""
|
private var shelvingScaned: String = ""
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -36,6 +36,7 @@ class ReubicationFragment(var entrypoint: String) :
|
||||||
|
|
||||||
binding.mainToolbar.toolbarTitle.text = entrypoint
|
binding.mainToolbar.toolbarTitle.text = entrypoint
|
||||||
binding.splashProgress.visibility = GONE
|
binding.splashProgress.visibility = GONE
|
||||||
|
binding.scanInput.visibility = VISIBLE
|
||||||
setEvents()
|
setEvents()
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
@ -58,7 +59,7 @@ class ReubicationFragment(var entrypoint: String) :
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
goBack = false
|
goBack = false
|
||||||
if (!binding.scanInput.text.isNullOrEmpty()) {
|
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
shelvingScaned = binding.scanInput.text.toString()
|
shelvingScaned = binding.scanInput.text.toString()
|
||||||
viewModel.itemShelving_return(
|
viewModel.itemShelving_return(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
|
|
Loading…
Reference in New Issue