Version 8.4.1Beta=8.4 Master,sin envio rockets de sacador/controlador y quitar strings.
This commit is contained in:
parent
da7121aa50
commit
3b1f7c96c5
|
@ -14,7 +14,6 @@
|
||||||
<option value="$PROJECT_DIR$/app" />
|
<option value="$PROJECT_DIR$/app" />
|
||||||
</set>
|
</set>
|
||||||
</option>
|
</option>
|
||||||
<option name="resolveModulePerSourceSet" value="false" />
|
|
||||||
</GradleProjectSettings>
|
</GradleProjectSettings>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -91,6 +91,8 @@
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_parking_orange_24dp.xml" value="0.21041666666666667" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_parking_orange_24dp.xml" value="0.21041666666666667" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_shipping_black_24dp.xml" value="0.11979166666666667" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_shipping_black_24dp.xml" value="0.11979166666666667" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_shipping_black_24dp_selected.xml" value="0.11979166666666667" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_shipping_black_24dp_selected.xml" value="0.11979166666666667" />
|
||||||
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_logo.xml" value="0.266" />
|
||||||
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_logo_salix.xml" value="0.266" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_loyalty_black_24dp.xml" value="0.21041666666666667" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_loyalty_black_24dp.xml" value="0.21041666666666667" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_mode_edit_black_24dp.xml" value="0.15052083333333333" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_mode_edit_black_24dp.xml" value="0.15052083333333333" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_more_vert_black_24dp.xml" value="0.26" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_more_vert_black_24dp.xml" value="0.26" />
|
||||||
|
@ -173,7 +175,7 @@
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_historicovehiculo.xml" value="0.23052536231884058" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_historicovehiculo.xml" value="0.23052536231884058" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_inventary.xml" value="0.11271529888551166" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_inventary.xml" value="0.11271529888551166" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_inventary_old.xml" value="0.22604166666666667" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_inventary_old.xml" value="0.22604166666666667" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_item_card.xml" value="0.16666666666666666" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_item_card.xml" value="0.22" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemdayofsale_card.xml" value="0.22" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemdayofsale_card.xml" value="0.22" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemexpeditionstate_card.xml" value="0.22" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemexpeditionstate_card.xml" value="0.22" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemproposal.xml" value="0.22" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_itemproposal.xml" value="0.22" />
|
||||||
|
|
|
@ -13,8 +13,10 @@ android {
|
||||||
applicationId "es.verdnatura"
|
applicationId "es.verdnatura"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 118
|
versionCode 120
|
||||||
versionName "8.4.1Beta" //versionCode 118: arreglat rocket a Alex i llevat callFunction,strings ok
|
versionName = "8.4"
|
||||||
|
//versionName "8.4.2Beta" versioncode 119
|
||||||
|
//versionName "8.4.1Beta" //versionCode 118: arreglat rocket a Alex i llevat callFunction,strings ok
|
||||||
//versionName "8.4Beta" //versionCode 117: return i workerAppTester
|
//versionName "8.4Beta" //versionCode 117: return i workerAppTester
|
||||||
//versionName "8.3" //versionCode 116: versionCode 116: cambios finales en return, diseño grafico...
|
//versionName "8.3" //versionCode 116: versionCode 116: cambios finales en return, diseño grafico...
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 118,
|
"versionCode": 120,
|
||||||
"versionName": "8.4.1Beta",
|
"versionName": "8.4",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Binary file not shown.
|
@ -5,8 +5,8 @@ import retrofit2.converter.gson.GsonConverterFactory
|
||||||
class ApiNodeJsUtils {
|
class ApiNodeJsUtils {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
//const val BASE_URL:String = "http://192.168.1.108:8000/"
|
const val BASE_URL:String = "http://10.1.2.24:7777/"
|
||||||
const val BASE_URL:String = "https://smart-tag.verdnatura.es"
|
// const val BASE_URL:String = "https://smart-tag.verdnatura.es"
|
||||||
fun getApiService():NodeJsService{
|
fun getApiService():NodeJsService{
|
||||||
val nodeJsRetrofit = Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(
|
val nodeJsRetrofit = Retrofit.Builder().baseUrl(BASE_URL).addConverterFactory(
|
||||||
GsonConverterFactory.create()).build()
|
GsonConverterFactory.create()).build()
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package es.verdnatura.domain
|
package es.verdnatura.domain
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.Log.d
|
|
||||||
import androidx.preference.PreferenceManager
|
import androidx.preference.PreferenceManager
|
||||||
import retrofit2.Retrofit
|
import retrofit2.Retrofit
|
||||||
import retrofit2.converter.gson.GsonConverterFactory
|
import retrofit2.converter.gson.GsonConverterFactory
|
||||||
|
@ -10,7 +9,7 @@ class ApiSalixUtils {
|
||||||
companion object {
|
companion object {
|
||||||
//const val BASE_URL:String = "http://192.168.1.155:9009/"
|
//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://test-salix.verdnatura.es/api/"
|
||||||
const val BASE_URL: String = "https://salix.verdnatura.es/api/"
|
const val BASE_URL: String = "https://salix.verdnatura.es/api/"
|
||||||
|
|
||||||
fun getApiService(context: Context): SalixService {
|
fun getApiService(context: Context): SalixService {
|
||||||
val salixRetrofit = Retrofit.Builder().baseUrl(getBaseUrlLocal(context = context)).addConverterFactory(
|
val salixRetrofit = Retrofit.Builder().baseUrl(getBaseUrlLocal(context = context)).addConverterFactory(
|
||||||
|
|
|
@ -5,6 +5,7 @@ import com.google.gson.JsonObject
|
||||||
import es.verdnatura.presentation.view.feature.collection.SalesModified
|
import es.verdnatura.presentation.view.feature.collection.SalesModified
|
||||||
import es.verdnatura.presentation.view.feature.collection.SalesModifiedList
|
import es.verdnatura.presentation.view.feature.collection.SalesModifiedList
|
||||||
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
|
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
|
||||||
|
import es.verdnatura.presentation.view.feature.collection.sales
|
||||||
import es.verdnatura.presentation.view.feature.login.model.workerId
|
import es.verdnatura.presentation.view.feature.login.model.workerId
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeVO
|
import es.verdnatura.presentation.view.feature.sacador.model.MistakeTypeVO
|
||||||
|
@ -438,22 +439,6 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
||||||
params
|
params
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
fun get_salesModifiedFromTicket(
|
|
||||||
usuario: String,
|
|
||||||
password: String,
|
|
||||||
ticketFk: String
|
|
||||||
): Call<List<SalesModified>> {
|
|
||||||
val params: ArrayList<String> = ArrayList()
|
|
||||||
params.add(ticketFk)
|
|
||||||
return restClient!!.get_salesModifiedFromTicket(
|
|
||||||
"json",
|
|
||||||
"1",
|
|
||||||
usuario,
|
|
||||||
password,
|
|
||||||
"application/json",
|
|
||||||
params
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun getIdFromCode(usuario: String, password: String, code: String): Call<String> {
|
fun getIdFromCode(usuario: String, password: String, code: String): Call<String> {
|
||||||
|
@ -498,6 +483,28 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun transferSalesSalix(
|
||||||
|
|
||||||
|
token: String,
|
||||||
|
ticketFk:String,
|
||||||
|
saleFk: String,
|
||||||
|
quantity: String,
|
||||||
|
|
||||||
|
): Call<Any> {
|
||||||
|
|
||||||
|
|
||||||
|
return salixClient!!.transferSalesSalix(
|
||||||
|
"json",
|
||||||
|
"1",
|
||||||
|
token,
|
||||||
|
"application/json",
|
||||||
|
ticketFk,
|
||||||
|
sales(saleId = saleFk.toInt(), quantity = quantity.toInt())
|
||||||
|
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fun collectionIncreaseQuantitySalix(
|
fun collectionIncreaseQuantitySalix(
|
||||||
|
|
||||||
token: String,
|
token: String,
|
||||||
|
|
|
@ -6,6 +6,7 @@ import es.verdnatura.presentation.common.itemPackingTypeSalix
|
||||||
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.sales
|
||||||
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.SalixGrupo
|
import es.verdnatura.presentation.view.feature.login.model.SalixGrupo
|
||||||
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
|
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
|
||||||
|
@ -72,6 +73,18 @@ interface SalixService {
|
||||||
Call<Any>
|
Call<Any>
|
||||||
|
|
||||||
|
|
||||||
|
@POST("tickets/{idTicket}/transferSales")
|
||||||
|
fun transferSalesSalix(
|
||||||
|
@Header("aplicacion") aplicacion: String,
|
||||||
|
@Header("version") version: String,
|
||||||
|
@Header("Authorization") authorization: String,
|
||||||
|
@Header("Content-Type") content_type: String,
|
||||||
|
@Path("idTicket") idTicket:String,
|
||||||
|
@Body params: sales
|
||||||
|
):
|
||||||
|
Call<Any>
|
||||||
|
|
||||||
|
|
||||||
//https://test-salix.verdnatura.es/api/Departments?filter={"fields": {"id": true, "name": true},"where": {"name": "COMPRAS"}}
|
//https://test-salix.verdnatura.es/api/Departments?filter={"fields": {"id": true, "name": true},"where": {"name": "COMPRAS"}}
|
||||||
// http://test-salix.verdnatura.es/api/Departments?filter={"fields": {"id": true, "name": true},"where": {"hasToMistake": "FALSE"}}
|
// http://test-salix.verdnatura.es/api/Departments?filter={"fields": {"id": true, "name": true},"where": {"hasToMistake": "FALSE"}}
|
||||||
|
|
||||||
|
|
|
@ -253,6 +253,7 @@ override fun onViewCreated(view: View, savedInstanceState: Bundle?)
|
||||||
R.drawable.ic_mode_edit_black_24dp->getString(R.string.allowChangeShelving)
|
R.drawable.ic_mode_edit_black_24dp->getString(R.string.allowChangeShelving)
|
||||||
R.drawable.ic_delete_forever_black_24dp->getString(R.string.deleteAllitems)
|
R.drawable.ic_delete_forever_black_24dp->getString(R.string.deleteAllitems)
|
||||||
R.drawable.ic_flash_auto_black_24dp->getString(R.string.allowAutomaticAddItem)
|
R.drawable.ic_flash_auto_black_24dp->getString(R.string.allowAutomaticAddItem)
|
||||||
|
R.drawable.ic_logo_salix->getString(R.string.accessSalix)
|
||||||
|
|
||||||
else -> {""}
|
else -> {""}
|
||||||
}
|
}
|
||||||
|
@ -542,7 +543,10 @@ override fun onViewCreated(view: View, savedInstanceState: Bundle?)
|
||||||
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
preferences.getString(getString(R.string.baseurl),"").toString()
|
preferences.getString(getString(R.string.baseurl),"").toString()
|
||||||
}
|
}
|
||||||
|
"base_urlSalix"->{
|
||||||
|
val preferences = PreferenceManager.getDefaultSharedPreferences(context)
|
||||||
|
preferences.getString(getString(R.string.base_urlSalix),"").toString()
|
||||||
|
}
|
||||||
else -> {""}
|
else -> {""}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,6 @@ import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
||||||
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
|
import es.verdnatura.presentation.view.feature.faltas.model.ItemFaltasVO
|
||||||
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionScanVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionStateRow
|
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
|
@ -25,7 +24,7 @@ interface OnOptionsSelectedListener {
|
||||||
|
|
||||||
|
|
||||||
interface OnPasillerosItemClickListener {
|
interface OnPasillerosItemClickListener {
|
||||||
fun onPasillerosItemClickListener(item: PasillerosItemVO,entryPoint:String)
|
fun onPasillerosItemClickListener(item: PasillerosItemVO, entryPoint: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface onMistakeWorkerClickListener {
|
interface onMistakeWorkerClickListener {
|
||||||
|
@ -33,8 +32,8 @@ interface onMistakeWorkerClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface hideBottomNavigation{
|
interface hideBottomNavigation {
|
||||||
fun hideBottomNavigation(entryPoint:String)
|
fun hideBottomNavigation(entryPoint: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnAjustesItemClickListener {
|
interface OnAjustesItemClickListener {
|
||||||
|
@ -69,7 +68,7 @@ interface OnInvetoryNichoClickListener {
|
||||||
fun onInvetoryNichoClickListener(item: ItemInventaryVO)
|
fun onInvetoryNichoClickListener(item: ItemInventaryVO)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnItemProposalClickListener{
|
interface OnItemProposalClickListener {
|
||||||
fun onItemProposalClickListener(item: ItemProposal)
|
fun onItemProposalClickListener(item: ItemProposal)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,15 +93,18 @@ interface OnMoreClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnTruckClickListener {
|
interface OnTruckClickListener {
|
||||||
fun onTruckClickListener(item: ItemExpeditionTruckVO,entryPoint: String)
|
fun onTruckClickListener(item: ItemExpeditionTruckVO, entryPoint: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnPalletClickListener {
|
interface OnPalletClickListener {
|
||||||
fun onPalletClickListener(itemTruck: ItemExpeditionTruckVO,itemPallet: ItemPalletVO)
|
fun onPalletClickListener(itemTruck: ItemExpeditionTruckVO, itemPallet: ItemPalletVO)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnComprobarPalletViewClickListener {
|
interface OnComprobarPalletViewClickListener {
|
||||||
fun onComprobarPalletViewClickListener(itemTruck: ItemExpeditionTruckVO,itemPallet: ItemPalletVO)
|
fun onComprobarPalletViewClickListener(
|
||||||
|
itemTruck: ItemExpeditionTruckVO,
|
||||||
|
itemPallet: ItemPalletVO
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnScanLongClickListener {
|
interface OnScanLongClickListener {
|
||||||
|
@ -110,7 +112,7 @@ interface OnScanLongClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnCollectionSelectedListener {
|
interface OnCollectionSelectedListener {
|
||||||
fun onCollectionSelected(collection: CollectionVO,type:String)
|
fun onCollectionSelected(collection: CollectionVO, type: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnQuantityClickListener {
|
interface OnQuantityClickListener {
|
||||||
|
@ -118,7 +120,7 @@ interface OnQuantityClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface onPackingClickListener {
|
interface onPackingClickListener {
|
||||||
fun onPackingClick(sale:SaleVO)
|
fun onPackingClick(sale: SaleVO)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnSaleClickListener {
|
interface OnSaleClickListener {
|
||||||
|
@ -126,17 +128,18 @@ interface OnSaleClickListener {
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnMistakeClickListener {
|
interface OnMistakeClickListener {
|
||||||
fun onMistakeClickListener(sale:SaleVO)
|
fun onMistakeClickListener(sale: SaleVO)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnBuyerSelectedListener {
|
interface OnBuyerSelectedListener {
|
||||||
fun onBuyerSelected(userFk:String)
|
fun onBuyerSelected(userFk: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface OnStarSelectedListener {
|
interface OnStarSelectedListener {
|
||||||
fun onStarSelected(vId:String, vStars:String)
|
fun onStarSelected(vId: String, vStars: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
interface onVehicleSelected{
|
interface onVehicleSelected {
|
||||||
fun onVehicleClick(userFk: String)
|
fun onVehicleClick(userFk: String)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,13 +147,13 @@ class AjustesFragment :
|
||||||
workerupdateSector.observe(viewLifecycleOwner, {
|
workerupdateSector.observe(viewLifecycleOwner, {
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
|
|
||||||
ma.messageWithSound(it.errorMessage,it.isError,false)
|
ma.messageWithSound(if (it.isError) it.errorMessage else{getString(R.string.sectorUpdated)},it.isError,false)
|
||||||
})
|
})
|
||||||
|
|
||||||
workerupdatePrinter.observe(viewLifecycleOwner, {
|
workerupdatePrinter.observe(viewLifecycleOwner, {
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
|
|
||||||
ma.messageWithSound(it.errorMessage,it.isError,false)
|
ma.messageWithSound(if (it.isError) it.errorMessage else{getString(R.string.printerUpdated)},it.isError,false)
|
||||||
})
|
})
|
||||||
|
|
||||||
binding.ajustessItems.adapter = ajustesAdapter
|
binding.ajustessItems.adapter = ajustesAdapter
|
||||||
|
|
|
@ -221,7 +221,7 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun worker_updateSector(user: String, password: String, sectorFk: String) {
|
fun worker_updateSector(user: String, password: String, sectorFk: String) {
|
||||||
d("El sector marcado dentro es " + sectorFk)
|
d("El sector marcado dentro es %s", sectorFk)
|
||||||
getAjustesUserCase.worker_updateSector(user, password, sectorFk)
|
getAjustesUserCase.worker_updateSector(user, password, sectorFk)
|
||||||
.enqueue(object : Callback<Unit> {
|
.enqueue(object : Callback<Unit> {
|
||||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||||
|
@ -247,9 +247,10 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
_workerupdateSector.value = ResponseItemVO(
|
_workerupdateSector.value = ResponseItemVO(
|
||||||
response = "Actualizado sector",
|
response = response.message(),
|
||||||
isError = false,
|
isError = false,
|
||||||
errorMessage = "Actualizado sector"
|
errorMessage = ""
|
||||||
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -266,7 +267,7 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun worker_updatePrinter(user: String, password: String, printerFk: String) {
|
fun worker_updatePrinter(user: String, password: String, printerFk: String) {
|
||||||
d("La impresora marcada " + printerFk)
|
//d("La impresora marcada " + printerFk)
|
||||||
getAjustesUserCase.worker_updatePrinter(user, password, printerFk)
|
getAjustesUserCase.worker_updatePrinter(user, password, printerFk)
|
||||||
.enqueue(object : Callback<Unit> {
|
.enqueue(object : Callback<Unit> {
|
||||||
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
override fun onFailure(call: Call<Unit>, t: Throwable) {
|
||||||
|
@ -292,10 +293,10 @@ class AjustesViewModel(context: Context) : BaseViewModel() {
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
_workerupdatePrinter.value = ResponseItemVO(
|
_workerupdatePrinter.value = ResponseItemVO(
|
||||||
response = "Actualizada impresora",
|
response = response.message(),
|
||||||
isError = false,
|
isError = false,
|
||||||
errorMessage = "Actualizada impresora"
|
errorMessage = "")
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ class ItemCardFragment(
|
||||||
|
|
||||||
private fun setToolBar() {
|
private fun setToolBar() {
|
||||||
|
|
||||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
binding.mainToolbar.toolbarIcons.visibility = GONE
|
||||||
|
|
||||||
|
|
||||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||||
|
@ -93,14 +93,19 @@ class ItemCardFragment(
|
||||||
iconReload.setImageResource(R.drawable.ic_autorenew_black_24dp)
|
iconReload.setImageResource(R.drawable.ic_autorenew_black_24dp)
|
||||||
val iconHistory = ImageView(context)
|
val iconHistory = ImageView(context)
|
||||||
iconHistory.setImageResource(R.drawable.ic_history_black_24dp)
|
iconHistory.setImageResource(R.drawable.ic_history_black_24dp)
|
||||||
|
val iconSalix = ImageView(context)
|
||||||
|
iconSalix.setImageResource(R.drawable.ic_logo_salix)
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
iconReload.tooltipText = getTooltip(R.drawable.ic_autorenew_black_24dp)
|
||||||
iconHistory.tooltipText = getTooltip(R.drawable.ic_history_black_24dp)
|
iconHistory.tooltipText = getTooltip(R.drawable.ic_history_black_24dp)
|
||||||
|
iconSalix.tooltipText= getTooltip(R.drawable.ic_logo_salix)
|
||||||
}
|
}
|
||||||
|
listIcons.add(iconSalix)
|
||||||
listIcons.add(iconReload)
|
listIcons.add(iconReload)
|
||||||
listIcons.add(iconHistory)
|
listIcons.add(iconHistory)
|
||||||
|
|
||||||
|
|
||||||
binding.mainToolbar.toolbarIcons.adapter =
|
binding.mainToolbar.toolbarIcons.adapter =
|
||||||
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
|
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
|
||||||
|
|
||||||
|
@ -124,6 +129,16 @@ class ItemCardFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
iconSalix.drawable -> {
|
||||||
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
//getItemCard(itemFk)
|
||||||
|
|
||||||
|
ma.openFragmentWeb(itemInfoG!!.id)
|
||||||
|
/* ma.onPasillerosItemClickListener(
|
||||||
|
PasillerosItemVO(title = getString(R.string.titleHistorical)),
|
||||||
|
itemInfoG!!.id
|
||||||
|
)*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -202,6 +217,7 @@ class ItemCardFragment(
|
||||||
if (it.id != "0") {
|
if (it.id != "0") {
|
||||||
binding.itemcardLayout.visibility = View.VISIBLE
|
binding.itemcardLayout.visibility = View.VISIBLE
|
||||||
setItemCard(it)
|
setItemCard(it)
|
||||||
|
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||||
} else {
|
} else {
|
||||||
binding.splashProgressTwo.visibility = GONE
|
binding.splashProgressTwo.visibility = GONE
|
||||||
binding.itemcardLayout.visibility = View.GONE
|
binding.itemcardLayout.visibility = View.GONE
|
||||||
|
@ -261,6 +277,7 @@ class ItemCardFragment(
|
||||||
binding.itemcardTag2.text = itemInfo.value5
|
binding.itemcardTag2.text = itemInfo.value5
|
||||||
binding.itemcardTag3.text = itemInfo.value6
|
binding.itemcardTag3.text = itemInfo.value6
|
||||||
binding.itemcardTag4.text = itemInfo.value7 + " " + itemInfo.origin
|
binding.itemcardTag4.text = itemInfo.value7 + " " + itemInfo.origin
|
||||||
|
binding.itemcardBuyer.text =itemInfo.buyer
|
||||||
listItemsRow = ArrayList()
|
listItemsRow = ArrayList()
|
||||||
|
|
||||||
//sergio itemcard por item_getInfo
|
//sergio itemcard por item_getInfo
|
||||||
|
@ -372,14 +389,15 @@ class ItemCardFragment(
|
||||||
action = "updatePacking"
|
action = "updatePacking"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
listItemsRow.add(
|
/* sergio: quitar de back cuando ya tengan la app actualizada todos
|
||||||
|
listItemsRow.add(
|
||||||
ItemCardRowVO(
|
ItemCardRowVO(
|
||||||
title = getString(R.string.MINIMO),
|
title = getString(R.string.MINIMO),
|
||||||
value = itemInfo.min,
|
value = itemInfo.min,
|
||||||
isEditable = true,
|
isEditable = true,
|
||||||
action = "itemSaveMin"
|
action = "itemSaveMin"
|
||||||
)
|
)
|
||||||
)
|
)*/
|
||||||
listItemsRow.add(
|
listItemsRow.add(
|
||||||
ItemCardRowVO(
|
ItemCardRowVO(
|
||||||
title = getString(R.string.Referencia),
|
title = getString(R.string.Referencia),
|
||||||
|
@ -398,14 +416,14 @@ class ItemCardFragment(
|
||||||
)
|
)
|
||||||
|
|
||||||
//sergio para itemTypePacking
|
//sergio para itemTypePacking
|
||||||
listItemsRow.add(
|
/* listItemsRow.add(
|
||||||
ItemCardRowVO(
|
ItemCardRowVO(
|
||||||
title = getString(R.string.tipodeencajado),
|
title = getString(R.string.tipodeencajado),
|
||||||
value = itemInfo.itemPackingTypeFk,
|
value = itemInfo.itemPackingTypeFk,
|
||||||
isEditable = true,
|
isEditable = true,
|
||||||
action = "updateSector"
|
action = "updateSector"
|
||||||
)
|
)
|
||||||
)
|
)*/
|
||||||
// listItemsRow.add(ItemCardRowVO(title = "Artículos similares",value = itemInfo.itemPackingTypeFk,isEditable = true, action = "itemProposal"))
|
// listItemsRow.add(ItemCardRowVO(title = "Artículos similares",value = itemInfo.itemPackingTypeFk,isEditable = true, action = "itemProposal"))
|
||||||
|
|
||||||
|
|
||||||
|
@ -697,7 +715,7 @@ class ItemCardFragment(
|
||||||
|
|
||||||
private fun prepareBarcodeDialog(itemB: ItemCardRowVO) {
|
private fun prepareBarcodeDialog(itemB: ItemCardRowVO) {
|
||||||
|
|
||||||
customDialogList.setTitle("Barcodes").setOkButton(getString(R.string.save)) {
|
customDialogList.setTitle(getString(R.string.barcodes)).setOkButton(getString(R.string.save)) {
|
||||||
ma.hideKeyboard(customDialogList.getEditText())
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
if (!customDialogList.getValue().isNullOrEmpty())
|
if (!customDialogList.getValue().isNullOrEmpty())
|
||||||
updateBarcode(customDialogList.getValue(), "0", itemB)
|
updateBarcode(customDialogList.getValue(), "0", itemB)
|
||||||
|
|
|
@ -55,8 +55,6 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
override fun onResponse(call: Call<ItemCardVO>, response: Response<ItemCardVO>) {
|
override fun onResponse(call: Call<ItemCardVO>, response: Response<ItemCardVO>) {
|
||||||
|
|
||||||
// Timber.d("el nombre de la funcion es : "+nameofFunction({ } ))-->devuelve onResponse
|
|
||||||
//Timber.d("el nombre de la funcion es : "+nameofFunction(this))//-->devuelve getItemCard
|
|
||||||
|
|
||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
_itemcard.value = response.body()!!
|
_itemcard.value = response.body()!!
|
||||||
|
|
|
@ -32,6 +32,7 @@ class ItemCardVO (
|
||||||
var urlImage:String = "",
|
var urlImage:String = "",
|
||||||
var itemPackingTypeFk:String =" ",
|
var itemPackingTypeFk:String =" ",
|
||||||
var reference:String="",
|
var reference:String="",
|
||||||
|
var buyer:String="",
|
||||||
|
|
||||||
|
|
||||||
//sergio para modificar la llamada de itemCard a item_getInfo
|
//sergio para modificar la llamada de itemCard a item_getInfo
|
||||||
|
|
|
@ -109,7 +109,7 @@ class BufferLoadFragment(
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage,it.isError,true)
|
ma.messageWithSound(it.errorMessage,it.isError,true)
|
||||||
} else {
|
} else {
|
||||||
|
// sergio: viene de la bbdd así
|
||||||
if (it.response.equals("Registro añadido")){
|
if (it.response.equals("Registro añadido")){
|
||||||
|
|
||||||
ma.messageWithSound(it.response,false,true)
|
ma.messageWithSound(it.response,false,true)
|
||||||
|
@ -132,10 +132,11 @@ class BufferLoadFragment(
|
||||||
|
|
||||||
private fun getTextToPosition(TagsScaned: Int): String {
|
private fun getTextToPosition(TagsScaned: Int): String {
|
||||||
|
|
||||||
return when (TagsScaned) {
|
return getString(R.string.scanBuffer)
|
||||||
1 -> "Escanea buffer"
|
/* when (TagsScaned) {
|
||||||
else -> {"Escanea buffer"}
|
1 -> getString(R.string.scanBuffer)
|
||||||
}
|
else -> {getString(R.string.scanBuffer)}
|
||||||
|
}*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ class BuscarItemFragment(
|
||||||
totalVisible += it.visible.toInt()
|
totalVisible += it.visible.toInt()
|
||||||
}
|
}
|
||||||
binding.mainToolbar.toolbarTitle.text =
|
binding.mainToolbar.toolbarTitle.text =
|
||||||
"Item: " + itemFk + " Total visible: " + totalVisible
|
getString(R.string.item) + itemFk + getString(R.string.visibleTotal) + totalVisible
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ class QaualityFragment(
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
ma.hideBottomNavigation(View.GONE)
|
ma.hideBottomNavigation(View.GONE)
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
binding.mainToolbar.toolbarTitle.text = "itemShelving_BuyerTask"
|
binding.mainToolbar.toolbarTitle.text = getString(R.string.qualityFragment)
|
||||||
setToolBar()
|
setToolBar()
|
||||||
setEvents()
|
setEvents()
|
||||||
super.init()
|
super.init()
|
||||||
|
@ -136,10 +136,10 @@ class QaualityFragment(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.visible.contains("Visible:",ignoreCase = true)){
|
if (item.visible.contains(getString(R.string.visible),ignoreCase = true)){
|
||||||
item.visible = item.visible
|
item.visible = item.visible
|
||||||
}else{
|
}else{
|
||||||
item.visible = "Visible: "+item.visible
|
item.visible = getString(R.string.visible)+item.visible
|
||||||
}
|
}
|
||||||
|
|
||||||
item.iconResourceOk = R.drawable.ic_start_ok
|
item.iconResourceOk = R.drawable.ic_start_ok
|
||||||
|
|
|
@ -74,20 +74,19 @@ class ClaimFragment(
|
||||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun itemShelving_addByClaim(shelvingOrSmarttag: String) {
|
private fun itemShelving_addByClaim(shelving: String) {
|
||||||
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
viewModel.itemShelving_addByClaim(
|
viewModel.itemShelving_addByClaim(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
listClaims.first().toString(),
|
listClaims.first().toString(),
|
||||||
shelvingOrSmarttag
|
shelving
|
||||||
)
|
)
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private fun setEvents() {
|
private fun setEvents() {
|
||||||
|
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
|
@ -138,14 +137,13 @@ class ClaimFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getTextToPosition(TagsScaned: Int): String {
|
private fun getTextToPosition(TagsScaned: Int): String {
|
||||||
var message = "Datos completos"
|
var message = getString(R.string.dataCompllete)
|
||||||
|
|
||||||
when (TagsScaned) {
|
when (TagsScaned) {
|
||||||
1 -> message = "Escanea matrícula"
|
1 -> message = getString(R.string.scanShelving)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return message
|
return message
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -154,8 +152,8 @@ class ClaimFragment(
|
||||||
var message = ""
|
var message = ""
|
||||||
|
|
||||||
when (TagScaned) {
|
when (TagScaned) {
|
||||||
1 -> message = "Reclamación:"
|
1 -> message = getString(R.string.claimLabel)
|
||||||
2 -> message = "Matrícula:"
|
2 -> message = getString(R.string.shelving)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +173,7 @@ class ClaimFragment(
|
||||||
|
|
||||||
private fun showInputClaim() {
|
private fun showInputClaim() {
|
||||||
|
|
||||||
customDialogList.setTitle("Inserta el código de reclamación.")
|
customDialogList.setTitle(getString(R.string.insertClaimCode))
|
||||||
.setOkButton(getString(R.string.end)) {
|
.setOkButton(getString(R.string.end)) {
|
||||||
|
|
||||||
ma.hideKeyboard(customDialogList.getEditText())
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
|
|
@ -49,12 +49,12 @@ class ClaimViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun messageError(message: String,call: String ): ResponseItemVO? {
|
/* fun messageError(message: String,call: String ): ResponseItemVO? {
|
||||||
return ResponseItemVO(
|
return ResponseItemVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = "Error al llamar a " + call + " . Descripción del error:" + message
|
errorMessage = "Error al llamar a " + call + " . Descripción del error:" + message
|
||||||
)
|
)
|
||||||
}
|
}*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,11 @@ class SalixSaleQuantity(
|
||||||
var quantity: Int = 0
|
var quantity: Int = 0
|
||||||
)
|
)
|
||||||
|
|
||||||
|
class sales(
|
||||||
|
var saleId : Int =0,
|
||||||
|
var quantity: Int = 0
|
||||||
|
)
|
||||||
|
|
||||||
class SalesModified(
|
class SalesModified(
|
||||||
var ticketFk:Int=0,
|
var ticketFk:Int=0,
|
||||||
var itemFk:String="",
|
var itemFk:String="",
|
||||||
|
|
|
@ -11,7 +11,8 @@ import android.os.Bundle
|
||||||
import android.speech.SpeechRecognizer
|
import android.speech.SpeechRecognizer
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.View.*
|
import android.view.View.GONE
|
||||||
|
import android.view.View.VISIBLE
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import android.view.inputmethod.InputMethodManager
|
import android.view.inputmethod.InputMethodManager
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
@ -157,9 +158,9 @@ class CollectionFragment(
|
||||||
setEvents()
|
setEvents()
|
||||||
setToolBar()
|
setToolBar()
|
||||||
|
|
||||||
/* if (type == SACADOR && getData(VOZ) != "NO") {
|
/* if (type == SACADOR && getData(VOZ) != "NO") {
|
||||||
setSpeak()
|
setSpeak()
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if (collection.tickets.isNotEmpty()) {
|
if (collection.tickets.isNotEmpty()) {
|
||||||
createCollectionList()
|
createCollectionList()
|
||||||
|
@ -177,8 +178,8 @@ class CollectionFragment(
|
||||||
|
|
||||||
private fun setToolBar() {
|
private fun setToolBar() {
|
||||||
binding.mainToolbar.toolbarSubtitle.visibility = VISIBLE
|
binding.mainToolbar.toolbarSubtitle.visibility = VISIBLE
|
||||||
binding.mainToolbar.toolbarIcons.visibility=VISIBLE
|
binding.mainToolbar.toolbarIcons.visibility = VISIBLE
|
||||||
binding.mainToolbar.backButton.visibility=VISIBLE
|
binding.mainToolbar.backButton.visibility = VISIBLE
|
||||||
|
|
||||||
if (!collection.collectionFk.isNullOrEmpty()) {
|
if (!collection.collectionFk.isNullOrEmpty()) {
|
||||||
binding.mainToolbar.toolbarTitle.text = collection.collectionFk
|
binding.mainToolbar.toolbarTitle.text = collection.collectionFk
|
||||||
|
@ -230,7 +231,7 @@ class CollectionFragment(
|
||||||
iconAdd.drawable -> addItem()
|
iconAdd.drawable -> addItem()
|
||||||
iconWorker.drawable -> showUser()
|
iconWorker.drawable -> showUser()
|
||||||
iconPhone.drawable -> getExtensionFromUser()
|
iconPhone.drawable -> getExtensionFromUser()
|
||||||
iconParking.drawable->pasillerosItemClickListener?.onPasillerosItemClickListener(
|
iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener(
|
||||||
PasillerosItemVO(
|
PasillerosItemVO(
|
||||||
title = getString(R.string.Parking)
|
title = getString(R.string.Parking)
|
||||||
), ""
|
), ""
|
||||||
|
@ -248,16 +249,16 @@ class CollectionFragment(
|
||||||
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
|
|
||||||
/* var working_in_test = true // sergio: en proves app
|
/* var working_in_test = true // sergio: en proves app
|
||||||
|
|
||||||
if (working_in_test) {*/
|
if (working_in_test) {*/
|
||||||
viewModel.sip_getExtensionSalix(getData(TOKEN), workerFkFromTicket)
|
viewModel.sip_getExtensionSalix(getData(TOKEN), workerFkFromTicket)
|
||||||
/* } else {
|
/* } else {
|
||||||
viewModel.sip_getExtension(
|
viewModel.sip_getExtension(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD), workerFkFromTicket, "sip_getExtension"
|
getData(PASSWORD), workerFkFromTicket, "sip_getExtension"
|
||||||
)
|
)
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -402,7 +403,7 @@ class CollectionFragment(
|
||||||
|
|
||||||
if (!goBack) {
|
if (!goBack) {
|
||||||
|
|
||||||
if (it.isError){
|
if (it.isError) {
|
||||||
ma.messageWithSound(
|
ma.messageWithSound(
|
||||||
it.errorMessage,
|
it.errorMessage,
|
||||||
it.isError, true
|
it.isError, true
|
||||||
|
@ -412,22 +413,27 @@ class CollectionFragment(
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
salesModifiedList.observe(viewLifecycleOwner, Observer {
|
responseSplit.observe(viewLifecycleOwner) {
|
||||||
binding.splashProgress.visibility = GONE
|
binding.splashProgress.visibility = GONE
|
||||||
|
|
||||||
if (!goBack) {
|
if (!goBack) {
|
||||||
if (it.list.get(0).isError){
|
|
||||||
ma.messageWithSound((it.list.get(0).errorMessage),true,true,getString(R.string.error),true)
|
|
||||||
|
|
||||||
}else{
|
|
||||||
|
|
||||||
sendRocketWithSalesModified(it.list)
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
if (it.isError) {
|
||||||
|
ma.messageWithSound(
|
||||||
|
it.errorMessage,
|
||||||
|
it.isError, true
|
||||||
|
)
|
||||||
|
}else{
|
||||||
|
ma.messageWithSound(
|
||||||
|
"Split ok",
|
||||||
|
it.isError, false
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
goBack=false
|
|
||||||
})
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
responseItem_updatePackingShelve.observe(viewLifecycleOwner, Observer {
|
responseItem_updatePackingShelve.observe(viewLifecycleOwner, Observer {
|
||||||
binding.splashProgress.visibility = GONE
|
binding.splashProgress.visibility = GONE
|
||||||
|
@ -480,7 +486,8 @@ class CollectionFragment(
|
||||||
if (binding.splashProgress != null) binding.splashProgress.visibility = View.GONE
|
if (binding.splashProgress != null) binding.splashProgress.visibility = View.GONE
|
||||||
// if (!goBack) {
|
// if (!goBack) {
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
customDialog.setTitle(getString(R.string.disponibility)).setDescription(it.errorMessage)
|
customDialog.setTitle(getString(R.string.disponibility))
|
||||||
|
.setDescription(it.errorMessage)
|
||||||
.setKoButton(getString(R.string.close)) {
|
.setKoButton(getString(R.string.close)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
|
@ -503,7 +510,8 @@ class CollectionFragment(
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
collection.collectionFk,
|
collection.collectionFk,
|
||||||
getData(SECTORFK),
|
getData(SECTORFK),
|
||||||
type)
|
type
|
||||||
|
)
|
||||||
|
|
||||||
// //Log.i("VERDNATURA:","La collection es ${collection.collectionFk}")
|
// //Log.i("VERDNATURA:","La collection es ${collection.collectionFk}")
|
||||||
}
|
}
|
||||||
|
@ -518,7 +526,8 @@ class CollectionFragment(
|
||||||
if (binding.splashProgress != null) binding.splashProgress.visibility = View.GONE
|
if (binding.splashProgress != null) binding.splashProgress.visibility = View.GONE
|
||||||
if (!goBack2) {
|
if (!goBack2) {
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
customDialog.setTitle(getString(R.string.error)).setDescription(it.errorMessage)
|
customDialog.setTitle(getString(R.string.error))
|
||||||
|
.setDescription(it.errorMessage)
|
||||||
.setKoButton(getString(R.string.close)) {
|
.setKoButton(getString(R.string.close)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
|
@ -654,7 +663,6 @@ class CollectionFragment(
|
||||||
responseDel.observe(viewLifecycleOwner, Observer {
|
responseDel.observe(viewLifecycleOwner, Observer {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
binding.splashProgress.visibility = GONE
|
binding.splashProgress.visibility = GONE
|
||||||
if (!goBack) {
|
if (!goBack) {
|
||||||
|
@ -738,11 +746,12 @@ class CollectionFragment(
|
||||||
private fun sendRocketWithSalesModified(list: List<SalesModified>) {
|
private fun sendRocketWithSalesModified(list: List<SalesModified>) {
|
||||||
|
|
||||||
|
|
||||||
var message=""
|
var message = ""
|
||||||
|
|
||||||
for (sales in list){
|
for (sales in list) {
|
||||||
message=message+"Se ha modificado la cantidad original del artículo ${sales.itemFk} de ${sales.originalQuantity} a ${sales.newQuantity} del ticket ${sales.ticketFk}"
|
message =
|
||||||
message=message+"\r\n"
|
message + "Se ha modificado la cantidad original del artículo ${sales.itemFk} de ${sales.originalQuantity} a ${sales.newQuantity} del ticket ${sales.ticketFk}"
|
||||||
|
message = message + "\r\n"
|
||||||
|
|
||||||
}
|
}
|
||||||
//Log.d("VERDNATURA::","Persona a enviar "+collection.tickets.get(0).salesPersonFk)
|
//Log.d("VERDNATURA::","Persona a enviar "+collection.tickets.get(0).salesPersonFk)
|
||||||
|
@ -884,7 +893,7 @@ class CollectionFragment(
|
||||||
|
|
||||||
if (type == CONTROLADOR || type == PRECHECKER) {// sergio:cuidado , esta es de lo último para marcar colores
|
if (type == CONTROLADOR || type == PRECHECKER) {// sergio:cuidado , esta es de lo último para marcar colores
|
||||||
markLine(index, type)
|
markLine(index, type)
|
||||||
/// Log.i("VERDNATURA:","marcamos linea")
|
/// Log.i("VERDNATURA:","marcamos linea")
|
||||||
} else if (type == SACADOR) {
|
} else if (type == SACADOR) {
|
||||||
|
|
||||||
if (sale.isPrepared == "0" || sale.isPrepared.isNullOrEmpty()) {
|
if (sale.isPrepared == "0" || sale.isPrepared.isNullOrEmpty()) {
|
||||||
|
@ -1035,9 +1044,9 @@ class CollectionFragment(
|
||||||
parking = txtscan
|
parking = txtscan
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Timber.i("La coleccion es " + tickets[0])
|
Timber.i("La coleccion es %s", tickets[0])
|
||||||
/* if (mpok != null) mpok!!.start()
|
/* if (mpok != null) mpok!!.start()
|
||||||
"Ticket aparcado".toast(requireContext())*/
|
"Ticket aparcado".toast(requireContext())*/
|
||||||
} else {
|
} else {
|
||||||
if (mperror != null) mperror!!.start()
|
if (mperror != null) mperror!!.start()
|
||||||
}
|
}
|
||||||
|
@ -1078,8 +1087,8 @@ class CollectionFragment(
|
||||||
parking = txtscan
|
parking = txtscan
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/* if (mpok != null) mpok!!.start()
|
/* if (mpok != null) mpok!!.start()
|
||||||
getString(R.string.Ticketaparcado).toast(requireContext())*/
|
getString(R.string.Ticketaparcado).toast(requireContext())*/
|
||||||
} else {
|
} else {
|
||||||
if (binding.splashProgress != null) binding.splashProgress.visibility =
|
if (binding.splashProgress != null) binding.splashProgress.visibility =
|
||||||
View.VISIBLE
|
View.VISIBLE
|
||||||
|
@ -1161,8 +1170,8 @@ class CollectionFragment(
|
||||||
parking = txtscan
|
parking = txtscan
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
/* if (mpok != null) mpok!!.start()
|
/* if (mpok != null) mpok!!.start()
|
||||||
"Ticket aparcado".toast(requireContext())*/
|
"Ticket aparcado".toast(requireContext())*/
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (mperror != null) mperror!!.start()
|
if (mperror != null) mperror!!.start()
|
||||||
|
@ -1183,7 +1192,7 @@ class CollectionFragment(
|
||||||
sales[position].pickedQuantity = sales[position].quantity
|
sales[position].pickedQuantity = sales[position].quantity
|
||||||
}
|
}
|
||||||
|
|
||||||
} else if (type == CONTROLADOR )
|
} else if (type == CONTROLADOR)
|
||||||
sales[position].isControlled = if (sales[position].isControlled == "1") "0" else "1"
|
sales[position].isControlled = if (sales[position].isControlled == "1") "0" else "1"
|
||||||
|
|
||||||
if (type == PRECHECKER) {
|
if (type == PRECHECKER) {
|
||||||
|
@ -1215,7 +1224,9 @@ class CollectionFragment(
|
||||||
private fun setListPosition(position: Int, isFromBack: Boolean) {
|
private fun setListPosition(position: Int, isFromBack: Boolean) {
|
||||||
storedPosition = position
|
storedPosition = position
|
||||||
if (type == SACADOR || (type == CONTROLADOR && (getData(SECTORDESCRIP).uppercase() == getString(
|
if (type == SACADOR || (type == CONTROLADOR && (getData(SECTORDESCRIP).uppercase() == getString(
|
||||||
R.string.sectorALGEMESI)))) {
|
R.string.sectorALGEMESI
|
||||||
|
)))
|
||||||
|
) {
|
||||||
if (binding.fragmentSacadorCollections != null) {
|
if (binding.fragmentSacadorCollections != null) {
|
||||||
binding.fragmentSacadorCollections.addViewObserver {
|
binding.fragmentSacadorCollections.addViewObserver {
|
||||||
lm!!.scrollToPositionWithOffset(position, 0)
|
lm!!.scrollToPositionWithOffset(position, 0)
|
||||||
|
@ -1260,7 +1271,7 @@ class CollectionFragment(
|
||||||
if (type != PRECHECKER) {
|
if (type != PRECHECKER) {
|
||||||
|
|
||||||
|
|
||||||
binding.splashProgress.visibility= VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
viewModel.itemShelving_updateFromSale(
|
viewModel.itemShelving_updateFromSale(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
|
@ -1341,8 +1352,11 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
// Log.i("VERDNATURA:","Pulso COGER-1")
|
// Log.i("VERDNATURA:","Pulso COGER-1")
|
||||||
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton(getString(
|
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton(
|
||||||
R.string.take)) {
|
getString(
|
||||||
|
R.string.take
|
||||||
|
)
|
||||||
|
) {
|
||||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||||
if (isNumber(customDialogList.getValue()) && isNumber(total) && customDialogList.getValue()
|
if (isNumber(customDialogList.getValue()) && isNumber(total) && customDialogList.getValue()
|
||||||
.toInt() > total.toInt()
|
.toInt() > total.toInt()
|
||||||
|
@ -1366,19 +1380,19 @@ class CollectionFragment(
|
||||||
if (binding.splashProgress != null) binding.splashProgress.visibility =
|
if (binding.splashProgress != null) binding.splashProgress.visibility =
|
||||||
View.VISIBLE
|
View.VISIBLE
|
||||||
|
|
||||||
/* var working_in_test = true // sergio: en proves app
|
/* var working_in_test = true // sergio: en proves app
|
||||||
if (working_in_test) {*/
|
if (working_in_test) {*/
|
||||||
viewModel.getIdFromCodeSalix(
|
viewModel.getIdFromCodeSalix(
|
||||||
token = getData(USER),
|
token = getData(USER),
|
||||||
code = customDialogList.getValueTwo(),
|
code = customDialogList.getValueTwo(),
|
||||||
)
|
)
|
||||||
/* } else {
|
/* } else {
|
||||||
viewModel.getIdFromCode(
|
viewModel.getIdFromCode(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
code = customDialogList.getValueTwo(), "barcodeToItem"
|
code = customDialogList.getValueTwo(), "barcodeToItem"
|
||||||
)
|
)
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
}
|
}
|
||||||
|
@ -1446,12 +1460,12 @@ class CollectionFragment(
|
||||||
itemShelvingFkStored = itemShelvingFk
|
itemShelvingFkStored = itemShelvingFk
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
|
||||||
/* var working_in_test = true //sergio: en proves app
|
/* var working_in_test = true //sergio: en proves app
|
||||||
if (working_in_test) {*/
|
if (working_in_test) {*/
|
||||||
viewModel.getIdFromCodeSalix(
|
viewModel.getIdFromCodeSalix(
|
||||||
getData(TOKEN),
|
getData(TOKEN),
|
||||||
code = customDialogList.getValueTwo()
|
code = customDialogList.getValueTwo()
|
||||||
)
|
)
|
||||||
/*
|
/*
|
||||||
} else {
|
} else {
|
||||||
viewModel.getIdFromCode(
|
viewModel.getIdFromCode(
|
||||||
|
@ -1809,7 +1823,8 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
customDialog.setTitle("Artículo: " + item.id)
|
customDialog.setTitle("Artículo: " + item.id)
|
||||||
.setDescription("Disponible: " + item.available).setOkButton(getString(R.string.accept)) {
|
.setDescription("Disponible: " + item.available)
|
||||||
|
.setOkButton(getString(R.string.accept)) {
|
||||||
scanRequest()
|
scanRequest()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -1849,28 +1864,18 @@ class CollectionFragment(
|
||||||
goBack = false
|
goBack = false
|
||||||
|
|
||||||
changeTicketState()
|
changeTicketState()
|
||||||
//get_salesModifiedFromTicket()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun get_salesModifiedFromTicket(){
|
|
||||||
|
|
||||||
if (type == CONTROLADOR) {
|
|
||||||
|
|
||||||
viewModel.get_salesModifiedFromTicket(
|
|
||||||
usuario = getData(USER),
|
|
||||||
password = getData(PASSWORD),
|
|
||||||
ticketFk = collection.collectionFk
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun ticketCollection_setUsedShelves() {
|
private fun ticketCollection_setUsedShelves() {
|
||||||
|
|
||||||
|
|
||||||
if (type.equals("CHECKER") && (isMarking && getData(SECTORDESCRIP).uppercase() != getString(R.string.sectorALGEMESI))
|
if (type.equals("CHECKER") && (isMarking && getData(SECTORDESCRIP).uppercase() != getString(
|
||||||
|
R.string.sectorALGEMESI
|
||||||
|
))
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
@ -2065,38 +2070,51 @@ class CollectionFragment(
|
||||||
|
|
||||||
private fun split(position: Int, quantity: String) {
|
private fun split(position: Int, quantity: String) {
|
||||||
|
|
||||||
quantityCollectionSplit = quantity
|
//sergio: SPLIT SALIX
|
||||||
positionCollectionSplit = position
|
/* Log.d("VERDNATURA::", "split")
|
||||||
|
Log.d(
|
||||||
var totalQuantity: Int = 0
|
"VERDNATURA::",
|
||||||
try {
|
"IdTicket-" + sales[position].ticketFk + "-saleFk-" + sales[position].saleFk + "-quant-" + sales[position].quantity
|
||||||
totalQuantity = sales[position].quantity.toInt() - quantity.toInt()
|
|
||||||
} catch (e: Exception) {
|
|
||||||
}
|
|
||||||
viewModel.saleMove(
|
|
||||||
getData(USER),
|
|
||||||
getData(PASSWORD),
|
|
||||||
saleFk = sales[position].saleFk,
|
|
||||||
quantity = totalQuantity.toString(),
|
|
||||||
originalQuantity = sales[position].quantity
|
|
||||||
)
|
)
|
||||||
|
viewModel.transferSalesSalix(
|
||||||
|
getData(TOKEN),
|
||||||
|
ticketFk = sales[position].ticketFk,
|
||||||
|
saleFk = sales[position].saleFk,
|
||||||
|
quantity = quantity
|
||||||
|
)*/
|
||||||
|
|
||||||
/* sales[position].quantity = quantity
|
quantityCollectionSplit = quantity
|
||||||
|
positionCollectionSplit = position
|
||||||
|
|
||||||
if (quantity == "0")
|
var totalQuantity: Int = 0
|
||||||
markLine(position, type)
|
try {
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
totalQuantity = sales[position].quantity.toInt() - quantity.toInt()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
}
|
||||||
|
viewModel.saleMove(
|
||||||
|
getData(USER),
|
||||||
|
getData(PASSWORD),
|
||||||
|
saleFk = sales[position].saleFk,
|
||||||
|
quantity = totalQuantity.toString(),
|
||||||
|
originalQuantity = sales[position].quantity
|
||||||
|
)
|
||||||
|
|
||||||
//enviar mensaje a salix
|
/* sales[position].quantity = quantity
|
||||||
val ticket =
|
|
||||||
"[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
if (quantity == "0")
|
||||||
val message =
|
markLine(position, type)
|
||||||
"Se ha enviado a Split el articulo " + sales[position].itemFk + " del ticket " + ticket
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
viewModel.sendChekingPresence(
|
|
||||||
token = getData(TOKEN),
|
//enviar mensaje a salix
|
||||||
workerId = sales[position].salePersonFk,
|
val ticket =
|
||||||
message = message, "sendChekingPresence"
|
"[" + sales[position].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[position].ticketFk + "/summary)"
|
||||||
)*/
|
val message =
|
||||||
|
"Se ha enviado a Split el articulo " + sales[position].itemFk + " del ticket " + ticket
|
||||||
|
viewModel.sendChekingPresence(
|
||||||
|
token = getData(TOKEN),
|
||||||
|
workerId = sales[position].salePersonFk,
|
||||||
|
message = message, "sendChekingPresence"
|
||||||
|
)*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2285,7 +2303,8 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
|
//sergio:ahora desde encajado
|
||||||
|
// sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
|
||||||
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
viewModel.collectionTicketGet(
|
viewModel.collectionTicketGet(
|
||||||
|
@ -2306,9 +2325,7 @@ class CollectionFragment(
|
||||||
//sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
|
//sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
|
||||||
|
|
||||||
sales[positionIncreaseQuantity].quantity = quantityIncrease
|
sales[positionIncreaseQuantity].quantity = quantityIncrease
|
||||||
/*if (type == CONTROLADOR){
|
|
||||||
showShelving(position,0,quantityPicked)
|
|
||||||
}*/
|
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
}
|
}
|
||||||
saleAdapter?.notifyDataSetChanged()
|
saleAdapter?.notifyDataSetChanged()
|
||||||
|
@ -2320,16 +2337,9 @@ class CollectionFragment(
|
||||||
"Se ha modificado la cantidad original " + sales[positionIncreaseQuantity].originalQuantity + " del artículo " + sales[positionIncreaseQuantity].itemFk + " a nueva cantidad: " + sales[positionIncreaseQuantity].quantity + " del ticket " + ticket
|
"Se ha modificado la cantidad original " + sales[positionIncreaseQuantity].originalQuantity + " del artículo " + sales[positionIncreaseQuantity].itemFk + " a nueva cantidad: " + sales[positionIncreaseQuantity].quantity + " del ticket " + ticket
|
||||||
|
|
||||||
|
|
||||||
sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
|
//sergio: ahora desde encajadores
|
||||||
/* val ticket =
|
// sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
|
||||||
"[" + sales[positionIncreaseQuantity].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionIncreaseQuantity].ticketFk + "/summary)"
|
|
||||||
val message =
|
|
||||||
"Se ha modificado la cantidad original " + sales[positionIncreaseQuantity].originalQuantity + " del artículo " + sales[positionIncreaseQuantity].itemFk + " a nueva cantidad: " + sales[positionIncreaseQuantity].quantity + " del ticket " + ticket
|
|
||||||
viewModel.sendChekingPresence(
|
|
||||||
token = token,
|
|
||||||
workerId = sales[positionIncreaseQuantity].salePersonFk,
|
|
||||||
message = message, "sendChekingPresence"
|
|
||||||
)*/
|
|
||||||
sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
|
sales[positionIncreaseQuantity].originalQuantity = quantityIncrease
|
||||||
|
|
||||||
|
|
||||||
|
@ -2361,12 +2371,12 @@ class CollectionFragment(
|
||||||
)
|
)
|
||||||
|
|
||||||
} else {*/
|
} else {*/
|
||||||
viewModel.collectionIncreaseQuantitySalix(
|
viewModel.collectionIncreaseQuantitySalix(
|
||||||
getData(TOKEN),
|
getData(TOKEN),
|
||||||
saleFk = sales[position].saleFk,
|
saleFk = sales[position].saleFk,
|
||||||
quantity = quantity
|
quantity = quantity
|
||||||
)
|
)
|
||||||
/* }*/
|
/* }*/
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2431,7 +2441,7 @@ class CollectionFragment(
|
||||||
//OTROS
|
//OTROS
|
||||||
private fun showScanner(index: Int, sale: SaleVO) {
|
private fun showScanner(index: Int, sale: SaleVO) {
|
||||||
|
|
||||||
Log.d("VERDNATURA", "Entrant en el show scanner al punxar sobre la sale")
|
//Timber.d("VERDNATURA-Entrant en el show scanner al punxar sobre la sale")
|
||||||
customDialogInput.setTitle("" + sale.itemFk)
|
customDialogInput.setTitle("" + sale.itemFk)
|
||||||
.setDescription(getString(R.string.Escaneaelcarroparaelitemseleccionado))
|
.setDescription(getString(R.string.Escaneaelcarroparaelitemseleccionado))
|
||||||
.setOkButton(getString(R.string.accept)) {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
|
@ -2494,7 +2504,8 @@ class CollectionFragment(
|
||||||
password = getData(PASSWORD),
|
password = getData(PASSWORD),
|
||||||
vSaleFk = mistakeSale?.saleFk!!,
|
vSaleFk = mistakeSale?.saleFk!!,
|
||||||
vUserFk = mistakeSale?.workerFk!!,
|
vUserFk = mistakeSale?.workerFk!!,
|
||||||
vTypeFk = it.id)
|
vTypeFk = it.id
|
||||||
|
)
|
||||||
getString(R.string.errorRegistered).toast(requireContext())
|
getString(R.string.errorRegistered).toast(requireContext())
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,7 @@ package es.verdnatura.presentation.view.feature.collection.fragment
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import es.verdnatura.R
|
||||||
import es.verdnatura.domain.GetLoginUserCase
|
import es.verdnatura.domain.GetLoginUserCase
|
||||||
import es.verdnatura.domain.GetSacadorControladorUserCase
|
import es.verdnatura.domain.GetSacadorControladorUserCase
|
||||||
import es.verdnatura.domain.GetUbicadorUserCase
|
import es.verdnatura.domain.GetUbicadorUserCase
|
||||||
|
@ -22,7 +23,7 @@ import retrofit2.Response
|
||||||
|
|
||||||
class CollectionViewModel(context: Context) : BaseViewModel() {
|
class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
val emptyMessage = "La colección no tiene tickets"
|
val emptyMessage = context.getString(R.string.collectionNoTickets)
|
||||||
|
|
||||||
private val getSacadorControladorUserCase: GetSacadorControladorUserCase =
|
private val getSacadorControladorUserCase: GetSacadorControladorUserCase =
|
||||||
GetSacadorControladorUserCase(context)
|
GetSacadorControladorUserCase(context)
|
||||||
|
@ -87,6 +88,10 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
val responseMissingTrash: LiveData<ResponseItemVO>
|
val responseMissingTrash: LiveData<ResponseItemVO>
|
||||||
get() = _responseMissingTrash
|
get() = _responseMissingTrash
|
||||||
|
|
||||||
|
private val _responseSplit by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
|
val responseSplit: LiveData<ResponseItemVO>
|
||||||
|
get() = _responseSplit
|
||||||
|
|
||||||
private val _responseNew by lazy { MutableLiveData<ResponseItemVO>() }
|
private val _responseNew by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
val responseNew: LiveData<ResponseItemVO>
|
val responseNew: LiveData<ResponseItemVO>
|
||||||
get() = _responseNew
|
get() = _responseNew
|
||||||
|
@ -481,6 +486,10 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
fun saleMove(
|
fun saleMove(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
|
@ -520,6 +529,44 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun transferSalesSalix(
|
||||||
|
token:String,
|
||||||
|
ticketFk:String,
|
||||||
|
saleFk: String,
|
||||||
|
quantity: String,
|
||||||
|
|
||||||
|
) {
|
||||||
|
getSacadorControladorUserCase.transferSalesSalix(
|
||||||
|
token,
|
||||||
|
ticketFk,
|
||||||
|
saleFk,
|
||||||
|
quantity
|
||||||
|
|
||||||
|
).enqueue(object : Callback<Any> {
|
||||||
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
|
_responseSplit.value = ResponseItemVO(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||||
|
if (response.body() == null) {
|
||||||
|
_responseSplit.value = ResponseItemVO(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
_responseSplit.value =
|
||||||
|
ResponseItemVO(isError = false, response = response.message())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
fun collectionMissingTrash(
|
fun collectionMissingTrash(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
|
@ -562,6 +609,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
fun saleTrackingDel(usuario: String, password: String, saleFk: String) {
|
fun saleTrackingDel(usuario: String, password: String, saleFk: String) {
|
||||||
getSacadorControladorUserCase.saleTrackingDel(usuario, password, saleFk)
|
getSacadorControladorUserCase.saleTrackingDel(usuario, password, saleFk)
|
||||||
.enqueue(object : Callback<Any> {
|
.enqueue(object : Callback<Any> {
|
||||||
|
@ -691,66 +739,6 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun get_salesModifiedFromTicket(
|
|
||||||
usuario: String,
|
|
||||||
password: String,
|
|
||||||
ticketFk: String,
|
|
||||||
) {
|
|
||||||
getSacadorControladorUserCase.get_salesModifiedFromTicket(usuario, password, ticketFk)
|
|
||||||
.enqueue(object : Callback<List<SalesModified>> {
|
|
||||||
|
|
||||||
override fun onResponse(
|
|
||||||
call: Call<List<SalesModified>>,
|
|
||||||
response: Response<List<SalesModified>>
|
|
||||||
) {
|
|
||||||
|
|
||||||
if (response.body() != null) {
|
|
||||||
_salesModifiedList.value = response.body()?.let { SalesModifiedList(it) }
|
|
||||||
} else {
|
|
||||||
val listError: ArrayList<SalesModified> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
SalesModified(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
response.message()
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_salesModifiedList.value = SalesModifiedList(listError)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/* if (!response.isSuccessful)
|
|
||||||
{
|
|
||||||
_response.value = ResponseItemVO(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
|
||||||
)
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
_response.value =
|
|
||||||
ResponseItemVO(isError = false, response = "Obtenidos registros")
|
|
||||||
}*/
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onFailure(call: Call<List<SalesModified>>, t: Throwable) {
|
|
||||||
|
|
||||||
val listError: ArrayList<SalesModified> = ArrayList()
|
|
||||||
listError.add(
|
|
||||||
SalesModified(
|
|
||||||
isError = true,
|
|
||||||
errorMessage = getMessageFromAllResponse(
|
|
||||||
nameofFunction(this),
|
|
||||||
t.message!!
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
_salesModifiedList.value = SalesModifiedList(listError)
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fun getIdFromCode(usuario: String, password: String, code: String) {
|
fun getIdFromCode(usuario: String, password: String, code: String) {
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
package es.verdnatura.presentation.view.feature.controlador.fragment
|
package es.verdnatura.presentation.view.feature.controlador.fragment
|
||||||
|
|
||||||
|
|
||||||
import android.content.Intent
|
|
||||||
import android.net.Uri
|
|
||||||
import android.webkit.WebChromeClient
|
import android.webkit.WebChromeClient
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentWebBinding
|
import es.verdnatura.databinding.FragmentWebBinding
|
||||||
|
@ -34,7 +32,7 @@ class WebFragment(
|
||||||
|
|
||||||
binding.webView.setWebChromeClient (WebChromeClient())
|
binding.webView.setWebChromeClient (WebChromeClient())
|
||||||
|
|
||||||
binding.webView.getSettings (). setJavaScriptEnabled (true)
|
//binding.webView.getSettings (). setJavaScriptEnabled (true)
|
||||||
// sergio:deprecated
|
// sergio:deprecated
|
||||||
//webView.getSettings (). setPluginState (WebSettings.PluginState.ON)
|
//webView.getSettings (). setPluginState (WebSettings.PluginState.ON)
|
||||||
val webSettings = binding.webView.settings
|
val webSettings = binding.webView.settings
|
||||||
|
@ -48,18 +46,19 @@ class WebFragment(
|
||||||
webSettings.defaultTextEncodingName = "utf-8"
|
webSettings.defaultTextEncodingName = "utf-8"
|
||||||
|
|
||||||
|
|
||||||
binding.webView.loadUrl ("https://salix.verdnatura.es/#!/item/index")
|
binding.webView.loadUrl ("https://salix.verdnatura.es/#!/item/$entryPoint/summary")
|
||||||
|
|
||||||
val openURL = Intent(Intent.ACTION_VIEW)
|
// val openURL = Intent(Intent.ACTION_VIEW)
|
||||||
// openURL.data = Uri.parse("https://salix.verdnatura.es/#!/ticket/3271614/tracking/index")
|
// openURL.data = Uri.parse("https://salix.verdnatura.es/#!/ticket/3271614/tracking/index")
|
||||||
openURL.data = Uri.parse("https://salix.verdnatura.es/#!/item/index")
|
// openURL.data = Uri.parse("https://salix.verdnatura.es/#!/item/index")
|
||||||
startActivity(openURL)
|
// startActivity(openURL)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun setToolbar() {
|
private fun setToolbar() {
|
||||||
|
|
||||||
binding.mainToolbar.toolbarTitle.text = entryPoint
|
binding.mainToolbar.toolbarTitle.text = getString(R.string.item)+entryPoint
|
||||||
|
// binding.splashProgress.visibility= View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -331,20 +331,14 @@ class ControlVehiculoFragment(
|
||||||
if (it.response == "false") {
|
if (it.response == "false") {
|
||||||
|
|
||||||
customDialog.setTitle(getString(R.string.error))
|
customDialog.setTitle(getString(R.string.error))
|
||||||
.setDescription("Revisar llamada del registro de vehículos")
|
.setDescription(getString(R.string.reviewCAllhistorical))
|
||||||
.setOkButton(getString(R.string.close)) {
|
.setOkButton(getString(R.string.close)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (it.response == "true") {
|
if (it.response == "true") {
|
||||||
//Log.i(TD,"insertado registro")
|
|
||||||
//"Acción registrada correctamente".toast(context)
|
|
||||||
/* customDialog.setTitle("Llamada correcta")
|
|
||||||
.setDescription("Acción registrada satisfactoriamente")
|
|
||||||
.setOkButton(getString(R.string.close)) {
|
|
||||||
customDialog.dismiss()
|
|
||||||
}.show()*/
|
|
||||||
ma.openFragmentPickers(true)
|
ma.openFragmentPickers(true)
|
||||||
//ma.onPasillerosItemClickListener( PasillerosItemVO(title = "Sacadores"),"CONTROL")
|
//ma.onPasillerosItemClickListener( PasillerosItemVO(title = "Sacadores"),"CONTROL")
|
||||||
//checkControlTimeVehicle()
|
//checkControlTimeVehicle()
|
||||||
|
@ -394,8 +388,8 @@ class ControlVehiculoFragment(
|
||||||
|
|
||||||
}.show()*/
|
}.show()*/
|
||||||
customDialogInput.setTitle(getString(R.string.vehiclecontrol))
|
customDialogInput.setTitle(getString(R.string.vehiclecontrol))
|
||||||
.setDescription("Escanea la matrícula del vehículo o elige sin vehículo")
|
.setDescription(getString(R.string.scanPlate))
|
||||||
.setOkButton("Coger vehículo") {
|
.setOkButton(getString(R.string.takeVehicle)) {
|
||||||
if (customDialogInput.getValue().isNotEmpty()) {
|
if (customDialogInput.getValue().isNotEmpty()) {
|
||||||
// "$description ${customDialogInput.getValue()} OK".toast(requireContext())
|
// "$description ${customDialogInput.getValue()} OK".toast(requireContext())
|
||||||
insertControlTimeVehicle(customDialogInput.getValue(), "IN")
|
insertControlTimeVehicle(customDialogInput.getValue(), "IN")
|
||||||
|
@ -406,7 +400,7 @@ class ControlVehiculoFragment(
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
}
|
}
|
||||||
|
|
||||||
.setKoButton("Sin vehículo") {
|
.setKoButton(getString(R.string.noVehicle)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
ma.openFragmentPickers(true)
|
ma.openFragmentPickers(true)
|
||||||
/* if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
|
/* if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
|
||||||
|
|
|
@ -119,7 +119,7 @@ class DayOfSaleFragment(
|
||||||
|
|
||||||
if (it.list.isEmpty()){
|
if (it.list.isEmpty()){
|
||||||
customDialog.setTitle(getString(R.string.noResults))
|
customDialog.setTitle(getString(R.string.noResults))
|
||||||
.setDescription("No hay nada vendido para el carro escaneado. ")
|
.setDescription(getString(R.string.wagoonNoSaleToday))
|
||||||
.setOkButton(getString(R.string.close)) {
|
.setOkButton(getString(R.string.close)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
@ -148,7 +148,7 @@ class DayOfSaleFragment(
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
customDialog.setTitle("Información").setDescription("Parking ok").setOkButton(getString(R.string.close)) {
|
customDialog.setTitle(getString(R.string.info)).setDescription(getString(R.string.parkingOk)).setOkButton(getString(R.string.close)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
|
||||||
|
@ -163,7 +163,7 @@ class DayOfSaleFragment(
|
||||||
|
|
||||||
private fun showParking() {
|
private fun showParking() {
|
||||||
|
|
||||||
customDialogList.setTitle("Escanea el parking")
|
customDialogList.setTitle(getString(R.string.showParking))
|
||||||
.setOkButton(getString(R.string.close)) {
|
.setOkButton(getString(R.string.close)) {
|
||||||
|
|
||||||
ma.hideKeyboard(customDialogList.getEditText())
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
|
|
@ -50,7 +50,7 @@ class DayOfSaleViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
}
|
}
|
||||||
if (response.body() != null){
|
if (response.body() != null){
|
||||||
i("crea la lista "+response.body())
|
|
||||||
_itemShelvingSaleDateList.value = response.body()?.let { ItemShelvingSaleDateList(it)
|
_itemShelvingSaleDateList.value = response.body()?.let { ItemShelvingSaleDateList(it)
|
||||||
}
|
}
|
||||||
i("finalizada la lista ${response.body()}")
|
i("finalizada la lista ${response.body()}")
|
||||||
|
|
|
@ -55,7 +55,7 @@ class itemShelvingLogViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
if (response.body() != null)
|
if (response.body() != null)
|
||||||
{
|
{
|
||||||
i("crea la lista " + response.body())
|
i("crea la lista %s", response.body())
|
||||||
_itemShelvingLogList.value = response.body()?.let {
|
_itemShelvingLogList.value = response.body()?.let {
|
||||||
ItemShelvingLogList(it)
|
ItemShelvingLogList(it)
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,6 +19,7 @@ import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.hideKeyboard
|
import es.verdnatura.presentation.common.hideKeyboard
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||||
|
import kotlinx.coroutines.*
|
||||||
import java.lang.Boolean.TRUE
|
import java.lang.Boolean.TRUE
|
||||||
import kotlin.system.exitProcess
|
import kotlin.system.exitProcess
|
||||||
|
|
||||||
|
@ -65,21 +66,34 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
"base_url",
|
"base_url",
|
||||||
binding.edittextServer.text.toString()
|
binding.edittextServer.text.toString()
|
||||||
)
|
)
|
||||||
if (binding.edittextServer.text!!.contains("test-app.verdnatura.es")){
|
if (binding.edittextServer.text!!.contains("test-app.verdnatura.es")) {
|
||||||
saveData(
|
|
||||||
"base_urlSalix",
|
|
||||||
"https://test-salix.verdnatura.es/api/"
|
|
||||||
)
|
|
||||||
}else{
|
|
||||||
saveData(
|
saveData(
|
||||||
"base_urlSalix",
|
"base_urlSalix",
|
||||||
"https://salix.verdnatura.es/api/"
|
"https://salix.verdnatura.es/api/"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
saveData(
|
||||||
|
"base_urlSalix",
|
||||||
|
/*working_in_test*/
|
||||||
|
"https://test-salix.verdnatura.es/api/"
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
"${getString(R.string.serverSalix)}${getData("base_urlSalix")})".toast(
|
||||||
|
requireContext()
|
||||||
|
)
|
||||||
this.hideKeyboard()
|
this.hideKeyboard()
|
||||||
//sergio: deberia lanzar la funcion nueva creada por mi restartapp de BaseFragment. Pero no vuelve a arrancar
|
|
||||||
exitProcess(0)
|
CoroutineScope(Dispatchers.IO).launch {
|
||||||
|
delay(2000)
|
||||||
|
withContext(Dispatchers.Main) {
|
||||||
|
exitProcess(0)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
false
|
false
|
||||||
|
@ -140,7 +154,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
) {
|
) {
|
||||||
val openURL = Intent(Intent.ACTION_VIEW)
|
val openURL = Intent(Intent.ACTION_VIEW)
|
||||||
openURL.data =
|
openURL.data =
|
||||||
// sergio REdmine Tarea #3730
|
// sergio Redmine Tarea #3730
|
||||||
//Uri.parse("https://app.verdnatura.es/bin/vn-picking.apk")
|
//Uri.parse("https://app.verdnatura.es/bin/vn-picking.apk")
|
||||||
Uri.parse(it.url)
|
Uri.parse(it.url)
|
||||||
//Log.d("VERDNATURA::","Datos"+ openURL.data)
|
//Log.d("VERDNATURA::","Datos"+ openURL.data)
|
||||||
|
@ -203,7 +217,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
deviceLog_add(
|
deviceLog_add(
|
||||||
binding.edittextUsername.text.toString(),
|
binding.edittextUsername.text.toString(),
|
||||||
binding.edittextPassword.text.toString(),
|
binding.edittextPassword.text.toString(),
|
||||||
getString(R.string.app_name),
|
getString(R.string.logAppName),
|
||||||
getInfoVersionNameApp(),
|
getInfoVersionNameApp(),
|
||||||
getData(ANDROID_ID)
|
getData(ANDROID_ID)
|
||||||
)
|
)
|
||||||
|
@ -227,7 +241,8 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
}
|
}
|
||||||
if (it.vIsAuthorized == "1" && !it.vMessage.isNullOrEmpty()) {
|
if (it.vIsAuthorized == "1" && !it.vMessage.isNullOrEmpty()) {
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
customDialog.setTitle(getString(R.string.info)).setDescription(it.vMessage)
|
customDialog.setTitle(getString(R.string.info))
|
||||||
|
.setDescription(it.vMessage)
|
||||||
.setOkButton(getString(R.string.close)) {
|
.setOkButton(getString(R.string.close)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
/* binding.splashProgress.visibility = View.VISIBLE
|
/* binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
|
|
@ -122,7 +122,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isWorkingInDesign():Boolean{
|
/* fun isWorkingInDesign():Boolean{
|
||||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||||
val working= prefs.getInt("working_in_design", -1)
|
val working= prefs.getInt("working_in_design", -1)
|
||||||
return working != -1
|
return working != -1
|
||||||
|
@ -139,7 +139,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}*/
|
||||||
|
|
||||||
fun havePrinter(): Boolean {
|
fun havePrinter(): Boolean {
|
||||||
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
val prefs: SharedPreferences = getSharedPreferences("es.verdnatura.user.prefs", 0)
|
||||||
|
@ -496,7 +496,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
}
|
}
|
||||||
"Histórico Shelving" -> {
|
"Histórico Shelving" -> {
|
||||||
addFragmentOnTop(itemShelvingLogFragment.newInstance("Histórico Shelving"))
|
addFragmentOnTop(itemShelvingLogFragment.newInstance("Histórico Shelving"))
|
||||||
d("VERDNATURA::", "es el historico ")
|
Timber.tag("VERDNATURA::").d("es el historico ")
|
||||||
}
|
}
|
||||||
"Log Shelving" -> {
|
"Log Shelving" -> {
|
||||||
addFragmentOnTop(shelvingLogFragment.newInstance("Log Shelving"))
|
addFragmentOnTop(shelvingLogFragment.newInstance("Log Shelving"))
|
||||||
|
@ -562,6 +562,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
override fun onComprobarPalletViewClickListener(
|
override fun onComprobarPalletViewClickListener(
|
||||||
itemTruck: ItemExpeditionTruckVO,
|
itemTruck: ItemExpeditionTruckVO,
|
||||||
itemPallet: ItemPalletVO
|
itemPallet: ItemPalletVO
|
||||||
|
@ -578,8 +579,6 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
|
|
||||||
|
|
||||||
override fun onCollectionSelected(collection: CollectionVO, type: String) {
|
override fun onCollectionSelected(collection: CollectionVO, type: String) {
|
||||||
// fm.popBackStack()
|
|
||||||
|
|
||||||
|
|
||||||
when (type) {
|
when (type) {
|
||||||
PREITEMPICKER -> {
|
PREITEMPICKER -> {
|
||||||
|
@ -643,6 +642,11 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
|
|
||||||
addFragmentOnTop(ExpeditionStateFragment.newInstance("Consultar estado expedición"))
|
addFragmentOnTop(ExpeditionStateFragment.newInstance("Consultar estado expedición"))
|
||||||
|
|
||||||
|
}
|
||||||
|
fun openFragmentWeb(url:String) {
|
||||||
|
|
||||||
|
addFragmentOnTop(WebFragment.newInstance(url))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun hideBottomNavigation(visible: Int) {
|
fun hideBottomNavigation(visible: Int) {
|
||||||
|
|
|
@ -20,12 +20,12 @@ class PasilleroViewModel : BaseViewModel() {
|
||||||
PasillerosItemVO(20,
|
PasillerosItemVO(20,
|
||||||
R.drawable.barcode_scan,
|
R.drawable.barcode_scan,
|
||||||
"Asociar Sacador SmartTags",R.string.SmarttagAssociate)
|
"Asociar Sacador SmartTags",R.string.SmarttagAssociate)
|
||||||
)
|
) */
|
||||||
_pasillerositem.add(
|
_pasillerositem.add(
|
||||||
PasillerosItemVO(21,
|
PasillerosItemVO(21,
|
||||||
R.drawable.barcode_scan,
|
R.drawable.barcode_scan,
|
||||||
"Registrar SmartTags",R.string.SmarttagRegister)
|
"Registrar SmartTags",R.string.SmarttagRegister)
|
||||||
)*/
|
)
|
||||||
|
|
||||||
|
|
||||||
//sergio para que aparezca el nuevo menu
|
//sergio para que aparezca el nuevo menu
|
||||||
|
|
|
@ -403,7 +403,7 @@ class EndSacadorFragment(
|
||||||
|
|
||||||
private fun responseSaleMoveSuccesful() {
|
private fun responseSaleMoveSuccesful() {
|
||||||
|
|
||||||
Log.d("VERDNATURA::", "responseSaleMove succesful")
|
//Timber.d("responseSaleMove succesful")
|
||||||
try {
|
try {
|
||||||
sales[positionCollectionSplit].saldo = quantityCollectionSplit.toInt()
|
sales[positionCollectionSplit].saldo = quantityCollectionSplit.toInt()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -697,12 +697,12 @@ class EndSacadorFragment(
|
||||||
var isOk = false
|
var isOk = false
|
||||||
|
|
||||||
for (saleVO in sales) {
|
for (saleVO in sales) {
|
||||||
Log.d("VERDNATURA::", "El item buscado es " + saleVO.itemFk)
|
//Timber.tag("VERDNATURA::").d("El item buscado es " + saleVO.itemFk)
|
||||||
if (saleVO.quantity != saleVO.picked) {
|
if (saleVO.quantity != saleVO.picked) {
|
||||||
//1- Por carro
|
//1- Por carro
|
||||||
var shelvingIndex = 0
|
var shelvingIndex = 0
|
||||||
for (placementVO in saleVO.carros) {
|
for (placementVO in saleVO.carros) {
|
||||||
Log.d("VERDNATURA::", "La matric " + placementVO.shelving)
|
//Timber.tag("VERDNATURA::").d("La matric " + placementVO.shelving)
|
||||||
if (txtscan.uppercase() == placementVO.shelving.uppercase()) {
|
if (txtscan.uppercase() == placementVO.shelving.uppercase()) {
|
||||||
if (mpok != null) mpok!!.start()
|
if (mpok != null) mpok!!.start()
|
||||||
isOk = true
|
isOk = true
|
||||||
|
@ -1556,7 +1556,7 @@ class EndSacadorFragment(
|
||||||
"sendChekingPresence"
|
"sendChekingPresence"
|
||||||
)
|
)
|
||||||
|
|
||||||
Log.d("VERDNATURA", "el trabajador es " + sales[position].salesPersonFk)
|
//Timber.d("VERDNATURA").d("el trabajador es " + sales[position].salesPersonFk)
|
||||||
try {
|
try {
|
||||||
sales[position].saldo = quantity.toInt()
|
sales[position].saldo = quantity.toInt()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
|
|
@ -396,7 +396,7 @@ class PreSacadorFragment :
|
||||||
ticket = ticketFk
|
ticket = ticketFk
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
|
||||||
d("VERDNATURA::", "ticket:" + ticket)
|
//Timber.d("ticket:" + ticket)
|
||||||
viewModel.ticketToPrePrepare(
|
viewModel.ticketToPrePrepare(
|
||||||
usuario = getData(USER),
|
usuario = getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
|
@ -525,12 +525,12 @@ class PreSacadorFragment :
|
||||||
var isOk = false
|
var isOk = false
|
||||||
//Timber.tag("VERDNATURA::").d("Entramos a buscar")
|
//Timber.tag("VERDNATURA::").d("Entramos a buscar")
|
||||||
for (saleVO in sales) {
|
for (saleVO in sales) {
|
||||||
d("VERDNATURA::", "El item buscado es " + saleVO.itemFk)
|
//Timber.tag("VERDNATURA::").d("El item buscado es " + saleVO.itemFk)
|
||||||
if (saleVO.quantity != saleVO.picked) {
|
if (saleVO.quantity != saleVO.picked) {
|
||||||
//1- Por carro
|
//1- Por carro
|
||||||
var shelvingIndex = 0
|
var shelvingIndex = 0
|
||||||
for (placementVO in saleVO.carros) {
|
for (placementVO in saleVO.carros) {
|
||||||
d("VERDNATURA::", "La matric " + placementVO.shelving)
|
//Timber.tag("VERDNATURA::").d("La matric " + placementVO.shelving)
|
||||||
if (txtscan.uppercase() == placementVO.shelving.uppercase()) {
|
if (txtscan.uppercase() == placementVO.shelving.uppercase()) {
|
||||||
if (mpok != null) mpok!!.start()
|
if (mpok != null) mpok!!.start()
|
||||||
isOk = true
|
isOk = true
|
||||||
|
|
|
@ -561,7 +561,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.d("VERDNATURA", "error " + e.message)
|
//Log.d("error " + e.message)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -685,7 +685,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
.enqueue(object :
|
.enqueue(object :
|
||||||
Callback<List<PreSacadorItemVO>> {
|
Callback<List<PreSacadorItemVO>> {
|
||||||
override fun onFailure(call: Call<List<PreSacadorItemVO>>, t: Throwable) {
|
override fun onFailure(call: Call<List<PreSacadorItemVO>>, t: Throwable) {
|
||||||
d("VERDNATURA::", "ha fallado")
|
//Timber.tag("VERDNATURA::").d("ha fallado")
|
||||||
_salesList.value = listOf()
|
_salesList.value = listOf()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -694,7 +694,7 @@ class PreSacadorViewModel(context: Context) : BaseViewModel() {
|
||||||
response: Response<List<PreSacadorItemVO>>
|
response: Response<List<PreSacadorItemVO>>
|
||||||
) {
|
) {
|
||||||
if (response.body() != null) {
|
if (response.body() != null) {
|
||||||
d("VERDNATURA::", "entra con lineas")
|
//Timber.d("entra con lineas")
|
||||||
_salesList.value = response.body()?.let { it }
|
_salesList.value = response.body()?.let { it }
|
||||||
} else {
|
} else {
|
||||||
d("VERDNATURA::", "ES NULO")
|
d("VERDNATURA::", "ES NULO")
|
||||||
|
|
|
@ -19,7 +19,6 @@ import es.verdnatura.presentation.common.*
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
import es.verdnatura.presentation.view.component.CustomDialogInput
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogThreeButtons
|
|
||||||
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
||||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||||
|
@ -586,9 +585,9 @@ class ReposicionFragment : BaseFragment<ReposicionFragmentBinding, ReposicionVie
|
||||||
private fun unMarkLine(position: Int) {
|
private fun unMarkLine(position: Int) {
|
||||||
|
|
||||||
if (sales[position].quantity == sales[position].picked) {
|
if (sales[position].quantity == sales[position].picked) {
|
||||||
customDialog.setTitle("Desmarcar linea")
|
customDialog.setTitle(getString(R.string.unmarkLine))
|
||||||
.setDescription("Vas a desmarcar la linea: " + sales[position].itemFk + " ¿Estás seguro?")
|
.setDescription(getString(R.string.goUnmark) + sales[position].itemFk + getString(R.string.sure))
|
||||||
.setOkButton("Desmarcar") {
|
.setOkButton(getString(R.string.unmark)) {
|
||||||
sales[position].picked = 0
|
sales[position].picked = 0
|
||||||
saleAdapter!!.notifyDataSetChanged()
|
saleAdapter!!.notifyDataSetChanged()
|
||||||
|
|
||||||
|
|
|
@ -19,9 +19,10 @@ import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import es.verdnatura.presentation.view.feature.sacador.adapter.CollectionAdapter
|
import es.verdnatura.presentation.view.feature.sacador.adapter.CollectionAdapter
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||||
import es.verdnatura.presentation.view.feature.smarttag.sacador.fragment.AssociateSmartTagsFragment
|
import es.verdnatura.presentation.view.feature.smarttag.sacador.fragment.AssociateSmartTagsFragment
|
||||||
import java.lang.Boolean.TRUE
|
|
||||||
|
|
||||||
|
|
||||||
|
private var getCollections = false
|
||||||
|
|
||||||
class SacadorFragment :
|
class SacadorFragment :
|
||||||
BaseFragment<FragmentSacadorBinding, SacadorViewModel>(SacadorViewModel::class) {
|
BaseFragment<FragmentSacadorBinding, SacadorViewModel>(SacadorViewModel::class) {
|
||||||
|
|
||||||
|
@ -32,7 +33,6 @@ class SacadorFragment :
|
||||||
private var collectionsList: ArrayList<CollectionVO> = ArrayList()
|
private var collectionsList: ArrayList<CollectionVO> = ArrayList()
|
||||||
private var adapter: CollectionAdapter? = null
|
private var adapter: CollectionAdapter? = null
|
||||||
private var resultTagMode: String? = ""
|
private var resultTagMode: String? = ""
|
||||||
private var getCollections = false
|
|
||||||
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
@ -49,23 +49,35 @@ class SacadorFragment :
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
|
|
||||||
//viewModel.smartTagInsertTicket("571974")
|
//viewModel.smartTagInsertTicket("577387")
|
||||||
|
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
binding.splashProgressTwo.visibility = View.GONE
|
binding.splashProgressTwo.visibility = View.GONE
|
||||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.getcollection)
|
binding.mainToolbar.toolbarTitle.text = getString(R.string.getcollection)
|
||||||
setToolBar()
|
setToolBar()
|
||||||
setEvents()
|
setEvents()
|
||||||
|
|
||||||
/*var working_in_test=false //sergio: Ok en app
|
//Log.d("VERDNATURA::","getCollections es "+ getCollections)
|
||||||
|
if (getCollections) {
|
||||||
|
viewModel.collection_new_smart(
|
||||||
|
getData(USER),
|
||||||
|
getData(PASSWORD),
|
||||||
|
getData(SECTORFK),
|
||||||
|
getData(WAGON),
|
||||||
|
getData(TAGSTYPE)
|
||||||
|
)
|
||||||
|
//getCollections = false
|
||||||
|
} else {
|
||||||
|
var working_in_test=false //sergio: Ok en app
|
||||||
|
if (!working_in_test) {
|
||||||
|
viewModel.collectionGetSalix(token = getData(TOKEN))
|
||||||
|
}else{
|
||||||
|
viewModel.collectionGet( getData(USER),
|
||||||
|
getData(PASSWORD))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (!working_in_test) {*/
|
|
||||||
viewModel.collectionGetSalix(token = getData(TOKEN))
|
|
||||||
/* }else{
|
|
||||||
viewModel.collectionGet( getData(USER),
|
|
||||||
getData(PASSWORD),"collection_get")
|
|
||||||
}*/
|
|
||||||
|
|
||||||
super.init()
|
super.init()
|
||||||
|
|
||||||
|
@ -75,26 +87,24 @@ class SacadorFragment :
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
|
|
||||||
setFragmentResultListener("requestKey") { requestKey, bundle ->
|
setFragmentResultListener("requestKey") { requestKey, bundle ->
|
||||||
|
|
||||||
val result = bundle.getString("tagMode")
|
val result = bundle.getString("tagMode")
|
||||||
|
|
||||||
|
//Timber.d("VERDNATURA::").d("el result es " + result)
|
||||||
|
|
||||||
resultTagMode = result
|
resultTagMode = result
|
||||||
if (result.equals("complete")) {
|
|
||||||
getCollections = TRUE
|
|
||||||
}
|
|
||||||
|
|
||||||
if (result.equals("complete") && getData(TAGSTYPE).equals("SmartTags")) {
|
if (result.equals("complete") && getData(TAGSTYPE).equals("SmartTags")) {
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
getCollections = true
|
||||||
viewModel.collection_new_smart(
|
|
||||||
getData(USER),
|
|
||||||
getData(PASSWORD),
|
|
||||||
getData(SECTORFK),
|
|
||||||
getData(WAGON),
|
|
||||||
getData(TAGSTYPE)
|
|
||||||
)
|
|
||||||
|
|
||||||
|
//Timber.d("VERDNATURA::").d("el getCollections es " + getCollections)
|
||||||
|
} else {
|
||||||
|
getCollections = false
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPause() {
|
override fun onPause() {
|
||||||
|
@ -148,10 +158,10 @@ class SacadorFragment :
|
||||||
private fun setEvents() {
|
private fun setEvents() {
|
||||||
binding.sacadorSwipe.setOnRefreshListener {
|
binding.sacadorSwipe.setOnRefreshListener {
|
||||||
viewModel.collectionGetSalix(token = getData(TOKEN))
|
viewModel.collectionGetSalix(token = getData(TOKEN))
|
||||||
/* viewModel.collectionGet(
|
/* viewModel.collectionGet(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD)
|
getData(PASSWORD)
|
||||||
)*/
|
)*/
|
||||||
binding.sacadorSwipe.isRefreshing = false
|
binding.sacadorSwipe.isRefreshing = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -163,13 +173,12 @@ class SacadorFragment :
|
||||||
if (getData(TAGSTYPE).equals("Stickers")) {
|
if (getData(TAGSTYPE).equals("Stickers")) {
|
||||||
viewModel.collectionNew(
|
viewModel.collectionNew(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD), getData(SECTORFK), getData(WAGON)
|
getData(PASSWORD),
|
||||||
|
getData(SECTORFK),
|
||||||
|
getData(WAGON)
|
||||||
)
|
)
|
||||||
} else {
|
} else if (getCollections) {
|
||||||
Log.d("VERDNATURA::", "ResultMode" + resultTagMode)
|
Log.d("VERDNATURA::","getCollections sobrevive")
|
||||||
if (resultTagMode.equals("complete")) {
|
|
||||||
|
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
|
||||||
viewModel.collection_new_smart(
|
viewModel.collection_new_smart(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
|
@ -177,16 +186,14 @@ class SacadorFragment :
|
||||||
getData(WAGON),
|
getData(WAGON),
|
||||||
getData(TAGSTYPE)
|
getData(TAGSTYPE)
|
||||||
)
|
)
|
||||||
/* viewModel.collectionNew(getData(USER),
|
|
||||||
getData(PASSWORD), getData(SECTORFK), getData(WAGON),"collection_new_wagon")
|
|
||||||
*/
|
|
||||||
} else {
|
} else {
|
||||||
requireActivity().addFragment(
|
requireActivity().addFragment(
|
||||||
AssociateSmartTagsFragment.newInstance(AssociateSmartTagsFragment.TAG),
|
AssociateSmartTagsFragment.newInstance(AssociateSmartTagsFragment.TAG),
|
||||||
R.id.main_frame_layout,
|
R.id.main_frame_layout,
|
||||||
AssociateSmartTagsFragment.TAG
|
AssociateSmartTagsFragment.TAG
|
||||||
)
|
)
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +234,7 @@ class SacadorFragment :
|
||||||
goBack = false
|
goBack = false
|
||||||
//sergio:para asegurarnos que aparece en pantalla.
|
//sergio:para asegurarnos que aparece en pantalla.
|
||||||
|
|
||||||
var working_in_test = false //sergio: ok en app SACADOR
|
val working_in_test = false //sergio: ok en app SACADOR
|
||||||
if (!working_in_test) {
|
if (!working_in_test) {
|
||||||
viewModel.collectionGetSalix(token = getData(TOKEN))
|
viewModel.collectionGetSalix(token = getData(TOKEN))
|
||||||
} else {
|
} else {
|
||||||
|
@ -237,15 +244,17 @@ class SacadorFragment :
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
responseCollectionSmart.observe(viewLifecycleOwner,Observer{
|
responseCollectionSmart.observe(viewLifecycleOwner, Observer {
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
Log.d("VERDNATURA::","Entramos a hacer el inserttt")
|
|
||||||
|
getCollections=false
|
||||||
|
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
|
|
||||||
|
// viewModel.smartTagInsertTicket(it.response)
|
||||||
} else {
|
} else {
|
||||||
ma.messageWithSound(it.errorMessage, false, false)
|
ma.messageWithSound(it.errorMessage, false, false)
|
||||||
// Log.d("VERDNATURA::", "La colec a insertTicket es " + it.response)
|
|
||||||
viewModel.smartTagInsertTicket(it.response)
|
viewModel.smartTagInsertTicket(it.response)
|
||||||
|
|
||||||
goBack = false
|
goBack = false
|
||||||
|
@ -258,9 +267,10 @@ class SacadorFragment :
|
||||||
if (!goBack) {
|
if (!goBack) {
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
|
getCollections=true
|
||||||
} else {
|
} else {
|
||||||
ma.messageWithSound(it.errorMessage, false, false)
|
ma.messageWithSound(it.errorMessage, false, false)
|
||||||
|
getCollections=false
|
||||||
viewModel.collectionGetSalix(getData(TOKEN))
|
viewModel.collectionGetSalix(getData(TOKEN))
|
||||||
}
|
}
|
||||||
goBack = false
|
goBack = false
|
||||||
|
|
|
@ -13,9 +13,10 @@ import es.verdnatura.presentation.common.OnCollectionSelectedListener
|
||||||
import es.verdnatura.presentation.view.feature.precontrol.ShowTicketViewModel
|
import es.verdnatura.presentation.view.feature.precontrol.ShowTicketViewModel
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||||
|
|
||||||
class ShowTicketFragment(var menuOrigin: String) : BaseFragment<FragmentControladorBinding, ShowTicketViewModel>(
|
class ShowTicketFragment(var menuOrigin: String) :
|
||||||
ShowTicketViewModel::class
|
BaseFragment<FragmentControladorBinding, ShowTicketViewModel>(
|
||||||
) {
|
ShowTicketViewModel::class
|
||||||
|
) {
|
||||||
|
|
||||||
private var goBack: Boolean = false
|
private var goBack: Boolean = false
|
||||||
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
|
private var onCollectionSelectedListener: OnCollectionSelectedListener? = null
|
||||||
|
@ -24,7 +25,7 @@ class ShowTicketFragment(var menuOrigin: String) : BaseFragment<FragmentControla
|
||||||
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance(menuOrigin: String) = ShowTicketFragment(menuOrigin=menuOrigin)
|
fun newInstance(menuOrigin: String) = ShowTicketFragment(menuOrigin = menuOrigin)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onAttach(context: Context) {
|
override fun onAttach(context: Context) {
|
||||||
|
@ -36,7 +37,9 @@ class ShowTicketFragment(var menuOrigin: String) : BaseFragment<FragmentControla
|
||||||
|
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.verticket)
|
binding.mainToolbar.toolbarTitle.text = getString(R.string.verticket)
|
||||||
if (menuOrigin =="main"){hideBackButton(binding.mainToolbar)}
|
if (menuOrigin == "main") {
|
||||||
|
hideBackButton(binding.mainToolbar)
|
||||||
|
}
|
||||||
|
|
||||||
setEvents()
|
setEvents()
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ class RegisterSmartTagsFragment(
|
||||||
|
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
|
|
||||||
Log.d("VERDNATURA::","El selvingORSmarttag es "+shelvingOrSmarttag)
|
// Log.d("VERDNATURA::","El selvingORSmarttag es "+shelvingOrSmarttag)
|
||||||
if (listSmartTags.size < 1) {
|
if (listSmartTags.size < 1) {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -127,22 +127,7 @@ class RegisterSmartTagsFragment(
|
||||||
smartAdapter!!.notifyDataSetChanged()
|
smartAdapter!!.notifyDataSetChanged()
|
||||||
customDialogList.setValue("")
|
customDialogList.setValue("")
|
||||||
}
|
}
|
||||||
private fun bindShelving_remove() {
|
|
||||||
|
|
||||||
// binding.splashProgress.visibility = VISIBLE
|
|
||||||
//poner el unbindshleving aqui
|
|
||||||
//sergio:esto se debe hacer en
|
|
||||||
|
|
||||||
|
|
||||||
("http://localhost:7777/unbindShelving/${listSmartTags.first().code}" + "&" + listSmartTags.last().code + "&${listSmartTags.size}").toast(
|
|
||||||
requireContext()
|
|
||||||
)
|
|
||||||
|
|
||||||
listSmartTags.removeAt(listSmartTags.size - 1)
|
|
||||||
smartAdapter!!.notifyDataSetChanged()
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun scanRequest() {
|
private fun scanRequest() {
|
||||||
if (binding.scanInput != null) {
|
if (binding.scanInput != null) {
|
||||||
|
@ -217,10 +202,10 @@ class RegisterSmartTagsFragment(
|
||||||
var message = ""
|
var message = ""
|
||||||
|
|
||||||
when (TagsScaned) {
|
when (TagsScaned) {
|
||||||
1 -> message = "Escanea etiqueta superior"
|
1 -> message = getString(R.string.scanHighLabel)
|
||||||
2 -> message = "Escanea etiqueta del medio"
|
2 -> message = getString(R.string.scanMedLabel)
|
||||||
3 -> message = "Escanea etiqueta inferior"
|
3 -> message = getString(R.string.scanLowLabel)
|
||||||
4 -> message = "Carro escaneado"
|
4 -> message = getString(R.string.scannedWagon)
|
||||||
}
|
}
|
||||||
|
|
||||||
return message
|
return message
|
||||||
|
@ -243,7 +228,7 @@ class RegisterSmartTagsFragment(
|
||||||
|
|
||||||
private fun showScanSmartTags() {
|
private fun showScanSmartTags() {
|
||||||
|
|
||||||
customDialogList.setTitle("Escanea matrícula del carro y etiquetas smartTags de arriba a abajo.")
|
customDialogList.setTitle(getString(R.string.scanUpToDown))
|
||||||
.setOkButton(getString(R.string.end)) {
|
.setOkButton(getString(R.string.end)) {
|
||||||
|
|
||||||
ma.hideKeyboard(customDialogList.getEditText())
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
@ -295,16 +280,16 @@ class RegisterSmartTagsFragment(
|
||||||
|
|
||||||
if (listSmartTags.size > 3) {
|
if (listSmartTags.size > 3) {
|
||||||
|
|
||||||
customDialog.setTitle("Atención")
|
customDialog.setTitle(getString(R.string.info))
|
||||||
.setDescription("Carro escaneado completamente.¿Registrar otro carro?")
|
.setDescription(getString(R.string.registerOneWagoon))
|
||||||
.setOkButton("Ok")
|
.setOkButton(getString(R.string.accept))
|
||||||
{
|
{
|
||||||
listSmartTags.clear()
|
listSmartTags.clear()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
showScanSmartTags()
|
showScanSmartTags()
|
||||||
|
|
||||||
}
|
}
|
||||||
.setKoButton("Salir") {
|
.setKoButton(getString(R.string.exit)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
customDialogList.dismiss()
|
customDialogList.dismiss()
|
||||||
requireActivity().onBackPressed()
|
requireActivity().onBackPressed()
|
||||||
|
|
|
@ -152,7 +152,7 @@ class AssociateSmartTagsFragment(
|
||||||
// Log.i("VERDNATURA::", "Revisar llamada de las etiquetas smarttags : ${it.response}")
|
// Log.i("VERDNATURA::", "Revisar llamada de las etiquetas smarttags : ${it.response}")
|
||||||
|
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage,true,false)
|
ma.messageWithSound("Asegúrate de escanear una matrícula."+it.errorMessage,true,false)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,17 @@ import android.os.Message
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import androidx.lifecycle.LiveData
|
import androidx.lifecycle.LiveData
|
||||||
import androidx.lifecycle.MutableLiveData
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import com.google.gson.JsonObject
|
||||||
import es.verdnatura.domain.GetSmarttagsUserCase
|
import es.verdnatura.domain.GetSmarttagsUserCase
|
||||||
import es.verdnatura.domain.GetVehicleControlTimeUserCase
|
import es.verdnatura.domain.GetVehicleControlTimeUserCase
|
||||||
import es.verdnatura.domain.NodeJsService
|
import es.verdnatura.domain.NodeJsService
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
|
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||||
|
import es.verdnatura.presentation.base.nameofFunction
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
|
import es.verdnatura.presentation.view.feature.login.model.errorMessage
|
||||||
import es.verdnatura.presentation.view.feature.smarttag.sacador.model.SmartTagRegister
|
import es.verdnatura.presentation.view.feature.smarttag.sacador.model.SmartTagRegister
|
||||||
|
import org.json.JSONObject
|
||||||
|
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.Callback
|
import retrofit2.Callback
|
||||||
|
@ -50,13 +55,13 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
||||||
GetSmarttagsUserCase.workerShelving_add(usuario,password,shelvingFK).enqueue(object : Callback<Void>{
|
GetSmarttagsUserCase.workerShelving_add(usuario,password,shelvingFK).enqueue(object : Callback<Void>{
|
||||||
override fun onFailure(call: Call<Void>, t: Throwable) {
|
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||||
|
|
||||||
_responseadd.value = messageError(t.message!!,"workerShelving_add")
|
_responseadd.value = messageError(t.message!!, nameofFunction(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||||
|
|
||||||
if (!response.isSuccessful){
|
if (!response.isSuccessful){
|
||||||
_responseadd.value = messageError(response.message(),"workerShelving_add")
|
_responseadd.value = messageError(response.message(),nameofFunction(this))
|
||||||
}else{
|
}else{
|
||||||
_responseadd.value = ResponseItemVO(isError = false,response = response.message()!!)
|
_responseadd.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||||
}
|
}
|
||||||
|
@ -96,11 +101,6 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
||||||
_responseremove.value = ResponseItemVO(isError = false,response = response.message()!!)
|
_responseremove.value = ResponseItemVO(isError = false,response = response.message()!!)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (response.body() == null){
|
|
||||||
_responseremove.value = ResponseItemVO(isError = true,errorMessage = "Error al borrar matrícula o etiqueta")
|
|
||||||
}else{
|
|
||||||
_responseremove.value = ResponseItemVO(isError = false,response = response.body()!!)
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
||||||
val responseSmart: SmartTagRegister
|
val responseSmart: SmartTagRegister
|
||||||
|
|
||||||
if (response.isSuccessful()){
|
if (response.isSuccessful()){
|
||||||
//Log.i("VERDNATURA::","El mensaje es "+response.message())
|
Log.d("VERDNATURA::","El mensaje es "+response.errorBody())
|
||||||
responseSmart = SmartTagRegister(
|
responseSmart = SmartTagRegister(
|
||||||
message="Registrada smartTag.",
|
message="Registrada smartTag.",
|
||||||
isError = false,
|
isError = false,
|
||||||
|
@ -129,13 +129,16 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
||||||
)
|
)
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
// sergio: buscar JSON obtindre el "message" Smarttag
|
||||||
|
var text = JSONObject(response.errorBody()!!.string()).get("error")
|
||||||
|
var message =JSONObject(text.toString()).get("message")
|
||||||
|
|
||||||
responseSmart = SmartTagRegister(
|
responseSmart = SmartTagRegister(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = response.message()
|
errorMessage = message.toString()
|
||||||
)
|
)
|
||||||
|
|
||||||
Log.d("VERDNATURA::","El mensaje es el error nodejs es ${response.errorBody()} "+response.raw()+ "-"+ response.message())
|
//Log.d("VERDNATURA::","" +message)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -147,7 +150,7 @@ class SmartTagsViewModel(context: Context) : BaseViewModel() {
|
||||||
val responseSmart =
|
val responseSmart =
|
||||||
SmartTagRegister(isError = true, errorMessage = t.message!!)
|
SmartTagRegister(isError = true, errorMessage = t.message!!)
|
||||||
|
|
||||||
//Log.i("VERDNATURA::","el error nodejs es "+t.message+"--"+t.cause.toString()+"--"+t.stackTrace.toString())
|
Log.d("VERDNATURA::","el error nodejs es "+t.message+"--"+t.cause.toString()+"--"+t.stackTrace.toString())
|
||||||
|
|
||||||
_registerSmarttagNode.value = responseSmart
|
_registerSmarttagNode.value = responseSmart
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ class TransferenciaViewModel(context: Context) : BaseViewModel() {
|
||||||
val response: LiveData<ResponseItemVO>
|
val response: LiveData<ResponseItemVO>
|
||||||
get() = _response
|
get() = _response
|
||||||
|
|
||||||
fun itemShelvingTransfer(usuario:String,password:String,itemFk:String,shelvingFk:String){
|
/* fun itemShelvingTransfer(usuario:String,password:String,itemFk:String,shelvingFk:String){
|
||||||
getUbicadorUserCase.itemShelvingTransfer(usuario,password,itemFk,shelvingFk).enqueue(object :
|
getUbicadorUserCase.itemShelvingTransfer(usuario,password,itemFk,shelvingFk).enqueue(object :
|
||||||
Callback<Any> {
|
Callback<Any> {
|
||||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
|
@ -32,5 +32,5 @@ class TransferenciaViewModel(context: Context) : BaseViewModel() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package es.verdnatura.presentation.view.feature.ubicador.adapter
|
package es.verdnatura.presentation.view.feature.ubicador.adapter
|
||||||
|
|
||||||
|
import android.provider.Settings.Global.getString
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
@ -62,7 +63,7 @@ class UbicadorAdapter (
|
||||||
onMoreClickListener.onMoreClickListener(item)
|
onMoreClickListener.onMoreClickListener(item)
|
||||||
}
|
}
|
||||||
namelayout.setOnClickListener {
|
namelayout.setOnClickListener {
|
||||||
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = "Consultar artículo"),item.item)
|
onPasillerosItemClickListener.onPasillerosItemClickListener(PasillerosItemVO(title = res.getString(R.string.itemSearch)),item.item)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -236,7 +236,7 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.editImg.setOnClickListener {
|
binding.editImg.setOnClickListener {
|
||||||
customDialogInput.setTitle("Cambiar matrícula").setValue("").setOkButton(getString(R.string.save)) {
|
customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("").setOkButton(getString(R.string.save)) {
|
||||||
viewModel.shelvingChange(
|
viewModel.shelvingChange(
|
||||||
getData(USER),
|
getData(USER),
|
||||||
getData(PASSWORD),
|
getData(PASSWORD),
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
<vector android:height="24dp" android:viewportHeight="40"
|
||||||
|
android:viewportWidth="40" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="#88bd32"
|
||||||
|
android:pathData="m27.583,4.083c0.25,-0.083 0.5,-0.167 0.75,-0.167L39,2.5l-0.167,6.083c-0.167,5 -3.083,9.5 -6.667,10.5 -0.25,0.083 -0.5,0.167 -0.75,0.167L20.75,20.667l0.167,-6.083c0.167,-5.083 3.083,-9.5 6.667,-10.5z" android:strokeWidth="0.83333331"/>
|
||||||
|
<path android:fillColor="#88bd32"
|
||||||
|
android:pathData="m5.917,24.917c0.167,-0.083 0.417,-0.083 0.583,-0.083L14.25,23.75 14.167,28.083C14.083,31.75 11.917,35 9.333,35.75c-0.25,0.083 -0.417,0.083 -0.583,0.083L1,36.917 1.083,32.5c0.167,-3.583 2.25,-6.917 4.833,-7.583z" android:strokeWidth="0.83333331"/>
|
||||||
|
<path android:fillColor="#f7931e"
|
||||||
|
android:pathData="m10,40c-0.333,0 -0.583,-0.25 -0.583,-0.5 0,-0.333 0.167,-0.583 0.5,-0.667 0,0 2.5,-0.25 4.583,-2.833 2.5,-3.167 3.417,-8.417 2.5,-15.333C16.083,13.583 17.167,8.083 20.083,4.417 23.167,0.5 27.083,0 27.25,0c0.333,0 0.583,0.167 0.667,0.5 0,0.333 -0.167,0.583 -0.5,0.667 0,0 -3.583,0.5 -6.333,3.917 -2.75,3.5 -3.667,8.667 -2.833,15.417 0.917,7.333 0,12.833 -2.833,16.25 -2.333,2.917 -5.167,3.25 -5.417,3.25 0.083,0 0.083,0 0,0z" android:strokeColor="#00000000"/>
|
||||||
|
</vector>
|
|
@ -32,7 +32,7 @@
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textColorHint="@color/verdnatura_white"
|
android:textColorHint="@color/verdnatura_white"
|
||||||
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
android:layout_height="@dimen/itemcard_image_height"
|
android:layout_height="@dimen/itemcard_image_height"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/loadphoto" />
|
android:src="@drawable/loadphoto" />
|
||||||
<!-- TAGS ======================================================================================================= -->
|
<!-- TAGS ======================================================================================================= -->
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -59,7 +59,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1.25">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:layout_weight="1">
|
android:layout_weight="1.1">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -154,9 +154,37 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_weight="1">
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
<TextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/buyer"
|
||||||
|
android:textColor="@color/verdnatura_brown_grey"
|
||||||
|
android:textSize="@dimen/body2"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginEnd="@dimen/layout_margin_min"/>
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/itemcard_buyer"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="buyer"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
<!-- VALORES ================================================================================================== -->
|
<!-- VALORES ================================================================================================== -->
|
||||||
<RelativeLayout
|
<RelativeLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
@ -175,12 +203,12 @@
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
|
|
||||||
' <include
|
' <include
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,34 +8,15 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/verdnatura_black">
|
android:background="@color/verdnatura_black">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/scan"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:textColorHint="@android:color/darker_gray"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputEditText
|
|
||||||
android:id="@+id/scan_input"
|
|
||||||
style="@style/InputLineTextSearch"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:backgroundTint="@android:color/white"
|
|
||||||
android:hint="@string/Escaneaetiqueta"
|
|
||||||
android:inputType="text"
|
|
||||||
android:lines="1"
|
|
||||||
android:maxLines="1"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textColorHint="@android:color/darker_gray" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
|
|
||||||
' <include
|
<include
|
||||||
android:id="@+id/main_toolbar"
|
android:id="@+id/main_toolbar"
|
||||||
layout="@layout/toolbar_fragment"
|
layout="@layout/toolbar_fragment"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:visibility="gone"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -45,25 +26,27 @@
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
android:background="@color/verdnatura_black_8_alpha_6"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
android:gravity="center">
|
android:gravity="center">
|
||||||
|
|
||||||
|
|
||||||
|
<WebView
|
||||||
|
android:id="@+id/webView"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_marginTop="30dp"
|
||||||
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
<com.airbnb.lottie.LottieAnimationView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
android:layout_height="@dimen/verdnatura_logo_large_height"
|
||||||
|
android:visibility="invisible"
|
||||||
app:lottie_autoPlay="true"
|
app:lottie_autoPlay="true"
|
||||||
app:lottie_loop="true"
|
app:lottie_loop="true"
|
||||||
app:lottie_rawRes="@raw/orange_loading"
|
app:lottie_rawRes="@raw/orange_loading"
|
||||||
app:lottie_speed="2" />
|
app:lottie_speed="2" />
|
||||||
|
|
||||||
<WebView
|
|
||||||
android:id="@+id/webView"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent" />
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -191,7 +191,7 @@
|
||||||
<string name="undone">Deshacer</string>
|
<string name="undone">Deshacer</string>
|
||||||
<string name="labels">Etiquetas: </string>
|
<string name="labels">Etiquetas: </string>
|
||||||
<string name="nameApp">warehouse</string>
|
<string name="nameApp">warehouse</string>
|
||||||
<string name="scanSmarttagOrShelving">Escanea etiqueta/s electrónica/s o matrícula/s</string>
|
<string name="scanSmarttagOrShelving">Escanea matrícula del carro/s</string>
|
||||||
<string name="scanHighLabel">Escanea etiqueta superior</string>
|
<string name="scanHighLabel">Escanea etiqueta superior</string>
|
||||||
<string name="scanMedLabel">Escanea etiqueta del medio</string>
|
<string name="scanMedLabel">Escanea etiqueta del medio</string>
|
||||||
<string name="scanLowLabel">Escanea etiqueta inferior</string>
|
<string name="scanLowLabel">Escanea etiqueta inferior</string>
|
||||||
|
@ -280,4 +280,32 @@
|
||||||
<string name="fault">Falta</string>
|
<string name="fault">Falta</string>
|
||||||
<string name="trash">Basura</string>
|
<string name="trash">Basura</string>
|
||||||
<string name="errorNotNumber">El elemento introducido no es un número</string>
|
<string name="errorNotNumber">El elemento introducido no es un número</string>
|
||||||
|
<string name="buyer">Comprador</string>
|
||||||
|
<string name="accessSalix">Accede a Salix para ver más información</string>
|
||||||
|
<string name="item">"Ítem : "</string>
|
||||||
|
<string name="changeShelving">Cambiar matrícula</string>
|
||||||
|
<string name="registerOneWagoon">Carro escaneado completamente.¿Registrar otro carro?</string>
|
||||||
|
<string name="exit">Salir</string>
|
||||||
|
<string name="scanUpToDown">Escanea matrícula del carro y etiquetas smartTags de arriba a abajo.</string>
|
||||||
|
<string name="visible">Visible:</string>
|
||||||
|
<string name="visibleTotal"> Total visible: </string>
|
||||||
|
<string name="printerUpdated">Impresora actualizada</string>
|
||||||
|
<string name="sectorUpdated">sector actualizado</string>
|
||||||
|
<string name="logAppName">warehouse</string>
|
||||||
|
<string name="base_urlSalix">base_urlSalix</string>
|
||||||
|
<string name="serverSalix">Apuntando a servidor Salix ( </string>
|
||||||
|
<string name="qualityFragment">itemShelving_BuyerTask</string>
|
||||||
|
<string name="dataCompllete">Datos completos</string>
|
||||||
|
<string name="claimLabel">Reclamación:</string>
|
||||||
|
<string name="shelving">Matrícula:</string>
|
||||||
|
<string name="insertClaimCode">Inserta el código de reclamación.</string>
|
||||||
|
<string name="scanBuffer">Escanea buffer</string>
|
||||||
|
<string name="barcodes">Barcodes</string>
|
||||||
|
<string name="collectionNoTickets">La colección no tiene tickets</string>
|
||||||
|
<string name="reviewCAllhistorical">Revisar llamada del registro de vehículos</string>
|
||||||
|
<string name="takeVehicle">Coger vehículo</string>
|
||||||
|
<string name="noVehicle">Sin vehículo</string>
|
||||||
|
<string name="wagoonNoSaleToday">\"No hay nada vendido para el carro escaneado. \"</string>
|
||||||
|
<string name="parkingOk">Parking ok</string>
|
||||||
|
<string name="showParking">Escanea el parking</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -190,7 +190,7 @@
|
||||||
<string name="undone">Deshacer</string>
|
<string name="undone">Deshacer</string>
|
||||||
<string name="labels">Etiquetas: </string>
|
<string name="labels">Etiquetas: </string>
|
||||||
<string name="nameApp">warehouse</string>
|
<string name="nameApp">warehouse</string>
|
||||||
<string name="scanSmarttagOrShelving">Escanea etiqueta/s electrónica/s o matrícula/s</string>
|
<string name="scanSmarttagOrShelving">Escanea matrícula del carro/s</string>
|
||||||
<string name="scanHighLabel">Escanea etiqueta superior</string>
|
<string name="scanHighLabel">Escanea etiqueta superior</string>
|
||||||
<string name="scanMedLabel">Escanea etiqueta del medio</string>
|
<string name="scanMedLabel">Escanea etiqueta del medio</string>
|
||||||
<string name="scanLowLabel">Escanea etiqueta inferior</string>
|
<string name="scanLowLabel">Escanea etiqueta inferior</string>
|
||||||
|
@ -279,5 +279,34 @@
|
||||||
<string name="fault">Falta</string>
|
<string name="fault">Falta</string>
|
||||||
<string name="trash">Basura</string>
|
<string name="trash">Basura</string>
|
||||||
<string name="errorNotNumber">El elemento introducido no es un número</string>
|
<string name="errorNotNumber">El elemento introducido no es un número</string>
|
||||||
|
<string name="buyer">Buyer</string>
|
||||||
|
<string name="accessSalix">Accede a Salix para ver más información</string>
|
||||||
|
<string name="item">"Ítem : "</string>
|
||||||
|
<string name="changeShelving">Cambiar matrícula</string>
|
||||||
|
<string name="registerOneWagoon">Carro escaneado completamente.¿Registrar otro carro?</string>
|
||||||
|
<string name="exit">Salir</string>
|
||||||
|
<string name="scanUpToDown">Escanea matrícula del carro y etiquetas smartTags de arriba a abajo.</string>
|
||||||
|
<string name="visible">Visible:</string>
|
||||||
|
<string name="visibleTotal"> Total visible: </string>
|
||||||
|
<string name="printerUpdated">Impresora actualizada</string>
|
||||||
|
<string name="sectorUpdated">sector actualizado</string>
|
||||||
|
<string name="logAppName">warehouse</string>
|
||||||
|
<string name="base_urlSalix">base_urlSalix</string>
|
||||||
|
<string name="serverSalix">Apuntando a servidor Salix (</string>
|
||||||
|
<string name="qualityFragment">itemShelving_BuyerTask</string>
|
||||||
|
<string name="dataCompllete">Datos completos</string>
|
||||||
|
<string name="claimLabel">Reclamación:</string>
|
||||||
|
<string name="shelving">Matrícula:</string>
|
||||||
|
<string name="insertClaimCode">Inserta el código de reclamación.</string>
|
||||||
|
<string name="scanBuffer">Escanea buffer</string>
|
||||||
|
<string name="barcodes">Barcodes</string>
|
||||||
|
<string name="collectionNoTickets">La colección no tiene tickets</string>
|
||||||
|
<string name="reviewCAllhistorical">Revisar llamada del registro de vehículos</string>
|
||||||
|
<string name="takeVehicle">Coger vehículo</string>
|
||||||
|
<string name="noVehicle">Sin vehículo</string>
|
||||||
|
<string name="wagoonNoSaleToday">\"No hay nada vendido para el carro escaneado. \"</string>
|
||||||
|
<string name="parkingOk">Parking ok</string>
|
||||||
|
<string name="showParking">Escanea el parking</string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue