refs #5135 feat: refactor animation. HotFix phones cambiar a String(varchar en bbdd)
This commit is contained in:
parent
a5953a22f5
commit
d787d8e861
|
@ -129,17 +129,42 @@
|
|||
<component name="ChangeListManager">
|
||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="version 24.2Beta">
|
||||
<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/java/es/verdnatura/domain/SalixService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/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/base/BaseFragmentSalix.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragmentSalix.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragmentViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferFragmentViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferLoadFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/buffer/fragment/BufferLoadFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/adapter/SaleAdapterNew.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerNew.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerNew.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/controlvehiculo/fragment/ControlVehiculoFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoUsuarioFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoUsuarioFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/controlvehiculo/fragment/ControlVehiculoViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/InfoFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/InfoFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LoadUnloadFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LogExpeditionFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/LogExpeditionFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/RoutesFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/RoutesFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/SummaryFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/SummaryFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/TicketsFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/TicketsFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/ClientTicket.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/model/ClientTicket.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/paletizador/fragment/CmrExpeditionPalletFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/CmrExpeditionPalletFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/CmrExpeditionPalletViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/CmrExpeditionPalletViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanSorterFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanSorterFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanSorterViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/ExpeditionScanSorterViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/paletizador/fragment/PalletScanViewModel.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer_loadexpedition.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_buffer_loadexpedition.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_loadunload_delivery.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_loadunload_delivery.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_log_delivery.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_log_delivery.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_summary.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expedition_summary.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expeditionscan_sorter.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_expeditionscan_sorter.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_info_delivery.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_info_delivery.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_route.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_route.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_tickets.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_tickets.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_vehiclecontrol_user.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_vehiclecontrol_user.xml" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -298,43 +323,44 @@
|
|||
<option name="showLibraryContents" value="true" />
|
||||
<option name="showMembers" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"ApkExportedModule": "Gestor_Almacén.app",
|
||||
"ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
|
||||
"KotlinFunctionFindUsagesOptions.isSearchForTextOccurrences": "true",
|
||||
"PROJECT_TRUSTED_KEY": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"ScreenRecorder.SavePath": "C:\\Users\\sergiodt",
|
||||
"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",
|
||||
"android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-29/android/widget/TextView.java_SELECTED": "TextView",
|
||||
"android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-33/android/view/View.java_SELECTED": "View",
|
||||
"cidr.known.project.marker": "true",
|
||||
"com.android.tools.idea.devicemanager.tab": "Physical",
|
||||
"com.google.services.firebase.aqiPopupShown": "true",
|
||||
"git-widget-placeholder": "dev",
|
||||
"last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
|
||||
"project.structure.last.edited": "Suggestions",
|
||||
"project.structure.proportion": "0.17",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"run.code.analysis.last.selected.profile": "pProject Default",
|
||||
"settings.editor.selected.configurable": "preferences.sourceCode.Kotlin"
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"ApkExportedModule": "Gestor_Almacén.app",
|
||||
"ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
|
||||
"KotlinFunctionFindUsagesOptions.isSearchForTextOccurrences": "true",
|
||||
"PROJECT_TRUSTED_KEY": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"ScreenRecorder.SavePath": "C:\\Users\\sergiodt",
|
||||
"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",
|
||||
"android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-29/android/widget/TextView.java_SELECTED": "TextView",
|
||||
"android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-33/android/view/View.java_SELECTED": "View",
|
||||
"cidr.known.project.marker": "true",
|
||||
"com.android.tools.idea.devicemanager.tab": "Physical",
|
||||
"com.developerphil.adbidea.selecteddevices": "21114523025303",
|
||||
"com.google.services.firebase.aqiPopupShown": "true",
|
||||
"git-widget-placeholder": "dev",
|
||||
"last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
|
||||
"project.structure.last.edited": "Suggestions",
|
||||
"project.structure.proportion": "0.17",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"run.code.analysis.last.selected.profile": "pProject Default",
|
||||
"settings.editor.selected.configurable": "preferences.sourceCode.Kotlin"
|
||||
},
|
||||
"keyToStringList": {
|
||||
"ExportApk.BuildVariants": [
|
||||
"betaRelease"
|
||||
"keyToStringList": {
|
||||
"ExportApk.BuildVariants": [
|
||||
"betaRelease"
|
||||
],
|
||||
"com.android.tools.idea.sqlite.queryhistory": [
|
||||
"select * from expedition where routeFk=182933;",
|
||||
"select * from expedition;",
|
||||
"select * from expeditionPending;",
|
||||
"select * from expedition where id = 7753995;\n\n",
|
||||
"\nselect * from expedition where id = 7753995;"
|
||||
"com.android.tools.idea.sqlite.queryhistory": [
|
||||
"select * from expedition where routeFk=182933;",
|
||||
"select * from expedition;",
|
||||
"select * from expeditionPending;",
|
||||
"select * from expedition where id = 7753995;\n\n",
|
||||
"\nselect * from expedition where id = 7753995;"
|
||||
]
|
||||
}
|
||||
}</component>
|
||||
}]]></component>
|
||||
<component name="PsdUISettings">
|
||||
<option name="MODULE_TAB" value="Properties" />
|
||||
<option name="LAST_EDITED_SIGNING_CONFIG" value="debug" />
|
||||
|
@ -506,20 +532,6 @@
|
|||
<option name="presentableId" value="Default" />
|
||||
<updated>1618825571576</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00179" summary="refs #5996 cmrAdd">
|
||||
<created>1691481694750</created>
|
||||
<option name="number" value="00179" />
|
||||
<option name="presentableId" value="LOCAL-00179" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1691481694750</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00180" summary="refs #5998 modify imageError">
|
||||
<created>1693476791383</created>
|
||||
<option name="number" value="00180" />
|
||||
<option name="presentableId" value="LOCAL-00180" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1693476791384</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00181" summary="refs #5764 modify dayOfSale">
|
||||
<created>1694769010620</created>
|
||||
<option name="number" value="00181" />
|
||||
|
@ -849,7 +861,21 @@
|
|||
<option name="project" value="LOCAL" />
|
||||
<updated>1704788589872</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="228" />
|
||||
<task id="LOCAL-00228" summary="refs #6275 fix: filter getTickets y driver">
|
||||
<created>1704875864750</created>
|
||||
<option name="number" value="00228" />
|
||||
<option name="presentableId" value="LOCAL-00228" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1704875864751</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00229" summary="refs #5135 feat: refactor animation">
|
||||
<created>1704875974711</created>
|
||||
<option name="number" value="00229" />
|
||||
<option name="presentableId" value="LOCAL-00229" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1704875974711</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="230" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="Vcs.Log.History.Properties">
|
||||
|
@ -950,7 +976,6 @@
|
|||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
|
||||
<MESSAGE value="varios" />
|
||||
<MESSAGE value="refs #5890" />
|
||||
<MESSAGE value="refs #5802 ticketSetState" />
|
||||
<MESSAGE value="version 23.40.1-hotFix OrderPrevia" />
|
||||
|
@ -971,11 +996,12 @@
|
|||
<MESSAGE value="refs #6460 fix:date" />
|
||||
<MESSAGE value="refs #5135: refactor animation" />
|
||||
<MESSAGE value="refs #6275 feat: back to Salix" />
|
||||
<MESSAGE value="refs #5135 feat: refactor animation" />
|
||||
<MESSAGE value="refs #6275 feat: back to Salix (delivery)" />
|
||||
<MESSAGE value="refs #6276: prepare Salixback" />
|
||||
<MESSAGE value="version 24.2Beta" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="version 24.2Beta" />
|
||||
<MESSAGE value="refs #6275 fix: filter getTickets y driver" />
|
||||
<MESSAGE value="refs #5135 feat: refactor animation" />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="refs #5135 feat: refactor animation" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
|
|
|
@ -260,7 +260,7 @@ interface SalixService {
|
|||
@Body vararg params: Any?
|
||||
):
|
||||
Call<Any>
|
||||
@GET("ItemShelvings/getSale")//NO SALIX
|
||||
@GET("Sales/getFromSectorCollection")//NO SALIX
|
||||
fun sectorCollectionGetSale(
|
||||
@Query("sectorFk") sectorFk: Int,
|
||||
@Query("sectorCollectionFk") sectorCollectionFk: Int,
|
||||
|
@ -307,6 +307,12 @@ interface SalixService {
|
|||
):
|
||||
Call<Any>
|
||||
|
||||
@POST("MachineWorkers/add")//REVISADA
|
||||
fun machineWorkerAdd(
|
||||
@Query("plate") plate: Any
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
@POST("SaleTrackings/updateTracking")//REVISADA
|
||||
fun saleTrackingUpdate(
|
||||
@Body params: Any
|
||||
|
|
|
@ -433,7 +433,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(
|
|||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestHome",
|
||||
"http://192.168.1.142:9000",
|
||||
"http://192.168.1.132:9000",
|
||||
urlSalix = "https://test-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
|
@ -447,8 +447,8 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(
|
|||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestLOCALHOME",
|
||||
"http://192.168.1.142:9000",
|
||||
urlSalix = "http://192.168.1.142:3000"
|
||||
"http://192.168.1.132:9000",
|
||||
urlSalix = "http://192.168.1.132:3000"
|
||||
)
|
||||
)
|
||||
} else {
|
||||
|
|
|
@ -391,7 +391,7 @@ abstract class BaseFragmentSalix<T : ViewDataBinding, V : BaseViewModel, W : Bas
|
|||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestHome",
|
||||
"http://192.168.1.142:9000",
|
||||
"http://192.168.1.132:9000",
|
||||
urlSalix = "https://test-salix.verdnatura.es"
|
||||
)
|
||||
)
|
||||
|
@ -405,8 +405,8 @@ abstract class BaseFragmentSalix<T : ViewDataBinding, V : BaseViewModel, W : Bas
|
|||
saveWorkForm(
|
||||
WorkForms(
|
||||
"TestLOCALHOME",
|
||||
"http://192.168.1.142:9000",
|
||||
urlSalix = "http://192.168.1.142:3000"
|
||||
"http://192.168.1.132:9000",
|
||||
urlSalix = "http://192.168.1.132:3000"
|
||||
)
|
||||
)
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package es.verdnatura.presentation.view.feature.buffer.fragment
|
||||
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.lifecycle.Observer
|
||||
import es.verdnatura.R
|
||||
|
@ -11,17 +10,14 @@ import es.verdnatura.presentation.base.BaseFragment
|
|||
class BufferFragment(
|
||||
var entryPoint: String = ""
|
||||
) : BaseFragment<FragmentBufferBinding, BufferFragmentViewModel>(BufferFragmentViewModel::class) {
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_buffer
|
||||
|
||||
companion object {
|
||||
fun newInstance(entryPoint: String) = BufferFragment(entryPoint)
|
||||
}
|
||||
|
||||
|
||||
override fun init() {
|
||||
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
setToolbar()
|
||||
setEvents()
|
||||
super.init()
|
||||
|
@ -41,10 +37,8 @@ class BufferFragment(
|
|||
binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
||||
try {
|
||||
when (entryPoint) {
|
||||
|
||||
getString(R.string.titleBufferEmpty) -> entryPoint = "UNLOADING"
|
||||
getString(R.string.titleBufferFill) -> entryPoint = "LOADING"
|
||||
getString(R.string.titleBufferAccumulate) -> entryPoint = "ACCUMULATION"
|
||||
|
@ -52,11 +46,19 @@ class BufferFragment(
|
|||
getString(R.string.titleBufferStrapping) -> entryPoint = "STRAPPING"
|
||||
}
|
||||
|
||||
viewModel.buffer_setTypeByName(
|
||||
viewModel.bufferSetTypeByName(
|
||||
binding.scanInput.toInt(),
|
||||
entryPoint
|
||||
|
||||
)
|
||||
} catch (ex: Exception) {
|
||||
ma.messageWithSound(
|
||||
getString(R.string.itemNotValid),
|
||||
isToasted = true,
|
||||
isError = true,
|
||||
isPlayed = true
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
binding.scanInput.setText("")
|
||||
|
@ -71,31 +73,11 @@ class BufferFragment(
|
|||
|
||||
with(viewModel) {
|
||||
itembuffertype.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
|
||||
ma.messageWithSound(
|
||||
getString(R.string.errorOperation) + it.errorMessage,
|
||||
it.isError,
|
||||
isPlayed = true
|
||||
)
|
||||
|
||||
} else {
|
||||
|
||||
ma.messageWithSound(
|
||||
entryPoint.lowercase() + "." + getString(R.string.operationSuccess),
|
||||
false,
|
||||
isPlayed = true
|
||||
)
|
||||
binding.mainToolbar.backButton.performClick()
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -8,8 +8,6 @@ import es.verdnatura.R
|
|||
import es.verdnatura.domain.SalixCallback
|
||||
import es.verdnatura.domain.formatWithQuotes
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
import retrofit2.Response
|
||||
|
||||
|
@ -25,7 +23,7 @@ class BufferFragmentViewModel(val context: Context) : BaseViewModel(context) {
|
|||
val bufferloadresponse: LiveData<ResponseItemVO>
|
||||
get() = _bufferloadresponse
|
||||
|
||||
fun buffer_setTypeByName(vBufferFk: Int, vType: String) {
|
||||
fun bufferSetTypeByName(vBufferFk: Int, vType: String) {
|
||||
salix.buffer_setTypeByName(params = listOf(vBufferFk, vType).formatWithQuotes())
|
||||
.enqueue(object : SalixCallback<List<JsonObject>>(context) {
|
||||
override fun onSuccess(response: Response<List<JsonObject>>) {
|
||||
|
@ -37,14 +35,9 @@ class BufferFragmentViewModel(val context: Context) : BaseViewModel(context) {
|
|||
} else {
|
||||
""
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_itembuffertype.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
super.onSuccess(response)
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.graphics.drawable.Drawable
|
|||
import android.os.Build
|
||||
import android.util.TypedValue
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.ImageView
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
|
@ -51,11 +50,7 @@ class ControlVehiculoFragment(
|
|||
customDialogInput = CustomDialogInput(requireContext())
|
||||
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
|
||||
goBack = false
|
||||
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
|
||||
if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
|
||||
if (tagName == HistoricoVehiculoFragment.TAG) {
|
||||
setToolBar("HISTORY")
|
||||
showScanner(getString(R.string.scanShelvingHistorical), "HISTORY")
|
||||
} else {
|
||||
|
@ -69,7 +64,6 @@ class ControlVehiculoFragment(
|
|||
super.init()
|
||||
}
|
||||
|
||||
|
||||
override fun onPause() {
|
||||
goBack = true
|
||||
super.onPause()
|
||||
|
@ -103,6 +97,7 @@ class ControlVehiculoFragment(
|
|||
listIcons.add(iconVehicleOut)
|
||||
listIcons.add(iconHistory)
|
||||
}
|
||||
|
||||
"IN" -> {
|
||||
listIcons.remove(iconVehicleOut)
|
||||
listIcons.add(iconVehicleIn)
|
||||
|
@ -117,13 +112,12 @@ class ControlVehiculoFragment(
|
|||
|
||||
when (item) {
|
||||
iconHistory.drawable -> showScanner(
|
||||
getString(R.string.scanShelvingHistorical),
|
||||
"HISTORY"
|
||||
getString(R.string.scanShelvingHistorical), "HISTORY"
|
||||
)
|
||||
|
||||
iconVehicleIn.drawable -> showScanner(getString(R.string.scanPlate), "IN")
|
||||
iconVehicleOut.drawable -> showScanner(
|
||||
getString(R.string.scanPlateTakeoff),
|
||||
"OUT"
|
||||
getString(R.string.scanPlateTakeoff), "OUT"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -167,7 +161,6 @@ class ControlVehiculoFragment(
|
|||
private fun checkControlTimeVehicle() {
|
||||
|
||||
if (!goBack) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.workerMachineryIsRegistered(mobileApplication.userId!!)
|
||||
}
|
||||
}
|
||||
|
@ -177,11 +170,9 @@ class ControlVehiculoFragment(
|
|||
if (direction.equals("HISTORY")) {
|
||||
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titleHistoricalHide)),
|
||||
plateNumber
|
||||
PasillerosItemVO(title = getString(R.string.titleHistoricalHide)), plateNumber
|
||||
)
|
||||
} else if (direction.equals("IN")) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.machineWorker_add(plateNumber)
|
||||
|
||||
} else if (direction.equals("OUT")) {
|
||||
|
@ -198,9 +189,7 @@ class ControlVehiculoFragment(
|
|||
}
|
||||
|
||||
private fun scanRequest() {
|
||||
// if (binding.scanInput != null) {
|
||||
binding.scanInput.requestFocus()
|
||||
//}
|
||||
hideKeyboards()
|
||||
}
|
||||
|
||||
|
@ -211,12 +200,10 @@ class ControlVehiculoFragment(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
private fun setEvents() {
|
||||
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
ma.openFragmentPickers(true)
|
||||
//requireActivity().onBackPressed()
|
||||
|
||||
}
|
||||
|
||||
|
@ -250,7 +237,6 @@ class ControlVehiculoFragment(
|
|||
if (customDialogThreeButtons.getValue().trim().isEmpty()) {
|
||||
getString(R.string.returnScan).toast(requireContext())
|
||||
} else {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
customDialogThreeButtons.dismiss()
|
||||
insertControlTimeVehicle(customDialogThreeButtons.getValue(), "IN")
|
||||
}
|
||||
|
@ -261,7 +247,6 @@ class ControlVehiculoFragment(
|
|||
if (customDialogThreeButtons.getValue().trim().isEmpty()) {
|
||||
getString(R.string.returnScan).toast(requireContext())
|
||||
} else {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
customDialogThreeButtons.dismiss()
|
||||
insertControlTimeVehicle(customDialogThreeButtons.getValue(), "OUT")
|
||||
}
|
||||
|
@ -307,7 +292,6 @@ class ControlVehiculoFragment(
|
|||
override fun observeViewModel() {
|
||||
|
||||
with(viewModel) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
responseinsert.observe(viewLifecycleOwner) {
|
||||
|
||||
if (it.isError) {
|
||||
|
@ -325,22 +309,16 @@ class ControlVehiculoFragment(
|
|||
} else {
|
||||
if (it.response == "true") {
|
||||
ma.openFragmentPickers(false)
|
||||
//ma.onPasillerosItemClickListener( PasillerosItemVO(title = "Sacadores"),"CONTROL")
|
||||
//checkControlTimeVehicle()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
}
|
||||
|
||||
responsecontrol.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
} else {
|
||||
if (it.response == "1") {
|
||||
isWorkedTimed = "REGISTERED"
|
||||
setToolBar("OUT")
|
||||
|
@ -358,7 +336,6 @@ class ControlVehiculoFragment(
|
|||
.setDescription(getString(R.string.scanPlate))
|
||||
.setOkButton(getString(R.string.takeVehicle)) {
|
||||
if (customDialogInput.getValue().isNotEmpty()) {
|
||||
// "$description ${customDialogInput.getValue()} OK".toast(requireContext())
|
||||
insertControlTimeVehicle(customDialogInput.getValue(), "IN")
|
||||
}
|
||||
customDialogInput.setValue("")
|
||||
|
@ -370,9 +347,6 @@ class ControlVehiculoFragment(
|
|||
.setKoButton(getString(R.string.noVehicle)) {
|
||||
customDialogInput.dismiss()
|
||||
ma.openFragmentPickers(true)
|
||||
/* if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
|
||||
ma.onBackPressed()
|
||||
}*/
|
||||
|
||||
}.setValue("").show()
|
||||
|
||||
|
@ -381,13 +355,9 @@ class ControlVehiculoFragment(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -11,13 +11,14 @@ import androidx.lifecycle.Observer
|
|||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentVehiclecontrolUserBinding
|
||||
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.common.loadUrl
|
||||
|
||||
class ControlVehiculoUsuarioFragment(
|
||||
var vUserFK: Int
|
||||
private var vUserFK: Int
|
||||
) : BaseFragment<FragmentVehiclecontrolUserBinding, ControlVehiculoViewModel>(
|
||||
ControlVehiculoViewModel::class
|
||||
) {
|
||||
|
@ -34,7 +35,6 @@ class ControlVehiculoUsuarioFragment(
|
|||
override fun init() {
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclecontroluser)
|
||||
goBack = false
|
||||
binding.splashProgress.visibility = GONE
|
||||
setEvents()
|
||||
setToolBar()
|
||||
setControlVehicleUser()
|
||||
|
@ -70,8 +70,6 @@ class ControlVehiculoUsuarioFragment(
|
|||
}
|
||||
|
||||
private fun getExtensionFromUser() {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.sip_getExtensionSalix(vUserFK)
|
||||
}
|
||||
|
||||
|
@ -85,7 +83,6 @@ class ControlVehiculoUsuarioFragment(
|
|||
userFk = mobileApplication.userId!!
|
||||
|
||||
if (userFk == vUserFK) {
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.machineGetWorkerPlate(mobileApplication.userId!!)
|
||||
viewModel.deviceProduction_getnameDevice(
|
||||
getData(ANDROID_ID)
|
||||
|
@ -125,11 +122,9 @@ class ControlVehiculoUsuarioFragment(
|
|||
override fun observeViewModel() {
|
||||
|
||||
with(viewModel) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
responsemachine.observe(viewLifecycleOwner) {
|
||||
|
||||
responsemachine.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
|
@ -154,11 +149,9 @@ class ControlVehiculoUsuarioFragment(
|
|||
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer {
|
||||
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(
|
||||
getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + vUserFK,
|
||||
|
@ -186,7 +179,7 @@ class ControlVehiculoUsuarioFragment(
|
|||
|
||||
startActivity(intent)
|
||||
} catch (e: Exception) {
|
||||
|
||||
getString(R.string.errorOperation).toast(requireContext())
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -20,9 +20,6 @@ import retrofit2.Response
|
|||
|
||||
class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) {
|
||||
|
||||
/* private val getVehicleControlTimeUserCase: GetVehicleControlTimeUserCase =
|
||||
GetVehicleControlTimeUserCase(context)*/
|
||||
|
||||
private val _responseinsert by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responseinsert: LiveData<ResponseItemVO>
|
||||
get() = _responseinsert
|
||||
|
@ -40,12 +37,12 @@ class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) {
|
|||
get() = _responseGetExtensionFromUserId
|
||||
|
||||
fun machineWorker_add(
|
||||
PlateNumber: String
|
||||
plateNumber: String
|
||||
) {
|
||||
//tarea 6276
|
||||
// salix.machineWorkerUpdateInTime()
|
||||
silex.machineWorker_add(PlateNumber)
|
||||
.enqueue(object : SilexCallback<Any>(context) {
|
||||
//salix.machineWorkerAdd(plateNumber)
|
||||
silex.machineWorker_add(plateNumber)
|
||||
.enqueue(object : SalixCallback<Any>(context) {
|
||||
override fun onError(t: Throwable) {
|
||||
_responseinsert.value = ResponseItemVO(
|
||||
isError = true,
|
||||
|
@ -125,13 +122,6 @@ class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) {
|
|||
_responsecontrol.value =
|
||||
ResponseItemVO(isError = false, response = response.body()!!)
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_responsecontrol.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ class InfoFragment(var title: String) :
|
|||
super.init()
|
||||
binding.mainToolbar.toolbarTitle.text = title
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.companyGetFiscaldata(mobileApplication.userId!!)
|
||||
viewModel.getInfoFreelance(mobileApplication.userId!!)
|
||||
setEvents()
|
||||
|
@ -34,7 +33,6 @@ class InfoFragment(var title: String) :
|
|||
with(viewModel) {
|
||||
|
||||
companyInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty()) {
|
||||
binding.itemName.text = it.list[0]?.name
|
||||
binding.itemNif.text = it.list[0]?.nif
|
||||
|
@ -43,7 +41,6 @@ class InfoFragment(var title: String) :
|
|||
|
||||
}
|
||||
freelanceInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty()) {
|
||||
binding.linearInfoFreelance.visibility=View.VISIBLE
|
||||
binding.freelanceName.text = it.list[0]?.name
|
||||
|
|
|
@ -2,8 +2,6 @@ package es.verdnatura.presentation.view.feature.delivery.fragments
|
|||
|
||||
import android.content.Context
|
||||
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
|
||||
|
@ -37,10 +35,10 @@ import org.json.JSONObject
|
|||
import java.util.Date
|
||||
|
||||
class LoadUnloadFragment(
|
||||
var title: String = "",
|
||||
var state: String = "",
|
||||
var entryPoint: String,
|
||||
var clientTicketList: ArrayList<ClientTicket>?
|
||||
private var title: String = "",
|
||||
private var state: String = "",
|
||||
private var entryPoint: String,
|
||||
private var clientTicketList: ArrayList<ClientTicket>?
|
||||
|
||||
) : BaseFragment<FragmentExpeditionLoadunloadDeliveryBinding, DeliveryViewModel>(
|
||||
DeliveryViewModel::class
|
||||
|
@ -62,13 +60,11 @@ class LoadUnloadFragment(
|
|||
state: String,
|
||||
entryPoint: String,
|
||||
clientTicketList: ArrayList<ClientTicket>? = null
|
||||
) =
|
||||
LoadUnloadFragment(title, state, entryPoint, clientTicketList)
|
||||
) = LoadUnloadFragment(title, state, entryPoint, clientTicketList)
|
||||
|
||||
fun scanning(scan: Boolean) {
|
||||
scanned = scan
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_expedition_loadunload_delivery
|
||||
|
@ -126,7 +122,6 @@ class LoadUnloadFragment(
|
|||
}
|
||||
)
|
||||
|
||||
|
||||
binding.mainToolbar.toolbarIcons.adapter =
|
||||
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
|
||||
|
||||
|
@ -141,11 +136,9 @@ class LoadUnloadFragment(
|
|||
|
||||
iconSign.drawable -> {
|
||||
setExpeditionsState(myList, state)
|
||||
//openSignActivity()
|
||||
}
|
||||
}
|
||||
} catch (ex: Exception) {
|
||||
//Tarea 5313
|
||||
getString(R.string.errorNotData).toast(requireContext())
|
||||
}
|
||||
|
||||
|
@ -184,7 +177,6 @@ class LoadUnloadFragment(
|
|||
var expeditionBack = hashMapOf("expeditions" to mlist as List<ExpeditionSalix>)
|
||||
if (list.filter { it.code == state }.isNotEmpty()) {
|
||||
if (list.filter { it.code == state }.size == list.size) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.expeditionStateAddSalix(expeditionBack)
|
||||
counterCalls = 1
|
||||
} else {
|
||||
|
@ -215,8 +207,7 @@ class LoadUnloadFragment(
|
|||
val intent = Intent(requireContext(), SignedActivity::class.java)
|
||||
|
||||
intent.putExtra(
|
||||
"clientTicketList",
|
||||
clientTicketList!!.first()
|
||||
"clientTicketList", clientTicketList!!.first()
|
||||
)
|
||||
|
||||
intent.putExtra("objectSigned", "ticket") //cmr
|
||||
|
@ -224,27 +215,6 @@ class LoadUnloadFragment(
|
|||
requireActivity().onBackPressed()
|
||||
}
|
||||
|
||||
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("app", "picking")
|
||||
startActivity(i)
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
|
@ -312,11 +282,9 @@ class LoadUnloadFragment(
|
|||
|
||||
if (binding.mainToolbar.switchButton.isChecked) {
|
||||
counterCalls = 1
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
val pendingExpeditionSend = myList.map { l ->
|
||||
ExpeditionSalix(
|
||||
expeditionFk = l.id,
|
||||
stateCode = l.code
|
||||
expeditionFk = l.id, stateCode = l.code
|
||||
)
|
||||
}
|
||||
viewModel.expeditionStateAddSalix(hashMapOf("expeditions" to pendingExpeditionSend.filter { it.stateCode == state }))
|
||||
|
@ -329,11 +297,9 @@ class LoadUnloadFragment(
|
|||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
expeditionInfoLoadUnloadList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
createList(it.list as MutableList<ExpeditionInfoLoadUnload>)
|
||||
}
|
||||
routeInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty()) {
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||
binding.mainToolbar.switchButton.visibility = View.VISIBLE
|
||||
|
@ -344,7 +310,6 @@ class LoadUnloadFragment(
|
|||
}
|
||||
}
|
||||
responseStateAdd.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (!it.isError) {
|
||||
counterResponse = counterResponse + 1
|
||||
if (counterResponse == counterCalls) {
|
||||
|
@ -367,14 +332,12 @@ class LoadUnloadFragment(
|
|||
|
||||
}
|
||||
responseStateList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
ma.messageWithSound(it.errorMessage, true, true, "", true)
|
||||
savePendingExpeditions()
|
||||
openSignActivity()
|
||||
}
|
||||
|
||||
responseLoadList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
createList(mutableListOf(), true)
|
||||
}
|
||||
}
|
||||
|
@ -414,9 +377,8 @@ class LoadUnloadFragment(
|
|||
private fun setSwitchButon() {
|
||||
binding.mainToolbar.switchButton.tooltipText = getString(R.string.expeditionMarkLost)
|
||||
binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||
binding.mainToolbar.switchButton.tooltipText = if (isChecked)
|
||||
getString(R.string.expeditionMarkFound) else
|
||||
getString(R.string.expeditionMarkLost)
|
||||
binding.mainToolbar.switchButton.tooltipText =
|
||||
if (isChecked) getString(R.string.expeditionMarkFound) else getString(R.string.expeditionMarkLost)
|
||||
|
||||
|
||||
binding.mainToolbar.toolbarTitle.text = if (isChecked) {
|
||||
|
@ -436,13 +398,9 @@ class LoadUnloadFragment(
|
|||
withContext(Dispatchers.IO) {
|
||||
|
||||
if (getSaved) {
|
||||
myList =
|
||||
db.expedicionDao()
|
||||
.getAllPending(route)
|
||||
myList = db.expedicionDao().getAllPending(route)
|
||||
if (myList.isEmpty()) {
|
||||
myList =
|
||||
db.expedicionDao()
|
||||
.getAll(route)
|
||||
myList = db.expedicionDao().getAll(route)
|
||||
}
|
||||
|
||||
} else {
|
||||
|
@ -463,11 +421,8 @@ class LoadUnloadFragment(
|
|||
binding.expeditionloadunloadRecyclerview.adapter = adapter
|
||||
binding.expeditionloadunloadRecyclerview.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
binding.mainToolbar.toolbarSubtitle.text =
|
||||
getString(
|
||||
R.string.summaryCount,
|
||||
myList.filter { it.code == state }.size,
|
||||
myList.size
|
||||
binding.mainToolbar.toolbarSubtitle.text = getString(
|
||||
R.string.summaryCount, myList.filter { it.code == state }.size, myList.size
|
||||
)
|
||||
|
||||
setListPosition(myList)
|
||||
|
@ -489,8 +444,7 @@ class LoadUnloadFragment(
|
|||
private fun getExpeditionTable(myRoute: Int) {
|
||||
lifecycleScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
myList =
|
||||
db.expedicionDao().getAll(myRoute) as MutableList<ExpeditionInfoLoadUnload>
|
||||
myList = db.expedicionDao().getAll(myRoute)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -507,8 +461,7 @@ class LoadUnloadFragment(
|
|||
|
||||
private fun updateCount(list: MutableList<ExpeditionInfoLoadUnload>, state: String) {
|
||||
|
||||
val countMarked =
|
||||
list.filter { it.code == state }.size
|
||||
val countMarked = list.filter { it.code == state }.size
|
||||
binding.mainToolbar.toolbarSubtitle.text =
|
||||
getString(R.string.summaryCount, countMarked, list.size)
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
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
|
||||
|
@ -54,8 +51,7 @@ class LogExpeditionFragment(
|
|||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun setToolBar() {
|
||||
|
||||
binding.mainToolbar.switchButton.tooltipText =
|
||||
getString(R.string.expeditionMarkFound)
|
||||
binding.mainToolbar.switchButton.tooltipText = getString(R.string.expeditionMarkFound)
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconDelivery = ImageView(context)
|
||||
|
@ -74,8 +70,7 @@ class LogExpeditionFragment(
|
|||
when (item) {
|
||||
iconDelivery.drawable -> {
|
||||
ma.openSummaryFragment(
|
||||
binding.route.text.toString().toInt(),
|
||||
"ON_DELIVERY"
|
||||
binding.route.text.toString().toInt(), "ON_DELIVERY"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
@ -87,28 +82,6 @@ class LogExpeditionFragment(
|
|||
binding.mainToolbar.toolbarIcons.visibility = View.GONE
|
||||
}
|
||||
|
||||
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()
|
||||
|
@ -118,7 +91,6 @@ class LogExpeditionFragment(
|
|||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||
if (!binding.scanInput.text.isNullOrEmpty()) {
|
||||
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
try {
|
||||
viewModel.expeditionGetLog(binding.scanInput.toInt())
|
||||
originalItem = binding.scanInput.toInt()
|
||||
|
@ -139,13 +111,13 @@ class LogExpeditionFragment(
|
|||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
expeditionInfoList.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
|
||||
|
@ -158,7 +130,6 @@ class LogExpeditionFragment(
|
|||
}
|
||||
}
|
||||
responseStateAdd.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
viewModel.expeditionGetLog(originalItem)
|
||||
}
|
||||
}
|
||||
|
@ -168,11 +139,8 @@ class LogExpeditionFragment(
|
|||
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
|
||||
binding.mainToolbar.switchButton.tooltipText =
|
||||
if (isChecked) getString(R.string.expeditionMarkLost) else getString(R.string.expeditionMarkFound)
|
||||
|
||||
if (isChecked) {
|
||||
viewModel.expeditionStateAddSalix(
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
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.text.Editable
|
||||
|
@ -18,7 +15,6 @@ import es.verdnatura.databinding.FragmentRouteBinding
|
|||
import es.verdnatura.db.DeliveryDatabase
|
||||
import es.verdnatura.domain.notNull
|
||||
import es.verdnatura.domain.toDateString
|
||||
import es.verdnatura.domain.toast
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.base.database
|
||||
import es.verdnatura.presentation.common.*
|
||||
|
@ -47,8 +43,7 @@ class RoutesFragment(
|
|||
private lateinit var myListRouteLoaded: List<RouteLoaded>
|
||||
|
||||
companion object {
|
||||
fun newInstance(title: String) =
|
||||
RoutesFragment(title)
|
||||
fun newInstance(title: String) = RoutesFragment(title)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_route
|
||||
|
@ -60,7 +55,7 @@ class RoutesFragment(
|
|||
setToolBar()
|
||||
binding.scanInput.requestFocus()
|
||||
pendingOperations()
|
||||
callBack(viewModel.getRoutes(mobileApplication.userId!!))
|
||||
viewModel.getRoutes()
|
||||
|
||||
}
|
||||
|
||||
|
@ -74,14 +69,11 @@ class RoutesFragment(
|
|||
for (p in pending) {
|
||||
viewModel.saveSign(p.fileName, p.queryMapList)
|
||||
}
|
||||
val pendingExpedition =
|
||||
db.expedicionDao().getAllPendingExpeditions()
|
||||
|
||||
val pendingExpedition = db.expedicionDao().getAllPendingExpeditions()
|
||||
|
||||
val pendingExpeditionSend = pendingExpedition.map { l ->
|
||||
ExpeditionSalix(
|
||||
expeditionFk = l.id,
|
||||
stateCode = l.code
|
||||
expeditionFk = l.id, stateCode = l.code
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -90,7 +82,8 @@ class RoutesFragment(
|
|||
hashMapOf("expeditions" to pendingExpeditionSend.filter { it.stateCode == "DELIVERED" })
|
||||
)
|
||||
}
|
||||
if (pendingExpeditionSend.filter{ it.stateCode == "ON DELIVERY" }.isNotEmpty()) {
|
||||
if (pendingExpeditionSend.filter { it.stateCode == "ON DELIVERY" }
|
||||
.isNotEmpty()) {
|
||||
viewModel.expeditionStateAddSalix(
|
||||
hashMapOf("expeditions" to pendingExpeditionSend.filter { it.stateCode == "ON DELIVERY" })
|
||||
)
|
||||
|
@ -133,12 +126,6 @@ class RoutesFragment(
|
|||
}
|
||||
}
|
||||
|
||||
private fun callBack(callBackEndPoint: Unit) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
return callBackEndPoint
|
||||
}
|
||||
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun setToolBar() {
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
|
@ -173,7 +160,7 @@ class RoutesFragment(
|
|||
|
||||
when (item) {
|
||||
iconRefresh.drawable -> {
|
||||
callBack(viewModel.getRoutes(mobileApplication.userId!!))
|
||||
viewModel.getRoutes()
|
||||
}
|
||||
|
||||
iconInfo.drawable -> {
|
||||
|
@ -198,42 +185,6 @@ class RoutesFragment(
|
|||
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 {
|
||||
requireActivity().onBackPressed()
|
||||
|
@ -246,9 +197,7 @@ class RoutesFragment(
|
|||
}
|
||||
|
||||
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
|
||||
val searchText = s.toString().lowercase()
|
||||
filteredList(s.toString().lowercase())
|
||||
|
||||
}
|
||||
|
||||
override fun afterTextChanged(s: Editable?) {
|
||||
|
@ -271,14 +220,12 @@ class RoutesFragment(
|
|||
with(viewModel) {
|
||||
loadRouteList.observe(viewLifecycleOwner) { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
createListRoutes(it.list)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
routeInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty()) {
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||
binding.mainToolbar.switchButton.visibility = View.VISIBLE
|
||||
|
@ -301,7 +248,6 @@ class RoutesFragment(
|
|||
}
|
||||
|
||||
responseLoadList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
ma.messageWithSound(getString(R.string.offline), false, false, "", true)
|
||||
createListRoutes(mutableListOf(), getSaved = true)
|
||||
}
|
||||
|
@ -337,8 +283,7 @@ class RoutesFragment(
|
|||
// myListRoute = list
|
||||
|
||||
adapter = RouteAdapter(
|
||||
myListRoute,
|
||||
object : OnItemImageRouteRowClickListener {
|
||||
myListRoute, object : OnItemImageRouteRowClickListener {
|
||||
|
||||
override fun onItemImageRouteRowClickListener(item: RouteInfo, action: String) {
|
||||
when (action) {
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
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
|
||||
|
@ -59,7 +56,7 @@ class SummaryFragment(
|
|||
setEvents()
|
||||
setToolBar()
|
||||
binding.scanInput.requestFocus()
|
||||
callBack(viewModel.route_getExpeditionSummary(route))
|
||||
callBack(viewModel.routeGetExpeditionSummary(route))
|
||||
routeSelected = route
|
||||
setViews()
|
||||
|
||||
|
@ -76,7 +73,6 @@ class SummaryFragment(
|
|||
}
|
||||
|
||||
private fun callBack(routeGetexpeditionsummary: Unit) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
routeGetexpeditionsummary
|
||||
}
|
||||
|
||||
|
@ -188,9 +184,6 @@ class SummaryFragment(
|
|||
android.app.AlertDialog.BUTTON_POSITIVE, getString(R.string.save)
|
||||
) { dialog, which ->
|
||||
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
||||
|
||||
counterCalls = 1
|
||||
viewModel.expeditionStateAddSalix(hashMapOf("expeditions" to listExpedition.filter { it.stateCode == state }))
|
||||
|
||||
|
@ -210,28 +203,6 @@ class SummaryFragment(
|
|||
|
||||
}
|
||||
|
||||
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()
|
||||
|
@ -294,17 +265,14 @@ class SummaryFragment(
|
|||
with(viewModel) {
|
||||
|
||||
expeditionInfoLoadUnloadList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
createList(it.list as MutableList<ExpeditionInfoLoadUnload>)
|
||||
}
|
||||
|
||||
expeditionInfoSummary.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
createListSummary(it.list)
|
||||
}
|
||||
|
||||
routeInfoList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.list.isNotEmpty()) {
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||
binding.mainToolbar.switchButton.visibility = View.VISIBLE
|
||||
|
@ -315,11 +283,10 @@ class SummaryFragment(
|
|||
}
|
||||
}
|
||||
responseStateAdd.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (!it.isError) {
|
||||
counterResponse = counterResponse + 1
|
||||
if (counterResponse == counterCalls) {
|
||||
callBack(viewModel.route_getExpeditionSummary(routeSelected))
|
||||
callBack(viewModel.routeGetExpeditionSummary(routeSelected))
|
||||
counterResponse = 0
|
||||
counterCalls = 0
|
||||
checkNextAddress()
|
||||
|
|
|
@ -5,7 +5,6 @@ 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
|
||||
|
@ -42,10 +41,8 @@ import kotlinx.coroutines.launch
|
|||
import kotlinx.coroutines.withContext
|
||||
import java.util.Calendar
|
||||
|
||||
|
||||
class TicketsFragment(
|
||||
var title: String = "",
|
||||
var route: RouteInfo
|
||||
var title: String = "", var route: RouteInfo
|
||||
) : BaseFragment<FragmentTicketsBinding, DeliveryViewModel>(
|
||||
DeliveryViewModel::class
|
||||
) {
|
||||
|
@ -75,15 +72,14 @@ class TicketsFragment(
|
|||
setEvents()
|
||||
setToolBar()
|
||||
binding.mainToolbar.toolbarTitle.text = route.name
|
||||
callBack(viewModel.getTickets(route.id))
|
||||
viewModel.getTickets(route.id)
|
||||
db = database(requireContext().applicationContext)
|
||||
|
||||
}
|
||||
|
||||
private fun setTitle() {
|
||||
|
||||
binding.mainToolbar.toolbarSubtitle.text =
|
||||
if (::myListClientTicket.isInitialized) {
|
||||
binding.mainToolbar.toolbarSubtitle.text = if (::myListClientTicket.isInitialized) {
|
||||
myListClientTicket.filter { it.signed == 1 }.size.toString() + "/" + myListClientTicket.size
|
||||
} else {
|
||||
"0/0"
|
||||
|
@ -91,12 +87,6 @@ class TicketsFragment(
|
|||
customDialogList = CustomDialogList(requireContext())
|
||||
}
|
||||
|
||||
private fun callBack(callBackEndPoint: Unit) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
return callBackEndPoint
|
||||
}
|
||||
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun setToolBar() {
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
|
@ -105,14 +95,12 @@ class TicketsFragment(
|
|||
binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconSettings = ImageView(context)
|
||||
val iconSort = ImageView(context)
|
||||
val iconSigned = ImageView(context)
|
||||
val iconSend = ImageView(context)
|
||||
|
||||
|
||||
iconSettings.setImageResource(R.drawable.ic_setting_ui)
|
||||
iconSort.setImageResource(R.drawable.ic_sort)
|
||||
iconSigned.setImageResource(R.drawable.ic_sign_ticket)
|
||||
|
@ -130,7 +118,6 @@ class TicketsFragment(
|
|||
listIcons.add(iconSettings)
|
||||
listIcons.add(iconSort)
|
||||
|
||||
|
||||
changeColorIcon(iconSigned.drawable, showSigned)
|
||||
changeColorIcon(iconSettings.drawable, showSigned)
|
||||
|
||||
|
@ -153,8 +140,7 @@ class TicketsFragment(
|
|||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = getString(R.string.titleWebViewer),
|
||||
),
|
||||
entryPoint = Gson().toJson(
|
||||
), entryPoint = Gson().toJson(
|
||||
mutableMapOf(
|
||||
"entryPoint" to route.id,
|
||||
"web" to "${getData("base_urlSalix")}#!/route/${route.id}/tickets"
|
||||
|
@ -168,8 +154,7 @@ class TicketsFragment(
|
|||
showSigned = !showSigned
|
||||
|
||||
if (::myListClientTicket.isInitialized) {
|
||||
adapter!!.updateList(
|
||||
if (showSigned) {
|
||||
adapter!!.updateList(if (showSigned) {
|
||||
myListClientTicket.filter { it.signed == 1 } as MutableList<ClientTicketSalix>
|
||||
} else {
|
||||
myListClientTicket.filter { it.signed == 0 } as MutableList<ClientTicketSalix>
|
||||
|
@ -184,7 +169,7 @@ class TicketsFragment(
|
|||
if (myListClientTicket.isEmpty() || route.email.isNullOrEmpty()) {
|
||||
getString(R.string.routeNotTickets).toast(requireContext())
|
||||
} else {
|
||||
callBack(viewModel.driverRouteEmail(route.id, route.email!!))
|
||||
viewModel.driverRouteEmail(route.id, route.email!!)
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -215,50 +200,12 @@ class TicketsFragment(
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (isBack) {
|
||||
callBack(viewModel.getTickets(route.id))
|
||||
viewModel.getTickets(route.id)
|
||||
isBack = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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.itemcardLayout.isVisible) {
|
||||
|
@ -279,7 +226,6 @@ class TicketsFragment(
|
|||
binding.hourEnd.setText(getHourDay(route.finished))
|
||||
|
||||
binding.saveButton.setOnClickListener {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
route.kmStart = binding.kmStart.text.toString().toLong()
|
||||
route.kmEnd = binding.kmEnd.text.toString().toLong()
|
||||
route.started = addDateToTime(binding.hourInit.text.toString())
|
||||
|
@ -302,43 +248,33 @@ class TicketsFragment(
|
|||
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()) {
|
||||
println("llegan los tickets")
|
||||
createLisTickets(it.list)
|
||||
|
||||
}else{
|
||||
println("tickets vacios")
|
||||
}
|
||||
}
|
||||
responseStateAdd.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
}
|
||||
responseStateAdd.observe(viewLifecycleOwner) {}
|
||||
response.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (!it.isError) {
|
||||
ma.messageWithSound(it.response, false, false, "", true)
|
||||
}
|
||||
}
|
||||
responseUpdateRoute.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, true, "", true)
|
||||
} else {
|
||||
showSigned = !showSigned
|
||||
changeVisibleSettings(false)
|
||||
setToolBar()
|
||||
ma.messageWithSound("", false, true, "", false)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
responseLoadList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
println("tickets responseLoadList")
|
||||
ma.messageWithSound(getString(R.string.offline), true, false, "", true)
|
||||
createLisTickets(mutableListOf(), getSaved = true)
|
||||
}
|
||||
|
@ -346,7 +282,6 @@ class TicketsFragment(
|
|||
}
|
||||
|
||||
private fun changeVisibleSettings(isVisible: Boolean) {
|
||||
|
||||
if (isVisible) {
|
||||
binding.itemcardLayout.visibility = View.GONE
|
||||
binding.ticketsRecyclerview.visibility = View.GONE
|
||||
|
@ -366,9 +301,8 @@ class TicketsFragment(
|
|||
lifecycleScope.launch {
|
||||
withContext(Dispatchers.IO) {
|
||||
if (getSaved) {
|
||||
myListClientTicketAux = db.clienTicketDao().getAll()
|
||||
.filter { route.id == it.route }
|
||||
.toMutableList()
|
||||
myListClientTicketAux =
|
||||
db.clienTicketDao().getAll().filter { route.id == it.route }.toMutableList()
|
||||
} else {
|
||||
myListClientTicketAux =
|
||||
list.distinctBy { it.addressFk } as MutableList<ClientTicketSalix>
|
||||
|
@ -403,27 +337,25 @@ class TicketsFragment(
|
|||
} else {
|
||||
myListClientTicket.filter { it.signed == 0 }
|
||||
}
|
||||
adapter = TicketAdapter(
|
||||
myListFiltered as MutableList<ClientTicketSalix>,
|
||||
adapter = TicketAdapter(myListFiltered as MutableList<ClientTicketSalix>,
|
||||
object : OnItemButtonTicketRowClickListener {
|
||||
|
||||
override fun onItemButtonTicketRowClickListener(
|
||||
item: ClientTicketSalix,
|
||||
action: String
|
||||
item: ClientTicketSalix, action: String
|
||||
) {
|
||||
when (action) {
|
||||
"unload" -> {
|
||||
|
||||
val entryPoint = Gson().toJson(
|
||||
mutableMapOf(
|
||||
"route" to route.id.toString(),
|
||||
"address" to item.addressFk
|
||||
"route" to route.id.toString(), "address" to item.addressFk
|
||||
)
|
||||
)
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titleUnLoadTruck)),
|
||||
entryPoint, myListClientTicket.filter { it.id == item.id }
|
||||
ma.onPasillerosItemClickListener(PasillerosItemVO(
|
||||
title = getString(
|
||||
R.string.titleUnLoadTruck
|
||||
)
|
||||
), entryPoint, myListClientTicket.filter { it.id == item.id })
|
||||
|
||||
}
|
||||
|
||||
|
@ -447,7 +379,8 @@ class TicketsFragment(
|
|||
|
||||
}
|
||||
|
||||
}, object : OnItemButtonCMRRowClickListener {
|
||||
},
|
||||
object : OnItemButtonCMRRowClickListener {
|
||||
override fun onItemButtonCMRRowClickListener(
|
||||
item: Ticket
|
||||
) {
|
||||
|
@ -455,8 +388,7 @@ class TicketsFragment(
|
|||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = getString(R.string.titleWebViewer),
|
||||
),
|
||||
entryPoint = Gson().toJson(
|
||||
), entryPoint = Gson().toJson(
|
||||
mutableMapOf(
|
||||
"entryPoint" to route.id,
|
||||
"web" to "${getData("base_urlSalix")}/api/Routes/${item.cmrFk}/cmr?access_token=${
|
||||
|
@ -468,8 +400,7 @@ class TicketsFragment(
|
|||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
|
||||
binding.ticketsRecyclerview.addItemDecoration(
|
||||
ItemDescorationCustomized(
|
||||
|
@ -514,11 +445,9 @@ class TicketsFragment(
|
|||
customDialogInput.getRecyclerView().layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
customDialogInput.setOkButton(getString(R.string.save)) {
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.addNotes(itemClient.tickets, customDialogInput.getValue())
|
||||
customDialogInput.dismiss()
|
||||
}
|
||||
.setKoButton(getString(R.string.cancel)) {
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialogInput.cancel()
|
||||
customDialogInput.dismiss()
|
||||
}
|
||||
|
@ -538,7 +467,6 @@ class TicketsFragment(
|
|||
|
||||
}
|
||||
|
||||
|
||||
private fun setListPosition(list: MutableList<ExpeditionInfoLoadUnload>) {
|
||||
for (i in list.indices) {
|
||||
binding.ticketsRecyclerview.scrollToPosition(i)
|
||||
|
@ -549,58 +477,39 @@ class TicketsFragment(
|
|||
fun showPhones(clientClicked: ClientTicketSalix) {
|
||||
val phones: MutableList<GeneralItem> = mutableListOf()
|
||||
//Tarea 6275
|
||||
if (clientClicked.clientPhone!=null){
|
||||
if (!clientClicked.clientPhone.isNullOrBlank()) {
|
||||
phones.add(
|
||||
GeneralItem(
|
||||
text = "${getString(R.string.Cliente)}:${clientClicked.clientPhone}",
|
||||
code = clientClicked.clientMobile.toString()
|
||||
))
|
||||
)
|
||||
)
|
||||
}
|
||||
if (clientClicked.clientMobile!=null){
|
||||
if (!clientClicked.clientMobile.isNullOrBlank()) {
|
||||
phones.add(
|
||||
GeneralItem(
|
||||
text = "${getString(R.string.Cliente)}:${clientClicked.clientMobile}",
|
||||
code = clientClicked.clientMobile.toString()
|
||||
))
|
||||
)
|
||||
)
|
||||
}
|
||||
if (clientClicked.addressPhone!=null){
|
||||
if (!clientClicked.addressPhone.isNullOrBlank()) {
|
||||
phones.add(
|
||||
GeneralItem(
|
||||
text = "${getString(R.string.Cliente)}:${clientClicked.addressPhone}",
|
||||
code = clientClicked.addressPhone.toString()
|
||||
))
|
||||
)
|
||||
)
|
||||
}
|
||||
if (!clientClicked.salePersonPhone.isNullOrEmpty())
|
||||
phones.add(
|
||||
if (!clientClicked.salePersonPhone.isNullOrBlank()) phones.add(
|
||||
GeneralItem(
|
||||
text = "${getString(R.string.comercial)}:${clientClicked.salePersonPhone}",
|
||||
code =
|
||||
clientClicked.salePersonPhone.toString()
|
||||
code = clientClicked.salePersonPhone.toString()
|
||||
)
|
||||
)
|
||||
|
||||
/* if (clientClicked.Phones != null && clientClicked.Phones!!.isNotEmpty()) {
|
||||
for (t in clientClicked.Phones!!) {
|
||||
phones.add(
|
||||
GeneralItem(
|
||||
text = "${getString(R.string.Cliente)}:$t",
|
||||
code = t
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (!clientClicked.SalePersonPhone.isNullOrEmpty())
|
||||
phones.add(
|
||||
GeneralItem(
|
||||
text = "${getString(R.string.comercial)}:${clientClicked.SalePersonPhone}",
|
||||
code =
|
||||
clientClicked.SalePersonPhone.toString()
|
||||
)
|
||||
)*/
|
||||
customDialogList.setValueVisibility(View.GONE)
|
||||
customDialogList.setTitle(getString(R.string.phones))
|
||||
.setKoButton(
|
||||
customDialogList.setTitle(getString(R.string.phones)).setKoButton(
|
||||
getString(
|
||||
R.string.cancel
|
||||
)
|
||||
|
@ -608,15 +517,12 @@ class TicketsFragment(
|
|||
customDialogList.dismiss()
|
||||
}.hideDialog().show()
|
||||
|
||||
|
||||
val listPhonesAdapter =
|
||||
GeneralAdapter(phones, object : OnGeneralItemRowClickListener {
|
||||
val listPhonesAdapter = GeneralAdapter(phones, object : OnGeneralItemRowClickListener {
|
||||
override fun OnGeneralItemRowClickListener(item: GeneralItem) {
|
||||
phones.forEach {
|
||||
if (it.code == item.code) {
|
||||
if (ContextCompat.checkSelfPermission(
|
||||
requireContext(),
|
||||
Manifest.permission.CALL_PHONE
|
||||
requireContext(), Manifest.permission.CALL_PHONE
|
||||
) == PackageManager.PERMISSION_GRANTED
|
||||
) {
|
||||
|
||||
|
@ -635,11 +541,9 @@ class TicketsFragment(
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
customDialogList.getRecyclerView().adapter = listPhonesAdapter
|
||||
|
||||
customDialogList.getRecyclerView().layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
|
||||
|
@ -647,58 +551,15 @@ class TicketsFragment(
|
|||
|
||||
fun goMaps(item: ClientTicketSalix) {
|
||||
|
||||
if (isGoogleMapsInstalled()) {
|
||||
|
||||
val uri: String
|
||||
if (item.latitude != null) {
|
||||
uri = "geo:${item.latitude},${item.longitude}?q=" + item.nickname +
|
||||
" " + item.street +
|
||||
" " + item.city +
|
||||
" " + item.postalCode
|
||||
val uri: String = if (item.latitude != null) {
|
||||
"geo:${item.latitude},${item.longitude}?q=" + item.nickname + " " + item.street + " " + item.city + " " + item.postalCode
|
||||
|
||||
} else {
|
||||
uri = "geo:0,0?q=" + item.nickname +
|
||||
" " + item.street +
|
||||
" " + item.city +
|
||||
" " + item.postalCode
|
||||
"geo:0,0?q=" + item.nickname + " " + item.street + " " + 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 true
|
||||
/*val packageManager = mobileApplication.packageManager
|
||||
try {
|
||||
packageManager.getApplicationInfo(
|
||||
"com.google.android.apps.maps",
|
||||
PackageManager.GET_ACTIVITIES
|
||||
)
|
||||
return true
|
||||
} catch (e: PackageManager.NameNotFoundException) {
|
||||
return false
|
||||
}*/
|
||||
|
||||
}
|
||||
|
||||
private fun showTimePicker(textV: TextView) {
|
||||
|
@ -706,7 +567,6 @@ class TicketsFragment(
|
|||
val mcurrentTime = Calendar.getInstance()
|
||||
val hour = mcurrentTime[Calendar.HOUR_OF_DAY]
|
||||
val minute = mcurrentTime[Calendar.MINUTE]
|
||||
|
||||
val mTimePicker = TimePickerDialog(
|
||||
requireContext(),
|
||||
{ _, selectedHour, selectedMinute -> textV.text = "$selectedHour:$selectedMinute" },
|
||||
|
@ -719,10 +579,3 @@ class TicketsFragment(
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
data class PhonesTicket(
|
||||
var label: String,
|
||||
var phone: String
|
||||
)
|
||||
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@ data class ClientTicketSalix(
|
|||
var warehouseName: String?,
|
||||
var salePersonPhone: String?,
|
||||
var ticketObservation: String?,
|
||||
var clientPhone: Int?,
|
||||
var clientMobile: Int?,
|
||||
var addressPhone: Int?,
|
||||
var addressMobile: Int?,
|
||||
var clientPhone: String?,
|
||||
var clientMobile: String?,
|
||||
var addressPhone: String?,
|
||||
var addressMobile: String?,
|
||||
var signed: Int,
|
||||
var latitude: Double?,
|
||||
var longitude: Double?,
|
||||
|
@ -84,4 +84,3 @@ data class SignedTickets(
|
|||
@PrimaryKey
|
||||
val fileName: String
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import android.content.Context
|
|||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.domain.SalixCallback
|
||||
import es.verdnatura.domain.SilexCallback
|
||||
import es.verdnatura.domain.formatWithQuotes
|
||||
|
@ -95,10 +94,6 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
_companyInfoList.value = response.body()?.let { FreeLanceDeliveryInfoList(it) }
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_companyInfoList.value = FreeLanceDeliveryInfoList()
|
||||
super.onError(t)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -107,23 +102,11 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
) {
|
||||
salix.getExpeditionStates(
|
||||
"""{"where": {"expeditionFk": $expedition},"include": [{"relation": "expeditionStateType","scope": {"fields": ["id","description"]}}],"fields": {"id": true,"created": true,"typeFk": true}}"""
|
||||
)
|
||||
// silex.expedition_getLog(expedition)
|
||||
.enqueue(object : SalixCallback<List<ExpeditionInfoLog>>(context) {
|
||||
|
||||
).enqueue(object : SalixCallback<List<ExpeditionInfoLog>>(context) {
|
||||
override fun onSuccess(response: Response<List<ExpeditionInfoLog>>) {
|
||||
if (response.body() != null) {
|
||||
_expeditionInfoList.value = response.body()?.let { ExpeditionInfoList(it) }
|
||||
} else {
|
||||
_expeditionInfoList.value = ExpeditionInfoList()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_expeditionInfoList.value = ExpeditionInfoList()
|
||||
super.onError(t)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -259,27 +242,20 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
salix.freelanceGetInfo(arrayListOf(userId))
|
||||
.enqueue(object : SalixCallback<List<DeliveryInfo>>(context) {
|
||||
override fun onSuccess(response: Response<List<DeliveryInfo>>) {
|
||||
if (response.body() != null) {
|
||||
|
||||
_freelanceInfoList.value =
|
||||
response.body()?.let { FreeLanceDeliveryInfoList(it) }
|
||||
} else {
|
||||
_freelanceInfoList.value = FreeLanceDeliveryInfoList()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_freelanceInfoList.value = FreeLanceDeliveryInfoList()
|
||||
super.onError(t)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun route_getExpeditionSummary(
|
||||
fun routeGetExpeditionSummary(
|
||||
route: Int
|
||||
) {
|
||||
//Tarea 6275
|
||||
salix.routeGetExpeditionSummary(route)
|
||||
// silex.route_getExpeditionSummary(route)
|
||||
.enqueue(object : SalixCallback<List<ExpeditionInfoSummary>>(context) {
|
||||
|
||||
override fun onSuccess(response: Response<List<ExpeditionInfoSummary>>) {
|
||||
|
@ -301,20 +277,13 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
fun getRoutes(
|
||||
workerFk: Int
|
||||
) {
|
||||
//Redmine 6028 falta que le pongan el email y PR
|
||||
salix.getRoutes()
|
||||
// silex.getRoutes(workerFk)
|
||||
.enqueue(object : SalixCallback<MutableList<RouteInfo>>(context) {
|
||||
|
||||
salix.getRoutes().enqueue(object : SalixCallback<MutableList<RouteInfo>>(context) {
|
||||
|
||||
override fun onSuccess(response: Response<MutableList<RouteInfo>>) {
|
||||
|
||||
if (response.body() != null) {
|
||||
println()
|
||||
_routeList.value = response.body()?.let { RouteList(it) }
|
||||
} else {
|
||||
_routeList.value = RouteList()
|
||||
}
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
|
@ -323,19 +292,29 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
//super.onError(t)
|
||||
|
||||
}
|
||||
|
||||
override fun onFailure(call: Call<MutableList<RouteInfo>>, t: Throwable) {
|
||||
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun getTickets(
|
||||
routeId: Long
|
||||
) {
|
||||
salix.getTickets("""{"id":$routeId,"order":["priority","id"]}""")
|
||||
salix.getTickets("""{"id":$routeId,"order":["priority","id"],"limit":1}""")
|
||||
.enqueue(object : SalixCallback<MutableList<ClientTicketSalix>>(context) {
|
||||
override fun onSuccess(response: Response<MutableList<ClientTicketSalix>>) {
|
||||
println("ticketsss entrando")
|
||||
for (list in response.body()!!){
|
||||
println("ticketsss ${list.clientFk}")
|
||||
}
|
||||
_clientTicketList.value = response.body()?.let { ClientTicketList(it) }
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
println("ticketsss fallando")
|
||||
println("tickets fallando ${t.message}")
|
||||
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
|
||||
|
||||
}
|
||||
|
@ -346,46 +325,17 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
routeId: Long, email: String
|
||||
) {
|
||||
salix.driverRouteEmail(id = routeId, hashMapOf("recipient" to email))
|
||||
.enqueue(object : SilexCallback<Any>(context) {
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
|
||||
_response.value = ResponseItemVO(context.getString(R.string.sendRouteOk))
|
||||
.enqueue(object : SalixCallback<Any>(context) {})
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_response.value = ResponseItemVO()
|
||||
super.onError(t)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/* fun addNote(
|
||||
ticketFk: Int
|
||||
) {
|
||||
silex.addNotes(ticketFk)
|
||||
.enqueue(object : SilexCallback<Any>(context) {
|
||||
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
_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<Any>(context) {
|
||||
salix.routeUpdate(route.id, route).enqueue(object : SalixCallback<Any>(context) {
|
||||
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
_responseUpdateRoute.value = ResponseItemVO()
|
||||
super.onSuccess(response)
|
||||
|
||||
}
|
||||
|
||||
|
@ -403,22 +353,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
) {
|
||||
salix.addNote(
|
||||
arrayListOf(listTickets[0].Id, note).formatWithQuotes()
|
||||
)/* silex.addNotes(
|
||||
mapOf(
|
||||
"Tickets" to listTickets.map { it.Id },
|
||||
"note" to note
|
||||
)
|
||||
)*/.enqueue(object : SalixCallback<Any>(context) {
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
_response.value =
|
||||
ResponseItemVO(response = context.getString(R.string.noteAddOk))
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_response.value = ResponseItemVO()
|
||||
super.onError(t)
|
||||
}
|
||||
})
|
||||
).enqueue(object : SalixCallback<Any>(context) {})
|
||||
}
|
||||
|
||||
fun imageUpload(
|
||||
|
@ -457,8 +392,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
//Fallo de red
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseSign.value =
|
||||
ResponseItemVO("NetWork Error", true, t.message.toString(), 0)
|
||||
_responseSign.value = ResponseItemVO("NetWork Error", true, t.message.toString(), 0)
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
@ -29,7 +29,6 @@ class CmrExpeditionPalletFragment(
|
|||
|
||||
customDialogList = CustomDialogInputTwoValues(requireContext())
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
setEvents()
|
||||
setToolBar()
|
||||
showExpeditionPalletScan()
|
||||
|
@ -43,10 +42,8 @@ class CmrExpeditionPalletFragment(
|
|||
private fun cmrExpeditionPallet_add(vExpeditionPallet: Int?, vCmrId: Int?) {
|
||||
|
||||
customDialogList.dismiss()
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
viewModel.cmrExpeditionPalletAdd(
|
||||
vExpeditionPallet!!,
|
||||
vCmrId!!
|
||||
vExpeditionPallet!!, vCmrId!!
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -63,29 +60,9 @@ class CmrExpeditionPalletFragment(
|
|||
override fun observeViewModel() {
|
||||
|
||||
with(viewModel) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
||||
responsescan.observe(viewLifecycleOwner) {
|
||||
|
||||
if (it.isError) {
|
||||
|
||||
ma.messageWithSound(
|
||||
getString(R.string.cmrError) + it.errorMessage,
|
||||
isError = true,
|
||||
isPlayed = true,
|
||||
isToasted = true
|
||||
)
|
||||
showExpeditionPalletScan()
|
||||
|
||||
} else {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
ma.messageWithSound(
|
||||
getString(R.string.operationSuccess),
|
||||
isError = false,
|
||||
isPlayed = true
|
||||
)
|
||||
showExpeditionPalletScan()
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -110,7 +87,7 @@ class CmrExpeditionPalletFragment(
|
|||
customDialogList.setFocusText()
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
if (customDialogList.getValue().isNotEmpty()) {
|
||||
dataScanned = itemScan(customDialogList.getValue())
|
||||
|
||||
|
@ -134,7 +111,7 @@ class CmrExpeditionPalletFragment(
|
|||
|
||||
}
|
||||
customDialogList.getEditTextTwo().setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
|
||||
if (customDialogList.getValueTwo().isNotEmpty() && customDialogList.getValue()
|
||||
.isNotEmpty()
|
||||
|
@ -149,7 +126,6 @@ class CmrExpeditionPalletFragment(
|
|||
} else {
|
||||
if (dataScanned != null) {
|
||||
|
||||
|
||||
if (dataScanned!!.table == dataScannedTwo!!.table) {
|
||||
ma.messageWithSound(
|
||||
getString(R.string.errorSameType),
|
||||
|
@ -166,8 +142,7 @@ class CmrExpeditionPalletFragment(
|
|||
dataScanned!!.id
|
||||
} else {
|
||||
dataScannedTwo!!.id
|
||||
},
|
||||
if (dataScannedTwo!!.table == "cmr") {
|
||||
}, if (dataScannedTwo!!.table == "cmr") {
|
||||
dataScannedTwo!!.id
|
||||
} else {
|
||||
dataScanned!!.id
|
||||
|
@ -176,8 +151,7 @@ class CmrExpeditionPalletFragment(
|
|||
}
|
||||
} else {
|
||||
cmrExpeditionPallet_add(
|
||||
customDialogList.getValue().toInt(),
|
||||
dataScannedTwo!!.id
|
||||
customDialogList.getValue().toInt(), dataScannedTwo!!.id
|
||||
|
||||
)
|
||||
}
|
||||
|
@ -203,9 +177,8 @@ private fun itemScan(value: String): ItemScanned? {
|
|||
null
|
||||
}
|
||||
|
||||
} catch (Ex: Exception) {
|
||||
} catch (ex: Exception) {
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ class CmrExpeditionPalletViewModel(val context: Context) : BaseViewModel(context
|
|||
override fun onSuccess(response: Response<Unit>) {
|
||||
_responsescan.value =
|
||||
ResponseItemVO(isError = false, response = response.message()!!)
|
||||
super.onSuccess(response)
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
|
@ -29,6 +30,7 @@ class CmrExpeditionPalletViewModel(val context: Context) : BaseViewModel(context
|
|||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
super.onError(t)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package es.verdnatura.presentation.view.feature.paletizador.fragment
|
||||
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
|
@ -12,7 +11,6 @@ import es.verdnatura.presentation.common.GeneralItem
|
|||
import es.verdnatura.presentation.common.OnGeneralItemRowClickListener
|
||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||
|
||||
|
||||
class ExpeditionScanSorterFragment(
|
||||
var title: String = ""
|
||||
) : BaseFragment<FragmentExpeditionscanSorterBinding, ExpeditionScanSorterViewModel>(
|
||||
|
@ -33,8 +31,6 @@ class ExpeditionScanSorterFragment(
|
|||
|
||||
customDialogList = CustomDialogList(requireContext())
|
||||
ma.hideBottomNavigation(GONE)
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
setEvents()
|
||||
setToolBar()
|
||||
showExpeditionScan()
|
||||
|
@ -45,43 +41,24 @@ class ExpeditionScanSorterFragment(
|
|||
binding.mainToolbar.toolbarTitle.text = title
|
||||
}
|
||||
|
||||
private fun expeditionscan(expeditionScan: String) {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.expeditionScan(expeditionScan)
|
||||
itemScaned = expeditionScan
|
||||
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
requireActivity().onBackPressed()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
|
||||
with(viewModel) {
|
||||
binding.splashProgress.visibility = GONE
|
||||
responsescan.observe(viewLifecycleOwner, {
|
||||
|
||||
if (it.isError) {
|
||||
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
|
||||
} else {
|
||||
|
||||
responsescan.observe(viewLifecycleOwner) {
|
||||
listExpeditionScan.add(GeneralItem(itemScaned, itemScaned))
|
||||
customDialogList.setDescription(getString(R.string.total) + listExpeditionScan.size)
|
||||
customDialogList.setDescription(getString(R.string.total) + ":" + listExpeditionScan.size)
|
||||
expeditionScanAdapter!!.notifyItemInserted(listExpeditionScan.size - 1)
|
||||
customDialogList.setValue("")
|
||||
ma.messageWithSound(getString(R.string.added),false,true)
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
@ -91,22 +68,19 @@ class ExpeditionScanSorterFragment(
|
|||
|
||||
customDialogList.setTitle(getString(R.string.expeditionNoSorter))
|
||||
.setOkButton(getString(R.string.end)) {
|
||||
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
customDialogList.dismiss()
|
||||
binding.mainToolbar.backButton.performClick()
|
||||
|
||||
|
||||
}.setValue("").show()
|
||||
|
||||
|
||||
customDialogList.getEditText().requestFocus()
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
if (customDialogList.getValue().isNotEmpty()) {
|
||||
expeditionscan(customDialogList.getValue())
|
||||
viewModel.expeditionScan(customDialogList.getValue())
|
||||
itemScaned = customDialogList.getValue()
|
||||
}
|
||||
customDialogList.setValue("")
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
|
|
@ -5,8 +5,6 @@ import androidx.lifecycle.LiveData
|
|||
import androidx.lifecycle.MutableLiveData
|
||||
import es.verdnatura.domain.SalixCallback
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
import retrofit2.Response
|
||||
|
||||
|
@ -20,26 +18,10 @@ class ExpeditionScanSorterViewModel(val context: Context) : BaseViewModel(contex
|
|||
salix.expeditionScan(params = arrayListOf(vExpeditionId))
|
||||
.enqueue(object : SalixCallback<Unit>(context) {
|
||||
override fun onSuccess(response: Response<Unit>) {
|
||||
if (!response.isSuccessful) {
|
||||
_responsescan.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
} else {
|
||||
|
||||
_responsescan.value =
|
||||
ResponseItemVO(isError = false, response = response.message()!!)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun onError(t: Throwable) {
|
||||
_responsescan.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
super.onSuccess(response)
|
||||
}
|
||||
|
||||
})
|
||||
|
|
|
@ -2,7 +2,6 @@ package es.verdnatura.presentation.view.feature.paletizador.fragment
|
|||
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.core.view.isVisible
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentGeneralBlackBinding
|
||||
import es.verdnatura.domain.toast
|
||||
|
@ -22,7 +21,6 @@ class PalletScanFragment(
|
|||
private var itemScaned: Int = 0
|
||||
private var isShowed = false
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(title: String, action: String) = PalletScanFragment(title, action)
|
||||
}
|
||||
|
@ -48,59 +46,39 @@ class PalletScanFragment(
|
|||
requireActivity().onBackPressed()
|
||||
|
||||
}
|
||||
|
||||
customDialogList.setOnDismissListener {
|
||||
if (!binding.splashProgress.isVisible)
|
||||
requireActivity().onBackPressed()
|
||||
customDialogList.dismiss()
|
||||
}
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
|
||||
with(viewModel) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
responseScan.observe(viewLifecycleOwner) {
|
||||
|
||||
if (it.isError) {
|
||||
|
||||
ma.messageWithSound(
|
||||
it.errorMessage,
|
||||
true,
|
||||
true,
|
||||
isToasted = true
|
||||
it.errorMessage, true, true, isToasted = true
|
||||
)
|
||||
showPalletScan()
|
||||
|
||||
} else {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
ma.messageWithSound(getString(R.string.palletScanned) + itemScaned, false, true)
|
||||
showPalletScan()
|
||||
|
||||
}
|
||||
}
|
||||
responsePalletGet.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
if (it.isError) {
|
||||
|
||||
ma.messageWithSound(
|
||||
it.errorMessage,
|
||||
true,
|
||||
true,
|
||||
isToasted = true
|
||||
)
|
||||
showPalletScan()
|
||||
|
||||
} else {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
ma.messageWithSound(getString(R.string.palletScanned) + itemScaned, false, true)
|
||||
|
||||
ma.onComprobarPalletFromPalletScan(
|
||||
it,
|
||||
ItemPalletVO(Pallet = itemScaned.toInt())
|
||||
it, ItemPalletVO(Pallet = itemScaned)
|
||||
)
|
||||
customDialogList.dismiss()
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -116,8 +94,8 @@ class PalletScanFragment(
|
|||
|
||||
customDialogList.setOkButton(getString(R.string.end)) {
|
||||
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
customDialogList.dismiss()
|
||||
ma.onBackPressed()
|
||||
|
||||
}.setValue("").show()
|
||||
|
||||
|
@ -125,14 +103,11 @@ class PalletScanFragment(
|
|||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||
if (customDialogList.getValue().isNotEmpty()
|
||||
) {
|
||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||
if (customDialogList.getValue().isNotEmpty()) {
|
||||
try {
|
||||
itemScaned = itemScanValue(
|
||||
customDialogList.getValue(),
|
||||
"expeditionPallet",
|
||||
"id"
|
||||
customDialogList.getValue(), "expeditionPallet", "id"
|
||||
).toString().toInt()
|
||||
|
||||
} catch (ex: Exception) {
|
||||
|
@ -142,18 +117,16 @@ class PalletScanFragment(
|
|||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
||||
when (action) {
|
||||
"receive" -> viewModel.expeditionState_addByPallet(
|
||||
itemScaned,
|
||||
"STORED"
|
||||
"receive" -> viewModel.expeditionStateAddByPallet(
|
||||
itemScaned, "STORED"
|
||||
)
|
||||
|
||||
"get" -> viewModel.expeditionPallet_get(
|
||||
"get" -> viewModel.expeditionPalletGet(
|
||||
itemScaned
|
||||
)
|
||||
}
|
||||
customDialogList.dismiss()
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
customDialogList.setValue("")
|
||||
|
||||
}
|
||||
|
||||
return@setOnEditorActionListener true
|
||||
|
|
|
@ -13,10 +13,8 @@ import es.verdnatura.presentation.common.ResponseItemVO
|
|||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
||||
import retrofit2.Response
|
||||
|
||||
|
||||
class PalletScanViewModel(val context: Context) : BaseViewModel(context) {
|
||||
|
||||
|
||||
private val _responseScan by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responseScan: LiveData<ResponseItemVO>
|
||||
get() = _responseScan
|
||||
|
@ -25,14 +23,15 @@ class PalletScanViewModel(val context: Context) : BaseViewModel(context) {
|
|||
val responsePalletGet: LiveData<ItemExpeditionTruckVO>
|
||||
get() = _responsePalletGet
|
||||
|
||||
|
||||
fun expeditionState_addByPallet(
|
||||
fun expeditionStateAddByPallet(
|
||||
vPalletId: Int,
|
||||
vStatePallet: String
|
||||
) {
|
||||
salix.expeditionStateAddByPallet(arrayListOf(
|
||||
salix.expeditionStateAddByPallet(
|
||||
arrayListOf(
|
||||
vPalletId,
|
||||
vStatePallet).formatWithQuotes()
|
||||
vStatePallet
|
||||
).formatWithQuotes()
|
||||
)
|
||||
.enqueue(object : SilexCallback<Unit>(context) {
|
||||
override fun onError(t: Throwable) {
|
||||
|
@ -52,22 +51,14 @@ class PalletScanViewModel(val context: Context) : BaseViewModel(context) {
|
|||
})
|
||||
}
|
||||
|
||||
fun expeditionPallet_get(vPalletId: Int) {
|
||||
fun expeditionPalletGet(vPalletId: Int) {
|
||||
//Tarea 6276
|
||||
//salix.expeditionPalletGetPallet(vPalletId)
|
||||
|
||||
silex.expeditionPallet_get(vPalletId)
|
||||
.enqueue(object : SalixCallback<ItemExpeditionTruckVO>(context) {
|
||||
override fun onError(t: Throwable) {
|
||||
|
||||
_responsePalletGet.value = ItemExpeditionTruckVO(
|
||||
0,
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onSuccess(response: Response<ItemExpeditionTruckVO>) {
|
||||
|
||||
_responsePalletGet.value =
|
||||
response.body()!!
|
||||
|
||||
|
|
|
@ -7,8 +7,6 @@
|
|||
android:layout_height="match_parent"
|
||||
android:background="@color/verdnatura_black">
|
||||
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/scan_input"
|
||||
style="@style/ScanLineTextSearch"
|
||||
|
@ -21,8 +19,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
|
||||
|
||||
|
||||
|
||||
<include
|
||||
android:id="@+id/main_toolbar"
|
||||
layout="@layout/toolbar_fragment"
|
||||
|
@ -30,27 +26,5 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/splash_progress"
|
||||
android:visibility="visible"
|
||||
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>
|
|
@ -2,41 +2,17 @@
|
|||
<layout 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"
|
||||
android:background="@color/verdnatura_black">
|
||||
|
||||
' <include
|
||||
<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:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/verdnatura_black_8_alpha_6"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<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>
|
|
@ -1,7 +1,7 @@
|
|||
<?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">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -14,8 +14,7 @@
|
|||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/scan_input"
|
||||
|
@ -29,52 +28,49 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/lineMenu"
|
||||
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:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/layout_margin_1"
|
||||
android:paddingRight="@dimen/layout_margin_1"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/scan_input">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/expedition"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:paddingStart="@dimen/layout_margin_min"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start" />
|
||||
android:text="@string/expedition"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@string/titlePackagingCount"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"/>
|
||||
|
||||
android:textSize="@dimen/body1" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/consignatario"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1"
|
||||
android:gravity="end"/>
|
||||
android:gravity="end"
|
||||
android:text="@string/consignatario"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/expeditionloadunload_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -92,33 +88,5 @@
|
|||
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>
|
|
@ -1,7 +1,7 @@
|
|||
<?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">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -28,99 +28,100 @@
|
|||
android:hint="@string/titleExpeditionScan"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
/>
|
||||
android:maxLines="1" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/route_layout"
|
||||
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:visibility ="gone"
|
||||
android:paddingRight="@dimen/layout_margin_1"
|
||||
android:background="@color/verdnatura_pumpkin_orange"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/layout_margin_1"
|
||||
android:paddingRight="@dimen/layout_margin_1"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/route"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Ruta"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:paddingLeft="@dimen/layout_margin_min"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="left" />
|
||||
android:gravity="left"
|
||||
android:paddingLeft="@dimen/layout_margin_min"
|
||||
android:text="@string/Ruta"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/agency"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/zone"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="left"/>
|
||||
|
||||
android:gravity="left"
|
||||
android:text="@string/zone"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/Fecha"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="right"
|
||||
/>
|
||||
android:text="@string/Fecha"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<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:orientation="horizontal"
|
||||
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="@string/Fecha"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:paddingLeft="@dimen/layout_margin_min"
|
||||
android:layout_weight="1"
|
||||
android:gravity="left" />
|
||||
android:gravity="left"
|
||||
android:paddingLeft="@dimen/layout_margin_min"
|
||||
android:text="@string/Fecha"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="left"
|
||||
android:text="@string/Worker"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="left"/>
|
||||
android:textSize="@dimen/body2" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/state"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="right"/>
|
||||
|
||||
android:gravity="right"
|
||||
android:text="@string/state"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemcard_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="10dp"
|
||||
android:orientation="vertical"
|
||||
android:padding="10dp"
|
||||
tools:ignore="ExtraText">
|
||||
|
||||
<RelativeLayout
|
||||
|
@ -128,7 +129,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
|
||||
<!--android:id="@+id/itemexpeditionstate_recyclerview"-->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/itemexpeditionlog_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -136,46 +136,18 @@
|
|||
android:clipToPadding="false"
|
||||
android:visibility="visible"
|
||||
tools:listitem="@layout/item_expeditionlog_row" />
|
||||
</RelativeLayout>>
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
' <include
|
||||
<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>
|
|
@ -1,27 +1,25 @@
|
|||
<?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">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/scan_input"
|
||||
style="@style/ScanLineTextSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:enabled="false"
|
||||
android:hint="@string/titleExpeditionScan"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:enabled="false"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/txtDescriptions"
|
||||
|
@ -120,13 +118,13 @@
|
|||
android:id="@+id/itemcard_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="10dp"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="ExtraText"
|
||||
android:padding="10dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/divider">
|
||||
app:layout_constraintTop_toTopOf="@+id/divider"
|
||||
tools:ignore="ExtraText">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -161,33 +159,5 @@
|
|||
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>
|
|
@ -1,14 +1,14 @@
|
|||
<?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">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/verdnatura_black">
|
||||
|
||||
' <include
|
||||
<include
|
||||
android:id="@+id/main_toolbar"
|
||||
layout="@layout/toolbar_fragment"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
|
@ -17,13 +17,13 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/scan"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="50dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
|
||||
|
@ -35,8 +35,8 @@
|
|||
android:layout_marginStart="50dp"
|
||||
android:layout_marginTop="75dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:gravity="center_horizontal"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:gravity="center_horizontal"
|
||||
android:hint="@string/ScanPlateOrSmarttag"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
|
@ -48,13 +48,13 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/scan_smarttag"
|
||||
android:visibility="visible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginTop="150dp"
|
||||
android:layout_marginEnd="25dp"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
|
||||
|
@ -62,20 +62,19 @@
|
|||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/scan_input_smarttag"
|
||||
style="@style/InputLineTextSearch"
|
||||
android:visibility="invisible"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginStart="50dp"
|
||||
android:layout_marginTop="100dp"
|
||||
android:layout_marginEnd="50dp"
|
||||
android:backgroundTint="@color/colorPrimary"
|
||||
android:gravity="center_horizontal"
|
||||
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:textDirection="firstStrong" />
|
||||
android:textDirection="firstStrong"
|
||||
android:visibility="invisible" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/button_punch"
|
||||
|
@ -84,34 +83,12 @@
|
|||
android:layout_gravity="center"
|
||||
android:layout_marginTop="0dp"
|
||||
android:background="@drawable/btn_orange"
|
||||
android:visibility="gone"
|
||||
android:text="ESCANEAR CARROS"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:visibility="gone"
|
||||
tools:visibility="gone" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/splash_progress"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/verdnatura_black_8_alpha_6"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible">
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
|
@ -1,8 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
>
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -22,23 +21,18 @@
|
|||
android:id="@+id/linearLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider"
|
||||
android:layout_marginLeft="@dimen/pasilleros_margin_main_menu"
|
||||
android:layout_marginRight="@dimen/pasilleros_margin_main_menu"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/navigation_row_limit_padding"
|
||||
>
|
||||
|
||||
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
|
||||
>
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -54,12 +48,11 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/company"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
android:gravity="center"
|
||||
tools:text="@string/company"
|
||||
/>
|
||||
tools:text="@string/company" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -75,24 +68,25 @@
|
|||
android:text="@string/nif"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_nif"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/nif"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/nif"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
tools:text="@string/nif" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -100,19 +94,18 @@
|
|||
android:text="@string/adress"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_adress"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/adress"
|
||||
android:tooltipText="@string/copied"
|
||||
android:gravity="center"
|
||||
android:text="@string/adress"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
android:tooltipText="@string/copied"
|
||||
tools:text="@string/adress" />
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -123,31 +116,27 @@
|
|||
android:id="@+id/dividertwo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:layout_marginBottom="@dimen/item_list_separation"
|
||||
android:layout_marginTop="@dimen/item_list_separation"
|
||||
android:layout_marginBottom="@dimen/item_list_separation"
|
||||
android:background="@color/verdnatura_white"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/linearLayout" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearInfoFreelance"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@id/dividertwo"
|
||||
android:layout_marginLeft="@dimen/pasilleros_margin_main_menu"
|
||||
android:layout_marginRight="@dimen/pasilleros_margin_main_menu"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/navigation_row_limit_padding"
|
||||
android:visibility="gone"
|
||||
>
|
||||
|
||||
app:layout_constraintTop_toBottomOf="@id/dividertwo">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
|
||||
>
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -163,11 +152,10 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
android:gravity="center"
|
||||
tools:text="@string/freelance"
|
||||
/>
|
||||
tools:text="@string/freelance" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -183,23 +171,24 @@
|
|||
android:text="@string/nif"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/freelance_nif"
|
||||
android:layout_weight="1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body1"
|
||||
tools:text="@string/nif" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -207,8 +196,7 @@
|
|||
android:text="@string/adress"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/freelance_address"
|
||||
|
@ -220,33 +208,29 @@
|
|||
android:textSize="@dimen/body1"
|
||||
tools:text="@string/adress" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
android:layout_marginBottom="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="@dimen/default_layout_margin"
|
||||
android:text="Server:"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body1"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginRight="@dimen/default_layout_margin"/>
|
||||
|
||||
|
||||
|
||||
android:textStyle="bold" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<include
|
||||
android:id="@+id/main_toolbar"
|
||||
layout="@layout/toolbar_fragment"
|
||||
|
@ -254,32 +238,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/splash_progress"
|
||||
android:visibility="invisible"
|
||||
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>
|
|
@ -1,27 +1,25 @@
|
|||
<?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">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/scan_input"
|
||||
style="@style/ScanLineTextSearch"
|
||||
android:layout_width="match_parent"
|
||||
android:enabled="true"
|
||||
android:hint="@string/filterRoutes"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:enabled="true"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
|
||||
/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/txtDescriptions"
|
||||
|
@ -33,9 +31,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/scan_input">
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
|
@ -52,14 +47,13 @@
|
|||
android:id="@+id/itemcard_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="5dp"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="ExtraText"
|
||||
android:padding="5dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/divider"
|
||||
>
|
||||
tools:ignore="ExtraText">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -94,33 +88,5 @@
|
|||
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>
|
|
@ -1,13 +1,12 @@
|
|||
<?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">
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -17,18 +16,18 @@
|
|||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
|
||||
</LinearLayout>
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_toolbar" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_km_hour"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/divider"
|
||||
app:layout_constraintTop_toBottomOf="@+id/main_toolbar"
|
||||
tools:visibility="gone">
|
||||
tools:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView20"
|
||||
|
@ -44,8 +43,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/layout_km_hour" />
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -87,12 +84,12 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:inputType="number"
|
||||
android:padding="5dp"
|
||||
android:text="0"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:gravity="center"/>
|
||||
android:padding="5dp"
|
||||
android:text="0" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -125,14 +122,15 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:inputType="number"
|
||||
android:padding="5dp"
|
||||
android:text="0"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:gravity="center"/>
|
||||
android:padding="5dp"
|
||||
android:text="0" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView28"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -147,6 +145,7 @@
|
|||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout7" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout8"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -178,8 +177,7 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/hour_start"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
/>
|
||||
android:textColor="@color/verdnatura_white" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/hourInit"
|
||||
|
@ -188,12 +186,11 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:padding="5dp"
|
||||
android:text="00:00"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionDone"
|
||||
android:maxLines="1"
|
||||
android:gravity="center"
|
||||
/>
|
||||
android:padding="5dp"
|
||||
android:text="00:00" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -207,14 +204,14 @@
|
|||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout9">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2123"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/hour_end"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
/>
|
||||
android:textColor="@color/verdnatura_white" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/hourEnd"
|
||||
|
@ -223,29 +220,27 @@
|
|||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:padding="5dp"
|
||||
android:text="00:00"
|
||||
android:focusable="true"
|
||||
android:gravity="center"
|
||||
android:imeOptions="actionDone"
|
||||
android:maxLines="1"
|
||||
android:focusable="true"
|
||||
android:gravity="center"/>
|
||||
android:padding="5dp"
|
||||
android:text="00:00" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/saveButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/save"
|
||||
android:textAlignment="center"
|
||||
android:textSize="@dimen/h7"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/h7"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/hour_end"
|
||||
/>
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -253,15 +248,14 @@
|
|||
android:id="@+id/itemcard_layout"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:padding="5dp"
|
||||
android:orientation="vertical"
|
||||
tools:ignore="ExtraText"
|
||||
android:padding="5dp"
|
||||
android:visibility="visible"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/divider"
|
||||
android:visibility="visible"
|
||||
>
|
||||
tools:ignore="ExtraText">
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -298,34 +292,5 @@
|
|||
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>
|
|
@ -1,14 +1,12 @@
|
|||
<?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">
|
||||
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<ScrollView
|
||||
|
||||
android:id="@+id/scroll_view"
|
||||
|
@ -24,7 +22,6 @@
|
|||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/itemcard_layout"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -35,47 +32,50 @@
|
|||
android:id="@+id/name_vehiclecontrol"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="Nombre del usuario"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/toolbar_height"
|
||||
android:hint="Nombre del usuario"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/h5"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginTop="@dimen/toolbar_height"
|
||||
/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/user_image"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/itemcard_image_height"
|
||||
android:layout_margin="10dp"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/loadphoto"
|
||||
android:layout_margin="10dp"/>
|
||||
<!-- TAGS ======================================================================================================= -->
|
||||
android:src="@drawable/loadphoto" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="10dp"
|
||||
android:padding="@dimen/layout_margin_min"
|
||||
android:layout_marginBottom="@dimen/layout_margin_min">
|
||||
android:layout_marginBottom="@dimen/layout_margin_min"
|
||||
android:orientation="vertical"
|
||||
android:padding="@dimen/layout_margin_min">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/user_information"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@string/registered_vehiclecontrol"
|
||||
android:textColor="@color/verdnatura_brown_grey"
|
||||
android:textSize="@dimen/h7"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/registered_vehiclecontrol"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -85,18 +85,21 @@
|
|||
android:textSize="@dimen/h7"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@string/deviceName"
|
||||
android:textColor="@color/verdnatura_brown_grey"
|
||||
android:textSize="@dimen/h7"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/deviceName"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -107,25 +110,26 @@
|
|||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_weight="1">
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"
|
||||
android:text="@string/assigned_user"
|
||||
android:textColor="@color/verdnatura_brown_grey"
|
||||
android:textSize="@dimen/h7"
|
||||
android:textStyle="bold"
|
||||
android:layout_marginEnd="@dimen/layout_margin_min"/>
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/assigned_devicename"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -139,64 +143,34 @@
|
|||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
<!-- VALORES ================================================================================================== -->
|
||||
|
||||
<RelativeLayout
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:descendantFocusability="blocksDescendants">
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
android:visibility="gone">
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/itemcard_recyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
tools:listitem="@layout/item_card_row" />
|
||||
</RelativeLayout>>
|
||||
|
||||
</RelativeLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
' <include
|
||||
<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>
|
Loading…
Reference in New Issue