From 1feb2b2db2b043d392152b6b300af7b089c5da35 Mon Sep 17 00:00:00 2001 From: Sergio De la torre Date: Mon, 5 Feb 2024 15:51:21 +0100 Subject: [PATCH] refs #6107 feat: refactor fields --- .../delivery/fragments/LoadUnloadFragment.kt | 6 ++--- .../delivery/fragments/RoutesFragment.kt | 1 + .../feature/delivery/model/ClientTicket.kt | 27 ------------------- .../feature/main/activity/MainActivity.kt | 4 +-- 4 files changed, 6 insertions(+), 32 deletions(-) diff --git a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt index 156b9c89..aeec44e9 100644 --- a/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt +++ b/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt @@ -22,7 +22,7 @@ import es.verdnatura.presentation.common.OnOptionsSelectedListener import es.verdnatura.presentation.common.ToolBarAdapterTooltip import es.verdnatura.presentation.view.feature.delivery.activity.SignedActivity import es.verdnatura.presentation.view.feature.delivery.adapters.ExpeditionLoadUnloadAdapter -import es.verdnatura.presentation.view.feature.delivery.model.ClientTicket +import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketSalix import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoPending import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionSalix @@ -38,7 +38,7 @@ class LoadUnloadFragment( private var title: String = "", private var state: String = "", private var entryPoint: String, - private var clientTicketList: ArrayList? + private var clientTicketList: ArrayList? ) : BaseFragment( DeliveryViewModel::class @@ -59,7 +59,7 @@ class LoadUnloadFragment( title: String, state: String, entryPoint: String, - clientTicketList: ArrayList? = null + clientTicketList: ArrayList? = null ) = LoadUnloadFragment(title, state, entryPoint, clientTicketList) fun scanning(scan: Boolean) { 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 c3315037..b3ba71db 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 @@ -249,6 +249,7 @@ class RoutesFragment( responseLoadList.observe(viewLifecycleOwner) { ma.messageWithSound(getString(R.string.offline), false, false, "", true) + ma.onApplicationEventAnimation(View.INVISIBLE) createListRoutes(mutableListOf(), getSaved = true) } 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 index 05574dfb..f60c510b 100644 --- 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 @@ -10,33 +10,6 @@ class ClientTicketList( var list: MutableList = mutableListOf() ) -@Entity(tableName = "clientTickets") -data class ClientTicket( - @PrimaryKey var Id: Long, - 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?, - @TypeConverters(MapTypeConverter::class) var Phones: List?, - @TypeConverters(MapTypeConverter::class) var Location: MyLocation?, - var Signed: Int, - var Latitude: Double?, - var Longitude: Double?, - var Polizon: String?, - var PackingType: String?, - @TypeConverters(MapTypeConverter::class) var tickets: MutableList, - //Tarea 5996, falta mostrar o no si no es null - var cmrFk: Int? = null, - var route: Long? = null, - var email: String? = null -) : Serializable - //Tarea 6275 @Entity(tableName = "clientTickets") data class ClientTicketSalix( 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 33af0553..7f7a022f 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 @@ -54,7 +54,7 @@ import es.verdnatura.presentation.view.feature.delivery.fragments.LogExpeditionF 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.delivery.model.ClientTicket +import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketSalix 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 @@ -735,7 +735,7 @@ class MainActivity : BaseActivity(), OnPasillerosItemClickL addFragmentOnTop( LoadUnloadFragment.newInstance( item.title, "DELIVERED", entryPoint, if (param != null) { - param as ArrayList + param as ArrayList } else { null }