refs #6559feat:refactor get_sectors
This commit is contained in:
parent
0445ac0442
commit
bd6fda1130
|
@ -79,6 +79,11 @@ interface SalixService {
|
||||||
fun getSectorsSalix(
|
fun getSectorsSalix(
|
||||||
): Call<List<SectorItemVO>>
|
): Call<List<SectorItemVO>>
|
||||||
|
|
||||||
|
@GET("sectors")
|
||||||
|
fun getSectors(
|
||||||
|
@Query("filter") filter: String
|
||||||
|
): Call<List<SectorItemVO>>
|
||||||
|
|
||||||
@GET("collections/getCollection")
|
@GET("collections/getCollection")
|
||||||
fun getCollectionSalix(
|
fun getCollectionSalix(
|
||||||
): Call<List<CollectionVO>>
|
): Call<List<CollectionVO>>
|
||||||
|
|
|
@ -64,7 +64,6 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
val operatorGetTrainResponse: LiveData<ResponseItemVO>
|
val operatorGetTrainResponse: LiveData<ResponseItemVO>
|
||||||
get() = _operatorGetTrainResponse
|
get() = _operatorGetTrainResponse
|
||||||
|
|
||||||
|
|
||||||
private val _workerAllowedResponse by lazy { MutableLiveData<ResponseItemVO>() }
|
private val _workerAllowedResponse by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
val workerAllowedResponse: LiveData<ResponseItemVO>
|
val workerAllowedResponse: LiveData<ResponseItemVO>
|
||||||
get() = _workerAllowedResponse
|
get() = _workerAllowedResponse
|
||||||
|
@ -219,7 +218,9 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getSectorsSalix() {
|
fun getSectorsSalix() {
|
||||||
salix.getSectorsSalix().enqueue(object : SalixCallback<List<SectorItemVO>>(context) {
|
salix.getSectors("""{"fields":["id","description","warehouseFk"],"order":"description"}""")
|
||||||
|
// salix.getSectorsSalix()
|
||||||
|
.enqueue(object : SalixCallback<List<SectorItemVO>>(context) {
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
|
|
||||||
val listError: ArrayList<SectorItemVO> = ArrayList()
|
val listError: ArrayList<SectorItemVO> = ArrayList()
|
||||||
|
|
Loading…
Reference in New Issue