v5.1.3
|
@ -12,8 +12,8 @@ android {
|
||||||
applicationId "es.verdnatura"
|
applicationId "es.verdnatura"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 19
|
versionCode 23
|
||||||
versionName "5.0.19"
|
versionName "5.1.3"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
After Width: | Height: | Size: 20 KiB |
|
@ -8,7 +8,7 @@ import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class ApiUtils {
|
class ApiUtils {
|
||||||
companion object {
|
companion object {
|
||||||
//const val BASE_URL:String = "http://192.168.1.104:8009/"
|
//const val BASE_URL:String = "http://192.168.1.106:8009/"
|
||||||
const val BASE_URL:String = "https://app.verdnatura.es/"
|
const val BASE_URL:String = "https://app.verdnatura.es/"
|
||||||
fun getApiService():VerdnaturaService{
|
fun getApiService():VerdnaturaService{
|
||||||
val retrofit = Retrofit.Builder()
|
val retrofit = Retrofit.Builder()
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package es.verdnatura.domain
|
package es.verdnatura.domain
|
||||||
|
|
||||||
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
||||||
|
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
|
|
||||||
class GetLoginUserCase() : RestClient() {
|
class GetLoginUserCase() : RestClient() {
|
||||||
|
@ -13,7 +14,6 @@ class GetLoginUserCase() : RestClient() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun salixLogin(usuario:String,password:String) : Call<LoginSalixVO>{
|
fun salixLogin(usuario:String,password:String) : Call<LoginSalixVO>{
|
||||||
|
|
||||||
return salixClient!!.login("application/json", LoginSalixVO(usuario,password))
|
return salixClient!!.login("application/json", LoginSalixVO(usuario,password))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,4 +23,8 @@ class GetLoginUserCase() : RestClient() {
|
||||||
return restClient!!.version("json","1",usuario,password,"application/json",params)
|
return restClient!!.version("json","1",usuario,password,"application/json",params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun sendChekingPresence(token:String,workerId:Int,message:String) : Call<Boolean>{
|
||||||
|
return salixClient!!.sendChekingPresence(content_type = "application/json", authorization = token, params = SalixMessageVO(workerId = workerId,message = message))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -15,6 +15,12 @@ class GetSacadorControladorUserCase : RestClient() {
|
||||||
return restClient!!.collectionTicketGet("json","1",usuario,password,"application/json",params)
|
return restClient!!.collectionTicketGet("json","1",usuario,password,"application/json",params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun collectionNew(usuario:String,password:String,sectorFk:String) : Call<String> {
|
||||||
|
val params:ArrayList<String> = ArrayList();
|
||||||
|
params.add(sectorFk)
|
||||||
|
return restClient!!.collectionNew("json","1",usuario,password,"application/json",params)
|
||||||
|
}
|
||||||
|
|
||||||
fun collectionGet(usuario:String,password:String) : Call<List<CollectionVO>> {
|
fun collectionGet(usuario:String,password:String) : Call<List<CollectionVO>> {
|
||||||
val params:ArrayList<String> = ArrayList();
|
val params:ArrayList<String> = ArrayList();
|
||||||
return restClient!!.collectionGet("json","1",usuario,password,"application/json")
|
return restClient!!.collectionGet("json","1",usuario,password,"application/json")
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package es.verdnatura.domain
|
package es.verdnatura.domain
|
||||||
|
|
||||||
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
||||||
|
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.http.Body
|
import retrofit2.http.Body
|
||||||
import retrofit2.http.Header
|
import retrofit2.http.Header
|
||||||
|
@ -12,4 +13,11 @@ interface SalixService {
|
||||||
fun login(@Header("Content-Type") content_type: String,
|
fun login(@Header("Content-Type") content_type: String,
|
||||||
@Body params: LoginSalixVO):
|
@Body params: LoginSalixVO):
|
||||||
Call<LoginSalixVO>
|
Call<LoginSalixVO>
|
||||||
|
|
||||||
|
@POST("chats/sendCheckingPresence")
|
||||||
|
fun sendChekingPresence(
|
||||||
|
@Header("Content-Type") content_type: String,
|
||||||
|
@Header("Authorization") authorization: String,
|
||||||
|
@Body params: SalixMessageVO):
|
||||||
|
Call<Boolean>
|
||||||
}
|
}
|
|
@ -53,6 +53,8 @@ interface VerdnaturaService {
|
||||||
@Header("pass") pass: String,
|
@Header("pass") pass: String,
|
||||||
@Header("Content-Type") content_type: String):
|
@Header("Content-Type") content_type: String):
|
||||||
Call<List<SectorItemVO>>
|
Call<List<SectorItemVO>>
|
||||||
|
|
||||||
|
|
||||||
//PRESACADORES ========================================================================>
|
//PRESACADORES ========================================================================>
|
||||||
|
|
||||||
@POST("almacennew/ticketToPrePrepare")
|
@POST("almacennew/ticketToPrePrepare")
|
||||||
|
@ -76,6 +78,15 @@ interface VerdnaturaService {
|
||||||
@Header("Content-Type") content_type: String):
|
@Header("Content-Type") content_type: String):
|
||||||
Call<List<CollectionVO>>
|
Call<List<CollectionVO>>
|
||||||
|
|
||||||
|
@POST("almacennew/collectionNew")
|
||||||
|
fun collectionNew(@Header("aplicacion") aplicacion: String,
|
||||||
|
@Header("version") version: String,
|
||||||
|
@Header("user") user: String,
|
||||||
|
@Header("pass") pass: String,
|
||||||
|
@Header("Content-Type") content_type: String,
|
||||||
|
@Body params: List<String>):
|
||||||
|
Call<String>
|
||||||
|
|
||||||
@POST("almacennew/collectionTicketGet")
|
@POST("almacennew/collectionTicketGet")
|
||||||
fun collectionTicketGet(@Header("aplicacion") aplicacion: String,
|
fun collectionTicketGet(@Header("aplicacion") aplicacion: String,
|
||||||
@Header("version") version: String,
|
@Header("version") version: String,
|
||||||
|
|
|
@ -10,7 +10,6 @@ import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemScanVO
|
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
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.SaleVO
|
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||||
|
|
|
@ -6,7 +6,6 @@ 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 kotlinx.android.synthetic.main.component_custom_three_dialog.*
|
import kotlinx.android.synthetic.main.component_custom_three_dialog.*
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.*
|
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ko
|
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ko
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ok
|
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ok
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ok_two
|
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ok_two
|
||||||
|
|
|
@ -4,11 +4,7 @@ import android.app.Dialog
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ko
|
import kotlinx.android.synthetic.main.component_custom_two_dialog.*
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ok
|
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_button_ok_two
|
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_description
|
|
||||||
import kotlinx.android.synthetic.main.component_custom_two_dialog.custom_dialog_title
|
|
||||||
|
|
||||||
class CustomDialogTwoButtons (context: Context) : Dialog(context, R.style.DialogTheme) {
|
class CustomDialogTwoButtons (context: Context) : Dialog(context, R.style.DialogTheme) {
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentAjustesBinding
|
import es.verdnatura.databinding.FragmentAjustesBinding
|
||||||
import es.verdnatura.domain.notNull
|
import es.verdnatura.domain.notNull
|
||||||
|
import es.verdnatura.domain.toast
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.OnAjustesItemClickListener
|
import es.verdnatura.presentation.common.OnAjustesItemClickListener
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
|
@ -60,6 +61,10 @@ class AjustesFragment : BaseFragment<FragmentAjustesBinding,AjustesViewModel>(Aj
|
||||||
viewModel.getSectors(user!!,password!!)
|
viewModel.getSectors(user!!,password!!)
|
||||||
} else if (item.id == 1){
|
} else if (item.id == 1){
|
||||||
activity!!.onBackPressed()
|
activity!!.onBackPressed()
|
||||||
|
}else if (item.id == 2){
|
||||||
|
"No disponible en esta versión".toast(requireContext())
|
||||||
|
}else if (item.id == 3){
|
||||||
|
"No disponible en esta versión".toast(requireContext())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -71,7 +76,7 @@ class AjustesFragment : BaseFragment<FragmentAjustesBinding,AjustesViewModel>(Aj
|
||||||
splash_progress.visibility = View.INVISIBLE
|
splash_progress.visibility = View.INVISIBLE
|
||||||
if (it.list != null && it.list.size > 0 && it.list.get(0).isError){
|
if (it.list != null && it.list.size > 0 && it.list.get(0).isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.list.get(0).errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.list.get(0).errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
|
@ -86,7 +91,7 @@ class AjustesFragment : BaseFragment<FragmentAjustesBinding,AjustesViewModel>(Aj
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
customDialog.setTitle("Sectores").setDescription("No existes sectores.").setOkButton("Cerrar"){
|
customDialog.setTitle("Sectores").setDescription("No existes sectores.").setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,20 @@ class AjustesViewModel : BaseViewModel() {
|
||||||
0,
|
0,
|
||||||
0)
|
0)
|
||||||
)
|
)
|
||||||
|
_ajustesitem.add(
|
||||||
|
AjustesItemVO(2,
|
||||||
|
"Carros",
|
||||||
|
"",
|
||||||
|
0,
|
||||||
|
0)
|
||||||
|
)
|
||||||
|
_ajustesitem.add(
|
||||||
|
AjustesItemVO(3,
|
||||||
|
"Voz",
|
||||||
|
"",
|
||||||
|
0,
|
||||||
|
0)
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,7 @@ class ItemCardFragment(
|
||||||
itemcard_layout.visibility = View.GONE
|
itemcard_layout.visibility = View.GONE
|
||||||
toolbar_title.text = "ItemCard"
|
toolbar_title.text = "ItemCard"
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
if (it.id != "0"){
|
if (it.id != "0"){
|
||||||
|
@ -156,7 +156,7 @@ class ItemCardFragment(
|
||||||
itemcard_layout.visibility = View.GONE
|
itemcard_layout.visibility = View.GONE
|
||||||
toolbar_title.text = "ItemCard"
|
toolbar_title.text = "ItemCard"
|
||||||
customDialog.setTitle("Sin resultados").setDescription("No hemos podido encontrar el articulo. Revisa el sector.").setOkButton("Cerrar"){
|
customDialog.setTitle("Sin resultados").setDescription("No hemos podido encontrar el articulo. Revisa el sector.").setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ class ItemCardFragment(
|
||||||
splash_progress.visibility = View.GONE
|
splash_progress.visibility = View.GONE
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -208,11 +208,11 @@ class ItemCardFragment(
|
||||||
customDialogInput.setTitle(item.title!!).setDescription("Valor actual: "+item.value!!).setOkButton("Guardar"){
|
customDialogInput.setTitle(item.title!!).setDescription("Valor actual: "+item.value!!).setOkButton("Guardar"){
|
||||||
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
||||||
editItemCardRow(item,customDialogInput.getValue())
|
editItemCardRow(item,customDialogInput.getValue())
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||||
|
@ -220,7 +220,7 @@ class ItemCardFragment(
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty())
|
if (!customDialogInput.getValue().isNullOrEmpty())
|
||||||
editItemCardRow(item,customDialogInput.getValue())
|
editItemCardRow(item,customDialogInput.getValue())
|
||||||
customDialogInput.setValue("")
|
customDialogInput.setValue("")
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
||||||
return@setOnEditorActionListener true
|
return@setOnEditorActionListener true
|
||||||
}
|
}
|
||||||
|
@ -280,16 +280,16 @@ class ItemCardFragment(
|
||||||
customDialogTwo.setTitle(itemB.title!!).setDescription("Indica la causa de eliminar stock:").setOkButton("Falta"){
|
customDialogTwo.setTitle(itemB.title!!).setDescription("Indica la causa de eliminar stock:").setOkButton("Falta"){
|
||||||
viewModel.itemStockUpdate(itemFk = itemFk,warehouseFk = warehouseFk,user = user,password = password,newValue = value,isTrash = "0")
|
viewModel.itemStockUpdate(itemFk = itemFk,warehouseFk = warehouseFk,user = user,password = password,newValue = value,isTrash = "0")
|
||||||
changeOfflineValue(itemB,value, listBarcodes)
|
changeOfflineValue(itemB,value, listBarcodes)
|
||||||
customDialogTwo.hide()
|
customDialogTwo.dismiss()
|
||||||
|
|
||||||
}.setOkButtonTwo("Basura"){
|
}.setOkButtonTwo("Basura"){
|
||||||
viewModel.itemStockUpdate(itemFk = itemFk,warehouseFk = warehouseFk,user = user,password = password,newValue = value,isTrash = "1")
|
viewModel.itemStockUpdate(itemFk = itemFk,warehouseFk = warehouseFk,user = user,password = password,newValue = value,isTrash = "1")
|
||||||
changeOfflineValue(itemB,value, listBarcodes)
|
changeOfflineValue(itemB,value, listBarcodes)
|
||||||
customDialogTwo.hide()
|
customDialogTwo.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
|
|
||||||
customDialogTwo.hide()
|
customDialogTwo.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
changeOfflineValue(itemB,value, listBarcodes)
|
changeOfflineValue(itemB,value, listBarcodes)
|
||||||
|
@ -305,11 +305,11 @@ class ItemCardFragment(
|
||||||
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
|
||||||
if (!customDialogList.getValue().isNullOrEmpty())
|
if (!customDialogList.getValue().isNullOrEmpty())
|
||||||
updateBarcode(customDialogList.getValue(),"0",itemB)
|
updateBarcode(customDialogList.getValue(),"0",itemB)
|
||||||
customDialogList.hide()
|
customDialogList.dismiss()
|
||||||
|
|
||||||
}.setKoButton("Cerrar"){
|
}.setKoButton("Cerrar"){
|
||||||
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
|
||||||
customDialogList.hide()
|
customDialogList.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
|
|
||||||
|
|
||||||
|
@ -319,7 +319,7 @@ class ItemCardFragment(
|
||||||
if (!customDialogList.getValue().isNullOrEmpty())
|
if (!customDialogList.getValue().isNullOrEmpty())
|
||||||
updateBarcode(customDialogList.getValue(),"0",itemB)
|
updateBarcode(customDialogList.getValue(),"0",itemB)
|
||||||
customDialogList.setValue("")
|
customDialogList.setValue("")
|
||||||
customDialogList.hide()
|
customDialogList.dismiss()
|
||||||
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
|
||||||
return@setOnEditorActionListener true
|
return@setOnEditorActionListener true
|
||||||
}
|
}
|
||||||
|
|
|
@ -77,9 +77,9 @@ class SaleAdapter (
|
||||||
//ERROR
|
//ERROR
|
||||||
if (sale.originalQuantity != sale.quantity){
|
if (sale.originalQuantity != sale.quantity){
|
||||||
layoutError.visibility = View.VISIBLE
|
layoutError.visibility = View.VISIBLE
|
||||||
txtError.text = "Cantidad original: "+sale.quantity
|
txtError.text = "Cantidad original: "+sale.originalQuantity
|
||||||
if (sale.isPrepared == "1" || sale.isControlled == "1")
|
if (sale.isPrepared == "1" || sale.isControlled == "1")
|
||||||
sale.pickedQuantity = sale.originalQuantity
|
sale.pickedQuantity = sale.quantity
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sale.isNew){
|
if (sale.isNew){
|
||||||
|
|
|
@ -34,6 +34,7 @@ import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
|
||||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
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
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyListVO
|
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyListVO
|
||||||
|
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyVO
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.android.synthetic.main.fragment_collection.*
|
import kotlinx.android.synthetic.main.fragment_collection.*
|
||||||
|
@ -47,6 +48,7 @@ class CollectionFragment(
|
||||||
private var password = ""
|
private var password = ""
|
||||||
private var sectorFk = ""
|
private var sectorFk = ""
|
||||||
private var warehouseFk = ""
|
private var warehouseFk = ""
|
||||||
|
private var token = ""
|
||||||
private var sales:List<SaleVO> = listOf()
|
private var sales:List<SaleVO> = listOf()
|
||||||
private var saleAdapter:SaleAdapter? = null
|
private var saleAdapter:SaleAdapter? = null
|
||||||
private var lm : LinearLayoutManager? = null
|
private var lm : LinearLayoutManager? = null
|
||||||
|
@ -84,6 +86,7 @@ class CollectionFragment(
|
||||||
user = prefs.getString(USER,"").toString()
|
user = prefs.getString(USER,"").toString()
|
||||||
password = prefs.getString(PASSWORD,"").toString()
|
password = prefs.getString(PASSWORD,"").toString()
|
||||||
sectorFk = prefs.getInt(SECTORFK,1).toString()
|
sectorFk = prefs.getInt(SECTORFK,1).toString()
|
||||||
|
token = prefs.getString(TOKEN,"").toString()
|
||||||
warehouseFk = prefs.getInt(WAREHOUSEFK,1).toString()
|
warehouseFk = prefs.getInt(WAREHOUSEFK,1).toString()
|
||||||
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)
|
||||||
|
@ -313,9 +316,9 @@ class CollectionFragment(
|
||||||
fragment_sacador_collections.layoutManager = lm
|
fragment_sacador_collections.layoutManager = lm
|
||||||
setTotalLines()
|
setTotalLines()
|
||||||
if (storedPosition != 0)
|
if (storedPosition != 0)
|
||||||
setListPosition(storedPosition)
|
setListPosition(storedPosition,true)
|
||||||
else if (storedBackPosition != 0)
|
else if (storedBackPosition != 0)
|
||||||
setListPosition(storedBackPosition)
|
setListPosition(storedBackPosition,true)
|
||||||
|
|
||||||
setScrollListener(lm!!)
|
setScrollListener(lm!!)
|
||||||
}
|
}
|
||||||
|
@ -336,7 +339,7 @@ class CollectionFragment(
|
||||||
var isOk = false
|
var isOk = false
|
||||||
if (type == SACADOR){
|
if (type == SACADOR){
|
||||||
for (saleVO in sales) {
|
for (saleVO in sales) {
|
||||||
if(saleVO.isPrepared != "1"){
|
if(saleVO.isPrepared != "1" && saleVO.isPreviousPrepared != "1"){
|
||||||
//1- Por itemFk
|
//1- Por itemFk
|
||||||
if (txtscan == saleVO.itemFk){
|
if (txtscan == saleVO.itemFk){
|
||||||
mpok!!.start()
|
mpok!!.start()
|
||||||
|
@ -347,7 +350,7 @@ class CollectionFragment(
|
||||||
//2- Por carro
|
//2- Por carro
|
||||||
var shelvingIndex = 0
|
var shelvingIndex = 0
|
||||||
for (placementVO in saleVO.placements){
|
for (placementVO in saleVO.placements){
|
||||||
if (txtscan.toUpperCase() == placementVO.shelving.toUpperCase()){
|
if (txtscan.toUpperCase() == placementVO.shelving.toUpperCase() && placementVO.visible != "(0)"){
|
||||||
mpok!!.start()
|
mpok!!.start()
|
||||||
isOk = true
|
isOk = true
|
||||||
showShelving(index,shelvingIndex)
|
showShelving(index,shelvingIndex)
|
||||||
|
@ -419,7 +422,7 @@ class CollectionFragment(
|
||||||
if (type == SACADOR){
|
if (type == SACADOR){
|
||||||
var saleVO = sales[position]
|
var saleVO = sales[position]
|
||||||
|
|
||||||
if(saleVO.isPrepared != "1"){
|
if(saleVO.isPrepared != "1" && saleVO.isPreviousPrepared != "1"){
|
||||||
//1- Por itemFk
|
//1- Por itemFk
|
||||||
if (txtscan == saleVO.itemFk){
|
if (txtscan == saleVO.itemFk){
|
||||||
mpok!!.start()
|
mpok!!.start()
|
||||||
|
@ -461,24 +464,28 @@ class CollectionFragment(
|
||||||
if (type == SACADOR){
|
if (type == SACADOR){
|
||||||
sales[position].isPrepared = if (sales[position].isPrepared == "1") "0" else "1"
|
sales[position].isPrepared = if (sales[position].isPrepared == "1") "0" else "1"
|
||||||
if (sales[position].isPrepared == "1"){
|
if (sales[position].isPrepared == "1"){
|
||||||
sales[position].pickedQuantity = sales[position].originalQuantity
|
sales[position].pickedQuantity = sales[position].quantity
|
||||||
}
|
}
|
||||||
}else if (type == CONTROLADOR)
|
}else if (type == CONTROLADOR)
|
||||||
sales[position].isControlled = if (sales[position].isControlled == "1") "0" else "1"
|
sales[position].isControlled = if (sales[position].isControlled == "1") "0" else "1"
|
||||||
|
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
|
|
||||||
setListPosition(position)
|
setListPosition(position,false)
|
||||||
saleTrackingReplace(position,newType)
|
saleTrackingReplace(position,newType)
|
||||||
setTotalLines()
|
setTotalLines()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setListPosition(position:Int){
|
private fun setListPosition(position:Int,isFromBack:Boolean){
|
||||||
storedPosition = position
|
storedPosition = position
|
||||||
if (type == SACADOR){
|
if (type == SACADOR){
|
||||||
fragment_sacador_collections.addViewObserver {
|
fragment_sacador_collections.addViewObserver {
|
||||||
lm!!.scrollToPositionWithOffset(position,0)
|
lm!!.scrollToPositionWithOffset(position,0)
|
||||||
}
|
}
|
||||||
|
}else if (isFromBack){
|
||||||
|
fragment_sacador_collections.addViewObserver {
|
||||||
|
lm!!.scrollToPositionWithOffset(position,0)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -501,7 +508,7 @@ class CollectionFragment(
|
||||||
sales[position].isPrepared = "0"
|
sales[position].isPrepared = "0"
|
||||||
sales[position].pickedQuantity = "0"
|
sales[position].pickedQuantity = "0"
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
setListPosition(position)
|
setListPosition(position,false)
|
||||||
viewModel.saleTrackingDel(
|
viewModel.saleTrackingDel(
|
||||||
usuario = user,
|
usuario = user,
|
||||||
password = password,
|
password = password,
|
||||||
|
@ -528,7 +535,7 @@ class CollectionFragment(
|
||||||
splash_progress.visibility = View.VISIBLE
|
splash_progress.visibility = View.VISIBLE
|
||||||
var quantityGet = "0"
|
var quantityGet = "0"
|
||||||
try{
|
try{
|
||||||
quantityGet = (sales[position].originalQuantity.toInt() - sales[position].pickedQuantity.toInt()).toString()
|
quantityGet = (sales[position].quantity.toInt() - sales[position].pickedQuantity.toInt()).toString()
|
||||||
}catch (e:Exception){}
|
}catch (e:Exception){}
|
||||||
viewModel.itemPlacementSupplyAiming(
|
viewModel.itemPlacementSupplyAiming(
|
||||||
usuario = user,
|
usuario = user,
|
||||||
|
@ -563,20 +570,31 @@ class CollectionFragment(
|
||||||
var total = "0"
|
var total = "0"
|
||||||
var itemShelvingFk = "0"
|
var itemShelvingFk = "0"
|
||||||
if (!placementSupplyListVO.list.isEmpty()){
|
if (!placementSupplyListVO.list.isEmpty()){
|
||||||
val placement = placementSupplyListVO.list[0]
|
var placement:PlacementSupplyVO? = null
|
||||||
shelving = placement.shelving
|
placementSupplyListVO.list.forEach { placementVO ->
|
||||||
item = placement.itemFk
|
if (placementVO.stock != "0" && placement == null)
|
||||||
longName = placement.longName
|
placement = placementVO
|
||||||
total = placement.total
|
}
|
||||||
itemShelvingFk = placement.itemShelvingFk
|
if (placement != null){
|
||||||
|
shelving = placement!!.shelving
|
||||||
|
item = placement!!.itemFk
|
||||||
|
longName = placement!!.longName
|
||||||
|
total = placement!!.total
|
||||||
|
itemShelvingFk = placement!!.itemShelvingFk
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
listPlacementSupply = ArrayList()
|
listPlacementSupply = ArrayList()
|
||||||
placementSupplyListVO.list.forEach {
|
placementSupplyListVO.list.forEach {
|
||||||
|
if (it.stock != "0")
|
||||||
listPlacementSupply.add(BarcodeVO(code = it.proposal))
|
listPlacementSupply.add(BarcodeVO(code = it.proposal))
|
||||||
}
|
}
|
||||||
|
try {
|
||||||
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton("Coger") {
|
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton("Coger") {
|
||||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||||
|
if (customDialogList.getValue().toInt() > total.toInt()) {
|
||||||
|
"La cantidad supera a la disponible".toast(requireContext())
|
||||||
|
} else {
|
||||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||||
mpok?.start()
|
mpok?.start()
|
||||||
|
@ -593,6 +611,8 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
scanRequest()
|
scanRequest()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
"Escanea item para validar".toast(requireContext())
|
"Escanea item para validar".toast(requireContext())
|
||||||
}
|
}
|
||||||
|
@ -602,8 +622,9 @@ class CollectionFragment(
|
||||||
scanRequest()
|
scanRequest()
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo("Escanea item").setValueTwo("").show()
|
}.setHintValue("Cantidad que coges:").setValue(total).setHintValueTwo("Escanea item")
|
||||||
|
.setValueTwo("").show()
|
||||||
|
}catch (e:Exception){}
|
||||||
|
|
||||||
customDialogList.getEditTextTwo().post(Runnable {
|
customDialogList.getEditTextTwo().post(Runnable {
|
||||||
customDialogList.getEditTextTwo().requestFocusFromTouch()
|
customDialogList.getEditTextTwo().requestFocusFromTouch()
|
||||||
|
@ -611,10 +632,13 @@ class CollectionFragment(
|
||||||
activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
activity!!.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
lManager.hideSoftInputFromWindow(customDialogList.getEditTextTwo().windowToken, InputMethodManager.SHOW_FORCED)
|
lManager.hideSoftInputFromWindow(customDialogList.getEditTextTwo().windowToken, InputMethodManager.SHOW_FORCED)
|
||||||
})
|
})
|
||||||
|
try {
|
||||||
customDialogList.getEditTextTwo().setOnEditorActionListener { v, actionId, event ->
|
customDialogList.getEditTextTwo().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 (customDialogList.getValueTwo().isNotEmpty()) {
|
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||||
|
if (customDialogList.getValue().toInt() > total.toInt()) {
|
||||||
|
"La cantidad supera a la disponible".toast(requireContext())
|
||||||
|
} else {
|
||||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||||
onQuantityOfShelvingSelected(itemShelvingFk)
|
onQuantityOfShelvingSelected(itemShelvingFk)
|
||||||
mpok?.start()
|
mpok?.start()
|
||||||
|
@ -629,6 +653,8 @@ class CollectionFragment(
|
||||||
)
|
)
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
"Escanea item para validar".toast(requireContext())
|
"Escanea item para validar".toast(requireContext())
|
||||||
}
|
}
|
||||||
|
@ -639,6 +665,7 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
}catch (e:Exception){}
|
||||||
|
|
||||||
placementSupplyAdapter = BarcodeAdapter(listPlacementSupply,object: OnBarcodeRowClickListener {
|
placementSupplyAdapter = BarcodeAdapter(listPlacementSupply,object: OnBarcodeRowClickListener {
|
||||||
override fun onBarcodeRowClickListener(item: BarcodeVO) {
|
override fun onBarcodeRowClickListener(item: BarcodeVO) {
|
||||||
|
@ -696,7 +723,7 @@ class CollectionFragment(
|
||||||
}catch (e:Exception){}
|
}catch (e:Exception){}
|
||||||
|
|
||||||
//3- MARCAR LINEA
|
//3- MARCAR LINEA
|
||||||
if (sales[storedPosition].pickedQuantity != sales[storedPosition].originalQuantity){
|
if (sales[storedPosition].pickedQuantity != sales[storedPosition].quantity){
|
||||||
sales[storedPosition].isPrepared = "1"
|
sales[storedPosition].isPrepared = "1"
|
||||||
markLine(storedPosition, OK)
|
markLine(storedPosition, OK)
|
||||||
}else{
|
}else{
|
||||||
|
@ -930,16 +957,16 @@ class CollectionFragment(
|
||||||
private fun split(position: Int,quantity:String){
|
private fun split(position: Int,quantity:String){
|
||||||
var totalQuantity: Int = 0
|
var totalQuantity: Int = 0
|
||||||
try {
|
try {
|
||||||
totalQuantity = sales[position].originalQuantity.toInt() - quantity.toInt()
|
totalQuantity = sales[position].quantity.toInt() - quantity.toInt()
|
||||||
}catch (e:Exception){}
|
}catch (e:Exception){}
|
||||||
viewModel.saleMove(
|
viewModel.saleMove(
|
||||||
usuario = user,
|
usuario = user,
|
||||||
password = password,
|
password = password,
|
||||||
saleFk = sales[position].saleFk,
|
saleFk = sales[position].saleFk,
|
||||||
quantity = totalQuantity.toString(),
|
quantity = totalQuantity.toString(),
|
||||||
originalQuantity = quantity
|
originalQuantity = sales[position].quantity
|
||||||
)
|
)
|
||||||
sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
sales[position].quantity = quantity
|
sales[position].quantity = quantity
|
||||||
//sales[position].startQuantity = quantity
|
//sales[position].startQuantity = quantity
|
||||||
|
|
||||||
|
@ -948,12 +975,18 @@ class CollectionFragment(
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
|
|
||||||
|
|
||||||
|
//enviar mensaje a salix
|
||||||
|
val ticket = "[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
||||||
|
val message = "Se ha enviado a Split el articulo "+sales[position].itemFk+" del ticket "+ticket
|
||||||
|
viewModel.sendChekingPresence(token = token,workerId = sales[position].salePersonFk,message = message)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun trash(position: Int,quantity:String){
|
private fun trash(position: Int,quantity:String){
|
||||||
var totalQuantity: Int = 0
|
var totalQuantity: Int = 0
|
||||||
try {
|
try {
|
||||||
totalQuantity = sales[position].originalQuantity.toInt() - quantity.toInt()
|
totalQuantity = sales[position].quantity.toInt() - quantity.toInt()
|
||||||
}catch (e:Exception){}
|
}catch (e:Exception){}
|
||||||
viewModel.collectionMissingTrash(
|
viewModel.collectionMissingTrash(
|
||||||
usuario = user,
|
usuario = user,
|
||||||
|
@ -964,18 +997,24 @@ class CollectionFragment(
|
||||||
type = "FALSE",
|
type = "FALSE",
|
||||||
originalQuantity = quantity
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
sales[position].quantity = quantity
|
sales[position].quantity = quantity
|
||||||
//sales[position].startQuantity = quantity
|
//sales[position].startQuantity = quantity
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
if (quantity == "0")
|
if (quantity == "0")
|
||||||
markLine(position,type)
|
markLine(position,type)
|
||||||
|
|
||||||
|
|
||||||
|
//enviar mensaje a salix
|
||||||
|
val ticket = "[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
||||||
|
val message = "Se ha enviado a Faltas el articulo "+sales[position].itemFk+" del ticket "+ticket
|
||||||
|
viewModel.sendChekingPresence(token = token,workerId = sales[position].salePersonFk,message = message)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun missing(position: Int,quantity:String){
|
private fun missing(position: Int,quantity:String){
|
||||||
var totalQuantity: Int = 0
|
var totalQuantity: Int = 0
|
||||||
try {
|
try {
|
||||||
totalQuantity = sales[position].originalQuantity.toInt() - quantity.toInt()
|
totalQuantity = sales[position].quantity.toInt() - quantity.toInt()
|
||||||
}catch (e:Exception){}
|
}catch (e:Exception){}
|
||||||
viewModel.collectionMissingTrash(
|
viewModel.collectionMissingTrash(
|
||||||
usuario = user,
|
usuario = user,
|
||||||
|
@ -986,13 +1025,19 @@ class CollectionFragment(
|
||||||
type = "TRUE",
|
type = "TRUE",
|
||||||
originalQuantity = quantity
|
originalQuantity = quantity
|
||||||
)
|
)
|
||||||
sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
sales[position].quantity = quantity
|
sales[position].quantity = quantity
|
||||||
//sales[position].startQuantity = quantity
|
//sales[position].startQuantity = quantity
|
||||||
|
|
||||||
if (quantity == "0")
|
if (quantity == "0")
|
||||||
markLine(position,type)
|
markLine(position,type)
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
|
|
||||||
|
|
||||||
|
//enviar mensaje a salix
|
||||||
|
val ticket = "[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
||||||
|
val message = "Se ha enviado a Basura el articulo "+sales[position].itemFk+" del ticket "+ticket
|
||||||
|
viewModel.sendChekingPresence(token = token,workerId = sales[position].salePersonFk,message = message)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun increaseQuantity(position:Int,quantity:String){
|
private fun increaseQuantity(position:Int,quantity:String){
|
||||||
|
@ -1003,19 +1048,18 @@ class CollectionFragment(
|
||||||
quantity = quantity
|
quantity = quantity
|
||||||
)
|
)
|
||||||
try {
|
try {
|
||||||
val quantityPicked = (quantity.toInt() - sales[position].quantity.toInt()).toString()
|
//val quantityPicked = (quantity.toInt() - sales[position].quantity.toInt()).toString()
|
||||||
sales[position].originalQuantity = quantity
|
//sales[position].originalQuantity = quantity
|
||||||
sales[position].quantity = quantity
|
sales[position].quantity = quantity
|
||||||
if (type == CONTROLADOR){
|
/*if (type == CONTROLADOR){
|
||||||
showShelving(position,0,quantityPicked)
|
showShelving(position,0,quantityPicked)
|
||||||
}
|
}*/
|
||||||
}catch (e:Exception){}
|
}catch (e:Exception){}
|
||||||
saleAdapter?.notifyDataSetChanged()
|
saleAdapter?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//ESTADOS
|
//ESTADOS
|
||||||
|
|
||||||
private fun changeTicketState(){
|
private fun changeTicketState(){
|
||||||
if (type == CONTROLADOR){
|
if (type == CONTROLADOR){
|
||||||
viewModel.collectionUpdateState(
|
viewModel.collectionUpdateState(
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
package es.verdnatura.presentation.view.feature.collection.fragment
|
package es.verdnatura.presentation.view.feature.collection.fragment
|
||||||
|
|
||||||
|
import android.util.Log
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import es.verdnatura.domain.GetLoginUserCase
|
||||||
import es.verdnatura.domain.GetSacadorControladorUserCase
|
import es.verdnatura.domain.GetSacadorControladorUserCase
|
||||||
import es.verdnatura.domain.GetShelvingParkingUserCase
|
|
||||||
import es.verdnatura.domain.GetUbicadorUserCase
|
import es.verdnatura.domain.GetUbicadorUserCase
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.collection.ItemVO
|
import es.verdnatura.presentation.view.feature.collection.ItemVO
|
||||||
import es.verdnatura.presentation.view.feature.collection.mapper.map
|
import es.verdnatura.presentation.view.feature.collection.mapper.map
|
||||||
|
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
|
||||||
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.PlacementSupplyListVO
|
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyListVO
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyVO
|
import es.verdnatura.presentation.view.feature.sacador.model.PlacementSupplyVO
|
||||||
|
@ -22,6 +24,7 @@ class CollectionViewModel : BaseViewModel() {
|
||||||
|
|
||||||
private val getSacadorControladorUserCase: GetSacadorControladorUserCase = GetSacadorControladorUserCase()
|
private val getSacadorControladorUserCase: GetSacadorControladorUserCase = GetSacadorControladorUserCase()
|
||||||
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase()
|
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase()
|
||||||
|
private val getLoginUserCase: GetLoginUserCase = GetLoginUserCase()
|
||||||
|
|
||||||
private val _collectionTicketList by lazy { MutableLiveData<CollectionVO>() }
|
private val _collectionTicketList by lazy { MutableLiveData<CollectionVO>() }
|
||||||
val collectionTicketList: LiveData<CollectionVO>
|
val collectionTicketList: LiveData<CollectionVO>
|
||||||
|
@ -288,4 +291,19 @@ class CollectionViewModel : BaseViewModel() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun sendChekingPresence(token:String,workerId:String,message:String){
|
||||||
|
try{
|
||||||
|
getLoginUserCase.sendChekingPresence(token,workerId.toInt(),message).enqueue(object : Callback<Boolean>{
|
||||||
|
override fun onResponse(call: Call<Boolean>, response: Response<Boolean>) {
|
||||||
|
Log.i("Salix","Mensaje enviado a salix")
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onFailure(call: Call<Boolean>, t: Throwable) {
|
||||||
|
Log.i("Salix Error",""+t.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}catch (e:Exception){}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@ package es.verdnatura.presentation.view.feature.collection.mapper
|
||||||
|
|
||||||
import es.verdnatura.presentation.common.convertToDateString
|
import es.verdnatura.presentation.common.convertToDateString
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||||
import java.lang.NumberFormatException
|
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
|
@ -12,6 +11,7 @@ fun CollectionVO.map() : CollectionVO{
|
||||||
ticket.sales.forEach {
|
ticket.sales.forEach {
|
||||||
it.ticketFk = ticket.ticketFk
|
it.ticketFk = ticket.ticketFk
|
||||||
it.level = ticket.level
|
it.level = ticket.level
|
||||||
|
it.salePersonFk = ticket.salesPersonFk
|
||||||
it.agencyName = ticket.agencyName
|
it.agencyName = ticket.agencyName
|
||||||
it.quantity = it.quantity.substring(0, it.quantity.indexOf("."))
|
it.quantity = it.quantity.substring(0, it.quantity.indexOf("."))
|
||||||
it.isNew = it.isAdded == "1"
|
it.isNew = it.isAdded == "1"
|
||||||
|
@ -33,7 +33,7 @@ fun CollectionVO.map() : CollectionVO{
|
||||||
}
|
}
|
||||||
placement.created =
|
placement.created =
|
||||||
getCalendarFromDate(placement.created).convertToDateString()
|
getCalendarFromDate(placement.created).convertToDateString()
|
||||||
placement.visible = "(" + placement.visible + ")"
|
placement.visible = "(" + (if(placement.visible.toInt() > 0) placement.visible else "0") + ")"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
it.placements = listOf()
|
it.placements = listOf()
|
||||||
|
@ -43,7 +43,7 @@ fun CollectionVO.map() : CollectionVO{
|
||||||
}
|
}
|
||||||
}catch (e:Exception){
|
}catch (e:Exception){
|
||||||
this.isError = true
|
this.isError = true
|
||||||
this.errorMessage = "La colección no tiene tickets"
|
this.errorMessage = "Error al construir la colección"
|
||||||
}
|
}
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,7 @@ class ControladorFragment : BaseFragment<FragmentControladorBinding,ControladorV
|
||||||
splash_progress.visibility = View.GONE
|
splash_progress.visibility = View.GONE
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Aceptar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Aceptar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
if (!goBack)navigateToCollectionList(it)
|
if (!goBack)navigateToCollectionList(it)
|
||||||
|
|
|
@ -146,9 +146,9 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
|
||||||
customDialogInput.setTitle(item.itemFk+"\n"+item.longName+" "+item.size).setDescription("Cantidad real("+item.nicho+")").setOkButton("Tirar"){
|
customDialogInput.setTitle(item.itemFk+"\n"+item.longName+" "+item.size).setDescription("Cantidad real("+item.nicho+")").setOkButton("Tirar"){
|
||||||
viewModel.itemStockUpdate(item.itemFk,warehouseFk,user,password,customDialogInput.getValue(),"0")
|
viewModel.itemStockUpdate(item.itemFk,warehouseFk,user,password,customDialogInput.getValue(),"0")
|
||||||
changeOfflineValue(item)
|
changeOfflineValue(item)
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.setValue("0").show()
|
}.setValue("0").show()
|
||||||
|
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -159,7 +159,7 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
|
||||||
changeOfflineValue(item)
|
changeOfflineValue(item)
|
||||||
}
|
}
|
||||||
customDialogInput.setValue("")
|
customDialogInput.setValue("")
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
||||||
return@setOnEditorActionListener true
|
return@setOnEditorActionListener true
|
||||||
}
|
}
|
||||||
|
@ -183,7 +183,7 @@ class FaltasFragment : BaseFragment<FragmentFaltasBinding, FaltasViewModel>(Falt
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
response.observe(viewLifecycleOwner, Observer {
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -156,9 +156,9 @@ class InventaryFragment : BaseFragment<FragmentInventaryBinding,InventaryViewMod
|
||||||
customDialogInput.setTitle(item.itemFk+"\n"+item.longName+" "+item.size).setDescription("Cantidad real("+item.nicho+")").setOkButton("Tirar"){
|
customDialogInput.setTitle(item.itemFk+"\n"+item.longName+" "+item.size).setDescription("Cantidad real("+item.nicho+")").setOkButton("Tirar"){
|
||||||
viewModel.itemStockUpdate(item.itemFk,warehouseFk,user,password,customDialogInput.getValue(),"0")
|
viewModel.itemStockUpdate(item.itemFk,warehouseFk,user,password,customDialogInput.getValue(),"0")
|
||||||
changeOfflineValue(item)
|
changeOfflineValue(item)
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.setValue("0").show()
|
}.setValue("0").show()
|
||||||
|
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -169,7 +169,7 @@ class InventaryFragment : BaseFragment<FragmentInventaryBinding,InventaryViewMod
|
||||||
changeOfflineValue(item)
|
changeOfflineValue(item)
|
||||||
}
|
}
|
||||||
customDialogInput.setValue("")
|
customDialogInput.setValue("")
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
||||||
return@setOnEditorActionListener true
|
return@setOnEditorActionListener true
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@ class InventaryFragment : BaseFragment<FragmentInventaryBinding,InventaryViewMod
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
response.observe(viewLifecycleOwner, Observer {
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -57,7 +57,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding,LoginViewModel> (LoginVi
|
||||||
splash_progress.visibility = View.INVISIBLE
|
splash_progress.visibility = View.INVISIBLE
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
splash_progress.visibility = View.VISIBLE
|
splash_progress.visibility = View.VISIBLE
|
||||||
|
@ -78,7 +78,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding,LoginViewModel> (LoginVi
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
saveTokenPref("")
|
saveTokenPref("")
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage+". Puedes continuar pero algunas funcionalidades no estarán disponibles.").setOkButton("Entendido"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage+". Puedes continuar pero algunas funcionalidades no estarán disponibles.").setOkButton("Entendido"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
getVersion()
|
getVersion()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
|
@ -90,12 +90,13 @@ class LoginFragment : BaseFragment<FragmentLoginBinding,LoginViewModel> (LoginVi
|
||||||
version.observe(viewLifecycleOwner, Observer {
|
version.observe(viewLifecycleOwner, Observer {
|
||||||
splash_progress.visibility = View.INVISIBLE
|
splash_progress.visibility = View.INVISIBLE
|
||||||
if (it){
|
if (it){
|
||||||
customDialog.setTitle("Atención").setDescription("La aplicación se encuentra en fase de desarrollo. Algunas funcionalidades están desactivadas y se van a ir añadiendo de forma progresiva.").setOkButton("Entrar"){
|
/* customDialog.setTitle("Atención").setDescription("La aplicación se encuentra en fase de desarrollo. Algunas funcionalidades están desactivadas y se van a ir añadiendo de forma progresiva.").setOkButton("Entrar"){
|
||||||
goToMain()
|
goToMain()
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()*/
|
||||||
|
goToMain()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
customDialog.setTitle("Actualizar").setDescription("Existe una versión nueva, es recomendable actualizar.").setOkButton("Actualizar"){
|
customDialog.setTitle("Actualizar").setDescription("Existe una versión nueva, es recomendable actualizar.").setOkButton("Actualizar"){
|
||||||
|
@ -103,7 +104,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding,LoginViewModel> (LoginVi
|
||||||
openURL.data = Uri.parse("https://app.verdnatura.es/bin/vn-pickingV2.apk")
|
openURL.data = Uri.parse("https://app.verdnatura.es/bin/vn-pickingV2.apk")
|
||||||
startActivity(openURL)
|
startActivity(openURL)
|
||||||
}.setKoButton("Omitir"){
|
}.setKoButton("Omitir"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
goToMain()
|
goToMain()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,9 +53,6 @@ class LoginViewModel() : BaseViewModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun loginSalix(user:String,password:String){
|
fun loginSalix(user:String,password:String){
|
||||||
val loginSalixVO = LoginSalixVO(user,password, "aaa")
|
|
||||||
_loginsalixitem.value = loginSalixVO
|
|
||||||
/*
|
|
||||||
getLoginUserCase.salixLogin(user,password).enqueue(object : Callback<LoginSalixVO>{
|
getLoginUserCase.salixLogin(user,password).enqueue(object : Callback<LoginSalixVO>{
|
||||||
override fun onResponse(call: Call<LoginSalixVO>, response: Response<LoginSalixVO>) {
|
override fun onResponse(call: Call<LoginSalixVO>, response: Response<LoginSalixVO>) {
|
||||||
|
|
||||||
|
@ -73,7 +70,7 @@ class LoginViewModel() : BaseViewModel() {
|
||||||
val loginSalixVO = LoginSalixVO(user,password, "",isError = true,errorMessage = t.message!!)
|
val loginSalixVO = LoginSalixVO(user,password, "",isError = true,errorMessage = t.message!!)
|
||||||
_loginsalixitem.value = loginSalixVO
|
_loginsalixitem.value = loginSalixVO
|
||||||
}
|
}
|
||||||
})*/
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun checkVersion(user:String,password:String,version:String){
|
fun checkVersion(user:String,password:String,version:String){
|
||||||
|
|
|
@ -13,3 +13,11 @@ class LoginSalixVO (
|
||||||
var isError:Boolean = false,
|
var isError:Boolean = false,
|
||||||
var errorMessage:String = ""
|
var errorMessage:String = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
class SalixMessageVO (
|
||||||
|
val workerId:Int = 0,
|
||||||
|
val message:String = "",
|
||||||
|
val token:String = "",
|
||||||
|
var isError:Boolean = false,
|
||||||
|
var errorMessage:String = ""
|
||||||
|
)
|
|
@ -8,7 +8,6 @@ import androidx.fragment.app.Fragment
|
||||||
import androidx.fragment.app.FragmentManager
|
import androidx.fragment.app.FragmentManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.ActivityMainBinding
|
import es.verdnatura.databinding.ActivityMainBinding
|
||||||
import es.verdnatura.domain.toast
|
|
||||||
import es.verdnatura.presentation.base.BaseActivity
|
import es.verdnatura.presentation.base.BaseActivity
|
||||||
import es.verdnatura.presentation.common.*
|
import es.verdnatura.presentation.common.*
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
|
@ -216,10 +215,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>() , OnPasillerosItemClick
|
||||||
fm.popBackStackImmediate()
|
fm.popBackStackImmediate()
|
||||||
}else {
|
}else {
|
||||||
customDialog.setTitle("Cerrar sesión").setDescription("¿Estás seguro de cerrar la sesión?").setOkButton("Salir"){
|
customDialog.setTitle("Cerrar sesión").setDescription("¿Estás seguro de cerrar la sesión?").setOkButton("Salir"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
finish()
|
finish()
|
||||||
}.setKoButton("Cancelar") {
|
}.setKoButton("Cancelar") {
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,10 @@ package es.verdnatura.presentation.view.feature.paletizador.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.core.content.ContextCompat
|
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import es.verdnatura.R
|
|
||||||
import es.verdnatura.databinding.ItemExpeditionpalletRowBinding
|
|
||||||
import es.verdnatura.databinding.ItemExpeditionscanRowBinding
|
import es.verdnatura.databinding.ItemExpeditionscanRowBinding
|
||||||
import es.verdnatura.presentation.common.OnComprobarPalletViewClickListener
|
|
||||||
import es.verdnatura.presentation.common.OnPalletClickListener
|
|
||||||
import es.verdnatura.presentation.common.OnScanLongClickListener
|
import es.verdnatura.presentation.common.OnScanLongClickListener
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
|
||||||
|
|
||||||
class ExpeditionScanAdapter (
|
class ExpeditionScanAdapter (
|
||||||
private val items: List<ItemExpeditionScanVO>,
|
private val items: List<ItemExpeditionScanVO>,
|
||||||
|
|
|
@ -3,40 +3,28 @@ package es.verdnatura.presentation.view.feature.paletizador.fragment
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import androidx.lifecycle.ViewModelProviders
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import android.view.LayoutInflater
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.view.inputmethod.EditorInfo
|
|
||||||
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
|
||||||
import es.verdnatura.databinding.FragmentExpeditionPalletBinding
|
|
||||||
import es.verdnatura.databinding.FragmentExpeditionPalletDetailBinding
|
import es.verdnatura.databinding.FragmentExpeditionPalletDetailBinding
|
||||||
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.OnBarcodeRowClickListener
|
|
||||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
import es.verdnatura.presentation.common.OnPalletClickListener
|
import es.verdnatura.presentation.common.OnPalletClickListener
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||||
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.inventario.adapter.ToolBarAdapter
|
||||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionPalletAdapter
|
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionPalletViewAdapter
|
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionPalletViewAdapter
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.*
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
||||||
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
||||||
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletViewListVO
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.android.synthetic.main.fragment_expedition_pallet_detail.*
|
import kotlinx.android.synthetic.main.fragment_expedition_pallet_detail.*
|
||||||
|
|
||||||
import kotlinx.android.synthetic.main.toolbar.*
|
import kotlinx.android.synthetic.main.toolbar.*
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
class ExpeditionPalletDetailFragment(
|
class ExpeditionPalletDetailFragment(
|
||||||
|
@ -147,7 +135,7 @@ class ExpeditionPalletDetailFragment(
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
response.observe(viewLifecycleOwner, Observer {
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
activity!!.onBackPressed()
|
activity!!.onBackPressed()
|
||||||
|
|
|
@ -7,7 +7,8 @@ import es.verdnatura.domain.GetPaletizadoresUserCase
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
import es.verdnatura.presentation.common.Event
|
import es.verdnatura.presentation.common.Event
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.*
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletViewListVO
|
||||||
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletViewVO
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.Callback
|
import retrofit2.Callback
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
|
|
|
@ -17,7 +17,6 @@ import es.verdnatura.presentation.common.OnComprobarPalletViewClickListener
|
||||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||||
import es.verdnatura.presentation.common.OnPalletClickListener
|
import es.verdnatura.presentation.common.OnPalletClickListener
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogHour
|
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||||
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
||||||
|
@ -135,7 +134,7 @@ class ExpeditionPalletFragment(
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
response.observe(viewLifecycleOwner, Observer {
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -171,11 +170,11 @@ class ExpeditionPalletFragment(
|
||||||
ItemPalletVO(Pallet = it.list.get(0).palletFk))
|
ItemPalletVO(Pallet = it.list.get(0).palletFk))
|
||||||
}else{
|
}else{
|
||||||
customDialog.setTitle("Atención").setDescription("No ha escaneado expediciones").setOkButton("Ok"){
|
customDialog.setTitle("Atención").setDescription("No ha escaneado expediciones").setOkButton("Ok"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
customDialogList.hide()
|
customDialogList.dismiss()
|
||||||
|
|
||||||
|
|
||||||
}.setKoButton("Cerrar"){
|
}.setKoButton("Cerrar"){
|
||||||
|
@ -183,7 +182,7 @@ class ExpeditionPalletFragment(
|
||||||
splash_progress.visibility = View.VISIBLE
|
splash_progress.visibility = View.VISIBLE
|
||||||
viewModel.expeditionPallet_List(user,password,itemExpeditionTruckVO!!.truckFk)
|
viewModel.expeditionPallet_List(user,password,itemExpeditionTruckVO!!.truckFk)
|
||||||
listExpeditions = ArrayList()
|
listExpeditions = ArrayList()
|
||||||
customDialogList.hide()
|
customDialogList.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
|
|
||||||
customDialogList.getEditText().requestFocus()
|
customDialogList.getEditText().requestFocus()
|
||||||
|
|
|
@ -3,18 +3,12 @@ package es.verdnatura.presentation.view.feature.paletizador.fragment
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import androidx.lifecycle.ViewModelProviders
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import androidx.fragment.app.Fragment
|
|
||||||
import android.view.LayoutInflater
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
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
|
||||||
import es.verdnatura.databinding.FragmentExpeditionPalletBinding
|
|
||||||
import es.verdnatura.databinding.FragmentExpeditionScanBinding
|
import es.verdnatura.databinding.FragmentExpeditionScanBinding
|
||||||
import es.verdnatura.domain.notNull
|
import es.verdnatura.domain.notNull
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
|
@ -26,16 +20,13 @@ import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
||||||
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
|
import es.verdnatura.presentation.view.feature.inventario.adapter.ToolBarAdapter
|
||||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionPalletAdapter
|
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionScanAdapter
|
import es.verdnatura.presentation.view.feature.paletizador.adapter.ExpeditionScanAdapter
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.*
|
import es.verdnatura.presentation.view.feature.paletizador.model.*
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.android.synthetic.main.fragment_expedition_scan.*
|
import kotlinx.android.synthetic.main.fragment_expedition_scan.*
|
||||||
|
|
||||||
import kotlinx.android.synthetic.main.toolbar.*
|
import kotlinx.android.synthetic.main.toolbar.*
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
import kotlin.collections.ArrayList
|
import kotlin.collections.ArrayList
|
||||||
|
|
||||||
class ExpeditionScanFragment (
|
class ExpeditionScanFragment (
|
||||||
|
@ -142,7 +133,7 @@ class ExpeditionScanFragment (
|
||||||
response.observe(viewLifecycleOwner, Observer {
|
response.observe(viewLifecycleOwner, Observer {
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -150,7 +141,7 @@ class ExpeditionScanFragment (
|
||||||
responseDeleteScan.observe(viewLifecycleOwner, Observer {
|
responseDeleteScan.observe(viewLifecycleOwner, Observer {
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
viewModel.expeditionScanList(user,password,itemPalletVO!!.Pallet)
|
viewModel.expeditionScanList(user,password,itemPalletVO!!.Pallet)
|
||||||
|
@ -170,9 +161,9 @@ class ExpeditionScanFragment (
|
||||||
.setOkButton("Borrar"){
|
.setOkButton("Borrar"){
|
||||||
splash_progress.visibility = View.VISIBLE
|
splash_progress.visibility = View.VISIBLE
|
||||||
viewModel.expeditionScanDel(user,password,itemExpeditionScanVO.id)
|
viewModel.expeditionScanDel(user,password,itemExpeditionScanVO.id)
|
||||||
customDialogTwoButtons.hide()
|
customDialogTwoButtons.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
customDialogTwoButtons.hide()
|
customDialogTwoButtons.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,17 +197,17 @@ class ExpeditionScanFragment (
|
||||||
)
|
)
|
||||||
}else{
|
}else{
|
||||||
customDialog.setTitle("Atención").setDescription("No ha escaneado expediciones").setOkButton("Ok"){
|
customDialog.setTitle("Atención").setDescription("No ha escaneado expediciones").setOkButton("Ok"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
customDialogList.hide()
|
customDialogList.dismiss()
|
||||||
|
|
||||||
|
|
||||||
}.setKoButton("Cerrar"){
|
}.setKoButton("Cerrar"){
|
||||||
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
|
(activity as MainActivity).hideKeyboard(customDialogList.getEditText())
|
||||||
listExpeditions = ArrayList()
|
listExpeditions = ArrayList()
|
||||||
customDialogList.hide()
|
customDialogList.dismiss()
|
||||||
}.setValue("").show()
|
}.setValue("").show()
|
||||||
|
|
||||||
customDialogList.getEditText().requestFocus()
|
customDialogList.getEditText().requestFocus()
|
||||||
|
|
|
@ -3,12 +3,14 @@ package es.verdnatura.presentation.view.feature.paletizador.fragment
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import androidx.lifecycle.Transformations
|
import androidx.lifecycle.Transformations
|
||||||
import androidx.lifecycle.ViewModel
|
|
||||||
import es.verdnatura.domain.GetPaletizadoresUserCase
|
import es.verdnatura.domain.GetPaletizadoresUserCase
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
import es.verdnatura.presentation.common.Event
|
import es.verdnatura.presentation.common.Event
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.*
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanList
|
||||||
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
||||||
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemScanList
|
||||||
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemScanVO
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.Callback
|
import retrofit2.Callback
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
|
|
|
@ -74,7 +74,7 @@ class ParkingFragment : BaseFragment<FragmentParkingBinding,ParkingViewModel>(Pa
|
||||||
mperror?.start()
|
mperror?.start()
|
||||||
splash_progress.visibility = View.GONE
|
splash_progress.visibility = View.GONE
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
numParking -= 1
|
numParking -= 1
|
||||||
|
|
|
@ -2,7 +2,6 @@ package es.verdnatura.presentation.view.feature.presacador.adapter
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
@ -10,10 +9,8 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.ItemArticleRowBinding
|
import es.verdnatura.databinding.ItemArticleRowBinding
|
||||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
import es.verdnatura.presentation.common.OnQuantityClickListener
|
|
||||||
import es.verdnatura.presentation.common.OnSaleClickListener
|
import es.verdnatura.presentation.common.OnSaleClickListener
|
||||||
import es.verdnatura.presentation.view.feature.collection.adapter.PlacementAdapter
|
import es.verdnatura.presentation.view.feature.collection.adapter.PlacementAdapter
|
||||||
import es.verdnatura.presentation.view.feature.collection.adapter.SaleAdapter
|
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
import es.verdnatura.presentation.view.feature.presacador.mapper.toSale
|
import es.verdnatura.presentation.view.feature.presacador.mapper.toSale
|
||||||
import es.verdnatura.presentation.view.feature.presacador.model.PreSacadorItemVO
|
import es.verdnatura.presentation.view.feature.presacador.model.PreSacadorItemVO
|
||||||
|
|
|
@ -14,10 +14,12 @@ 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.FragmentPreSacadorBinding
|
import es.verdnatura.databinding.FragmentPreSacadorBinding
|
||||||
|
import es.verdnatura.domain.ConstAndValues.PRESACADOR
|
||||||
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.*
|
import es.verdnatura.presentation.common.*
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
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.CustomDialogList
|
||||||
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
||||||
|
@ -31,8 +33,6 @@ import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||||
import kotlinx.android.synthetic.main.activity_main.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
import kotlinx.android.synthetic.main.fragment_pre_sacador.*
|
import kotlinx.android.synthetic.main.fragment_pre_sacador.*
|
||||||
import kotlinx.android.synthetic.main.toolbar.*
|
import kotlinx.android.synthetic.main.toolbar.*
|
||||||
import es.verdnatura.domain.ConstAndValues.PRESACADOR
|
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
|
||||||
|
|
||||||
class PreSacadorFragment : BaseFragment<FragmentPreSacadorBinding,PreSacadorViewModel>(PreSacadorViewModel::class) {
|
class PreSacadorFragment : BaseFragment<FragmentPreSacadorBinding,PreSacadorViewModel>(PreSacadorViewModel::class) {
|
||||||
private var user = ""
|
private var user = ""
|
||||||
|
@ -560,11 +560,11 @@ class PreSacadorFragment : BaseFragment<FragmentPreSacadorBinding,PreSacadorView
|
||||||
val listIcons:ArrayList<Drawable> = ArrayList()
|
val listIcons:ArrayList<Drawable> = ArrayList()
|
||||||
val iconPrint : Drawable = resources.getDrawable(R.drawable.ic_print_black_24dp,resources.newTheme())
|
val iconPrint : Drawable = resources.getDrawable(R.drawable.ic_print_black_24dp,resources.newTheme())
|
||||||
val iconParking : Drawable = resources.getDrawable(R.drawable.ic_local_parking_black_24dp,resources.newTheme())
|
val iconParking : Drawable = resources.getDrawable(R.drawable.ic_local_parking_black_24dp,resources.newTheme())
|
||||||
val iconTransferir : Drawable = resources.getDrawable(R.drawable.ic_swap_horiz_black_24dp,resources.newTheme())
|
//val iconTransferir : Drawable = resources.getDrawable(R.drawable.ic_swap_horiz_black_24dp,resources.newTheme())
|
||||||
|
|
||||||
listIcons.add(iconPrint)
|
listIcons.add(iconPrint)
|
||||||
listIcons.add(iconParking)
|
listIcons.add(iconParking)
|
||||||
listIcons.add(iconTransferir)
|
//listIcons.add(iconTransferir)
|
||||||
|
|
||||||
toolbar_icons.adapter = ToolBarAdapter(listIcons,object: OnOptionsSelectedListener {
|
toolbar_icons.adapter = ToolBarAdapter(listIcons,object: OnOptionsSelectedListener {
|
||||||
override fun onOptionsItemSelected(item: Drawable) {
|
override fun onOptionsItemSelected(item: Drawable) {
|
||||||
|
@ -572,8 +572,6 @@ class PreSacadorFragment : BaseFragment<FragmentPreSacadorBinding,PreSacadorView
|
||||||
print()
|
print()
|
||||||
}else if (item == iconParking){
|
}else if (item == iconParking){
|
||||||
pasillerosItemClickListener?.onPasillerosItemClickListener(PasillerosItemVO(title = "Parking"),"")
|
pasillerosItemClickListener?.onPasillerosItemClickListener(PasillerosItemVO(title = "Parking"),"")
|
||||||
}else if (item == iconTransferir){
|
|
||||||
"Transferir".toast(requireContext())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -19,9 +19,6 @@ import es.verdnatura.presentation.view.feature.sacador.adapter.CollectionAdapter
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||||
import kotlinx.android.synthetic.main.fragment_sacador.*
|
import kotlinx.android.synthetic.main.fragment_sacador.*
|
||||||
import kotlinx.android.synthetic.main.toolbar.*
|
import kotlinx.android.synthetic.main.toolbar.*
|
||||||
import java.text.SimpleDateFormat
|
|
||||||
import java.util.*
|
|
||||||
import kotlin.collections.ArrayList
|
|
||||||
|
|
||||||
class SacadorFragment : BaseFragment<FragmentSacadorBinding,SacadorViewModel>(SacadorViewModel::class) {
|
class SacadorFragment : BaseFragment<FragmentSacadorBinding,SacadorViewModel>(SacadorViewModel::class) {
|
||||||
|
|
||||||
|
@ -84,7 +81,7 @@ class SacadorFragment : BaseFragment<FragmentSacadorBinding,SacadorViewModel>(Sa
|
||||||
override fun onOptionsItemSelected(item: Drawable) {
|
override fun onOptionsItemSelected(item: Drawable) {
|
||||||
if(item == iconAdd){
|
if(item == iconAdd){
|
||||||
splash_progress_two.visibility = View.VISIBLE
|
splash_progress_two.visibility = View.VISIBLE
|
||||||
viewModel.collectionTicketGet(user,password,"",sectorFk,"1")
|
viewModel.collectionNew(user,password,sectorFk)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -106,16 +103,27 @@ class SacadorFragment : BaseFragment<FragmentSacadorBinding,SacadorViewModel>(Sa
|
||||||
createCollectionList(it.list)
|
createCollectionList(it.list)
|
||||||
goBack2 = false
|
goBack2 = false
|
||||||
})
|
})
|
||||||
collectionTicketList.observe(viewLifecycleOwner, Observer {
|
/* collectionTicketList.observe(viewLifecycleOwner, Observer {
|
||||||
splash_progress_two.visibility = View.GONE
|
splash_progress_two.visibility = View.GONE
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Aceptar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Aceptar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
if (!goBack)navigateToCollectionList(it)
|
if (!goBack)navigateToCollectionList(it)
|
||||||
}
|
}
|
||||||
goBack = false
|
goBack = false
|
||||||
|
})*/
|
||||||
|
response.observe(viewLifecycleOwner, Observer {
|
||||||
|
splash_progress_two.visibility = View.GONE
|
||||||
|
if (it.isError){
|
||||||
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Aceptar"){
|
||||||
|
customDialog.dismiss()
|
||||||
|
}.show()
|
||||||
|
}else{
|
||||||
|
if (!goBack)addCollectionToList(it.response)
|
||||||
|
}
|
||||||
|
goBack = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,6 +140,23 @@ class SacadorFragment : BaseFragment<FragmentSacadorBinding,SacadorViewModel>(Sa
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun addCollectionToList(collection:String){
|
||||||
|
var isNew = true
|
||||||
|
collectionsList.forEach {
|
||||||
|
if (it.collectionFk == collection){
|
||||||
|
isNew = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (isNew){
|
||||||
|
collectionsList.add(CollectionVO(collectionFk = collection,created = "Nuevo"))
|
||||||
|
adapter?.notifyDataSetChanged()
|
||||||
|
}else{
|
||||||
|
customDialog.setTitle("Atención").setDescription("La colección "+collection+" sigue pendiente de preparar").setOkButton("Aceptar"){
|
||||||
|
customDialog.dismiss()
|
||||||
|
}.show()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun navigateToCollectionList(collection:CollectionVO){
|
private fun navigateToCollectionList(collection:CollectionVO){
|
||||||
collectionsList.add(collection)
|
collectionsList.add(collection)
|
||||||
adapter?.notifyDataSetChanged()
|
adapter?.notifyDataSetChanged()
|
||||||
|
|
|
@ -5,6 +5,7 @@ import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
import es.verdnatura.domain.GetSacadorControladorUserCase
|
import es.verdnatura.domain.GetSacadorControladorUserCase
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.collection.mapper.map
|
import es.verdnatura.presentation.view.feature.collection.mapper.map
|
||||||
import es.verdnatura.presentation.view.feature.sacador.mapper.toDateFormat
|
import es.verdnatura.presentation.view.feature.sacador.mapper.toDateFormat
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionListVO
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionListVO
|
||||||
|
@ -27,6 +28,10 @@ class SacadorViewModel : BaseViewModel() {
|
||||||
val collectionTicketList: LiveData<CollectionVO>
|
val collectionTicketList: LiveData<CollectionVO>
|
||||||
get() = _collectionTicketList
|
get() = _collectionTicketList
|
||||||
|
|
||||||
|
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
|
val response: LiveData<ResponseItemVO>
|
||||||
|
get() = _response
|
||||||
|
|
||||||
|
|
||||||
fun collectionTicketGet(usuario:String,password:String,collectionFk:String,sectorFk:String,print:String){
|
fun collectionTicketGet(usuario:String,password:String,collectionFk:String,sectorFk:String,print:String){
|
||||||
getSacadorControladorUserCase.collectionTicketGet(usuario,password,collectionFk,sectorFk,print).enqueue(object :
|
getSacadorControladorUserCase.collectionTicketGet(usuario,password,collectionFk,sectorFk,print).enqueue(object :
|
||||||
|
@ -47,6 +52,25 @@ class SacadorViewModel : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun collectionNew(usuario:String,password:String,sectorFk:String){
|
||||||
|
getSacadorControladorUserCase.collectionNew(usuario,password,sectorFk).enqueue(object :
|
||||||
|
Callback<String> {
|
||||||
|
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||||
|
_response.value = ResponseItemVO(isError = true,errorMessage = ""+t.message!!)
|
||||||
|
}
|
||||||
|
override fun onResponse(
|
||||||
|
call: Call<String>,
|
||||||
|
response: Response<String>
|
||||||
|
) {
|
||||||
|
if (response.body() != null){
|
||||||
|
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
|
||||||
|
}else{
|
||||||
|
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada collectionNew")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
fun collectionGet(usuario:String,password:String){
|
fun collectionGet(usuario:String,password:String){
|
||||||
getSacadorControladorUserCase.collectionGet(usuario,password).enqueue(object :
|
getSacadorControladorUserCase.collectionGet(usuario,password).enqueue(object :
|
||||||
Callback<List<CollectionVO>> {
|
Callback<List<CollectionVO>> {
|
||||||
|
|
|
@ -16,6 +16,7 @@ class TicketVO(
|
||||||
var ticketFk : String = "",
|
var ticketFk : String = "",
|
||||||
var level : String = "",
|
var level : String = "",
|
||||||
var agencyName : String = "",
|
var agencyName : String = "",
|
||||||
|
var salesPersonFk : String = "",
|
||||||
var sales : List<SaleVO> = listOf()
|
var sales : List<SaleVO> = listOf()
|
||||||
)
|
)
|
||||||
class SaleVO(
|
class SaleVO(
|
||||||
|
@ -49,7 +50,8 @@ class SaleVO(
|
||||||
var workerFk : String = "",
|
var workerFk : String = "",
|
||||||
var placements : List<PlacementVO> = listOf(),
|
var placements : List<PlacementVO> = listOf(),
|
||||||
var Barcodes : List<String> = listOf(),
|
var Barcodes : List<String> = listOf(),
|
||||||
var isNew : Boolean = false
|
var isNew : Boolean = false,
|
||||||
|
var salePersonFk : String = ""
|
||||||
)
|
)
|
||||||
|
|
||||||
class PlacementVO(
|
class PlacementVO(
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.transferencia.fragment
|
||||||
|
|
||||||
|
import es.verdnatura.R
|
||||||
|
import es.verdnatura.databinding.FragmentTransferenciaBinding
|
||||||
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
|
|
||||||
|
class TransferenciaFragment : BaseFragment<FragmentTransferenciaBinding,TransferenciaViewModel>(TransferenciaViewModel::class) {
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance() = TransferenciaFragment()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun getLayoutId(): Int = R.layout.fragment_transferencia
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,35 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.transferencia.fragment
|
||||||
|
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import es.verdnatura.domain.GetUbicadorUserCase
|
||||||
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
|
import retrofit2.Call
|
||||||
|
import retrofit2.Callback
|
||||||
|
import retrofit2.Response
|
||||||
|
|
||||||
|
class TransferenciaViewModel : BaseViewModel() {
|
||||||
|
|
||||||
|
private val getUbicadorUserCase: GetUbicadorUserCase = GetUbicadorUserCase()
|
||||||
|
|
||||||
|
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
|
val response: LiveData<ResponseItemVO>
|
||||||
|
get() = _response
|
||||||
|
|
||||||
|
fun itemShelvingTransfer(usuario:String,password:String,itemFk:String,shelvingFk:String){
|
||||||
|
getUbicadorUserCase.itemShelvingTransfer(usuario,password,itemFk,shelvingFk).enqueue(object :
|
||||||
|
Callback<String> {
|
||||||
|
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||||
|
_response.value = ResponseItemVO(isError = true,errorMessage ="Error al guardar item: "+itemFk+ " Respuesta:"+t.message!!)
|
||||||
|
}
|
||||||
|
override fun onResponse(call: Call<String>, response: Response<String>) {
|
||||||
|
if (response.body() == null){
|
||||||
|
_response.value = ResponseItemVO(isError = true,errorMessage = "Error en la llamada itemShelvingTransfer")
|
||||||
|
}else{
|
||||||
|
_response.value = ResponseItemVO(isError = false,response = response.body()!!)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
|
@ -58,6 +58,9 @@ class UbicadorAdapter (
|
||||||
moreImg.setOnClickListener {
|
moreImg.setOnClickListener {
|
||||||
onMoreClickListener.onMoreClickListener(item)
|
onMoreClickListener.onMoreClickListener(item)
|
||||||
}
|
}
|
||||||
|
namelayout.setOnClickListener {
|
||||||
|
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Consultar artículo"),item.item)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -105,7 +105,7 @@ class AutomaticAddItemFragment(
|
||||||
splash_progress.visibility = View.GONE
|
splash_progress.visibility = View.GONE
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}else{
|
}else{
|
||||||
activity!!.onBackPressed()
|
activity!!.onBackPressed()
|
||||||
|
|
|
@ -152,9 +152,9 @@ class UbicadorFragment(
|
||||||
parking = customDialogInput.getValue()
|
parking = customDialogInput.getValue()
|
||||||
toolbar_title.text = shelvingFk.toUpperCase() + " P: "+parking + " E: "+etiquetas
|
toolbar_title.text = shelvingFk.toUpperCase() + " P: "+parking + " E: "+etiquetas
|
||||||
mpok!!.start()
|
mpok!!.start()
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -163,7 +163,7 @@ class UbicadorFragment(
|
||||||
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) {
|
||||||
viewModel.shelvingPark(user,password,shelvingFk,customDialogInput.getValue())
|
viewModel.shelvingPark(user,password,shelvingFk,customDialogInput.getValue())
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
parking = customDialogInput.getValue()
|
parking = customDialogInput.getValue()
|
||||||
toolbar_title.text = shelvingFk.toUpperCase() + " P: "+parking+ " E: "+etiquetas
|
toolbar_title.text = shelvingFk.toUpperCase() + " P: "+parking+ " E: "+etiquetas
|
||||||
mpok!!.start()
|
mpok!!.start()
|
||||||
|
@ -180,9 +180,9 @@ class UbicadorFragment(
|
||||||
shelvingFk = customDialogInput.getValue()
|
shelvingFk = customDialogInput.getValue()
|
||||||
toolbar_title.text = shelvingFk.toUpperCase() + " P: "+parking+ " E: "+etiquetas
|
toolbar_title.text = shelvingFk.toUpperCase() + " P: "+parking+ " E: "+etiquetas
|
||||||
mpok!!.start()
|
mpok!!.start()
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
@ -191,7 +191,7 @@ class UbicadorFragment(
|
||||||
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) {
|
||||||
viewModel.shelvingChange(user,password,shelvingFk,customDialogInput.getValue())
|
viewModel.shelvingChange(user,password,shelvingFk,customDialogInput.getValue())
|
||||||
customDialogInput.hide()
|
customDialogInput.dismiss()
|
||||||
shelvingFk = customDialogInput.getValue()
|
shelvingFk = customDialogInput.getValue()
|
||||||
toolbar_title.text = shelvingFk.toUpperCase() + " P: "+parking+ " E: "+etiquetas
|
toolbar_title.text = shelvingFk.toUpperCase() + " P: "+parking+ " E: "+etiquetas
|
||||||
mpok!!.start()
|
mpok!!.start()
|
||||||
|
@ -210,9 +210,9 @@ class UbicadorFragment(
|
||||||
it.visible = "0"
|
it.visible = "0"
|
||||||
}
|
}
|
||||||
adapter!!.notifyDataSetChanged()
|
adapter!!.notifyDataSetChanged()
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.setKoButton("Cancelar"){
|
}.setKoButton("Cancelar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
|
|
||||||
|
@ -243,36 +243,7 @@ class UbicadorFragment(
|
||||||
|
|
||||||
},onMoreClickListener = object: OnMoreClickListener{
|
},onMoreClickListener = object: OnMoreClickListener{
|
||||||
override fun onMoreClickListener(item: ItemUbicadorVO) {
|
override fun onMoreClickListener(item: ItemUbicadorVO) {
|
||||||
customDialogTwoButtons.setTitle(item.item).setDescription("Selecciona una acción").setOkButton("Transferir"){
|
showMoreOptions(item)
|
||||||
customDialogInput.setTitle("Nueva matrícula").setDescription("Introduce el destino para item: "+item.item).setValue("").setOkButton("Transferir"){
|
|
||||||
viewModel.itemShelvingTransfer(user,password,item.id,customDialogInput.getValue())
|
|
||||||
listItems.remove(item)
|
|
||||||
adapter!!.notifyDataSetChanged()
|
|
||||||
customDialogInput.hide()
|
|
||||||
}.setKoButton("Cancelar"){
|
|
||||||
customDialogInput.hide()
|
|
||||||
}.show()
|
|
||||||
customDialogInput.getEditText().requestFocus()
|
|
||||||
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
|
||||||
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
|
||||||
viewModel.itemShelvingTransfer(user,password,item.id,customDialogInput.getValue())
|
|
||||||
listItems.remove(item)
|
|
||||||
adapter!!.notifyDataSetChanged()
|
|
||||||
customDialogInput.hide()
|
|
||||||
return@setOnEditorActionListener true
|
|
||||||
}
|
|
||||||
false
|
|
||||||
}
|
|
||||||
customDialogTwoButtons.hide()
|
|
||||||
}.setOkButtonTwo("Eliminar"){
|
|
||||||
listItems.remove(item)
|
|
||||||
adapter!!.notifyDataSetChanged()
|
|
||||||
viewModel.itemShelvingDelete(user,password,item.id)
|
|
||||||
customDialogTwoButtons.hide()
|
|
||||||
}.setKoButton("Cancelar"){
|
|
||||||
customDialogTwoButtons.hide()
|
|
||||||
}.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -287,7 +258,7 @@ class UbicadorFragment(
|
||||||
if (it.isError){
|
if (it.isError){
|
||||||
mperror!!.start()
|
mperror!!.start()
|
||||||
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
customDialog.setTitle("Error").setDescription(it.errorMessage).setOkButton("Cerrar"){
|
||||||
customDialog.hide()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -317,7 +288,7 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
saveNewItem(customDialogUbicador.getItemValue(),customDialogUbicador.getEtiquetaValue(),customDialogUbicador.getPackingValue(),customDialogUbicador.getVisibleValue(),if (delete)packingUpdate else null)
|
saveNewItem(customDialogUbicador.getItemValue(),customDialogUbicador.getEtiquetaValue(),customDialogUbicador.getPackingValue(),customDialogUbicador.getVisibleValue(),if (delete)packingUpdate else null)
|
||||||
}.setKoButton("Cerrar"){
|
}.setKoButton("Cerrar"){
|
||||||
customDialogUbicador.hide()
|
customDialogUbicador.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
customDialogUbicador.getEditItem().requestFocus()
|
||||||
|
@ -368,7 +339,7 @@ class UbicadorFragment(
|
||||||
customDialogUbicador.setItemValue("").setPackingValue("").setEtiquetaValue("").setVisibleValue("")
|
customDialogUbicador.setItemValue("").setPackingValue("").setEtiquetaValue("").setVisibleValue("")
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
customDialogUbicador.getEditItem().requestFocus()
|
||||||
(activity as MainActivity).hideKeyboard(customDialogUbicador.getEditItem())
|
(activity as MainActivity).hideKeyboard(customDialogUbicador.getEditItem())
|
||||||
customDialogUbicador.hide()
|
customDialogUbicador.dismiss()
|
||||||
|
|
||||||
}else if(!itemFk.isNullOrEmpty() && !etiquetas.isNullOrEmpty()){
|
}else if(!itemFk.isNullOrEmpty() && !etiquetas.isNullOrEmpty()){
|
||||||
val visible_calc = (etiquetas.toInt() * packing.toInt()).toString()
|
val visible_calc = (etiquetas.toInt() * packing.toInt()).toString()
|
||||||
|
@ -377,7 +348,7 @@ class UbicadorFragment(
|
||||||
customDialogUbicador.setItemValue("").setPackingValue("").setEtiquetaValue("").setVisibleValue("")
|
customDialogUbicador.setItemValue("").setPackingValue("").setEtiquetaValue("").setVisibleValue("")
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
customDialogUbicador.getEditItem().requestFocus()
|
||||||
(activity as MainActivity).hideKeyboard(customDialogUbicador.getEditItem())
|
(activity as MainActivity).hideKeyboard(customDialogUbicador.getEditItem())
|
||||||
customDialogUbicador.hide()
|
customDialogUbicador.dismiss()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
"Rellena campos obligatorios".toast((activity as MainActivity), Toast.LENGTH_LONG)
|
"Rellena campos obligatorios".toast((activity as MainActivity), Toast.LENGTH_LONG)
|
||||||
|
@ -389,7 +360,7 @@ class UbicadorFragment(
|
||||||
customDialogUbicador.setItemValue("").setPackingValue("").setEtiquetaValue("").setVisibleValue("")
|
customDialogUbicador.setItemValue("").setPackingValue("").setEtiquetaValue("").setVisibleValue("")
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
customDialogUbicador.getEditItem().requestFocus()
|
||||||
(activity as MainActivity).hideKeyboard(customDialogUbicador.getEditItem())
|
(activity as MainActivity).hideKeyboard(customDialogUbicador.getEditItem())
|
||||||
customDialogUbicador.hide()
|
customDialogUbicador.dismiss()
|
||||||
|
|
||||||
}else if(!itemFk.isNullOrEmpty() && !etiquetas.isNullOrEmpty() && updatePacking){
|
}else if(!itemFk.isNullOrEmpty() && !etiquetas.isNullOrEmpty() && updatePacking){
|
||||||
val visible_calc = (etiquetas.toInt() * packing.toInt()).toString()
|
val visible_calc = (etiquetas.toInt() * packing.toInt()).toString()
|
||||||
|
@ -398,7 +369,7 @@ class UbicadorFragment(
|
||||||
customDialogUbicador.setItemValue("").setPackingValue("").setEtiquetaValue("").setVisibleValue("")
|
customDialogUbicador.setItemValue("").setPackingValue("").setEtiquetaValue("").setVisibleValue("")
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
customDialogUbicador.getEditItem().requestFocus()
|
||||||
(activity as MainActivity).hideKeyboard(customDialogUbicador.getEditItem())
|
(activity as MainActivity).hideKeyboard(customDialogUbicador.getEditItem())
|
||||||
customDialogUbicador.hide()
|
customDialogUbicador.dismiss()
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
"Rellena campos obligatorios".toast((activity as MainActivity), Toast.LENGTH_LONG)
|
"Rellena campos obligatorios".toast((activity as MainActivity), Toast.LENGTH_LONG)
|
||||||
|
@ -437,4 +408,44 @@ class UbicadorFragment(
|
||||||
listItems.add(item)
|
listItems.add(item)
|
||||||
adapter?.notifyDataSetChanged()
|
adapter?.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun showMoreOptions(item:ItemUbicadorVO){
|
||||||
|
customDialogTwoButtons.setTitle(item.item).setDescription("Selecciona una acción").setOkButton("Transferir"){
|
||||||
|
customDialogInput.setTitle("Nueva matrícula").setDescription("Introduce el destino para item: "+item.item).setValue("").setOkButton("Transferir"){
|
||||||
|
viewModel.itemShelvingTransfer(user,password,item.id,customDialogInput.getValue())
|
||||||
|
listItems.remove(item)
|
||||||
|
adapter!!.notifyDataSetChanged()
|
||||||
|
customDialogInput.dismiss()
|
||||||
|
}.setKoButton("Cancelar"){
|
||||||
|
customDialogInput.dismiss()
|
||||||
|
}.show()
|
||||||
|
customDialogInput.getEditText().requestFocus()
|
||||||
|
(activity as MainActivity).hideKeyboard(customDialogInput.getEditText())
|
||||||
|
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||||
|
viewModel.itemShelvingTransfer(user,password,item.id,customDialogInput.getValue())
|
||||||
|
listItems.remove(item)
|
||||||
|
adapter!!.notifyDataSetChanged()
|
||||||
|
customDialogInput.dismiss()
|
||||||
|
return@setOnEditorActionListener true
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
customDialogTwoButtons.dismiss()
|
||||||
|
}.setOkButtonTwo("Eliminar"){
|
||||||
|
customDialog.setTitle("Confirmar").setDescription("Confirmas eliminar el artículo: "+item.item+"?").setOkButton("Eliminar"){
|
||||||
|
listItems.remove(item)
|
||||||
|
adapter!!.notifyDataSetChanged()
|
||||||
|
viewModel.itemShelvingDelete(user,password,item.id)
|
||||||
|
customDialogTwoButtons.dismiss()
|
||||||
|
customDialog.dismiss()
|
||||||
|
}.setKoButton("Cancelar"){
|
||||||
|
customDialog.dismiss()
|
||||||
|
customDialogTwoButtons.dismiss()
|
||||||
|
}.show()
|
||||||
|
|
||||||
|
}.setKoButton("Cancelar"){
|
||||||
|
customDialogTwoButtons.dismiss()
|
||||||
|
}.show()
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -4,27 +4,6 @@
|
||||||
android:height="108dp"
|
android:height="108dp"
|
||||||
android:viewportWidth="108"
|
android:viewportWidth="108"
|
||||||
android:viewportHeight="108">
|
android:viewportHeight="108">
|
||||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
<path android:fillColor="#ffffff" android:pathData="M8.55,12c-1.07,-0.71 -2.25,-1.27 -3.53,-1.61 1.28,0.34 2.46,0.9 3.53,1.61zM18.98,10.39c-1.29,0.34 -2.49,0.91 -3.57,1.64 1.08,-0.73 2.28,-1.3 3.57,-1.64z"/>
|
||||||
<aapt:attr name="android:fillColor">
|
<path android:fillColor="#ffffff" android:pathData="M15.49,9.63c-0.18,-2.79 -1.31,-5.51 -3.43,-7.63 -2.14,2.14 -3.32,4.86 -3.55,7.63 1.28,0.68 2.46,1.56 3.49,2.63 1.03,-1.06 2.21,-1.94 3.49,-2.63zM8.99,12.28c-0.14,-0.1 -0.3,-0.19 -0.45,-0.29 0.15,0.11 0.31,0.19 0.45,0.29zM15.41,12.03c-0.13,0.09 -0.27,0.16 -0.4,0.26 0.13,-0.1 0.27,-0.17 0.4,-0.26zM12,15.45C9.85,12.17 6.18,10 2,10c0,5.32 3.36,9.82 8.03,11.49 0.63,0.23 1.29,0.4 1.97,0.51 0.68,-0.12 1.33,-0.29 1.97,-0.51C18.64,19.82 22,15.32 22,10c-4.18,0 -7.85,2.17 -10,5.45z"/>
|
||||||
<gradient
|
|
||||||
android:endX="85.84757"
|
|
||||||
android:endY="92.4963"
|
|
||||||
android:startX="42.9492"
|
|
||||||
android:startY="49.59793"
|
|
||||||
android:type="linear">
|
|
||||||
<item
|
|
||||||
android:color="#44000000"
|
|
||||||
android:offset="0.0" />
|
|
||||||
<item
|
|
||||||
android:color="#00000000"
|
|
||||||
android:offset="1.0" />
|
|
||||||
</gradient>
|
|
||||||
</aapt:attr>
|
|
||||||
</path>
|
|
||||||
<path
|
|
||||||
android:fillColor="#FFFFFF"
|
|
||||||
android:fillType="nonZero"
|
|
||||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
|
||||||
android:strokeWidth="1"
|
|
||||||
android:strokeColor="#00000000" />
|
|
||||||
</vector>
|
</vector>
|
|
@ -5,166 +5,7 @@
|
||||||
android:viewportWidth="108"
|
android:viewportWidth="108"
|
||||||
android:viewportHeight="108">
|
android:viewportHeight="108">
|
||||||
<path
|
<path
|
||||||
android:fillColor="#3DDC84"
|
android:fillColor="#F7931E"
|
||||||
android:pathData="M0,0h108v108h-108z" />
|
android:pathData="M0,0h108v108h-108z" />
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M9,0L9,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,0L19,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M29,0L29,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M39,0L39,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M49,0L49,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M59,0L59,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M69,0L69,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M79,0L79,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M89,0L89,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M99,0L99,108"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,9L108,9"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,19L108,19"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,29L108,29"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,39L108,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,49L108,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,59L108,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,69L108,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,79L108,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,89L108,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M0,99L108,99"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,29L89,29"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,39L89,39"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,49L89,49"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,59L89,59"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,69L89,69"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M19,79L89,79"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M29,19L29,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M39,19L39,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M49,19L49,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M59,19L59,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M69,19L69,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
<path
|
|
||||||
android:fillColor="#00000000"
|
|
||||||
android:pathData="M79,19L79,89"
|
|
||||||
android:strokeWidth="0.8"
|
|
||||||
android:strokeColor="#33FFFFFF" />
|
|
||||||
</vector>
|
</vector>
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#607D8B" android:pathData="M8.55,12c-1.07,-0.71 -2.25,-1.27 -3.53,-1.61 1.28,0.34 2.46,0.9 3.53,1.61zM18.98,10.39c-1.29,0.34 -2.49,0.91 -3.57,1.64 1.08,-0.73 2.28,-1.3 3.57,-1.64z"/>
|
||||||
|
<path android:fillColor="#FF000000" android:pathData="M15.49,9.63c-0.18,-2.79 -1.31,-5.51 -3.43,-7.63 -2.14,2.14 -3.32,4.86 -3.55,7.63 1.28,0.68 2.46,1.56 3.49,2.63 1.03,-1.06 2.21,-1.94 3.49,-2.63zM8.99,12.28c-0.14,-0.1 -0.3,-0.19 -0.45,-0.29 0.15,0.11 0.31,0.19 0.45,0.29zM15.41,12.03c-0.13,0.09 -0.27,0.16 -0.4,0.26 0.13,-0.1 0.27,-0.17 0.4,-0.26zM12,15.45C9.85,12.17 6.18,10 2,10c0,5.32 3.36,9.82 8.03,11.49 0.63,0.23 1.29,0.4 1.97,0.51 0.68,-0.12 1.33,-0.29 1.97,-0.51C18.64,19.82 22,15.32 22,10c-4.18,0 -7.85,2.17 -10,5.45z"/>
|
||||||
|
</vector>
|
|
@ -0,0 +1,164 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<data>
|
||||||
|
|
||||||
|
<variable
|
||||||
|
name="viewModel"
|
||||||
|
type="es.verdnatura.presentation.view.feature.transferencia.fragment.TransferenciaViewModel" />
|
||||||
|
</data>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:layout_margin="@dimen/default_layout_margin"
|
||||||
|
android:paddingTop="@dimen/toolbar_height">
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView13"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Escanear etiqueta:"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editText7"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginRight="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/verdnatura_white"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="etiqueta"
|
||||||
|
android:inputType="number"
|
||||||
|
android:padding="8dp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/numEtiquetas"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:background="@color/verdnatura_white"
|
||||||
|
android:ems="10"
|
||||||
|
android:hint="cantidad"
|
||||||
|
android:inputType="number"
|
||||||
|
android:padding="8dp" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView19"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Carro de origen:"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editText10"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:background="@color/verdnatura_white"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:layout_marginBottom="10dp"
|
||||||
|
android:hint="carro de origen"/>
|
||||||
|
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/textView21"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Carro destino:"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="18sp" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/editText11"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:ems="10"
|
||||||
|
android:inputType="textPersonName"
|
||||||
|
android:background="@color/verdnatura_white"
|
||||||
|
android:padding="8dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:hint="carro destino"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
style="@style/DefaultButton"
|
||||||
|
android:id="@+id/button15"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="Transferir"
|
||||||
|
android:background="@drawable/btn_orange"
|
||||||
|
android:layout_marginTop="20dp"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:onClick="transferir"/>
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<include
|
||||||
|
android:id="@+id/main_toolbar"
|
||||||
|
layout="@layout/toolbar"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/splash_progress"
|
||||||
|
android:visibility="gone"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:background="@color/verdnatura_black_8_alpha_6"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
android:gravity="center">
|
||||||
|
|
||||||
|
<com.airbnb.lottie.LottieAnimationView
|
||||||
|
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/verdnatura_logo_large_height"
|
||||||
|
|
||||||
|
app:lottie_autoPlay="true"
|
||||||
|
app:lottie_loop="true"
|
||||||
|
app:lottie_rawRes="@raw/orange_loading"
|
||||||
|
app:lottie_speed="2" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</layout>
|
|
@ -12,7 +12,8 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
style="@style/LayoutClickable">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -170,7 +170,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||||
android:text="@{sale.originalQuantity}"
|
android:text="@{sale.quantity}"
|
||||||
tool:text="10"
|
tool:text="10"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/h6"
|
android:textSize="@dimen/h6"
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
style="@style/LayoutClickable">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/item_row_layout"
|
android:id="@+id/item_row_layout"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
style="@style/LayoutClickable">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -12,7 +12,8 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
style="@style/LayoutClickable">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/item_row_layout"
|
android:id="@+id/item_row_layout"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
|
|
|
@ -43,9 +43,11 @@
|
||||||
/>
|
/>
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
android:id="@+id/namelayout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical">
|
android:orientation="vertical"
|
||||||
|
style="@style/LayoutClickable">
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/itemfk_text"
|
android:id="@+id/itemfk_text"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 998 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 7.3 KiB After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 3.4 KiB |
After Width: | Height: | Size: 4.1 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 7.8 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#F7931E</color>
|
||||||
|
</resources>
|
|
@ -0,0 +1,154 @@
|
||||||
|
|
||||||
|
|
||||||
|
//AJUSTES ======================================================================================================>
|
||||||
|
|
||||||
|
@POST("almacennew/sector_get")
|
||||||
|
|
||||||
|
//PRESACADORES ================================================================================================>
|
||||||
|
|
||||||
|
@POST("almacennew/ticketToPrePrepare")
|
||||||
|
|
||||||
|
|
||||||
|
//SACADORES / CONTROLADORES ====================================================================================>
|
||||||
|
|
||||||
|
@POST("almacennew/collectionGet")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/collectionTicketGet")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/saleTrackingReplace")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemPlacementSupplyAiming")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemShelvingSaleSupplyAdd")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/collectionStickerPrint")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemGetAvailable")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/collectionAddItem")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/saleMove")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/collectionMissingTrash")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/saleTrackingDel")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/collectionUpdateState")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/barcodeToItem")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/collectionIncreaseQuantity")
|
||||||
|
|
||||||
|
|
||||||
|
//CONSULTAR ARTICULO ==========================================================================================>
|
||||||
|
@POST("almacennew/itemDiary")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/item_card")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemStockUpdate")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/item_placement_save")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/buy_updateGrouping")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/buy_updatePacking")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemSaveMin")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/barcodes_edit")
|
||||||
|
|
||||||
|
|
||||||
|
//BUSCAR ITEM ================================================================================================>
|
||||||
|
@POST("almacennew/getItemUbication")
|
||||||
|
|
||||||
|
|
||||||
|
//INVENTARIO ================================================================================================>
|
||||||
|
@POST("almacennew/itemShelvingRadar")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/faultsReview")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/faultsReview_isChecked")
|
||||||
|
|
||||||
|
|
||||||
|
//SHELVING PARKING ==========================================================================================>
|
||||||
|
@POST("almacennew/shelvingParking_get")
|
||||||
|
|
||||||
|
|
||||||
|
//UBICADOR ==================================================================================================>
|
||||||
|
@POST("almacennew/itemShelvingList")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemShelvingMake")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemShelvingMake_multi")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/shelvingPark")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/shelvingChange")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/clearShelvingList")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemShelvingTransfer")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/itemShelvingDelete")
|
||||||
|
|
||||||
|
|
||||||
|
//PALETIZADORES ==========================================================================================>
|
||||||
|
@POST("almacennew/expeditionTruckList")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionTruckAdd")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionPalletList")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionScanAdd")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionScanPut")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionPalletView")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionPalletDel")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionScanList")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionScanDel")
|
||||||
|
|
||||||
|
|
||||||
|
@POST("almacennew/expeditionPalletPrintSet")
|
||||||
|
|