feat: refs #6861 reservas

This commit is contained in:
Sergio De la torre 2024-10-21 12:09:07 +02:00
parent 2f7b8ccc38
commit 874a8347a5
1 changed files with 24 additions and 0 deletions

View File

@ -969,4 +969,28 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
})
}
fun saleTrackingSectorCollectionAddPrevOK(
sectorCollectionFk: Int
) {
salix.saleTrackingSectorCollectionAddPrevOK(arrayListOf(sectorCollectionFk))
.enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = true, errorMessage = getMessageFromAllResponse(
nameofFunction(this), t.message!!
)
)
}
override fun onSuccess(response: Response<Any>) {
_responseSaleAddPrevOK.value = ResponseItemVO(
isError = false, errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
})
}
}