version 23.18.2Beta - Solucionado doble pitido, fusionada pantalla sacador, filtro a ubicador, quitado baldas.

This commit is contained in:
Sergio De la torre 2023-05-11 11:52:19 +02:00
parent a63cbb8f08
commit 0bf19d0da0
40 changed files with 1036 additions and 251 deletions

View File

@ -83,20 +83,47 @@
</select>
</component>
<component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="refs #4979">
<change afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt" afterDir="false" />
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="version 23.18.2Beta - Solucionado doble pitido, fusionada pantalla sacador, filtro a ubicador, quitado baldas.">
<change afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/adapters/ExpeditionLoadUnloadAdapter.kt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_confirm.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_loadunload_delivery.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_expedition_loadunload_row.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/app/src/main/res/raw/errorrepeat.mp3" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/beta/release/output-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/beta/release/output-metadata.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/AndroidManifest.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/RestClient.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/RestClient.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixServiceMessages.kt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/category/ChangeCategoryFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/category/ChangeCategoryFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPreChecker.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/InfoCompany.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/InfoCompany.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/viewmodels/DeliveryViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/viewmodels/DeliveryViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packingHolland/fragment/PackingHollandFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packingHolland/fragment/PackingHollandFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/model/ItemExpeditionTruckVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/model/ItemExpeditionTruckVO.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/EndSacadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/presacador/fragment/PreSacadorViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/SacadorViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/showticket/ShowTicketFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/showticket/ShowTicketFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/showticket/ShowTicketViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/sacador/fragment/showticket/ShowTicketViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/AutomaticAddItemViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/model/ItemUbicadorVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/model/ItemUbicadorVO.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_escaner_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_escaner_row.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/navigation/nav_graph.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/navigation/nav_graph.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/values/dimens.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/dimens.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -253,8 +280,9 @@
&quot;ScreenRecorder.SavePath&quot;: &quot;C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4&quot;,
&quot;android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED&quot;: &quot;RecyclerView&quot;,
&quot;cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;com.developerphil.adbidea.selecteddevices&quot;: &quot;21114523025303&quot;,
&quot;com.google.services.firebase.aqiPopupShown&quot;: &quot;true&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout&quot;,
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
&quot;project.structure.proportion&quot;: &quot;0.17&quot;,
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
@ -274,11 +302,11 @@
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app\src\main\res\layout" />
<recent name="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app\src\main\res\raw" />
<recent name="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app\src\main\res\drawable" />
<recent name="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app\src\main\java\es\verdnatura\presentation\view\feature" />
<recent name="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app\src\main\res\layout" />
<recent name="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app\src\main\res\drawable-v24" />
<recent name="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app\src\main\res\raw" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="C:\Users\sergiodt\AndroidStudioProjects\vn-warehouseManager\app\src\main\res\drawable" />
@ -295,11 +323,11 @@
<recent name="es.verdnatura.presentation.view.feature.buffer.fragment" />
</key>
<key name="CopyKotlinDeclarationDialog.RECENTS_KEY">
<recent name="es.verdnatura.presentation.view.feature.delivery.adapters" />
<recent name="es.verdnatura.presentation.view.feature.delivery.fragments" />
<recent name="es.verdnatura.presentation.view.feature.packingHolland" />
<recent name="es.verdnatura.domain" />
<recent name="es.verdnatura.presentation.view.feature.packaging.fragment" />
<recent name="es.verdnatura.presentation.view.component" />
<recent name="es.verdnatura.presentation.view.feature.inventario.adapter" />
</key>
</component>
<component name="RunManager" selected="Android App.app">
@ -409,27 +437,6 @@
<option name="presentableId" value="Default" />
<updated>1618825571576</updated>
</task>
<task id="LOCAL-00083" summary="Version 9.2.1 Refactor Inicio">
<created>1664790614473</created>
<option name="number" value="00083" />
<option name="presentableId" value="LOCAL-00083" />
<option name="project" value="LOCAL" />
<updated>1664790614473</updated>
</task>
<task id="LOCAL-00084" summary="Version 9.2.1 Refactor Inicio, pintar a través del rgb, modificado diseño,se añade shelvingLog y muestra colección a través de ticket">
<created>1665032465280</created>
<option name="number" value="00084" />
<option name="presentableId" value="LOCAL-00084" />
<option name="project" value="LOCAL" />
<updated>1665032465281</updated>
</task>
<task id="LOCAL-00085" summary="Version 9.2.1 Modificado fragment">
<created>1665037437997</created>
<option name="number" value="00085" />
<option name="presentableId" value="LOCAL-00085" />
<option name="project" value="LOCAL" />
<updated>1665037437997</updated>
</task>
<task id="LOCAL-00086" summary="Version 9.2.1 Modificado fragment a fragment_general">
<created>1665038575752</created>
<option name="number" value="00086" />
@ -752,7 +759,28 @@
<option name="project" value="LOCAL" />
<updated>1682575765188</updated>
</task>
<option name="localTasksCounter" value="132" />
<task id="LOCAL-00132" summary="refs #4815">
<created>1683107082308</created>
<option name="number" value="00132" />
<option name="presentableId" value="LOCAL-00132" />
<option name="project" value="LOCAL" />
<updated>1683107082308</updated>
</task>
<task id="LOCAL-00133" summary="refs #5430">
<created>1683114511357</created>
<option name="number" value="00133" />
<option name="presentableId" value="LOCAL-00133" />
<option name="project" value="LOCAL" />
<updated>1683114511357</updated>
</task>
<task id="LOCAL-00134" summary="refs #5442">
<created>1683183005751</created>
<option name="number" value="00134" />
<option name="presentableId" value="LOCAL-00134" />
<option name="project" value="LOCAL" />
<updated>1683183005751</updated>
</task>
<option name="localTasksCounter" value="135" />
<servers />
</component>
<component name="Vcs.Log.History.Properties">
@ -853,10 +881,6 @@
</component>
<component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="Version 23.2-Fallo item_card" />
<MESSAGE value="Version 23.2 Modificado orden ubicador y revisión anterior falta activar icono" />
<MESSAGE value="Version 23.2 Modificado actualizar pantalla al transferir en Ubicador. Subida version" />
<MESSAGE value="Activado impresion labelCount" />
<MESSAGE value="Quitar procedimiento refs #4661" />
<MESSAGE value="Reclycler extra y agrupacion previa" />
<MESSAGE value="refs #5117 Autoconsumo" />
@ -878,28 +902,13 @@
<MESSAGE value="version 23.14.1" />
<MESSAGE value="refs #5004" />
<MESSAGE value="refs #4979" />
<option name="LAST_COMMIT_MESSAGE" value="refs #4979" />
<MESSAGE value="refs #4815" />
<MESSAGE value="refs #5430" />
<MESSAGE value="refs #5442" />
<MESSAGE value="version 23.18.2Beta - Solucionado doble pitido, fusionada pantalla sacador, filtro a ubicador, quitado baldas." />
<option name="LAST_COMMIT_MESSAGE" value="version 23.18.2Beta - Solucionado doble pitido, fusionada pantalla sacador, filtro a ubicador, quitado baldas." />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" type="kotlin-line">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragment.kt</url>
<line>313</line>
<option name="timeStamp" value="5" />
</line-breakpoint>
<line-breakpoint enabled="true" type="kotlin-line">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapter.kt</url>
<line>353</line>
<option name="timeStamp" value="8" />
</line-breakpoint>
<line-breakpoint enabled="true" type="kotlin-line">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPicker.kt</url>
<line>125</line>
<option name="timeStamp" value="17" />
</line-breakpoint>
</breakpoints>
</breakpoint-manager>
<pin-to-top-manager>
<pinned-members>
<PinnedItemInfo parentTag="java.net.SocketException" memberName="detailMessage" />

View File

@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 180,
"versionName": "23.14Beta",
"versionCode": 183,
"versionName": "23.18.2Beta",
"outputFile": "app-beta-release.apk"
}
],

View File

@ -13,8 +13,8 @@ android {
applicationId "es.verdnatura"
minSdkVersion 24 //21
targetSdkVersion 33
versionCode 180
versionName = "23.14Beta"
versionCode 184
versionName = "23.18.2Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View File

@ -5,11 +5,9 @@ import android.content.Context
open class RestClient(context: Context) {
var restClient: VerdnaturaService
var salixClient: SalixService
var salixClientSend:SalixServiceSend
init {
restClient = ApiUtils.getApiService(context)
salixClient = ApiSalixUtils.getApiService(context)
salixClientSend = ApiSalixUtilsSend.getApiService(context)
}
}

View File

@ -25,7 +25,7 @@ interface SalixService {
):
Call<LoginSalixVO>
@POST("chats/sendCheckingPresence")
/* @POST("chats/sendCheckingPresence")
fun sendChekingPresence(
@Body params: SalixMessageVO
):
@ -35,7 +35,7 @@ interface SalixService {
fun sendGroup(
@Body params: SalixGrupo
):
Call<Boolean>
Call<Boolean>*/
@GET("collections/getSectors")
fun getSectorsSalix(

View File

@ -1,18 +0,0 @@
package es.verdnatura.domain
import es.verdnatura.presentation.view.feature.login.model.SalixMessageVO
import retrofit2.Call
import retrofit2.http.Body
import retrofit2.http.Header
import retrofit2.http.POST
interface SalixServiceMessages {
@POST("chats/sendCheckingPresence")
fun sendChekingPresence(
@Header("Content-Type") content_type: String,
@Header("Authorization") authorization: String,
@Body params: SalixMessageVO
):
Call<Boolean>
}

View File

@ -11,9 +11,7 @@ import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
import es.verdnatura.presentation.view.feature.calidad.model.BuyerVO
import es.verdnatura.presentation.view.feature.calidad.model.ItemBuyerVO
import es.verdnatura.presentation.view.feature.collection.SalesModified
import es.verdnatura.presentation.view.feature.delivery.model.DeliveryInfo
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLog
import es.verdnatura.presentation.view.feature.delivery.model.RouteDelivery
import es.verdnatura.presentation.view.feature.delivery.model.*
import es.verdnatura.presentation.view.feature.diadeventa.model.ItemShelvingSaleDate
import es.verdnatura.presentation.view.feature.historicoarticulo.model.ItemHistoricoVO
import es.verdnatura.presentation.view.feature.historicoshelving.model.ItemShelvingLog
@ -38,6 +36,7 @@ import retrofit2.http.Body
import retrofit2.http.Header
import retrofit2.http.POST
@JvmSuppressWildcards
interface VerdnaturaService {
@ -849,7 +848,7 @@ interface VerdnaturaService {
@POST("delivery/expeditionState_add")//NO SALIX
fun expeditionState_add(
@Body vararg params: Any
@Body vararg params: Any?
):
Call<Void>
@ -859,5 +858,9 @@ interface VerdnaturaService {
):
Call<List<DeliveryInfo>>
@POST("/delivery/getExpeditionFromRoute")
fun getExpeditionFromRoute(
@Body vararg params: Any
): Call<List<ExpeditionInfoLoadUnload>>
}

View File

@ -228,6 +228,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
R.drawable.ic_collection -> getString(R.string.icViewCollection)
R.drawable.ic_ubicator_check -> getString(R.string.checkerUbication)
R.drawable.ic_delivery_truck ->"Abre la app de Reparto para escanear carga"
R.drawable.ic_confirm ->getString(R.string.confirmDescription)
else -> {
""
}

View File

@ -18,7 +18,7 @@ import es.verdnatura.presentation.view.feature.packingHolland.fragment.PackingHo
) {
override fun getLayoutId(): Int = R.layout.fragment_general_black
private var shelvingScaned: Int = 0
private var itemScaned: Int = 0
private lateinit var customDialogInput: CustomDialogInput
companion object {
@ -29,6 +29,7 @@ import es.verdnatura.presentation.view.feature.packingHolland.fragment.PackingHo
customDialogInput = CustomDialogInput(requireContext())
binding.mainToolbar.toolbarTitle.text = entrypoint
binding.scanInput.hint = "Escanear item"
binding.splashProgress.visibility = View.GONE
binding.scanInput.visibility = View.VISIBLE
setEvents()
@ -56,7 +57,7 @@ import es.verdnatura.presentation.view.feature.packingHolland.fragment.PackingHo
"more"
).toString()
)
shelvingScaned = binding.scanInput.text.toString().toInt()
itemScaned = binding.scanInput.text.toString().toInt()
showQuantityPacking()
} catch (ex: Exception) {
ex.message!!.toast(requireActivity())
@ -92,7 +93,7 @@ import es.verdnatura.presentation.view.feature.packingHolland.fragment.PackingHo
customDialogInput.setTitle(getString(R.string.titleChangeCategory))
customDialogInput.setDescription(getString(R.string.ubication) + shelvingScaned)
customDialogInput.setDescription(getString(R.string.ubication) + itemScaned)
.setValue("")
.setOkButton(getString(R.string.modify)) {
@ -112,7 +113,8 @@ import es.verdnatura.presentation.view.feature.packingHolland.fragment.PackingHo
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
if (customDialogInput.getValue().isNotEmpty()) {
callPacking(customDialogInput.getValue())
//callPacking(customDialogInput.getValue())
getNewPrice(customDialogInput.getValue(), itemScaned, 5.51)
}
return@setOnEditorActionListener true
@ -121,15 +123,52 @@ import es.verdnatura.presentation.view.feature.packingHolland.fragment.PackingHo
}
customDialogInput.setFocusText()
ma.hideKeyboard(customDialogInput.getEditText())
}
private fun getNewPrice(shelving:String,item:Int,price:Double) {
customDialogInput.setTitle(getString(R.string.titleChangeCategory))
customDialogInput.setDescription(getString(R.string.itemChangePrice) + item + "-" + "Matrícula:"+shelving)
.setValue(price.toString())
.setOkButton(getString(R.string.modify)) {
if (customDialogInput.getValue().isNotEmpty()
) {
callPacking(customDialogInput.getValue())
}
}.setKoButton(getString(R.string.cancel)) {
customDialogInput.dismiss()
}.show()
//ma.hideKeyboard(customDialogInput.getEditText())
customDialogInput.getEditText().setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
if (customDialogInput.getValue().isNotEmpty()) {
//callPacking(customDialogInput.getValue())
//getNewPrice(customDialogInput.getValue().toInt(), 5.51)
}
return@setOnEditorActionListener true
}
false
}
customDialogInput.setFocusText()
ma.hideKeyboard(customDialogInput.getEditText())
}
private fun callPacking(value: String) {
try {
binding.splashProgress.visibility = View.VISIBLE
viewModel.travel_updatePacking(
// binding.splashProgress.visibility = View.VISIBLE
/* viewModel.travel_updatePacking(
itemFk = shelvingScaned,
packingFk = value.toInt()
)
)*/
} catch (ex: Exception) {
getString(R.string.errorInput).toast(requireActivity())

View File

@ -29,8 +29,7 @@ class SaleAdapter(
private val onPackingClick: onPackingClickListener,
private var onTicketClick: OnTicketClickListener? = null,
private var SaleAdapter: SaleAdapter? = null,
private var type: String? = null
private var type: String? = null,
) : RecyclerView.Adapter<SaleAdapter.AjustesItemHolder>() {
var context: Context? = null

View File

@ -607,12 +607,12 @@ class CollectionFragment(
if (!goBack) {
sendSalixMessage(
/* sendSalixMessage(
item = dataMessageSalix.item,
ticketFk = dataMessageSalix.ticket,
quantity = dataMessageSalix.quantity,
salePerson = dataMessageSalix.personSale
)
)*/
viewModel.collectionTicketGet(
collection.collectionFk,
getDataInt(SECTORFK),
@ -1027,7 +1027,7 @@ class CollectionFragment(
}
}
private fun responseSaleMoveSuccesful() {
/* private fun responseSaleMoveSuccesful() {
sales[positionCollectionSplit].quantity = quantityCollectionSplit
if (quantityCollectionSplit == 0)
@ -1041,7 +1041,7 @@ class CollectionFragment(
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)
}
}*/
private fun callPicker(extensionNumber: String) {
@ -1070,7 +1070,7 @@ class CollectionFragment(
return salePerson
}
private fun sendSalixMessage(
/* private fun sendSalixMessage(
item: String,
ticketFk: Int,
quantity: String,
@ -1085,7 +1085,7 @@ class CollectionFragment(
workerId = salePerson,
message = message
)
}
}*/
//CREATE LIST
private fun createCollectionList() {
@ -1197,7 +1197,7 @@ class CollectionFragment(
var entryPoint = Gson().toJson(
mutableMapOf(
"entryPoint" to sale.ticketFk,
"web" to "https://salix.verdnatura.es/#!/ticket/${sale.ticketFk}/sale"
"web" to "${getData("base_urlSalix")}/#!/ticket/${sale.ticketFk}/sale"
)
)
ma.onPasillerosItemClickListener(
@ -2192,60 +2192,6 @@ class CollectionFragment(
}
/* private fun showDisponibility() {
customDialogInput.setTitle(getString(R.string.Verdisponible))
.setDescription(getString(R.string.Escaneaetiqueta))
.setOkButton(getString(R.string.Buscar)) {
try {
if (binding.splashProgress != null) {
binding.splashProgress.visibility = View.VISIBLE
}
} catch (e: Exception) {
}
hideKeyboards()
viewModel.itemGetAvailable(
usuario = user,
password = password,
itemFk = customDialogInput.getValue(),
warehouseFk = warehouseFk,
"item_GetVisibleAvailable"
)
scanRequest()
customDialogInput.dismiss()
}.setKoButton(getString(R.string.cancel)) {
if (binding.splashProgress != null) {
binding.splashProgress.visibility = View.GONE
}
hideKeyboards()
scanRequest()
customDialogInput.dismiss()
}.setValue("").show()
customDialogInput.getEditText().requestFocus()
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!customDialogInput.getValue().isNullOrEmpty()) {
if (binding.splashProgress != null) binding.splashProgress.visibility = View.VISIBLE
viewModel.itemGetAvailable(
usuario = user,
password = password,
itemFk = customDialogInput.getValue(),
warehouseFk = warehouseFk
,"item_GetVisibleAvailable")
}
customDialogInput.setValue("")
scanRequest()
customDialogInput.dismiss()
hideKeyboards()
return@setOnEditorActionListener true
}
false
}
}*/
private fun toastDisponibility(item: ItemVO) {
if (item.available.isNullOrEmpty()) {
item.available = "0"
@ -2296,9 +2242,10 @@ class CollectionFragment(
getString(R.string.Coleccióncompleta).toast(this.context, Toast.LENGTH_SHORT)
saleAdapter!!.notifyDataSetChanged()
if (!goBack)
// Se quita de la app
/* if (!goBack)
ticketCollection_setUsedShelves()
goBack = false
goBack = false*/
changeTicketState()
@ -2590,7 +2537,7 @@ class CollectionFragment(
saleAdapter!!.notifyDataSetChanged()
val ticket =
/*val ticket =
"[" + sales[positionCollectionMissing].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionMissing].ticketFk + "/summary)"
@ -2611,7 +2558,7 @@ class CollectionFragment(
"Se ha modificado la cantidad de " + sales[positionCollectionMissing].originalQuantity + " del artículo " + sales[positionCollectionMissing].itemFk + " a nueva cantidad: " + sales[positionCollectionMissing].quantity + " del ticket " + ticket
}
}
}*/
//sergio:ahora desde encajado
// sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
@ -2639,11 +2586,11 @@ class CollectionFragment(
saleAdapter?.notifyDataSetChanged()
//enviar mensaje a salix
val ticket =
/* val ticket =
"[" + 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
*/
//sergio: ahora desde encajadores
// sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
@ -2652,6 +2599,7 @@ class CollectionFragment(
}
/*
private fun sendSalixMessageNew(message: String, workerId: String) {
viewModel.sendChekingPresence(
@ -2660,6 +2608,7 @@ class CollectionFragment(
)
}
*/
private fun increaseQuantity(position: Int, quantity: Int) {
positionIncreaseQuantity = position

View File

@ -605,12 +605,12 @@ import org.json.JSONObject
if (!goBack) {
sendSalixMessage(
/* sendSalixMessage(
item = dataMessageSalix.item,
ticketFk = dataMessageSalix.ticket,
quantity = dataMessageSalix.quantity,
salePerson = dataMessageSalix.personSale
)
)*/
viewModel.collectionTicketGet(
collection.collectionFk,
getDataInt(SECTORFK),
@ -1032,12 +1032,12 @@ import org.json.JSONObject
markLine(positionCollectionSplit, type)
saleAdapter!!.notifyDataSetChanged()
val ticket =
/* val ticket =
"[" + sales[positionCollectionSplit].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].ticketFk + "/summary)"
val message =
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)*/
}
@ -1068,7 +1068,7 @@ import org.json.JSONObject
return salePerson
}
private fun sendSalixMessage(
/* private fun sendSalixMessage(
item: String,
ticketFk: Int,
quantity: String,
@ -1084,7 +1084,7 @@ import org.json.JSONObject
workerId = salePerson,
message = message
)
}
}*/
//CREATE LIST
private fun createCollectionList() {
@ -1196,7 +1196,7 @@ import org.json.JSONObject
var entryPoint = Gson().toJson(
mutableMapOf(
"entryPoint" to sale.ticketFk,
"web" to "https://salix.verdnatura.es/#!/ticket/${sale.ticketFk}/sale"
"web" to "${getData("base_urlSalix")}/#!/ticket/${sale.ticketFk}/sale"
)
)
ma.onPasillerosItemClickListener(
@ -1666,7 +1666,7 @@ import org.json.JSONObject
private fun unMarkLine(position: Int, newType: String) {
state = 0
if (sales[position].isPrepared == "1") {
if ((sales[position].isPrepared == "1") || (sales[position].quantity!! > 0)) {
customDialog.setTitle(getString(R.string.unmarkLine))
.setDescription(getString(R.string.goUnmark) + sales[position].itemFk + getString(
R.string.sure))
@ -2635,7 +2635,7 @@ import org.json.JSONObject
}
saleAdapter!!.notifyDataSetChanged()
/*
val ticket =
"[" + sales[positionCollectionMissing].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionMissing].ticketFk + "/summary)"
@ -2657,7 +2657,7 @@ import org.json.JSONObject
"Se ha modificado la cantidad de " + sales[positionCollectionMissing].originalQuantity + " del artículo " + sales[positionCollectionMissing].itemFk + " a nueva cantidad: " + sales[positionCollectionMissing].quantity + " del ticket " + ticket
}
}
}*/
//sergio:ahora desde encajado
// sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
@ -2685,11 +2685,11 @@ import org.json.JSONObject
saleAdapter?.notifyDataSetChanged()
//enviar mensaje a salix
val ticket =
/* val ticket =
"[" + 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
*/
//sergio: ahora desde encajadores
// sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
@ -2698,14 +2698,14 @@ import org.json.JSONObject
}
private fun sendSalixMessageNew(message: String, workerId: String) {
/* private fun sendSalixMessageNew(message: String, workerId: String) {
viewModel.sendChekingPresence(
workerId = workerId,
message = message
)
}
}*/
private fun increaseQuantity(position: Int, quantity: Int) {
positionIncreaseQuantity = position

View File

@ -626,12 +626,12 @@ class CollectionFragmentPreChecker(
if (!goBack) {
sendSalixMessage(
/* sendSalixMessage(
item = dataMessageSalix.item,
ticketFk = dataMessageSalix.ticket,
quantity = dataMessageSalix.quantity,
salePerson = dataMessageSalix.personSale
)
)*/
viewModel.collectionTicketGet(
collection.collectionFk,
getDataInt(SECTORFK),
@ -1053,12 +1053,12 @@ class CollectionFragmentPreChecker(
markLine(positionCollectionSplit, type)
saleAdapter!!.notifyDataSetChanged()
val ticket =
/* val ticket =
"[" + sales[positionCollectionSplit].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].ticketFk + "/summary)"
val message =
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)
sendSalixMessageNew(message, sales[positionCollectionSplit].salePersonFk)*/
}
@ -1089,7 +1089,7 @@ class CollectionFragmentPreChecker(
return salePerson
}
private fun sendSalixMessage(
/* private fun sendSalixMessage(
item: String,
ticketFk: Int,
quantity: String,
@ -1104,7 +1104,7 @@ class CollectionFragmentPreChecker(
workerId = salePerson,
message = message
)
}
}*/
//CREATE LIST
private fun createCollectionList() {
@ -1216,7 +1216,7 @@ class CollectionFragmentPreChecker(
var entryPoint = Gson().toJson(
mutableMapOf(
"entryPoint" to sale.ticketFk,
"web" to "https://salix.verdnatura.es/#!/ticket/${sale.ticketFk}/sale"
"web" to "${getData("base_urlSalix")}/#!/ticket/${sale.ticketFk}/sale"
)
)
ma.onPasillerosItemClickListener(
@ -2611,7 +2611,7 @@ class CollectionFragmentPreChecker(
saleAdapter!!.notifyDataSetChanged()
val ticket =
/* val ticket =
"[" + sales[positionCollectionMissing].ticketFk + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionMissing].ticketFk + "/summary)"
@ -2632,7 +2632,7 @@ class CollectionFragmentPreChecker(
"Se ha modificado la cantidad de " + sales[positionCollectionMissing].originalQuantity + " del artículo " + sales[positionCollectionMissing].itemFk + " a nueva cantidad: " + sales[positionCollectionMissing].quantity + " del ticket " + ticket
}
}
}*/
//sergio:ahora desde encajado
// sendSalixMessageNew(message, sales[positionCollectionMissing].salePersonFk)
@ -2660,11 +2660,11 @@ class CollectionFragmentPreChecker(
saleAdapter?.notifyDataSetChanged()
//enviar mensaje a salix
val ticket =
/*val ticket =
"[" + 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
*/
//sergio: ahora desde encajadores
// sendSalixMessageNew(message, sales[positionIncreaseQuantity].salePersonFk)
@ -2673,14 +2673,14 @@ class CollectionFragmentPreChecker(
}
private fun sendSalixMessageNew(message: String, workerId: String) {
/* private fun sendSalixMessageNew(message: String, workerId: String) {
viewModel.sendChekingPresence(
workerId = workerId,
message = message
)
}
}*/
private fun increaseQuantity(position: Int, quantity: Int) {
positionIncreaseQuantity = position

View File

@ -784,7 +784,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
})
}
fun sendChekingPresence(
/* fun sendChekingPresence(
workerId: String,
message: String
@ -824,7 +824,7 @@ class CollectionViewModel(val context: Context) : BaseViewModel(context) {
} catch (e: Exception) {
}
}
}*/
fun saleMistakeAdd(
vSaleFk: Int,

View File

@ -0,0 +1,66 @@
package es.verdnatura.presentation.view.feature.delivery.adapters
import android.graphics.Color
import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.core.content.ContextCompat
import androidx.core.content.ContextCompat.getColor
import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R
import es.verdnatura.databinding.ItemExpeditionLoadunloadRowBinding
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
import java.security.AccessController.getContext
class ExpeditionLoadUnloadAdapter(
private val items: List<ExpeditionInfoLoadUnload>
) : RecyclerView.Adapter<ExpeditionLoadUnloadAdapter.ItemHolder>() {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
return ItemHolder(
ItemExpeditionLoadunloadRowBinding.inflate(
LayoutInflater.from(parent.context),
parent,
false
)
)
}
override fun getItemCount() = items.size
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
holder.bind(items[position])
}
inner class ItemHolder(
val binding: ItemExpeditionLoadunloadRowBinding
) : RecyclerView.ViewHolder(binding.root) {
private val res = binding.root.context.resources
fun bind(item: ExpeditionInfoLoadUnload) {
binding.apply {
when (item.code) {
"ON DELIVERY" -> {
expeditionView.setBackgroundColor(
getColor(expeditionView.context, R.color.verdnatura_pumpkin_orange)
)
}
"DELIVERED" -> expeditionView.setBackgroundColor(
getColor(expeditionView.context, R.color.verdnatura_dark_mint)
)
"PALLETIZED" -> expeditionView.setBackgroundColor(
getColor(expeditionView.context, R.color.verdnatura_black)
)
else -> {
expeditionView.setBackgroundColor(
getColor(expeditionView.context, R.color.verdnatura_black)
)
}
}
this.item = item
}
}
}
}

View File

@ -0,0 +1,255 @@
package es.verdnatura.presentation.view.feature.delivery.fragments
import android.content.Intent
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.graphics.drawable.Drawable
import android.os.Build
import android.view.View
import android.view.inputmethod.EditorInfo
import android.widget.ImageView
import android.widget.Toast
import androidx.annotation.RequiresApi
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R
import es.verdnatura.databinding.FragmentExpeditionLoadunloadDeliveryBinding
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnOptionsSelectedListener
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
import es.verdnatura.presentation.view.feature.delivery.adapters.ExpeditionLoadUnloadAdapter
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewModel
class LoadUnloadFragment(
var title: String = "",
var state: String = ""
) : BaseFragment<FragmentExpeditionLoadunloadDeliveryBinding, DeliveryViewModel>(
DeliveryViewModel::class
) {
private var adapter: ExpeditionLoadUnloadAdapter? = null
private var originalItem: Int = 0
private lateinit var myList: MutableList<ExpeditionInfoLoadUnload>
companion object {
fun newInstance(title: String, state: String) = LoadUnloadFragment(title, state)
}
override fun getLayoutId(): Int = R.layout.fragment_expedition_loadunload_delivery
@RequiresApi(Build.VERSION_CODES.O)
override fun init() {
setEvents()
setToolBar()
binding.scanInput.requestFocus()
viewModel.getExpeditionFromRoute(159390)
super.init()
}
@RequiresApi(Build.VERSION_CODES.O)
private fun setToolBar() {
ma.hideBottomNavigation(View.GONE)
binding.mainToolbar.toolbarTitle.visibility = View.VISIBLE
binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
val listIcons: ArrayList<ImageView> = ArrayList()
val iconConfirm = ImageView(context)
iconConfirm.setImageResource(R.drawable.ic_confirm)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
iconConfirm.tooltipText = getTooltip(R.drawable.ic_confirm)
}
listIcons.add(iconConfirm)
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
when (item) {
iconConfirm.drawable -> {
// openAppDelivery()
//requireActivity().finish()
setExpeditionsState(myList, state)
}
}
}
})
binding.mainToolbar.toolbarIcons.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
}
private fun setExpeditionsState(list: MutableList<ExpeditionInfoLoadUnload>, state: String) {
if (list.filter { it.code == state }.size == list.size) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionState_add(list.filter { it.code == state }, state)
} else {
val alertDialog = android.app.AlertDialog.Builder(requireContext()).create()
alertDialog.setTitle("Información")
alertDialog.setMessage("El total de expediciones escaneadas es diferente al total de la ruta. ¿ Quieres guardar las expediciones escaneadas o buscar la/s expedición/es ?")
alertDialog.setButton(
android.app.AlertDialog.BUTTON_NEUTRAL, "GUARDAR"
) { dialog, which ->
viewModel.expeditionState_add(list.filter { it.code == state }, state)
}
alertDialog.setButton(
android.app.AlertDialog.BUTTON_POSITIVE, "ORDENAR"
) { dialog, which ->
adapter = ExpeditionLoadUnloadAdapter(list.sortedByDescending{it.code})
adapter!!.notifyDataSetChanged()
}
alertDialog.show()
}
}
private fun openAppDelivery() {
val i = Intent()
val manager: PackageManager = requireContext().packageManager
val info: PackageInfo = manager.getPackageInfo(requireContext().packageName, 0)
val version = info.versionName
if (version.contains("Beta")) {
i.setClassName(
"verdnatura.es.repartoverdnatura.sfusion",
"verdnatura.es.repartoverdnatura.ExpeditionSummaryActivity"
)
} else {
i.setClassName(
"verdnatura.es.repartoverdnatura",
"verdnatura.es.repartoverdnatura.ExpeditionSummaryActivity"
)
}
// i.putExtra("routeId", binding.route.text)
i.putExtra("app", "picking")
startActivity(i)
}
private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed()
}
binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!binding.scanInput.text.isNullOrEmpty()) {
try {
//viewModel.expeditionLoadUnload_get(binding.scanInput.toInt())
markExpedition(binding.scanInput.text.toString().toInt(), state)
binding.mainToolbar.toolbarTitle.text =
getString(R.string.expedition) + binding.scanInput.text
} catch (ex: Exception) {
"Error al escanear expedición".toast(context, Toast.LENGTH_SHORT)
}
binding.scanInput.setText("")
}
return@setOnEditorActionListener false
}
false
}
}
private fun markExpedition(expedNumber: Int, state: String) {
var found = false
if (myList.filter { it.id == expedNumber }.filter { it.code == state }.isNotEmpty()) {
ma.messageWithSound("Expedición ya marcada", null, true)
} else {
for (exped in myList) {
if (exped.id == expedNumber) {
found = true
exped.code = state
break
}
}
if (found) {
ma.messageWithSound("", false, true, isToasted = false)
} else {
ma.messageWithSound("", true, true, isToasted = null)
}
}
updateCount(myList, state)
}
@RequiresApi(Build.VERSION_CODES.O)
override fun observeViewModel() {
with(viewModel) {
expeditionInfoLoadUnloadList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createList(it.list)
//setSwitchButon()
// viewModel.get_routesFromExpedition(originalItem)
}
routeInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) {
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
binding.mainToolbar.switchButton.visibility = View.VISIBLE
} else {
binding.scanInput.setText("")
// binding.routeLayout.visibility = View.GONE
binding.mainToolbar.toolbarIcons.visibility = View.GONE
binding.mainToolbar.switchButton.visibility = View.GONE
}
}
responseStateAdd.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (!it.isError) {
viewModel.getExpeditionFromRoute(159390)
}
}
}
}
@RequiresApi(Build.VERSION_CODES.O)
private fun setSwitchButon() {
binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked ->
binding.mainToolbar.switchButton.tooltipText = if (isChecked)
getString(R.string.expeditionMarkLost) else
getString(R.string.expeditionMarkFound)
binding.splashProgress.visibility = View.VISIBLE
if (isChecked) {
// viewModel.expeditionState_add(arrayListOf(Expedition(originalItem)), "FOUND")
} else {
// viewModel.expeditionState_add(arrayListOf(Expedition(originalItem)), "LOST")
}
}
}
private fun createList(list: List<ExpeditionInfoLoadUnload>) {
myList = list as MutableList<ExpeditionInfoLoadUnload>
adapter = ExpeditionLoadUnloadAdapter(list)
binding.expeditionloadunloadRecyclerview.adapter = adapter
binding.expeditionloadunloadRecyclerview.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
binding.mainToolbar.toolbarSubtitle.text =
"${list.filter { it.code == state }.size}/${list.size}"
}
private fun updateCount(list: MutableList<ExpeditionInfoLoadUnload>, state: String) {
var countMarked = list.filter { it.code == state }.size
binding.mainToolbar.toolbarSubtitle.text = "${countMarked}/${list.size}"
adapter!!.notifyDataSetChanged()
}
}

View File

@ -49,3 +49,19 @@ class RouteDelivery(
class Expedition(
var id: Int
)
class ExpeditionList(
var list: List<ExpeditionInfoLoadUnload> = listOf()
)
class ExpeditionInfoLoadUnload(
var id:Int,
var ticketFk:Int,
var routeFk:Int,
var addressFk:Int,
var itemPackingTypeConcat:String,
var city:String,
var street:String,
var code:String?,
var nickname:String,
var postalCode:Int
)

View File

@ -8,6 +8,8 @@ import es.verdnatura.domain.SilexCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.delivery.model.*
import retrofit2.Call
import retrofit2.Callback
import retrofit2.Response
import retrofit2.http.POST
@ -16,6 +18,9 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
private val _expeditionInfoList by lazy { MutableLiveData<ExpeditionInfoList>() }
val expeditionInfoList: LiveData<ExpeditionInfoList> = _expeditionInfoList
private val _expeditionInfoLoadUnloadList by lazy { MutableLiveData<ExpeditionList>() }
val expeditionInfoLoadUnloadList: LiveData<ExpeditionList> = _expeditionInfoLoadUnloadList
private val _routeInfoList by lazy { MutableLiveData<RouteDeliveryList>() }
val routeInfoList: LiveData<RouteDeliveryList> = _routeInfoList
@ -29,6 +34,9 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
val responseStateAdd: LiveData<ResponseItemVO>
get() = _responseStateAdd
private val _expeditionList by lazy { MutableLiveData<ExpeditionList>() }
val expeditionList: LiveData<ExpeditionList> = _expeditionList
fun getInfoCompany(
userId: Int
@ -79,6 +87,31 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
})
}
fun getExpeditionFromRoute(
route: Int
) {
silex.getExpeditionFromRoute(route)
.enqueue(object : SilexCallback<List<ExpeditionInfoLoadUnload>>(context) {
override fun onSuccess(response: Response<List<ExpeditionInfoLoadUnload>>) {
if (response.body() != null) {
_expeditionInfoLoadUnloadList.value =
response.body()?.let { ExpeditionList(it) }
} else {
_expeditionInfoLoadUnloadList.value = ExpeditionList()
}
}
override fun onError(t: Throwable) {
_expeditionInfoLoadUnloadList.value = ExpeditionList()
super.onError(t)
}
})
}
fun get_routesFromExpedition(
expedition: Int
) {
@ -102,7 +135,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
}
fun expeditionState_add(expeditions: List<Expedition>, state: String) {
fun expeditionState_add(expeditions: Any?, state: String) {
silex.expeditionState_add(expeditions, state)
.enqueue(object : SilexCallback<Void>(context) {
@ -117,7 +150,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
})
}
@POST("/delivery/getInfoFreelance")
fun getInfoFreelance(
userId: Int
) {

View File

@ -54,7 +54,8 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
customDialog = CustomDialog(requireContext())
saveIdentifiers()
checkUser()
createFolderSerial()
/*Tarea 4815
createFolderSerial()*/
binding.buttonLogin.setOnClickListener {
binding.splashProgress.visibility = View.VISIBLE
viewModel.loginSalix(

View File

@ -1,6 +1,7 @@
package es.verdnatura.presentation.view.feature.main.activity
//Tarea #4815
import android.content.SharedPreferences
import android.media.MediaPlayer
import android.view.Menu
@ -35,6 +36,7 @@ import es.verdnatura.presentation.view.feature.controlador.fragment.WebFragment
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoFragment
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoUsuarioFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.InfoFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.LoadUnloadFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.LogExpeditionFragment
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleFragment
import es.verdnatura.presentation.view.feature.historicoarticulo.fragment.HistoricoArticuloFragment
@ -42,7 +44,6 @@ import es.verdnatura.presentation.view.feature.historicoshelving.fragment.itemSh
import es.verdnatura.presentation.view.feature.historicoshelvinglog.fragment.shelvingLogFragment
import es.verdnatura.presentation.view.feature.historicovehiculo.fragment.HistoricoVehiculoFragment
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryFragment
import es.verdnatura.presentation.view.feature.login.fragment.LoginViewModel
import es.verdnatura.presentation.view.feature.main.model.ItemMenuVO
import es.verdnatura.presentation.view.feature.packaging.fragment.ObservFragment
import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingCountFragment
@ -57,7 +58,6 @@ import es.verdnatura.presentation.view.feature.pasillero.fragment.PasilleroFragm
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import es.verdnatura.presentation.view.feature.precontrol.PreControladorFragment
import es.verdnatura.presentation.view.feature.presacador.fragment.EndSacadorFragment
import es.verdnatura.presentation.view.feature.presacador.fragment.InitPreSacadorFragment
import es.verdnatura.presentation.view.feature.qr.QrFragment
import es.verdnatura.presentation.view.feature.reubication.fragment.ReubicationCollectionFragment
import es.verdnatura.presentation.view.feature.reubication.fragment.ReubicationFragment
@ -65,7 +65,7 @@ import es.verdnatura.presentation.view.feature.reubication.model.Reubication
import es.verdnatura.presentation.view.feature.sacador.fragment.SacadorFragment
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingFragment
import es.verdnatura.presentation.view.feature.showticket.ShowTicketFragment
import es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowTicketFragment
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragment
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment
import es.verdnatura.presentation.view.feature.workermistake.adapter.WorkermistakeFragment
@ -74,9 +74,6 @@ import kotlinx.coroutines.DelicateCoroutinesApi
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
//Tarea #4815
import org.koin.androidx.viewmodel.ext.android.viewModel
class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickListener,
@ -89,6 +86,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
var fm = supportFragmentManager
var mperror: MediaPlayer? = null
var mpok: MediaPlayer? = null
var mpErrorRepeat: MediaPlayer? = null
//Tarea #4815
// var miTime: Long = System.currentTimeMillis() / 1000 / 60 / 60
private var comeFromDelivery: Boolean? = null
@ -97,6 +96,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
mperror = MediaPlayer.create((this), R.raw.error)
mpok = MediaPlayer.create((this), R.raw.ok)
mpErrorRepeat = MediaPlayer.create((this), R.raw.errorrepeat)
mpok
customDialog = CustomDialogMainActivity(this)
setFragments()
setBottomMenuFragment()
@ -559,7 +560,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
}
getString(R.string.titlePrePicker) -> {
addFragmentOnTop(InitPreSacadorFragment.newInstance(getString(R.string.getPreviousCollection)))
addFragmentOnTop(SacadorFragment.newInstance("PREITEMPICKER"))
}
getString(R.string.titleClaimUbication) -> {
@ -638,6 +639,32 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
}
getString(R.string.titleLoadTruck) -> {
addFragmentOnTop(
LoadUnloadFragment.newInstance(item.title, "ON DELIVERY"),
if (comeFromDelivery == true) {
getString(R.string.titleLoadTruck)
} else {
null
}
)
}
getString(R.string.titleUnLoadTruck) -> {
addFragmentOnTop(
LoadUnloadFragment.newInstance(item.title, "DELIVERED"),
if (comeFromDelivery == true) {
getString(R.string.titleUnLoadTruck)
} else {
null
}
)
}
getString(R.string.testing) -> {
addFragmentOnTop(testPrint.newInstance(item.title))
@ -757,6 +784,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
addFragmentOnTop(CollectionFragmentPicker.newInstance(collection, type))
}
else -> {
addFragmentOnTop(CollectionFragment.newInstance(collection, type))
}
@ -787,7 +815,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
delete_Fragments()
}
addFragment(
SacadorFragment.newInstance(),
SacadorFragment.newInstance("PREPARED"),
R.id.main_frame_layout,
SacadorFragment.TAG,
true
@ -820,20 +848,20 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
fun messageWithSound(
message: String,
isError: Boolean,
isError: Boolean?,
isPlayed: Boolean?,
titleWithError: String = getString(R.string.error),
isToasted: Boolean? = true
) {
if (!isError) {
if (isError != null) {
if (!isError!!) {
if (isPlayed == true) (mpok?.start())
if (isToasted!!) message.toast(this, Toast.LENGTH_LONG)
} else {
if (isPlayed == true) (mperror?.start())
if (isToasted != null) {
if (isToasted == true) {
message.toast(this, Toast.LENGTH_LONG)
} else {
@ -842,8 +870,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
customDialog.dismiss()
}.show()
}
}
}
}else{
mpErrorRepeat?.start()
}

View File

@ -489,6 +489,17 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
)
)
/*Tarea 4678
_pasillerositem.add(
PasillerosItemVO(
6,
R.drawable.ic_delivery_truck,
contextApp.getString(R.string.titleDelivery),
R.string.titleDelivery,
contextApp.getString(R.string.titleDelivery)
)
)*/
//#tarea4679
/* _pasillerositem.add(
PasillerosItemVO(
@ -565,7 +576,28 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
)
)
)
_pasillerositem.add(
PasillerosItemVO(
30,
R.drawable.ic_delivery_truck,
contextApp.getString(R.string.titleLoadTruck),
R.string.titleLoadTruckInfo,
contextApp.getString(
R.string.titleLoadTruckInfo
)
)
)
_pasillerositem.add(
PasillerosItemVO(
30,
R.drawable.ic_delivery_truck,
contextApp.getString(R.string.titleUnLoadTruck),
R.string.titleUnLoadTruckInfo,
contextApp.getString(
R.string.titleUnLoadTruckInfo
)
)
)
}
}

View File

@ -432,10 +432,10 @@ class EndSacadorFragment(
//enviar mensaje a salix
val ticket =
/* val ticket =
"[" + sales[positionCollectionSplit].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionSplit].id + "/summary)"
val message =
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket
getString(R.string.splitSent) + sales[positionCollectionSplit].itemFk + getString(R.string.fromTicket) + ticket*/
/* viewModel.sendChekingPresence(
@ -444,7 +444,7 @@ class EndSacadorFragment(
message = message,
"sendChekingPresence"
)*/
sendSalixMessageNew(message, sales[positionCollectionSplit].salesPersonFk)
/* sendSalixMessageNew(message, sales[positionCollectionSplit].salesPersonFk)*/
}
@ -460,7 +460,7 @@ class EndSacadorFragment(
saleAdapter?.notifyDataSetChanged()
val ticket =
/* val ticket =
"[" + sales[positionIncreaseQuantity].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionIncreaseQuantity].id + "/summary)"
val message =
getString(R.string.modifiedQuantityPrevious) + sales[positionIncreaseQuantity].quantity + getString(
@ -471,7 +471,7 @@ class EndSacadorFragment(
sendSalixMessageNew(message, sales[positionIncreaseQuantity].salesPersonFk)
sendSalixMessageNew(message, sales[positionIncreaseQuantity].salesPersonFk)*/
searchSaleCollection()
}
@ -502,7 +502,7 @@ class EndSacadorFragment(
saleAdapter!!.notifyDataSetChanged()
var message = ""
/* var message = ""
val ticket =
"[" + sales[positionCollectionMissing].id + "](https://salix.verdnatura.es/#!/ticket/" + sales[positionCollectionMissing].id + "/summary)"
@ -536,11 +536,11 @@ class EndSacadorFragment(
}
}
sendSalixMessageNew(message, sales[positionCollectionMissing].salesPersonFk)
sendSalixMessageNew(message, sales[positionCollectionMissing].salesPersonFk)*/
searchSaleCollection()
}
private fun sendSalixMessageNew(message: String, workerId: String) {
/* private fun sendSalixMessageNew(message: String, workerId: String) {
if (!goBack) {
@ -551,7 +551,7 @@ class EndSacadorFragment(
message = message
)
}
}
}*/
//CREATE LIST
private fun searchSaleCollection() {

View File

@ -317,7 +317,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
}
fun sendChekingPresence(
/* fun sendChekingPresence(
workerId: String,
message: String,
) {
@ -356,7 +356,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
//Log.d("error " + e.message)
}
}
}*/
fun ticket_printLabelPrevious(ticketFk: Int) {
@ -377,6 +377,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
}
fun sectorCollection_get() {
silex.sectorCollection_get().enqueue(object :
@ -429,7 +430,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
object :
SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseNew.value =
_response.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
@ -442,7 +443,7 @@ class PreSacadorViewModel(val context: Context) : BaseViewModel(context) {
override fun onSuccess(response: Response<Any>) {
_responseNew.value = ResponseItemVO(
_response.value = ResponseItemVO(
isError = false,
errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()

View File

@ -181,7 +181,6 @@ class SacadorFragment(
private fun print() {
if (ma.havePrinter()) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.ticket_printLabelPrevious(customDialogInput.getValue().toInt())
(getString(R.string.Imprimiendo) + getData(PRINTERNAME)).toast(
requireContext()
@ -215,7 +214,9 @@ class SacadorFragment(
ma.messageWithSound(it.errorMessage, true, false)
} else {
if (goBack) addCollectionToList(it.response.toInt())
if (goBack) {
if (!it.response.isNullOrBlank())addCollectionToList(it.response.toInt())
}
}
goBack = false
callBack(type)

View File

@ -34,6 +34,10 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
val responseCollectionSmart: LiveData<ResponseItemVO>
get() = _responseCollectionSmart
private val _responseNew by lazy { MutableLiveData<ResponseItemVO>() }
val responseNew: LiveData<ResponseItemVO>
get() = _responseNew
fun collectionTicketGet(
collectionFk: Int,
sectorFk: String,
@ -74,7 +78,53 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
}
})
}
fun sectorCollection_new(
sectorFk: Int
) {
silex.sectorCollection_new(sectorFk).enqueue(
object :
SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value =
ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
}
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(
isError = false,
errorMessage = "" + getMessageFromAllResponse(
nameofFunction(this), response.message()
)
)
}
})
}
fun ticket_printLabelPrevious(ticketFk: Int) {
silex.ticket_printLabelPrevious(ticketFk).enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_response.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
_response.value =
ResponseItemVO(isError = false, response = response.message()!!)
}
})
}
fun collection_assign() {
silex.collection_assign().enqueue(
object :
@ -148,6 +198,52 @@ class SacadorViewModel(val context: Context) : BaseViewModel(context) {
})
}
fun sectorCollection_get() {
silex.sectorCollection_get().enqueue(object :
SilexCallback<List<CollectionVO>>(context) {
override fun onError(t: Throwable) {
val listError: ArrayList<CollectionVO> = ArrayList()
listError.add(
CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
t.message!!
)
)
)
_collectionList.value = CollectionListVO(listError)
}
override fun onSuccess(response: Response<List<CollectionVO>>) {
if (response.body() != null) {
_collectionList.value =
response.body()?.let { CollectionListVO(it.toDateFormat(context)) }
} else {
val listError: ArrayList<CollectionVO> = ArrayList()
listError.add(
CollectionVO(
0,
isError = true,
errorMessage = getMessageFromAllResponse(
nameofFunction(this),
response.message()
)
)
)
_collectionList.value = CollectionListVO(listError)
}
}
})
}
fun collectionGetSalix() {
salix.getCollectionSalix().enqueue(object :
SilexCallback<List<CollectionVO>>(context) {

View File

@ -1,4 +1,4 @@
package es.verdnatura.presentation.view.feature.showticket
package es.verdnatura.presentation.view.feature.sacador.fragment.showticket
import android.content.Context
import android.os.Bundle
@ -37,6 +37,7 @@ class ShowTicketFragment(var menuOrigin: String) :
binding.scanInput.visibility = View.VISIBLE
binding.mainToolbar.toolbarTitle.text = getString(R.string.verticket)
ma.hideBottomNavigation(View.VISIBLE)
binding.splashProgress.visibility = View.GONE
if (menuOrigin == getString(R.string.main)) {

View File

@ -76,6 +76,7 @@ class AutomaticAddItemFragment(
if (!binding.editMatricula.text.toString().isNullOrEmpty()) {
contador += 1
setSubtitle()
binding.editMatricula.setText(textScanned_filterDouble(binding.editMatricula.text.toString()))
try {
listItems.add(
0, ItemEscanerVO(
@ -84,7 +85,7 @@ class AutomaticAddItemFragment(
binding.editMatricula.text.toString(),
"buy",
"more"
).toString().toInt()
).toString().toLong()
)
)
adapter!!.notifyDataSetChanged()
@ -101,8 +102,8 @@ class AutomaticAddItemFragment(
}
binding.buttonFinalizar.setOnClickListener {
val listString: ArrayList<Int> = ArrayList()
val listInt: ArrayList<Int> = ArrayList()
val listString: ArrayList<Long> = ArrayList()
val listInt: ArrayList<Long> = ArrayList()
listItems.forEach {
listString.add(it.item)
listInt.add(it.item)

View File

@ -19,7 +19,7 @@ class AutomaticAddItemViewModel(val context: Context) : BaseViewModel(context) {
fun itemShelvingMake_multi(
shelving: String,
items: List<Int>,
items: List<Long>,
warehouse: Int
) {
silex.itemShelvingMake_multi(shelving, items, warehouse)

View File

@ -305,7 +305,6 @@ class UbicadorFragment(
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
R.string.label
) + etiquetas
if (mpok != null) mpok!!.start()
customDialogInput.dismiss()
}.setKoButton(getString(R.string.cancel)) {
customDialogInput.dismiss()
@ -326,9 +325,7 @@ class UbicadorFragment(
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
R.string.label
) + etiquetas
if (mpok != null) {
mpok!!.start()
}
return@setOnEditorActionListener true
}

View File

@ -21,7 +21,7 @@ class ItemUbicadorVO(
)
class ItemEscanerVO(
var item: Int
var item: Long
)
class ItemUbicadorListVO(

View File

@ -0,0 +1,8 @@
<!-- drawable/check_outline.xml -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#FFF" android:pathData="M19.78,2.2L24,6.42L8.44,22L0,13.55L4.22,9.33L8.44,13.55L19.78,2.2M19.78,5L8.44,16.36L4.22,12.19L2.81,13.55L8.44,19.17L21.19,6.42L19.78,5Z" />
</vector>

View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
>
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:hint="@string/titleExpeditionScan"
android:inputType="text"
android:lines="1"
android:maxLines="1"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1"
android:paddingLeft="@dimen/layout_margin_1"
android:paddingRight="@dimen/layout_margin_1">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Expedición"
android:textSize="@dimen/body1"
android:textColor="@color/verdnatura_white"
android:paddingLeft="@dimen/layout_margin_min"
android:layout_weight="1"
android:gravity="left" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Embalaje"
android:textSize="@dimen/body1"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="left"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Consignatario"
android:textSize="@dimen/body1"
android:textColor="@color/verdnatura_white"
android:layout_weight="1"
android:gravity="right"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_white"/>
<LinearLayout
android:id="@+id/itemcard_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:orientation="vertical"
tools:ignore="ExtraText">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants">
<!--android:id="@+id/itemexpeditionstate_recyclerview"-->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/expeditionloadunload_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/item_expedition_loadunload_row" />
</RelativeLayout>>
</LinearLayout>
</LinearLayout>
<ScrollView
android:id="@+id/scroll_view"
android:layout_width="0dp"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</ScrollView>
<include
android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
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">
<com.airbnb.lottie.LottieAnimationView
android:layout_width="wrap_content"
android:layout_height="@dimen/verdnatura_logo_large_height"
app:lottie_autoPlay="true"
app:lottie_loop="true"
app:lottie_rawRes="@raw/orange_loading"
app:lottie_speed="2" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View File

@ -39,7 +39,7 @@
android:layout_weight="1"
android:textSize="@dimen/h5"
android:textColor="@color/verdnatura_white"
android:text="@{Integer.toString(item.item)}"
android:text="@{Long.toString(item.item)}"
tool:text="45532"
android:textStyle="bold"
android:gravity="center_vertical"/>

View File

@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<variable
name="item"
type="es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload" />
</data>
<LinearLayout
android:id="@+id/expeditionView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="@dimen/ef_item_padding"
>
<LinearLayout
android:id="@+id/expeditionConsign"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/itemFk"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left"
android:text="@{Integer.toString(item.id)}"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/delivery_body_2" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1.5"
android:gravity="left"
android:singleLine="true"
android:text="@{item.itemPackingTypeConcat}"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/delivery_body_2" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="right"
android:singleLine="true"
android:text="@{Integer.toString(item.addressFk)}"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/delivery_body_1" />
</LinearLayout>
<LinearLayout
android:id="@+id/expeditionViewData"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/itemPackage"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left"
android:text="@{item.nickname}"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/delivery_body_2"
/>
</LinearLayout>
<LinearLayout
android:id="@+id/expeditionViewAdress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/itemStreet"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:gravity="left"
android:text="@{item.street + ` - ` + item.city + ` - ` + String.valueOf(item.postalCode)}"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/delivery_body_2"
/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_white" />
</LinearLayout>
</layout>

View File

@ -9,6 +9,6 @@
android:label="AjustesFragment" />
<fragment
android:id="@+id/showTicketFragment"
android:name="es.verdnatura.presentation.view.feature.showticket.ShowTicketFragment"
android:name="es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowTicketFragment"
android:label="ShowTicketFragment" />
</navigation>

Binary file not shown.

View File

@ -559,5 +559,11 @@
<string name="categoryChange">Cambiar a A2</string>
<string name="titleChangeCategory">Cambiar a A2</string>
<string name="ubication">Indica el carro donde está ubicado el item:</string>
<string name="titleLoadTruck">Cargar furgoneta</string>
<string name="titleUnLoadTruck">Descargar furgoneta</string>
<string name="titleLoadTruckInfo">Cargar furgoneta</string>
<string name="titleUnLoadTruckInfo">Descargar furgoneta</string>
<string name="confirmDescription">Cofirma la carga/descarga de la furgoneta</string>
<string name="itemChangePrice">Introduce el nuevo precio. Por defecto se propone el 50% del precio original.Item:</string>
</resources>

View File

@ -45,6 +45,11 @@
<dimen name="body2">14sp</dimen>
<dimen name="body3">15sp</dimen>
<dimen name="delivery_padding">4dp</dimen>
<dimen name="delivery_body_2">16sp</dimen>
<dimen name="delivery_body_1">20sp</dimen>
<dimen name="button">14sp</dimen>
<dimen name="caption">12sp</dimen>
<dimen name="over_line">10sp</dimen>

View File

@ -175,6 +175,10 @@
<string name="titleClaimUbication">Claim Ubication</string>
<string name="titleInfoDescription">Show company information</string>
<string name="titleInfo">Show company information</string>
<string name="titleLoadTruck">Load van </string>
<string name="titleLoadTruckInfo">Load van </string>
<string name="titleUnLoadTruck">Unload van </string>
<string name="titleUnLoadTruckInfo">Unload van </string>
<string name="titleLog">Show data expedition</string>
<string name="claims">Claims</string>
<string name="operationSuccess"> done successful</string>
@ -557,6 +561,8 @@
<string name="problemUpdate">It\'s not possible to update. Problem with the download of app</string>
<string name="packingQuantity">"Introduce new packing for the item : "</string>
<string name="ubication">"Introduce ubication for the item : "</string>
<string name="itemChangePrice">"Introduce price for the item : "</string>
<string name="managerWagon">The number of wagons can now only be changed by managers</string>
<string name="confirmDescription">Cofirm load/unload of the van</string>
</resources>