refs #5612
This commit is contained in:
parent
c30d44d801
commit
f8272a4df2
|
@ -126,11 +126,9 @@ class TicketsFragment(
|
|||
|
||||
}
|
||||
listIcons.add(iconSigned)
|
||||
//Tarea 5867
|
||||
listIcons.add(iconSend)
|
||||
listIcons.add(iconSettings)
|
||||
|
||||
// listIcons.add(iconSort)
|
||||
listIcons.add(iconSort)
|
||||
|
||||
|
||||
changeColorIcon(iconSigned.drawable, showSigned)
|
||||
|
@ -180,7 +178,7 @@ class TicketsFragment(
|
|||
changeColorIcon(iconSigned.drawable, showSigned)
|
||||
|
||||
}
|
||||
//Tarea 5867
|
||||
|
||||
iconSend.drawable -> {
|
||||
|
||||
if (myListClientTicket.isEmpty() || route.email.isNullOrEmpty()) {
|
||||
|
@ -322,6 +320,9 @@ class TicketsFragment(
|
|||
}
|
||||
response.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (!it.isError){
|
||||
ma.messageWithSound(it.response,false,false,"",true)
|
||||
}
|
||||
}
|
||||
responseUpdateRoute.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
@ -424,9 +425,6 @@ class TicketsFragment(
|
|||
entryPoint, myListClientTicket.filter { it.Id == item.Id }
|
||||
)
|
||||
|
||||
|
||||
/* val intent = Intent(requireContext(), SignedActivity::class.java)
|
||||
startActivity(intent)*/
|
||||
}
|
||||
|
||||
"map" -> {
|
||||
|
@ -524,24 +522,6 @@ class TicketsFragment(
|
|||
}
|
||||
customDialogInput.show()
|
||||
|
||||
/* val alertDialogBuilder = AlertDialog.Builder(context)
|
||||
alertDialogBuilder.setTitle("Ingrese su texto")
|
||||
|
||||
val editText = EditText(context)
|
||||
alertDialogBuilder.setView(editText)
|
||||
|
||||
alertDialogBuilder.setPositiveButton("Aceptar") { _, _ ->
|
||||
val userInputText = editText.text.toString()
|
||||
// Aquí puedes hacer lo que desees con el texto ingresado por el usuario
|
||||
// Por ejemplo, mostrarlo en un Toast, guardarlo en una base de datos, etc.
|
||||
}
|
||||
|
||||
alertDialogBuilder.setNegativeButton("Cancelar") { dialog, _ ->
|
||||
dialog.cancel()
|
||||
}
|
||||
|
||||
val alertDialog = alertDialogBuilder.create()
|
||||
alertDialog.show()*/
|
||||
}
|
||||
|
||||
private fun showNotes(item: ClientTicket) {
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.content.Context
|
|||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.domain.SalixCallback
|
||||
import es.verdnatura.domain.SilexCallback
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
|
@ -71,6 +72,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val response: LiveData<ResponseItemVO> = _response
|
||||
|
||||
|
||||
private val _responseSign by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responseSign: LiveData<ResponseItemVO> = _responseSign
|
||||
|
@ -332,7 +334,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
|
||||
_response.value = ResponseItemVO()
|
||||
_response.value = ResponseItemVO(context.getString(R.string.sendRouteOk))
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
|
@ -396,7 +398,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
.enqueue(object : SilexCallback<Any>(context) {
|
||||
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
_response.value = ResponseItemVO()
|
||||
_response.value = ResponseItemVO(response = context.getString(R.string.noteAddOk))
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue