version 23.26Beta_5339
This commit is contained in:
parent
607f946e0a
commit
6aa041a872
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="KotlinJpsPluginSettings">
|
||||||
|
<option name="version" value="1.8.0" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -82,14 +82,14 @@
|
||||||
</select>
|
</select>
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="refs #4678">
|
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="version 23.24.1Beta">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/deploymentTargetDropDown.xml" beforeDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/app/beta/release/output-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/beta/release/output-metadata.json" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/ApiSalixUtils.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/ApiSalixUtils.kt" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesFragment.kt" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ajustes/fragment/AjustesViewModel.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/model/LoginItemVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/model/LoginItemVO.kt" afterDir="false" />
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
<component name="CodeInsightWorkspaceSettings">
|
<component name="CodeInsightWorkspaceSettings">
|
||||||
<option name="optimizeImportsOnTheFly" value="true" />
|
<option name="optimizeImportsOnTheFly" value="true" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[21114523025303]" />
|
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[G65TY9DQN7X4BIE6]" />
|
||||||
<component name="ExportToHTMLSettings">
|
<component name="ExportToHTMLSettings">
|
||||||
<option name="OPEN_IN_BROWSER" value="true" />
|
<option name="OPEN_IN_BROWSER" value="true" />
|
||||||
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
|
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
</option>
|
</option>
|
||||||
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
<option name="RECENT_BRANCH_BY_REPOSITORY">
|
||||||
<map>
|
<map>
|
||||||
<entry key="$PROJECT_DIR$" value="4021-gestion_embalajes" />
|
<entry key="$PROJECT_DIR$" value="dev-5613_no_guardar_user" />
|
||||||
</map>
|
</map>
|
||||||
</option>
|
</option>
|
||||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||||
|
|
|
@ -2,6 +2,7 @@ package es.verdnatura.domain
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
|
import com.google.gson.GsonBuilder
|
||||||
import okhttp3.OkHttpClient
|
import okhttp3.OkHttpClient
|
||||||
import retrofit2.Retrofit
|
import retrofit2.Retrofit
|
||||||
import retrofit2.converter.gson.GsonConverterFactory
|
import retrofit2.converter.gson.GsonConverterFactory
|
||||||
|
@ -35,7 +36,7 @@ class ApiSalixUtils {
|
||||||
.client(salixClient)
|
.client(salixClient)
|
||||||
.baseUrl(getBaseUrlLocal(context = context))
|
.baseUrl(getBaseUrlLocal(context = context))
|
||||||
.addConverterFactory(
|
.addConverterFactory(
|
||||||
GsonConverterFactory.create()
|
GsonConverterFactory.create(GsonBuilder().serializeNulls().create() )
|
||||||
).build()
|
).build()
|
||||||
|
|
||||||
//d("VERDNATURA::","El server Salix es "+getBaseUrlLocal(context = context))
|
//d("VERDNATURA::","El server Salix es "+getBaseUrlLocal(context = context))
|
||||||
|
|
|
@ -3,15 +3,14 @@ package es.verdnatura.domain
|
||||||
import es.verdnatura.presentation.common.itemBarCodeSalix
|
import es.verdnatura.presentation.common.itemBarCodeSalix
|
||||||
import es.verdnatura.presentation.common.itemPackingTypeSalix
|
import es.verdnatura.presentation.common.itemPackingTypeSalix
|
||||||
import es.verdnatura.presentation.common.packingSiteSalix
|
import es.verdnatura.presentation.common.packingSiteSalix
|
||||||
import es.verdnatura.presentation.view.feature.ajustes.model.Printers
|
|
||||||
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
|
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
|
||||||
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
|
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
|
||||||
import es.verdnatura.presentation.view.feature.collection.listSaleSalix
|
import es.verdnatura.presentation.view.feature.collection.listSaleSalix
|
||||||
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLogSalix
|
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLogSalix
|
||||||
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
|
||||||
|
import es.verdnatura.presentation.view.feature.login.model.Operator
|
||||||
import es.verdnatura.presentation.view.feature.login.model.OperatorSalix
|
import es.verdnatura.presentation.view.feature.login.model.OperatorSalix
|
||||||
import es.verdnatura.presentation.view.feature.login.model.OperatorUpdate
|
|
||||||
import es.verdnatura.presentation.view.feature.login.model.SalixGrupo
|
import es.verdnatura.presentation.view.feature.login.model.SalixGrupo
|
||||||
import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
|
import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
|
||||||
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
||||||
|
@ -195,10 +194,10 @@ interface SalixService {
|
||||||
Call<Any>
|
Call<Any>
|
||||||
|
|
||||||
|
|
||||||
@PUT("Operators/udpate")
|
@PATCH("Operators/{id}")
|
||||||
fun update_operator(
|
fun update_operator(
|
||||||
@Body params: Any,
|
@Path("id") id: Number,
|
||||||
@Query("where[workerFk]") workerFk:Int
|
@Body params: Any
|
||||||
|
|
||||||
):
|
):
|
||||||
Call<Void>
|
Call<Void>
|
||||||
|
|
|
@ -416,12 +416,7 @@ class AjustesFragment :
|
||||||
editor.apply()
|
editor.apply()
|
||||||
|
|
||||||
viewModel.ajustesitem.get(2).selected = it.name
|
viewModel.ajustesitem.get(2).selected = it.name
|
||||||
/* viewModel.worker_updatePrinterSalix(
|
viewModel.worker_updateOperatorSalix("printer",getDataInt(USERFK),getDataInt(SECTORFK),it.id!!)
|
||||||
it.id!!, getDataInt(USERFK)
|
|
||||||
)*/
|
|
||||||
viewModel.worker_updatePrinter(
|
|
||||||
it.id!!
|
|
||||||
)
|
|
||||||
ajustesAdapter!!.notifyDataSetChanged()
|
ajustesAdapter!!.notifyDataSetChanged()
|
||||||
ajustesAdapter
|
ajustesAdapter
|
||||||
|
|
||||||
|
@ -488,9 +483,9 @@ class AjustesFragment :
|
||||||
viewModel.ajustesitem.get(0).sectorFk = it.id
|
viewModel.ajustesitem.get(0).sectorFk = it.id
|
||||||
viewModel.ajustesitem.get(0).warehouse = it.warehouseFk
|
viewModel.ajustesitem.get(0).warehouse = it.warehouseFk
|
||||||
viewModel.ajustesitem.get(0).selected = it.description
|
viewModel.ajustesitem.get(0).selected = it.description
|
||||||
viewModel.worker_updateSector(
|
|
||||||
it.id
|
viewModel.worker_updateOperatorSalix("sector",getDataInt(USERFK),it.id,null)
|
||||||
)
|
|
||||||
ajustesAdapter!!.notifyDataSetChanged()
|
ajustesAdapter!!.notifyDataSetChanged()
|
||||||
|
|
||||||
return@forEach
|
return@forEach
|
||||||
|
|
|
@ -15,11 +15,16 @@ import es.verdnatura.presentation.base.nameofFunction
|
||||||
import es.verdnatura.presentation.common.Event
|
import es.verdnatura.presentation.common.Event
|
||||||
import es.verdnatura.presentation.common.ResponseItemNumber
|
import es.verdnatura.presentation.common.ResponseItemNumber
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.ajustes.model.*
|
import es.verdnatura.presentation.view.feature.ajustes.model.AjustesItemVO
|
||||||
|
import es.verdnatura.presentation.view.feature.ajustes.model.Printers
|
||||||
|
import es.verdnatura.presentation.view.feature.ajustes.model.PrintersList
|
||||||
|
import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
|
||||||
|
import es.verdnatura.presentation.view.feature.ajustes.model.SectorListVO
|
||||||
|
import es.verdnatura.presentation.view.feature.ajustes.model.Train
|
||||||
|
import es.verdnatura.presentation.view.feature.ajustes.model.TrainList
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
|
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingTypeList
|
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingTypeList
|
||||||
import es.verdnatura.presentation.view.feature.login.model.OperatorPrinter
|
import es.verdnatura.presentation.view.feature.login.model.Operator
|
||||||
import es.verdnatura.presentation.view.feature.login.model.OperatorUpdate
|
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
|
|
||||||
|
|
||||||
|
@ -478,17 +483,31 @@ class AjustesViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
fun worker_updatePrinterSalix(printerFk: Int, workerFk : Int) {
|
|
||||||
|
fun worker_updateOperatorSalix(entity: String, workerFk: Int, sectorFk: Int?, labelerFk: Int?) {
|
||||||
ProgressLoading(VISIBLE)
|
ProgressLoading(VISIBLE)
|
||||||
salix.update_operator(OperatorPrinter(printerFk), workerFk)
|
salix.update_operator(id = workerFk, Operator(sectorFk, labelerFk))
|
||||||
.enqueue(object : SilexCallback<Void>(context) {
|
.enqueue(object : SilexCallback<Void>(context) {
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
ProgressLoading(GONE)
|
ProgressLoading(GONE)
|
||||||
|
_actionUpdate.value = ResponseItemVO(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||||
|
)
|
||||||
throw t
|
throw t
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSuccess(response: Response<Void>) {
|
override fun onSuccess(response: Response<Void>) {
|
||||||
ProgressLoading(GONE)
|
ProgressLoading(GONE)
|
||||||
|
if (entity == "sector") {
|
||||||
|
_actionUpdate.value = ResponseItemVO(
|
||||||
|
response = response.message(),
|
||||||
|
isError = false,
|
||||||
|
errorMessage = ""
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
super.onSuccess(response)
|
super.onSuccess(response)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ class SalixGrupo(
|
||||||
val message: String = ""
|
val message: String = ""
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
class OperatorSalix(
|
class OperatorSalix(
|
||||||
val workerFk: Int = 0,
|
val workerFk: Int = 0,
|
||||||
val sectorFk: Int = 0,
|
val sectorFk: Int = 0,
|
||||||
|
@ -37,16 +38,10 @@ class OperatorList(
|
||||||
var list: List<OperatorSalix> = listOf()
|
var list: List<OperatorSalix> = listOf()
|
||||||
)
|
)
|
||||||
|
|
||||||
class OperatorSector(
|
class Operator(
|
||||||
val sectorFk: Int
|
val sectorFk: Int?,
|
||||||
)
|
val labelerFk: Int?
|
||||||
|
|
||||||
class OperatorPrinter(
|
|
||||||
val labelerFk: Int
|
|
||||||
)
|
|
||||||
|
|
||||||
class OperatorUpdate(
|
|
||||||
val update: String
|
|
||||||
)
|
)
|
||||||
|
|
||||||
class versionApp(
|
class versionApp(
|
||||||
|
|
Loading…
Reference in New Issue