refs #6284 feat:update && deprecated

This commit is contained in:
Sergio De la torre 2024-02-29 09:09:14 +01:00
parent ff00e0a5ef
commit a9447b7af8
11 changed files with 16 additions and 24 deletions

View File

@ -63,7 +63,7 @@ class ApiSalixUtils {
}
var url =
(context as MobileApplication).dataStoreApp.readDataStoreKey<String>(BASEURLSALIX)
(context).dataStoreApp.readDataStoreKey<String>(BASEURLSALIX)
if (url.isNullOrEmpty()) {
runBlocking {

View File

@ -53,7 +53,7 @@ fun toDateString(date: Date): String {
@RequiresApi(Build.VERSION_CODES.O)
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 myDate = utcZonedDateTime.withZoneSameInstant(ZonedDateTime.now().zone)
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
@ -63,7 +63,7 @@ fun String?.isoToString(returnOnlyDate: Boolean = false): String {
} else {
(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
} else {
""

View File

@ -351,10 +351,10 @@ class AjustesFragment :
private fun showMenuByDefault() {
pasilleroViewModel = PasilleroViewModel(mobileApplication)
pasilleroViewModel!!.inititializeDefaultDataInit()
pasilleroViewModel.inititializeDefaultDataInit()
var arrayList: ArrayList<String> = arrayListOf()
pasilleroViewModel!!.pasillerositem.forEach {
pasilleroViewModel.pasillerositem.forEach {
arrayList.add(it.title)
}
arrayList.add(getString(R.string.all))

View File

@ -4,7 +4,6 @@ import android.content.Context
import android.content.res.ColorStateList
import android.graphics.Color
import android.graphics.drawable.Drawable
import android.util.Log.d
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
@ -384,8 +383,6 @@ class SaleAdapter(
rvHeadlines.layoutManager = LinearLayoutManager(context)}*/
ivArrow.setOnClickListener {
d("VERDNATURA::", "click on line1 PADRE")
//Revisar lunes
if (isExpanded!!) {
ivArrow.setImageResource(R.drawable.ic_arrow_up)

View File

@ -25,7 +25,6 @@ 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
@ -363,7 +362,7 @@ class CollectionFragmentPicker(
private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed()
ma.onMyBackPressed()
}
//ESCANER =========
hideKeyboards()
@ -472,7 +471,7 @@ class CollectionFragmentPicker(
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
.setOkButton(getString(R.string.accept)) {
customDialog.dismiss()
if (activity != null) ma.onBackPressed()
if (activity != null) ma.onMyBackPressed()
}.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",
originalQuantity = sales[position].pickedQuantity!!,
code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
buyFk = originalItemScan!!,
buyFk = originalItemScan,
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",
originalQuantity = sales[position].pickedQuantity!!,
code = if (type == CONTROLADOR) "CHECKED" else if (type == "PRECHECKER") "PREVIOUS_CONTROL" else type,//type.toString(),
buyFk = originalItemScan!!,
buyFk = originalItemScan,
itemShelvingFk = itemShelvingTracking_mark,
quantity = customDialogList.getValue().toInt(),
isScanned = isScanned
@ -1700,7 +1699,7 @@ class CollectionFragmentPicker(
requireActivity().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
lManager.hideSoftInputFromWindow(
customDialogList.getEditTextTwo().windowToken,
InputMethodManager.SHOW_FORCED
InputMethodManager.SHOW_IMPLICIT
)
}

View File

@ -11,7 +11,7 @@ class SearchBuyerModel(private var nickname: String?, private var buyerId: Int?)
}
fun getBuyerId(): String {
return buyerId.toString()!!
return buyerId.toString()
}
fun getBuyerNickname(): String {

View File

@ -4,12 +4,9 @@ import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.databinding.ItemCollectionRowBinding
import es.verdnatura.databinding.ItemCollectionRowNewBinding
import es.verdnatura.presentation.common.OnCollectionSelectedListener
import es.verdnatura.presentation.common.OnCollectionTicketSelectedListener
import es.verdnatura.presentation.view.feature.sacador.model.CollectionTicket
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
class CollectionAdapterNew(
private val items: List<CollectionTicket>,
@ -17,7 +14,6 @@ class CollectionAdapterNew(
private val type: String
) : RecyclerView.Adapter<CollectionAdapterNew.AjustesItemHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): AjustesItemHolder {
return AjustesItemHolder(
ItemCollectionRowNewBinding.inflate(LayoutInflater.from(parent.context), parent, false)
@ -33,7 +29,6 @@ class CollectionAdapterNew(
}
}
class AjustesItemHolder(
val binding: ItemCollectionRowNewBinding
) : RecyclerView.ViewHolder(binding.root) {

View File

@ -86,7 +86,7 @@ class SacadorFragmentNew(
ma.hideBottomNavigation(View.VISIBLE)
binding.mainToolbar.backButton.setOnClickListener {
ma.onBackPressed()
ma.onMyBackPressed()
}
val listIcons: ArrayList<ImageView> = ArrayList()

View File

@ -203,7 +203,7 @@
</LinearLayout>
</ScrollView>
' <include
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -45,7 +45,6 @@
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/edittext_server"
style="@style/InputLineText"
inputType="none"
android:layout_width="match_parent"
android:layout_margin="8dp"
android:backgroundTint="@android:color/white"

View File

@ -44,7 +44,9 @@
android:gravity="center"
android:text="@string/lastTicketsText"
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
android:id="@+id/last_tickets_recyclerview"