refs #6810 feat:crashlytics
This commit is contained in:
parent
388081d10e
commit
4a5b09fc56
|
@ -3,7 +3,6 @@ package es.verdnatura.presentation.view.feature.ubicador.fragment
|
||||||
import android.annotation.SuppressLint
|
import android.annotation.SuppressLint
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.os.Build
|
|
||||||
import android.text.InputType
|
import android.text.InputType
|
||||||
import android.text.TextWatcher
|
import android.text.TextWatcher
|
||||||
import android.view.View
|
import android.view.View
|
||||||
|
@ -12,7 +11,6 @@ import android.view.View.VISIBLE
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.annotation.RequiresApi
|
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
|
@ -22,6 +20,7 @@ import es.verdnatura.domain.notNull
|
||||||
import es.verdnatura.domain.toInt
|
import es.verdnatura.domain.toInt
|
||||||
import es.verdnatura.domain.toast
|
import es.verdnatura.domain.toast
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
|
import es.verdnatura.presentation.common.Action
|
||||||
import es.verdnatura.presentation.common.OnMoreClickListenerNew
|
import es.verdnatura.presentation.common.OnMoreClickListenerNew
|
||||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
|
@ -79,7 +78,6 @@ class UbicadorFragmentNew(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
|
|
||||||
setDialogs()
|
setDialogs()
|
||||||
|
@ -89,7 +87,7 @@ class UbicadorFragmentNew(
|
||||||
//setNewIcons()
|
//setNewIcons()
|
||||||
ma.hideBottomNavigation(GONE)
|
ma.hideBottomNavigation(GONE)
|
||||||
|
|
||||||
if (!shelvingFk.isNullOrEmpty()) {
|
if (shelvingFk.isEmpty()) {
|
||||||
isShelvinLogfromMainScreen = false
|
isShelvinLogfromMainScreen = false
|
||||||
setIconsActions(true)
|
setIconsActions(true)
|
||||||
setIcons()
|
setIcons()
|
||||||
|
@ -129,7 +127,6 @@ class UbicadorFragmentNew(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
private fun setIcons() {
|
private fun setIcons() {
|
||||||
|
|
||||||
listIcons.clear()
|
listIcons.clear()
|
||||||
|
@ -165,12 +162,10 @@ class UbicadorFragmentNew(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
||||||
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
iconAdd.tooltipText = getString(R.string.addItemShelving)
|
||||||
iconAdd.tooltipText = getString(R.string.addItemShelving)
|
iconReset.tooltipText = getTooltip(R.drawable.ic_remove_checks)
|
||||||
iconReset.tooltipText = getTooltip(R.drawable.ic_remove_checks)
|
|
||||||
|
|
||||||
}
|
|
||||||
listIcons.add(iconAdd)
|
listIcons.add(iconAdd)
|
||||||
listIcons.add(iconReload)
|
listIcons.add(iconReload)
|
||||||
|
|
||||||
|
@ -185,7 +180,7 @@ class UbicadorFragmentNew(
|
||||||
|
|
||||||
iconReload.drawable -> {
|
iconReload.drawable -> {
|
||||||
|
|
||||||
if (!shelvingFk.isNullOrEmpty()) {
|
if (shelvingFk.isEmpty()) {
|
||||||
binding.editPrioridad.setText("")
|
binding.editPrioridad.setText("")
|
||||||
viewModel.itemShelvingListNew(
|
viewModel.itemShelvingListNew(
|
||||||
shelvingFk
|
shelvingFk
|
||||||
|
@ -198,8 +193,8 @@ class UbicadorFragmentNew(
|
||||||
}
|
}
|
||||||
|
|
||||||
iconReset.drawable -> {
|
iconReset.drawable -> {
|
||||||
if (!shelvingFk.isNullOrBlank()) {
|
if (shelvingFk.isBlank()) {
|
||||||
var customDialogReset = CustomDialog(requireContext())
|
val customDialogReset = CustomDialog(requireContext())
|
||||||
customDialogReset.setTitle(getString(R.string.checkItemShelvingDescrip))
|
customDialogReset.setTitle(getString(R.string.checkItemShelvingDescrip))
|
||||||
.setDescription(getString(R.string.checkItemShelving))
|
.setDescription(getString(R.string.checkItemShelving))
|
||||||
.setOkButton(getString(R.string.ok)) {
|
.setOkButton(getString(R.string.ok)) {
|
||||||
|
@ -226,7 +221,6 @@ class UbicadorFragmentNew(
|
||||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
private fun setEvents() {
|
private fun setEvents() {
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
|
@ -237,7 +231,7 @@ class UbicadorFragmentNew(
|
||||||
binding.editMatricula.requestFocus()
|
binding.editMatricula.requestFocus()
|
||||||
binding.editMatricula.setOnEditorActionListener { v, actionId, event ->
|
binding.editMatricula.setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
if (!binding.editMatricula.text.toString().isNullOrEmpty()) {
|
if (binding.editMatricula.text.toString().isNotEmpty()) {
|
||||||
setIconsActions(true)
|
setIconsActions(true)
|
||||||
setIcons()
|
setIcons()
|
||||||
if (!modeCheckUbication || (modeCheckUbication && binding.editMatricula.text.toString().length == 3 && !binding.editMatricula.text!![0].isDigit())) {
|
if (!modeCheckUbication || (modeCheckUbication && binding.editMatricula.text.toString().length == 3 && !binding.editMatricula.text!![0].isDigit())) {
|
||||||
|
@ -275,7 +269,7 @@ class UbicadorFragmentNew(
|
||||||
|
|
||||||
binding.editPrioridad.setOnEditorActionListener { v, actionId, event ->
|
binding.editPrioridad.setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
if (!binding.editPrioridad.text.toString().isNullOrEmpty()) {
|
if (binding.editPrioridad.text.toString().isNotEmpty()) {
|
||||||
viewModel.shelvingPriorityUpdate(
|
viewModel.shelvingPriorityUpdate(
|
||||||
binding.editPrioridad.toInt(), shelvingFk
|
binding.editPrioridad.toInt(), shelvingFk
|
||||||
)
|
)
|
||||||
|
@ -291,7 +285,7 @@ class UbicadorFragmentNew(
|
||||||
|
|
||||||
|
|
||||||
binding.automaticImg.setOnClickListener {
|
binding.automaticImg.setOnClickListener {
|
||||||
if (!shelvingFk.isNullOrEmpty())
|
if (shelvingFk.isEmpty())
|
||||||
|
|
||||||
ma.onPasillerosItemClickListener(
|
ma.onPasillerosItemClickListener(
|
||||||
PasillerosItemVO(title = getString(R.string.titleAuto)), entryPoint = shelvingFk
|
PasillerosItemVO(title = getString(R.string.titleAuto)), entryPoint = shelvingFk
|
||||||
|
@ -302,7 +296,7 @@ class UbicadorFragmentNew(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.parkingImg.setOnClickListener {
|
binding.parkingImg.setOnClickListener {
|
||||||
if (!shelvingFk.isNullOrBlank()) {
|
if (shelvingFk.isBlank()) {
|
||||||
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("")
|
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("")
|
||||||
.setOkButton(
|
.setOkButton(
|
||||||
getString(
|
getString(
|
||||||
|
@ -335,10 +329,10 @@ class UbicadorFragmentNew(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.editImg.setOnClickListener {
|
binding.editImg.setOnClickListener {
|
||||||
if (!shelvingFk.isNullOrBlank()) {
|
if (shelvingFk.isBlank()) {
|
||||||
customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("")
|
customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("")
|
||||||
.setOkButton(getString(R.string.save)) {
|
.setOkButton(getString(R.string.save)) {
|
||||||
if (!customDialogInput.getValue().isNullOrBlank()) {
|
if (customDialogInput.getValue().isNotBlank()) {
|
||||||
customDialogActionChange()
|
customDialogActionChange()
|
||||||
} else {
|
} else {
|
||||||
getString(R.string.errorShelving).toast(
|
getString(R.string.errorShelving).toast(
|
||||||
|
@ -368,34 +362,34 @@ class UbicadorFragmentNew(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.deleteImg.setOnClickListener {
|
binding.deleteImg.setOnClickListener {
|
||||||
if (!shelvingFk.isNullOrBlank()) {
|
if (shelvingFk.isNotBlank()) {
|
||||||
var customDialogDelete = CustomDialog(requireContext())
|
val customDialogDelete = CustomDialog(requireContext())
|
||||||
customDialogDelete.setTitle(getString(R.string.empty))
|
customDialogDelete.setTitle(getString(R.string.empty))
|
||||||
.setDescription(getString(R.string.operationNoReturn))
|
.setDescription(getString(R.string.operationNoReturn))
|
||||||
.setOkButton(getString(R.string.empty)) {
|
.setOkButton(getString(R.string.empty)) {
|
||||||
|
|
||||||
viewModel.clearShelvingList(
|
viewModel.clearShelvingList(
|
||||||
shelvingFk
|
shelvingFk
|
||||||
)
|
)
|
||||||
listItems.forEach {
|
listItems.forEach {
|
||||||
it.stickers = 0
|
it.stickers = 0
|
||||||
it.visible = 0
|
it.visible = 0
|
||||||
}
|
}
|
||||||
if (adapter != null) {
|
if (adapter != null) {
|
||||||
adapter!!.notifyDataSetChanged()
|
adapter!!.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
customDialogDelete.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
customDialogDelete.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogDelete.dismiss()
|
customDialogDelete.dismiss()
|
||||||
}
|
}.show()
|
||||||
|
} else {
|
||||||
|
getString(R.string.errorShelving).toast(
|
||||||
|
requireContext()
|
||||||
|
)
|
||||||
|
|
||||||
customDialogDelete.setKoButton(getString(R.string.cancel)) {
|
}
|
||||||
customDialogDelete.dismiss()
|
|
||||||
}.show()
|
|
||||||
} else {
|
|
||||||
getString(R.string.errorShelving).toast(
|
|
||||||
requireContext()
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -403,7 +397,9 @@ class UbicadorFragmentNew(
|
||||||
private fun customDialogActionParking() {
|
private fun customDialogActionParking() {
|
||||||
parking = customDialogInput.getValue()
|
parking = customDialogInput.getValue()
|
||||||
//Tarea 6964
|
//Tarea 6964
|
||||||
/* viewModel.hasItemOlder(shelvingFk,customDialogInput.getValue())*/
|
/* viewModel.hasItemOlder(shelvingFk,customDialogInput.getValue(),
|
||||||
|
action = Action.PARKINEAR
|
||||||
|
)*/
|
||||||
viewModel.setParking(
|
viewModel.setParking(
|
||||||
shelvingFk, customDialogInput.getValue()
|
shelvingFk, customDialogInput.getValue()
|
||||||
)
|
)
|
||||||
|
@ -447,14 +443,13 @@ class UbicadorFragmentNew(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setTooltips() {
|
private fun setTooltips() {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
||||||
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)
|
|
||||||
|
|
||||||
}
|
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")
|
@SuppressLint("SetTextI18n")
|
||||||
|
@ -521,7 +516,7 @@ class UbicadorFragmentNew(
|
||||||
|
|
||||||
responseMake.observe(viewLifecycleOwner, Observer {
|
responseMake.observe(viewLifecycleOwner, Observer {
|
||||||
|
|
||||||
if (!shelvingFk.isNullOrEmpty()) {
|
if (shelvingFk.isNotEmpty()) {
|
||||||
binding.mainToolbar.toolbarTitle.text = shelvingFk
|
binding.mainToolbar.toolbarTitle.text = shelvingFk
|
||||||
viewModel.itemShelvingListNew(
|
viewModel.itemShelvingListNew(
|
||||||
shelvingFk
|
shelvingFk
|
||||||
|
@ -532,17 +527,29 @@ class UbicadorFragmentNew(
|
||||||
|
|
||||||
responseHasOlder.observe(viewLifecycleOwner, Observer {
|
responseHasOlder.observe(viewLifecycleOwner, Observer {
|
||||||
|
|
||||||
ma.messageWithSound("", true, true, "", false)
|
// ma.messageWithSound("", true, true, "", false)
|
||||||
customDialogOlder.setTitle(getString(R.string.info))
|
customDialogOlder.setTitle(getString(R.string.info))
|
||||||
.setDescription(getString(R.string.itemOlderInfo, shelvingFk))
|
.setDescription(
|
||||||
|
getString(
|
||||||
|
R.string.itemOlderInfo,
|
||||||
|
responseHasOlder.value!!.action
|
||||||
|
)
|
||||||
|
)
|
||||||
.setOkButton(
|
.setOkButton(
|
||||||
getString(R.string.ok)
|
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()
|
customDialogOlder.dismiss()
|
||||||
//customDialogActionParking()
|
|
||||||
viewModel.setParking(
|
|
||||||
shelvingFk, parking
|
|
||||||
)
|
|
||||||
|
|
||||||
}.setKoButton(getString(R.string.cancel)) {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogOlder.dismiss()
|
customDialogOlder.dismiss()
|
||||||
|
@ -641,7 +648,7 @@ class UbicadorFragmentNew(
|
||||||
|
|
||||||
if (isEditItem) {
|
if (isEditItem) {
|
||||||
customDialogUbicador.setTitle(getString(R.string.editItem) + itemUbicador!!.item)
|
customDialogUbicador.setTitle(getString(R.string.editItem) + itemUbicador!!.item)
|
||||||
.setItemValue(itemUbicador!!.item.toString())
|
.setItemValue(itemUbicador.item.toString())
|
||||||
.setPackingValue(itemUbicador.packing.toString())
|
.setPackingValue(itemUbicador.packing.toString())
|
||||||
.setVisibleValue(itemUbicador.visible.toString())
|
.setVisibleValue(itemUbicador.visible.toString())
|
||||||
.setEtiquetaValue((itemUbicador.visible / (itemUbicador.packing ?: 0)).toString())
|
.setEtiquetaValue((itemUbicador.visible / (itemUbicador.packing ?: 0)).toString())
|
||||||
|
@ -670,7 +677,7 @@ class UbicadorFragmentNew(
|
||||||
.setOnEditorActionListener { v, actionId, event ->
|
.setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||||
|
|
||||||
if (!customDialogUbicador.getItemValue().isNullOrEmpty()) {
|
if (customDialogUbicador.getItemValue().isNotEmpty()) {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
customDialogUbicador.setItemValue(
|
customDialogUbicador.setItemValue(
|
||||||
|
@ -705,14 +712,14 @@ class UbicadorFragmentNew(
|
||||||
try {
|
try {
|
||||||
|
|
||||||
if (customDialogUbicador.getItemValue()
|
if (customDialogUbicador.getItemValue()
|
||||||
.isNullOrEmpty() || customDialogUbicador.getPackingValue().isNullOrBlank()
|
.isEmpty() || customDialogUbicador.getPackingValue().isBlank()
|
||||||
) {
|
) {
|
||||||
getString(R.string.itemAndPackingMandatory).toast(context)
|
getString(R.string.itemAndPackingMandatory).toast(context)
|
||||||
} else {
|
} else {
|
||||||
saveItemCall(customDialogUbicador, itemUbicador)
|
saveItemCall(customDialogUbicador, itemUbicador)
|
||||||
customDialogUbicador.dismiss()
|
customDialogUbicador.dismiss()
|
||||||
}
|
}
|
||||||
} catch(ex:Exception){
|
} catch (ex: Exception) {
|
||||||
ex.message!!.toast(requireContext())
|
ex.message!!.toast(requireContext())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -725,7 +732,7 @@ class UbicadorFragmentNew(
|
||||||
if (itemUbicador?.id == null) {
|
if (itemUbicador?.id == null) {
|
||||||
viewModel.itemShelvingAdd(
|
viewModel.itemShelvingAdd(
|
||||||
shelving = shelvingFk,
|
shelving = shelvingFk,
|
||||||
item = customDialogUbicador.getItemValue().toLong()!!,
|
item = customDialogUbicador.getItemValue().toLong(),
|
||||||
quantity = customDialogUbicador.getVisibleValue().toIntOrNull()!!,
|
quantity = customDialogUbicador.getVisibleValue().toIntOrNull()!!,
|
||||||
packing = customDialogUbicador.getPackingValue().toIntOrNull(),
|
packing = customDialogUbicador.getPackingValue().toIntOrNull(),
|
||||||
warehouse = mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK),
|
warehouse = mobileApplication.dataStoreApp.readDataStoreKey(WAREHOUSEFK),
|
||||||
|
@ -736,8 +743,8 @@ class UbicadorFragmentNew(
|
||||||
viewModel.itemShelvingMakeEdit(
|
viewModel.itemShelvingMakeEdit(
|
||||||
customDialogUbicador.getVisibleValue().toIntOrNull()!!,
|
customDialogUbicador.getVisibleValue().toIntOrNull()!!,
|
||||||
customDialogUbicador.getPackingValue().toInt(),
|
customDialogUbicador.getPackingValue().toInt(),
|
||||||
itemUbicador?.id!!,
|
itemUbicador.id,
|
||||||
itemUbicador?.grouping
|
itemUbicador.grouping
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -777,7 +784,7 @@ class UbicadorFragmentNew(
|
||||||
customDialogInput.setTitle(getString(R.string.shelvingNew))
|
customDialogInput.setTitle(getString(R.string.shelvingNew))
|
||||||
.setDescription(getString(R.string.selectDestiny) + item.item).setValue("")
|
.setDescription(getString(R.string.selectDestiny) + item.item).setValue("")
|
||||||
.setOkButton(getString(R.string.transfer)) {
|
.setOkButton(getString(R.string.transfer)) {
|
||||||
customDialogInputAction(item)
|
customDialogTransferAction(item)
|
||||||
|
|
||||||
}.setKoButton(getString(R.string.cancel)) {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
|
@ -786,14 +793,14 @@ class UbicadorFragmentNew(
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||||
customDialogInputAction(item)
|
customDialogTransferAction(item)
|
||||||
return@setOnEditorActionListener true
|
return@setOnEditorActionListener true
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
customDialogTwoButtons.dismiss()
|
customDialogTwoButtons.dismiss()
|
||||||
}.setOkButtonTwo(getString(R.string.delete)) {
|
}.setOkButtonTwo(getString(R.string.delete)) {
|
||||||
var customDialogConfirm = CustomDialog(requireContext())
|
val customDialogConfirm = CustomDialog(requireContext())
|
||||||
customDialogConfirm.setTitle(getString(R.string.confirm)).setDescription(
|
customDialogConfirm.setTitle(getString(R.string.confirm)).setDescription(
|
||||||
if (!isAutoSelf) {
|
if (!isAutoSelf) {
|
||||||
getString(R.string.itemDeleteConfirm) + item.item + "?"
|
getString(R.string.itemDeleteConfirm) + item.item + "?"
|
||||||
|
@ -830,8 +837,12 @@ class UbicadorFragmentNew(
|
||||||
customDialogTwoButtons.show()
|
customDialogTwoButtons.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun customDialogInputAction(item: ItemUbicador) {
|
private fun customDialogTransferAction(item: ItemUbicador) {
|
||||||
if (customDialogInput.getValue().isNotEmpty()) {
|
if (customDialogInput.getValue().isNotEmpty()) {
|
||||||
|
/* Tarea 6964
|
||||||
|
viewModel.hasItemOlder(shelvingFkIn = shelvingFk , shelvingFkOut = customDialogInput.getValue(),itemFk = item.id,
|
||||||
|
action = Action.TRANSFERIR
|
||||||
|
)*/
|
||||||
viewModel.itemShelvingTransfer(
|
viewModel.itemShelvingTransfer(
|
||||||
item.id, customDialogInput.getValue()
|
item.id, customDialogInput.getValue()
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue