feat: refs#8300 crashlyticsReview

This commit is contained in:
Sergio De la torre 2025-02-07 16:39:56 +01:00
parent 568c3e687b
commit 1943296492
6 changed files with 50 additions and 96 deletions

View File

@ -4,7 +4,6 @@ import android.app.Activity
import android.content.Context
import android.graphics.Color
import android.graphics.drawable.GradientDrawable
import android.os.Build
import android.text.Html
import android.view.Gravity
import android.view.ViewGroup
@ -12,7 +11,6 @@ import android.widget.EditText
import android.widget.FrameLayout
import android.widget.TextView
import android.widget.Toast
import androidx.annotation.RequiresApi
import es.verdnatura.R
import java.text.SimpleDateFormat
import java.time.ZonedDateTime
@ -32,7 +30,6 @@ fun List<Any?>.formatWithQuotes(): String {
} + "]"
}
@RequiresApi(Build.VERSION_CODES.N)
fun Any.toast(
context: Context?,
duration: Int = Toast.LENGTH_SHORT,
@ -104,7 +101,6 @@ fun toDateString(date: Date): String {
return format.format(date)
}
@RequiresApi(Build.VERSION_CODES.O)
fun String?.isoToString(returnOnlyDate: Boolean = false): String {
return if (!this.isNullOrEmpty() && this.contains("T")) {

View File

@ -7,6 +7,7 @@ import android.graphics.drawable.Drawable
import android.view.LayoutInflater
import android.view.View
import android.view.View.GONE
import android.view.View.INVISIBLE
import android.view.View.VISIBLE
import android.view.ViewGroup
import androidx.core.content.ContextCompat.getColor
@ -132,7 +133,7 @@ class SaleAdapter(
//ERROR
if (sale.originalQuantity != sale.quantity) {
layoutError.visibility = View.VISIBLE
layoutError.visibility = VISIBLE
txtError.text =
binding.root.context.getString(R.string.originalQuantity) + sale.originalQuantity
@ -145,7 +146,7 @@ class SaleAdapter(
// d("VERDNATURA::","La quantity de ${sale.saleFk} es ${sale.pickedQuantity} y está ${sale.isPrepared}")
if (sale.isNew) {
layoutError.visibility = View.VISIBLE
layoutError.visibility = VISIBLE
txtError.text = binding.root.context.getString(R.string.newItem)
}
@ -157,7 +158,7 @@ class SaleAdapter(
val backgroundDrawableCon: Drawable = binding.itemArticleRowSemaforoCon.background
if (!sale.isNew && sale.originalQuantity == sale.quantity) {
layoutError.visibility = View.GONE
layoutError.visibility = GONE
}
//SEMAFORO
@ -308,53 +309,53 @@ class SaleAdapter(
}
if (isExpanded) {
itemArticlePlacements.visibility = View.VISIBLE
itemArticlePlacements.visibility = VISIBLE
ivArrow.setImageResource(R.drawable.ic_arrow_down)
} else {
itemArticlePlacements.visibility = View.GONE
itemArticlePlacements.visibility = GONE
ivArrow.setImageResource(R.drawable.ic_arrow_up)
}
itemArticlePlacements.visibility = if (isExpanded) View.VISIBLE else {
View.GONE
itemArticlePlacements.visibility = if (isExpanded) VISIBLE else {
GONE
}
if (sale.isParent) {
itemArticleItemFk.visibility = View.INVISIBLE
itemArticleItemFk.visibility = INVISIBLE
//itemPackingText.visibility = View.INVISIBLE
//itemPackingItemFk.visibility = View.INVISIBLE
itemArticleCel1.visibility = View.INVISIBLE
itemArticleCel2.visibility = View.INVISIBLE
itemArticleCel3.visibility = View.INVISIBLE
itemArticleQuantity.visibility = View.INVISIBLE
txtdeNew.visibility = View.INVISIBLE
itemArticleQuantityPicked.visibility = View.INVISIBLE
itemArticleQuantityLine3.visibility = View.VISIBLE
imageErrorMessage.visibility = View.INVISIBLE
ivArrow.visibility = View.VISIBLE
itemArticleCel1.visibility = INVISIBLE
itemArticleCel2.visibility = INVISIBLE
itemArticleCel3.visibility = INVISIBLE
itemArticleQuantity.visibility = INVISIBLE
txtdeNew.visibility = INVISIBLE
itemArticleQuantityPicked.visibility = INVISIBLE
itemArticleQuantityLine3.visibility = VISIBLE
imageErrorMessage.visibility = INVISIBLE
ivArrow.visibility = VISIBLE
} else {
itemArticleItemFk.visibility = View.VISIBLE
itemArticleItemFk.visibility = VISIBLE
//itemPackingText.visibility = View.VISIBLE
//itemPackingItemFk.visibility = View.VISIBLE
itemArticleCel1.visibility = View.VISIBLE
itemArticleCel2.visibility = View.VISIBLE
itemArticleCel3.visibility = View.VISIBLE
itemArticleQuantity.visibility = View.VISIBLE
txtdeNew.visibility = View.VISIBLE
itemArticleQuantityPicked.visibility = View.VISIBLE
itemArticleQuantityLine3.visibility = View.VISIBLE
itemArticleCel1.visibility = VISIBLE
itemArticleCel2.visibility = VISIBLE
itemArticleCel3.visibility = VISIBLE
itemArticleQuantity.visibility = VISIBLE
txtdeNew.visibility = VISIBLE
itemArticleQuantityPicked.visibility = VISIBLE
itemArticleQuantityLine3.visibility = VISIBLE
if (type != SACADOR) {
val colorRes =
if (sale.hasMistake == true || sale.hasMistake == 1) R.color.verdnatura_red_salix else R.color.verdnatura_black
imageErrorMessage.imageTintList =
ColorStateList.valueOf(getColor(context!!, colorRes))
imageErrorMessage.visibility = View.VISIBLE
imageErrorMessage.visibility = VISIBLE
} else {
imageErrorMessage.visibility = View.INVISIBLE
imageErrorMessage.visibility = INVISIBLE
}
ivArrow.visibility = View.INVISIBLE
ivArrow.visibility = INVISIBLE
}
if (!sale.sonSales.isNullOrEmpty()) {
@ -372,7 +373,7 @@ class SaleAdapter(
} else {
//revisar porque incosistencia
itemArticlePlacements.visibility = View.VISIBLE
itemArticlePlacements.visibility = VISIBLE
}
/* rvHeadlines.adapter=SaleAdapter(sale.sonSales,onPasillerosItemClickListener,onQuantityClick,onSaleClickListener,onMistakeClickListener,onPackingClick)
@ -383,11 +384,11 @@ class SaleAdapter(
if (isExpanded) {
ivArrow.setImageResource(R.drawable.ic_arrow_up)
itemArticlePlacements.visibility = View.GONE
itemArticlePlacements.visibility = GONE
} else {
ivArrow.setImageResource(R.drawable.ic_arrow_down)
itemArticlePlacements.visibility = View.VISIBLE
itemArticlePlacements.visibility = VISIBLE
}
isExpanded = !isExpanded
@ -395,7 +396,7 @@ class SaleAdapter(
}
//Tarea 6607
itemArticleCel2Count.visibility = View.GONE
itemArticleCel2Count.visibility = GONE
/*itemArticleCel2Count.visibility = if (type == CONTROLADOR) {
View.VISIBLE
} else {

View File

@ -2104,49 +2104,19 @@ class CollectionFragmentPreChecker(
private fun showQuantityDialog(position: Int) {
customDialogThreeButtons.setDescription(getString(R.string.itemSaleQuantity))
.setValue("")
//Tarea4495
// if (type != SACADOR) {
/* customDialogThreeButtons.setOkButton(getString(R.string.titleFaults)) {
checkAndCall(
position,
customDialogThreeButtons.getValue(),
getString(R.string.titleFaults)
)
}.setOkButtonTwo(getString(R.string.BasuraRechazar)) {
checkAndCall(
position,
customDialogThreeButtons.getValue(),
getString(R.string.BasuraRechazar)
)
}
// }
customDialogThreeButtons.setOkButtonThree(getString(R.string.Reject)) {
checkAndCall(
position,
customDialogThreeButtons.getValue(),
getString(R.string.Reject)
)
}.setOkButtonFour(getString(R.string.Split)) {
checkAndCall(
position,
customDialogThreeButtons.getValue(),
getString(R.string.Split)
)*/
.setOkButtonAdd(getString(R.string.Agregar)) {
/* checkAndCall(
position,
customDialogThreeButtons.getValue(),
getString(R.string.Agregar)
)*/
increaseQuantity(position, customDialogThreeButtons.getValue().toInt())
scanRequest()
customDialogThreeButtons.dismiss()
if (customDialogThreeButtons.getValue().isNotEmpty()) {
increaseQuantity(position, customDialogThreeButtons.getValue().toInt())
scanRequest()
customDialogThreeButtons.dismiss()
} else {
ma.messageWithSound(
getString(R.string.errorInputQuantity),
isError = true,
isPlayed = true,
isToasted = true
)
}
}.setKoButton(getString(R.string.cancel)) {
scanRequest()

View File

@ -595,7 +595,7 @@ class LoadUnloadFragment(
override fun onBackPressedHandled(): Boolean {
if (scanned) {
var customDialog = CustomDialog(requireContext())
val customDialog = CustomDialog(requireContext())
customDialog.setTitle(getString(R.string.packagesNotScanned))
.setDescription(getString(R.string.savePackages))
.setOkButton(getString(R.string.yes)) {

View File

@ -701,14 +701,13 @@ class EndSacadorFragment(
)
}
@RequiresApi(Build.VERSION_CODES.O)
private fun printShelvingResult(placementSupplyListVO: PlacementSupplyListVO) {
var shelving = ""
var item = ""
var longName = ""
var total = "0"
var itemShelvingFk = 0
if (!placementSupplyListVO.list.isEmpty()) {
if (placementSupplyListVO.list.isNotEmpty()) {
val placement = placementSupplyListVO.list[0]
shelving = placement.shelving
item = placement.itemFk
@ -926,11 +925,8 @@ class EndSacadorFragment(
val iconEraser = ImageView(context)
iconEraser.setImageResource(R.drawable.previous_delete)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
iconParking.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp)
iconEraser.tooltipText = getTooltip(R.drawable.previous_delete)
}
iconParking.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp)
iconEraser.tooltipText = getTooltip(R.drawable.previous_delete)
//listIcons.add(iconEraser)
listIcons.add(iconParking)

View File

@ -10,9 +10,7 @@ datastorePreferences = "1.1.2"
firebaseAnalyticsKtx = "22.2.0"
firebaseCrashlyticsKtx = "19.4.0"
fragmentKtx = "1.8.5"
geckoviewVersion = "133.0.20241209150345"
glide = "4.16.0"
googleWebrtc = "1.0.32006"
ink = "1.0.0"
koin = "2.1.6"
kotlinStdlibJdk7 = "2.0.0"
@ -23,7 +21,6 @@ lottieVersion = "3.4.0"
material = "1.12.0"
navigationFragmentKtx = "2.8.6"
navigationUiKtx = "2.8.6"
pjsipAndroid = "2.12.1"
playServicesLocation = "21.3.0"
recyclerview = "1.4.0"
retrofit = "2.3.0"
@ -35,10 +32,7 @@ googleDevtoolsKsp = "2.0.20-1.0.25"
androidGradlePlugin = "8.7.3"
kotlin = "2.0.20"
googleServices = "4.4.2"
firebaseCrashlytics = "3.0.2"
protoliteWellKnownTypes = "18.0.0"
junit = "4.12"
material3Android = "1.3.1"
firebaseCrashlytics = "3.0.3"
[libraries]
#pickerImage
@ -98,9 +92,6 @@ androidGradlePlugin = { module = "com.android.tools.build:gradle", version.ref =
kotlinGradlePlugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
googleServices = { module = "com.google.gms:google-services", version.ref = "googleServices" }
firebaseCrashlyticsGradle = { module = "com.google.firebase:firebase-crashlytics-gradle", version.ref = "firebaseCrashlytics" }
protolite-well-known-types = { group = "com.google.firebase", name = "protolite-well-known-types", version.ref = "protoliteWellKnownTypes" }
junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-material3-android = { group = "androidx.compose.material3", name = "material3-android", version.ref = "material3Android" }
[plugins]
google-devtools-ksp = { id = "com.google.devtools.ksp", version.ref = "googleDevtoolsKsp" }