refs #5430
This commit is contained in:
parent
ee8527f6a3
commit
8fc79a4d5d
|
@ -11,7 +11,7 @@ class ApiSalixUtils {
|
|||
companion object {
|
||||
//const val BASE_URL:String = "http://192.168.1.155:9009/"
|
||||
//const val BASE_URL: String = "https://test-salix.verdnatura.es/api/"
|
||||
const val BASE_URL: String = "https://salix.verdnatura.es/api/"
|
||||
const val BASE_URL: String = "https://salix.verdnatura.es"
|
||||
|
||||
fun getApiService(context: Context): SalixService {
|
||||
|
||||
|
@ -51,29 +51,12 @@ class ApiSalixUtils {
|
|||
url = "https://" + url
|
||||
}
|
||||
}
|
||||
return if (url.isNullOrEmpty()) BASE_URL else url
|
||||
return if (url.isNullOrEmpty()) "$BASE_URL/api/" else "$url/api/"
|
||||
}
|
||||
|
||||
fun getDefaults(key: String?, context: Context?): String? {
|
||||
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||
return preferences.getString(key, null)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class ApiSalixUtilsSend {
|
||||
companion object {
|
||||
const val BASE_URL: String = "https://salix.verdnatura.es/api/"
|
||||
|
||||
fun getApiService(context: Context): SalixServiceSend {
|
||||
val salixRetrofit = Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(
|
||||
GsonConverterFactory.create()
|
||||
).build()
|
||||
//d("VERDNATURA::","El server Salix es "+getBaseUrlLocal(context = context))
|
||||
return salixRetrofit.create(SalixServiceSend::class.java)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -644,23 +644,23 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
WorkForms(
|
||||
"Producción",
|
||||
"https://app.verdnatura.es",
|
||||
"https://salix.verdnatura.es/api/"
|
||||
"https://salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"Test",
|
||||
"https://test-app.verdnatura.es",
|
||||
urlSalix = "https://test-salix.verdnatura.es/api/"
|
||||
urlSalix = "https://test-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
var working_in_test = true
|
||||
var working_in_test = false
|
||||
if (working_in_test) {
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestLocalhost",
|
||||
"http://10.1.4.42:9000",
|
||||
urlSalix = "https://test-salix.verdnatura.es/api/"
|
||||
urlSalix = "https://test-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -668,23 +668,25 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
WorkForms(
|
||||
"TestHome",
|
||||
"http://192.168.1.37:9000",
|
||||
urlSalix = "https://test-salix.verdnatura.es/api/"
|
||||
urlSalix = "https://test-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestLOCAL",
|
||||
"http://10.1.4.42:9000",
|
||||
urlSalix = "http://localhost:3000/api/"
|
||||
urlSalix = "http://localhost:3000"
|
||||
)
|
||||
)
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestLOCALHOME",
|
||||
"http://192.168.1.37:9000",
|
||||
urlSalix = "http://localhost:3000/api/"
|
||||
urlSalix = "http://localhost:3000"
|
||||
)
|
||||
)
|
||||
}else{
|
||||
deleteWorkForm("all")
|
||||
}
|
||||
saveWorkForm(
|
||||
WorkForms(
|
||||
|
|
|
@ -128,7 +128,7 @@ class ItemCardFragment(
|
|||
var entryPoint = Gson().toJson(
|
||||
mutableMapOf(
|
||||
"entryPoint" to itemId,
|
||||
"web" to "https://salix.verdnatura.es/#!/item/$itemId/summary"
|
||||
"web" to "${getData("base_urlSalix")}/#!/item/$itemId/summary"
|
||||
)
|
||||
)
|
||||
ma.onPasillerosItemClickListener(
|
||||
|
|
|
@ -144,7 +144,6 @@ class shelvingLogFragment(
|
|||
} else {
|
||||
|
||||
val itemId = it.list[0].id
|
||||
//val entrypoint = mutableMapOf("entryPoint" to itemScan, "web" to "https://test-salix.verdnatura.es/#!/shelving/$itemId/log")
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = getString(R.string.titleWebViewer),
|
||||
|
@ -152,7 +151,7 @@ class shelvingLogFragment(
|
|||
entryPoint = Gson().toJson(
|
||||
mutableMapOf(
|
||||
"entryPoint" to itemId,
|
||||
"web" to "https://salix.verdnatura.es/#!/shelving/$itemId/log"
|
||||
"web" to "${getData("base_urlSalix")}/#!/shelving/$itemId/log"
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue