vresion 23.26
This commit is contained in:
parent
75dc8e5656
commit
dccbb41ab1
|
@ -82,15 +82,20 @@
|
||||||
</select>
|
</select>
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="refs #5613 renew token">
|
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="refs #5891">
|
||||||
<change afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryParkingFragment.kt" afterDir="false" />
|
|
||||||
<change afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_inventory_parking.xml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/UICallbacks.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/common/UICallbacks.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/adapter/InventoryParkingAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/adapter/InventoryParkingAdapter.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryParkingFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryParkingFragment.kt" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryViewModel.kt" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/fragment/InventaryViewModel.kt" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/model/ItemInventaryVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/inventario/model/ItemInventaryVO.kt" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_inventory_parking.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_inventory_parking.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_inventory_parking_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_inventory_parking_row.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-fr/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-fr/strings.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-pt/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-pt/strings.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -101,7 +106,7 @@
|
||||||
<component name="CodeInsightWorkspaceSettings">
|
<component name="CodeInsightWorkspaceSettings">
|
||||||
<option name="optimizeImportsOnTheFly" value="true" />
|
<option name="optimizeImportsOnTheFly" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[21114523025303]" />
|
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[C:\Users\sergiodt\.android\avd\Pixel_6_API_30.avd]" />
|
||||||
<component name="ExportToHTMLSettings">
|
<component name="ExportToHTMLSettings">
|
||||||
<option name="OPEN_IN_BROWSER" value="true" />
|
<option name="OPEN_IN_BROWSER" value="true" />
|
||||||
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
|
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
|
||||||
|
@ -423,13 +428,6 @@
|
||||||
<option name="presentableId" value="Default" />
|
<option name="presentableId" value="Default" />
|
||||||
<updated>1618825571576</updated>
|
<updated>1618825571576</updated>
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00119" summary="EntrySalix">
|
|
||||||
<created>1679575710293</created>
|
|
||||||
<option name="number" value="00119" />
|
|
||||||
<option name="presentableId" value="LOCAL-00119" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1679575710293</updated>
|
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00120" summary="refs #4731 print">
|
<task id="LOCAL-00120" summary="refs #4731 print">
|
||||||
<created>1679905259957</created>
|
<created>1679905259957</created>
|
||||||
<option name="number" value="00120" />
|
<option name="number" value="00120" />
|
||||||
|
@ -766,7 +764,14 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1688103597825</updated>
|
<updated>1688103597825</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="168" />
|
<task id="LOCAL-00168" summary="refs #5891">
|
||||||
|
<created>1688360978709</created>
|
||||||
|
<option name="number" value="00168" />
|
||||||
|
<option name="presentableId" value="LOCAL-00168" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1688360978709</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="169" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="Vcs.Log.History.Properties">
|
<component name="Vcs.Log.History.Properties">
|
||||||
|
@ -867,7 +872,6 @@
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
||||||
<MESSAGE value="refs #4678 Carga/descarga" />
|
|
||||||
<MESSAGE value="refs #5675 fallo parking" />
|
<MESSAGE value="refs #5675 fallo parking" />
|
||||||
<MESSAGE value="refs #5618 traducciones" />
|
<MESSAGE value="refs #5618 traducciones" />
|
||||||
<MESSAGE value="refs #4940" />
|
<MESSAGE value="refs #4940" />
|
||||||
|
@ -892,7 +896,8 @@
|
||||||
<MESSAGE value="refs #4678" />
|
<MESSAGE value="refs #4678" />
|
||||||
<MESSAGE value="version 23.26 refs #4678" />
|
<MESSAGE value="version 23.26 refs #4678" />
|
||||||
<MESSAGE value="refs #5613 renew token" />
|
<MESSAGE value="refs #5613 renew token" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="refs #5613 renew token" />
|
<MESSAGE value="refs #5891" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="refs #5891" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
|
|
|
@ -8,6 +8,7 @@ import es.verdnatura.presentation.view.feature.articulo.model.ItemProposal
|
||||||
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
|
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||||
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking
|
||||||
import es.verdnatura.presentation.view.feature.login.model.WorkForms
|
import es.verdnatura.presentation.view.feature.login.model.WorkForms
|
||||||
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
||||||
|
@ -110,6 +111,10 @@ interface OnVisibleClickListener {
|
||||||
fun onVisibleClickListener(item: ItemUbicadorVO)
|
fun onVisibleClickListener(item: ItemUbicadorVO)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface OnVisibleInventoryClickListener {
|
||||||
|
fun onVisibleInventoryClickListener(item: ItemInventoryParking)
|
||||||
|
}
|
||||||
|
|
||||||
interface OnMoreClickListener {
|
interface OnMoreClickListener {
|
||||||
fun onMoreClickListener(item: ItemUbicadorVO)
|
fun onMoreClickListener(item: ItemUbicadorVO)
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,19 +9,19 @@ import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.ItemInventoryParkingRowBinding
|
import es.verdnatura.databinding.ItemInventoryParkingRowBinding
|
||||||
import es.verdnatura.presentation.common.OnMoreClickListener
|
import es.verdnatura.presentation.common.OnMoreClickListener
|
||||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
import es.verdnatura.presentation.common.OnVisibleClickListener
|
import es.verdnatura.presentation.common.OnVisibleInventoryClickListener
|
||||||
import es.verdnatura.presentation.common.loadUrl
|
import es.verdnatura.presentation.common.loadUrl
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.InventoryParking
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
|
|
||||||
class InventoryParkingAdapter(
|
class InventoryParkingAdapter(
|
||||||
private val items: List<InventoryParking>,
|
private var items: List<ItemInventoryParking>,
|
||||||
private val onPasillerosItemClickListener: OnPasillerosItemClickListener,
|
private val onPasillerosItemClickListener: OnPasillerosItemClickListener,
|
||||||
private val onVisibleClickListener: OnVisibleClickListener,
|
private val onVisibleInventoryClickListener: OnVisibleInventoryClickListener,
|
||||||
private val onMoreClickListener: OnMoreClickListener
|
private val onMoreClickListener: OnMoreClickListener
|
||||||
) : RecyclerView.Adapter<InventoryParkingAdapter.ItemHolder>() {
|
) : RecyclerView.Adapter<InventoryParkingAdapter.ItemHolder>() {
|
||||||
|
|
||||||
fun getList(): List<InventoryParking> {
|
fun getList(): List<ItemInventoryParking> {
|
||||||
return items
|
return items
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,32 @@ class InventoryParkingAdapter(
|
||||||
|
|
||||||
override fun getItemCount() = items.size
|
override fun getItemCount() = items.size
|
||||||
|
|
||||||
|
fun getListItems(): List<ItemInventoryParking> {
|
||||||
|
return items
|
||||||
|
}
|
||||||
|
|
||||||
|
fun sortBy(fieldSort: String) {
|
||||||
|
when (fieldSort) {
|
||||||
|
"sector" -> {
|
||||||
|
items = items.sortedBy { it.sectorFk }
|
||||||
|
}
|
||||||
|
|
||||||
|
"buyer" -> {
|
||||||
|
items = items.sortedBy { it.buyer }
|
||||||
|
}
|
||||||
|
|
||||||
|
"pickingOrder" -> {
|
||||||
|
items = items.sortedBy { it.pickingOrder }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setData(newData: List<ItemInventoryParking>) {
|
||||||
|
items = newData
|
||||||
|
notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||||
holder.bind(items[position])
|
holder.bind(items[position])
|
||||||
|
@ -49,7 +74,7 @@ class InventoryParkingAdapter(
|
||||||
private val res = binding.root.context.resources
|
private val res = binding.root.context.resources
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
fun bind(item: InventoryParking) {
|
fun bind(item: ItemInventoryParking) {
|
||||||
binding.apply {
|
binding.apply {
|
||||||
this.item = item
|
this.item = item
|
||||||
//multiText.text = "${item.stickers}x${item.packing}"
|
//multiText.text = "${item.stickers}x${item.packing}"
|
||||||
|
@ -68,6 +93,10 @@ class InventoryParkingAdapter(
|
||||||
// onVisibleClickListener.onVisibleClickListener(item)
|
// onVisibleClickListener.onVisibleClickListener(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
visibleText.setOnClickListener {
|
||||||
|
onVisibleInventoryClickListener.onVisibleInventoryClickListener(item)
|
||||||
|
}
|
||||||
|
|
||||||
if (item.visible == 0) {
|
if (item.visible == 0) {
|
||||||
visibleText.setTextColor(
|
visibleText.setTextColor(
|
||||||
ContextCompat.getColor(
|
ContextCompat.getColor(
|
||||||
|
|
|
@ -10,7 +10,6 @@ import android.view.View.GONE
|
||||||
import android.view.View.VISIBLE
|
import android.view.View.VISIBLE
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import android.widget.Toast
|
|
||||||
import androidx.annotation.RequiresApi
|
import androidx.annotation.RequiresApi
|
||||||
import androidx.lifecycle.Observer
|
import androidx.lifecycle.Observer
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
@ -21,10 +20,11 @@ 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.*
|
import es.verdnatura.presentation.view.component.*
|
||||||
|
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.InventoryParkingAdapter
|
import es.verdnatura.presentation.view.feature.inventario.adapter.InventoryParkingAdapter
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.InventoryParking
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking
|
||||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
|
||||||
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
import es.verdnatura.presentation.view.feature.ubicador.model.ItemUbicadorVO
|
||||||
|
|
||||||
|
|
||||||
|
@ -40,6 +40,7 @@ class InventaryParkingFragment(
|
||||||
private lateinit var customDialogUbicador: CustomDialogUbicador
|
private lateinit var customDialogUbicador: CustomDialogUbicador
|
||||||
private lateinit var customDialogTwoButtons: CustomDialogTwoButtons
|
private lateinit var customDialogTwoButtons: CustomDialogTwoButtons
|
||||||
private lateinit var customDialogThreeButtons: CustomDialogThreeButtons
|
private lateinit var customDialogThreeButtons: CustomDialogThreeButtons
|
||||||
|
private lateinit var customDialogList: CustomDialogList
|
||||||
private var listItems: MutableList<ItemUbicadorVO> = mutableListOf()
|
private var listItems: MutableList<ItemUbicadorVO> = mutableListOf()
|
||||||
private var listLocalItems: ArrayList<ItemUbicadorVO> = ArrayList()
|
private var listLocalItems: ArrayList<ItemUbicadorVO> = ArrayList()
|
||||||
private lateinit var customDialog: CustomDialog
|
private lateinit var customDialog: CustomDialog
|
||||||
|
@ -54,6 +55,9 @@ class InventaryParkingFragment(
|
||||||
var mperror: MediaPlayer? = null
|
var mperror: MediaPlayer? = null
|
||||||
var mpok: MediaPlayer? = null
|
var mpok: MediaPlayer? = null
|
||||||
var isBack = false
|
var isBack = false
|
||||||
|
private lateinit var myListInventory: MutableList<ItemInventoryParking>
|
||||||
|
private var listParkings: ArrayList<BarcodeVO> = ArrayList()
|
||||||
|
private var listWagonsAdapter: BarcodeAdapter? = null
|
||||||
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -79,13 +83,14 @@ class InventaryParkingFragment(
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
customDialogUbicador = CustomDialogUbicador(requireContext())
|
customDialogUbicador = CustomDialogUbicador(requireContext())
|
||||||
customDialogTwoButtons = CustomDialogTwoButtons(requireContext())
|
customDialogTwoButtons = CustomDialogTwoButtons(requireContext())
|
||||||
|
customDialogList = CustomDialogList(requireContext())
|
||||||
|
|
||||||
ma.hideBottomNavigation(GONE)
|
ma.hideBottomNavigation(GONE)
|
||||||
binding.mainToolbar.toolbarTitle.text = title
|
binding.mainToolbar.toolbarTitle.text = title
|
||||||
setEvents()
|
setEvents()
|
||||||
setToolBar()
|
setToolBar()
|
||||||
binding.splashProgress.visibility = VISIBLE
|
|
||||||
viewModel.inventoryParking("MAD-01", "CAM-01")
|
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,24 +104,30 @@ class InventaryParkingFragment(
|
||||||
private fun setToolBar() {
|
private fun setToolBar() {
|
||||||
|
|
||||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||||
|
|
||||||
val iconAdd = ImageView(context)
|
val iconAdd = ImageView(context)
|
||||||
iconAdd.setImageResource(R.drawable.ic_add_black_24dp)
|
iconAdd.setImageResource(R.drawable.ic_add_black_24dp)
|
||||||
|
|
||||||
val iconReload = ImageView(context)
|
val iconReload = ImageView(context)
|
||||||
iconReload.setImageResource(R.drawable.ic_autorenew_black_24dp)
|
iconReload.setImageResource(R.drawable.ic_autorenew_black_24dp)
|
||||||
//Tarea#5052
|
|
||||||
val iconReset = ImageView(context)
|
val iconReset = ImageView(context)
|
||||||
iconReset.setImageResource(R.drawable.ic_remove_checks)
|
iconReset.setImageResource(R.drawable.ic_remove_checks)
|
||||||
|
|
||||||
|
val iconParkingFrom = ImageView(context)
|
||||||
|
iconParkingFrom.setImageResource(R.drawable.ic_eye_ui)
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
iconParkingFrom.tooltipText = getTooltip(R.drawable.ic_eye_ui)
|
||||||
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
||||||
iconAdd.tooltipText = getString(R.string.addItemShelving)
|
iconAdd.tooltipText = getString(R.string.addItemShelving)
|
||||||
iconReset.tooltipText = getTooltip(R.drawable.ic_remove_checks)
|
iconReset.tooltipText = getTooltip(R.drawable.ic_remove_checks)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
listIcons.add(iconParkingFrom)
|
||||||
listIcons.add(iconAdd)
|
listIcons.add(iconAdd)
|
||||||
listIcons.add(iconReload)
|
listIcons.add(iconReload)
|
||||||
listIcons.add(iconReset)
|
//listIcons.add(iconReset)
|
||||||
|
|
||||||
|
|
||||||
binding.mainToolbar.toolbarIcons.adapter =
|
binding.mainToolbar.toolbarIcons.adapter =
|
||||||
|
@ -125,15 +136,11 @@ class InventaryParkingFragment(
|
||||||
|
|
||||||
when (item) {
|
when (item) {
|
||||||
iconAdd.drawable -> {
|
iconAdd.drawable -> {
|
||||||
// createListInventoryParking(list,"sector")
|
adapter!!.sortBy("sector")
|
||||||
}
|
}
|
||||||
|
|
||||||
iconReload.drawable -> {
|
iconReload.drawable -> {
|
||||||
//createListInventoryParking(list,"buyer")
|
adapter!!.sortBy("buyer")
|
||||||
}
|
|
||||||
|
|
||||||
iconReset.drawable -> {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iconReset.drawable -> {
|
iconReset.drawable -> {
|
||||||
|
@ -149,6 +156,11 @@ class InventaryParkingFragment(
|
||||||
.show()
|
.show()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iconParkingFrom.drawable -> {
|
||||||
|
setParkingFromTo()
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,6 +169,87 @@ class InventaryParkingFragment(
|
||||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun setParkingFromTo() {
|
||||||
|
|
||||||
|
customDialogList.setTitle("Indica parkings a revisar")
|
||||||
|
customDialogList.setDescription("Indica desde dónde hasta cual quieres revisar")
|
||||||
|
|
||||||
|
.setOkButton(
|
||||||
|
getString(R.string.review)
|
||||||
|
) {
|
||||||
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
|
||||||
|
if (listParkings.isNotEmpty() && listParkings.size == 2) {
|
||||||
|
binding.splashProgress.visibility = VISIBLE
|
||||||
|
viewModel.ItemListInventoryParking("MAD-01", "CAM-01")
|
||||||
|
listParkings.clear()
|
||||||
|
customDialog.dismiss()
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
customDialog
|
||||||
|
.setDescription("Indica el parking hasta donde quieres revisar")
|
||||||
|
.setOkButton(getString(R.string.accept)) {
|
||||||
|
customDialog.dismiss()
|
||||||
|
}.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
listParkings = ArrayList()
|
||||||
|
customDialogList.dismiss()
|
||||||
|
}.setValue("").show()
|
||||||
|
|
||||||
|
customDialogList.getEditText().requestFocus()
|
||||||
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
|
||||||
|
customDialogList.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
|
if (!customDialogList.getValue().isNullOrEmpty()) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
if (listParkings.size == 1) {
|
||||||
|
viewModel.ItemListInventoryParking(
|
||||||
|
listParkings!!.first()!!.code!!,
|
||||||
|
customDialogList.getValue()
|
||||||
|
)
|
||||||
|
listParkings.clear()
|
||||||
|
customDialogList.dismiss()
|
||||||
|
} else {
|
||||||
|
listParkings.add(0, BarcodeVO(code = customDialogList.getValue()))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} catch (e: Exception) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
listWagonsAdapter!!.notifyDataSetChanged()
|
||||||
|
}
|
||||||
|
customDialogList.setValue("")
|
||||||
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
return@setOnEditorActionListener true
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
listWagonsAdapter = BarcodeAdapter(
|
||||||
|
listParkings,
|
||||||
|
object : OnBarcodeRowClickListener {
|
||||||
|
override fun onBarcodeRowClickListener(item: BarcodeVO) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}, showDelete = false
|
||||||
|
)
|
||||||
|
customDialogList.getRecyclerView().adapter = listWagonsAdapter
|
||||||
|
|
||||||
|
customDialogList.getRecyclerView().layoutManager =
|
||||||
|
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
private fun setEvents() {
|
private fun setEvents() {
|
||||||
|
@ -170,16 +263,11 @@ class InventaryParkingFragment(
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
if (!binding.editMatricula.text.toString().isNullOrEmpty()) {
|
if (!binding.editMatricula.text.toString().isNullOrEmpty()) {
|
||||||
|
|
||||||
|
|
||||||
/*Tarea 5336 */
|
/*Tarea 5336 */
|
||||||
if (!modeCheckUbication || (modeCheckUbication && binding.editMatricula.text.toString().length == 3 && !binding.editMatricula.text!![0].isDigit())) {
|
if (binding.editMatricula.text.toString().length == 3 && !binding.editMatricula.text!![0].isDigit()) {
|
||||||
binding.mainToolbar.toolbarTitle.text =
|
binding.mainToolbar.toolbarTitle.text =
|
||||||
binding.editMatricula.text.toString()
|
binding.editMatricula.text.toString()
|
||||||
//shelvingFk = binding.editMatricula.text.toString()
|
|
||||||
parking = ""
|
|
||||||
binding.editPrioridad.setText("")
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
|
||||||
isShelvinLogfromMainScreen = true
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
@ -210,33 +298,8 @@ class InventaryParkingFragment(
|
||||||
return@setOnEditorActionListener false
|
return@setOnEditorActionListener false
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.editPrioridad.setOnEditorActionListener { v, actionId, event ->
|
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
|
||||||
if (!binding.editPrioridad.text.toString().isNullOrEmpty()) {
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
ma.hideKeyboard(binding.editPrioridad)
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.editMatricula.requestFocus()
|
|
||||||
return@setOnEditorActionListener false
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
binding.automaticImg.setOnClickListener {
|
|
||||||
if (!shelvingFk.isNullOrEmpty())
|
|
||||||
|
|
||||||
ma.onPasillerosItemClickListener(
|
|
||||||
PasillerosItemVO(title = getString(R.string.titleAuto)),
|
|
||||||
//PasillerosItemVO(title = getString(R.string.titleChecker)),
|
|
||||||
entryPoint = shelvingFk
|
|
||||||
)
|
|
||||||
else
|
|
||||||
getString(R.string.scanShelving).toast(requireActivity(), Toast.LENGTH_SHORT)
|
|
||||||
}
|
|
||||||
|
|
||||||
binding.parkingImg.setOnClickListener {
|
binding.parkingImg.setOnClickListener {
|
||||||
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("")
|
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("")
|
||||||
.setOkButton(
|
.setOkButton(
|
||||||
|
@ -379,8 +442,8 @@ class InventaryParkingFragment(
|
||||||
ma.messageWithSound(it.list[0].errorMessage, it.list[0].isError, false)
|
ma.messageWithSound(it.list[0].errorMessage, it.list[0].isError, false)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
myListInventory = it.list as MutableList<ItemInventoryParking>
|
||||||
createListInventoryParking(it.list)
|
createListInventoryParking(myListInventory)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -399,48 +462,20 @@ class InventaryParkingFragment(
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
/* loadResponseCode.observe(viewLifecycleOwner) { event ->
|
|
||||||
event.getContentIfNotHandled().notNull {
|
|
||||||
binding.splashProgress.visibility = GONE
|
|
||||||
if (it.isError) {
|
|
||||||
ma.messageWithSound(it.errorMessage, it.isError, false)
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (it.response != "0") {
|
|
||||||
checkUbications(it.response.toInt())
|
|
||||||
} else {
|
|
||||||
ma.messageWithSound(getString(R.string.labelNovalid), true, true)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun createListInventoryParking(list: List<InventoryParking>, sort:String?=null) {
|
private fun createListInventoryParking(list: List<ItemInventoryParking>, sort: String? = null) {
|
||||||
var sortedList: List<InventoryParking>
|
|
||||||
//TODO() -> Falta obtindre la llista per a ordenar-la
|
|
||||||
// binding.locationRecyclerview.adapter.get
|
|
||||||
when (sort){
|
|
||||||
"sector"->{ sortedList = list.sortedBy { it.sectorFk }}
|
|
||||||
"buyer"->{sortedList = list.sortedBy { it.sectorFk }}
|
|
||||||
else->{
|
|
||||||
sortedList = list.sortedBy { it.pickingOrder }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
adapter = InventoryParkingAdapter(
|
adapter = InventoryParkingAdapter(
|
||||||
sortedList,
|
myListInventory,
|
||||||
onPasillerosItemClickListener = pasillerosItemClickListener!!,
|
onPasillerosItemClickListener = pasillerosItemClickListener!!,
|
||||||
onVisibleClickListener = object : OnVisibleClickListener {
|
onVisibleInventoryClickListener = object : OnVisibleInventoryClickListener {
|
||||||
override fun onVisibleClickListener(item: ItemUbicadorVO) {
|
override fun onVisibleInventoryClickListener(item: ItemInventoryParking) {
|
||||||
|
changeQuantity(item)
|
||||||
showAutoSelfConsumption(item)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
onMoreClickListener = object : OnMoreClickListener {
|
onMoreClickListener = object : OnMoreClickListener {
|
||||||
override fun onMoreClickListener(item: ItemUbicadorVO) {
|
override fun onMoreClickListener(item: ItemUbicadorVO) {
|
||||||
|
@ -449,8 +484,9 @@ class InventaryParkingFragment(
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
binding.locationRecyclerview.adapter = adapter
|
|
||||||
binding.locationRecyclerview.layoutManager =
|
binding.inventoryParkingRecyclerview.adapter = adapter
|
||||||
|
binding.inventoryParkingRecyclerview.layoutManager =
|
||||||
LinearLayoutManager(
|
LinearLayoutManager(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
LinearLayoutManager.VERTICAL,
|
LinearLayoutManager.VERTICAL,
|
||||||
|
@ -459,22 +495,20 @@ class InventaryParkingFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun showAutoSelfConsumption(item: ItemUbicadorVO) {
|
private fun changeQuantity(item: ItemInventoryParking) {
|
||||||
|
|
||||||
customDialogInput.setInputText()
|
customDialogInput.setInputText()
|
||||||
customDialogInput.setTitle(getString(R.string.selfConsumption))
|
customDialogInput.setTitle(getString(R.string.quantity))
|
||||||
customDialogInput.setDescription(getString(R.string.quantityTake))
|
customDialogInput.setDescription(getString(R.string.quantityVisible))
|
||||||
.setValue("")
|
.setValue("")
|
||||||
.setOkButton(getString(R.string.take)) {
|
.setOkButton(getString(R.string.modify)) {
|
||||||
try {
|
try {
|
||||||
if (customDialogInput.getValue().toInt() > 0) {
|
if (customDialogInput.getValue().toInt() >= 0) {
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
var quantity =
|
|
||||||
if (item.visible.toInt() - customDialogInput.getValue().toInt() > 0) {
|
//viewModel.ChangeVisible
|
||||||
item.visible.toInt() - customDialogInput.getValue().toInt()
|
item.visible - customDialogInput.getValue().toInt()
|
||||||
} else {
|
|
||||||
0
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
throw Exception("")
|
throw Exception("")
|
||||||
|
@ -491,228 +525,6 @@ class InventaryParkingFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun showAddItem(
|
|
||||||
itemFk: String,
|
|
||||||
packing: String,
|
|
||||||
etiquetas: String,
|
|
||||||
visible: String,
|
|
||||||
delete: Boolean,
|
|
||||||
itemUbicador: ItemUbicadorVO,
|
|
||||||
grouping: String
|
|
||||||
) {
|
|
||||||
var title = getString(R.string.newItem)
|
|
||||||
if (delete) title = getString(R.string.editItem) + itemFk
|
|
||||||
customDialogUbicador.setTitle(title).setItemValue(itemFk).setPackingValue(packing)
|
|
||||||
.setGroupingValue(grouping).setEtiquetaValue(etiquetas).setVisibleValue(visible)
|
|
||||||
.setOkButton(getString(R.string.save)) {
|
|
||||||
var packingUpdate = false
|
|
||||||
if (packing != customDialogUbicador.getPackingValue() || etiquetas != customDialogUbicador.getEtiquetaValue()) {
|
|
||||||
packingUpdate = true
|
|
||||||
}
|
|
||||||
saveNewItem(
|
|
||||||
customDialogUbicador.getItemValue().toInt(),
|
|
||||||
if (customDialogUbicador.getEtiquetaValue().isNullOrEmpty()) {
|
|
||||||
1
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getEtiquetaValue().toInt()
|
|
||||||
},
|
|
||||||
if (customDialogUbicador.getPackingValue().isNullOrEmpty()) {
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getPackingValue().toInt()
|
|
||||||
},
|
|
||||||
if (customDialogUbicador.getVisibleValue().isNullOrEmpty()) {
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getVisibleValue().toInt()
|
|
||||||
},
|
|
||||||
if (delete) packingUpdate else null,
|
|
||||||
itemUbicador.id,
|
|
||||||
if (customDialogUbicador.getGroupingValue().isNullOrEmpty()) {
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getGroupingValue().toInt()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}.setKoButton(getString(R.string.close)) {
|
|
||||||
customDialogUbicador.dismiss()
|
|
||||||
}.show()
|
|
||||||
|
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
|
||||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
|
||||||
|
|
||||||
customDialogUbicador.getVisibleItem().setOnEditorActionListener { v, actionId, event ->
|
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
|
||||||
var packingUpdate = false
|
|
||||||
if (packing != customDialogUbicador.getPackingValue() || etiquetas != customDialogUbicador.getEtiquetaValue()) {
|
|
||||||
packingUpdate = true
|
|
||||||
}
|
|
||||||
saveNewItem(
|
|
||||||
customDialogUbicador.getItemValue().toInt(),
|
|
||||||
customDialogUbicador.getEtiquetaValue().toInt(),
|
|
||||||
if (customDialogUbicador.getPackingValue().isNullOrEmpty()) {
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getPackingValue().toInt()
|
|
||||||
},
|
|
||||||
if (customDialogUbicador.getVisibleValue().isNullOrEmpty()) {
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getVisibleValue().toInt()
|
|
||||||
},
|
|
||||||
if (delete) packingUpdate else null,
|
|
||||||
itemUbicador.id,
|
|
||||||
customDialogUbicador.getGroupingValue().toInt()
|
|
||||||
)
|
|
||||||
return@setOnEditorActionListener true
|
|
||||||
}
|
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
customDialogUbicador.getEditItem().setOnEditorActionListener { v, actionId, event ->
|
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
|
||||||
|
|
||||||
if (!customDialogUbicador.getItemValue().isNullOrEmpty()) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
customDialogUbicador.setItemValue(
|
|
||||||
itemScanValue(
|
|
||||||
customDialogUbicador.getItemValue(),
|
|
||||||
"buy",
|
|
||||||
"more"
|
|
||||||
).toString()
|
|
||||||
)
|
|
||||||
|
|
||||||
} catch (ex: Exception) {
|
|
||||||
ma.messageWithSound(ex.message.toString(), true, true)
|
|
||||||
customDialogUbicador.setItemValue("")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return@setOnEditorActionListener true
|
|
||||||
}
|
|
||||||
|
|
||||||
customDialogUbicador.getPackingItem().requestFocus()
|
|
||||||
}
|
|
||||||
|
|
||||||
customDialogUbicador.getEtiquetaItem().setOnEditorActionListener { v, actionId, event ->
|
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
|
||||||
var packingUpdate = false
|
|
||||||
if (packing != customDialogUbicador.getPackingValue() || etiquetas != customDialogUbicador.getEtiquetaValue()) {
|
|
||||||
packingUpdate = true
|
|
||||||
}
|
|
||||||
saveNewItem(
|
|
||||||
customDialogUbicador.getItemValue().toInt(),
|
|
||||||
customDialogUbicador.getEtiquetaValue().toInt(),
|
|
||||||
if (customDialogUbicador.getPackingValue().isNullOrEmpty()) {
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getPackingValue().toInt()
|
|
||||||
},
|
|
||||||
if (customDialogUbicador.getVisibleValue().isNullOrEmpty()) {
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getVisibleValue().toInt()
|
|
||||||
},
|
|
||||||
if (delete) packingUpdate else null,
|
|
||||||
itemUbicador.id,
|
|
||||||
if (customDialogUbicador.getGroupingValue().isNullOrEmpty()) {
|
|
||||||
null
|
|
||||||
} else {
|
|
||||||
customDialogUbicador.getGroupingValue().toInt()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
return@setOnEditorActionListener true
|
|
||||||
}
|
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun saveNewItem(
|
|
||||||
itemFk: Int?,
|
|
||||||
etiquetas: Int,
|
|
||||||
packing: Int?,
|
|
||||||
visible: Int?,
|
|
||||||
updatePacking: Boolean? = null,
|
|
||||||
itemShelvingFk: Int,
|
|
||||||
groupingPack: Int?
|
|
||||||
) {
|
|
||||||
if (packing != null) {
|
|
||||||
if (updatePacking == null) {
|
|
||||||
if (itemFk != null && visible != null) {
|
|
||||||
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
|
||||||
|
|
||||||
|
|
||||||
customDialogUbicador.setItemValue("").setPackingValue("")
|
|
||||||
.setGroupingValue("")
|
|
||||||
.setEtiquetaValue("").setVisibleValue("")
|
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
|
||||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
|
||||||
customDialogUbicador.dismiss()
|
|
||||||
|
|
||||||
} else if (itemFk != null && etiquetas != null) {
|
|
||||||
val visible_calc = (etiquetas * packing!!.toInt())
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
|
||||||
|
|
||||||
|
|
||||||
customDialogUbicador.setItemValue("").setPackingValue("")
|
|
||||||
.setGroupingValue("")
|
|
||||||
.setEtiquetaValue("").setVisibleValue("")
|
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
|
||||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
|
||||||
customDialogUbicador.dismiss()
|
|
||||||
|
|
||||||
} else {
|
|
||||||
getString(R.string.fillFields).toast(
|
|
||||||
(activity as MainActivity),
|
|
||||||
Toast.LENGTH_LONG
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (itemFk != null && visible != null && !updatePacking) {
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
|
||||||
|
|
||||||
|
|
||||||
customDialogUbicador.setItemValue("").setPackingValue("")
|
|
||||||
.setGroupingValue("")
|
|
||||||
.setEtiquetaValue("").setVisibleValue("")
|
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
|
||||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
|
||||||
customDialogUbicador.dismiss()
|
|
||||||
|
|
||||||
} else if (itemFk != null && etiquetas != null && updatePacking) {
|
|
||||||
var visible_calc = 0
|
|
||||||
try {
|
|
||||||
visible_calc = (etiquetas * packing.toInt())
|
|
||||||
} catch (e: Exception) {
|
|
||||||
}
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
|
||||||
|
|
||||||
customDialogUbicador.setItemValue("").setPackingValue("")
|
|
||||||
.setGroupingValue("")
|
|
||||||
.setEtiquetaValue("").setVisibleValue("")
|
|
||||||
customDialogUbicador.getEditItem().requestFocus()
|
|
||||||
ma.hideKeyboard(customDialogUbicador.getEditItem())
|
|
||||||
customDialogUbicador.dismiss()
|
|
||||||
|
|
||||||
} else {
|
|
||||||
getString(R.string.fillFields).toast(
|
|
||||||
(activity as MainActivity),
|
|
||||||
Toast.LENGTH_LONG
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
getString(R.string.mandatoryPacking).toast(
|
|
||||||
(activity as MainActivity),
|
|
||||||
Toast.LENGTH_LONG
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun showMoreOptions(item: ItemUbicadorVO) {
|
private fun showMoreOptions(item: ItemUbicadorVO) {
|
||||||
customDialogTwoButtons.setTitle(item.item.toString())
|
customDialogTwoButtons.setTitle(item.item.toString())
|
||||||
.setDescription(getString(R.string.selectAction))
|
.setDescription(getString(R.string.selectAction))
|
||||||
|
|
|
@ -13,8 +13,8 @@ import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.calidad.model.BuyerListVO
|
import es.verdnatura.presentation.view.feature.calidad.model.BuyerListVO
|
||||||
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
|
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.InventaryListVO
|
import es.verdnatura.presentation.view.feature.inventario.model.InventaryListVO
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.InventoryParking
|
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.InventoryParkingList
|
import es.verdnatura.presentation.view.feature.inventario.model.InventoryParkingList
|
||||||
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.model.*
|
import es.verdnatura.presentation.view.feature.workermistake.model.*
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
|
@ -371,46 +371,46 @@ class InventaryViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun inventoryParking(
|
fun ItemListInventoryParking(
|
||||||
vParkingFrom: String,
|
vParkingFrom: String,
|
||||||
vParkingTo: String
|
vParkingTo: String
|
||||||
) {
|
) {
|
||||||
|
|
||||||
var myList = InventoryParkingList(
|
var myList = InventoryParkingList(
|
||||||
listOf(
|
listOf(
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
31, "F-01-1", "OZR", 19897, "Dendrobium Galaxy", 510, 37, "Jose Alarcan Gomex",
|
31, vParkingFrom, vParkingTo, 19897, "Dendrobium Galaxy", 510, 37, "Jose Alarcan Gomex",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/dgalaxy", 0, 2
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/dgalaxy", 0, 2
|
||||||
),
|
),
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
31, "F-01-1", "OZR", 92400, "Cymbidium Avalanche", 14, 37, "Sergio de la Torre Nebot",
|
31, "F-01-1", "OZR", 92400, "Cymbidium Avalanche", 14, 37, "Sergio de la Torre Nebot",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/92400", 0, 2
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/92400", 1, 2
|
||||||
),
|
),
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
31, "F-01-1", "OZR", 92400, "Cymbidium Avalanche", 2, 37, "Jose Alarcan Gomex",
|
31, "F-01-1", "OZR", 92400, "Cymbidium Avalanche", 2, 37, "Jose Alarcan Gomex",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/92400", 0, 2
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/92400", 0, 2
|
||||||
),
|
),
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
32, "F-01-2", "PLY", 19897, "Dendrobium Galaxy", 520, 37, "Jose Alarcan Gomex",
|
32, "F-01-2", "PLY", 19897, "Dendrobium Galaxy", 520, 37, "Jose Alarcan Gomex",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/dgalaxy", 0, 2
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/dgalaxy", 0, 2
|
||||||
),
|
),
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
33, "F-01-3", "ZLZ", 2912, "HEL Tropical Red", 2, 37, "Jose Alarcan Gomex",
|
33, "F-01-3", "ZLZ", 2912, "HEL Tropical Red", 2, 37, "Jose Alarcan Gomex",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/002912", 0, 0
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/002912", 0, 0
|
||||||
),
|
),
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
34, "F-01-4", "JXU", 25942, "HEL BQ Amor (x bouquet)", 0, 37, "Jose Alarcan Gomex",
|
34, "F-01-4", "JXU", 25942, "HEL BQ Amor (x bouquet)", 0, 37, "Jose Alarcan Gomex",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/bqamor", 0, 0
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/bqamor", 2, 0
|
||||||
),
|
),
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
34, "F-01-4", "MUU", 25942, "HEL BQ Amor (x bouquet)", 5, 37, "Jose Alarcan Gomex",
|
34, "F-01-4", "MUU", 25942, "HEL BQ Amor (x bouquet)", 5, 37, "Jose Alarcan Gomex",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/bqamor", 0, 0
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/bqamor", 0, 0
|
||||||
),
|
),
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
34, "F-01-4", "JXU", 50001, "Monstera I", 130, 37, "Jose Alarcan Gomex",
|
34, "F-01-4", "JXU", 50001, "Monstera I", 130, 37, "Jose Alarcan Gomex",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/50001", 0, 2
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/50001", 0, 2
|
||||||
),
|
),
|
||||||
InventoryParking(
|
ItemInventoryParking(
|
||||||
34, "F-01-4", "JXU", 50004, "Monstera IV", 240, 37, "Jose Alarcan Gomex",
|
34, "F-01-4", "JXU", 50004, "Monstera IV", 240, 37, "Jose Alarcan Gomex",
|
||||||
"http://verdnatura.es/vn-image-data/catalog/1600x900/50003", 0, 2
|
"http://verdnatura.es/vn-image-data/catalog/1600x900/50003", 0, 2
|
||||||
)
|
)
|
||||||
|
|
|
@ -19,7 +19,7 @@ class InventaryListVO(
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
data class InventoryParking(
|
data class ItemInventoryParking(
|
||||||
val pickingOrder: Int,
|
val pickingOrder: Int,
|
||||||
val parking: String,
|
val parking: String,
|
||||||
val shelvingFk: String,
|
val shelvingFk: String,
|
||||||
|
@ -35,6 +35,6 @@ data class InventoryParking(
|
||||||
var errorMessage: String = "",
|
var errorMessage: String = "",
|
||||||
)
|
)
|
||||||
class InventoryParkingList(
|
class InventoryParkingList(
|
||||||
var list: List<InventoryParking> = listOf()
|
var list: List<ItemInventoryParking> = listOf()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -170,7 +170,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
//Tarea 5891
|
//Tarea 5891
|
||||||
/* _pasillerositem.add(
|
_pasillerositem.add(
|
||||||
PasillerosItemVO(
|
PasillerosItemVO(
|
||||||
3,
|
3,
|
||||||
R.drawable.ic_inventory_parking,
|
R.drawable.ic_inventory_parking,
|
||||||
|
@ -180,7 +180,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
||||||
R.string.titleInventoryParkingDescrip
|
R.string.titleInventoryParkingDescrip
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)*/
|
)
|
||||||
|
|
||||||
_pasillerositem.add(
|
_pasillerositem.add(
|
||||||
PasillerosItemVO(
|
PasillerosItemVO(
|
||||||
|
|
|
@ -95,7 +95,7 @@
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/location_recyclerview"
|
android:id="@+id/inventory_parking_recyclerview"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:clipToPadding="false"
|
android:clipToPadding="false"
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
<variable
|
<variable
|
||||||
name="item"
|
name="item"
|
||||||
type="es.verdnatura.presentation.view.feature.inventario.model.InventoryParking" />
|
type="es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking" />
|
||||||
</data>
|
</data>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
|
|
@ -602,5 +602,6 @@
|
||||||
<string name="errorConfigToken">Póngase en contacto con el dpto. de Informática</string>
|
<string name="errorConfigToken">Póngase en contacto con el dpto. de Informática</string>
|
||||||
<string name="titleInventoryParking">Inventario por parking</string>
|
<string name="titleInventoryParking">Inventario por parking</string>
|
||||||
<string name="titleInventoryParkingDescrip">Permite inventariar por parking</string>
|
<string name="titleInventoryParkingDescrip">Permite inventariar por parking</string>
|
||||||
|
<string name="quantityVisible">Indica la nueva cantidad visible</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -602,5 +602,6 @@
|
||||||
<string name="errorConfigToken">Póngase en contacto con el dpto. de Informática</string>
|
<string name="errorConfigToken">Póngase en contacto con el dpto. de Informática</string>
|
||||||
<string name="titleInventoryParking">Inventario por parking</string>
|
<string name="titleInventoryParking">Inventario por parking</string>
|
||||||
<string name="titleInventoryParkingDescrip">Permite inventariar por parking</string>
|
<string name="titleInventoryParkingDescrip">Permite inventariar por parking</string>
|
||||||
|
<string name="quantityVisible">Indica la nueva cantidad visible</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -602,5 +602,6 @@
|
||||||
<string name="errorConfigToken">Póngase en contacto con el dpto. de Informática</string>
|
<string name="errorConfigToken">Póngase en contacto con el dpto. de Informática</string>
|
||||||
<string name="titleInventoryParking">Inventario por parking</string>
|
<string name="titleInventoryParking">Inventario por parking</string>
|
||||||
<string name="titleInventoryParkingDescrip">Permite inventariar por parking</string>
|
<string name="titleInventoryParkingDescrip">Permite inventariar por parking</string>
|
||||||
|
<string name="quantityVisible">Indica la nueva cantidad visible</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -601,4 +601,5 @@
|
||||||
<string name="errorConfigToken">Póngase en contacto con el dpto. de Informática</string>
|
<string name="errorConfigToken">Póngase en contacto con el dpto. de Informática</string>
|
||||||
<string name="titleInventoryParking">Inventory by parking</string>
|
<string name="titleInventoryParking">Inventory by parking</string>
|
||||||
<string name="titleInventoryParkingDescrip">Inventory by parking, you can select ubications</string>
|
<string name="titleInventoryParkingDescrip">Inventory by parking, you can select ubications</string>
|
||||||
|
<string name="quantityVisible">Indica la nueva cantidad visible</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue