feat reservas #refs 6861
This commit is contained in:
parent
0ece5eb7a4
commit
962ba75bfa
|
@ -12,6 +12,7 @@ object ConstAndValues {
|
|||
const val SERIALNUMBER = "SERIALNUMBER"
|
||||
const val ON_CHECKING = "ON_CHECKING"
|
||||
const val PRECHECKER = "PRECHECKER"
|
||||
const val PRECHECKERNEW = "PRECHECKERNEW"
|
||||
const val MAINACTIVITY = "MAIN"
|
||||
const val VERTICKET = "SHOWTICKET"
|
||||
const val SECTORFKDEFAULT = -1
|
||||
|
|
|
@ -1000,11 +1000,13 @@ class CollectionFragmentPickerNew(
|
|||
) {
|
||||
getString(R.string.Todosloscampossonobligatorios).toast(requireContext())
|
||||
} else {
|
||||
|
||||
viewModel.collectionAddWithReservation(
|
||||
customDialogList.getValue().toInt(),
|
||||
customDialogList.getValueTwo().toInt(),
|
||||
ticketSelected,
|
||||
saleGroupFk = null
|
||||
saleGroupFk = null,
|
||||
sectorFk = null
|
||||
)
|
||||
|
||||
customDialogList.dismiss()
|
||||
|
|
|
@ -21,6 +21,7 @@ import es.verdnatura.databinding.FragmentCollectionNewBinding
|
|||
import es.verdnatura.domain.ConstAndValues.BASEURLSALIX
|
||||
import es.verdnatura.domain.ConstAndValues.PRINTERNAME
|
||||
import es.verdnatura.domain.ConstAndValues.SACADOR
|
||||
import es.verdnatura.domain.ConstAndValues.SECTORFK
|
||||
import es.verdnatura.domain.notNull
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
|
@ -51,6 +52,7 @@ import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
|||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.Sale
|
||||
import es.verdnatura.presentation.view.feature.sacador.model.SaleVO
|
||||
import kotlinx.coroutines.runBlocking
|
||||
import org.json.JSONObject
|
||||
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
|
@ -216,7 +218,7 @@ class CollectionFragmentPickerPreviousNew(
|
|||
)
|
||||
}
|
||||
|
||||
private fun markPrevia(saleGroupScanned: String): Boolean {
|
||||
/* private fun markPrevia(saleGroupScanned: String): Boolean {
|
||||
println("Sacador saleGroup $saleGroupScanned ")
|
||||
try {
|
||||
for (indice in sales.indices) {
|
||||
|
@ -234,7 +236,7 @@ class CollectionFragmentPickerPreviousNew(
|
|||
return false
|
||||
}
|
||||
return false
|
||||
}
|
||||
}*/
|
||||
|
||||
private fun scanRequest() {
|
||||
binding.scanInput.requestFocus()
|
||||
|
@ -407,16 +409,17 @@ class CollectionFragmentPickerPreviousNew(
|
|||
it.errorMessage, isError = true, true
|
||||
)
|
||||
setTotalLines()
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
myGroupList[positionConfirm].isPicked = 1
|
||||
saleAdapter!!.notifyItemChanged(positionConfirm)
|
||||
lm!!.scrollToPositionWithOffset(storedBackPosition + 1, 0)
|
||||
//lolass
|
||||
lm!!.scrollToPositionWithOffset(storedBackPosition, 0)
|
||||
// lm!!.scrollToPositionWithOffset(storedBackPosition + 1, 0)
|
||||
|
||||
setTotalLines()
|
||||
viewModel.collectionTicketGetSalix(
|
||||
collection.collectionFk, print = false
|
||||
)
|
||||
collection.collectionFk, print = false
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -438,16 +441,17 @@ class CollectionFragmentPickerPreviousNew(
|
|||
loadUnpicked.observe(viewLifecycleOwner) { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
|
||||
myGroupList[positionUnmarked].isPicked = 1
|
||||
myGroupList[positionUnmarked].reservedQuantity = quantityConfirm
|
||||
viewModel.collectionTicketGetSalix(
|
||||
collection.collectionFk, print = false
|
||||
)
|
||||
lm!!.scrollToPositionWithOffset(positionUnmarked, 0)
|
||||
//saleAdapter!!.notifyDataSetChanged()
|
||||
ma.messageWithSound(
|
||||
"Confirmada acción", it.isError, !it.isError
|
||||
)}
|
||||
myGroupList[positionUnmarked].isPicked = 1
|
||||
myGroupList[positionUnmarked].reservedQuantity = quantityConfirm
|
||||
viewModel.collectionTicketGetSalix(
|
||||
collection.collectionFk, print = false
|
||||
)
|
||||
lm!!.scrollToPositionWithOffset(positionUnmarked, 0)
|
||||
//saleAdapter!!.notifyDataSetChanged()
|
||||
ma.messageWithSound(
|
||||
"Confirmada acción", it.isError, !it.isError
|
||||
)
|
||||
}
|
||||
}
|
||||
responseItemShelvingSaleGroup.observe(viewLifecycleOwner) {
|
||||
|
||||
|
@ -472,7 +476,7 @@ class CollectionFragmentPickerPreviousNew(
|
|||
scanRequest()
|
||||
customDialogList.dismiss()
|
||||
mpok?.start()
|
||||
markLine(storedPosition, quantityReserveToCheckItemScan, null)
|
||||
markLine(storedPosition, quantityReserveToCheckItemScan, false)
|
||||
} else {
|
||||
customDialogList.setValueTwo("")
|
||||
showErrorMessage(text = getString(R.string.lineNotExist))
|
||||
|
@ -702,9 +706,12 @@ class CollectionFragmentPickerPreviousNew(
|
|||
quantityConfirm = quantity
|
||||
isMarking = true
|
||||
|
||||
viewModel.itemShelvingSaleSetQuantity(
|
||||
myGroupList[position].itemShelvingSaleFk, quantity, isItemShelvingSaleEmpty
|
||||
)
|
||||
runBlocking {
|
||||
var sectorFk = mobileApplication.dataStoreApp.readDataStoreKey<Int>(SECTORFK)
|
||||
viewModel.itemShelvingSaleSetQuantity(
|
||||
myGroupList[position].itemShelvingSaleFk, quantity, isItemShelvingSaleEmpty = isItemShelvingSaleEmpty, sectorFk = if (sectorFk == -1) null else sectorFk
|
||||
)
|
||||
}
|
||||
storedBackPosition = position/* var mySale = myGroupList[position].itemShelvingSaleFk
|
||||
for (indice in myGroupList.indices) {
|
||||
if (!myGroupList[indice].isParent && myGroupList[indice].itemShelvingSaleFk == mySale) {
|
||||
|
@ -850,26 +857,31 @@ class CollectionFragmentPickerPreviousNew(
|
|||
getString(R.string.quantityHigh).toast(requireContext())
|
||||
}
|
||||
if (quantityToReserve == totalReserved) {
|
||||
originalItemScan = customDialogList.getValueTwo().toLong()
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
try {
|
||||
originalItemScan = customDialogList.getValueTwo().toLong()
|
||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||
|
||||
markLine(storedPosition, quantityToReserve, null)
|
||||
markLine(storedPosition, quantityToReserve, false)
|
||||
|
||||
mpok?.start()
|
||||
ma.hideKeyboard(customDialogList.getEditTextTwo())
|
||||
customDialogList.dismiss()
|
||||
scanRequest()
|
||||
mpok?.start()
|
||||
ma.hideKeyboard(customDialogList.getEditTextTwo())
|
||||
customDialogList.dismiss()
|
||||
scanRequest()
|
||||
|
||||
} else {
|
||||
} else {
|
||||
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
itemShelvingFkStored = itemShelvingFk
|
||||
|
||||
quantityReserveToCheckItemScan = quantityToReserve
|
||||
viewModel.getIdFromCodeSalix(
|
||||
code = customDialogList.getValueTwo(),
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
quantityReserveToCheckItemScan = quantityToReserve
|
||||
viewModel.getIdFromCodeSalix(
|
||||
code = customDialogList.getValueTwo(),
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
} catch (ex: Exception) {
|
||||
getString(R.string.errorInput).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -1030,13 +1042,15 @@ class CollectionFragmentPickerPreviousNew(
|
|||
collection.tickets.find { it.ticketFk == ticketSelected }?.sales?.get(0)?.saleGroupFk
|
||||
?: 0
|
||||
|
||||
viewModel.collectionAddWithReservation(
|
||||
customDialogList.getValue().toInt(),
|
||||
customDialogList.getValueTwo().toInt(),
|
||||
ticketSelected,
|
||||
saleGroupFk = saleGroupSelected
|
||||
)
|
||||
|
||||
runBlocking {
|
||||
viewModel.collectionAddWithReservation(
|
||||
customDialogList.getValue().toInt(),
|
||||
customDialogList.getValueTwo().toInt(),
|
||||
ticketSelected,
|
||||
saleGroupFk = saleGroupSelected,
|
||||
sectorFk = mobileApplication.dataStoreApp.readDataStoreKey<Int>(SECTORFK)
|
||||
)
|
||||
}
|
||||
customDialogList.dismiss()
|
||||
hideKeyboards()
|
||||
scanRequest()
|
||||
|
|
|
@ -28,6 +28,7 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import com.google.gson.Gson
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentCollectionBinding
|
||||
import es.verdnatura.domain.ConstAndValues
|
||||
import es.verdnatura.domain.ConstAndValues.CONTROLADOR
|
||||
import es.verdnatura.domain.ConstAndValues.OK
|
||||
import es.verdnatura.domain.ConstAndValues.PRECHECKER
|
||||
|
@ -994,10 +995,24 @@ class CollectionFragmentPreChecker(
|
|||
|
||||
if (type == CONTROLADOR || type == PRECHECKER) {
|
||||
|
||||
|
||||
|
||||
if (salesList.filter { it.sectorFk != null && it.sectorFk!! > 0 }.isNotEmpty()) {
|
||||
sales = salesList.filter {
|
||||
it.sectorFk == mobileApplication.dataStoreApp.readDataStoreKey<Int>(SECTORFK)
|
||||
}.sortedWith(compareBy({ it.picked }))
|
||||
|
||||
val isOnReservationMode = mobileApplication.dataStoreApp.readDataStoreKey<Boolean>(
|
||||
ConstAndValues.RESERVATIONMODE
|
||||
)
|
||||
//lolass
|
||||
if (isOnReservationMode){
|
||||
|
||||
sales = salesList.filter {
|
||||
it.sectorFk == mobileApplication.dataStoreApp.readDataStoreKey<Int>(SECTORFK)
|
||||
}.sortedWith(compareBy({ it.saleOrder }))
|
||||
}else {
|
||||
sales = salesList.filter {
|
||||
it.sectorFk == mobileApplication.dataStoreApp.readDataStoreKey<Int>(SECTORFK)
|
||||
}.sortedWith(compareBy({ it.picked }))
|
||||
}
|
||||
} else {
|
||||
sales = salesList.sortedWith(compareBy({ it.picked }))
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -414,10 +414,13 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun itemShelvingSaleSetQuantity(
|
||||
itemShelvingSaleFk: Int, quantity: Int, isItemShelvingSaleEmpty: Boolean?
|
||||
itemShelvingSaleFk: Int,
|
||||
quantity: Int,
|
||||
isItemShelvingSaleEmpty: Boolean?,
|
||||
sectorFk: Int? = null
|
||||
) {
|
||||
salix.itemShelvingSaleSetquantitySalix(
|
||||
params = arrayListOf(itemShelvingSaleFk, quantity, isItemShelvingSaleEmpty)
|
||||
params = arrayListOf(itemShelvingSaleFk, quantity, isItemShelvingSaleEmpty, sectorFk)
|
||||
//salix.itemShelvingSaleSetQuantity(
|
||||
// params = ItemShelvingSaleSalix(itemShelvingSaleFk, quantity, isItemShelvingSaleEmpty)
|
||||
).enqueue(object : SalixCallback<Any>(context) {
|
||||
|
@ -445,10 +448,12 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun collectionAddWithReservation(
|
||||
item: Int, quantity: Int, ticketSelected: Int, saleGroupFk: Int?
|
||||
item: Int, quantity: Int, ticketSelected: Int, saleGroupFk: Int?, sectorFk: Int?
|
||||
) {
|
||||
salix.collectionAddWithReservation(
|
||||
params = arrayListOf(item, quantity, ticketSelected, saleGroupFk)
|
||||
params = arrayListOf(
|
||||
item, quantity, ticketSelected, saleGroupFk, if (sectorFk == -1) null else sectorFk
|
||||
)
|
||||
).enqueue(object : SalixCallback<Any>(context) {
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
_responseCollectionAddItem.value = ResponseItemVO(isError = false, response = "")
|
||||
|
|
|
@ -21,6 +21,7 @@ import es.verdnatura.R
|
|||
import es.verdnatura.databinding.ActivityMainBinding
|
||||
import es.verdnatura.domain.ConstAndValues.MAINACTIVITY
|
||||
import es.verdnatura.domain.ConstAndValues.MENUBYDEFAULTSELECTED
|
||||
import es.verdnatura.domain.ConstAndValues.PRECHECKERNEW
|
||||
import es.verdnatura.domain.ConstAndValues.PREITEMPICKER
|
||||
import es.verdnatura.domain.ConstAndValues.PRINTERFK
|
||||
import es.verdnatura.domain.ConstAndValues.PRINTERFKDEFAULT
|
||||
|
@ -64,6 +65,7 @@ import es.verdnatura.presentation.view.feature.collection.fragment.CollectionFra
|
|||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionFragmentPickerNew
|
||||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionFragmentPickerPreviousNew
|
||||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionFragmentPreChecker
|
||||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionFragmentPreCheckerNew
|
||||
import es.verdnatura.presentation.view.feature.collection.fragment.CollectionShowTicketFragment
|
||||
import es.verdnatura.presentation.view.feature.controlador.fragment.ControladorFragment
|
||||
import es.verdnatura.presentation.view.feature.controlador.fragment.WebFragment
|
||||
|
@ -393,7 +395,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
}
|
||||
|
||||
|
||||
bottomMenu.setOnItemSelectedListener { menuItem ->
|
||||
bottomMenu.setOnItemSelectedListener { menuItem ->
|
||||
|
||||
// Get selected item from itemList and apply ui changes to menu view
|
||||
val selectedItemMenu = bottomMenuItems.find { menuItem.itemId == it.id }
|
||||
|
@ -704,6 +706,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
addFragmentOnTop(PreControladorFragment.newInstance())
|
||||
}
|
||||
|
||||
getString(R.string.titlePreControlTest) -> {
|
||||
addFragmentOnTop(CollectionFragmentPreCheckerNew.newInstance(null, type = PRECHECKERNEW))
|
||||
}
|
||||
|
||||
getString(R.string.titleShelvingHistorical) -> {
|
||||
addFragmentOnTop(ItemShelvingLogFragment.newInstance(item.title))
|
||||
|
||||
|
@ -823,7 +829,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
addFragmentOnTop(
|
||||
LoadUnloadFragment.newInstance(
|
||||
item.title, "DELIVERED", entryPoint,
|
||||
param as? ArrayList<ClientTicketSalix>
|
||||
param as? ArrayList<ClientTicketSalix>
|
||||
), getString(R.string.titleUnLoadTruck), delete = true
|
||||
)
|
||||
|
||||
|
@ -1017,7 +1023,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
}
|
||||
|
||||
//Tarea 4711
|
||||
|
||||
"PRECHECKER" -> {
|
||||
|
||||
addFragmentOnTop(CollectionFragmentPreChecker.newInstance(collection, type))
|
||||
}
|
||||
|
||||
|
@ -1144,14 +1152,16 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
|
||||
myTimeUserInteraction = System.currentTimeMillis() / 1000 / 3600
|
||||
val loginViewModel = LoginViewModel(application as MobileApplication)
|
||||
loginViewModel.deviceLog_addSalix(
|
||||
app = getString(R.string.logAppName),
|
||||
versionApp = (application as MobileApplication).versionName,
|
||||
android_id = (application as MobileApplication).androidId,
|
||||
serialnumber = (application as MobileApplication).serialNumber?:"",
|
||||
userFk = (application as MobileApplication).userId!!
|
||||
|
||||
)
|
||||
try {
|
||||
loginViewModel.deviceLog_addSalix(
|
||||
app = getString(R.string.logAppName),
|
||||
versionApp = (application as MobileApplication).versionName,
|
||||
android_id = (application as MobileApplication).androidId,
|
||||
serialnumber = (application as MobileApplication).serialNumber ?: "",
|
||||
userFk = (application as MobileApplication).userId!!)
|
||||
}catch (ex:Exception){
|
||||
d(ex.message.toString())
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -15,7 +15,8 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
val pasillerositem: List<PasillerosItemVO>
|
||||
get() = _pasillerositem
|
||||
val userId = (contextApp as MobileApplication).userId
|
||||
val isOnReservationMode = (contextApp as MobileApplication).dataStoreApp.readDataStoreKey<Boolean>(RESERVATIONMODE)
|
||||
val isOnReservationMode =
|
||||
(contextApp as MobileApplication).dataStoreApp.readDataStoreKey<Boolean>(RESERVATIONMODE)
|
||||
|
||||
fun inititializeDefaultData() {
|
||||
|
||||
|
@ -437,27 +438,27 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
)
|
||||
)
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_troncales,
|
||||
contextApp.getString(R.string.titleDeliveryTruck),
|
||||
R.string.titleDeliveryTruck,
|
||||
contextApp.getString(R.string.titleDeliveryTruck)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_troncales,
|
||||
contextApp.getString(R.string.titleDeliveryTruck),
|
||||
R.string.titleDeliveryTruck,
|
||||
contextApp.getString(R.string.titleDeliveryTruck)
|
||||
)
|
||||
)
|
||||
|
||||
//#tarea4021
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_packaging_entries,
|
||||
contextApp.getString(R.string.titlePackaging),
|
||||
R.string.titlePackaging,
|
||||
contextApp.getString(R.string.titlePackagingDescrip)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_packaging_entries,
|
||||
contextApp.getString(R.string.titlePackaging),
|
||||
R.string.titlePackaging,
|
||||
contextApp.getString(R.string.titlePackagingDescrip)
|
||||
)
|
||||
)
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
|
@ -551,21 +552,22 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun inititializeDefaultPrevia() {
|
||||
if (isOnReservationMode){
|
||||
// if (userId == 19591 || userId == 18404 || userId == 9) {
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_previous_presacador,
|
||||
contextApp.getString(R.string.titlePrePickerTest),
|
||||
R.string.titlePrePickerTest,
|
||||
contextApp.getString(
|
||||
R.string.titlePickerDescrip
|
||||
)
|
||||
//lolass
|
||||
if (isOnReservationMode) {
|
||||
// if (userId == 19591 || userId == 18404 || userId == 9) {
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_previous_presacador,
|
||||
contextApp.getString(R.string.titlePrePickerTest),
|
||||
R.string.titlePrePickerTest,
|
||||
contextApp.getString(
|
||||
R.string.titlePickerDescrip
|
||||
)
|
||||
)
|
||||
// }
|
||||
}else{
|
||||
)
|
||||
//}
|
||||
} else {
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
|
@ -592,6 +594,20 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
)
|
||||
)
|
||||
|
||||
if (userId == 19591) {
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_previous_precontrol,
|
||||
contextApp.getString(R.string.titlePreControlTest),
|
||||
R.string.titlePreControlTest,
|
||||
contextApp.getString(
|
||||
R.string.titlePreControlDescrip
|
||||
)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
10,
|
||||
|
@ -620,17 +636,17 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
)
|
||||
)
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
1,
|
||||
R.drawable.ic_review_boxpicking,
|
||||
contextApp.getString(R.string.reviewBoxPicking),
|
||||
R.string.reviewBoxPicking,
|
||||
contextApp.getString(
|
||||
R.string.reviewBoxPicking
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
1,
|
||||
R.drawable.ic_review_boxpicking,
|
||||
contextApp.getString(R.string.reviewBoxPicking),
|
||||
R.string.reviewBoxPicking,
|
||||
contextApp.getString(
|
||||
R.string.reviewBoxPicking
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
|
@ -702,17 +718,17 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
)
|
||||
|
||||
//Tarea 5186
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_parking_previa,
|
||||
contextApp.getString(R.string.titleParkingTicketPrevia),
|
||||
R.string.titleParkingTicketPrevia,
|
||||
contextApp.getString(
|
||||
R.string.titleParkingTicketPrevia
|
||||
)
|
||||
)
|
||||
)
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
7,
|
||||
R.drawable.ic_parking_previa,
|
||||
contextApp.getString(R.string.titleParkingTicketPrevia),
|
||||
R.string.titleParkingTicketPrevia,
|
||||
contextApp.getString(
|
||||
R.string.titleParkingTicketPrevia
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
|
|
|
@ -58,6 +58,11 @@ class SectorCollectionReserveFragment(
|
|||
super.onPause()
|
||||
}
|
||||
|
||||
override fun onResume() {
|
||||
onBack = true
|
||||
super.onPause()
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
|
||||
customDialogList = CustomDialogList(requireContext())
|
||||
|
@ -133,7 +138,7 @@ class SectorCollectionReserveFragment(
|
|||
|
||||
private fun showDialogLinkTickets() {
|
||||
customDialogList.setOnDismissListener {
|
||||
if (!isReserved) ma.onMyBackPressed()
|
||||
// if (!isReserved) ma.onMyBackPressed()
|
||||
}
|
||||
customDialogList.setTitle(
|
||||
getString(R.string.tickets)
|
||||
|
@ -326,7 +331,7 @@ class SectorCollectionReserveFragment(
|
|||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = "PREITEMPICKERTEST"), entryPoint = collectionFk.toString()
|
||||
)
|
||||
onBack = true
|
||||
// onBack = true
|
||||
}
|
||||
|
||||
}
|
|
@ -217,7 +217,11 @@ class SacadorFragmentNew(
|
|||
//if (!goBack2)
|
||||
val myCollectionsList = mutableListOf<CollectionTicket>()
|
||||
it.list.forEach {
|
||||
myCollectionsList.add(CollectionTicket(it.collectionFk))
|
||||
//lolass
|
||||
|
||||
if (!it.created.contains("17 Jul")) {
|
||||
myCollectionsList.add(CollectionTicket(it.collectionFk, it.created))
|
||||
}
|
||||
}
|
||||
createCollectionList(myCollectionsList)
|
||||
goBack2 = false
|
||||
|
@ -244,7 +248,7 @@ class SacadorFragmentNew(
|
|||
|
||||
"PREITEMPICKERTEST" -> {
|
||||
println("SacadorFragmentNew sectorCollectionGET")
|
||||
// viewModel.sectorCollectionGet()
|
||||
// viewModel.sectorCollectionGet()
|
||||
viewModel.sectorCollectionPartial()
|
||||
}
|
||||
|
||||
|
@ -263,6 +267,7 @@ class SacadorFragmentNew(
|
|||
|
||||
private fun createCollectionList(collections: List<CollectionTicket>) {
|
||||
collectionsList = ArrayList()
|
||||
|
||||
collections.forEach {
|
||||
collectionsList.add(it)
|
||||
}
|
||||
|
|
|
@ -272,6 +272,18 @@
|
|||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/bodyPicker"
|
||||
tool:text="123456" />
|
||||
<TextView
|
||||
android:id="@+id/item_article_colour"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_min_to_modify"
|
||||
android:layout_weight="2"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="@{sale.color}"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/bodyPicker"
|
||||
tool:text="123456" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_first_accumulate"
|
||||
|
|
Loading…
Reference in New Issue