diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml
deleted file mode 100644
index 9854023c..00000000
--- a/.idea/deploymentTargetDropDown.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 369a86a0..6126b488 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -82,22 +82,39 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -108,7 +125,7 @@
-
+
@@ -253,41 +270,41 @@
- {
+ "keyToString": {
+ "ApkExportedModule": "Gestor_Almacén.app",
+ "ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
+ "PROJECT_TRUSTED_KEY": "true",
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.cidr.known.project.marker": "true",
+ "SHARE_PROJECT_CONFIGURATION_FILES": "true",
+ "ScreenRecorder.SavePath": "C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4",
+ "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": "RecyclerView",
+ "cidr.known.project.marker": "true",
+ "com.developerphil.adbidea.selecteddevices": "21114523025303",
+ "com.google.services.firebase.aqiPopupShown": "true",
+ "last_directory_selection": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
+ "last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout",
+ "project.structure.last.edited": "Project",
+ "project.structure.proportion": "0.17",
+ "project.structure.side.proportion": "0.2",
+ "run.code.analysis.last.selected.profile": "pProject Default",
+ "settings.editor.selected.configurable": "reference.settingsdialog.project.gradle"
},
- "keyToStringList": {
- "ExportApk.BuildVariants": [
- "generalRelease"
+ "keyToStringList": {
+ "ExportApk.BuildVariants": [
+ "betaRelease"
],
- "com.android.tools.idea.sqlite.queryhistory": [
- "select * from expedition e where e.addressFk= 34915",
- "select * from expedition e where e.id= 6872921",
- "select count(*) from expeditionPending\n",
- "select count(*) from expedition\n",
- "select count(*) from expedition"
+ "com.android.tools.idea.sqlite.queryhistory": [
+ "select * from expedition e where e.addressFk= 34915",
+ "select * from expedition e where e.id= 6872921",
+ "select count(*) from expeditionPending\n",
+ "select count(*) from expedition\n",
+ "select count(*) from expedition"
]
}
-}]]>
+}
@@ -295,8 +312,8 @@
-
+
@@ -316,11 +333,11 @@
+
+
+
-
-
-
@@ -430,34 +447,6 @@
1618825571576
-
- 1679984799909
-
-
-
- 1679984799909
-
-
- 1679984837368
-
-
-
- 1679984837368
-
-
- 1681201009353
-
-
-
- 1681201009354
-
-
- 1681292397190
-
-
-
- 1681292397191
-
1681967763126
@@ -773,7 +762,35 @@
1689657014312
-
+
+ 1689846753642
+
+
+
+ 1689846753642
+
+
+ 1689846825769
+
+
+
+ 1689846825769
+
+
+ 1689846845251
+
+
+
+ 1689846845251
+
+
+ 1690456054648
+
+
+
+ 1690456054648
+
+
@@ -874,9 +891,6 @@
-
-
-
@@ -899,7 +913,10 @@
-
+
+
+
+
diff --git a/app/beta/release/output-metadata.json b/app/beta/release/output-metadata.json
index 04da6754..f955bb47 100644
--- a/app/beta/release/output-metadata.json
+++ b/app/beta/release/output-metadata.json
@@ -11,8 +11,8 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
- "versionCode": 216,
- "versionName": "23.28Beta",
+ "versionCode": 220,
+ "versionName": "23.30Beta",
"outputFile": "app-beta-release.apk"
}
],
diff --git a/app/src/main/java/es/verdnatura/domain/SalixService.kt b/app/src/main/java/es/verdnatura/domain/SalixService.kt
index 8f146ec1..b4d91fb7 100644
--- a/app/src/main/java/es/verdnatura/domain/SalixService.kt
+++ b/app/src/main/java/es/verdnatura/domain/SalixService.kt
@@ -8,7 +8,9 @@ import es.verdnatura.presentation.view.feature.ajustes.model.SectorItemVO
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
import es.verdnatura.presentation.view.feature.collection.SalixSaleQuantity
import es.verdnatura.presentation.view.feature.collection.listSaleSalix
+import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
import es.verdnatura.presentation.view.feature.historicoshelvinglog.model.ShelvingLogSalix
+import es.verdnatura.presentation.view.feature.inventario.model.ItemInventoryParking
import es.verdnatura.presentation.view.feature.login.model.DataUserSalix
import es.verdnatura.presentation.view.feature.login.model.LoginSalixVO
import es.verdnatura.presentation.view.feature.login.model.OperatorSalix
@@ -240,6 +242,23 @@ interface SalixService {
):
Call
+ @POST("ItemShelvings/getInventory")
+ fun getInventoryParking(
+ @Query("parkingFrom") parkingFrom: String,
+ @Query("parkingTo") parkingTo: String
+ ):
+ Call>
+
+ @POST("Routes/{id}")
+ fun routeUpdate(
+ @Path("id") id: Number,
+ @Body route: RouteInfo,
+
+ ):
+ Call
+
+
+
}
interface SalixServiceSend {
diff --git a/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt b/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt
index ce7063b8..ad36857c 100644
--- a/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt
+++ b/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt
@@ -877,4 +877,14 @@ interface VerdnaturaService {
fun getRoutes(
@Body vararg params: Any
): Call>
+
+ @POST("/delivery/addNote")
+ fun addNotes(
+ @Body vararg params: Any
+ ): Call
+
+ @POST("/delivery/get_tickets")
+ fun getTickets(
+ @Body vararg params: Any
+ ): Call>
}
\ No newline at end of file
diff --git a/app/src/main/java/es/verdnatura/presentation/common/UICallbacks.kt b/app/src/main/java/es/verdnatura/presentation/common/UICallbacks.kt
index b08a764b..33f8b13b 100644
--- a/app/src/main/java/es/verdnatura/presentation/common/UICallbacks.kt
+++ b/app/src/main/java/es/verdnatura/presentation/common/UICallbacks.kt
@@ -6,6 +6,7 @@ import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
import es.verdnatura.presentation.view.feature.articulo.model.ItemCardRowVO
import es.verdnatura.presentation.view.feature.articulo.model.ItemProposal
import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
+import es.verdnatura.presentation.view.feature.delivery.model.ClientTicket
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
import es.verdnatura.presentation.view.feature.inventario.model.ItemInventaryVO
@@ -57,6 +58,10 @@ interface OnItemImageRouteRowClickListener {
fun onItemImageRouteRowClickListener(item: RouteInfo, action: String)
}
+interface OnItemButtonTicketRowClickListener {
+ fun onItemButtonTicketRowClickListener(item: ClientTicket, action: String)
+}
+
interface OnAddressRowClickListener {
fun onAddressRowClickListener(item: ExpeditionInfoSummary)
}
diff --git a/app/src/main/java/es/verdnatura/presentation/common/UIExtensions.kt b/app/src/main/java/es/verdnatura/presentation/common/UIExtensions.kt
index 8c6fce4f..734e358c 100644
--- a/app/src/main/java/es/verdnatura/presentation/common/UIExtensions.kt
+++ b/app/src/main/java/es/verdnatura/presentation/common/UIExtensions.kt
@@ -3,9 +3,12 @@ package es.verdnatura.presentation.common
import android.app.Activity
import android.content.Context
import android.content.Intent
+import android.content.pm.PackageInfo
+import android.content.pm.PackageManager
import android.graphics.Bitmap
import android.graphics.drawable.Drawable
import android.media.AudioManager
+import android.os.Build
import android.os.Bundle
import android.text.InputType
import android.view.View
@@ -179,3 +182,10 @@ val AudioManager.mediaMaxVolume: Int
// Extension property to get media/music current volume index
val AudioManager.mediaCurrentVolume: Int
get() = this.getStreamVolume(AudioManager.STREAM_MUSIC)
+
+fun PackageManager.getPackageInfoCompat(packageName: String, flags: Int = 0): PackageInfo =
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) {
+ getPackageInfo(packageName, PackageManager.PackageInfoFlags.of(flags.toLong()))
+ } else {
+ @Suppress("DEPRECATION") getPackageInfo(packageName, flags)
+ }
\ No newline at end of file
diff --git a/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogInputNotes.kt b/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogInputNotes.kt
new file mode 100644
index 00000000..187372ee
--- /dev/null
+++ b/app/src/main/java/es/verdnatura/presentation/view/component/CustomDialogInputNotes.kt
@@ -0,0 +1,88 @@
+package es.verdnatura.presentation.view.component
+
+import android.app.Dialog
+import android.content.Context
+import android.text.InputType
+import android.view.View
+import androidx.recyclerview.widget.RecyclerView
+import com.google.android.material.textfield.TextInputEditText
+import es.verdnatura.R
+import es.verdnatura.databinding.ComponentCustomEditDialogBinding
+import es.verdnatura.databinding.ComponentCustomEditDialogNotesBinding
+
+
+class CustomDialogInputNotes(context: Context) : Dialog(context, R.style.DialogTheme) {
+
+ private var binding: ComponentCustomEditDialogNotesBinding =
+ ComponentCustomEditDialogNotesBinding.inflate(layoutInflater)
+
+
+ init {
+
+ setContentView(binding.root)
+ }
+
+ fun getEditText(): TextInputEditText {
+
+ return binding.customDialogValue
+ }
+
+ fun getValue(): String {
+
+ return binding.customDialogValue.text.toString()
+
+ }
+
+ fun setValue(value: String): CustomDialogInputNotes {
+
+ binding.customDialogValue.setText(value)
+ binding.customDialogValue.visibility = View.VISIBLE
+
+ return this
+ }
+
+ fun setTitle(title: String): CustomDialogInputNotes {
+
+ binding.customDialogTitle.visibility = View.VISIBLE
+ binding.customDialogTitle.text = title
+
+ return this
+ }
+
+ fun setDescription(description: String): CustomDialogInputNotes {
+
+ binding.customDialogDescription.visibility = View.VISIBLE
+ binding.customDialogDescription.text = description
+
+ return this
+ }
+
+ fun setOkButton(text: String, onButtonClicked: () -> Unit): CustomDialogInputNotes {
+
+ binding.customDialogButtonOk.visibility = View.VISIBLE
+ binding.customDialogButtonOk.text = text
+ binding.customDialogButtonOk.setOnClickListener { onButtonClicked() }
+
+ return this
+ }
+
+ fun setKoButton(text: String, onButtonClicked: () -> Unit): CustomDialogInputNotes {
+
+ binding.customDialogButtonKo.visibility = View.VISIBLE
+ binding.customDialogButtonKo.text = text
+ binding.customDialogButtonKo.setOnClickListener { onButtonClicked() }
+
+ return this
+ }
+
+ fun setInputText(typeClassNumber: Int = InputType.TYPE_CLASS_NUMBER) {
+ binding.customDialogValue.inputType = typeClassNumber
+ }
+
+ fun setFocusText() {
+ binding.customDialogValue.requestFocus()
+ }
+ fun getRecyclerView() : RecyclerView {
+ return binding.recyclerItems
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/adapters/TicketAdapter.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/adapters/TicketAdapter.kt
new file mode 100644
index 00000000..e469ea11
--- /dev/null
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/adapters/TicketAdapter.kt
@@ -0,0 +1,159 @@
+package es.verdnatura.presentation.view.feature.delivery.adapters
+
+import android.view.LayoutInflater
+import android.view.ViewGroup
+import android.widget.LinearLayout
+import android.widget.TextView
+import androidx.core.content.ContextCompat
+import androidx.recyclerview.widget.RecyclerView
+import es.verdnatura.R
+import es.verdnatura.databinding.ItemTicketRowBinding
+import es.verdnatura.presentation.common.OnItemButtonTicketRowClickListener
+import es.verdnatura.presentation.view.feature.delivery.model.ClientTicket
+
+
+class TicketAdapter(
+ private var items: MutableList,
+ private val onItemButtonTicketRowClickListener: OnItemButtonTicketRowClickListener,
+) : RecyclerView.Adapter() {
+
+
+ override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
+ // items = setHeaders(items)
+ return ItemHolder(
+ ItemTicketRowBinding.inflate(
+ LayoutInflater.from(parent.context),
+ parent,
+ false
+ )
+ )
+ }
+
+ fun setHeaders(list: MutableList): MutableList {
+
+ /* var prevCreated = ""
+ for (route in list) {
+ if (route.created.toString() != prevCreated) {
+ route.header = true
+ prevCreated = route.created.toString()
+ }
+ }*/
+ return list
+ }
+
+ fun updateList(newList: MutableList) {
+ // items = setHeaders(newList)
+ notifyDataSetChanged()
+ }
+
+ override fun getItemCount() = items.size
+
+ override fun onBindViewHolder(holder: ItemHolder, position: Int) {
+ // items = setHeaders(items)
+ holder.bind(items[position])
+
+ /* holder.binding.root.setOnClickListener {
+ //onAddressRowClickListener.onAddressRowClickListener(items[position])
+ }*/
+
+ val viewTickets = holder.itemView.findViewById(R.id.layoutTickets)
+ viewTickets.removeAllViews()
+
+ // Inflate and add views for each ticket
+ val inflater = LayoutInflater.from(holder.itemView.context)
+ items[position].tickets.forEach { ticket ->
+ val v = inflater.inflate(R.layout.item_ticket_sub_row, null)
+ val txtTicket = v.findViewById(R.id.txtTicket)
+ val txtPackage = v.findViewById(R.id.packages)
+ val txtPackingType = v.findViewById(R.id.packingType)
+
+ // Bind the ticket data to the views
+ txtTicket.text = ticket.Id.toString()
+ txtPackage.text = ticket.Packages.toString()
+ txtPackingType.text = ticket.PackingType
+
+ viewTickets.addView(v)
+ }
+ }
+
+ inner class ItemHolder(
+ val binding: ItemTicketRowBinding
+ ) : RecyclerView.ViewHolder(binding.root) {
+ private val res = binding.root.context.resources
+ fun bind(item: ClientTicket) {
+ binding.apply {
+
+
+ /* showTickets.setOnClickListener {
+ OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"showTickets")
+ }
+ imageLoadVan.setOnClickListener {
+ OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"loadVan")
+ }
+ linearLayoutShowTickets.setOnClickListener {
+ OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"showTickets")
+ }
+ linearLayoutLoadVan.setOnClickListener {
+ OnItemImageRouteRowClickListener.onItemImageRouteRowClickListener(item,"loadVan")
+ }
+
+ if (item.header){
+ headerRouteLayout.visibility = View.VISIBLE
+ headerRoute.text = toDateString(item.created)
+ }else{
+ headerRouteLayout.visibility = View.GONE
+
+
+ }*/
+ if (!item.Note.isNullOrEmpty()) {
+ note.setColorFilter(
+ ContextCompat.getColor(
+ note.context,
+ R.color.verdnatura_dark_sky_blue
+ )
+ )
+ } else {
+ note.setColorFilter(
+ ContextCompat.getColor(
+ note.context,
+ R.color.verdnatura_white
+ )
+ )
+ }
+ note.setOnClickListener {
+ onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener(
+ item,
+ "note"
+ )
+ }
+ addNote.setOnClickListener {
+ onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener(
+ item,
+ "addNote"
+ )
+ }
+ phone.setOnClickListener {
+ onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener(
+ item,
+ "call"
+ )
+ }
+ map.setOnClickListener {
+ onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener(
+ item,
+ "map"
+ )
+ }
+ unload.setOnClickListener {
+ onItemButtonTicketRowClickListener.onItemButtonTicketRowClickListener(
+ item,
+ "unload"
+ )
+ }
+
+ this.item = item
+
+ }
+ }
+ }
+}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/RoutesFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/RoutesFragment.kt
index bc807cdc..2113427a 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/RoutesFragment.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/RoutesFragment.kt
@@ -11,6 +11,7 @@ import android.view.View
import android.widget.ImageView
import androidx.annotation.RequiresApi
import androidx.recyclerview.widget.LinearLayoutManager
+import com.google.gson.Gson
import es.verdnatura.R
import es.verdnatura.databinding.FragmentRouteBinding
import es.verdnatura.domain.notNull
@@ -226,7 +227,11 @@ class RoutesFragment(
"showTickets" -> {
//println("La ruta de los tickets es: " + item.id)
- openAppDelivery(item)
+ //openAppDelivery(item)
+ ma.onPasillerosItemClickListener(
+ PasillerosItemVO(title = getString(R.string.tickets)),
+ Gson().toJson(item)
+ )
}
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/TicketsFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/TicketsFragment.kt
new file mode 100644
index 00000000..77273249
--- /dev/null
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/TicketsFragment.kt
@@ -0,0 +1,509 @@
+package es.verdnatura.presentation.view.feature.delivery.fragments
+
+import android.Manifest
+import android.app.Activity
+import android.app.AlertDialog
+import android.app.TimePickerDialog
+import android.content.Intent
+import android.content.pm.PackageInfo
+import android.content.pm.PackageManager
+import android.graphics.drawable.Drawable
+import android.net.Uri
+import android.os.Build
+import android.view.View
+import android.widget.ImageView
+import android.widget.TextView
+import androidx.annotation.RequiresApi
+import androidx.core.app.ActivityCompat
+import androidx.core.content.ContextCompat
+import androidx.recyclerview.widget.LinearLayoutManager
+import com.google.gson.Gson
+import es.verdnatura.R
+import es.verdnatura.databinding.FragmentTicketsBinding
+import es.verdnatura.domain.notNull
+import es.verdnatura.domain.toast
+import es.verdnatura.presentation.base.BaseFragment
+import es.verdnatura.presentation.common.*
+import es.verdnatura.presentation.view.component.CustomDialogInputNotes
+import es.verdnatura.presentation.view.feature.delivery.adapters.TicketAdapter
+import es.verdnatura.presentation.view.feature.delivery.model.ClientTicket
+import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
+import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
+import es.verdnatura.presentation.view.feature.delivery.model.Ticket
+import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewModel
+import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
+import java.util.Calendar
+
+
+class TicketsFragment(
+ var title: String = "",
+ var route: RouteInfo
+) : BaseFragment(
+ DeliveryViewModel::class
+) {
+
+ private var adapter: TicketAdapter? = null
+ private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
+ private lateinit var myListClientTicket: MutableList
+
+ companion object {
+ fun newInstance(title: String, entryPoint: String) =
+ TicketsFragment(title, Gson().fromJson(entryPoint, RouteInfo::class.java))
+
+ private const val REQUEST_CALL_PERMISSION = 1
+
+ }
+
+ override fun getLayoutId(): Int = R.layout.fragment_tickets
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ override fun init() {
+ super.init()
+ setEvents()
+ setToolBar()
+ binding.mainToolbar.toolbarTitle.text = route.name
+ println("La ruta es: " + route.toString())
+ callBack(viewModel.getTickets(route.id))
+
+ }
+
+ private fun setTitle() {
+
+ binding.mainToolbar.toolbarSubtitle.text =
+ if (::myListClientTicket.isInitialized) {
+ myListClientTicket.filter { it.Signed == 1 }.size.toString() + "/" + myListClientTicket.size
+ } else {
+ "0/0"
+ }
+ }
+
+ private fun callBack(callBackEndPoint: Unit) {
+ binding.splashProgress.visibility = View.VISIBLE
+ return callBackEndPoint
+ }
+
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ private fun setToolBar() {
+ ma.hideBottomNavigation(View.GONE)
+ binding.mainToolbar.toolbarSubtitle.setTextColor(requireContext().getColor((R.color.verdnatura_pumpkin_orange)))
+ binding.mainToolbar.toolbarTitle.visibility = View.VISIBLE
+ binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE
+ binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
+
+
+ val listIcons: ArrayList = ArrayList()
+ val iconSettings = ImageView(context)
+
+
+
+ iconSettings.setImageResource(R.drawable.ic_setting_ui)
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+ iconSettings.tooltipText = getTooltip(R.drawable.ic_setting_ui)
+
+ }
+ listIcons.add(iconSettings)
+
+
+ binding.mainToolbar.toolbarIcons.adapter =
+ ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
+
+ override fun onOptionsItemSelected(item: Drawable) {
+
+ when (item) {
+ iconSettings.drawable -> {
+ /* //binding.itemcardLayout.visibility = View.GONE
+ binding.itemcardLayout.visibility = View.GONE
+ binding.ticketsRecyclerview.visibility = View.GONE
+ binding.layoutKmHour.visibility = View.VISIBLE
+ binding.kmStart.setText(binding.kmStart.toString())
+ binding.kmEnd.setText(binding.kmEnd.toString())
+*/
+ }
+
+
+ }
+ }
+ })
+
+ binding.mainToolbar.toolbarIcons.layoutManager =
+ LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
+ binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
+ }
+
+ private fun openAppDelivery(item: RouteInfo) {
+ val i = Intent()
+ val manager: PackageManager = requireContext().packageManager
+ val info: PackageInfo = manager.getPackageInfo(requireContext().packageName, 0)
+ val version = info.versionName
+ try {
+ if (version.contains("Beta")) {
+ i.setClassName(
+ "verdnatura.es.repartoverdnatura.sfusion",
+ "verdnatura.es.repartoverdnatura.Tickets"
+ )
+ } else {
+ i.setClassName(
+ "verdnatura.es.repartoverdnatura",
+ "verdnatura.es.repartoverdnatura.Tickets"
+ )
+ }
+ i.putExtra("plate", item.numberPlate)
+ i.putExtra("id", item.id.toString())
+ i.putExtra("agency", item.name)
+ i.putExtra("hour", item.hour)
+ i.putExtra("date", item.created.toString())
+ i.putExtra("m3", item.m3.toString())
+ i.putExtra("driver", item.driver)
+ i.putExtra("kmStart", item.kmStart.toString())
+ i.putExtra("kmEnd", item.kmEnd.toString())
+ i.putExtra("dEnd", item.finished)
+ i.putExtra("dStart", item.started)
+ i.putExtra("app", "picking")
+ startActivity(i)
+ } catch (e: Exception) {
+ getString(R.string.deliveryApp).toast(context)
+ }
+
+
+ }
+
+
+ private fun setEvents() {
+ binding.mainToolbar.backButton.setOnClickListener {
+
+ if (binding.layoutKmHour.visibility == View.VISIBLE) {
+ binding.ticketsRecyclerview.visibility = View.VISIBLE
+ binding.itemcardLayout.visibility = View.VISIBLE
+ binding.layoutKmHour.visibility = View.GONE
+ } else {
+ requireActivity().onBackPressed()
+ }
+ binding.saveButton.setOnClickListener {
+ binding.splashProgress.visibility = View.VISIBLE
+ route.kmStart = binding.kmStart.text.toString().toLong()
+ route.kmEnd = binding.kmEnd.text.toString().toLong()
+ viewModel.routeUpdate(route)
+ }
+ binding.hourInit.setOnFocusChangeListener { view, b ->
+ if (b) {
+ showTimePicker(binding.hourInit)
+ }
+ }
+ binding.hourInit.setText("asdfasdf")
+ binding.buttonPicker.setOnClickListener {
+ println("hour start")
+ // showTimePicker(binding.hourEnd)
+ println("hour start")
+ }
+ binding.hourEnd.setOnClickListener {
+ println("hour end")
+ // showTimePicker(binding.hourEnd)
+ }
+ }
+
+
+ /* binding.scanInput.addTextChangedListener(object : TextWatcher {
+ override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {
+ }
+
+ override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
+ val searchText = s.toString().lowercase()
+ val filteredList = myListClientTicket.filter { route ->
+ route.toString().lowercase().contains(searchText)
+ }.toMutableList()
+ adapter!!.updateList(filteredList)
+ }
+
+ override fun afterTextChanged(s: Editable?) {
+
+ }
+ })
+ */
+ }
+
+ @RequiresApi(Build.VERSION_CODES.O)
+ override fun observeViewModel() {
+ with(viewModel) {
+ loadRouteList.observe(viewLifecycleOwner) { event ->
+ event.getContentIfNotHandled().notNull {
+ binding.splashProgress.visibility = View.GONE
+ // createListRoutes(it.list)
+ }
+ }
+
+
+ clientTicketList.observe(viewLifecycleOwner) {
+ binding.splashProgress.visibility = View.GONE
+ if (it.list.isNotEmpty()) {
+ createLisTickets(it.list)
+ setTitle()
+ }
+ }
+ responseStateAdd.observe(viewLifecycleOwner) {
+ binding.splashProgress.visibility = View.GONE
+ }
+ response.observe(viewLifecycleOwner) {
+ binding.splashProgress.visibility = View.GONE
+ }
+
+ }
+ }
+
+ private fun createLisTickets(list: MutableList) {
+
+ var myListClientTicketAux = list.distinctBy { it.Address }
+
+ for (clientTicket in myListClientTicketAux) {
+ val addressId = clientTicket.Address
+ val ticketsForClient = list.filter { it.Address == addressId }
+ val mappedTickets = ticketsForClient.map { ticket ->
+ Ticket(ticket.Id, ticket.Packages, ticket.PackingType, ticket.Note)
+ }
+ clientTicket.tickets = mappedTickets as MutableList
+ }
+
+ myListClientTicket = myListClientTicketAux as MutableList
+
+ for (m in myListClientTicket) {
+ println("address" + m.Address)
+ for (mt in m.tickets) {
+ println("address ${m.Address}tickets" + mt.Id)
+ }
+ }
+ adapter = TicketAdapter(
+ myListClientTicket,
+ object : OnItemButtonTicketRowClickListener {
+
+ override fun onItemButtonTicketRowClickListener(
+ item: ClientTicket,
+ action: String
+ ) {
+ when (action) {
+ "unload" -> {
+ ma.onPasillerosItemClickListener(
+ PasillerosItemVO(title = getString(R.string.titleDeliverySummary)),
+ route.id.toString()
+ )
+ }
+
+ "map" -> {
+ goMaps(item)
+ }
+
+ "note" -> {
+ showNotes(item)
+ }
+
+ "addNote" -> {
+ addNotes(item)
+ }
+
+ "call" -> {
+ showPhones(item)
+ }
+
+ }
+
+ }
+
+ },
+ )
+
+ binding.ticketsRecyclerview.addItemDecoration(
+ ItemDescorationCustomized(
+ resources.getDimensionPixelSize(
+ R.dimen.vertical_spacing
+ )
+ )
+ )
+ binding.ticketsRecyclerview.adapter = adapter
+ binding.ticketsRecyclerview.layoutManager =
+ LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
+ adapter!!.notifyDataSetChanged()
+
+ }
+
+ private fun addNotes(itemClient: ClientTicket) {
+
+ var customDialogInput = CustomDialogInputNotes(requireContext())
+ customDialogInput.setTitle("Notas")
+
+ var adapter: GeneralAdapter
+ var itemsNotes: List = listOf(
+ GeneralItem(code = "", text = getString(R.string.clientNot)),
+ GeneralItem(code = "", text = getString(R.string.clientAuthorization)),
+ GeneralItem(code = "", text = getString(R.string.clientReject)),
+ GeneralItem(code = "", text = getString(R.string.packagesMissing)),
+ GeneralItem(code = "", text = getString(R.string.clientDevolution)),
+ )
+
+ adapter = GeneralAdapter(itemsNotes, object : OnGeneralItemRowClickListener {
+
+ override fun OnGeneralItemRowClickListener(item: GeneralItem) {
+ itemClient.tickets.forEach { listClient ->
+ listClient.Note = customDialogInput.getValue()
+ }
+ customDialogInput.setValue(item.text.toString())
+
+ }
+ })
+ customDialogInput.getRecyclerView().adapter = adapter
+ customDialogInput.getRecyclerView().layoutManager =
+ LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
+ customDialogInput.setOkButton(getString(R.string.save)) {
+ viewModel.addNotes(itemClient.tickets, customDialogInput.getValue())
+ }
+ .setKoButton(getString(R.string.cancel)) {
+ customDialogInput.cancel()
+ customDialogInput.dismiss()
+ }
+ customDialogInput.show()
+
+ /* val alertDialogBuilder = AlertDialog.Builder(context)
+ alertDialogBuilder.setTitle("Ingrese su texto")
+
+ val editText = EditText(context)
+ alertDialogBuilder.setView(editText)
+
+ alertDialogBuilder.setPositiveButton("Aceptar") { _, _ ->
+ val userInputText = editText.text.toString()
+ // Aquí puedes hacer lo que desees con el texto ingresado por el usuario
+ // Por ejemplo, mostrarlo en un Toast, guardarlo en una base de datos, etc.
+ }
+
+ alertDialogBuilder.setNegativeButton("Cancelar") { dialog, _ ->
+ dialog.cancel()
+ }
+
+ val alertDialog = alertDialogBuilder.create()
+ alertDialog.show()*/
+ }
+
+ private fun showNotes(item: ClientTicket) {
+
+ val alertDialog = AlertDialog.Builder(requireContext()).create()
+ alertDialog.setTitle(getString(R.string.info))
+ alertDialog.setMessage(item.Note)
+ alertDialog.setButton(
+ AlertDialog.BUTTON_NEUTRAL, getString(R.string.close)
+ ) { dialog, _ -> dialog.dismiss() }
+ alertDialog.show()
+
+ }
+
+
+ private fun setListPosition(list: MutableList) {
+ for (i in list.indices) {
+ binding.ticketsRecyclerview.scrollToPosition(i)
+ break
+ }
+ }
+
+ fun showPhones(clientClicked: ClientTicket) {
+
+ val phones = mutableListOf().apply {
+ addAll(clientClicked.Phones)
+ add(clientClicked.SalePersonPhone)
+ }
+ val builder = AlertDialog.Builder(context)
+ builder.setTitle(getString(R.string.phones))
+ val listPhones = phones.toTypedArray()
+ builder.setItems(listPhones) { dialog, which ->
+
+ if (ContextCompat.checkSelfPermission(
+ requireContext(),
+ Manifest.permission.CALL_PHONE
+ ) == PackageManager.PERMISSION_GRANTED
+ ) {
+ val callIntent = Intent(Intent.ACTION_CALL)
+ callIntent.data = Uri.parse("tel:$which]")
+ startActivity(callIntent)
+ } else {
+ ActivityCompat.requestPermissions(
+ context as Activity,
+ arrayOf(Manifest.permission.CALL_PHONE),
+ REQUEST_CALL_PERMISSION
+ )
+ }
+
+
+ }
+ val dialog = builder.create()
+ dialog.show()
+
+ }
+
+ fun goMaps(item: ClientTicket) {
+
+ if (isGoogleMapsInstalled()) {
+
+ var uri: String
+ if (item.Latitude != null) {
+ uri = "geo:${item.Latitude},${item.Longitude}?q=" + item.ClientName +
+ " " + item.AddressName +
+ " " + item.City +
+ " " + item.PostalCode
+
+ } else {
+ uri = "geo:0,0?q=" + item.ClientName +
+ " " + item.AddressName +
+ " " + item.City +
+ " " + item.PostalCode
+ }
+ val locationIntent = Intent(Intent.ACTION_VIEW, Uri.parse(uri))
+ startActivity(locationIntent)
+
+
+ } else {
+ val builder = AlertDialog.Builder(requireContext())
+ builder.setMessage("Instalar Maps de Google")
+ builder.setCancelable(false)
+ builder.setPositiveButton(
+ "Install"
+ ) { _, _ ->
+ val intent = Intent(
+ Intent.ACTION_VIEW,
+ Uri.parse("market://details?id=com.google.android.apps.maps")
+ )
+ startActivity(intent)
+ }
+ val dialog = builder.create()
+ dialog.show()
+ }
+
+ }
+
+ private fun isGoogleMapsInstalled(): Boolean {
+
+ return try {
+ val packageName = "com.google.android.apps.maps"
+ val packageManager = context?.packageManager
+ packageManager?.getPackageInfoCompat(packageName)
+ true
+ } catch (e: Exception) {
+ false
+ }
+
+ }
+
+ private fun showTimePicker(textV: TextView) {
+
+ var mcurrentTime = Calendar.getInstance()
+ var hour = mcurrentTime[Calendar.HOUR_OF_DAY]
+ var minute = mcurrentTime[Calendar.MINUTE]
+
+ var mTimePicker = TimePickerDialog(
+ requireContext(),
+ { _, selectedHour, selectedMinute -> textV.text = "$selectedHour:$selectedMinute" },
+ hour,
+ minute,
+ true
+ )
+ mTimePicker.setTitle(getString(R.string.selectTime))
+ mTimePicker.show()
+
+ }
+}
+
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/ClientTicket.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/ClientTicket.kt
new file mode 100644
index 00000000..fbaf68c8
--- /dev/null
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/ClientTicket.kt
@@ -0,0 +1,42 @@
+package es.verdnatura.presentation.view.feature.delivery.model
+
+import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingType
+
+class ClientTicketList(
+ var list: MutableList = mutableListOf()
+)
+
+
+data class ClientTicket(
+ var Id: Int,
+ var Client: Int,
+ var ClientName: String,
+ var Address: Int,
+ var Packages: Int,
+ var AddressName: String,
+ var PostalCode: String,
+ var City: String,
+ var Warehouse: String?,
+ var SalePersonPhone: String,
+ var Note: String?,
+ var Phones: List,
+ var Location: Location,
+ var Signed: Int,
+ var Latitude: String,
+ var Longitude: String,
+ var Polizon: Any?,
+ var PackingType: String,
+ var tickets: MutableList
+)
+
+data class Location(
+ var Longitude: String,
+ var Latitude: String
+)
+data class Ticket(
+ var Id: Int,
+ var Packages: Int,
+ var PackingType: String?,
+ var Note:String?
+
+)
\ No newline at end of file
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/viewmodels/DeliveryViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/viewmodels/DeliveryViewModel.kt
index 69c13b55..aa88255b 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/viewmodels/DeliveryViewModel.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/viewmodels/DeliveryViewModel.kt
@@ -9,6 +9,8 @@ import es.verdnatura.domain.SilexCallback
import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.common.Event
import es.verdnatura.presentation.common.ResponseItemVO
+import es.verdnatura.presentation.view.feature.delivery.model.ClientTicket
+import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketList
import es.verdnatura.presentation.view.feature.delivery.model.DeliveryInfo
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoList
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
@@ -21,6 +23,9 @@ import es.verdnatura.presentation.view.feature.delivery.model.RouteDelivery
import es.verdnatura.presentation.view.feature.delivery.model.RouteDeliveryList
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
import es.verdnatura.presentation.view.feature.delivery.model.RouteList
+import es.verdnatura.presentation.view.feature.delivery.model.Ticket
+import org.json.JSONArray
+import org.json.JSONObject
import retrofit2.Response
class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
@@ -37,6 +42,9 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
private val _routeList by lazy { MutableLiveData() }
val routeList: LiveData = _routeList
+ private val _clientTicketList by lazy { MutableLiveData() }
+ val clientTicketList: LiveData = _clientTicketList
+
private val _routeInfoList by lazy { MutableLiveData() }
val routeInfoList: LiveData = _routeInfoList
@@ -50,6 +58,11 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
val responseStateAdd: LiveData
get() = _responseStateAdd
+
+ private val _response by lazy { MutableLiveData() }
+ val response: LiveData = _response
+
+
private val _expeditionList by lazy { MutableLiveData() }
val expeditionList: LiveData = _expeditionList
@@ -241,6 +254,106 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
})
}
+ fun getTickets(
+ routeId: Long
+ ) {
+ silex.getTickets(routeId)
+ .enqueue(object : SilexCallback>(context) {
+
+ override fun onSuccess(response: Response>) {
+
+ if (response.body() != null) {
+ _clientTicketList.value =
+ response.body()?.let { ClientTicketList(it) }
+ } else {
+ _clientTicketList.value = ClientTicketList()
+ }
+ }
+
+ override fun onError(t: Throwable) {
+ _clientTicketList.value = ClientTicketList()
+ super.onError(t)
+
+ }
+ })
+ }
+
+ fun addNote(
+ ticketFk: Int
+ ) {
+ silex.addNotes(ticketFk)
+ .enqueue(object : SilexCallback(context) {
+
+ override fun onSuccess(response: Response) {
+ _responseStateAdd.value = ResponseItemVO()
+
+ }
+
+ override fun onError(t: Throwable) {
+ _responseStateAdd.value = ResponseItemVO()
+ super.onError(t)
+
+ }
+ })
+ }
+
+ fun routeUpdate(
+ route: RouteInfo
+ ) {
+ salix.routeUpdate(route.id, route)
+ .enqueue(object : SilexCallback(context) {
+
+ override fun onSuccess(response: Response) {
+ _response.value = ResponseItemVO()
+
+ }
+
+ override fun onError(t: Throwable) {
+ _response.value = ResponseItemVO()
+ super.onError(t)
+
+ }
+ })
+ }
+
+ fun addNotes(
+ listTickets: MutableList,
+ note: String
+
+
+ ) {
+ silex.addNotes( mapOf(
+ "Tickets" to listTickets.map { it.Id },
+ "note" to note))
+ .enqueue(object : SilexCallback(context) {
+
+ override fun onSuccess(response: Response) {
+ _response.value = ResponseItemVO()
+
+ }
+
+ override fun onError(t: Throwable) {
+ _response.value = ResponseItemVO()
+ super.onError(t)
+
+ }
+ })
+ }
+ fun createJSONObject(listTickets: MutableList, note: String): String {
+ // Supongamos que tienes la lista de tickets y el valor como los siguientes:
+ // val listTickets: List = listOf("4255452", "5454515")
+ // val note: String = "Mi nota"
+
+ // Crear el objeto JSON
+ val jsonObject = JSONObject()
+ val jsonArrayTickets = JSONArray(listTickets)
+ jsonObject.put("tickets", jsonArrayTickets)
+ jsonObject.put("note", note)
+
+ // Convertir el objeto JSON a un String
+ return jsonObject.toString()
+ }
+
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt
index a627cd06..1d016a27 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt
@@ -6,6 +6,7 @@ package es.verdnatura.presentation.view.feature.main.activity
import NetworkUtils
import PhotosFragment
import android.content.SharedPreferences
+import android.graphics.Color
import android.media.MediaPlayer
import android.net.Uri
import android.os.Build
@@ -47,6 +48,7 @@ import es.verdnatura.presentation.view.feature.delivery.fragments.LoadUnloadFrag
import es.verdnatura.presentation.view.feature.delivery.fragments.LogExpeditionFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.RoutesFragment
import es.verdnatura.presentation.view.feature.delivery.fragments.SummaryFragment
+import es.verdnatura.presentation.view.feature.delivery.fragments.TicketsFragment
import es.verdnatura.presentation.view.feature.diadeventa.fragment.DayOfSaleFragment
import es.verdnatura.presentation.view.feature.historicoarticulo.fragment.HistoricoArticuloFragment
import es.verdnatura.presentation.view.feature.historicoshelving.fragment.itemShelvingLogFragment
@@ -80,6 +82,7 @@ import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingFragment
import es.verdnatura.presentation.view.feature.ticket.fragment.TicketAdvanceFragment
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragment
+import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragmentTEST
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment
import es.verdnatura.presentation.view.feature.workermistake.adapter.WorkermistakeFragment
import es.verdnatura.presentation.view.feature.workermistake.fragment.PackingMistakeFragment
@@ -653,7 +656,12 @@ class MainActivity : BaseActivity(), OnPasillerosItemClickL
}
getString(R.string.titleAuto) -> {
+ /* if ( (application as MobileApplication).userId== 19591){
+ "Testeo rayo".toast(this, Color.RED)*/
+ addFragmentOnTop(AutomaticAddItemFragmentTEST.newInstance(entryPoint, item.title))
+ /* }else{
addFragmentOnTop(AutomaticAddItemFragment.newInstance(entryPoint, item.title))
+ }*/
}
getString(R.string.titleChecker) -> {
@@ -880,6 +888,10 @@ class MainActivity : BaseActivity(), OnPasillerosItemClickL
getString(R.string.titleInventoryParking) -> {
addFragmentOnTop(InventaryParkingFragment.newInstance(item.title))
}
+
+ getString(R.string.tickets) -> {
+ addFragmentOnTop(TicketsFragment.newInstance(item.title,entryPoint))
+ }
}
}
diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt
index e97935c3..f04a8f4b 100644
--- a/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt
+++ b/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt
@@ -170,7 +170,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
)
)
//Tarea 5891
- /* _pasillerositem.add(
+ _pasillerositem.add(
PasillerosItemVO(
3,
R.drawable.ic_inventory_parking,
@@ -180,7 +180,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
R.string.titleInventoryParkingDescrip
)
)
- )*/
+ )
_pasillerositem.add(
PasillerosItemVO(
@@ -633,5 +633,6 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
contextApp.getString(R.string.titleDeliveryRoute)
)
)
+
}
}
diff --git a/app/src/main/res/drawable/ic_location.xml b/app/src/main/res/drawable/ic_location.xml
new file mode 100644
index 00000000..feea7f79
--- /dev/null
+++ b/app/src/main/res/drawable/ic_location.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_note.xml b/app/src/main/res/drawable/ic_note.xml
new file mode 100644
index 00000000..f19feb2c
--- /dev/null
+++ b/app/src/main/res/drawable/ic_note.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_note_add.xml b/app/src/main/res/drawable/ic_note_add.xml
new file mode 100644
index 00000000..b19721f3
--- /dev/null
+++ b/app/src/main/res/drawable/ic_note_add.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/ic_phone.xml b/app/src/main/res/drawable/ic_phone.xml
new file mode 100644
index 00000000..bc19c586
--- /dev/null
+++ b/app/src/main/res/drawable/ic_phone.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/app/src/main/res/layout/component_custom_edit_dialog_notes.xml b/app/src/main/res/layout/component_custom_edit_dialog_notes.xml
new file mode 100644
index 00000000..a4b63b85
--- /dev/null
+++ b/app/src/main/res/layout/component_custom_edit_dialog_notes.xml
@@ -0,0 +1,111 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/fragment_route_config.xml b/app/src/main/res/layout/fragment_route_config.xml
new file mode 100644
index 00000000..2020450e
--- /dev/null
+++ b/app/src/main/res/layout/fragment_route_config.xml
@@ -0,0 +1,229 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_tickets.xml b/app/src/main/res/layout/fragment_tickets.xml
new file mode 100644
index 00000000..1197161d
--- /dev/null
+++ b/app/src/main/res/layout/fragment_tickets.xml
@@ -0,0 +1,336 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_escaner_row.xml b/app/src/main/res/layout/item_escaner_row.xml
index 0517f0b2..0e1ff68a 100644
--- a/app/src/main/res/layout/item_escaner_row.xml
+++ b/app/src/main/res/layout/item_escaner_row.xml
@@ -39,7 +39,6 @@
android:layout_weight="1"
android:textSize="@dimen/h5"
android:textColor="@color/verdnatura_white"
- android:text="@{Long.toString(item.item)}"
tool:text="45532"
android:textStyle="bold"
android:gravity="center_vertical"/>
diff --git a/app/src/main/res/layout/item_ticket_row.xml b/app/src/main/res/layout/item_ticket_row.xml
new file mode 100644
index 00000000..213f6321
--- /dev/null
+++ b/app/src/main/res/layout/item_ticket_row.xml
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/item_ticket_sub_row.xml b/app/src/main/res/layout/item_ticket_sub_row.xml
new file mode 100644
index 00000000..af5d518f
--- /dev/null
+++ b/app/src/main/res/layout/item_ticket_sub_row.xml
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index f99475f6..14ad8b4f 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -605,8 +605,8 @@
Indica la nueva cantidad visible
Ecscanea o escribe la matrícula a resetear revisión
Indica parkings a revisar
- Indica desde dónde hasta cual quieres revisar
- Indica el parking hasta donde quieres revisar
+ Indica desde qué parking quieres revisar
+ Indica hasta qué parking quieres revisar
Matrícula del carro no encontrada
Escanea artículo a verificar
Artículo no encontrado. Escanea de nuevo el carro
@@ -623,5 +623,22 @@
Número palet
NO INTERNET
Asegúrate de tener la app de reparto instalada
+ Teléfonos
+ Kilómetros
+ Horas
+ Km de inicio
+ Km de fin
+ Hora de inicio
+ Hora de fin
+ Selecciona la hora
+ Bultos
+ Muestra los ítems no revisados
+ Resetea los items revisados de un carro
+ Opción que selecciona los parkings a revisar
+ CLIENTE AUSENTE
+ CLIENTE AUTORIZA DESCARGA A REPARTIDOR
+ CLIENTE RECHAZA PEDIDO
+ FALTAN BULTOS:
+ RECOGER DEVOLUCIÓN, NÚMERO DE RECLAMACIÓN:
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 71d62665..dced89c5 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -208,7 +208,7 @@
Aparcar carro
Parking
Añade item al carro
- ENREGISTRER
+ Enregistrer
Permite cambiar la matrícula a un carro
Borra todos los items del carro
Cambia la prioridad de los items del carro. Cuanto más alta antes cogerán los sacadores.
@@ -623,5 +623,22 @@
Numéro de palette
NO INTERNET
Assurez-vous que l\'application de livraison est installée
+ Téléphone
+ Kilomètres
+ Heures
+ Kilométrage de départ
+ Kilométrage de fin
+ Heure de départ
+ Heure de fin
+ Sélectionnez l\'heure
+ Colis
+ Muestra los ítems no revisados
+ Resetea los items revisados de un carro
+ Opción que selecciona los parkings a revisar
+ CLIENT ABSENT
+ CLIENT AUTORISE LA LIVRAISON AU LIVREUR
+ CLIENT REFUSE LA COMMANDE
+ COLIS MANQUANTS :
+ RECUEILLIR UN RETOUR, NUMÉRO DE RÉCLAMATION :
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index e54cf45a..f1f7d2e4 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -623,5 +623,22 @@
Numero palet
NO INTERNET
Certifique-se de ter o aplicativo de entrega instalado
+ Telefone
+ Kilometros
+ Horas
+ Km de inicio
+ Km fim
+ Hora de inicio
+ Hora fim
+ Seleccione Hora
+ Volumes
+ Muestra los ítems no revisados
+ Resetea los items revisados de un carro
+ Opción que selecciona los parkings a revisar
+ CLIENTE AUSENTE
+ CLIENTE AUTORIZA DESCARGA AO ESTAFETA
+ CLIENTE REJEITA PEDIDO
+ FALTAM VOLUMES:
+ \"LEVANTAR DEVOLUÇÃO, NUMERO DE RECLAMAÇÃO: \"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c1ec1c6c..68b92b73 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -610,10 +610,10 @@
Inventory by parking
Inventory by parking, you can select ubications
Indica la nueva cantidad visible
- Ecscanea o escribe la matrícula a resetear revisión
+ Escanea o escribe la matrícula a resetear revisión
Indica parkings a revisar
- Indica desde dónde hasta cual quieres revisar
- Indica el parking hasta donde quieres revisar
+ Indica desde qué parking quieres revisar
+ Indica hasta qué parking quieres revisar
Matrícula del carro no encontrada
Escanea artículo a verificar
Artículo no encontrado. Escanea de nuevo el carro
@@ -622,4 +622,21 @@
Scan
NO INTERNET
Make sure you have the delivery app installed
+ Phones
+ Kilometers
+ Hours
+ Start km
+ Finish km
+ Start hour
+ Finish hour
+ Select Time
+ Packages
+ Muestra los ítems no revisados
+ Resetea los items revisados de un carro
+ Opción que selecciona los parkings a revisar
+ CLIENTE AUSENTE
+ CLIENTE AUTORIZA DESCARGA A REPARTIDOR
+ CLIENTE RECHAZA PEDIDO
+ FALTAN BULTOS:
+ RECOGER DEVOLUCIÓN, NÚMERO DE RECLAMACIÓN: