Version 7.5.1 solucionado presacador que salian desordenadas al sacar, llamadas a sacador, enlaces rocket ok, pantalla precontrol.Tooltip hecho.

This commit is contained in:
Sergio De la torre 2022-01-31 10:28:38 +01:00
parent 964850c4af
commit f5c849f4f1
43 changed files with 257 additions and 269 deletions

View File

@ -80,6 +80,7 @@
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/round_av_timer_24.xml" value="0.15052083333333333" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/round_outline.xml" value="0.11979166666666667" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/walk.xml" value="0.10885416666666667" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/worker.xml" value="0.12" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/activity_imageview.xml" value="0.134375" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/activity_login.xml" value="0.134375" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/activity_main.xml" value="0.17916666666666667" />

View File

@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 99,
"versionName": "7.5.1",
"versionCode": 100,
"versionName": "7.6",
"outputFile": "app-release.apk"
}
],

Binary file not shown.

View File

@ -1,19 +1,17 @@
package es.verdnatura.domain
import android.content.Context
import com.google.gson.JsonObject
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDate
import es.verdnatura.presentation.view.feature.historicovehiculo.model.ItemHistoricoVehiculo
import retrofit2.Call
class GetDayOfSaleUSerCase(context: Context) : RestClient(context) {
fun itemShelving_updateSpam(usuario: String, password: String,vShelvingFK:String): Call<Boolean> {
/*fun itemShelving_updateSpam(usuario: String, password: String,vShelvingFK:String): Call<Boolean> {
val params: ArrayList<String> = ArrayList()
params.add(vShelvingFK)
return restClient!!.itemShelving_updateSpam("json", "1", usuario, password, "application/json",params=params)
}
}*/
/* fun itemShelving_getSaleDateOld(
usuario: String,
password: String,

View File

@ -50,15 +50,6 @@ class AjustesFragment :
prefs = requireActivity().getSharedPreferences(PREFS_USER, 0)
customDialog = CustomDialog(requireContext())
viewModel.inititializeDefaultAjusts(
/*prefs!!.getString(
SECTORDESCRIP,
getString(R.string.Sinsector)
).toString(),
prefs!!.getInt(SECTORFK, 0),
prefs!!.getInt(WAREHOUSEFK, 0),
prefs!!.getString(VOZ, "NO").toString(),
prefs!!.getInt(WAGON, 2).toString(),
prefs!!.getString(TAGSTYPE, "Stickers").toString()*/
getData(SECTORDESCRIP),
getData(SECTORFK).toInt(),
getData(WAREHOUSEFK).toInt(),

View File

@ -44,9 +44,9 @@ class ItemProposalAdapter(
/* itemNicho.setOnClickListener {
onInvetoryNichoClickListener.onInvetoryNichoClickListener(item)
}*/
itemNicho.setOnClickListener {
/* itemNicho.setOnClickListener {
onItemProposalClickListener.onItemProposalClickListener(item)
}
}*/
itemFk.setOnClickListener {
onPasillerosItemClickListener.onPasillerosItemClickListener(
PasillerosItemVO(

View File

@ -54,7 +54,7 @@ class ItemCardFragment(
fun newInstance(entryPoint: String) = ItemCardFragment(entryPoint)
}
private lateinit var customDialog: CustomDialog
// private lateinit var customDialog: CustomDialog
private lateinit var customDialogInput: CustomDialogInput
private lateinit var customDialogList: CustomDialogList
private lateinit var customDialogTwo: CustomDialogTwoButtons
@ -72,7 +72,7 @@ class ItemCardFragment(
//toolbar_title.text = getString(R.string.ConsultarArticulo)
binding.mainToolbar.toolbarTitle.text = getString(R.string.ConsultarArticulo)
customDialog = CustomDialog(requireContext())
//customDialog = CustomDialog(requireContext())
customDialogInput = CustomDialogInput(requireContext())
customDialogList = CustomDialogList(requireContext())
customDialogTwo = CustomDialogTwoButtons(requireContext())
@ -190,10 +190,8 @@ class ItemCardFragment(
binding.itemcardLayout.visibility = GONE
binding.splashProgressTwo.visibility = GONE
binding.mainToolbar.toolbarTitle.text = "ItemCard"
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
} else {
if (it.id != "0") {
binding.itemcardLayout.visibility = View.VISIBLE
@ -202,11 +200,8 @@ class ItemCardFragment(
binding.splashProgressTwo.visibility = GONE
binding.itemcardLayout.visibility = View.GONE
binding.mainToolbar.toolbarTitle.text = "ItemCard"
customDialog.setTitle("Sin resultados")
.setDescription("No hemos podido encontrar el articulo. Revisa el sector.")
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()
(activity as MainActivity).messageWithSound("No hemos podido encontrar el articulo. Revisa el sector.",true,false,"Sin resultados")
}
}
@ -221,10 +216,7 @@ class ItemCardFragment(
response.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
} else {
getItemCard(itemFk)
}
@ -556,7 +548,7 @@ class ItemCardFragment(
}
if (item.action != "itemStockUpdate")
if (item.action != "itemStockUpdate" && item.action != "itemStockUpdateRemove" && item.action !="itemStockUpdateAdd")
// changeOfflineValue(item,value, listBarcodes)
showProgress()
}
@ -620,6 +612,7 @@ class ItemCardFragment(
private fun prepareItemStockUpdate2(itemB: ItemCardRowVO, value: String) {
try {
value.toInt()
if (itemB.action == "itemStockUpdateRemove") {
customDialogTwo.setTitle(itemB.title!!)
@ -669,11 +662,9 @@ class ItemCardFragment(
)
}
} catch (e: Exception) {
binding.itemcardLayout.visibility = View.GONE
customDialog.setTitle("Error").setDescription("El elemento introducido no es un número")
.setKoButton("Cancelar") {
customDialog.dismiss()
}.show()
// binding.itemcardLayout.visibility = View.GONE
(activity as MainActivity).messageWithSound("El elemento introducido no es un número",true,true)
}
}

View File

@ -7,7 +7,6 @@ import android.os.Bundle
import android.view.View
import android.widget.ImageView
import androidx.core.content.ContextCompat
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentItemproposalBinding
@ -16,8 +15,6 @@ import es.verdnatura.presentation.common.OnItemProposalClickListener
import es.verdnatura.presentation.common.OnOptionsSelectedListener
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.component.CustomDialogInput
import es.verdnatura.presentation.view.feature.articulo.adapter.ItemProposalAdapter
import es.verdnatura.presentation.view.feature.articulo.model.ItemProposal
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
@ -31,17 +28,12 @@ class ItemProposalFragment(
ItemCardViewModel::class
) {
private var adapter: ItemProposalAdapter? = null
private lateinit var customDialogInput: CustomDialogInput
private var listInvetory: ArrayList<ItemProposal> = ArrayList()
private var listInvetoryAux: ArrayList<ItemProposal> = ArrayList()
private lateinit var customDialog: CustomDialog
private var listProposal: ArrayList<ItemProposal> = ArrayList()
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
private var hideLoad = true
private var layoutManager: LinearLayoutManager? = null
private var firstVisiblePosition = 0
private var filter = "TRUE"
private var filter = "1"
companion object {
fun newInstance(entryPoint: String) = ItemProposalFragment(entryPoint)
@ -59,7 +51,7 @@ class ItemProposalFragment(
itemFk,
getData(WAREHOUSEFK),
vShipped = currentDay(),
vIsShowedByType = "TRUE",
vIsShowedByType = filter,
user = getData(USER),
password = getData(PASSWORD),"item_getSimilar"
)
@ -69,18 +61,16 @@ class ItemProposalFragment(
private fun currentDay(): String {
val calendar = Calendar.getInstance()
val format = SimpleDateFormat("yyyy-MM-dd")
val format = SimpleDateFormat("yyyy-MM-dd",Locale.getDefault())
return format.format(calendar.time)
}
override fun init() {
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
(activity as MainActivity).hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.VISIBLE
binding.mainToolbar.toolbarTitle.text = getString(R.string.ArticleSimilar) + ":" + itemFk
"${getString(R.string.ArticleSimilar)}:$itemFk".also { it -> it.also { binding.mainToolbar.toolbarTitle.text = it } }
setToolBar()
setEvents()
@ -104,21 +94,11 @@ class ItemProposalFragment(
when (item){
iconFilter.drawable-> {
binding.splashProgress.visibility = View.VISIBLE
firstVisiblePosition = layoutManager?.findFirstVisibleItemPosition() ?: 0
if (filter.equals("TRUE")) {
filter = "FALSE"
iconFilter.drawable.setTint(ContextCompat.getColor(
context!!,
R.color.verdnatura_white))
context!!,if (filter=="1") R.color.verdnatura_white else R.color.verdnatura_pumpkin_orange
))
filter = if (filter=="1") "0" else "1"
} else {
filter = "TRUE"
iconFilter.drawable.setTint(
ContextCompat.getColor(
context!!,
R.color.verdnatura_pumpkin_orange))
}
viewModel.item_getSimilar(
itemFk,
getData(WAREHOUSEFK),
@ -129,7 +109,6 @@ class ItemProposalFragment(
callFunction = "item_getSimilar")
}
@ -151,52 +130,29 @@ class ItemProposalFragment(
}
override fun onPause() {
super.onPause()
firstVisiblePosition = layoutManager?.findFirstVisibleItemPosition() ?: 0
}
override fun onResume() {
super.onResume()
if (binding.locationRecyclerview.layoutManager != null) {
if (firstVisiblePosition <= listInvetory.size) {
binding.locationRecyclerview.layoutManager!!.scrollToPosition(firstVisiblePosition)
}
}
}
override fun observeViewModel() {
with(viewModel) {
itemProposallist.observe(viewLifecycleOwner, Observer {
itemProposallist.observe(viewLifecycleOwner, { it ->
if (hideLoad) {
binding.splashProgress.visibility = View.GONE
} else {
hideLoad = true
}
listInvetory = ArrayList()
listInvetoryAux = ArrayList()
listProposal= ArrayList()
if (!it.list.isNullOrEmpty()){
it.list.forEach {
if (it.longName != "0") {
listInvetory.add(it)
listInvetoryAux.add(it)
}
}
adapter = ItemProposalAdapter(listInvetory, object : OnItemProposalClickListener {
listProposal.add(it)
}}
adapter = ItemProposalAdapter(listProposal, object : OnItemProposalClickListener {
override fun onItemProposalClickListener(item: ItemProposal) {
customDialog.setTitle(item.itemFk + "\n" + item.longName + " " + item.subName)
.setDescription("Cantidad real(" + item.available + ")")
.setOkButton("Prueba") {
customDialog.dismiss()
}.setKoButton("Cancelar") {
// customDialogInput.dismiss()
customDialog.dismiss()
}.show()
}
}, onPasillerosItemClickListener = pasillerosItemClickListener!!)
@ -205,9 +161,6 @@ class ItemProposalFragment(
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
binding.locationRecyclerview.layoutManager = layoutManager
if (firstVisiblePosition <= listInvetory.size) {
binding.locationRecyclerview.layoutManager!!.scrollToPosition(firstVisiblePosition)
}
})

View File

@ -17,7 +17,7 @@ class BufferFragment(
private var password = ""
private var goBack: Boolean = false
override fun getLayoutId(): Int = R.layout.fragment_buffer
private lateinit var customDialog: CustomDialog
//private lateinit var customDialog: CustomDialog
companion object {
fun newInstance(entryPoint: String) = BufferFragment(entryPoint)
@ -27,7 +27,7 @@ class BufferFragment(
override fun init() {
binding.splashProgress.visibility = View.GONE
customDialog = CustomDialog(requireContext())
//customDialog = CustomDialog(requireContext())
setToolbar()
setEvents()
super.init()

View File

@ -21,7 +21,7 @@ class BuscarItemFragment(
) : BaseFragment<FragmentBuscarItemBinding,BuscarItemViewModel>(BuscarItemViewModel::class) {
private var adapter : LocationAdapter? = null
private lateinit var customDialog: CustomDialog
// private lateinit var customDialog: CustomDialog
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
companion object {
@ -38,7 +38,7 @@ class BuscarItemFragment(
(activity as MainActivity).hideBottomNavigation(GONE)
binding.mainToolbar.toolbarTitle.text = getString(R.string.getubicaition)
customDialog = CustomDialog(requireContext())
// customDialog = CustomDialog(requireContext())
setEvents()
if (!itemFk.isNullOrEmpty()){
getLocations(itemFk)

View File

@ -25,7 +25,7 @@ import es.verdnatura.presentation.view.feature.main.activity.MainActivity
class BuyersFragment : BaseFragment<BuyersFragmentBinding,BuyersViewModel>(BuyersViewModel::class) {
private lateinit var customDialog: CustomDialog
// private lateinit var customDialog: CustomDialog
private var onBuyerSelectedListener : OnBuyerSelectedListener? = null
private var buyersAdapter: AjustesAdapter? = null
@ -46,7 +46,7 @@ class BuyersFragment : BaseFragment<BuyersFragmentBinding,BuyersViewModel>(Buyer
}
override fun init() {
customDialog = CustomDialog(requireContext())
// customDialog = CustomDialog(requireContext())
(activity as MainActivity).hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.VISIBLE
binding.mainToolbar.toolbarTitle.text = getString(R.string.quality)

View File

@ -88,6 +88,8 @@ class CollectionFragment(
private var positionCollectionMissing = 0
private var quantityCollectionMissing = ""
private var isMarking = false
private var positionCollectionSplit = 0
private var quantityCollectionSplit = ""
//private var myKM: KeyguardManager? = null
private var state = 0
@ -493,14 +495,22 @@ class CollectionFragment(
if (it.isError) {
(activity as MainActivity).messageWithSound(it.errorMessage, isError = true,true)
/*customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Aceptar") {
customDialog.dismiss()
}.show()*/
} else {
incresaseSuccesful()
}
})
responseSaleMove.observe(viewLifecycleOwner, Observer {
if (it.isError) {
(activity as MainActivity).messageWithSound(it.errorMessage, isError = true,true)
} else {
responseSaleMoveSuccesful()
}
})
responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer {
@ -572,6 +582,21 @@ class CollectionFragment(
}
}
private fun responseSaleMoveSuccesful() {
sales[positionCollectionSplit].quantity = quantityCollectionSplit
if (quantityCollectionSplit == "0")
markLine(positionCollectionSplit, type)
saleAdapter!!.notifyDataSetChanged()
val ticket =
"[" + sales[positionCollectionSplit].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].ticketFk + "/summary)"
val message =
"Se ha enviado a Split el articulo " + sales[positionCollectionSplit].itemFk + " del ticket " + ticket
sendSalixMessageNew(message,sales[positionCollectionSplit].salePersonFk)
}
private fun callPicker(extensionNumber:String) {
@ -1775,13 +1800,7 @@ class CollectionFragment(
customDialogThreeButtons.getValue(),
getString(R.string.Faltas)
)
/*if (customDialogThreeButtons.getValue().trim().isNullOrEmpty()) {
getString(R.string.Indicanuevacantidad).toast(requireContext())
} else {
trash(position, customDialogThreeButtons.getValue())
scanRequest()
customDialogThreeButtons.dismiss()
}*/
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
checkAndCall(
@ -1838,6 +1857,10 @@ class CollectionFragment(
}
private fun split(position: Int, quantity: String) {
quantityCollectionSplit=quantity
positionCollectionSplit=position
var totalQuantity: Int = 0
try {
totalQuantity = sales[position].quantity.toInt() - quantity.toInt()
@ -1851,9 +1874,8 @@ class CollectionFragment(
originalQuantity = sales[position].quantity,
"saleMove"
)
//sales[position].originalQuantity = quantity
sales[position].quantity = quantity
//sales[position].startQuantity = quantity
/* sales[position].quantity = quantity
if (quantity == "0")
markLine(position, type)
@ -1868,7 +1890,7 @@ class CollectionFragment(
token = getData(TOKEN),
workerId = sales[position].salePersonFk,
message = message, "sendChekingPresence"
)
)*/
}

View File

@ -37,6 +37,10 @@ class CollectionViewModel(context: Context) : BaseViewModel()
val response: LiveData<ResponseItemVO>
get() = _response
private val _responseSaleMove by lazy { MutableLiveData<ResponseItemVO>() }
val responseSaleMove: LiveData<ResponseItemVO>
get() = _responseSaleMove
private val _responseUsedShelves by lazy { MutableLiveData<ResponseItemVO>() }
val responseUsedShelves: LiveData<ResponseItemVO>
get() = _responseUsedShelves
@ -508,7 +512,7 @@ class CollectionViewModel(context: Context) : BaseViewModel()
{
override fun onFailure(call: Call<String>, t: Throwable)
{
_response.value = ResponseItemVO(
_responseSaleMove.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!)
)
@ -518,13 +522,13 @@ class CollectionViewModel(context: Context) : BaseViewModel()
{
if (response.body() == null)
{
_response.value = ResponseItemVO(
_responseSaleMove.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
} else
{
_response.value = ResponseItemVO(isError = false, response = response.body()!!)
_responseSaleMove.value = ResponseItemVO(isError = false, response = response.body()!!)
}
}
})

View File

@ -19,7 +19,7 @@ class ControladorFragment :
private var goBack: Boolean = false
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
override fun getLayoutId(): Int = R.layout.fragment_controlador
private lateinit var customDialog: CustomDialog
//private lateinit var customDialog: CustomDialog
companion object {
fun newInstance() = ControladorFragment()
@ -33,7 +33,7 @@ class ControladorFragment :
override fun init() {
binding.splashProgress.visibility = View.GONE
customDialog = CustomDialog(requireContext())
// customDialog = CustomDialog(requireContext())
binding.mainToolbar.toolbarTitle.text = getString(R.string.controlticket)
setEvents()
(activity as MainActivity).hideBottomNavigation(View.VISIBLE)
@ -85,10 +85,11 @@ class ControladorFragment :
collectionTicketList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
customDialog.setTitle("Error").setDescription(it.errorMessage)
(activity as MainActivity).messageWithSound(it.errorMessage,isError = true, isPlayed = false)
/*customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Aceptar") {
customDialog.dismiss()
}.show()
}.show()*/
} else {
if (!goBack) navigateToCollectionList(it)

View File

@ -7,6 +7,7 @@ import es.verdnatura.databinding.FragmentVehiclecontrolUserBinding
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.loadUrl
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
class ControlVehiculoUsuarioFragment(
@ -18,7 +19,7 @@ class ControlVehiculoUsuarioFragment(
private var userFk = ""
private var goBack: Boolean = false
override fun getLayoutId(): Int = R.layout.fragment_vehiclecontrol_user
private lateinit var customDialog: CustomDialog
//private lateinit var customDialog: CustomDialog
companion object {
fun newInstance(vUserFK: String) = ControlVehiculoUsuarioFragment(vUserFK)
@ -26,7 +27,7 @@ class ControlVehiculoUsuarioFragment(
override fun init() {
binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclecontroluser)
customDialog = CustomDialog(requireContext())
// customDialog = CustomDialog(requireContext())
goBack = false
binding.splashProgress.visibility = GONE
setEvents()
@ -86,10 +87,11 @@ class ControlVehiculoUsuarioFragment(
responsemachine.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
customDialog.setTitle("Error").setDescription(it.errorMessage)
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/*customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()
}.show()*/
} else {
//sergio: se modifica el response = null. En casi todas las llamadas se utilizaba para ver si había error.
// Ahora ya no.

View File

@ -24,6 +24,7 @@ class DayOfSaleFragment(
) : BaseFragment<FragmentItemdayofsaleCardBinding, DayOfSaleViewModel>(DayOfSaleViewModel::class) {
private lateinit var customDialogList: CustomDialogList
private lateinit var customDialog: CustomDialog
private var adapter: DayOfSaleAdapter? = null
private var itemScan = ""
@ -31,7 +32,6 @@ class DayOfSaleFragment(
fun newInstance(entryPoint: String) = DayOfSaleFragment(entryPoint)
}
private lateinit var customDialog: CustomDialog
override fun getLayoutId(): Int = R.layout.fragment_itemdayofsale_card
@ -141,9 +141,10 @@ class DayOfSaleFragment(
if (it.isError){
binding.splashProgress.visibility = View.GONE
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/*customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}else{

View File

@ -26,7 +26,7 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
private lateinit var customDialogInput: CustomDialogInput
private var listInvetory:ArrayList<ItemFaltasVO> = ArrayList()
private var listInvetoryAux:ArrayList<ItemFaltasVO> = ArrayList()
private lateinit var customDialog: CustomDialog
// private lateinit var customDialog: CustomDialog
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
private var reload = false
private var hideLoad = true
@ -55,7 +55,7 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
setToolBar()
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
// customDialog = CustomDialog(requireContext())
setEvents()
if (reload){
reload = false

View File

@ -32,8 +32,8 @@ class HistoricoArticuloFragment(
HistoricoArticuloViewModel::class
) {
private var adapter: HistoricoAdapter? = null
private lateinit var customDialogInput: CustomDialogInput
private lateinit var customDialog: CustomDialog
// private lateinit var customDialogInput: CustomDialogInput
// private lateinit var customDialog: CustomDialog
private var listHistoric: ArrayList<ItemHistoricoVO> = ArrayList()
private var listHistoryAux: ArrayList<ItemHistoricoVO> = ArrayList()
private var filter: String = ""
@ -46,8 +46,8 @@ class HistoricoArticuloFragment(
override fun init() {
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
// customDialogInput = CustomDialogInput(requireContext())
// customDialog = CustomDialog(requireContext())
(activity as MainActivity).hideBottomNavigation(View.GONE)
filter = "all"
viewModel.itemDiary(getData(USER), getData(PASSWORD), itemFk, getData(WAREHOUSEFK),"itemDiary")

View File

@ -18,7 +18,7 @@ class itemShelvingLogFragment(
var entryPoint: String = ""
// ) : BaseFragment<FragmentItemdayofsaleCardBinding, itemShelvingLogViewModel>(itemShelvingLogViewModel::class) {
) : BaseFragment<FragmentItemshelvinglogBinding, itemShelvingLogViewModel>(itemShelvingLogViewModel::class) {
private lateinit var customDialogList: CustomDialogList
//private lateinit var customDialogList: CustomDialogList
private var adapter: ItemShelvingLogAdapter? = null
private var itemScan = ""
@ -33,7 +33,7 @@ class itemShelvingLogFragment(
override fun init() {
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
// customDialogList = CustomDialogList(requireContext())
setEvents()
setToolBar(getString(R.string.itemShelvingLog))
super.init()

View File

@ -18,7 +18,7 @@ class shelvingLogFragment(
) : BaseFragment<FragmentShelvinglogBinding, shelvingLogViewModel>(
shelvingLogViewModel::class) {
private lateinit var customDialogList: CustomDialogList
// private lateinit var customDialogList: CustomDialogList
private var adapter: ShelvingLogAdapter? = null
private var itemScan = ""
@ -33,7 +33,7 @@ class shelvingLogFragment(
override fun init() {
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
// customDialogList = CustomDialogList(requireContext())
setEvents()
setToolBar(getString(R.string.shelvingLog))
super.init()

View File

@ -22,8 +22,8 @@ class HistoricoVehiculoFragment (
HistoricoVehiculoViewModel::class) {
private var adapter : HistoricoVehiculoAdapter? = null
private lateinit var customDialogInput: CustomDialogInput
private lateinit var customDialog: CustomDialog
// private lateinit var customDialogInput: CustomDialogInput
// private lateinit var customDialog: CustomDialog
companion object {
@ -36,8 +36,8 @@ class HistoricoVehiculoFragment (
override fun init()
{
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
// customDialogInput = CustomDialogInput(requireContext())
// customDialog = CustomDialog(requireContext())
(activity as MainActivity).hideBottomNavigation(View.GONE)
viewModel.machineWorker_getHistorical(getData(USER),getData(PASSWORD),numberPlate,"machineWorker_getHistorical")

View File

@ -241,9 +241,10 @@ class InventaryFragment : BaseFragment<FragmentInventaryBinding,InventaryViewMod
response.observe(viewLifecycleOwner, Observer {
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}
})
}

View File

@ -586,16 +586,16 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
binding.mainBottomNavigation.visibility = visible
}
fun messageWithSound(message: String, isError: Boolean,isPlayed:Boolean?) {
fun messageWithSound(message: String, isError: Boolean,isPlayed:Boolean?,title:String="Error") {
if (!isError) {
mpok?.start()
if (isPlayed == true)(mpok?.start())
message.toast(this, Toast.LENGTH_SHORT)
} else {
if (isPlayed == true)( mperror?.start())
customDialog.setTitle("Error").setDescription(message)
customDialog.setTitle(title).setDescription(message)
.setOkButton("Aceptar") {
customDialog.dismiss()
}.show()

View File

@ -32,7 +32,7 @@ class ExpeditionPalletDetailFragment(
ExpeditionPalletDetailViewModel::class) {
private var adapter : ExpeditionPalletViewAdapter? = null
private lateinit var customDialogList: CustomDialogList
// private lateinit var customDialogList: CustomDialogList
private var onPalletClickListener:OnPalletClickListener? = null
private lateinit var customDialog: CustomDialog
@ -52,7 +52,7 @@ class ExpeditionPalletDetailFragment(
override fun init() {
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
//customDialogList = CustomDialogList(requireContext())
binding.expeditionPalletDetailPallet.text = "Pallet "+itemPallet!!.Pallet
binding.splashProgress.visibility = View.VISIBLE
//requireActivity().main_bottom_navigation.visibility = View.GONE
@ -131,9 +131,10 @@ class ExpeditionPalletDetailFragment(
response.observe(viewLifecycleOwner, Observer {
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}else{
requireActivity().onBackPressed()
}

View File

@ -130,18 +130,20 @@ class ExpeditionPalletFragment(
response.observe(viewLifecycleOwner, Observer {
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}
})
responseCheckexpeditionScanPut.observe(viewLifecycleOwner, Observer {
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}else{
if (it.response=="0") {

View File

@ -37,6 +37,7 @@ class ExpeditionScanFragment (
private var onComprobarPalletViewClickListener: OnComprobarPalletViewClickListener? = null
private lateinit var customDialogList: CustomDialogList
private lateinit var customDialogTwoButtons: CustomDialogTwoButtons
private var listExpeditions:ArrayList<BarcodeVO> = ArrayList()
private var expeditionAdapter : BarcodeAdapter? = null
private lateinit var customDialog: CustomDialog
@ -68,7 +69,6 @@ class ExpeditionScanFragment (
customDialogTwoButtons = CustomDialogTwoButtons(requireContext())
binding.expeditionScanDetailPallet.text = "Pallet "+itemPalletVO!!.Pallet
binding.splashProgress.visibility = View.VISIBLE
//requireActivity().main_bottom_navigation.visibility = View.GONE
(activity as MainActivity).hideBottomNavigation(View.GONE)
binding.mainToolbar.toolbarTitle.text = getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + itemExpeditionTruckVO!!.Destino
@ -128,21 +128,22 @@ class ExpeditionScanFragment (
response.observe(viewLifecycleOwner, Observer {
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}
})
responseCheckexpeditionScanPut.observe(viewLifecycleOwner, Observer {
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}else{
////Log.i("VERDNATURA:"," Resultado llamada es ${it.response.toString()}")
if (it.response=="0") {
//"Rutas iguales ${it.response}".toast(requireActivity())
@ -160,9 +161,10 @@ class ExpeditionScanFragment (
responseDeleteScan.observe(viewLifecycleOwner, Observer {
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}else{
viewModel.expeditionScanList(getData(USER),
getData(PASSWORD),itemPalletVO!!.Pallet)

View File

@ -16,16 +16,7 @@ import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import es.verdnatura.presentation.view.feature.smarttag.adapter.SmartTagAdapter
import es.verdnatura.presentation.view.feature.smarttag.model.SmartTag
/*import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.component_custom_three_dialog.*
import kotlinx.android.synthetic.main.fragment_collection.*
import kotlinx.android.synthetic.main.fragment_controlador.*
import kotlinx.android.synthetic.main.fragment_controlador.binding.splashProgress
import kotlinx.android.synthetic.main.fragment_expedition_scan.*
import kotlinx.android.synthetic.main.fragment_login.*
import kotlinx.android.synthetic.main.fragment_sacador.*
import kotlinx.android.synthetic.main.fragment_sacador_associatesmarttag.*
import kotlinx.android.synthetic.main.toolbar.**/
class ExpeditionScanSorterFragment(
var entryPoint: String = ""
@ -37,7 +28,7 @@ class ExpeditionScanSorterFragment(
private var password = ""
private var goBack: Boolean = false
override fun getLayoutId(): Int = R.layout.fragment_expeditionscan_sorter
private lateinit var customDialog: CustomDialog
// private lateinit var customDialog: CustomDialog
private lateinit var customDialogList: CustomDialogList
private var listExpeditionScan: ArrayList<SmartTag> = ArrayList()
private var expeditionScanAdapter: SmartTagAdapter? = null
@ -49,11 +40,10 @@ class ExpeditionScanSorterFragment(
override fun init() {
customDialog = CustomDialog(requireContext())
//customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
goBack = false
//requireActivity().main_bottom_navigation.visibility = GONE
(activity as MainActivity).hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = GONE
@ -108,10 +98,11 @@ class ExpeditionScanSorterFragment(
if (it.isError) {
customDialog.setTitle("Error").setDescription(it.errorMessage)
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/*customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Cerrar") {
customDialog.dismiss()
}.show()
}.show()*/
} else {
listExpeditionScan.add(SmartTag(itemScaned, itemScaned))

View File

@ -1,15 +1,6 @@
package es.verdnatura.presentation.view.feature.paletizador.fragment
/*import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.buyers_fragment.*
import kotlinx.android.synthetic.main.fragment_item_card.*
import kotlinx.android.synthetic.main.fragment_item_card.binding.editItemFk
import kotlinx.android.synthetic.main.fragment_item_card.binding.itemcardImage
import kotlinx.android.synthetic.main.fragment_item_card. binding.itemcardLayout
import kotlinx.android.synthetic.main.fragment_item_card.binding.splashProgress
import kotlinx.android.synthetic.main.fragment_itemexpeditionstate_card.*
import kotlinx.android.synthetic.main.toolbar.**/
import android.content.Intent
import android.content.SharedPreferences
import android.view.View

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.parking.fragment
import android.content.SharedPreferences
import android.media.MediaPlayer
import android.os.Bundle
import android.view.View
@ -13,14 +12,13 @@ import es.verdnatura.databinding.FragmentParkingBinding
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnBarcodeRowClickListener
import es.verdnatura.presentation.common.hideKeyboard
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import es.verdnatura.presentation.view.feature.parking.adapter.ParkingAdapter
class ParkingFragment : BaseFragment<FragmentParkingBinding,ParkingViewModel>(ParkingViewModel::class) {
private lateinit var customDialog: CustomDialog
// private lateinit var customDialog: CustomDialog
private var scanerList:ArrayList<BarcodeVO> = ArrayList()
private var adapter : ParkingAdapter? = null
private var numParking : Int = 0
@ -41,7 +39,7 @@ class ParkingFragment : BaseFragment<FragmentParkingBinding,ParkingViewModel>(Pa
//viewModel.hideProgressLoading()
binding.splashProgress.visibility=View.GONE
setList()
customDialog = CustomDialog(requireContext())
//customDialog = CustomDialog(requireContext())
super.init()
}
@ -68,11 +66,12 @@ class ParkingFragment : BaseFragment<FragmentParkingBinding,ParkingViewModel>(Pa
with(viewModel){
response.observe(viewLifecycleOwner, Observer {
if (it.isError){
mperror?.start()
// mperror?.start()
// binding.splashProgress.visibility = View.GONE
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage, isError = true,isPlayed = true)
/*customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}else{
numParking -= 1
if (numParking <= 0) {
@ -141,7 +140,7 @@ class ParkingFragment : BaseFragment<FragmentParkingBinding,ParkingViewModel>(Pa
}
override fun onCreate(savedInstanceState: Bundle?) {
val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER,0)
// val prefs: SharedPreferences = requireActivity().getSharedPreferences(PREFS_USER,0)
mperror = MediaPlayer.create((activity as MainActivity),R.raw.error)
mpok = MediaPlayer.create((activity as MainActivity),R.raw.ok)
super.onCreate(savedInstanceState)

View File

@ -66,14 +66,13 @@ class ParkingSaleFragment : BaseFragment<FragmentParkingBinding,ParkingSaleViewM
response.observe(viewLifecycleOwner, Observer {
if (it.isError){
mperror?.start()
// binding.splashProgress.visibility = View.GONE
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/* customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}else{
numParking -= 1
if (numParking <= 0) {
// binding.splashProgress.visibility = View.GONE
//viewModel.hideProgressLoading()
mpok?.start()
setList()

View File

@ -19,7 +19,6 @@ class PreControladorFragment: BaseFragment<FragmentControladorBinding,ShowTicket
private var goBack:Boolean = false
private var onCollectionSelectedListener : OnCollectionSelectedListener? = null
override fun getLayoutId(): Int = R.layout.fragment_controlador
private lateinit var customDialog: CustomDialog
private var type = ""
companion object {
@ -36,7 +35,6 @@ class PreControladorFragment: BaseFragment<FragmentControladorBinding,ShowTicket
override fun init() {
binding.splashProgress.visibility = View.GONE
customDialog = CustomDialog(requireContext())
binding.mainToolbar.toolbarTitle.text = getString(R.string.precontrolprevious)
setEvents()
super.init()
@ -88,9 +86,8 @@ class PreControladorFragment: BaseFragment<FragmentControladorBinding,ShowTicket
collectionTicketList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Aceptar"){
customDialog.dismiss()
}.show()
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
}else{
if (!goBack)navigateToCollectionList(it)
goBack = false

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.presacador.fragment
import android.content.Context
import android.content.SharedPreferences
import android.graphics.drawable.Drawable
import android.media.MediaPlayer
import android.os.Build
@ -20,7 +19,6 @@ import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R
import es.verdnatura.databinding.FragmentPreSacadorBinding
import es.verdnatura.domain.ConstAndValues.PRESACADOR
import es.verdnatura.domain.ConstAndValues.WAREHOUSEFKDEFAULT
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.*
@ -30,7 +28,6 @@ import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.component.CustomDialogThreeButtons
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import es.verdnatura.presentation.view.feature.presacador.adapter.PreSacadorAdapter
@ -64,11 +61,17 @@ class PreSacadorFragment :
private lateinit var customDialogThreeButtons: CustomDialogThreeButtons
private var ticketFk = ""
private var originalScanned = ""
fun changevariables(){
TODO("llevar variables i deixar soles una com positionToChange i quantityToChange")
}
private var typeCollectionMissing = ""
private var positionCollectionMissing = 0
private var quantityCollectionMissing = ""
private var positionIncreaseQuantity = 0
private var quantityIncrease = ""
private var quantityCollectionSplit = ""
private var positionCollectionSplit = 0
//sergio: se añada para leer el articulo leido que era el buyFk
private var originalItemScan: String = ""
@ -86,14 +89,13 @@ class PreSacadorFragment :
super.onCreate(savedInstanceState)
}
override fun init() {
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
customDialogInput = CustomDialogInput(requireContext())
customDialogInputParking = CustomDialogInput(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
//requireActivity().main_bottom_navigation.visibility = View.GONE
binding.splashProgress.visibility = View.GONE
binding.mainToolbar.toolbarTitle.text = getString(R.string.getticketpre)
setToolBar()
@ -204,6 +206,16 @@ class PreSacadorFragment :
}
})
responseSaleMove.observe(viewLifecycleOwner, Observer {
if (it.isError) {
(activity as MainActivity).messageWithSound(it.errorMessage, isError = true,true)
} else {
responseSaleMoveSuccesful()
}
})
responseMissingTrash.observe(viewLifecycleOwner, Observer {
if (it.isError) {
@ -246,6 +258,35 @@ class PreSacadorFragment :
}
}
private fun responseSaleMoveSuccesful() {
try {
sales[positionCollectionSplit].saldo = quantityCollectionSplit.toInt()
} catch (e: Exception) {
sales[positionCollectionSplit].saldo = 0
}
//sales[position].startQuantity = quantity
if (quantityCollectionSplit == "0")
markLine(positionCollectionSplit)
saleAdapter!!.notifyDataSetChanged()
//enviar mensaje a salix
val ticket =
"[" + sales[positionCollectionSplit].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].id + "/summary)"
val message =
"Se ha enviado a Split el articulo " + sales[positionCollectionSplit].itemFk + " del ticket " + ticket
/* viewModel.sendChekingPresence(
token = getData(TOKEN),
workerId = sales[positionCollectionSplit].salesPersonFk,
message = message,
"sendChekingPresence"
)*/
sendSalixMessageNew(message,sales[positionCollectionSplit].salesPersonFk)
}
private fun incresaseSuccesful() {
@ -348,11 +389,14 @@ class PreSacadorFragment :
private fun createSaleList(salesList: List<PreSacadorItemVO>) {
binding.splashProgress.visibility = GONE
if (salesList.isNullOrEmpty()) {
customDialog.setTitle("Pre Sacador")
(activity as MainActivity).messageWithSound("No hemos podido obtener movimientos para el ticket escaneado",true,false,"Pre Sacador")
/* customDialog.setTitle("Pre Sacador")
.setDescription("No hemos podido obtener movimientos para el ticket escaneado")
.setKoButton("Cancelar") {
customDialog.dismiss()
}.show()
}.show()*/
} else {
binding.mainToolbar.toolbarTitle.text = ticket
sales = ArrayList()
@ -1120,6 +1164,10 @@ class PreSacadorFragment :
}
private fun split(position: Int, quantity: String) {
positionCollectionSplit=position
quantityCollectionSplit=quantity
var totalQuantity: Int = 0
try {
totalQuantity = sales[position].saldo.toInt() - quantity.toInt()
@ -1132,13 +1180,13 @@ class PreSacadorFragment :
quantity = totalQuantity.toString(),
originalQuantity = sales[position].quantity.toString(), "saleMove"
)
//sales[position].originalQuantity = quantity
/*
try {
sales[position].saldo = quantity.toInt()
} catch (e: Exception) {
sales[position].saldo = 0
}
//sales[position].startQuantity = quantity
if (quantity == "0")
markLine(position)
@ -1156,7 +1204,7 @@ class PreSacadorFragment :
message = message,
"sendChekingPresence"
)
*/
}

View File

@ -35,6 +35,10 @@ class PreSacadorViewModel(context: Context) : BaseViewModel()
val response: LiveData<ResponseItemVO>
get() = _response
private val _responseSaleMove by lazy { MutableLiveData<ResponseItemVO>() }
val responseSaleMove: LiveData<ResponseItemVO>
get() = _responseSaleMove
private val _responseParkingAdd by lazy { MutableLiveData<ResponseItemVO>() }
val responseParkingAdd: LiveData<ResponseItemVO>
@ -60,6 +64,8 @@ class PreSacadorViewModel(context: Context) : BaseViewModel()
val responseMissingTrash: LiveData<ResponseItemVO>
get() = _responseMissingTrash
fun ticketToPrePrepare(usuario: String, password: String, ticketFk: String, sectorFk: String)
{
getPreSacadorUseCase.ticketToPrePrepare(usuario, password, ticketFk, sectorFk)
@ -395,7 +401,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel()
{
override fun onFailure(call: Call<String>, t: Throwable)
{
_response.value = ResponseItemVO(
_responseSaleMove.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this),t.message!!)
)
@ -405,12 +411,12 @@ class PreSacadorViewModel(context: Context) : BaseViewModel()
{
if (response.body() == null)
{
_response.value = ResponseItemVO(
_responseSaleMove.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message()))
} else
{
_response.value = ResponseItemVO(isError = false, response = response.body()!!)
_responseSaleMove.value = ResponseItemVO(isError = false, response = response.body()!!)
}
}
})

View File

@ -38,7 +38,6 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
private lateinit var customDialog: CustomDialog
private lateinit var customDialogList: CustomDialogList
private lateinit var customDialogInput: CustomDialogInput
private lateinit var customDialogThreeButtons: CustomDialogThreeButtons
private var sales:ArrayList<PreSacadorItemVO> = ArrayList()
@ -73,8 +72,6 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
customDialogInput = CustomDialogInput(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
//requireActivity().main_bottom_navigation.visibility = View.GONE
(activity as MainActivity).hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.GONE
binding.mainToolbar.toolbarTitle.text = getString(R.string.itemPlacementSupplyGetOrder)

View File

@ -182,10 +182,8 @@ class SacadorFragment :
binding.splashProgressTwo.visibility = View.GONE
binding.splashProgress.visibility = View.GONE
if (it.isError) {
customDialog.setTitle("Error").setDescription(it.errorMessage)
.setOkButton("Aceptar") {
customDialog.dismiss()
}.show()
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
} else {
if (goBack) addCollectionToList(it.response)
}

View File

@ -10,7 +10,6 @@ import es.verdnatura.databinding.FragmentControladorBinding
import es.verdnatura.domain.ConstAndValues
import es.verdnatura.presentation.base.BaseFragment
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.precontrol.ShowTicketViewModel
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
@ -21,7 +20,6 @@ class ShowTicketFragment: BaseFragment<FragmentControladorBinding, ShowTicketVie
private var goBack:Boolean = false
private var onCollectionSelectedListener : OnCollectionSelectedListener? = null
override fun getLayoutId(): Int = R.layout.fragment_controlador
private lateinit var customDialog: CustomDialog
private var type = ""
companion object {
@ -36,7 +34,6 @@ class ShowTicketFragment: BaseFragment<FragmentControladorBinding, ShowTicketVie
override fun init() {
binding.splashProgress.visibility = View.GONE
customDialog = CustomDialog(requireContext())
binding.mainToolbar.toolbarTitle.text = getString(R.string.verticket)
setEvents()
super.init()
@ -88,9 +85,7 @@ class ShowTicketFragment: BaseFragment<FragmentControladorBinding, ShowTicketVie
collectionTicketList.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Aceptar"){
customDialog.dismiss()
}.show()
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
}else{
if (!goBack)navigateToCollectionList(it)
goBack = false

View File

@ -14,9 +14,7 @@ import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.*
import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.component.CustomDialogInput
import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.component.CustomDialogThreeButtons
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import es.verdnatura.presentation.view.feature.smarttag.adapter.SmartTagAdapter
import es.verdnatura.presentation.view.feature.smarttag.model.SmartTag
@ -29,12 +27,10 @@ class RegisterSmartTagsFragment(
) {
private var goBack: Boolean = false
//private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
override fun getLayoutId(): Int = R.layout.fragment_sacador_associatesmarttag
private lateinit var customDialog: CustomDialog
private lateinit var customDialogList: CustomDialogList
private lateinit var customDialogInput: CustomDialogInput
private lateinit var customDialogThreeButtons: CustomDialogThreeButtons
private var listSmartTags: ArrayList<SmartTag> = ArrayList()
private var smartAdapter: SmartTagAdapter? = null
private var itemScaned: String = ""
@ -70,10 +66,7 @@ class RegisterSmartTagsFragment(
customDialog = CustomDialog(requireContext())
customDialogList = CustomDialogList(requireContext())
customDialogInput = CustomDialogInput(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
goBack = false
//requireActivity().main_bottom_navigation.visibility = GONE
(activity as MainActivity).hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = GONE
@ -91,9 +84,7 @@ class RegisterSmartTagsFragment(
private fun setToolBar() {
// toolbar_title.text = getString(R.string.SmarttagAssociate)
binding.mainToolbar.toolbarTitle.text = entryPoint
// Log.i("VERDNATURA:", "el entrypoint es ${entryPoint}")
}

View File

@ -21,10 +21,7 @@ class AutomaticAddItemFragment(
) : BaseFragment<FragmentAutomaticAddItemBinding,AutomaticAddItemViewModel>(AutomaticAddItemViewModel::class) {
private var adapter : AutomaticAdapter? = null
private lateinit var customDialogInput: CustomDialogInput
private lateinit var customDialogUbicador : CustomDialogUbicador
private var listItems:ArrayList<ItemEscanerVO> = ArrayList()
private lateinit var customDialog: CustomDialog
private var deep:Int = 1
private var contador = 0
@ -36,10 +33,6 @@ class AutomaticAddItemFragment(
override fun init() {
customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext())
customDialogUbicador = CustomDialogUbicador(requireContext())
(activity as MainActivity).hideBottomNavigation(View.GONE)
binding.mainToolbar.toolbarTitle.text = "itemShelvingMake"
setEvents()
@ -110,9 +103,10 @@ class AutomaticAddItemFragment(
response.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE
if (it.isError){
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
(activity as MainActivity).messageWithSound(it.errorMessage,true,false)
/*customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
customDialog.dismiss()
}.show()
}.show()*/
}else{
requireActivity().onBackPressed()
}

View File

@ -0,0 +1,12 @@
<!-- drawable/table_column_remove.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#F7931E" android:pathData="M9.3 14.2c-1.4 0-2.5 1.1-2.5 2.6s1.1 2.6 2.5 2.6 2.5-1.1 2.5-2.6-1.1-2.6-2.5-2.6zM9.3 20c-1.7 0-5.1 0.9-5.1 2.6v1.9h10.2v-1.9c0-1.7-3.4-2.6-5.1-2.6zM27.5 16.1h-9.9c-0.5 0-0.9-0.4-0.9-0.9s0.4-0.9 0.9-0.9h9.9c0.5 0 0.8 0.4 0.8 0.9s-0.4 0.9-0.8 0.9zM27.5 24.5h-9.9c-0.5 0-0.9-0.4-0.9-0.8s0.4-0.8 0.9-0.8h9.9c0.5 0 0.8 0.4 0.8 0.8s-0.4 0.8-0.8 0.8zM27.5 20.3h-9.9c-0.5 0-0.9-0.4-0.9-0.8s0.4-0.8 0.9-0.8h9.9c0.5 0 0.8 0.4 0.8 0.8s-0.4 0.8-0.8 0.8zM19.5 1.5v7.4c0 0.8-0.7 1.5-1.5 1.5h-4.1c-0.8 0-1.5-0.7-1.5-1.5v-7.4c0-0.8 0.7-1.5 1.5-1.5h4.1c0.9 0 1.5 0.7 1.5 1.5zM32 9.2v20c0 1.6-1.3 2.8-2.8 2.8h-26.4c-1.5 0-2.8-1.3-2.8-2.8v-20c0-1.6 1.3-2.8 2.8-2.8h8.6v1.7h-8.6c-0.6 0-1.1 0.5-1.1 1.1v20c0 0.6 0.5 1.1 1.1 1.1h26.3c0.6 0 1.1-0.5 1.1-1.1v-20c0-0.6-0.5-1.1-1.1-1.1h-8.6v-1.7h8.6c1.6 0 2.9 1.2 2.9 2.8z" />
</vector>

View File

@ -221,7 +221,7 @@
</LinearLayout>
<LinearLayout
<!-- <LinearLayout
android:layout_width="253dp"
android:layout_height="317dp"
android:background="@color/verdnatura_black_5"
@ -267,7 +267,7 @@
android:textStyle="bold"
tool:text="0" />
</LinearLayout>
</LinearLayout>-->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"

View File

@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.5.31'//1.4.20
ext.kotlin_version = '1.6.10'//1.4.20//1.5.31
ext {
// UI components
@ -19,10 +19,10 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.3'
classpath 'com.android.tools.build:gradle:7.0.4'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.2'
classpath 'com.google.gms:google-services:4.3.10'//4.3.5
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.8.1'//2.5.2
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files