refs #6284 feat:update && deprecated
This commit is contained in:
parent
ff00e0a5ef
commit
a9447b7af8
|
@ -63,7 +63,7 @@ class ApiSalixUtils {
|
||||||
}
|
}
|
||||||
|
|
||||||
var url =
|
var url =
|
||||||
(context as MobileApplication).dataStoreApp.readDataStoreKey<String>(BASEURLSALIX)
|
(context).dataStoreApp.readDataStoreKey<String>(BASEURLSALIX)
|
||||||
|
|
||||||
if (url.isNullOrEmpty()) {
|
if (url.isNullOrEmpty()) {
|
||||||
runBlocking {
|
runBlocking {
|
||||||
|
|
|
@ -53,7 +53,7 @@ fun toDateString(date: Date): String {
|
||||||
@RequiresApi(Build.VERSION_CODES.O)
|
@RequiresApi(Build.VERSION_CODES.O)
|
||||||
fun String?.isoToString(returnOnlyDate: Boolean = false): String {
|
fun String?.isoToString(returnOnlyDate: Boolean = false): String {
|
||||||
|
|
||||||
return if (!this.isNullOrEmpty() && this!!.contains("T")) {
|
return if (!this.isNullOrEmpty() && this.contains("T")) {
|
||||||
val utcZonedDateTime = ZonedDateTime.parse(this, DateTimeFormatter.ISO_OFFSET_DATE_TIME)
|
val utcZonedDateTime = ZonedDateTime.parse(this, DateTimeFormatter.ISO_OFFSET_DATE_TIME)
|
||||||
val myDate = utcZonedDateTime.withZoneSameInstant(ZonedDateTime.now().zone)
|
val myDate = utcZonedDateTime.withZoneSameInstant(ZonedDateTime.now().zone)
|
||||||
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
||||||
|
@ -63,7 +63,7 @@ fun String?.isoToString(returnOnlyDate: Boolean = false): String {
|
||||||
} else {
|
} else {
|
||||||
(myDate.format(DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm"))).replace("T", " ")
|
(myDate.format(DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm"))).replace("T", " ")
|
||||||
}
|
}
|
||||||
} else if (!this.isNullOrEmpty() && !this!!.contains("T")) {
|
} else if (!this.isNullOrEmpty() && !this.contains("T")) {
|
||||||
this
|
this
|
||||||
} else {
|
} else {
|
||||||
""
|
""
|
||||||
|
|
|
@ -351,10 +351,10 @@ class AjustesFragment :
|
||||||
|
|
||||||
private fun showMenuByDefault() {
|
private fun showMenuByDefault() {
|
||||||
pasilleroViewModel = PasilleroViewModel(mobileApplication)
|
pasilleroViewModel = PasilleroViewModel(mobileApplication)
|
||||||
pasilleroViewModel!!.inititializeDefaultDataInit()
|
pasilleroViewModel.inititializeDefaultDataInit()
|
||||||
var arrayList: ArrayList<String> = arrayListOf()
|
var arrayList: ArrayList<String> = arrayListOf()
|
||||||
|
|
||||||
pasilleroViewModel!!.pasillerositem.forEach {
|
pasilleroViewModel.pasillerositem.forEach {
|
||||||
arrayList.add(it.title)
|
arrayList.add(it.title)
|
||||||
}
|
}
|
||||||
arrayList.add(getString(R.string.all))
|
arrayList.add(getString(R.string.all))
|
||||||
|
|
|
@ -4,7 +4,6 @@ import android.content.Context
|
||||||
import android.content.res.ColorStateList
|
import android.content.res.ColorStateList
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.util.Log.d
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -384,8 +383,6 @@ class SaleAdapter(
|
||||||
rvHeadlines.layoutManager = LinearLayoutManager(context)}*/
|
rvHeadlines.layoutManager = LinearLayoutManager(context)}*/
|
||||||
|
|
||||||
ivArrow.setOnClickListener {
|
ivArrow.setOnClickListener {
|
||||||
d("VERDNATURA::", "click on line1 PADRE")
|
|
||||||
//Revisar lunes
|
|
||||||
|
|
||||||
if (isExpanded!!) {
|
if (isExpanded!!) {
|
||||||
ivArrow.setImageResource(R.drawable.ic_arrow_up)
|
ivArrow.setImageResource(R.drawable.ic_arrow_up)
|
||||||
|
|
|
@ -25,7 +25,6 @@ import androidx.recyclerview.widget.RecyclerView
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentCollectionBinding
|
import es.verdnatura.databinding.FragmentCollectionBinding
|
||||||
import es.verdnatura.domain.ConstAndValues
|
|
||||||
import es.verdnatura.domain.ConstAndValues.CONTROLADOR
|
import es.verdnatura.domain.ConstAndValues.CONTROLADOR
|
||||||
import es.verdnatura.domain.ConstAndValues.OK
|
import es.verdnatura.domain.ConstAndValues.OK
|
||||||
import es.verdnatura.domain.ConstAndValues.PRECHECKER
|
import es.verdnatura.domain.ConstAndValues.PRECHECKER
|
||||||
|
@ -363,7 +362,7 @@ class CollectionFragmentPicker(
|
||||||
private fun setEvents() {
|
private fun setEvents() {
|
||||||
|
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
ma.onBackPressed()
|
ma.onMyBackPressed()
|
||||||
}
|
}
|
||||||
//ESCANER =========
|
//ESCANER =========
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
|
@ -472,7 +471,7 @@ class CollectionFragmentPicker(
|
||||||
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
||||||
.setOkButton(getString(R.string.accept)) {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
if (activity != null) ma.onBackPressed()
|
if (activity != null) ma.onMyBackPressed()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1494,7 +1493,7 @@ class CollectionFragmentPicker(
|
||||||
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
|
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
|
||||||
originalQuantity = sales[position].pickedQuantity!!,
|
originalQuantity = sales[position].pickedQuantity!!,
|
||||||
code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
|
code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
|
||||||
buyFk = originalItemScan!!,
|
buyFk = originalItemScan,
|
||||||
isScanned = isScanned
|
isScanned = isScanned
|
||||||
|
|
||||||
)
|
)
|
||||||
|
@ -1511,7 +1510,7 @@ class CollectionFragmentPicker(
|
||||||
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
|
isChecked = if (type == SACADOR) sales[position].isPrepared else if (type == CONTROLADOR) sales[position].isControlled else if (type == "PRECHECKER") sales[position].isPreControlled else "1",
|
||||||
originalQuantity = sales[position].pickedQuantity!!,
|
originalQuantity = sales[position].pickedQuantity!!,
|
||||||
code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
|
code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
|
||||||
buyFk = originalItemScan!!,
|
buyFk = originalItemScan,
|
||||||
itemShelvingFk = itemShelvingTracking_mark,
|
itemShelvingFk = itemShelvingTracking_mark,
|
||||||
quantity = customDialogList.getValue().toInt(),
|
quantity = customDialogList.getValue().toInt(),
|
||||||
isScanned = isScanned
|
isScanned = isScanned
|
||||||
|
@ -1700,7 +1699,7 @@ class CollectionFragmentPicker(
|
||||||
requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||||
lManager.hideSoftInputFromWindow(
|
lManager.hideSoftInputFromWindow(
|
||||||
customDialogList.getEditTextTwo().windowToken,
|
customDialogList.getEditTextTwo().windowToken,
|
||||||
InputMethodManager.SHOW_FORCED
|
InputMethodManager.SHOW_IMPLICIT
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ class SearchBuyerModel(private var nickname: String?, private var buyerId: Int?)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getBuyerId(): String {
|
fun getBuyerId(): String {
|
||||||
return buyerId.toString()!!
|
return buyerId.toString()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getBuyerNickname(): String {
|
fun getBuyerNickname(): String {
|
||||||
|
|
|
@ -4,12 +4,9 @@ import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import es.verdnatura.databinding.ItemCollectionRowBinding
|
|
||||||
import es.verdnatura.databinding.ItemCollectionRowNewBinding
|
import es.verdnatura.databinding.ItemCollectionRowNewBinding
|
||||||
import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
|
||||||
import es.verdnatura.presentation.common.OnCollectionTicketSelectedListener
|
import es.verdnatura.presentation.common.OnCollectionTicketSelectedListener
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
|
||||||
|
|
||||||
class CollectionAdapterNew(
|
class CollectionAdapterNew(
|
||||||
private val items: List<CollectionTicket>,
|
private val items: List<CollectionTicket>,
|
||||||
|
@ -17,7 +14,6 @@ class CollectionAdapterNew(
|
||||||
private val type: String
|
private val type: String
|
||||||
) : RecyclerView.Adapter<CollectionAdapterNew.AjustesItemHolder>() {
|
) : RecyclerView.Adapter<CollectionAdapterNew.AjustesItemHolder>() {
|
||||||
|
|
||||||
|
|
||||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
|
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
|
||||||
return AjustesItemHolder(
|
return AjustesItemHolder(
|
||||||
ItemCollectionRowNewBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
ItemCollectionRowNewBinding.inflate(LayoutInflater.from(parent.context), parent, false)
|
||||||
|
@ -33,7 +29,6 @@ class CollectionAdapterNew(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class AjustesItemHolder(
|
class AjustesItemHolder(
|
||||||
val binding: ItemCollectionRowNewBinding
|
val binding: ItemCollectionRowNewBinding
|
||||||
) : RecyclerView.ViewHolder(binding.root) {
|
) : RecyclerView.ViewHolder(binding.root) {
|
||||||
|
|
|
@ -86,7 +86,7 @@ class SacadorFragmentNew(
|
||||||
|
|
||||||
ma.hideBottomNavigation(View.VISIBLE)
|
ma.hideBottomNavigation(View.VISIBLE)
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
ma.onBackPressed()
|
ma.onMyBackPressed()
|
||||||
}
|
}
|
||||||
|
|
||||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||||
|
|
|
@ -203,7 +203,7 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
' <include
|
<include
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
android:id="@+id/edittext_server"
|
android:id="@+id/edittext_server"
|
||||||
style="@style/InputLineText"
|
style="@style/InputLineText"
|
||||||
inputType="none"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp"
|
||||||
android:backgroundTint="@android:color/white"
|
android:backgroundTint="@android:color/white"
|
||||||
|
|
|
@ -44,7 +44,9 @@
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/lastTicketsText"
|
android:text="@string/lastTicketsText"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/h7"></com.google.android.material.textview.MaterialTextView>
|
android:textSize="@dimen/h7">
|
||||||
|
|
||||||
|
</com.google.android.material.textview.MaterialTextView>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/last_tickets_recyclerview"
|
android:id="@+id/last_tickets_recyclerview"
|
||||||
|
|
Loading…
Reference in New Issue