feat: refs #7763 rename

This commit is contained in:
Sergio De la torre 2024-09-18 11:00:42 +02:00
parent b9072ecb7f
commit 3e25daa75c
6 changed files with 29 additions and 19 deletions

View File

@ -1050,29 +1050,29 @@ class UbicadorFragmentNew : BaseFragment<FragmentUbicadorBinding, UbicadorViewMo
}
customDialogConfirm.show()
}//Tarea 7763
/*
.setOkButtonThree(getString(R.string.rename)) {
customDialogInput.setTitle(getString(R.string.itemNew))
.setDescription(getString(R.string.scanItem)).setValue("")
.setOkButton(getString(R.string.rename)) {
actionRename(item, customDialogInput.getValue())
.setOkButtonThree(getString(R.string.rename)) {
customDialogInput.setTitle(getString(R.string.itemNew))
.setDescription(getString(R.string.scanItem)).setValue("")
.setOkButton(getString(R.string.rename)) {
}.setKoButton(getString(R.string.cancel)) {
customDialogInput.dismiss()
customDialogTwoButtons.dismiss()
}.show()
customDialogInput.getEditText().setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
actionRename(item, customDialogInput.getValue())
actionRename(item, customDialogInput.getValue())
return@setOnEditorActionListener true
}
false
}
customDialogInput.getEditText().requestFocus()
}.setKoButton(getString(R.string.cancel)) {
customDialogInput.dismiss()
customDialogTwoButtons.dismiss()
}.show()
customDialogInput.getEditText().setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
actionRename(item, customDialogInput.getValue())
return@setOnEditorActionListener true
}
*/
false
}
customDialogInput.getEditText().requestFocus()
}
customDialogTwoButtons.setKoButton(getString(R.string.cancel)) {
customDialogTwoButtons.dismiss()
}

View File

@ -5,6 +5,7 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.map
import com.google.gson.JsonObject
import es.verdnatura.R
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.formatWithQuotes
import es.verdnatura.domain.userCases.GetItemFromBarcodeUseCase
@ -198,6 +199,11 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
override fun onSuccess(response: Response<ItemBuy?>) {
itemShelvingUpdateFromBuy(itemShelvingFk, response.body().let { it as ItemBuy })
}
override fun onError(t: Throwable) {
val newThrowable = Throwable(context.getString(R.string.errorInputBuyFk), t)
super.onError(newThrowable)
}
})
}

View File

@ -865,6 +865,7 @@
<string name="reviewSector">Revisa el SECTOR</string>
<string name="addItemMultipleShelving">Añade artículo en varios carros</string>
<string name="addItemMultipleShelvings">Añade artículos en varios carros</string>
<string name="errorInputBuyFk">Revisa que el elemento escaneado sea un código de compra (buyFk)</string>
</resources>

View File

@ -865,5 +865,6 @@
<string name="reviewSector">Revisa el SECTOR</string>
<string name="addItemMultipleShelving">Añade artículo en varios carros</string>
<string name="addItemMultipleShelvings">Añade artículos en varios carros</string>
<string name="errorInputBuyFk">Revisa que el elemento escaneado sea un código de compra (buyFk)</string>
</resources>

View File

@ -865,6 +865,7 @@
<string name="reviewSector">Revisa el SECTOR</string>
<string name="addItemMultipleShelving">Añade artículo en varios carros</string>
<string name="addItemMultipleShelvings">Añade artículos en varios carros</string>
<string name="errorInputBuyFk">Revisa que el elemento escaneado sea un código de compra (buyFk)</string>
</resources>

View File

@ -868,5 +868,6 @@
<string name="reviewSector">Revisa el SECTOR</string>
<string name="addItemMultipleShelving">Añade artículo en varios carros</string>
<string name="addItemMultipleShelvings">Añade artículos en varios carros</string>
<string name="errorInputBuyFk">Revisa que el elemento escaneado sea un código de compra (buyFk)</string>
</resources>