refs #3520 feat:silex→salix

This commit is contained in:
Sergio De la torre 2024-04-19 09:55:08 +02:00
parent 11ff4fddd7
commit e5446589e8
2 changed files with 2 additions and 35 deletions

View File

@ -4,7 +4,6 @@ import android.content.Context
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
@ -59,41 +58,7 @@ class ControladorViewModel(var context: Context) : BaseViewModel(context) {
}
fun collectionTicketGet(collectionFk: Int, sectorFk: Int, print: String, type: String) {
//Tarea 6276 collection_getTickets
if (type == "CHECKER") {
getSales(collectionFk, false, type)
} else {
silex.collection_getTickets(collectionFk, sectorFk, print, type).enqueue(object :
SilexCallback<CollectionVO>(context) {
override fun onError(t: Throwable) {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<CollectionVO>) {
if (response.body() != null) {
_collectionTicketList.value = response.body()?.let {
it.map(contextApp)
}
} else {
_collectionTicketList.value = CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
}
}
})
}
}
}

View File

@ -7,6 +7,7 @@ import android.content.pm.PackageManager
import android.net.Uri
import android.os.Build
import android.provider.Settings
import android.view.View.GONE
import android.view.View.VISIBLE
import androidx.annotation.RequiresApi
import androidx.datastore.preferences.core.stringPreferencesKey
@ -264,6 +265,7 @@ class LoginFragment(var imageUri: Uri?) :
customNewForm =
CustomDialogInputThreeValues(requireContext()).setTitle(getString(R.string.workFormAdd))
.setDescription(getString(R.string.workFormDescrip))
customNewForm.setInputTextVisibility(GONE)
customNewForm.setInfoTex(
getString(R.string.name),
getString(R.string.silexServer),