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