refs #5135 feat: refactor animation. HotFix phones cambiar a String(varchar en bbdd)

This commit is contained in:
Sergio De la torre 2024-01-12 09:44:32 +01:00
parent a5953a22f5
commit d787d8e861
33 changed files with 863 additions and 1692 deletions

View File

@ -129,17 +129,42 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="version 24.2Beta"> <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$/.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/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/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/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/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/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/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/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/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_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> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -298,43 +323,44 @@
<option name="showLibraryContents" value="true" /> <option name="showLibraryContents" value="true" />
<option name="showMembers" value="true" /> <option name="showMembers" value="true" />
</component> </component>
<component name="PropertiesComponent">{ <component name="PropertiesComponent"><![CDATA[{
&quot;keyToString&quot;: { "keyToString": {
&quot;ApkExportedModule&quot;: &quot;Gestor_Almacén.app&quot;, "ApkExportedModule": "Gestor_Almacén.app",
&quot;ExportApk.ApkPathForGestor_Almacén.app&quot;: &quot;C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app&quot;, "ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
&quot;KotlinFunctionFindUsagesOptions.isSearchForTextOccurrences&quot;: &quot;true&quot;, "KotlinFunctionFindUsagesOptions.isSearchForTextOccurrences": "true",
&quot;PROJECT_TRUSTED_KEY&quot;: &quot;true&quot;, "PROJECT_TRUSTED_KEY": "true",
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;, "RunOnceActivity.ShowReadmeOnStart": "true",
&quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;, "RunOnceActivity.cidr.known.project.marker": "true",
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;, "SHARE_PROJECT_CONFIGURATION_FILES": "true",
&quot;ScreenRecorder.SavePath&quot;: &quot;C:\\Users\\sergiodt&quot;, "ScreenRecorder.SavePath": "C:\\Users\\sergiodt",
&quot;android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED&quot;: &quot;RecyclerView&quot;, "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",
&quot;android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-29/android/widget/TextView.java_SELECTED&quot;: &quot;TextView&quot;, "android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-29/android/widget/TextView.java_SELECTED": "TextView",
&quot;android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-33/android/view/View.java_SELECTED&quot;: &quot;View&quot;, "android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-33/android/view/View.java_SELECTED": "View",
&quot;cidr.known.project.marker&quot;: &quot;true&quot;, "cidr.known.project.marker": "true",
&quot;com.android.tools.idea.devicemanager.tab&quot;: &quot;Physical&quot;, "com.android.tools.idea.devicemanager.tab": "Physical",
&quot;com.google.services.firebase.aqiPopupShown&quot;: &quot;true&quot;, "com.developerphil.adbidea.selecteddevices": "21114523025303",
&quot;git-widget-placeholder&quot;: &quot;dev&quot;, "com.google.services.firebase.aqiPopupShown": "true",
&quot;last_opened_file_path&quot;: &quot;C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable&quot;, "git-widget-placeholder": "dev",
&quot;project.structure.last.edited&quot;: &quot;Suggestions&quot;, "last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
&quot;project.structure.proportion&quot;: &quot;0.17&quot;, "project.structure.last.edited": "Suggestions",
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;, "project.structure.proportion": "0.17",
&quot;run.code.analysis.last.selected.profile&quot;: &quot;pProject Default&quot;, "project.structure.side.proportion": "0.2",
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.sourceCode.Kotlin&quot; "run.code.analysis.last.selected.profile": "pProject Default",
"settings.editor.selected.configurable": "preferences.sourceCode.Kotlin"
}, },
&quot;keyToStringList&quot;: { "keyToStringList": {
&quot;ExportApk.BuildVariants&quot;: [ "ExportApk.BuildVariants": [
&quot;betaRelease&quot; "betaRelease"
], ],
&quot;com.android.tools.idea.sqlite.queryhistory&quot;: [ "com.android.tools.idea.sqlite.queryhistory": [
&quot;select * from expedition where routeFk=182933;&quot;, "select * from expedition where routeFk=182933;",
&quot;select * from expedition;&quot;, "select * from expedition;",
&quot;select * from expeditionPending;&quot;, "select * from expeditionPending;",
&quot;select * from expedition where id = 7753995;\n\n&quot;, "select * from expedition where id = 7753995;\n\n",
&quot;\nselect * from expedition where id = 7753995;&quot; "\nselect * from expedition where id = 7753995;"
] ]
} }
}</component> }]]></component>
<component name="PsdUISettings"> <component name="PsdUISettings">
<option name="MODULE_TAB" value="Properties" /> <option name="MODULE_TAB" value="Properties" />
<option name="LAST_EDITED_SIGNING_CONFIG" value="debug" /> <option name="LAST_EDITED_SIGNING_CONFIG" value="debug" />
@ -506,20 +532,6 @@
<option name="presentableId" value="Default" /> <option name="presentableId" value="Default" />
<updated>1618825571576</updated> <updated>1618825571576</updated>
</task> </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"> <task id="LOCAL-00181" summary="refs #5764 modify dayOfSale">
<created>1694769010620</created> <created>1694769010620</created>
<option name="number" value="00181" /> <option name="number" value="00181" />
@ -849,7 +861,21 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1704788589872</updated> <updated>1704788589872</updated>
</task> </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 /> <servers />
</component> </component>
<component name="Vcs.Log.History.Properties"> <component name="Vcs.Log.History.Properties">
@ -950,7 +976,6 @@
</component> </component>
<component name="VcsManagerConfiguration"> <component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" /> <option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value="varios" />
<MESSAGE value="refs #5890" /> <MESSAGE value="refs #5890" />
<MESSAGE value="refs #5802 ticketSetState" /> <MESSAGE value="refs #5802 ticketSetState" />
<MESSAGE value="version 23.40.1-hotFix OrderPrevia" /> <MESSAGE value="version 23.40.1-hotFix OrderPrevia" />
@ -971,11 +996,12 @@
<MESSAGE value="refs #6460 fix:date" /> <MESSAGE value="refs #6460 fix:date" />
<MESSAGE value="refs #5135: refactor animation" /> <MESSAGE value="refs #5135: refactor animation" />
<MESSAGE value="refs #6275 feat: back to Salix" /> <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 #6275 feat: back to Salix (delivery)" />
<MESSAGE value="refs #6276: prepare Salixback" /> <MESSAGE value="refs #6276: prepare Salixback" />
<MESSAGE value="version 24.2Beta" /> <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>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>

View File

@ -260,7 +260,7 @@ interface SalixService {
@Body vararg params: Any? @Body vararg params: Any?
): ):
Call<Any> Call<Any>
@GET("ItemShelvings/getSale")//NO SALIX @GET("Sales/getFromSectorCollection")//NO SALIX
fun sectorCollectionGetSale( fun sectorCollectionGetSale(
@Query("sectorFk") sectorFk: Int, @Query("sectorFk") sectorFk: Int,
@Query("sectorCollectionFk") sectorCollectionFk: Int, @Query("sectorCollectionFk") sectorCollectionFk: Int,
@ -307,6 +307,12 @@ interface SalixService {
): ):
Call<Any> Call<Any>
@POST("MachineWorkers/add")//REVISADA
fun machineWorkerAdd(
@Query("plate") plate: Any
):
Call<Any>
@POST("SaleTrackings/updateTracking")//REVISADA @POST("SaleTrackings/updateTracking")//REVISADA
fun saleTrackingUpdate( fun saleTrackingUpdate(
@Body params: Any @Body params: Any

View File

@ -433,7 +433,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(
saveWorkForm( saveWorkForm(
WorkForms( WorkForms(
"TestHome", "TestHome",
"http://192.168.1.142:9000", "http://192.168.1.132:9000",
urlSalix = "https://test-salix.verdnatura.es" urlSalix = "https://test-salix.verdnatura.es"
) )
) )
@ -447,8 +447,8 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(
saveWorkForm( saveWorkForm(
WorkForms( WorkForms(
"TestLOCALHOME", "TestLOCALHOME",
"http://192.168.1.142:9000", "http://192.168.1.132:9000",
urlSalix = "http://192.168.1.142:3000" urlSalix = "http://192.168.1.132:3000"
) )
) )
} else { } else {

View File

@ -391,7 +391,7 @@ abstract class BaseFragmentSalix<T : ViewDataBinding, V : BaseViewModel, W : Bas
saveWorkForm( saveWorkForm(
WorkForms( WorkForms(
"TestHome", "TestHome",
"http://192.168.1.142:9000", "http://192.168.1.132:9000",
urlSalix = "https://test-salix.verdnatura.es" urlSalix = "https://test-salix.verdnatura.es"
) )
) )
@ -405,8 +405,8 @@ abstract class BaseFragmentSalix<T : ViewDataBinding, V : BaseViewModel, W : Bas
saveWorkForm( saveWorkForm(
WorkForms( WorkForms(
"TestLOCALHOME", "TestLOCALHOME",
"http://192.168.1.142:9000", "http://192.168.1.132:9000",
urlSalix = "http://192.168.1.142:3000" urlSalix = "http://192.168.1.132:3000"
) )
) )
} else { } else {

View File

@ -1,6 +1,5 @@
package es.verdnatura.presentation.view.feature.buffer.fragment package es.verdnatura.presentation.view.feature.buffer.fragment
import android.view.View
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import es.verdnatura.R import es.verdnatura.R
@ -11,17 +10,14 @@ import es.verdnatura.presentation.base.BaseFragment
class BufferFragment( class BufferFragment(
var entryPoint: String = "" var entryPoint: String = ""
) : BaseFragment<FragmentBufferBinding, BufferFragmentViewModel>(BufferFragmentViewModel::class) { ) : BaseFragment<FragmentBufferBinding, BufferFragmentViewModel>(BufferFragmentViewModel::class) {
override fun getLayoutId(): Int = R.layout.fragment_buffer override fun getLayoutId(): Int = R.layout.fragment_buffer
companion object { companion object {
fun newInstance(entryPoint: String) = BufferFragment(entryPoint) fun newInstance(entryPoint: String) = BufferFragment(entryPoint)
} }
override fun init() { override fun init() {
binding.splashProgress.visibility = View.GONE
setToolbar() setToolbar()
setEvents() setEvents()
super.init() super.init()
@ -41,23 +37,29 @@ class BufferFragment(
binding.scanInput.setOnEditorActionListener { _, actionId, _ -> binding.scanInput.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) { if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!binding.scanInput.text.isNullOrEmpty()) { 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"
getString(R.string.titleBufferOff) -> entryPoint = "DISABLED"
getString(R.string.titleBufferStrapping) -> entryPoint = "STRAPPING"
}
when (entryPoint) { viewModel.bufferSetTypeByName(
binding.scanInput.toInt(),
entryPoint
getString(R.string.titleBufferEmpty) -> entryPoint = "UNLOADING" )
getString(R.string.titleBufferFill) -> entryPoint = "LOADING" } catch (ex: Exception) {
getString(R.string.titleBufferAccumulate) -> entryPoint = "ACCUMULATION" ma.messageWithSound(
getString(R.string.titleBufferOff) -> entryPoint = "DISABLED" getString(R.string.itemNotValid),
getString(R.string.titleBufferStrapping) -> entryPoint = "STRAPPING" isToasted = true,
isError = true,
isPlayed = true
)
} }
viewModel.buffer_setTypeByName(
binding.scanInput.toInt(),
entryPoint
)
} }
binding.scanInput.setText("") binding.scanInput.setText("")
ma.hideKeyboard(binding.scanInput) ma.hideKeyboard(binding.scanInput)
@ -71,31 +73,11 @@ class BufferFragment(
with(viewModel) { with(viewModel) {
itembuffertype.observe(viewLifecycleOwner, Observer { itembuffertype.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = View.GONE binding.mainToolbar.backButton.performClick()
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()
}
}) })
} }
} }
} }

View File

@ -8,8 +8,6 @@ import es.verdnatura.R
import es.verdnatura.domain.SalixCallback import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.formatWithQuotes import es.verdnatura.domain.formatWithQuotes
import es.verdnatura.presentation.base.BaseViewModel import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemVO import es.verdnatura.presentation.common.ResponseItemVO
import retrofit2.Response import retrofit2.Response
@ -25,7 +23,7 @@ class BufferFragmentViewModel(val context: Context) : BaseViewModel(context) {
val bufferloadresponse: LiveData<ResponseItemVO> val bufferloadresponse: LiveData<ResponseItemVO>
get() = _bufferloadresponse get() = _bufferloadresponse
fun buffer_setTypeByName(vBufferFk: Int, vType: String) { fun bufferSetTypeByName(vBufferFk: Int, vType: String) {
salix.buffer_setTypeByName(params = listOf(vBufferFk, vType).formatWithQuotes()) salix.buffer_setTypeByName(params = listOf(vBufferFk, vType).formatWithQuotes())
.enqueue(object : SalixCallback<List<JsonObject>>(context) { .enqueue(object : SalixCallback<List<JsonObject>>(context) {
override fun onSuccess(response: Response<List<JsonObject>>) { override fun onSuccess(response: Response<List<JsonObject>>) {
@ -37,14 +35,9 @@ class BufferFragmentViewModel(val context: Context) : BaseViewModel(context) {
} else { } else {
"" ""
} }
)
}
override fun onError(t: Throwable) {
_itembuffertype.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
) )
super.onSuccess(response)
} }
}) })

View File

@ -5,7 +5,6 @@ import android.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.util.TypedValue import android.util.TypedValue
import android.view.View.GONE import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import android.widget.ImageView import android.widget.ImageView
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
@ -51,11 +50,7 @@ class ControlVehiculoFragment(
customDialogInput = CustomDialogInput(requireContext()) customDialogInput = CustomDialogInput(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext()) customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
goBack = false goBack = false
if (tagName == HistoricoVehiculoFragment.TAG) {
binding.splashProgress.visibility = GONE
if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
setToolBar("HISTORY") setToolBar("HISTORY")
showScanner(getString(R.string.scanShelvingHistorical), "HISTORY") showScanner(getString(R.string.scanShelvingHistorical), "HISTORY")
} else { } else {
@ -69,7 +64,6 @@ class ControlVehiculoFragment(
super.init() super.init()
} }
override fun onPause() { override fun onPause() {
goBack = true goBack = true
super.onPause() super.onPause()
@ -103,6 +97,7 @@ class ControlVehiculoFragment(
listIcons.add(iconVehicleOut) listIcons.add(iconVehicleOut)
listIcons.add(iconHistory) listIcons.add(iconHistory)
} }
"IN" -> { "IN" -> {
listIcons.remove(iconVehicleOut) listIcons.remove(iconVehicleOut)
listIcons.add(iconVehicleIn) listIcons.add(iconVehicleIn)
@ -117,13 +112,12 @@ class ControlVehiculoFragment(
when (item) { when (item) {
iconHistory.drawable -> showScanner( iconHistory.drawable -> showScanner(
getString(R.string.scanShelvingHistorical), getString(R.string.scanShelvingHistorical), "HISTORY"
"HISTORY"
) )
iconVehicleIn.drawable -> showScanner(getString(R.string.scanPlate), "IN") iconVehicleIn.drawable -> showScanner(getString(R.string.scanPlate), "IN")
iconVehicleOut.drawable -> showScanner( iconVehicleOut.drawable -> showScanner(
getString(R.string.scanPlateTakeoff), getString(R.string.scanPlateTakeoff), "OUT"
"OUT"
) )
} }
} }
@ -167,7 +161,6 @@ class ControlVehiculoFragment(
private fun checkControlTimeVehicle() { private fun checkControlTimeVehicle() {
if (!goBack) { if (!goBack) {
binding.splashProgress.visibility = VISIBLE
viewModel.workerMachineryIsRegistered(mobileApplication.userId!!) viewModel.workerMachineryIsRegistered(mobileApplication.userId!!)
} }
} }
@ -177,11 +170,9 @@ class ControlVehiculoFragment(
if (direction.equals("HISTORY")) { if (direction.equals("HISTORY")) {
ma.onPasillerosItemClickListener( ma.onPasillerosItemClickListener(
PasillerosItemVO(title = getString(R.string.titleHistoricalHide)), PasillerosItemVO(title = getString(R.string.titleHistoricalHide)), plateNumber
plateNumber
) )
} else if (direction.equals("IN")) { } else if (direction.equals("IN")) {
binding.splashProgress.visibility = VISIBLE
viewModel.machineWorker_add(plateNumber) viewModel.machineWorker_add(plateNumber)
} else if (direction.equals("OUT")) { } else if (direction.equals("OUT")) {
@ -198,9 +189,7 @@ class ControlVehiculoFragment(
} }
private fun scanRequest() { private fun scanRequest() {
// if (binding.scanInput != null) {
binding.scanInput.requestFocus() binding.scanInput.requestFocus()
//}
hideKeyboards() hideKeyboards()
} }
@ -211,12 +200,10 @@ class ControlVehiculoFragment(
} }
} }
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
ma.openFragmentPickers(true) ma.openFragmentPickers(true)
//requireActivity().onBackPressed()
} }
@ -250,7 +237,6 @@ class ControlVehiculoFragment(
if (customDialogThreeButtons.getValue().trim().isEmpty()) { if (customDialogThreeButtons.getValue().trim().isEmpty()) {
getString(R.string.returnScan).toast(requireContext()) getString(R.string.returnScan).toast(requireContext())
} else { } else {
binding.splashProgress.visibility = VISIBLE
customDialogThreeButtons.dismiss() customDialogThreeButtons.dismiss()
insertControlTimeVehicle(customDialogThreeButtons.getValue(), "IN") insertControlTimeVehicle(customDialogThreeButtons.getValue(), "IN")
} }
@ -261,7 +247,6 @@ class ControlVehiculoFragment(
if (customDialogThreeButtons.getValue().trim().isEmpty()) { if (customDialogThreeButtons.getValue().trim().isEmpty()) {
getString(R.string.returnScan).toast(requireContext()) getString(R.string.returnScan).toast(requireContext())
} else { } else {
binding.splashProgress.visibility = VISIBLE
customDialogThreeButtons.dismiss() customDialogThreeButtons.dismiss()
insertControlTimeVehicle(customDialogThreeButtons.getValue(), "OUT") insertControlTimeVehicle(customDialogThreeButtons.getValue(), "OUT")
} }
@ -307,7 +292,6 @@ class ControlVehiculoFragment(
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
binding.splashProgress.visibility = GONE
responseinsert.observe(viewLifecycleOwner) { responseinsert.observe(viewLifecycleOwner) {
if (it.isError) { if (it.isError) {
@ -325,60 +309,49 @@ class ControlVehiculoFragment(
} else { } else {
if (it.response == "true") { if (it.response == "true") {
ma.openFragmentPickers(false) ma.openFragmentPickers(false)
//ma.onPasillerosItemClickListener( PasillerosItemVO(title = "Sacadores"),"CONTROL")
//checkControlTimeVehicle()
} }
} }
} }
binding.splashProgress.visibility = GONE
} }
responsecontrol.observe(viewLifecycleOwner) { responsecontrol.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
if (it.isError) { if (it.response == "1") {
ma.messageWithSound(it.errorMessage, true, false) isWorkedTimed = "REGISTERED"
setToolBar("OUT")
if (!tagName.equals(SacadorFragment.TAG)) {
ma.openFragmentPickers(false)
}
} else { } else {
if (it.response == "1") {
isWorkedTimed = "REGISTERED"
setToolBar("OUT")
if (!tagName.equals(SacadorFragment.TAG)) { if (it.response == "0") {
ma.openFragmentPickers(false) setToolBar("IN")
}
} else { customDialogInput.setTitle(getString(R.string.vehiclecontrol))
.setDescription(getString(R.string.scanPlate))
if (it.response == "0") { .setOkButton(getString(R.string.takeVehicle)) {
setToolBar("IN") if (customDialogInput.getValue().isNotEmpty()) {
insertControlTimeVehicle(customDialogInput.getValue(), "IN")
customDialogInput.setTitle(getString(R.string.vehiclecontrol))
.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("")
scanRequest()
customDialogInput.dismiss()
hideKeyboards()
} }
customDialogInput.setValue("")
scanRequest()
customDialogInput.dismiss()
hideKeyboards()
}
.setKoButton(getString(R.string.noVehicle)) { .setKoButton(getString(R.string.noVehicle)) {
customDialogInput.dismiss() customDialogInput.dismiss()
ma.openFragmentPickers(true) ma.openFragmentPickers(true)
/* if (tagName.equals(HistoricoVehiculoFragment.TAG)) {
ma.onBackPressed()
}*/
}.setValue("").show() }.setValue("").show()
customDialogInput.setFocusText() customDialogInput.setFocusText()
}
} }
} }
} }
@ -387,7 +360,4 @@ class ControlVehiculoFragment(
} }
} }

View File

@ -11,13 +11,14 @@ import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.FragmentVehiclecontrolUserBinding import es.verdnatura.databinding.FragmentVehiclecontrolUserBinding
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.OnOptionsSelectedListener import es.verdnatura.presentation.common.OnOptionsSelectedListener
import es.verdnatura.presentation.common.ToolBarAdapterTooltip import es.verdnatura.presentation.common.ToolBarAdapterTooltip
import es.verdnatura.presentation.common.loadUrl import es.verdnatura.presentation.common.loadUrl
class ControlVehiculoUsuarioFragment( class ControlVehiculoUsuarioFragment(
var vUserFK: Int private var vUserFK: Int
) : BaseFragment<FragmentVehiclecontrolUserBinding, ControlVehiculoViewModel>( ) : BaseFragment<FragmentVehiclecontrolUserBinding, ControlVehiculoViewModel>(
ControlVehiculoViewModel::class ControlVehiculoViewModel::class
) { ) {
@ -34,7 +35,6 @@ class ControlVehiculoUsuarioFragment(
override fun init() { override fun init() {
binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclecontroluser) binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclecontroluser)
goBack = false goBack = false
binding.splashProgress.visibility = GONE
setEvents() setEvents()
setToolBar() setToolBar()
setControlVehicleUser() setControlVehicleUser()
@ -70,8 +70,6 @@ class ControlVehiculoUsuarioFragment(
} }
private fun getExtensionFromUser() { private fun getExtensionFromUser() {
binding.splashProgress.visibility = VISIBLE
viewModel.sip_getExtensionSalix(vUserFK) viewModel.sip_getExtensionSalix(vUserFK)
} }
@ -85,7 +83,6 @@ class ControlVehiculoUsuarioFragment(
userFk = mobileApplication.userId!! userFk = mobileApplication.userId!!
if (userFk == vUserFK) { if (userFk == vUserFK) {
binding.splashProgress.visibility = VISIBLE
viewModel.machineGetWorkerPlate(mobileApplication.userId!!) viewModel.machineGetWorkerPlate(mobileApplication.userId!!)
viewModel.deviceProduction_getnameDevice( viewModel.deviceProduction_getnameDevice(
getData(ANDROID_ID) getData(ANDROID_ID)
@ -125,11 +122,9 @@ class ControlVehiculoUsuarioFragment(
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
binding.splashProgress.visibility = GONE
responsemachine.observe(viewLifecycleOwner) {
responsemachine.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) { if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false) ma.messageWithSound(it.errorMessage, true, false)
@ -154,11 +149,9 @@ class ControlVehiculoUsuarioFragment(
} }
}) }
responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer { responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) { if (it.isError) {
ma.messageWithSound( ma.messageWithSound(
getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + vUserFK, getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + vUserFK,
@ -186,7 +179,7 @@ class ControlVehiculoUsuarioFragment(
startActivity(intent) startActivity(intent)
} catch (e: Exception) { } catch (e: Exception) {
getString(R.string.errorOperation).toast(requireContext())
} }
} }

View File

@ -20,9 +20,6 @@ import retrofit2.Response
class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) { class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) {
/* private val getVehicleControlTimeUserCase: GetVehicleControlTimeUserCase =
GetVehicleControlTimeUserCase(context)*/
private val _responseinsert by lazy { MutableLiveData<ResponseItemVO>() } private val _responseinsert by lazy { MutableLiveData<ResponseItemVO>() }
val responseinsert: LiveData<ResponseItemVO> val responseinsert: LiveData<ResponseItemVO>
get() = _responseinsert get() = _responseinsert
@ -40,12 +37,12 @@ class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) {
get() = _responseGetExtensionFromUserId get() = _responseGetExtensionFromUserId
fun machineWorker_add( fun machineWorker_add(
PlateNumber: String plateNumber: String
) { ) {
//tarea 6276 //tarea 6276
// salix.machineWorkerUpdateInTime() //salix.machineWorkerAdd(plateNumber)
silex.machineWorker_add(PlateNumber) silex.machineWorker_add(plateNumber)
.enqueue(object : SilexCallback<Any>(context) { .enqueue(object : SalixCallback<Any>(context) {
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
_responseinsert.value = ResponseItemVO( _responseinsert.value = ResponseItemVO(
isError = true, isError = true,
@ -85,7 +82,7 @@ class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) {
) { ) {
//Tarea 6276 //Tarea 6276
//salix.machineWorkerUpdateInTime(plate) //salix.machineWorkerUpdateInTime(plate)
silex.machineWorker_update(plate) silex.machineWorker_update(plate)
.enqueue(object : SilexCallback<Any>(context) { .enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
_responseinsert.value = ResponseItemVO( _responseinsert.value = ResponseItemVO(
@ -125,13 +122,6 @@ class ControlVehiculoViewModel(val context: Context) : BaseViewModel(context) {
_responsecontrol.value = _responsecontrol.value =
ResponseItemVO(isError = false, response = response.body()!!) ResponseItemVO(isError = false, response = response.body()!!)
} }
override fun onError(t: Throwable) {
_responsecontrol.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
}) })
} }

View File

@ -18,7 +18,6 @@ class InfoFragment(var title: String) :
super.init() super.init()
binding.mainToolbar.toolbarTitle.text = title binding.mainToolbar.toolbarTitle.text = title
ma.hideBottomNavigation(View.GONE) ma.hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.VISIBLE
viewModel.companyGetFiscaldata(mobileApplication.userId!!) viewModel.companyGetFiscaldata(mobileApplication.userId!!)
viewModel.getInfoFreelance(mobileApplication.userId!!) viewModel.getInfoFreelance(mobileApplication.userId!!)
setEvents() setEvents()
@ -34,7 +33,6 @@ class InfoFragment(var title: String) :
with(viewModel) { with(viewModel) {
companyInfoList.observe(viewLifecycleOwner) { companyInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) { if (it.list.isNotEmpty()) {
binding.itemName.text = it.list[0]?.name binding.itemName.text = it.list[0]?.name
binding.itemNif.text = it.list[0]?.nif binding.itemNif.text = it.list[0]?.nif
@ -43,7 +41,6 @@ class InfoFragment(var title: String) :
} }
freelanceInfoList.observe(viewLifecycleOwner) { freelanceInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) { if (it.list.isNotEmpty()) {
binding.linearInfoFreelance.visibility=View.VISIBLE binding.linearInfoFreelance.visibility=View.VISIBLE
binding.freelanceName.text = it.list[0]?.name binding.freelanceName.text = it.list[0]?.name

View File

@ -2,8 +2,6 @@ package es.verdnatura.presentation.view.feature.delivery.fragments
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.content.pm.PackageInfo
import android.content.pm.PackageManager
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.view.View import android.view.View
@ -37,10 +35,10 @@ import org.json.JSONObject
import java.util.Date import java.util.Date
class LoadUnloadFragment( class LoadUnloadFragment(
var title: String = "", private var title: String = "",
var state: String = "", private var state: String = "",
var entryPoint: String, private var entryPoint: String,
var clientTicketList: ArrayList<ClientTicket>? private var clientTicketList: ArrayList<ClientTicket>?
) : BaseFragment<FragmentExpeditionLoadunloadDeliveryBinding, DeliveryViewModel>( ) : BaseFragment<FragmentExpeditionLoadunloadDeliveryBinding, DeliveryViewModel>(
DeliveryViewModel::class DeliveryViewModel::class
@ -62,13 +60,11 @@ class LoadUnloadFragment(
state: String, state: String,
entryPoint: String, entryPoint: String,
clientTicketList: ArrayList<ClientTicket>? = null clientTicketList: ArrayList<ClientTicket>? = null
) = ) = LoadUnloadFragment(title, state, entryPoint, clientTicketList)
LoadUnloadFragment(title, state, entryPoint, clientTicketList)
fun scanning(scan: Boolean) { fun scanning(scan: Boolean) {
scanned = scan scanned = scan
} }
} }
override fun getLayoutId(): Int = R.layout.fragment_expedition_loadunload_delivery override fun getLayoutId(): Int = R.layout.fragment_expedition_loadunload_delivery
@ -126,7 +122,6 @@ class LoadUnloadFragment(
} }
) )
binding.mainToolbar.toolbarIcons.adapter = binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener { ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
@ -141,11 +136,9 @@ class LoadUnloadFragment(
iconSign.drawable -> { iconSign.drawable -> {
setExpeditionsState(myList, state) setExpeditionsState(myList, state)
//openSignActivity()
} }
} }
} catch (ex: Exception) { } catch (ex: Exception) {
//Tarea 5313
getString(R.string.errorNotData).toast(requireContext()) getString(R.string.errorNotData).toast(requireContext())
} }
@ -184,7 +177,6 @@ class LoadUnloadFragment(
var expeditionBack = hashMapOf("expeditions" to mlist as List<ExpeditionSalix>) var expeditionBack = hashMapOf("expeditions" to mlist as List<ExpeditionSalix>)
if (list.filter { it.code == state }.isNotEmpty()) { if (list.filter { it.code == state }.isNotEmpty()) {
if (list.filter { it.code == state }.size == list.size) { if (list.filter { it.code == state }.size == list.size) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.expeditionStateAddSalix(expeditionBack) viewModel.expeditionStateAddSalix(expeditionBack)
counterCalls = 1 counterCalls = 1
} else { } else {
@ -215,8 +207,7 @@ class LoadUnloadFragment(
val intent = Intent(requireContext(), SignedActivity::class.java) val intent = Intent(requireContext(), SignedActivity::class.java)
intent.putExtra( intent.putExtra(
"clientTicketList", "clientTicketList", clientTicketList!!.first()
clientTicketList!!.first()
) )
intent.putExtra("objectSigned", "ticket") //cmr intent.putExtra("objectSigned", "ticket") //cmr
@ -224,27 +215,6 @@ class LoadUnloadFragment(
requireActivity().onBackPressed() 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() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed() requireActivity().onBackPressed()
@ -312,14 +282,12 @@ class LoadUnloadFragment(
if (binding.mainToolbar.switchButton.isChecked) { if (binding.mainToolbar.switchButton.isChecked) {
counterCalls = 1 counterCalls = 1
binding.splashProgress.visibility = View.VISIBLE
val pendingExpeditionSend = myList.map { l -> val pendingExpeditionSend = myList.map { l ->
ExpeditionSalix( ExpeditionSalix(
expeditionFk = l.id, expeditionFk = l.id, stateCode = l.code
stateCode = l.code
) )
} }
viewModel.expeditionStateAddSalix( hashMapOf("expeditions" to pendingExpeditionSend.filter { it.stateCode == state })) viewModel.expeditionStateAddSalix(hashMapOf("expeditions" to pendingExpeditionSend.filter { it.stateCode == state }))
} else { } else {
updateCount(myList, state) updateCount(myList, state)
} }
@ -329,11 +297,9 @@ class LoadUnloadFragment(
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
expeditionInfoLoadUnloadList.observe(viewLifecycleOwner) { expeditionInfoLoadUnloadList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createList(it.list as MutableList<ExpeditionInfoLoadUnload>) createList(it.list as MutableList<ExpeditionInfoLoadUnload>)
} }
routeInfoList.observe(viewLifecycleOwner) { routeInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) { if (it.list.isNotEmpty()) {
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
binding.mainToolbar.switchButton.visibility = View.VISIBLE binding.mainToolbar.switchButton.visibility = View.VISIBLE
@ -344,7 +310,6 @@ class LoadUnloadFragment(
} }
} }
responseStateAdd.observe(viewLifecycleOwner) { responseStateAdd.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (!it.isError) { if (!it.isError) {
counterResponse = counterResponse + 1 counterResponse = counterResponse + 1
if (counterResponse == counterCalls) { if (counterResponse == counterCalls) {
@ -367,14 +332,12 @@ class LoadUnloadFragment(
} }
responseStateList.observe(viewLifecycleOwner) { responseStateList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
ma.messageWithSound(it.errorMessage, true, true, "", true) ma.messageWithSound(it.errorMessage, true, true, "", true)
savePendingExpeditions() savePendingExpeditions()
openSignActivity() openSignActivity()
} }
responseLoadList.observe(viewLifecycleOwner) { responseLoadList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createList(mutableListOf(), true) createList(mutableListOf(), true)
} }
} }
@ -414,9 +377,8 @@ class LoadUnloadFragment(
private fun setSwitchButon() { private fun setSwitchButon() {
binding.mainToolbar.switchButton.tooltipText = getString(R.string.expeditionMarkLost) binding.mainToolbar.switchButton.tooltipText = getString(R.string.expeditionMarkLost)
binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked -> binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked ->
binding.mainToolbar.switchButton.tooltipText = if (isChecked) binding.mainToolbar.switchButton.tooltipText =
getString(R.string.expeditionMarkFound) else if (isChecked) getString(R.string.expeditionMarkFound) else getString(R.string.expeditionMarkLost)
getString(R.string.expeditionMarkLost)
binding.mainToolbar.toolbarTitle.text = if (isChecked) { binding.mainToolbar.toolbarTitle.text = if (isChecked) {
@ -436,13 +398,9 @@ class LoadUnloadFragment(
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
if (getSaved) { if (getSaved) {
myList = myList = db.expedicionDao().getAllPending(route)
db.expedicionDao()
.getAllPending(route)
if (myList.isEmpty()) { if (myList.isEmpty()) {
myList = myList = db.expedicionDao().getAll(route)
db.expedicionDao()
.getAll(route)
} }
} else { } else {
@ -463,12 +421,9 @@ class LoadUnloadFragment(
binding.expeditionloadunloadRecyclerview.adapter = adapter binding.expeditionloadunloadRecyclerview.adapter = adapter
binding.expeditionloadunloadRecyclerview.layoutManager = binding.expeditionloadunloadRecyclerview.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
binding.mainToolbar.toolbarSubtitle.text = binding.mainToolbar.toolbarSubtitle.text = getString(
getString( R.string.summaryCount, myList.filter { it.code == state }.size, myList.size
R.string.summaryCount, )
myList.filter { it.code == state }.size,
myList.size
)
setListPosition(myList) setListPosition(myList)
} }
@ -489,8 +444,7 @@ class LoadUnloadFragment(
private fun getExpeditionTable(myRoute: Int) { private fun getExpeditionTable(myRoute: Int) {
lifecycleScope.launch { lifecycleScope.launch {
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
myList = myList = db.expedicionDao().getAll(myRoute)
db.expedicionDao().getAll(myRoute) as MutableList<ExpeditionInfoLoadUnload>
} }
} }
@ -507,8 +461,7 @@ class LoadUnloadFragment(
private fun updateCount(list: MutableList<ExpeditionInfoLoadUnload>, state: String) { private fun updateCount(list: MutableList<ExpeditionInfoLoadUnload>, state: String) {
val countMarked = val countMarked = list.filter { it.code == state }.size
list.filter { it.code == state }.size
binding.mainToolbar.toolbarSubtitle.text = binding.mainToolbar.toolbarSubtitle.text =
getString(R.string.summaryCount, countMarked, list.size) getString(R.string.summaryCount, countMarked, list.size)

View File

@ -1,8 +1,5 @@
package es.verdnatura.presentation.view.feature.delivery.fragments 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.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.view.View import android.view.View
@ -54,8 +51,7 @@ class LogExpeditionFragment(
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
private fun setToolBar() { private fun setToolBar() {
binding.mainToolbar.switchButton.tooltipText = binding.mainToolbar.switchButton.tooltipText = getString(R.string.expeditionMarkFound)
getString(R.string.expeditionMarkFound)
val listIcons: ArrayList<ImageView> = ArrayList() val listIcons: ArrayList<ImageView> = ArrayList()
val iconDelivery = ImageView(context) val iconDelivery = ImageView(context)
@ -74,8 +70,7 @@ class LogExpeditionFragment(
when (item) { when (item) {
iconDelivery.drawable -> { iconDelivery.drawable -> {
ma.openSummaryFragment( ma.openSummaryFragment(
binding.route.text.toString().toInt(), binding.route.text.toString().toInt(), "ON_DELIVERY"
"ON_DELIVERY"
) )
} }
} }
@ -87,28 +82,6 @@ class LogExpeditionFragment(
binding.mainToolbar.toolbarIcons.visibility = View.GONE 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() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed() requireActivity().onBackPressed()
@ -118,7 +91,6 @@ class LogExpeditionFragment(
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) { if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
if (!binding.scanInput.text.isNullOrEmpty()) { if (!binding.scanInput.text.isNullOrEmpty()) {
binding.splashProgress.visibility = View.VISIBLE
try { try {
viewModel.expeditionGetLog(binding.scanInput.toInt()) viewModel.expeditionGetLog(binding.scanInput.toInt())
originalItem = binding.scanInput.toInt() originalItem = binding.scanInput.toInt()
@ -139,13 +111,13 @@ class LogExpeditionFragment(
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
expeditionInfoList.observe(viewLifecycleOwner) { expeditionInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createList(it.list) createList(it.list)
setSwitchButon() setSwitchButon()
viewModel.get_routesFromExpedition(originalItem) viewModel.get_routesFromExpedition(originalItem)
} }
routeInfoList.observe(viewLifecycleOwner) { routeInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) { if (it.list.isNotEmpty()) {
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
binding.mainToolbar.switchButton.visibility = View.VISIBLE binding.mainToolbar.switchButton.visibility = View.VISIBLE
@ -158,7 +130,6 @@ class LogExpeditionFragment(
} }
} }
responseStateAdd.observe(viewLifecycleOwner) { responseStateAdd.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
viewModel.expeditionGetLog(originalItem) viewModel.expeditionGetLog(originalItem)
} }
} }
@ -168,11 +139,8 @@ class LogExpeditionFragment(
private fun setSwitchButon() { private fun setSwitchButon() {
binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked -> binding.mainToolbar.switchButton.setOnCheckedChangeListener { buttonView, isChecked ->
binding.mainToolbar.switchButton.tooltipText = if (isChecked) binding.mainToolbar.switchButton.tooltipText =
getString(R.string.expeditionMarkLost) else if (isChecked) getString(R.string.expeditionMarkLost) else getString(R.string.expeditionMarkFound)
getString(R.string.expeditionMarkFound)
binding.splashProgress.visibility = View.VISIBLE
if (isChecked) { if (isChecked) {
viewModel.expeditionStateAddSalix( viewModel.expeditionStateAddSalix(

View File

@ -1,8 +1,5 @@
package es.verdnatura.presentation.view.feature.delivery.fragments 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.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.text.Editable import android.text.Editable
@ -18,7 +15,6 @@ import es.verdnatura.databinding.FragmentRouteBinding
import es.verdnatura.db.DeliveryDatabase import es.verdnatura.db.DeliveryDatabase
import es.verdnatura.domain.notNull import es.verdnatura.domain.notNull
import es.verdnatura.domain.toDateString import es.verdnatura.domain.toDateString
import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseFragment import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.base.database import es.verdnatura.presentation.base.database
import es.verdnatura.presentation.common.* import es.verdnatura.presentation.common.*
@ -47,8 +43,7 @@ class RoutesFragment(
private lateinit var myListRouteLoaded: List<RouteLoaded> private lateinit var myListRouteLoaded: List<RouteLoaded>
companion object { companion object {
fun newInstance(title: String) = fun newInstance(title: String) = RoutesFragment(title)
RoutesFragment(title)
} }
override fun getLayoutId(): Int = R.layout.fragment_route override fun getLayoutId(): Int = R.layout.fragment_route
@ -60,7 +55,7 @@ class RoutesFragment(
setToolBar() setToolBar()
binding.scanInput.requestFocus() binding.scanInput.requestFocus()
pendingOperations() pendingOperations()
callBack(viewModel.getRoutes(mobileApplication.userId!!)) viewModel.getRoutes()
} }
@ -74,35 +69,33 @@ class RoutesFragment(
for (p in pending) { for (p in pending) {
viewModel.saveSign(p.fileName, p.queryMapList) viewModel.saveSign(p.fileName, p.queryMapList)
} }
val pendingExpedition = val pendingExpedition = db.expedicionDao().getAllPendingExpeditions()
db.expedicionDao().getAllPendingExpeditions()
val pendingExpeditionSend = pendingExpedition.map { l -> val pendingExpeditionSend = pendingExpedition.map { l ->
ExpeditionSalix( ExpeditionSalix(
expeditionFk = l.id, expeditionFk = l.id, stateCode = l.code
stateCode = l.code
) )
} }
if (pendingExpeditionSend.filter{ it.stateCode == "DELIVERED" }.isNotEmpty()) { if (pendingExpeditionSend.filter { it.stateCode == "DELIVERED" }.isNotEmpty()) {
viewModel.expeditionStateAddSalix( viewModel.expeditionStateAddSalix(
hashMapOf("expeditions" to pendingExpeditionSend.filter{ it.stateCode == "DELIVERED" }) 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( viewModel.expeditionStateAddSalix(
hashMapOf("expeditions" to pendingExpeditionSend.filter{ it.stateCode == "ON DELIVERY" }) hashMapOf("expeditions" to pendingExpeditionSend.filter { it.stateCode == "ON DELIVERY" })
) )
} }
if (pendingExpeditionSend.filter{ it.stateCode == "LOST" }.isNotEmpty()) { if (pendingExpeditionSend.filter { it.stateCode == "LOST" }.isNotEmpty()) {
viewModel.expeditionStateAddSalix( viewModel.expeditionStateAddSalix(
hashMapOf("expeditions" to pendingExpeditionSend.filter{ it.stateCode == "LOST" }) hashMapOf("expeditions" to pendingExpeditionSend.filter { it.stateCode == "LOST" })
) )
} }
if (pendingExpeditionSend.filter{ it.stateCode == "FOUND" }.isNotEmpty()) { if (pendingExpeditionSend.filter { it.stateCode == "FOUND" }.isNotEmpty()) {
viewModel.expeditionStateAddSalix( viewModel.expeditionStateAddSalix(
hashMapOf("expeditions" to pendingExpeditionSend.filter{ it.stateCode == "FOUND" }) hashMapOf("expeditions" to pendingExpeditionSend.filter { it.stateCode == "FOUND" })
) )
} }
@ -133,12 +126,6 @@ class RoutesFragment(
} }
} }
private fun callBack(callBackEndPoint: Unit) {
binding.splashProgress.visibility = View.VISIBLE
return callBackEndPoint
}
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
private fun setToolBar() { private fun setToolBar() {
ma.hideBottomNavigation(View.GONE) ma.hideBottomNavigation(View.GONE)
@ -173,7 +160,7 @@ class RoutesFragment(
when (item) { when (item) {
iconRefresh.drawable -> { iconRefresh.drawable -> {
callBack(viewModel.getRoutes(mobileApplication.userId!!)) viewModel.getRoutes()
} }
iconInfo.drawable -> { iconInfo.drawable -> {
@ -198,42 +185,6 @@ class RoutesFragment(
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE 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() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed() requireActivity().onBackPressed()
@ -246,9 +197,7 @@ class RoutesFragment(
} }
override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
val searchText = s.toString().lowercase()
filteredList(s.toString().lowercase()) filteredList(s.toString().lowercase())
} }
override fun afterTextChanged(s: Editable?) { override fun afterTextChanged(s: Editable?) {
@ -271,14 +220,12 @@ class RoutesFragment(
with(viewModel) { with(viewModel) {
loadRouteList.observe(viewLifecycleOwner) { event -> loadRouteList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull { event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.GONE
createListRoutes(it.list) createListRoutes(it.list)
} }
} }
routeInfoList.observe(viewLifecycleOwner) { routeInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) { if (it.list.isNotEmpty()) {
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
binding.mainToolbar.switchButton.visibility = View.VISIBLE binding.mainToolbar.switchButton.visibility = View.VISIBLE
@ -301,7 +248,6 @@ class RoutesFragment(
} }
responseLoadList.observe(viewLifecycleOwner) { responseLoadList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
ma.messageWithSound(getString(R.string.offline), false, false, "", true) ma.messageWithSound(getString(R.string.offline), false, false, "", true)
createListRoutes(mutableListOf(), getSaved = true) createListRoutes(mutableListOf(), getSaved = true)
} }
@ -337,8 +283,7 @@ class RoutesFragment(
// myListRoute = list // myListRoute = list
adapter = RouteAdapter( adapter = RouteAdapter(
myListRoute, myListRoute, object : OnItemImageRouteRowClickListener {
object : OnItemImageRouteRowClickListener {
override fun onItemImageRouteRowClickListener(item: RouteInfo, action: String) { override fun onItemImageRouteRowClickListener(item: RouteInfo, action: String) {
when (action) { when (action) {

View File

@ -1,8 +1,5 @@
package es.verdnatura.presentation.view.feature.delivery.fragments 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.graphics.drawable.Drawable
import android.os.Build import android.os.Build
import android.view.View import android.view.View
@ -59,7 +56,7 @@ class SummaryFragment(
setEvents() setEvents()
setToolBar() setToolBar()
binding.scanInput.requestFocus() binding.scanInput.requestFocus()
callBack(viewModel.route_getExpeditionSummary(route)) callBack(viewModel.routeGetExpeditionSummary(route))
routeSelected = route routeSelected = route
setViews() setViews()
@ -76,7 +73,6 @@ class SummaryFragment(
} }
private fun callBack(routeGetexpeditionsummary: Unit) { private fun callBack(routeGetexpeditionsummary: Unit) {
binding.splashProgress.visibility = View.VISIBLE
routeGetexpeditionsummary routeGetexpeditionsummary
} }
@ -188,9 +184,6 @@ class SummaryFragment(
android.app.AlertDialog.BUTTON_POSITIVE, getString(R.string.save) android.app.AlertDialog.BUTTON_POSITIVE, getString(R.string.save)
) { dialog, which -> ) { dialog, which ->
binding.splashProgress.visibility = View.VISIBLE
counterCalls = 1 counterCalls = 1
viewModel.expeditionStateAddSalix(hashMapOf("expeditions" to listExpedition.filter { it.stateCode == state })) 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() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed() requireActivity().onBackPressed()
@ -294,17 +265,14 @@ class SummaryFragment(
with(viewModel) { with(viewModel) {
expeditionInfoLoadUnloadList.observe(viewLifecycleOwner) { expeditionInfoLoadUnloadList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createList(it.list as MutableList<ExpeditionInfoLoadUnload>) createList(it.list as MutableList<ExpeditionInfoLoadUnload>)
} }
expeditionInfoSummary.observe(viewLifecycleOwner) { expeditionInfoSummary.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
createListSummary(it.list) createListSummary(it.list)
} }
routeInfoList.observe(viewLifecycleOwner) { routeInfoList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) { if (it.list.isNotEmpty()) {
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
binding.mainToolbar.switchButton.visibility = View.VISIBLE binding.mainToolbar.switchButton.visibility = View.VISIBLE
@ -315,11 +283,10 @@ class SummaryFragment(
} }
} }
responseStateAdd.observe(viewLifecycleOwner) { responseStateAdd.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (!it.isError) { if (!it.isError) {
counterResponse = counterResponse + 1 counterResponse = counterResponse + 1
if (counterResponse == counterCalls) { if (counterResponse == counterCalls) {
callBack(viewModel.route_getExpeditionSummary(routeSelected)) callBack(viewModel.routeGetExpeditionSummary(routeSelected))
counterResponse = 0 counterResponse = 0
counterCalls = 0 counterCalls = 0
checkNextAddress() checkNextAddress()

View File

@ -5,7 +5,6 @@ import android.app.Activity
import android.app.AlertDialog import android.app.AlertDialog
import android.app.TimePickerDialog import android.app.TimePickerDialog
import android.content.Intent import android.content.Intent
import android.content.pm.PackageInfo
import android.content.pm.PackageManager import android.content.pm.PackageManager
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.net.Uri import android.net.Uri
@ -42,10 +41,8 @@ import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext import kotlinx.coroutines.withContext
import java.util.Calendar import java.util.Calendar
class TicketsFragment( class TicketsFragment(
var title: String = "", var title: String = "", var route: RouteInfo
var route: RouteInfo
) : BaseFragment<FragmentTicketsBinding, DeliveryViewModel>( ) : BaseFragment<FragmentTicketsBinding, DeliveryViewModel>(
DeliveryViewModel::class DeliveryViewModel::class
) { ) {
@ -75,28 +72,21 @@ class TicketsFragment(
setEvents() setEvents()
setToolBar() setToolBar()
binding.mainToolbar.toolbarTitle.text = route.name binding.mainToolbar.toolbarTitle.text = route.name
callBack(viewModel.getTickets(route.id)) viewModel.getTickets(route.id)
db = database(requireContext().applicationContext) db = database(requireContext().applicationContext)
} }
private fun setTitle() { private fun setTitle() {
binding.mainToolbar.toolbarSubtitle.text = binding.mainToolbar.toolbarSubtitle.text = if (::myListClientTicket.isInitialized) {
if (::myListClientTicket.isInitialized) { myListClientTicket.filter { it.signed == 1 }.size.toString() + "/" + myListClientTicket.size
myListClientTicket.filter { it.signed == 1 }.size.toString() + "/" + myListClientTicket.size } else {
} else { "0/0"
"0/0" }
}
customDialogList = CustomDialogList(requireContext()) customDialogList = CustomDialogList(requireContext())
} }
private fun callBack(callBackEndPoint: Unit) {
binding.splashProgress.visibility = View.VISIBLE
return callBackEndPoint
}
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
private fun setToolBar() { private fun setToolBar() {
ma.hideBottomNavigation(View.GONE) ma.hideBottomNavigation(View.GONE)
@ -105,14 +95,12 @@ class TicketsFragment(
binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE binding.mainToolbar.toolbarSubtitle.visibility = View.VISIBLE
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
val listIcons: ArrayList<ImageView> = ArrayList() val listIcons: ArrayList<ImageView> = ArrayList()
val iconSettings = ImageView(context) val iconSettings = ImageView(context)
val iconSort = ImageView(context) val iconSort = ImageView(context)
val iconSigned = ImageView(context) val iconSigned = ImageView(context)
val iconSend = ImageView(context) val iconSend = ImageView(context)
iconSettings.setImageResource(R.drawable.ic_setting_ui) iconSettings.setImageResource(R.drawable.ic_setting_ui)
iconSort.setImageResource(R.drawable.ic_sort) iconSort.setImageResource(R.drawable.ic_sort)
iconSigned.setImageResource(R.drawable.ic_sign_ticket) iconSigned.setImageResource(R.drawable.ic_sign_ticket)
@ -130,7 +118,6 @@ class TicketsFragment(
listIcons.add(iconSettings) listIcons.add(iconSettings)
listIcons.add(iconSort) listIcons.add(iconSort)
changeColorIcon(iconSigned.drawable, showSigned) changeColorIcon(iconSigned.drawable, showSigned)
changeColorIcon(iconSettings.drawable, showSigned) changeColorIcon(iconSettings.drawable, showSigned)
@ -153,8 +140,7 @@ class TicketsFragment(
ma.onPasillerosItemClickListener( ma.onPasillerosItemClickListener(
PasillerosItemVO( PasillerosItemVO(
title = getString(R.string.titleWebViewer), title = getString(R.string.titleWebViewer),
), ), entryPoint = Gson().toJson(
entryPoint = Gson().toJson(
mutableMapOf( mutableMapOf(
"entryPoint" to route.id, "entryPoint" to route.id,
"web" to "${getData("base_urlSalix")}#!/route/${route.id}/tickets" "web" to "${getData("base_urlSalix")}#!/route/${route.id}/tickets"
@ -168,12 +154,11 @@ class TicketsFragment(
showSigned = !showSigned showSigned = !showSigned
if (::myListClientTicket.isInitialized) { if (::myListClientTicket.isInitialized) {
adapter!!.updateList( adapter!!.updateList(if (showSigned) {
if (showSigned) { myListClientTicket.filter { it.signed == 1 } as MutableList<ClientTicketSalix>
myListClientTicket.filter { it.signed == 1 } as MutableList<ClientTicketSalix> } else {
} else { myListClientTicket.filter { it.signed == 0 } as MutableList<ClientTicketSalix>
myListClientTicket.filter { it.signed == 0 } as MutableList<ClientTicketSalix> })
})
} }
changeColorIcon(iconSigned.drawable, showSigned) changeColorIcon(iconSigned.drawable, showSigned)
@ -184,7 +169,7 @@ class TicketsFragment(
if (myListClientTicket.isEmpty() || route.email.isNullOrEmpty()) { if (myListClientTicket.isEmpty() || route.email.isNullOrEmpty()) {
getString(R.string.routeNotTickets).toast(requireContext()) getString(R.string.routeNotTickets).toast(requireContext())
} else { } else {
callBack(viewModel.driverRouteEmail(route.id, route.email!!)) viewModel.driverRouteEmail(route.id, route.email!!)
} }
} }
@ -215,50 +200,12 @@ class TicketsFragment(
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (isBack) { if (isBack) {
callBack(viewModel.getTickets(route.id)) viewModel.getTickets(route.id)
isBack = false 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() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
if (!binding.itemcardLayout.isVisible) { if (!binding.itemcardLayout.isVisible) {
@ -279,7 +226,6 @@ class TicketsFragment(
binding.hourEnd.setText(getHourDay(route.finished)) binding.hourEnd.setText(getHourDay(route.finished))
binding.saveButton.setOnClickListener { binding.saveButton.setOnClickListener {
binding.splashProgress.visibility = View.VISIBLE
route.kmStart = binding.kmStart.text.toString().toLong() route.kmStart = binding.kmStart.text.toString().toLong()
route.kmEnd = binding.kmEnd.text.toString().toLong() route.kmEnd = binding.kmEnd.text.toString().toLong()
route.started = addDateToTime(binding.hourInit.text.toString()) route.started = addDateToTime(binding.hourInit.text.toString())
@ -302,43 +248,33 @@ class TicketsFragment(
with(viewModel) { with(viewModel) {
loadRouteList.observe(viewLifecycleOwner) { event -> loadRouteList.observe(viewLifecycleOwner) { event ->
event.getContentIfNotHandled().notNull { event.getContentIfNotHandled().notNull {
binding.splashProgress.visibility = View.GONE // createListRoutes(it.list)
// createListRoutes(it.list)
} }
} }
clientTicketList.observe(viewLifecycleOwner) { clientTicketList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.list.isNotEmpty()) { if (it.list.isNotEmpty()) {
println("llegan los tickets")
createLisTickets(it.list) createLisTickets(it.list)
}else{
println("tickets vacios")
} }
} }
responseStateAdd.observe(viewLifecycleOwner) { responseStateAdd.observe(viewLifecycleOwner) {}
binding.splashProgress.visibility = View.GONE
}
response.observe(viewLifecycleOwner) { response.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE if (!it.isError) {
if (!it.isError){ ma.messageWithSound(it.response, false, false, "", true)
ma.messageWithSound(it.response,false,false,"",true)
} }
} }
responseUpdateRoute.observe(viewLifecycleOwner) { responseUpdateRoute.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE showSigned = !showSigned
if (it.isError) { changeVisibleSettings(false)
ma.messageWithSound(it.errorMessage, true, true, "", true) setToolBar()
} else {
showSigned = !showSigned
changeVisibleSettings(false)
setToolBar()
ma.messageWithSound("", false, true, "", false)
}
} }
responseLoadList.observe(viewLifecycleOwner) { responseLoadList.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE println("tickets responseLoadList")
ma.messageWithSound(getString(R.string.offline), true, false, "", true) ma.messageWithSound(getString(R.string.offline), true, false, "", true)
createLisTickets(mutableListOf(), getSaved = true) createLisTickets(mutableListOf(), getSaved = true)
} }
@ -346,7 +282,6 @@ class TicketsFragment(
} }
private fun changeVisibleSettings(isVisible: Boolean) { private fun changeVisibleSettings(isVisible: Boolean) {
if (isVisible) { if (isVisible) {
binding.itemcardLayout.visibility = View.GONE binding.itemcardLayout.visibility = View.GONE
binding.ticketsRecyclerview.visibility = View.GONE binding.ticketsRecyclerview.visibility = View.GONE
@ -366,9 +301,8 @@ class TicketsFragment(
lifecycleScope.launch { lifecycleScope.launch {
withContext(Dispatchers.IO) { withContext(Dispatchers.IO) {
if (getSaved) { if (getSaved) {
myListClientTicketAux = db.clienTicketDao().getAll() myListClientTicketAux =
.filter { route.id == it.route } db.clienTicketDao().getAll().filter { route.id == it.route }.toMutableList()
.toMutableList()
} else { } else {
myListClientTicketAux = myListClientTicketAux =
list.distinctBy { it.addressFk } as MutableList<ClientTicketSalix> list.distinctBy { it.addressFk } as MutableList<ClientTicketSalix>
@ -403,27 +337,25 @@ class TicketsFragment(
} else { } else {
myListClientTicket.filter { it.signed == 0 } myListClientTicket.filter { it.signed == 0 }
} }
adapter = TicketAdapter( adapter = TicketAdapter(myListFiltered as MutableList<ClientTicketSalix>,
myListFiltered as MutableList<ClientTicketSalix>,
object : OnItemButtonTicketRowClickListener { object : OnItemButtonTicketRowClickListener {
override fun onItemButtonTicketRowClickListener( override fun onItemButtonTicketRowClickListener(
item: ClientTicketSalix, item: ClientTicketSalix, action: String
action: String
) { ) {
when (action) { when (action) {
"unload" -> { "unload" -> {
val entryPoint = Gson().toJson( val entryPoint = Gson().toJson(
mutableMapOf( mutableMapOf(
"route" to route.id.toString(), "route" to route.id.toString(), "address" to item.addressFk
"address" to item.addressFk
) )
) )
ma.onPasillerosItemClickListener( ma.onPasillerosItemClickListener(PasillerosItemVO(
PasillerosItemVO(title = getString(R.string.titleUnLoadTruck)), title = getString(
entryPoint, myListClientTicket.filter { it.id == item.id } R.string.titleUnLoadTruck
) )
), entryPoint, myListClientTicket.filter { it.id == item.id })
} }
@ -447,7 +379,8 @@ class TicketsFragment(
} }
}, object : OnItemButtonCMRRowClickListener { },
object : OnItemButtonCMRRowClickListener {
override fun onItemButtonCMRRowClickListener( override fun onItemButtonCMRRowClickListener(
item: Ticket item: Ticket
) { ) {
@ -455,8 +388,7 @@ class TicketsFragment(
ma.onPasillerosItemClickListener( ma.onPasillerosItemClickListener(
PasillerosItemVO( PasillerosItemVO(
title = getString(R.string.titleWebViewer), title = getString(R.string.titleWebViewer),
), ), entryPoint = Gson().toJson(
entryPoint = Gson().toJson(
mutableMapOf( mutableMapOf(
"entryPoint" to route.id, "entryPoint" to route.id,
"web" to "${getData("base_urlSalix")}/api/Routes/${item.cmrFk}/cmr?access_token=${ "web" to "${getData("base_urlSalix")}/api/Routes/${item.cmrFk}/cmr?access_token=${
@ -468,8 +400,7 @@ class TicketsFragment(
) )
) )
} }
} })
)
binding.ticketsRecyclerview.addItemDecoration( binding.ticketsRecyclerview.addItemDecoration(
ItemDescorationCustomized( ItemDescorationCustomized(
@ -514,14 +445,12 @@ class TicketsFragment(
customDialogInput.getRecyclerView().layoutManager = customDialogInput.getRecyclerView().layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
customDialogInput.setOkButton(getString(R.string.save)) { customDialogInput.setOkButton(getString(R.string.save)) {
binding.splashProgress.visibility = View.VISIBLE
viewModel.addNotes(itemClient.tickets, customDialogInput.getValue()) viewModel.addNotes(itemClient.tickets, customDialogInput.getValue())
customDialogInput.dismiss() customDialogInput.dismiss()
}.setKoButton(getString(R.string.cancel)) {
customDialogInput.cancel()
customDialogInput.dismiss()
} }
.setKoButton(getString(R.string.cancel)) {
customDialogInput.cancel()
customDialogInput.dismiss()
}
customDialogInput.show() customDialogInput.show()
} }
@ -538,7 +467,6 @@ class TicketsFragment(
} }
private fun setListPosition(list: MutableList<ExpeditionInfoLoadUnload>) { private fun setListPosition(list: MutableList<ExpeditionInfoLoadUnload>) {
for (i in list.indices) { for (i in list.indices) {
binding.ticketsRecyclerview.scrollToPosition(i) binding.ticketsRecyclerview.scrollToPosition(i)
@ -549,97 +477,73 @@ class TicketsFragment(
fun showPhones(clientClicked: ClientTicketSalix) { fun showPhones(clientClicked: ClientTicketSalix) {
val phones: MutableList<GeneralItem> = mutableListOf() val phones: MutableList<GeneralItem> = mutableListOf()
//Tarea 6275 //Tarea 6275
if (clientClicked.clientPhone!=null){ if (!clientClicked.clientPhone.isNullOrBlank()) {
phones.add( phones.add(
GeneralItem( GeneralItem(
text = "${getString(R.string.Cliente)}:${clientClicked.clientPhone}", text = "${getString(R.string.Cliente)}:${clientClicked.clientPhone}",
code =clientClicked.clientMobile.toString() code = clientClicked.clientMobile.toString()
)) )
)
} }
if (clientClicked.clientMobile!=null){ if (!clientClicked.clientMobile.isNullOrBlank()) {
phones.add( phones.add(
GeneralItem( GeneralItem(
text = "${getString(R.string.Cliente)}:${clientClicked.clientMobile}", text = "${getString(R.string.Cliente)}:${clientClicked.clientMobile}",
code =clientClicked.clientMobile.toString() code = clientClicked.clientMobile.toString()
)) )
)
} }
if (clientClicked.addressPhone!=null){ if (!clientClicked.addressPhone.isNullOrBlank()) {
phones.add( phones.add(
GeneralItem( GeneralItem(
text = "${getString(R.string.Cliente)}:${clientClicked.addressPhone}", text = "${getString(R.string.Cliente)}:${clientClicked.addressPhone}",
code =clientClicked.addressPhone.toString() code = clientClicked.addressPhone.toString()
))
}
if (!clientClicked.salePersonPhone.isNullOrEmpty())
phones.add(
GeneralItem(
text = "${getString(R.string.comercial)}:${clientClicked.salePersonPhone}",
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.isNullOrBlank()) phones.add(
GeneralItem(
text = "${getString(R.string.comercial)}:${clientClicked.salePersonPhone}",
code = clientClicked.salePersonPhone.toString()
)
)
if (!clientClicked.SalePersonPhone.isNullOrEmpty())
phones.add(
GeneralItem(
text = "${getString(R.string.comercial)}:${clientClicked.SalePersonPhone}",
code =
clientClicked.SalePersonPhone.toString()
)
)*/
customDialogList.setValueVisibility(View.GONE) customDialogList.setValueVisibility(View.GONE)
customDialogList.setTitle(getString(R.string.phones)) customDialogList.setTitle(getString(R.string.phones)).setKoButton(
.setKoButton( getString(
getString( R.string.cancel
R.string.cancel )
) ) {
) { customDialogList.dismiss()
customDialogList.dismiss() }.hideDialog().show()
}.hideDialog().show()
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
) == PackageManager.PERMISSION_GRANTED
) {
val listPhonesAdapter = val callIntent = Intent(Intent.ACTION_CALL)
GeneralAdapter(phones, object : OnGeneralItemRowClickListener { callIntent.data = Uri.parse("tel:${it.code}")
override fun OnGeneralItemRowClickListener(item: GeneralItem) { startActivity(callIntent)
phones.forEach {
if (it.code == item.code) {
if (ContextCompat.checkSelfPermission(
requireContext(),
Manifest.permission.CALL_PHONE
) == PackageManager.PERMISSION_GRANTED
) {
val callIntent = Intent(Intent.ACTION_CALL)
callIntent.data = Uri.parse("tel:${it.code}")
startActivity(callIntent)
}
} else {
ActivityCompat.requestPermissions(
context as Activity,
arrayOf(Manifest.permission.CALL_PHONE),
REQUEST_CALL_PERMISSION
)
} }
customDialogList.dismiss() } else {
ActivityCompat.requestPermissions(
context as Activity,
arrayOf(Manifest.permission.CALL_PHONE),
REQUEST_CALL_PERMISSION
)
} }
customDialogList.dismiss()
} }
}
})
})
customDialogList.getRecyclerView().adapter = listPhonesAdapter customDialogList.getRecyclerView().adapter = listPhonesAdapter
customDialogList.getRecyclerView().layoutManager = customDialogList.getRecyclerView().layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
@ -647,57 +551,14 @@ class TicketsFragment(
fun goMaps(item: ClientTicketSalix) { fun goMaps(item: ClientTicketSalix) {
if (isGoogleMapsInstalled()) { val uri: String = if (item.latitude != null) {
"geo:${item.latitude},${item.longitude}?q=" + item.nickname + " " + item.street + " " + item.city + " " + item.postalCode
val uri: String
if (item.latitude != null) {
uri = "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
}
val locationIntent = Intent(Intent.ACTION_VIEW, Uri.parse(uri))
startActivity(locationIntent)
} else { } else {
val builder = AlertDialog.Builder(requireContext()) "geo:0,0?q=" + item.nickname + " " + item.street + " " + item.city + " " + item.postalCode
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()
} }
val locationIntent = Intent(Intent.ACTION_VIEW, Uri.parse(uri))
} startActivity(locationIntent)
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
}*/
} }
@ -706,7 +567,6 @@ class TicketsFragment(
val mcurrentTime = Calendar.getInstance() val mcurrentTime = Calendar.getInstance()
val hour = mcurrentTime[Calendar.HOUR_OF_DAY] val hour = mcurrentTime[Calendar.HOUR_OF_DAY]
val minute = mcurrentTime[Calendar.MINUTE] val minute = mcurrentTime[Calendar.MINUTE]
val mTimePicker = TimePickerDialog( val mTimePicker = TimePickerDialog(
requireContext(), requireContext(),
{ _, selectedHour, selectedMinute -> textV.text = "$selectedHour:$selectedMinute" }, { _, selectedHour, selectedMinute -> textV.text = "$selectedHour:$selectedMinute" },
@ -719,10 +579,3 @@ class TicketsFragment(
} }
} }
data class PhonesTicket(
var label: String,
var phone: String
)

View File

@ -51,10 +51,10 @@ data class ClientTicketSalix(
var warehouseName: String?, var warehouseName: String?,
var salePersonPhone: String?, var salePersonPhone: String?,
var ticketObservation: String?, var ticketObservation: String?,
var clientPhone: Int?, var clientPhone: String?,
var clientMobile: Int?, var clientMobile: String?,
var addressPhone: Int?, var addressPhone: String?,
var addressMobile: Int?, var addressMobile: String?,
var signed: Int, var signed: Int,
var latitude: Double?, var latitude: Double?,
var longitude: Double?, var longitude: Double?,
@ -84,4 +84,3 @@ data class SignedTickets(
@PrimaryKey @PrimaryKey
val fileName: String val fileName: String
) )

View File

@ -4,7 +4,6 @@ import android.content.Context
import androidx.lifecycle.LiveData import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Transformations import androidx.lifecycle.Transformations
import es.verdnatura.R
import es.verdnatura.domain.SalixCallback import es.verdnatura.domain.SalixCallback
import es.verdnatura.domain.SilexCallback import es.verdnatura.domain.SilexCallback
import es.verdnatura.domain.formatWithQuotes import es.verdnatura.domain.formatWithQuotes
@ -95,10 +94,6 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
_companyInfoList.value = response.body()?.let { FreeLanceDeliveryInfoList(it) } _companyInfoList.value = response.body()?.let { FreeLanceDeliveryInfoList(it) }
} }
override fun onError(t: Throwable) {
_companyInfoList.value = FreeLanceDeliveryInfoList()
super.onError(t)
}
}) })
} }
@ -107,24 +102,12 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
) { ) {
salix.getExpeditionStates( salix.getExpeditionStates(
"""{"where": {"expeditionFk": $expedition},"include": [{"relation": "expeditionStateType","scope": {"fields": ["id","description"]}}],"fields": {"id": true,"created": true,"typeFk": true}}""" """{"where": {"expeditionFk": $expedition},"include": [{"relation": "expeditionStateType","scope": {"fields": ["id","description"]}}],"fields": {"id": true,"created": true,"typeFk": true}}"""
) ).enqueue(object : SalixCallback<List<ExpeditionInfoLog>>(context) {
// silex.expedition_getLog(expedition) override fun onSuccess(response: Response<List<ExpeditionInfoLog>>) {
.enqueue(object : SalixCallback<List<ExpeditionInfoLog>>(context) { _expeditionInfoList.value = response.body()?.let { ExpeditionInfoList(it) }
}
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)
}
})
} }
fun getExpeditionFromRoute( fun getExpeditionFromRoute(
@ -237,20 +220,20 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
fun expeditionStateAddSalix(expeditions: Any) { fun expeditionStateAddSalix(expeditions: Any) {
salix.addExpeditionState(expeditions).enqueue(object : SalixCallback<Unit>(context) { salix.addExpeditionState(expeditions).enqueue(object : SalixCallback<Unit>(context) {
override fun onSuccess(response: Response<Unit>) { override fun onSuccess(response: Response<Unit>) {
_responseStateAdd.value = ResponseItemVO("", false, "", 0) _responseStateAdd.value = ResponseItemVO("", false, "", 0)
} }
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
super.onError(t) super.onError(t)
_responseStateAdd.value = ResponseItemVO() _responseStateAdd.value = ResponseItemVO()
} }
override fun onFailure(call: Call<Unit>, t: Throwable) { override fun onFailure(call: Call<Unit>, t: Throwable) {
_responseStateAdd.value = ResponseItemVO("", true, t.message.toString(), 0) _responseStateAdd.value = ResponseItemVO("", true, t.message.toString(), 0)
} }
}) })
} }
fun getInfoFreelance( fun getInfoFreelance(
@ -259,27 +242,20 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
salix.freelanceGetInfo(arrayListOf(userId)) salix.freelanceGetInfo(arrayListOf(userId))
.enqueue(object : SalixCallback<List<DeliveryInfo>>(context) { .enqueue(object : SalixCallback<List<DeliveryInfo>>(context) {
override fun onSuccess(response: Response<List<DeliveryInfo>>) { override fun onSuccess(response: Response<List<DeliveryInfo>>) {
if (response.body() != null) {
_freelanceInfoList.value = _freelanceInfoList.value =
response.body()?.let { FreeLanceDeliveryInfoList(it) } 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 route: Int
) { ) {
//Tarea 6275 //Tarea 6275
salix.routeGetExpeditionSummary(route) salix.routeGetExpeditionSummary(route)
// silex.route_getExpeditionSummary(route)
.enqueue(object : SalixCallback<List<ExpeditionInfoSummary>>(context) { .enqueue(object : SalixCallback<List<ExpeditionInfoSummary>>(context) {
override fun onSuccess(response: Response<List<ExpeditionInfoSummary>>) { override fun onSuccess(response: Response<List<ExpeditionInfoSummary>>) {
@ -301,42 +277,45 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
} }
fun getRoutes( 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) {
override fun onSuccess(response: Response<MutableList<RouteInfo>>) { salix.getRoutes().enqueue(object : SalixCallback<MutableList<RouteInfo>>(context) {
if (response.body() != null) { override fun onSuccess(response: Response<MutableList<RouteInfo>>) {
_routeList.value = response.body()?.let { RouteList(it) } println()
} else { _routeList.value = response.body()?.let { RouteList(it) }
_routeList.value = RouteList() }
}
}
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
//_routeList.value = RouteList() //_routeList.value = RouteList()
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0) _responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
//super.onError(t) //super.onError(t)
} }
})
override fun onFailure(call: Call<MutableList<RouteInfo>>, t: Throwable) {
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
}
})
} }
fun getTickets( fun getTickets(
routeId: Long routeId: Long
) { ) {
salix.getTickets("""{"id":$routeId,"order":["priority","id"]}""") salix.getTickets("""{"id":$routeId,"order":["priority","id"],"limit":1}""")
.enqueue(object : SalixCallback<MutableList<ClientTicketSalix>>(context) { .enqueue(object : SalixCallback<MutableList<ClientTicketSalix>>(context) {
override fun onSuccess(response: Response<MutableList<ClientTicketSalix>>) { 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) } _clientTicketList.value = response.body()?.let { ClientTicketList(it) }
} }
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0) println("ticketsss fallando")
println("tickets fallando ${t.message}")
_responseLoadList.value = ResponseItemVO("", true, t.message.toString(), 0)
} }
}) })
@ -346,55 +325,26 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
routeId: Long, email: String routeId: Long, email: String
) { ) {
salix.driverRouteEmail(id = routeId, hashMapOf("recipient" to email)) salix.driverRouteEmail(id = routeId, hashMapOf("recipient" to email))
.enqueue(object : SilexCallback<Any>(context) { .enqueue(object : SalixCallback<Any>(context) {})
override fun onSuccess(response: Response<Any>) {
_response.value = ResponseItemVO(context.getString(R.string.sendRouteOk))
}
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( fun routeUpdate(
route: RouteInfo 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>) { override fun onSuccess(response: Response<Any>) {
_responseUpdateRoute.value = ResponseItemVO() _responseUpdateRoute.value = ResponseItemVO()
super.onSuccess(response)
} }
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
_responseUpdateRoute.value = ResponseItemVO() _responseUpdateRoute.value = ResponseItemVO()
super.onError(t) super.onError(t)
} }
}) })
} }
fun addNotes( fun addNotes(
@ -403,22 +353,7 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
) { ) {
salix.addNote( salix.addNote(
arrayListOf(listTickets[0].Id, note).formatWithQuotes() arrayListOf(listTickets[0].Id, note).formatWithQuotes()
)/* silex.addNotes( ).enqueue(object : SalixCallback<Any>(context) {})
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)
}
})
} }
fun imageUpload( fun imageUpload(
@ -442,26 +377,25 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
) )
salix.saveSign(filePart, mapQuery).enqueue(object : SalixCallback<Any>(context) { salix.saveSign(filePart, mapQuery).enqueue(object : SalixCallback<Any>(context) {
override fun onSuccess(response: Response<Any>) { override fun onSuccess(response: Response<Any>) {
_responseSign.value = ResponseItemVO(filePath, false, "", 0) _responseSign.value = ResponseItemVO(filePath, false, "", 0)
} }
//Otro fallo //Otro fallo
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
_responseSign.value = ResponseItemVO( _responseSign.value = ResponseItemVO(
"", true, "Tickets:" + File(filePath).name + "" + t.message.toString(), 0 "", true, "Tickets:" + File(filePath).name + "" + t.message.toString(), 0
) )
// super.onError(t) // super.onError(t)
} }
//Fallo de red //Fallo de red
override fun onFailure(call: Call<Any>, t: Throwable) { override fun onFailure(call: Call<Any>, t: Throwable) {
_responseSign.value = _responseSign.value = ResponseItemVO("NetWork Error", true, t.message.toString(), 0)
ResponseItemVO("NetWork Error", true, t.message.toString(), 0) }
}
}) })
} }
} }

View File

@ -29,7 +29,6 @@ class CmrExpeditionPalletFragment(
customDialogList = CustomDialogInputTwoValues(requireContext()) customDialogList = CustomDialogInputTwoValues(requireContext())
ma.hideBottomNavigation(View.GONE) ma.hideBottomNavigation(View.GONE)
binding.splashProgress.visibility = View.GONE
setEvents() setEvents()
setToolBar() setToolBar()
showExpeditionPalletScan() showExpeditionPalletScan()
@ -43,10 +42,8 @@ class CmrExpeditionPalletFragment(
private fun cmrExpeditionPallet_add(vExpeditionPallet: Int?, vCmrId: Int?) { private fun cmrExpeditionPallet_add(vExpeditionPallet: Int?, vCmrId: Int?) {
customDialogList.dismiss() customDialogList.dismiss()
binding.splashProgress.visibility = View.VISIBLE
viewModel.cmrExpeditionPalletAdd( viewModel.cmrExpeditionPalletAdd(
vExpeditionPallet!!, vExpeditionPallet!!, vCmrId!!
vCmrId!!
) )
} }
@ -63,29 +60,9 @@ class CmrExpeditionPalletFragment(
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
binding.splashProgress.visibility = View.GONE
responsescan.observe(viewLifecycleOwner) { responsescan.observe(viewLifecycleOwner) {
showExpeditionPalletScan()
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() customDialogList.setFocusText()
ma.hideKeyboard(customDialogList.getEditText()) ma.hideKeyboard(customDialogList.getEditText())
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ -> 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()) { if (customDialogList.getValue().isNotEmpty()) {
dataScanned = itemScan(customDialogList.getValue()) dataScanned = itemScan(customDialogList.getValue())
@ -134,7 +111,7 @@ class CmrExpeditionPalletFragment(
} }
customDialogList.getEditTextTwo().setOnEditorActionListener { _, actionId, _ -> 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() if (customDialogList.getValueTwo().isNotEmpty() && customDialogList.getValue()
.isNotEmpty() .isNotEmpty()
@ -149,7 +126,6 @@ class CmrExpeditionPalletFragment(
} else { } else {
if (dataScanned != null) { if (dataScanned != null) {
if (dataScanned!!.table == dataScannedTwo!!.table) { if (dataScanned!!.table == dataScannedTwo!!.table) {
ma.messageWithSound( ma.messageWithSound(
getString(R.string.errorSameType), getString(R.string.errorSameType),
@ -166,8 +142,7 @@ class CmrExpeditionPalletFragment(
dataScanned!!.id dataScanned!!.id
} else { } else {
dataScannedTwo!!.id dataScannedTwo!!.id
}, }, if (dataScannedTwo!!.table == "cmr") {
if (dataScannedTwo!!.table == "cmr") {
dataScannedTwo!!.id dataScannedTwo!!.id
} else { } else {
dataScanned!!.id dataScanned!!.id
@ -176,8 +151,7 @@ class CmrExpeditionPalletFragment(
} }
} else { } else {
cmrExpeditionPallet_add( cmrExpeditionPallet_add(
customDialogList.getValue().toInt(), customDialogList.getValue().toInt(), dataScannedTwo!!.id
dataScannedTwo!!.id
) )
} }
@ -203,9 +177,8 @@ private fun itemScan(value: String): ItemScanned? {
null null
} }
} catch (Ex: Exception) { } catch (ex: Exception) {
return null return null
} }
} }

View File

@ -22,6 +22,7 @@ class CmrExpeditionPalletViewModel(val context: Context) : BaseViewModel(context
override fun onSuccess(response: Response<Unit>) { override fun onSuccess(response: Response<Unit>) {
_responsescan.value = _responsescan.value =
ResponseItemVO(isError = false, response = response.message()!!) ResponseItemVO(isError = false, response = response.message()!!)
super.onSuccess(response)
} }
override fun onError(t: Throwable) { override fun onError(t: Throwable) {
@ -29,6 +30,7 @@ class CmrExpeditionPalletViewModel(val context: Context) : BaseViewModel(context
isError = true, isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
) )
super.onError(t)
} }
}) })
} }

View File

@ -1,7 +1,6 @@
package es.verdnatura.presentation.view.feature.paletizador.fragment package es.verdnatura.presentation.view.feature.paletizador.fragment
import android.view.View.GONE import android.view.View.GONE
import android.view.View.VISIBLE
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R import es.verdnatura.R
@ -12,7 +11,6 @@ import es.verdnatura.presentation.common.GeneralItem
import es.verdnatura.presentation.common.OnGeneralItemRowClickListener import es.verdnatura.presentation.common.OnGeneralItemRowClickListener
import es.verdnatura.presentation.view.component.CustomDialogList import es.verdnatura.presentation.view.component.CustomDialogList
class ExpeditionScanSorterFragment( class ExpeditionScanSorterFragment(
var title: String = "" var title: String = ""
) : BaseFragment<FragmentExpeditionscanSorterBinding, ExpeditionScanSorterViewModel>( ) : BaseFragment<FragmentExpeditionscanSorterBinding, ExpeditionScanSorterViewModel>(
@ -33,8 +31,6 @@ class ExpeditionScanSorterFragment(
customDialogList = CustomDialogList(requireContext()) customDialogList = CustomDialogList(requireContext())
ma.hideBottomNavigation(GONE) ma.hideBottomNavigation(GONE)
binding.splashProgress.visibility = GONE
setEvents() setEvents()
setToolBar() setToolBar()
showExpeditionScan() showExpeditionScan()
@ -45,43 +41,24 @@ class ExpeditionScanSorterFragment(
binding.mainToolbar.toolbarTitle.text = title binding.mainToolbar.toolbarTitle.text = title
} }
private fun expeditionscan(expeditionScan: String) {
binding.splashProgress.visibility = VISIBLE
viewModel.expeditionScan(expeditionScan)
itemScaned = expeditionScan
}
private fun setEvents() { private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener { binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed() requireActivity().onBackPressed()
} }
} }
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
binding.splashProgress.visibility = GONE responsescan.observe(viewLifecycleOwner) {
responsescan.observe(viewLifecycleOwner, { listExpeditionScan.add(GeneralItem(itemScaned, itemScaned))
customDialogList.setDescription(getString(R.string.total) + ":" + listExpeditionScan.size)
expeditionScanAdapter!!.notifyItemInserted(listExpeditionScan.size - 1)
customDialogList.setValue("")
if (it.isError) { }
ma.messageWithSound(it.errorMessage,true,false)
} else {
listExpeditionScan.add(GeneralItem(itemScaned, itemScaned))
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)) customDialogList.setTitle(getString(R.string.expeditionNoSorter))
.setOkButton(getString(R.string.end)) { .setOkButton(getString(R.string.end)) {
ma.hideKeyboard(customDialogList.getEditText()) ma.hideKeyboard(customDialogList.getEditText())
customDialogList.dismiss() customDialogList.dismiss()
binding.mainToolbar.backButton.performClick() binding.mainToolbar.backButton.performClick()
}.setValue("").show() }.setValue("").show()
customDialogList.getEditText().requestFocus() customDialogList.getEditText().requestFocus()
ma.hideKeyboard(customDialogList.getEditText()) ma.hideKeyboard(customDialogList.getEditText())
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ -> 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()) { if (customDialogList.getValue().isNotEmpty()) {
expeditionscan(customDialogList.getValue()) viewModel.expeditionScan(customDialogList.getValue())
itemScaned = customDialogList.getValue()
} }
customDialogList.setValue("") customDialogList.setValue("")
ma.hideKeyboard(customDialogList.getEditText()) ma.hideKeyboard(customDialogList.getEditText())

View File

@ -5,8 +5,6 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData import androidx.lifecycle.MutableLiveData
import es.verdnatura.domain.SalixCallback import es.verdnatura.domain.SalixCallback
import es.verdnatura.presentation.base.BaseViewModel import es.verdnatura.presentation.base.BaseViewModel
import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemVO import es.verdnatura.presentation.common.ResponseItemVO
import retrofit2.Response import retrofit2.Response
@ -20,26 +18,10 @@ class ExpeditionScanSorterViewModel(val context: Context) : BaseViewModel(contex
salix.expeditionScan(params = arrayListOf(vExpeditionId)) salix.expeditionScan(params = arrayListOf(vExpeditionId))
.enqueue(object : SalixCallback<Unit>(context) { .enqueue(object : SalixCallback<Unit>(context) {
override fun onSuccess(response: Response<Unit>) { 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()!!)
}
} _responsescan.value =
ResponseItemVO(isError = false, response = response.message()!!)
override fun onError(t: Throwable) { super.onSuccess(response)
_responsescan.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
} }
}) })

View File

@ -2,7 +2,6 @@ package es.verdnatura.presentation.view.feature.paletizador.fragment
import android.view.View import android.view.View
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import androidx.core.view.isVisible
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.FragmentGeneralBlackBinding import es.verdnatura.databinding.FragmentGeneralBlackBinding
import es.verdnatura.domain.toast import es.verdnatura.domain.toast
@ -22,7 +21,6 @@ class PalletScanFragment(
private var itemScaned: Int = 0 private var itemScaned: Int = 0
private var isShowed = false private var isShowed = false
companion object { companion object {
fun newInstance(title: String, action: String) = PalletScanFragment(title, action) fun newInstance(title: String, action: String) = PalletScanFragment(title, action)
} }
@ -48,57 +46,37 @@ class PalletScanFragment(
requireActivity().onBackPressed() requireActivity().onBackPressed()
} }
customDialogList.setOnDismissListener { customDialogList.setOnDismissListener {
if (!binding.splashProgress.isVisible) customDialogList.dismiss()
requireActivity().onBackPressed()
} }
} }
override fun observeViewModel() { override fun observeViewModel() {
with(viewModel) { with(viewModel) {
binding.splashProgress.visibility = View.GONE
responseScan.observe(viewLifecycleOwner) { responseScan.observe(viewLifecycleOwner) {
if (it.isError) { if (it.isError) {
ma.messageWithSound( ma.messageWithSound(
it.errorMessage, it.errorMessage, true, true, isToasted = true
true,
true,
isToasted = true
) )
showPalletScan() showPalletScan()
} else { } else {
binding.splashProgress.visibility = View.GONE
ma.messageWithSound(getString(R.string.palletScanned) + itemScaned, false, true) ma.messageWithSound(getString(R.string.palletScanned) + itemScaned, false, true)
showPalletScan() showPalletScan()
} }
} }
responsePalletGet.observe(viewLifecycleOwner) { responsePalletGet.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = View.GONE
if (it.isError) {
ma.messageWithSound( ma.messageWithSound(getString(R.string.palletScanned) + itemScaned, false, true)
it.errorMessage, ma.onComprobarPalletFromPalletScan(
true, it, ItemPalletVO(Pallet = itemScaned)
true, )
isToasted = true customDialogList.dismiss()
)
showPalletScan()
} else {
binding.splashProgress.visibility = View.GONE
ma.messageWithSound(getString(R.string.palletScanned) + itemScaned, false, true)
ma.onComprobarPalletFromPalletScan(
it,
ItemPalletVO(Pallet = itemScaned.toInt())
)
}
} }
} }
@ -116,8 +94,8 @@ class PalletScanFragment(
customDialogList.setOkButton(getString(R.string.end)) { customDialogList.setOkButton(getString(R.string.end)) {
ma.hideKeyboard(customDialogList.getEditText())
customDialogList.dismiss() customDialogList.dismiss()
ma.onBackPressed()
}.setValue("").show() }.setValue("").show()
@ -125,14 +103,11 @@ class PalletScanFragment(
ma.hideKeyboard(customDialogList.getEditText()) ma.hideKeyboard(customDialogList.getEditText())
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ -> 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() if (customDialogList.getValue().isNotEmpty()) {
) {
try { try {
itemScaned = itemScanValue( itemScaned = itemScanValue(
customDialogList.getValue(), customDialogList.getValue(), "expeditionPallet", "id"
"expeditionPallet",
"id"
).toString().toInt() ).toString().toInt()
} catch (ex: Exception) { } catch (ex: Exception) {
@ -142,18 +117,16 @@ class PalletScanFragment(
ma.hideKeyboard(customDialogList.getEditText()) ma.hideKeyboard(customDialogList.getEditText())
when (action) { when (action) {
"receive" -> viewModel.expeditionState_addByPallet( "receive" -> viewModel.expeditionStateAddByPallet(
itemScaned, itemScaned, "STORED"
"STORED"
) )
"get" -> viewModel.expeditionPallet_get( "get" -> viewModel.expeditionPalletGet(
itemScaned itemScaned
) )
} }
customDialogList.dismiss()
binding.splashProgress.visibility = View.VISIBLE
customDialogList.setValue("") customDialogList.setValue("")
} }
return@setOnEditorActionListener true return@setOnEditorActionListener true

View File

@ -13,10 +13,8 @@ import es.verdnatura.presentation.common.ResponseItemVO
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
import retrofit2.Response import retrofit2.Response
class PalletScanViewModel(val context: Context) : BaseViewModel(context) { class PalletScanViewModel(val context: Context) : BaseViewModel(context) {
private val _responseScan by lazy { MutableLiveData<ResponseItemVO>() } private val _responseScan by lazy { MutableLiveData<ResponseItemVO>() }
val responseScan: LiveData<ResponseItemVO> val responseScan: LiveData<ResponseItemVO>
get() = _responseScan get() = _responseScan
@ -25,14 +23,15 @@ class PalletScanViewModel(val context: Context) : BaseViewModel(context) {
val responsePalletGet: LiveData<ItemExpeditionTruckVO> val responsePalletGet: LiveData<ItemExpeditionTruckVO>
get() = _responsePalletGet get() = _responsePalletGet
fun expeditionStateAddByPallet(
fun expeditionState_addByPallet(
vPalletId: Int, vPalletId: Int,
vStatePallet: String vStatePallet: String
) { ) {
salix.expeditionStateAddByPallet(arrayListOf( salix.expeditionStateAddByPallet(
vPalletId, arrayListOf(
vStatePallet).formatWithQuotes() vPalletId,
vStatePallet
).formatWithQuotes()
) )
.enqueue(object : SilexCallback<Unit>(context) { .enqueue(object : SilexCallback<Unit>(context) {
override fun onError(t: Throwable) { 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 //Tarea 6276
//salix.expeditionPalletGetPallet(vPalletId) //salix.expeditionPalletGetPallet(vPalletId)
silex.expeditionPallet_get(vPalletId) silex.expeditionPallet_get(vPalletId)
.enqueue(object : SalixCallback<ItemExpeditionTruckVO>(context) { .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>) { override fun onSuccess(response: Response<ItemExpeditionTruckVO>) {
_responsePalletGet.value = _responsePalletGet.value =
response.body()!! response.body()!!

View File

@ -7,21 +7,17 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/verdnatura_black"> android:background="@color/verdnatura_black">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
<com.google.android.material.textfield.TextInputEditText style="@style/ScanLineTextSearch"
android:id="@+id/scan_input" android:layout_width="match_parent"
style="@style/ScanLineTextSearch" android:hint="@string/Escaneaetiqueta"
android:layout_width="match_parent" android:inputType="text"
android:hint="@string/Escaneaetiqueta" android:lines="1"
android:inputType="text" android:maxLines="1"
android:lines="1" app:layout_constraintEnd_toEndOf="parent"
android:maxLines="1" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/>
<include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
@ -30,27 +26,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -2,41 +2,17 @@
<layout 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:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/verdnatura_black"> android:background="@color/verdnatura_black">
' <include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -14,8 +14,7 @@
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent">
>
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input" android:id="@+id/scan_input"
@ -27,98 +26,67 @@
android:maxLines="1" android:maxLines="1"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/> app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
<LinearLayout <LinearLayout
android:id="@+id/lineMenu" android:id="@+id/lineMenu"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min" android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1" android:layout_marginBottom="@dimen/layout_margin_1"
android:orientation="horizontal"
android:paddingLeft="@dimen/layout_margin_1" android:paddingLeft="@dimen/layout_margin_1"
android:paddingRight="@dimen/layout_margin_1" android:paddingRight="@dimen/layout_margin_1"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/scan_input"> app:layout_constraintTop_toBottomOf="@+id/scan_input">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/expedition" android:layout_weight="1"
android:textSize="@dimen/body1" android:gravity="start"
android:textColor="@color/verdnatura_white"
android:paddingStart="@dimen/layout_margin_min" android:paddingStart="@dimen/layout_margin_min"
android:layout_weight="1" android:text="@string/expedition"
android:gravity="start" /> android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" />
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:text="@string/titlePackagingCount" android:text="@string/titlePackagingCount"
android:textSize="@dimen/body1"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:layout_weight="1" android:textSize="@dimen/body1" />
android:gravity="start"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/consignatario"
android:textSize="@dimen/body1"
android:textColor="@color/verdnatura_white"
android:layout_weight="1" android:layout_weight="1"
android:gravity="end"/> android:gravity="end"
android:text="@string/consignatario"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" />
</LinearLayout> </LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/expeditionloadunload_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/item_expedition_loadunload_row" />
<androidx.recyclerview.widget.RecyclerView </LinearLayout>
android:id="@+id/expeditionloadunload_recyclerview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/item_expedition_loadunload_row" />
</LinearLayout> <include
<include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -19,108 +19,109 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" > android:orientation="vertical">
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:hint="@string/titleExpeditionScan"
android:inputType="text"
android:lines="1"
android:maxLines="1" />
<com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:hint="@string/titleExpeditionScan"
android:inputType="text"
android:lines="1"
android:maxLines="1"
/>
<LinearLayout <LinearLayout
android:id="@+id/route_layout" android:id="@+id/route_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min" android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1" 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: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"> tools:visibility="visible">
<TextView <TextView
android:id="@+id/route" android:id="@+id/route"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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: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 <TextView
android:id="@+id/agency" android:id="@+id/agency"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/zone"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1.25" 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 <TextView
android:id="@+id/date" android:id="@+id/date"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/Fecha"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1.25" android:layout_weight="1.25"
android:gravity="right" android:gravity="right"
/> android:text="@string/Fecha"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body2" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="@dimen/layout_margin_min" android:layout_marginTop="@dimen/layout_margin_min"
android:layout_marginBottom="@dimen/layout_margin_1" android:layout_marginBottom="@dimen/layout_margin_1"
android:orientation="horizontal"
android:paddingLeft="@dimen/layout_margin_1" android:paddingLeft="@dimen/layout_margin_1"
android:paddingRight="@dimen/layout_margin_1"> android:paddingRight="@dimen/layout_margin_1">
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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: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 <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1.25"
android:gravity="left"
android:text="@string/Worker" android:text="@string/Worker"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:layout_weight="1.25" android:textSize="@dimen/body2" />
android:gravity="left"/>
<TextView <TextView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/state"
android:textSize="@dimen/body2"
android:textColor="@color/verdnatura_white"
android:layout_weight="1.25" 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>
<LinearLayout <LinearLayout
android:id="@+id/itemcard_layout" android:id="@+id/itemcard_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="10dp"
android:orientation="vertical" android:orientation="vertical"
android:padding="10dp"
tools:ignore="ExtraText"> tools:ignore="ExtraText">
<RelativeLayout <RelativeLayout
@ -128,7 +129,6 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"> android:descendantFocusability="blocksDescendants">
<!--android:id="@+id/itemexpeditionstate_recyclerview"-->
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/itemexpeditionlog_recyclerview" android:id="@+id/itemexpeditionlog_recyclerview"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -136,46 +136,18 @@
android:clipToPadding="false" android:clipToPadding="false"
android:visibility="visible" android:visibility="visible"
tools:listitem="@layout/item_expeditionlog_row" /> tools:listitem="@layout/item_expeditionlog_row" />
</RelativeLayout>> </RelativeLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
' <include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,147 +1,145 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
<com.google.android.material.textfield.TextInputEditText <LinearLayout
android:id="@+id/scan_input" android:id="@+id/txtDescriptions"
style="@style/ScanLineTextSearch" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:hint="@string/titleExpeditionScan" android:orientation="horizontal"
android:inputType="text" android:visibility="visible"
android:lines="1" app:layout_constraintEnd_toEndOf="parent"
android:maxLines="1" app:layout_constraintStart_toStartOf="parent"
android:enabled="false" app:layout_constraintTop_toBottomOf="@+id/scan_input">
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/>
/>
<LinearLayout <TextView
android:id="@+id/txtDescriptions" android:id="@+id/txtConsignatario"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Consign"
android:textColor="@color/verdnatura_white"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtRoute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/Ruta"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone" />
<TextView
android:id="@+id/txtBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/boxes"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtPacking"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/type"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtSc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/scanAbrev"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtLost"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lost"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtDelivered"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/deliveredMenu"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_white"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtDescriptions" />
<LinearLayout
android:id="@+id/itemcard_layout"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
android:padding="10dp"
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" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:descendantFocusability="blocksDescendants">
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/scan_input">
<TextView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/txtConsignatario" android:id="@+id/expeditionSummary_recyclerview"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Consign"
android:textColor="@color/verdnatura_white"
android:textSize="18sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtRoute"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="2"
android:text="@string/Ruta"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold"
android:visibility="gone" />
<TextView
android:id="@+id/txtBox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/boxes"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtPacking"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/type"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtSc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/scanAbrev"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtLost"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/lost"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
<TextView
android:id="@+id/txtDelivered"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/deliveredMenu"
android:textColor="@color/verdnatura_white"
android:textSize="14sp"
android:textStyle="bold" />
</LinearLayout>
<LinearLayout
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_white"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtDescriptions"/>
<LinearLayout
android:id="@+id/itemcard_layout"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="10dp"
android:orientation="vertical"
tools:ignore="ExtraText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/divider">
<RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"> android:clipToPadding="false"
android:visibility="visible"
<androidx.recyclerview.widget.RecyclerView tools:listitem="@layout/item_expedition_summary_row" />
android:id="@+id/expeditionSummary_recyclerview" </RelativeLayout>
android:layout_width="match_parent" </LinearLayout>
android:layout_height="wrap_content"
android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/item_expedition_summary_row" />
</RelativeLayout>
</LinearLayout>
<ScrollView <ScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
@ -161,33 +159,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/verdnatura_black"> android:background="@color/verdnatura_black">
' <include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -17,13 +17,13 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/scan" android:id="@+id/scan"
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="25dp" android:layout_marginStart="25dp"
android:layout_marginTop="50dp" android:layout_marginTop="50dp"
android:layout_marginEnd="25dp" android:layout_marginEnd="25dp"
android:textColorHint="@android:color/darker_gray" android:textColorHint="@android:color/darker_gray"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar"> app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
@ -35,8 +35,8 @@
android:layout_marginStart="50dp" android:layout_marginStart="50dp"
android:layout_marginTop="75dp" android:layout_marginTop="75dp"
android:layout_marginEnd="50dp" android:layout_marginEnd="50dp"
android:gravity="center_horizontal"
android:backgroundTint="@color/colorPrimary" android:backgroundTint="@color/colorPrimary"
android:gravity="center_horizontal"
android:hint="@string/ScanPlateOrSmarttag" android:hint="@string/ScanPlateOrSmarttag"
android:inputType="text" android:inputType="text"
android:lines="1" android:lines="1"
@ -48,13 +48,13 @@
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/scan_smarttag" android:id="@+id/scan_smarttag"
android:visibility="visible"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="25dp" android:layout_marginStart="25dp"
android:layout_marginTop="150dp" android:layout_marginTop="150dp"
android:layout_marginEnd="25dp" android:layout_marginEnd="25dp"
android:textColorHint="@android:color/darker_gray" android:textColorHint="@android:color/darker_gray"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar"> app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
@ -62,20 +62,19 @@
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/scan_input_smarttag" android:id="@+id/scan_input_smarttag"
style="@style/InputLineTextSearch" style="@style/InputLineTextSearch"
android:visibility="invisible"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginStart="50dp" android:layout_marginStart="50dp"
android:layout_marginTop="100dp" android:layout_marginTop="100dp"
android:layout_marginEnd="50dp" android:layout_marginEnd="50dp"
android:backgroundTint="@color/colorPrimary" android:backgroundTint="@color/colorPrimary"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:inputType="text" android:inputType="text"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" android:textColorHint="@android:color/darker_gray"
android:textDirection="firstStrong" /> android:textDirection="firstStrong"
android:visibility="invisible" />
<Button <Button
android:id="@+id/button_punch" android:id="@+id/button_punch"
@ -84,34 +83,12 @@
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="0dp" android:layout_marginTop="0dp"
android:background="@drawable/btn_orange" android:background="@drawable/btn_orange"
android:visibility="gone"
android:text="ESCANEAR CARROS" android:text="ESCANEAR CARROS"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:visibility="gone"
tools: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> </com.google.android.material.textfield.TextInputLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -15,30 +14,25 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/verdnatura_white" android:background="@color/verdnatura_white"
app:layout_constraintBottom_toBottomOf="@+id/main_toolbar"/> app:layout_constraintBottom_toBottomOf="@+id/main_toolbar" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayout" android:id="@+id/linearLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" 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_marginLeft="@dimen/pasilleros_margin_main_menu"
android:layout_marginRight="@dimen/pasilleros_margin_main_menu" android:layout_marginRight="@dimen/pasilleros_margin_main_menu"
android:orientation="vertical"
android:padding="@dimen/navigation_row_limit_padding" android:padding="@dimen/navigation_row_limit_padding"
> app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/divider">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal">
>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -54,12 +48,11 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center"
android:text="@string/company" android:text="@string/company"
android:textColor="@color/verdnatura_pumpkin_orange" android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
android:gravity="center" tools:text="@string/company" />
tools:text="@string/company"
/>
</LinearLayout> </LinearLayout>
@ -75,24 +68,25 @@
android:text="@string/nif" android:text="@string/nif"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
android:textStyle="bold" android:textStyle="bold" />
/>
<TextView <TextView
android:id="@+id/item_nif" android:id="@+id/item_nif"
android:layout_weight="1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/nif" android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:text="@string/nif"
android:textColor="@color/verdnatura_pumpkin_orange" android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
tools:text="@string/nif"/> tools:text="@string/nif" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -100,20 +94,19 @@
android:text="@string/adress" android:text="@string/adress"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
android:textStyle="bold" android:textStyle="bold" />
/>
<TextView <TextView
android:id="@+id/item_adress" android:id="@+id/item_adress"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/adress"
android:tooltipText="@string/copied"
android:gravity="center" android:gravity="center"
android:text="@string/adress"
android:textColor="@color/verdnatura_pumpkin_orange" android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
tools:text="@string/adress"/> android:tooltipText="@string/copied"
tools:text="@string/adress" />
</LinearLayout> </LinearLayout>
@ -123,31 +116,27 @@
android:id="@+id/dividertwo" android:id="@+id/dividertwo"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" 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_marginTop="@dimen/item_list_separation"
app:layout_constraintBottom_toBottomOf="@+id/linearLayout"/> android:layout_marginBottom="@dimen/item_list_separation"
android:background="@color/verdnatura_white"
app:layout_constraintBottom_toBottomOf="@+id/linearLayout" />
<LinearLayout <LinearLayout
android:id="@+id/linearInfoFreelance" android:id="@+id/linearInfoFreelance"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintTop_toBottomOf="@id/dividertwo"
android:layout_marginLeft="@dimen/pasilleros_margin_main_menu" android:layout_marginLeft="@dimen/pasilleros_margin_main_menu"
android:layout_marginRight="@dimen/pasilleros_margin_main_menu" android:layout_marginRight="@dimen/pasilleros_margin_main_menu"
android:orientation="vertical"
android:padding="@dimen/navigation_row_limit_padding" android:padding="@dimen/navigation_row_limit_padding"
android:visibility="gone" android:visibility="gone"
> app:layout_constraintTop_toBottomOf="@id/dividertwo">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal">
>
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -163,11 +152,10 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:gravity="center"
android:textColor="@color/verdnatura_pumpkin_orange" android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
android:gravity="center" tools:text="@string/freelance" />
tools:text="@string/freelance"
/>
</LinearLayout> </LinearLayout>
@ -183,23 +171,24 @@
android:text="@string/nif" android:text="@string/nif"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
android:textStyle="bold" android:textStyle="bold" />
/>
<TextView <TextView
android:id="@+id/freelance_nif" android:id="@+id/freelance_nif"
android:layout_weight="1"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center" android:gravity="center"
android:textColor="@color/verdnatura_pumpkin_orange" android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
tools:text="@string/nif"/> tools:text="@string/nif" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -207,8 +196,7 @@
android:text="@string/adress" android:text="@string/adress"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
android:textStyle="bold" android:textStyle="bold" />
/>
<TextView <TextView
android:id="@+id/freelance_address" android:id="@+id/freelance_address"
@ -218,35 +206,31 @@
android:gravity="center" android:gravity="center"
android:textColor="@color/verdnatura_pumpkin_orange" android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
tools:text="@string/adress"/> tools:text="@string/adress" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"> android:layout_marginBottom="8dp"
android:orientation="horizontal"
android:visibility="gone">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginRight="@dimen/default_layout_margin"
android:text="Server:" android:text="Server:"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textSize="@dimen/body1" android:textSize="@dimen/body1"
android:textStyle="bold" android:textStyle="bold" />
android:layout_marginRight="@dimen/default_layout_margin"/>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
@ -254,32 +238,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,80 +1,74 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="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:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar" />
<com.google.android.material.textfield.TextInputEditText <LinearLayout
android:id="@+id/scan_input" android:id="@+id/txtDescriptions"
style="@style/ScanLineTextSearch" android:layout_width="match_parent"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:hint="@string/filterRoutes" android:orientation="horizontal"
android:inputType="text" android:visibility="visible"
android:lines="1" app:layout_constraintEnd_toEndOf="parent"
android:maxLines="1" app:layout_constraintStart_toStartOf="parent"
android:enabled="true" app:layout_constraintTop_toBottomOf="@+id/scan_input">
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/main_toolbar"/>
/>
<LinearLayout </LinearLayout>
android:id="@+id/txtDescriptions"
<LinearLayout
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_pumpkin_orange"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtDescriptions" />
<LinearLayout
android:id="@+id/itemcard_layout"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
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" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:descendantFocusability="blocksDescendants">
android:visibility="visible"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/scan_input">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/route_recyclerview"
</LinearLayout>
<LinearLayout
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_pumpkin_orange"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/txtDescriptions"/>
<LinearLayout
android:id="@+id/itemcard_layout"
android:layout_width="0dp"
android:layout_height="0dp"
android:padding="5dp"
android:orientation="vertical"
tools:ignore="ExtraText"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/divider"
>
<RelativeLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"> android:clipToPadding="false"
android:visibility="visible"
<androidx.recyclerview.widget.RecyclerView tools:listitem="@layout/item_route_row" />
android:id="@+id/route_recyclerview" </RelativeLayout>
android:layout_width="match_parent" </LinearLayout>
android:layout_height="wrap_content"
android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/item_route_row" />
</RelativeLayout>
</LinearLayout>
<ScrollView <ScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
@ -94,33 +88,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,34 +1,33 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_pumpkin_orange"
android:orientation="horizontal"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar" />
<LinearLayout
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="@color/verdnatura_pumpkin_orange"
android:orientation="horizontal"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar">
</LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/layout_km_hour" android:id="@+id/layout_km_hour"
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@+id/divider" app:layout_constraintStart_toEndOf="@+id/divider"
app:layout_constraintTop_toBottomOf="@+id/main_toolbar" app:layout_constraintTop_toBottomOf="@+id/main_toolbar"
tools:visibility="gone"> tools:visibility="visible">
<TextView <TextView
android:id="@+id/textView20" android:id="@+id/textView20"
@ -44,8 +43,6 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/layout_km_hour" /> app:layout_constraintTop_toTopOf="@+id/layout_km_hour" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayout2" android:id="@+id/linearLayout2"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -87,12 +84,12 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@color/verdnatura_white" android:background="@color/verdnatura_white"
android:ems="10" android:ems="10"
android:inputType="number" android:gravity="center"
android:padding="5dp"
android:text="0"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:inputType="number"
android:maxLines="1" android:maxLines="1"
android:gravity="center"/> android:padding="5dp"
android:text="0" />
</LinearLayout> </LinearLayout>
@ -125,14 +122,15 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@color/verdnatura_white" android:background="@color/verdnatura_white"
android:ems="10" android:ems="10"
android:inputType="number" android:gravity="center"
android:padding="5dp"
android:text="0"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:inputType="number"
android:maxLines="1" android:maxLines="1"
android:gravity="center"/> android:padding="5dp"
android:text="0" />
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/textView28" android:id="@+id/textView28"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -147,6 +145,7 @@
app:layout_constraintHorizontal_bias="1.0" app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout7" /> app:layout_constraintTop_toBottomOf="@+id/linearLayout7" />
<LinearLayout <LinearLayout
android:id="@+id/linearLayout8" android:id="@+id/linearLayout8"
android:layout_width="match_parent" android:layout_width="match_parent"
@ -178,8 +177,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/hour_start" android:text="@string/hour_start"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white" />
/>
<EditText <EditText
android:id="@+id/hourInit" android:id="@+id/hourInit"
@ -188,12 +186,11 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@color/verdnatura_white" android:background="@color/verdnatura_white"
android:ems="10" android:ems="10"
android:padding="5dp" android:gravity="center"
android:text="00:00"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:maxLines="1" android:maxLines="1"
android:gravity="center" android:padding="5dp"
/> android:text="00:00" />
</LinearLayout> </LinearLayout>
@ -207,14 +204,14 @@
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout9"> app:layout_constraintTop_toBottomOf="@+id/linearLayout9">
<TextView <TextView
android:id="@+id/textView2123" android:id="@+id/textView2123"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/hour_end" android:text="@string/hour_end"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white" />
/>
<EditText <EditText
android:id="@+id/hourEnd" android:id="@+id/hourEnd"
@ -223,62 +220,59 @@
android:layout_weight="1" android:layout_weight="1"
android:background="@color/verdnatura_white" android:background="@color/verdnatura_white"
android:ems="10" android:ems="10"
android:padding="5dp" android:focusable="true"
android:text="00:00" android:gravity="center"
android:imeOptions="actionDone" android:imeOptions="actionDone"
android:maxLines="1" android:maxLines="1"
android:focusable="true" android:padding="5dp"
android:gravity="center"/> android:text="00:00" />
</LinearLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/saveButton" android:id="@+id/saveButton"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="16dp"
android:text="@string/save" android:text="@string/save"
android:textAlignment="center" android:textAlignment="center"
android:textSize="@dimen/h7"
android:textColor="@color/verdnatura_pumpkin_orange" android:textColor="@color/verdnatura_pumpkin_orange"
android:textSize="@dimen/h7"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent" />
app:layout_constraintTop_toBottomOf="@+id/hour_end"
/>
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/itemcard_layout" android:id="@+id/itemcard_layout"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
android:padding="5dp" android:orientation="vertical"
android:orientation="vertical" android:padding="5dp"
tools:ignore="ExtraText" android:visibility="visible"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/divider" app:layout_constraintTop_toTopOf="@+id/divider"
android:visibility="visible" tools:ignore="ExtraText">
>
<RelativeLayout <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/tickets_recyclerview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"> android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/item_ticket_row"
tools:visibility="gone" />
<androidx.recyclerview.widget.RecyclerView </RelativeLayout>
android:id="@+id/tickets_recyclerview" </LinearLayout>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:visibility="visible"
tools:listitem="@layout/item_ticket_row"
tools:visibility="gone"/>
</RelativeLayout>
</LinearLayout>
<ScrollView <ScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
@ -298,34 +292,5 @@
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -1,14 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:tools="http://schemas.android.com/tools" <layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:tools="http://schemas.android.com/tools">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<ScrollView <ScrollView
android:id="@+id/scroll_view" android:id="@+id/scroll_view"
@ -22,8 +20,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" > android:orientation="vertical">
<LinearLayout <LinearLayout
android:id="@+id/itemcard_layout" android:id="@+id/itemcard_layout"
@ -35,47 +32,50 @@
android:id="@+id/name_vehiclecontrol" android:id="@+id/name_vehiclecontrol"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:hint="Nombre del usuario"
android:layout_gravity="center" android:layout_gravity="center"
android:layout_marginTop="@dimen/toolbar_height"
android:hint="Nombre del usuario"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h5" android:textSize="@dimen/h5"
android:textStyle="bold" android:textStyle="bold" />
android:layout_marginTop="@dimen/toolbar_height"
/>
<ImageView <ImageView
android:id="@+id/user_image" android:id="@+id/user_image"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/itemcard_image_height" android:layout_height="@dimen/itemcard_image_height"
android:layout_margin="10dp"
android:scaleType="centerCrop" android:scaleType="centerCrop"
android:src="@drawable/loadphoto" android:src="@drawable/loadphoto" />
android:layout_margin="10dp"/>
<!-- TAGS ======================================================================================================= -->
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_margin="10dp" 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 <LinearLayout
android:id="@+id/user_information" android:id="@+id/user_information"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical" android:layout_weight="1"
android:layout_weight="1"> android:orientation="vertical">
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_margin_min"
android:text="@string/registered_vehiclecontrol" android:text="@string/registered_vehiclecontrol"
android:textColor="@color/verdnatura_brown_grey" android:textColor="@color/verdnatura_brown_grey"
android:textSize="@dimen/h7" android:textSize="@dimen/h7"
android:textStyle="bold" android:textStyle="bold" />
android:layout_marginEnd="@dimen/layout_margin_min"/>
<TextView <TextView
android:id="@+id/registered_vehiclecontrol" android:id="@+id/registered_vehiclecontrol"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -85,18 +85,21 @@
android:textSize="@dimen/h7" android:textSize="@dimen/h7"
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal"> android:orientation="horizontal">
<TextView <TextView
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/layout_margin_min"
android:text="@string/deviceName" android:text="@string/deviceName"
android:textColor="@color/verdnatura_brown_grey" android:textColor="@color/verdnatura_brown_grey"
android:textSize="@dimen/h7" android:textSize="@dimen/h7"
android:textStyle="bold" android:textStyle="bold" />
android:layout_marginEnd="@dimen/layout_margin_min"/>
<TextView <TextView
android:id="@+id/deviceName" android:id="@+id/deviceName"
android:layout_width="wrap_content" android:layout_width="wrap_content"
@ -107,96 +110,67 @@
android:textStyle="bold" /> android:textStyle="bold" />
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_weight="1">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="wrap_content"
android:orientation="horizontal"> android:layout_weight="1"
<TextView android:orientation="vertical">
android:layout_width="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:text="@string/assigned_user" android:orientation="horizontal">
android:textColor="@color/verdnatura_brown_grey"
android:textSize="@dimen/h7" <TextView
android:textStyle="bold" android:layout_width="wrap_content"
android:layout_marginEnd="@dimen/layout_margin_min"/> android:layout_height="match_parent"
<TextView android:layout_marginEnd="@dimen/layout_margin_min"
android:id="@+id/assigned_devicename" android:text="@string/assigned_user"
android:layout_width="wrap_content" android:textColor="@color/verdnatura_brown_grey"
android:layout_height="wrap_content" android:textSize="@dimen/h7"
android:text="sergiodt" android:textStyle="bold" />
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h7" <TextView
android:textStyle="bold" /> android:id="@+id/assigned_devicename"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="sergiodt"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h7"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
<!-- VALORES ================================================================================================== -->
<RelativeLayout <RelativeLayout
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:descendantFocusability="blocksDescendants"> android:descendantFocusability="blocksDescendants"
android:visibility="gone">
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/itemcard_recyclerview" android:id="@+id/itemcard_recyclerview"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clipToPadding="false" android:clipToPadding="false"
tools:listitem="@layout/item_card_row"/> tools:listitem="@layout/item_card_row" />
</RelativeLayout>> </RelativeLayout>
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
' <include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<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> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>