feat: refs#4488 packingMistake

This commit is contained in:
Sergio De la torre 2025-01-13 16:39:27 +01:00
parent 298e17210a
commit 0709fe3127
4 changed files with 137 additions and 72 deletions

View File

@ -34,6 +34,7 @@
<component name="AndroidLayouts"> <component name="AndroidLayouts">
<shared> <shared>
<config> <config>
<device id="pixel_6a" />
<locale>es</locale> <locale>es</locale>
<pickBest>false</pickBest> <pickBest>false</pickBest>
<target>android-27</target> <target>android-27</target>
@ -285,6 +286,11 @@
<theme>@style/AppTheme</theme> <theme>@style/AppTheme</theme>
</config> </config>
</layout> </layout>
<layout url="file://$PROJECT_DIR$/app/src/main/res/layout/fragment_web.xml">
<config>
<theme>@style/AppTheme</theme>
</config>
</layout>
<layout url="file://$PROJECT_DIR$/app/src/main/res/layout/fragment_workermistake.xml"> <layout url="file://$PROJECT_DIR$/app/src/main/res/layout/fragment_workermistake.xml">
<config> <config>
<theme>@style/AppTheme</theme> <theme>@style/AppTheme</theme>
@ -431,6 +437,11 @@
<theme>@style/AppTheme</theme> <theme>@style/AppTheme</theme>
</config> </config>
</layout> </layout>
<layout url="file://$PROJECT_DIR$/app/src/main/res/layout/sale_row_fragment_reserve.xml">
<config>
<theme>@style/AppTheme</theme>
</config>
</layout>
<layout url="file://$PROJECT_DIR$/app/src/main/res/layout/searchable_dialog.xml"> <layout url="file://$PROJECT_DIR$/app/src/main/res/layout/searchable_dialog.xml">
<config> <config>
<theme>@style/AppTheme</theme> <theme>@style/AppTheme</theme>
@ -493,12 +504,24 @@
</select> </select>
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="feat: refs#6845 userInterface"> <list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="feat: refs#6861 reservas">
<change afterPath="$PROJECT_DIR$/CHANGELOG.md" afterDir="false" /> <change afterPath="$PROJECT_DIR$/app/lint-baseline.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/changeLog.sh" afterDir="false" /> <change afterPath="$PROJECT_DIR$/app/src/main/res/layout/sale_row_fragment_reserve.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/deploymentTargetSelector.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/deploymentTargetSelector.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/gradle.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/gradle.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/render.experimental.xml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/build.gradle.kts" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle.kts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/build.gradle.kts" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle.kts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/general/release/baselineProfiles/0/app-general-release.dm" beforeDir="false" afterPath="$PROJECT_DIR$/app/general/release/baselineProfiles/0/app-general-release.dm" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/model/ItemUbicadorVO.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/model/ItemUbicadorVO.kt" afterDir="false" /> <change beforePath="$PROJECT_DIR$/app/general/release/baselineProfiles/1/app-general-release.dm" beforeDir="false" afterPath="$PROJECT_DIR$/app/general/release/baselineProfiles/1/app-general-release.dm" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/AndroidManifest.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/AndroidManifest.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/Extensions.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/Extensions.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/commom/WebFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/commom/WebFragment.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/workermistake/fragment/PackingMistakeFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/workermistake/fragment/PackingMistakeFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_web.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_web.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/build.gradle.kts" beforeDir="false" afterPath="$PROJECT_DIR$/build.gradle.kts" afterDir="false" />
<change beforePath="$PROJECT_DIR$/gradle/libs.versions.toml" beforeDir="false" afterPath="$PROJECT_DIR$/gradle/libs.versions.toml" afterDir="false" />
</list> </list>
<list id="7b98f93d-6980-4bf1-8e61-c7afd10e56f2" name="Change_category" comment="Change_category" /> <list id="7b98f93d-6980-4bf1-8e61-c7afd10e56f2" name="Change_category" comment="Change_category" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
@ -513,7 +536,7 @@
<component name="CodeInsightWorkspaceSettings"> <component name="CodeInsightWorkspaceSettings">
<option name="optimizeImportsOnTheFly" value="true" /> <option name="optimizeImportsOnTheFly" value="true" />
</component> </component>
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[DeviceId(pluginId=LocalEmulator, isTemplate=false, identifier=path=C:\Users\sergiodt\.android\avd\Pixel_7a_API_30.avd)]" /> <component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[DeviceId(pluginId=PhysicalDevice, isTemplate=false, identifier=serial=21114523025303)]" />
<component name="ExportToHTMLSettings"> <component name="ExportToHTMLSettings">
<option name="OPEN_IN_BROWSER" value="true" /> <option name="OPEN_IN_BROWSER" value="true" />
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" /> <option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
@ -603,7 +626,7 @@
</option> </option>
<option name="RECENT_BRANCH_BY_REPOSITORY"> <option name="RECENT_BRANCH_BY_REPOSITORY">
<map> <map>
<entry key="$PROJECT_DIR$" value="dev_6078" /> <entry key="$PROJECT_DIR$" value="devLinphone" />
</map> </map>
</option> </option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@ -664,60 +687,60 @@
<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;Android App.app.executor&quot;: &quot;Run&quot;, "Android App.app.executor": "Run",
&quot;ApkExportedModule&quot;: &quot;Gestor_Almacén.app&quot;, "ApkExportedModule": "Gestor_Almacén.app",
&quot;DEBUGGABLE_DEVICE&quot;: &quot;zebra_technologies-tc21-21114523025303&quot;, "DEBUGGABLE_DEVICE": "honeywell-eda52-23086B3FFD",
&quot;DEBUGGABLE_PROCESS&quot;: &quot;es.verdnatura.sfusion&quot;, "DEBUGGABLE_PROCESS": "es.verdnatura.sfusion",
&quot;DEBUGGER_ID&quot;: &quot;Auto&quot;, "DEBUGGER_ID": "Auto",
&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;Gradle.vn-warehouseManager [clean].executor&quot;: &quot;Run&quot;, "Gradle.vn-warehouseManager [clean].executor": "Run",
&quot;Gradle.vn-warehouseManager.executor&quot;: &quot;Run&quot;, "Gradle.vn-warehouseManager.executor": "Run",
&quot;KotlinFunctionFindUsagesOptions.isSearchForTextOccurrences&quot;: &quot;true&quot;, "KotlinFunctionFindUsagesOptions.isSearchForTextOccurrences": "true",
&quot;PROJECT_TRUSTED_KEY&quot;: &quot;true&quot;, "PROJECT_TRUSTED_KEY": "true",
&quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;, "RunOnceActivity.OpenProjectViewOnStart": "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;RunOnceActivity.readMode.enableVisualFormatting&quot;: &quot;true&quot;, "RunOnceActivity.readMode.enableVisualFormatting": "true",
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;, "SHARE_PROJECT_CONFIGURATION_FILES": "true",
&quot;SHOW_ALL_PROCESSES&quot;: &quot;false&quot;, "SHOW_ALL_PROCESSES": "false",
&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;android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-34/android/view/View.java_SELECTED&quot;: &quot;View&quot;, "android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-34/android/view/View.java_SELECTED": "View",
&quot;android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-34/android/widget/CompoundButton.java_SELECTED&quot;: &quot;CompoundButton&quot;, "android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-34/android/widget/CompoundButton.java_SELECTED": "CompoundButton",
&quot;android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-34/android/widget/TextView.java_SELECTED&quot;: &quot;TextView&quot;, "android-custom-viewC:/Users/sergiodt/AppData/Local/Android/Sdk/sources/android-34/android/widget/TextView.java_SELECTED": "TextView",
&quot;cf.first.check.clang-format&quot;: &quot;false&quot;, "cf.first.check.clang-format": "false",
&quot;cidr.known.project.marker&quot;: &quot;true&quot;, "cidr.known.project.marker": "true",
&quot;com.developerphil.adbidea.selecteddevices&quot;: &quot;G65TY9DQN7X4BIE6&quot;, "com.developerphil.adbidea.selecteddevices": "G65TY9DQN7X4BIE6",
&quot;com.google.services.firebase.aqiPopupShown&quot;: &quot;true&quot;, "com.google.services.firebase.aqiPopupShown": "true",
&quot;git-widget-placeholder&quot;: &quot;dev&quot;, "git-widget-placeholder": "dev",
&quot;ignore.virus.scanning.warn.message&quot;: &quot;true&quot;, "ignore.virus.scanning.warn.message": "true",
&quot;kotlin-language-version-configured&quot;: &quot;true&quot;, "kotlin-language-version-configured": "true",
&quot;last_directory_selection&quot;: &quot;C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable&quot;, "last_directory_selection": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
&quot;last_opened_file_path&quot;: &quot;C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout&quot;, "last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout",
&quot;project.structure.last.edited&quot;: &quot;Modules&quot;, "project.structure.last.edited": "Dependencies",
&quot;project.structure.proportion&quot;: &quot;0.17&quot;, "project.structure.proportion": "0.17",
&quot;project.structure.side.proportion&quot;: &quot;0.2&quot;, "project.structure.side.proportion": "0.2",
&quot;rearrange.code.on.save&quot;: &quot;true&quot;, "rearrange.code.on.save": "true",
&quot;run.code.analysis.last.selected.profile&quot;: &quot;pProject Default&quot;, "run.code.analysis.last.selected.profile": "pProject Default",
&quot;settings.editor.selected.configurable&quot;: &quot;preferences.pluginManager&quot; "settings.editor.selected.configurable": "reference.settingsdialog.project.gradle"
}, },
&quot;keyToStringList&quot;: { "keyToStringList": {
&quot;ExportApk.BuildVariants&quot;: [ "ExportApk.BuildVariants": [
&quot;generalRelease&quot; "generalRelease"
], ],
&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" />
@ -1265,7 +1288,7 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1709725795643</updated> <updated>1709725795643</updated>
</task> </task>
<option name="localTasksCounter" value="373" /> <option name="localTasksCounter" value="377" />
<servers /> <servers />
</component> </component>
<component name="Vcs.Log.History.Properties"> <component name="Vcs.Log.History.Properties">
@ -1405,10 +1428,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="feat getAddress #refs 7622" />
<MESSAGE value="feat claimObservation refs #7541" />
<MESSAGE value="feat reservas refs #6861" />
<MESSAGE value="version 24.30" />
<MESSAGE value="feat itemGetBalance refs #6769" /> <MESSAGE value="feat itemGetBalance refs #6769" />
<MESSAGE value="feat: boxPickingPrepared refs #7855" /> <MESSAGE value="feat: boxPickingPrepared refs #7855" />
<MESSAGE value="feat: refactorResponse PasillerosItem refs #7827" /> <MESSAGE value="feat: refactorResponse PasillerosItem refs #7827" />
@ -1430,7 +1449,11 @@
<MESSAGE value="feat: refs #7922 scanOrder" /> <MESSAGE value="feat: refs #7922 scanOrder" />
<MESSAGE value="feat: refs #7920 itemShelvingGet" /> <MESSAGE value="feat: refs #7920 itemShelvingGet" />
<MESSAGE value="feat: refs#6845 userInterface" /> <MESSAGE value="feat: refs#6845 userInterface" />
<option name="LAST_COMMIT_MESSAGE" value="feat: refs#6845 userInterface" /> <MESSAGE value="linphoneVersion" />
<MESSAGE value="feat: refs#8301 deprecatedOlderItem" />
<MESSAGE value="feat: refs#6413 refactorUbicador" />
<MESSAGE value="feat: refs#6861 reservas" />
<option name="LAST_COMMIT_MESSAGE" value="feat: refs#6861 reservas" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
@ -1443,6 +1466,14 @@
</properties> </properties>
<option name="timeStamp" value="11" /> <option name="timeStamp" value="11" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" type="kotlin-function">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/collection/fragment/CollectionFragmentPickerPreviousNew.kt</url>
<line>764</line>
<properties class="es.verdnatura.presentation.view.feature.collection.fragment.CollectionFragmentPickerPreviousNew" method="customDialogTakeAction">
<option name="WATCH_EXIT" value="false" />
</properties>
<option name="timeStamp" value="17" />
</line-breakpoint>
<line-breakpoint enabled="true" type="kotlin-line"> <line-breakpoint enabled="true" type="kotlin-line">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixCallback.kt</url> <url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixCallback.kt</url>
<line>86</line> <line>86</line>
@ -1458,6 +1489,11 @@
<line>87</line> <line>87</line>
<option name="timeStamp" value="14" /> <option name="timeStamp" value="14" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" type="kotlin-line">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/delivery/fragments/TicketsFragment.kt</url>
<line>450</line>
<option name="timeStamp" value="18" />
</line-breakpoint>
</breakpoints> </breakpoints>
</breakpoint-manager> </breakpoint-manager>
<pin-to-top-manager> <pin-to-top-manager>

View File

@ -30,6 +30,10 @@ import es.verdnatura.presentation.common.ToolBarAdapterTooltip
import es.verdnatura.presentation.view.component.CustomDialog import es.verdnatura.presentation.view.component.CustomDialog
import es.verdnatura.presentation.view.feature.main.activity.MainActivity import es.verdnatura.presentation.view.feature.main.activity.MainActivity
import org.json.JSONObject import org.json.JSONObject
import org.mozilla.geckoview.GeckoRuntime
import org.mozilla.geckoview.GeckoSession
import org.mozilla.geckoview.GeckoSession.ContentDelegate
import org.mozilla.geckoview.GeckoView
import kotlin.math.abs import kotlin.math.abs
@Suppress("UNUSED_ANONYMOUS_PARAMETER") @Suppress("UNUSED_ANONYMOUS_PARAMETER")
@ -41,6 +45,8 @@ class WebFragment(
private lateinit var customDialog: CustomDialog private lateinit var customDialog: CustomDialog
private lateinit var backDispatcher: OnBackPressedDispatcher private lateinit var backDispatcher: OnBackPressedDispatcher
private lateinit var binding: FragmentWebBinding private lateinit var binding: FragmentWebBinding
private var sRuntime: GeckoRuntime? = null
private var session: GeckoSession? = null
companion object { companion object {
fun newInstance(entryPoint: String) = WebFragment(entryPoint) fun newInstance(entryPoint: String) = WebFragment(entryPoint)
@ -101,6 +107,15 @@ class WebFragment(
super.onViewCreated(view, savedInstanceState) super.onViewCreated(view, savedInstanceState)
} }
override fun onCreate(savedInstanceState: Bundle?) {
session = GeckoSession()
session!!.contentDelegate = object : ContentDelegate {}
// Usa el gestor para obtener la instancia única de GeckoRuntime
sRuntime = GeckoManager.getRuntime(requireContext())
session!!.open(sRuntime!!)
super.onCreate(savedInstanceState)
}
@SuppressLint("ClickableViewAccessibility", "SetJavaScriptEnabled") @SuppressLint("ClickableViewAccessibility", "SetJavaScriptEnabled")
private fun setWeb() { private fun setWeb() {
@ -131,11 +146,11 @@ class WebFragment(
} }
val dataScanned = JSONObject(entryPoint) val dataScanned = JSONObject(entryPoint)
if (dataScanned.toString().contains("Cmrs")) {
val view: GeckoView = binding.geckoView
view.setSession(session!!)
session!!.loadUri("${dataScanned.get("web")}")
if (dataScanned.toString().contains("cmr?")) {
val pdfUrl = "${dataScanned.get("web")}"
val googleDocsViewerUrl = "https://docs.google.com/gview?embedded=true&url=$pdfUrl"
binding.webView.loadUrl(googleDocsViewerUrl)
} else { } else {
binding.webView.loadUrl(dataScanned.get("web").toString()) binding.webView.loadUrl(dataScanned.get("web").toString())
} }
@ -205,3 +220,14 @@ class WebFragment(
} }
object GeckoManager {
private var runtime: GeckoRuntime? = null
fun getRuntime(context: Context): GeckoRuntime {
if (runtime == null) {
runtime = GeckoRuntime.create(context)
}
return runtime!!
}
}

View File

@ -436,7 +436,7 @@ class TicketsFragment : BaseFragment<FragmentTicketsBinding, DeliveryViewModel>(
mutableMapOf( mutableMapOf(
"entryPoint" to route.id, "entryPoint" to route.id,
"web" to "${ "web" to "${
mobileApplication.dataStoreApp.getServerSalix() mobileApplication.dataStoreApp.getServerLilium()
}/api/Cmrs/${item.cmrFk}/print?access_token=${ }/api/Cmrs/${item.cmrFk}/print?access_token=${
mobileApplication.dataStoreApp.readDataStoreKey<String>( mobileApplication.dataStoreApp.readDataStoreKey<String>(
TOKEN TOKEN

View File

@ -12,7 +12,7 @@ import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.GeneralAdapter import es.verdnatura.presentation.common.GeneralAdapter
import es.verdnatura.presentation.common.GeneralItem import es.verdnatura.presentation.common.GeneralItem
import es.verdnatura.presentation.common.OnCollectionSelectedListener import es.verdnatura.presentation.common.OnCollectionSelectedListener
import es.verdnatura.presentation.common.OnGeneralItemRowClickListener import es.verdnatura.presentation.common.OnGeneralRowClickListener
import es.verdnatura.presentation.view.component.CustomDialogList import es.verdnatura.presentation.view.component.CustomDialogList
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel
import es.verdnatura.presentation.view.feature.workermistake.model.MistakeType import es.verdnatura.presentation.view.feature.workermistake.model.MistakeType
@ -118,9 +118,11 @@ class PackingMistakeFragment(var menuOrigin: String) :
listMistakesAdapter = listMistakesAdapter =
GeneralAdapter(listMistakes, object : OnGeneralItemRowClickListener { GeneralAdapter(listMistakes, onRowClickListener = object : OnGeneralRowClickListener {
override fun onGeneralItemRowClickListener(item: GeneralItem) {
override fun onRowClickListener(item: GeneralItem) {
list.forEach { list.forEach {
if (it.description == item.text) { if (it.description == item.text) {
try { try {
@ -140,11 +142,12 @@ class PackingMistakeFragment(var menuOrigin: String) :
customDialogList.dismiss() customDialogList.dismiss()
} }
} }
} }
}) })
customDialogList.getRecyclerView().adapter = listMistakesAdapter customDialogList.getRecyclerView().adapter = listMistakesAdapter
customDialogList.getRecyclerView().layoutManager = customDialogList.getRecyclerView().layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false) LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)