refs #4021 falta fotos, correo y modificación del back
This commit is contained in:
parent
4c59d4cb10
commit
258c4d134b
|
@ -7,11 +7,11 @@
|
||||||
<deviceKey>
|
<deviceKey>
|
||||||
<Key>
|
<Key>
|
||||||
<type value="VIRTUAL_DEVICE_PATH" />
|
<type value="VIRTUAL_DEVICE_PATH" />
|
||||||
<value value="C:\Users\sergiodt\.android\avd\Pixel_5_API_22.avd" />
|
<value value="C:\Users\sergiodt\.android\avd\Pixel_6_API_30.avd" />
|
||||||
</Key>
|
</Key>
|
||||||
</deviceKey>
|
</deviceKey>
|
||||||
</Target>
|
</Target>
|
||||||
</targetSelectedWithDropDown>
|
</targetSelectedWithDropDown>
|
||||||
<timeTargetWasSelectedWithDropDown value="2023-06-05T13:46:57.531979300Z" />
|
<timeTargetWasSelectedWithDropDown value="2023-06-08T05:09:47.471985800Z" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -83,10 +83,29 @@
|
||||||
</select>
|
</select>
|
||||||
</component>
|
</component>
|
||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="version 23.22">
|
<list default="true" id="fa688d1c-dbee-4864-9e33-4d84ef9afca8" name="Default Changelist" comment="version 23.22.1">
|
||||||
|
<change afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_packaging_entries.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/.idea/deploymentTargetDropDown.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/deploymentTargetDropDown.xml" afterDir="false" />
|
||||||
<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/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/view/feature/packaging/adapter/ItemSupplierAdapter.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/adapter/ItemSupplierAdapter.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/ObservFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/ObservFragment.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingCountFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingCountFragment.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingSummaryFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingSummaryFragment.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/PackagingViewModel/SupplierViewModel.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/fragment/SupplierFragment.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/EntrySalix.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/EntrySalix.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/Supplier.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/packaging/model/Supplier.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/pasillero/fragment/PasilleroViewModel.kt" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_obs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_obs.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_summary.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_packaging_summary.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/item_itemsupplier_row.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/item_itemsupplier_row.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-es/strings.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-fr/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-fr/strings.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/values-pt/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values-pt/strings.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/app/src/main/res/values/strings.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/values/strings.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" />
|
||||||
|
@ -97,7 +116,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[21114523025303]" />
|
<component name="ExecutionTargetManager" SELECTED_TARGET="device_and_snapshot_combo_box_target[C:\Users\sergiodt\.android\avd\Pixel_6_API_30.avd]" />
|
||||||
<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" />
|
||||||
|
@ -232,40 +251,41 @@
|
||||||
<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"><![CDATA[{
|
<component name="PropertiesComponent">{
|
||||||
"keyToString": {
|
"keyToString": {
|
||||||
"ApkExportedModule": "Gestor_Almacén.app",
|
"ApkExportedModule": "Gestor_Almacén.app",
|
||||||
"ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
|
"ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
|
||||||
"PROJECT_TRUSTED_KEY": "true",
|
"PROJECT_TRUSTED_KEY": "true",
|
||||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||||
"ScreenRecorder.SavePath": "C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4",
|
"ScreenRecorder.SavePath": "C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4",
|
||||||
"android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED": "RecyclerView",
|
"android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED": "RecyclerView",
|
||||||
"cidr.known.project.marker": "true",
|
"cidr.known.project.marker": "true",
|
||||||
"com.developerphil.adbidea.selecteddevices": "21114523025303",
|
"com.developerphil.adbidea.selecteddevices": "21114523025303",
|
||||||
"com.google.services.firebase.aqiPopupShown": "true",
|
"com.google.services.firebase.aqiPopupShown": "true",
|
||||||
"last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
|
"last_directory_selection": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
|
||||||
"project.structure.last.edited": "Modules",
|
"last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
|
||||||
"project.structure.proportion": "0.17",
|
"project.structure.last.edited": "Modules",
|
||||||
"project.structure.side.proportion": "0.2",
|
"project.structure.proportion": "0.17",
|
||||||
"run.code.analysis.last.selected.profile": "pProject Default",
|
"project.structure.side.proportion": "0.2",
|
||||||
"settings.editor.selected.configurable": "preferences.sourceCode.Shell Script"
|
"run.code.analysis.last.selected.profile": "pProject Default",
|
||||||
|
"settings.editor.selected.configurable": "preferences.sourceCode.Shell Script"
|
||||||
},
|
},
|
||||||
"keyToStringList": {
|
"keyToStringList": {
|
||||||
"ExportApk.BuildVariants": [
|
"ExportApk.BuildVariants": [
|
||||||
"generalRelease"
|
"generalRelease"
|
||||||
],
|
],
|
||||||
"com.android.tools.idea.sqlite.queryhistory": [
|
"com.android.tools.idea.sqlite.queryhistory": [
|
||||||
"select * from expedition e where e.addressFk= 34915",
|
"select * from expedition e where e.addressFk= 34915",
|
||||||
"select * from expedition e where e.id= 6872921",
|
"select * from expedition e where e.id= 6872921",
|
||||||
"select count(*) from expeditionPending\n",
|
"select count(*) from expeditionPending\n",
|
||||||
"select count(*) from expedition\n",
|
"select count(*) from expedition\n",
|
||||||
"select count(*) from expedition"
|
"select count(*) from expedition"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}]]></component>
|
}</component>
|
||||||
<component name="PsdUISettings">
|
<component name="PsdUISettings">
|
||||||
<option name="MODULE_TAB" value="Default Config" />
|
<option name="MODULE_TAB" value="Default Config" />
|
||||||
<option name="LAST_EDITED_SIGNING_CONFIG" value="debug" />
|
<option name="LAST_EDITED_SIGNING_CONFIG" value="debug" />
|
||||||
|
@ -793,7 +813,7 @@
|
||||||
<entry key="branch">
|
<entry key="branch">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
<option value="dev" />
|
<option value="4021_embalajes" />
|
||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -882,14 +902,6 @@
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
<breakpoints>
|
<breakpoints>
|
||||||
<line-breakpoint type="kotlin-function">
|
|
||||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/VerdnaturaService.kt</url>
|
|
||||||
<line>866</line>
|
|
||||||
<properties class="es.verdnatura.domain.VerdnaturaService" method="route_getExpeditionSummary">
|
|
||||||
<option name="WATCH_EXIT" value="false" />
|
|
||||||
</properties>
|
|
||||||
<option name="timeStamp" value="2" />
|
|
||||||
</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/presentation/view/feature/ubicador/fragment/UbicadorViewModel.kt</url>
|
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorViewModel.kt</url>
|
||||||
<line>457</line>
|
<line>457</line>
|
||||||
|
|
|
@ -14,7 +14,7 @@ android {
|
||||||
minSdkVersion 24 //21
|
minSdkVersion 24 //21
|
||||||
targetSdkVersion 33
|
targetSdkVersion 33
|
||||||
versionCode 200
|
versionCode 200
|
||||||
versionName = "23.22.1"
|
versionName = "23.22.1Beta"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,9 +12,11 @@ import es.verdnatura.presentation.view.feature.login.model.SalixGrupo
|
||||||
import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
|
import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
|
||||||
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
||||||
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
|
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
|
||||||
|
import es.verdnatura.presentation.view.feature.packaging.model.obervationEntry
|
||||||
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.model.DepartmentMistake
|
import es.verdnatura.presentation.view.feature.workermistake.model.DepartmentMistake
|
||||||
import okhttp3.MultipartBody
|
import okhttp3.MultipartBody
|
||||||
|
import org.json.JSONObject
|
||||||
import retrofit2.Call
|
import retrofit2.Call
|
||||||
import retrofit2.http.*
|
import retrofit2.http.*
|
||||||
|
|
||||||
|
@ -80,7 +82,7 @@ interface SalixService {
|
||||||
@Query("item") item: Number,
|
@Query("item") item: Number,
|
||||||
@Query("printedStickers") printedStickers: Number
|
@Query("printedStickers") printedStickers: Number
|
||||||
):
|
):
|
||||||
Call<Any>
|
Call<EntrySalix>
|
||||||
|
|
||||||
|
|
||||||
@POST("tickets/{idTicket}/transferSales") //-->saleMove en Silex
|
@POST("tickets/{idTicket}/transferSales") //-->saleMove en Silex
|
||||||
|
@ -176,6 +178,13 @@ interface SalixService {
|
||||||
):
|
):
|
||||||
Call<EntrySalix>
|
Call<EntrySalix>
|
||||||
|
|
||||||
|
@PATCH("Entries/{entryId}")//REVISADA
|
||||||
|
fun entry_updateObserv(
|
||||||
|
@Path("entryId") entryId:Int,
|
||||||
|
@Body entry: obervationEntry
|
||||||
|
):
|
||||||
|
Call<EntrySalix>
|
||||||
|
|
||||||
@GET("Shelvings")
|
@GET("Shelvings")
|
||||||
fun Shelvings(
|
fun Shelvings(
|
||||||
@Query("filter") filter: String
|
@Query("filter") filter: String
|
||||||
|
@ -192,7 +201,7 @@ interface SalixService {
|
||||||
|
|
||||||
@POST("Entries/addFromPackaging")
|
@POST("Entries/addFromPackaging")
|
||||||
fun addFromPackaging(
|
fun addFromPackaging(
|
||||||
@Query("supplier") supplier: Int,
|
@Query("supplier") supplier: Number,
|
||||||
@Query("isTravelReception") isTravelReception: Boolean
|
@Query("isTravelReception") isTravelReception: Boolean
|
||||||
|
|
||||||
):
|
):
|
||||||
|
|
|
@ -513,6 +513,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
||||||
PRINTERFK -> prefs.getInt(name, 0)
|
PRINTERFK -> prefs.getInt(name, 0)
|
||||||
USERFK -> prefs.getInt(USERFK, 0)
|
USERFK -> prefs.getInt(USERFK, 0)
|
||||||
SUPPLIERID->prefs.getInt(SUPPLIERID,0)
|
SUPPLIERID->prefs.getInt(SUPPLIERID,0)
|
||||||
|
"ENTRYID"->prefs.getInt(name,0)
|
||||||
else -> {
|
else -> {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package es.verdnatura.presentation.view.feature.packaging.adapter
|
package es.verdnatura.presentation.view.feature.packaging.adapter
|
||||||
|
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.view.inputmethod.EditorInfo
|
import android.view.inputmethod.EditorInfo
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -10,11 +11,10 @@ import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
||||||
|
|
||||||
class ItemSupplierAdapter(
|
class ItemSupplierAdapter(
|
||||||
private val items: List<ItemSupplier>,
|
private val items: List<ItemSupplier>,
|
||||||
private val onImageUpdateClickListener: OnImageUpdateClickListener,
|
private val onImageUpdateClickListener: OnImageUpdateClickListener? ,
|
||||||
private val onImageTrashClickListener: OnImageTrashClickListener,
|
private val onImageTrashClickListener: OnImageTrashClickListener?,
|
||||||
private val onEditSubQuantityListener: OnEditSubQuantityListener
|
private val onEditSubQuantityListener: OnEditSubQuantityListener?,
|
||||||
// private val OnGeneralItemRowClickListener: OnGeneralItemRowClickListener,
|
private var showItems: Boolean = true
|
||||||
// private var showDelete: Boolean = false
|
|
||||||
) : RecyclerView.Adapter<ItemSupplierAdapter.ItemHolder>() {
|
) : RecyclerView.Adapter<ItemSupplierAdapter.ItemHolder>() {
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,16 +42,20 @@ class ItemSupplierAdapter(
|
||||||
binding.apply {
|
binding.apply {
|
||||||
this.item = item
|
this.item = item
|
||||||
|
|
||||||
|
if (!showItems){
|
||||||
|
itemAdd.visibility= View.GONE
|
||||||
|
itemRemove.visibility=View.GONE
|
||||||
|
}
|
||||||
itemAdd.setOnClickListener {
|
itemAdd.setOnClickListener {
|
||||||
onImageUpdateClickListener.OnImageUpdateClickListener(
|
onImageUpdateClickListener!!.OnImageUpdateClickListener(
|
||||||
item
|
item
|
||||||
)
|
)
|
||||||
itemRemove.setOnClickListener {
|
}
|
||||||
onImageTrashClickListener.OnImageTrashClickListener(item)
|
itemRemove.setOnClickListener {
|
||||||
}
|
onImageTrashClickListener!!.OnImageTrashClickListener(item)
|
||||||
}
|
}
|
||||||
|
|
||||||
itemSubquantity.setOnEditorActionListener { v, actionId, event ->
|
/* itemSubquantity.setOnEditorActionListener { v, actionId, event ->
|
||||||
|
|
||||||
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) {
|
||||||
onEditSubQuantityListener.OnEditSubQuantityListener(
|
onEditSubQuantityListener.OnEditSubQuantityListener(
|
||||||
|
@ -61,7 +65,7 @@ class ItemSupplierAdapter(
|
||||||
v.clearFocus()
|
v.clearFocus()
|
||||||
}
|
}
|
||||||
return@setOnEditorActionListener false
|
return@setOnEditorActionListener false
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,8 @@ import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.*
|
import es.verdnatura.presentation.common.*
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
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.packaging.adapter.ListImageAdapter
|
import es.verdnatura.presentation.view.feature.packaging.adapter.ListImageAdapter
|
||||||
|
import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingViewModel.PackagingViewModel
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
|
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
class ObservFragment(
|
class ObservFragment(
|
||||||
var entryPoint: String = ""
|
var entryPoint: String = ""
|
||||||
|
|
||||||
) : BaseFragment<FragmentPackagingObsBinding, InventaryViewModel>(
|
) : BaseFragment<FragmentPackagingObsBinding, PackagingViewModel>(
|
||||||
InventaryViewModel::class
|
PackagingViewModel::class
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private var adapterListImage: ListImageAdapter? = null
|
private var adapterListImage: ListImageAdapter? = null
|
||||||
|
@ -51,7 +51,6 @@ class ObservFragment(
|
||||||
override fun init() {
|
override fun init() {
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
ma.hideBottomNavigation(View.GONE)
|
ma.hideBottomNavigation(View.GONE)
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
setToolBar()
|
setToolBar()
|
||||||
setEvents()
|
setEvents()
|
||||||
super.init()
|
super.init()
|
||||||
|
@ -59,7 +58,7 @@ class ObservFragment(
|
||||||
|
|
||||||
private fun setToolBar() {
|
private fun setToolBar() {
|
||||||
|
|
||||||
binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ":" + getData("SUPPLIERNAME")
|
binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ": " + getData("SUPPLIERNAME")
|
||||||
|
|
||||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||||
val iconNext = ImageView(context)
|
val iconNext = ImageView(context)
|
||||||
|
@ -79,7 +78,10 @@ class ObservFragment(
|
||||||
listImages!!.size.toString()
|
listImages!!.size.toString()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
saveData("ENTRYOBSERVATIONS", binding.observations.text.toString())
|
saveData("ENTRYOBSERVATIONS",binding.observations.text.toString() )
|
||||||
|
|
||||||
|
viewModel.entry_updateObserv(getDataInt("ENTRYID"),binding.observations.text.toString())
|
||||||
|
|
||||||
ma.onPasillerosItemClickListener(
|
ma.onPasillerosItemClickListener(
|
||||||
PasillerosItemVO(title = getString(R.string.titlePackagingSummary)),
|
PasillerosItemVO(title = getString(R.string.titlePackagingSummary)),
|
||||||
getString(R.string.titlePackagingSummary)
|
getString(R.string.titlePackagingSummary)
|
||||||
|
|
|
@ -2,7 +2,7 @@ package es.verdnatura.presentation.view.feature.packaging.fragment
|
||||||
|
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.text.InputType
|
||||||
import android.util.Log.d
|
import android.util.Log.d
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
|
@ -39,27 +39,18 @@ class PackagingCountFragment(
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.fragment_packaging_count
|
override fun getLayoutId(): Int = R.layout.fragment_packaging_count
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
|
|
||||||
|
|
||||||
viewModel.supplier_getItems(
|
|
||||||
getData("SUPPLIERID")
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
binding.quantityPackaging.setOnClickListener {
|
/* binding.quantityPackaging.setOnClickListener {
|
||||||
ma.onPasillerosItemClickListener(
|
ma.onPasillerosItemClickListener(
|
||||||
PasillerosItemVO(title = getString(R.string.titlePackagingObs)),
|
PasillerosItemVO(title = getString(R.string.titlePackagingObs)),
|
||||||
getString(R.string.titlePackagingObs)
|
getString(R.string.titlePackagingObs)
|
||||||
)
|
)
|
||||||
}
|
}*/
|
||||||
// binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
viewModel.getItemsPackaging(
|
||||||
|
getDataInt("SUPPLIERID"), getDataInt("ENTRYID")
|
||||||
|
)
|
||||||
customDialogInput = CustomDialogInput(requireContext())
|
customDialogInput = CustomDialogInput(requireContext())
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
ma.hideBottomNavigation(View.GONE)
|
ma.hideBottomNavigation(View.GONE)
|
||||||
|
@ -70,7 +61,7 @@ class PackagingCountFragment(
|
||||||
|
|
||||||
private fun setToolBar() {
|
private fun setToolBar() {
|
||||||
|
|
||||||
binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ":" + getData("SUPPLIERNAME")
|
binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ": " + getData("SUPPLIERNAME")
|
||||||
|
|
||||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||||
val iconNext = ImageView(context)
|
val iconNext = ImageView(context)
|
||||||
|
@ -112,6 +103,21 @@ class PackagingCountFragment(
|
||||||
override fun observeViewModel() {
|
override fun observeViewModel() {
|
||||||
with(viewModel) {
|
with(viewModel) {
|
||||||
|
|
||||||
|
entryAdd.observe(viewLifecycleOwner) {
|
||||||
|
|
||||||
|
if (it.isError) {
|
||||||
|
binding.splashProgress.visibility = View.INVISIBLE
|
||||||
|
ma.messageWithSound(it.errorMessage, true, true)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
ma.messageWithSound(it.errorMessage, false, true)
|
||||||
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
viewModel.getItemsPackaging(
|
||||||
|
getDataInt("SUPPLIERID"), getDataInt("ENTRYID")
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
itemSupplierList.observe(viewLifecycleOwner) {
|
itemSupplierList.observe(viewLifecycleOwner) {
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
adapteritemsupplier =
|
adapteritemsupplier =
|
||||||
|
@ -119,29 +125,15 @@ class PackagingCountFragment(
|
||||||
|
|
||||||
override fun OnImageUpdateClickListener(item: Any) {
|
override fun OnImageUpdateClickListener(item: Any) {
|
||||||
d("VERDNATURA::", "Seleccionado update" + (item as ItemSupplier).name)
|
d("VERDNATURA::", "Seleccionado update" + (item as ItemSupplier).name)
|
||||||
printCustomDialog("quantity")
|
showCustomDialog("quantity", item)
|
||||||
/* customDialogInput.setTitle(getString(R.string.quantityReviewed))
|
|
||||||
.setDescription(getString(R.string.quantityToReview))
|
|
||||||
.setOkButton(getString(R.string.accept)) {
|
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
|
||||||
requireActivity().hideKeyboard()
|
|
||||||
}
|
|
||||||
customDialogInput.setValue("")
|
|
||||||
customDialogInput.dismiss()
|
|
||||||
|
|
||||||
}.setKoButton(getString(R.string.cancel)) {
|
|
||||||
|
|
||||||
customDialogInput.dismiss()
|
|
||||||
|
|
||||||
}.setValue("").show()
|
|
||||||
*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}, object : OnImageTrashClickListener {
|
}, object : OnImageTrashClickListener {
|
||||||
override fun OnImageTrashClickListener(item: Any) {
|
override fun OnImageTrashClickListener(item: Any) {
|
||||||
d("VERDNATURA::", "Seleccionado trash" + (item as ItemSupplier).name)
|
d("VERDNATURA::", "Seleccionado trash" + (item as ItemSupplier).name)
|
||||||
printCustomDialog("delete")
|
showCustomDialog("delete", item)
|
||||||
}
|
}
|
||||||
|
|
||||||
}, object : OnEditSubQuantityListener {
|
}, object : OnEditSubQuantityListener {
|
||||||
|
@ -164,31 +156,49 @@ class PackagingCountFragment(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun printCustomDialog(action: String) {
|
private fun showCustomDialog(action: String, item: ItemSupplier) {
|
||||||
|
|
||||||
when (action) {
|
when (action) {
|
||||||
"quantity" -> {
|
"quantity" -> {
|
||||||
|
customDialogInput.getEditText().setRawInputType(InputType.TYPE_CLASS_NUMBER)
|
||||||
|
// customDialogInput.getEditText().inputType = InputType.TYPE_CLASS_NUMBER
|
||||||
customDialogInput.setTitle(getString(R.string.quantityReviewed))
|
customDialogInput.setTitle(getString(R.string.quantityReviewed))
|
||||||
.setDescription(getString(R.string.Indicanuevacantidad))
|
.setDescription(getString(R.string.Indicanuevacantidad))
|
||||||
.setOkButton(getString(R.string.accept)) {
|
.setOkButton(getString(R.string.accept)) {
|
||||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||||
requireActivity().hideKeyboard()
|
requireActivity().hideKeyboard()
|
||||||
}
|
}
|
||||||
customDialogInput.setValue("")
|
|
||||||
|
/* println("Cantidad total stickers ${item.quantityTotal}")
|
||||||
|
println("Cantidad entrada ${item.quantity}")
|
||||||
|
println("cantidad" + customDialogInput.getValue().toInt())
|
||||||
|
println("suma:"+item.quantity!!.plus(customDialogInput.getValue().toInt()))*/
|
||||||
|
|
||||||
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
viewModel.entry_addFromBuy(
|
||||||
|
getDataInt("ENTRYID"), item = item.id!!.toInt(),
|
||||||
|
(if (getData("ENTRYTYPE") == "Rec") {
|
||||||
|
(item.quantity!!.plus(customDialogInput.getValue().toInt()))
|
||||||
|
} else {
|
||||||
|
item.quantity!!.plus(customDialogInput.getValue().toInt() * -1)
|
||||||
|
}) as Number
|
||||||
|
)
|
||||||
customDialog.cancel()
|
customDialog.cancel()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
requireActivity().showKeyboard()
|
customDialogInput.setValue("")
|
||||||
|
// requireActivity().showKeyboard()
|
||||||
}.setKoButton(getString(R.string.cancel)) {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialog.cancel()
|
customDialog.cancel()
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
requireActivity().showKeyboard()
|
// requireActivity().showKeyboard()
|
||||||
}.setValue("")
|
}.setValue("")
|
||||||
.show()
|
.show()
|
||||||
|
|
||||||
customDialogInput.setInputText()
|
|
||||||
|
|
||||||
customDialogInput.currentFocus
|
customDialogInput.currentFocus
|
||||||
customDialogInput.setFocusText()
|
customDialogInput.setFocusText()
|
||||||
//requireActivity().showKeyboard()
|
// requireActivity().showKeyboard()
|
||||||
}
|
}
|
||||||
"delete" -> {
|
"delete" -> {
|
||||||
customDialog.setTitle(getString(R.string.deleteEntryReviewed))
|
customDialog.setTitle(getString(R.string.deleteEntryReviewed))
|
||||||
|
@ -201,7 +211,11 @@ class PackagingCountFragment(
|
||||||
) {
|
) {
|
||||||
customDialog.cancel()
|
customDialog.cancel()
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
d("VERDNATURA::", "borrado")
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
viewModel.entry_addFromBuy(
|
||||||
|
getDataInt("ENTRYID"), item = item.id!!.toInt(),
|
||||||
|
0
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
.setKoButton(getString(R.string.cancel)) {
|
.setKoButton(getString(R.string.cancel)) {
|
||||||
|
@ -217,7 +231,6 @@ class PackagingCountFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,80 +4,44 @@ import android.graphics.drawable.Drawable
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.widget.ImageView
|
import android.widget.ImageView
|
||||||
import androidx.core.widget.addTextChangedListener
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentPackagingSummaryBinding
|
import es.verdnatura.databinding.FragmentPackagingSummaryBinding
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.*
|
import es.verdnatura.presentation.common.*
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
import es.verdnatura.presentation.view.feature.packaging.adapter.ItemSupplierAdapter
|
||||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingViewModel.PackagingViewModel
|
||||||
import es.verdnatura.presentation.view.feature.articulo.adapter.BarcodeAdapter
|
|
||||||
import es.verdnatura.presentation.view.feature.articulo.model.BarcodeVO
|
|
||||||
import es.verdnatura.presentation.view.feature.inventario.fragment.InventaryViewModel
|
|
||||||
import es.verdnatura.presentation.view.feature.inventario.fragment.SearchDepartmentModel
|
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.adapter.WorkermistakeAdapter
|
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.model.DepartmentMistake
|
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.model.MistakeWorkerType
|
|
||||||
import es.verdnatura.presentation.view.feature.workermistake.model.WorkerFromMistake
|
|
||||||
import ir.mirrajabi.searchdialog.SimpleSearchDialogCompat
|
|
||||||
|
|
||||||
|
|
||||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||||
class PackagingSummaryFragment(
|
class PackagingSummaryFragment(
|
||||||
var entryPoint: String = ""
|
var entryPoint: String = ""
|
||||||
|
|
||||||
) : BaseFragment<FragmentPackagingSummaryBinding, InventaryViewModel>(
|
) : BaseFragment<FragmentPackagingSummaryBinding, PackagingViewModel>(
|
||||||
InventaryViewModel::class
|
PackagingViewModel::class
|
||||||
) {
|
) {
|
||||||
|
private var adapteritemsupplier: ItemSupplierAdapter? = null
|
||||||
private var adapterworker: WorkermistakeAdapter? = null
|
|
||||||
|
|
||||||
private lateinit var customDialogInput: CustomDialogInput
|
|
||||||
|
|
||||||
|
|
||||||
private var listWorker: MutableList<WorkerFromMistake> = ArrayList()
|
|
||||||
private var listWorkerAuxiliary: MutableList<WorkerFromMistake> = ArrayList()
|
|
||||||
private lateinit var customDialog: CustomDialog
|
private lateinit var customDialog: CustomDialog
|
||||||
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
|
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
|
||||||
private var layoutManager: LinearLayoutManager? = null
|
private var layoutManager: LinearLayoutManager? = null
|
||||||
|
|
||||||
private lateinit var customDialogList: CustomDialogList
|
|
||||||
private var listMistakes: ArrayList<BarcodeVO> = ArrayList()
|
|
||||||
private var listMistakesAdapter: BarcodeAdapter? = null
|
|
||||||
private var workerMistakeName: WorkerFromMistake? = null
|
|
||||||
|
|
||||||
|
|
||||||
private val departments = ArrayList<SearchDepartmentModel>()
|
|
||||||
private lateinit var departmentId: String
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance(entryPoint: String) = PackagingSummaryFragment(entryPoint)
|
fun newInstance(entryPoint: String) = PackagingSummaryFragment(entryPoint)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getLayoutId(): Int = R.layout.fragment_packaging_summary
|
override fun getLayoutId(): Int = R.layout.fragment_packaging_summary
|
||||||
|
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
|
|
||||||
binding.totalImages.text = getData("ENTRYNUMBERIMAGES")
|
|
||||||
binding.observations.text=getData("ENTRYOBSERVATIONS")
|
|
||||||
|
|
||||||
departmentId = getData(DEPARTMENTMISTAKEID)
|
|
||||||
customDialogList = CustomDialogList(requireContext())
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!departmentId.isEmpty()) {
|
|
||||||
viewModel.worker_getFromHasMistake(
|
|
||||||
getData(DEPARTMENTMISTAKEID).toInt()
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
customDialogInput = CustomDialogInput(requireContext())
|
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
|
binding.totalImages.text = getData("ENTRYNUMBERIMAGES")
|
||||||
|
binding.observations.text = getData("ENTRYOBSERVATIONS")
|
||||||
|
|
||||||
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
viewModel.getItemsPackaging(
|
||||||
|
getDataInt("SUPPLIERID"), getDataInt("ENTRYID")
|
||||||
|
)
|
||||||
|
|
||||||
ma.hideBottomNavigation(View.GONE)
|
ma.hideBottomNavigation(View.GONE)
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
setToolBar()
|
setToolBar()
|
||||||
|
@ -87,7 +51,7 @@ class PackagingSummaryFragment(
|
||||||
|
|
||||||
private fun setToolBar() {
|
private fun setToolBar() {
|
||||||
|
|
||||||
binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ":" + getData("SUPPLIERNAME")
|
binding.mainToolbar.toolbarTitle.text = getData("ENTRYTYPE") + ": " + getData("SUPPLIERNAME")
|
||||||
|
|
||||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||||
val iconConfirm = ImageView(context)
|
val iconConfirm = ImageView(context)
|
||||||
|
@ -102,7 +66,7 @@ class PackagingSummaryFragment(
|
||||||
override fun onOptionsItemSelected(item: Drawable) {
|
override fun onOptionsItemSelected(item: Drawable) {
|
||||||
when (item) {
|
when (item) {
|
||||||
iconConfirm.drawable -> {
|
iconConfirm.drawable -> {
|
||||||
// TODO()
|
showWarning()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -126,149 +90,43 @@ class PackagingSummaryFragment(
|
||||||
override fun observeViewModel() {
|
override fun observeViewModel() {
|
||||||
with(viewModel) {
|
with(viewModel) {
|
||||||
|
|
||||||
|
itemSupplierList.observe(viewLifecycleOwner) {
|
||||||
mistakeDepartmentList.observe(viewLifecycleOwner) {
|
|
||||||
binding.splashProgress.visibility = View.GONE
|
binding.splashProgress.visibility = View.GONE
|
||||||
createDepartmentList(it.list)
|
var mySummaryList = it.list.filter { it.quantity > 0 }
|
||||||
|
adapteritemsupplier =
|
||||||
}
|
ItemSupplierAdapter(mySummaryList, null, null, null, showItems = false)
|
||||||
workerFromMistakeList.observe(viewLifecycleOwner) {
|
binding.itemsupplierRecyclerview.adapter = adapteritemsupplier
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
createWorkerList(it.list)
|
|
||||||
|
|
||||||
adapterworker =
|
|
||||||
WorkermistakeAdapter(listWorker, object : onMistakeWorkerClickListener {
|
|
||||||
|
|
||||||
override fun onMistakeWorkerClickListener(item: WorkerFromMistake) {
|
|
||||||
viewModel.workerMistakeType_get(
|
|
||||||
)
|
|
||||||
workerMistakeName =
|
|
||||||
WorkerFromMistake(
|
|
||||||
item.id,
|
|
||||||
item.firstName,
|
|
||||||
item.lastName,
|
|
||||||
true,
|
|
||||||
""
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
binding.workermistakeRecyclerview.adapter = adapterworker
|
|
||||||
layoutManager =
|
layoutManager =
|
||||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
binding.workermistakeRecyclerview.layoutManager = layoutManager
|
binding.itemsupplierRecyclerview.layoutManager = layoutManager
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mistakeWorkerList.observe(viewLifecycleOwner, {
|
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
showMistakeList(it.list)
|
|
||||||
//goBack = false
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
responseAddMistake.observe(viewLifecycleOwner, {
|
|
||||||
|
|
||||||
|
|
||||||
ma.messageWithSound(
|
|
||||||
if (it.isError) {
|
|
||||||
if (it.codeError == 403) {
|
|
||||||
getString(R.string.userNotPermission)
|
|
||||||
} else {
|
|
||||||
it.errorMessage
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
getString(R.string.errorCauseRegistered)
|
|
||||||
}, it.isError, true, isToasted = true
|
|
||||||
)
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
response.observe(viewLifecycleOwner, {
|
|
||||||
if (it.isError) {
|
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun showMistakeList(list: List<MistakeWorkerType>) {
|
private fun showWarning() {
|
||||||
binding.splashProgress.visibility = View.GONE
|
|
||||||
listMistakes = ArrayList()
|
|
||||||
list.forEach {
|
|
||||||
listMistakes.add(BarcodeVO(code = it.description))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
customDialog.setTitle(getString(R.string.sendEntry))
|
||||||
|
customDialog.setTitle(getString(R.string.warningEntry))
|
||||||
|
.setOkButton(
|
||||||
|
getString(
|
||||||
|
R.string.accept
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
customDialog.dismiss()
|
||||||
|
}
|
||||||
|
|
||||||
customDialogList.setTitle(getString(R.string.errorCause) + workerMistakeName!!.firstName)
|
|
||||||
.setKoButton(
|
.setKoButton(
|
||||||
getString(
|
getString(
|
||||||
R.string.cancel
|
R.string.cancel
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
customDialogList.dismiss()
|
customDialog.dismiss()
|
||||||
}.hideDialog().show()
|
}.show()
|
||||||
|
|
||||||
|
|
||||||
listMistakesAdapter =
|
|
||||||
BarcodeAdapter(listMistakes, object : OnBarcodeRowClickListener {
|
|
||||||
override fun onBarcodeRowClickListener(item: BarcodeVO) {
|
|
||||||
list.forEach {
|
|
||||||
if (it.description == item.code) {
|
|
||||||
/* viewModel.workerMistake_Add(
|
|
||||||
vUserFk = workerMistakeName!!.id!!,
|
|
||||||
vTypeFk = it.code
|
|
||||||
)*/
|
|
||||||
// getString(R.string.errorRegistered).toast(requireContext())
|
|
||||||
customDialogList.dismiss()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}, showDelete = false)
|
|
||||||
|
|
||||||
customDialogList.getRecyclerView().adapter = listMistakesAdapter
|
|
||||||
|
|
||||||
customDialogList.getRecyclerView().layoutManager =
|
|
||||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun createDepartmentList(list: List<DepartmentMistake>) {
|
|
||||||
departments.clear()
|
|
||||||
list.forEach { department ->
|
|
||||||
if (!department.isError) {
|
|
||||||
try {
|
|
||||||
departments.add(SearchDepartmentModel(department.name, department.id))
|
|
||||||
} catch (e: Exception) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun createWorkerList(list: List<WorkerFromMistake>) {
|
|
||||||
listWorker.clear()
|
|
||||||
|
|
||||||
list.forEach { worker ->
|
|
||||||
|
|
||||||
if (!worker.isError) {
|
|
||||||
try {
|
|
||||||
listWorker.add(worker)
|
|
||||||
} catch (e: Exception) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
listWorker.add(WorkerFromMistake(0, "Añadir nuevo", "", false))
|
|
||||||
listWorkerAuxiliary.clear()
|
|
||||||
listWorkerAuxiliary.addAll(listWorker)
|
|
||||||
listWorkerAuxiliary.add(WorkerFromMistake(0, "Añadir nuevo", "", false))
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,15 +3,15 @@ package es.verdnatura.presentation.view.feature.packaging.fragment.PackagingView
|
||||||
import android.content.Context
|
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 es.verdnatura.domain.SilexCallback
|
import es.verdnatura.domain.SilexCallback
|
||||||
import es.verdnatura.presentation.base.BaseViewModel
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||||
import es.verdnatura.presentation.base.nameofFunction
|
import es.verdnatura.presentation.base.nameofFunction
|
||||||
|
import es.verdnatura.presentation.common.Event
|
||||||
import es.verdnatura.presentation.common.ResponseItemVO
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
import es.verdnatura.presentation.view.feature.packaging.model.*
|
import es.verdnatura.presentation.view.feature.packaging.model.*
|
||||||
import okhttp3.MultipartBody
|
import okhttp3.MultipartBody
|
||||||
import retrofit2.Call
|
|
||||||
import retrofit2.Callback
|
|
||||||
import retrofit2.Response
|
import retrofit2.Response
|
||||||
|
|
||||||
class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
|
@ -33,10 +33,20 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
val entry: LiveData<EntrySalix>
|
val entry: LiveData<EntrySalix>
|
||||||
get() = _entry
|
get() = _entry
|
||||||
|
|
||||||
|
private val _entryUpdate by lazy { MutableLiveData<EntrySalix>() }
|
||||||
|
val entryUpdate: LiveData<EntrySalix>
|
||||||
|
get() = _entryUpdate
|
||||||
|
|
||||||
|
private val _entryAdd by lazy { MutableLiveData<EntrySalix>() }
|
||||||
|
val entryAdd: LiveData<EntrySalix>
|
||||||
|
get() = _entryAdd
|
||||||
|
|
||||||
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
|
private val _response by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
val response: LiveData<ResponseItemVO>
|
val response: LiveData<ResponseItemVO>
|
||||||
get() = _response
|
get() = _response
|
||||||
|
|
||||||
|
val loadEntryAdd = Transformations.map(_entryAdd) { Event(it) }
|
||||||
|
|
||||||
fun getSuppliers() {
|
fun getSuppliers() {
|
||||||
salix.getSuppliers()
|
salix.getSuppliers()
|
||||||
.enqueue(object :
|
.enqueue(object :
|
||||||
|
@ -78,7 +88,7 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getEntries_fromSupplier(supplier: Int) {
|
fun getEntries_fromSupplier(supplier: Int) {
|
||||||
salix.getEntries_fromSupplier("""{"where": {"supplierFk": "$supplier","isReceived":"false"},"limit":5}""")
|
salix.getEntries_fromSupplier("""{"where": {"supplierFk": "$supplier"},"limit":5, "order":"created DESC"}""")
|
||||||
.enqueue(object :
|
.enqueue(object :
|
||||||
SilexCallback<List<EntrySalix>>(context) {
|
SilexCallback<List<EntrySalix>>(context) {
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
|
@ -180,6 +190,37 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun entry_updateObserv(entryId: Int, observation: String) {
|
||||||
|
salix.entry_updateObserv(entryId,obervationEntry(observation))
|
||||||
|
.enqueue(object :
|
||||||
|
SilexCallback<EntrySalix>(context) {
|
||||||
|
override fun onError(t: Throwable) {
|
||||||
|
_entryUpdate.value = EntrySalix(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
t.message!!
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSuccess(response: Response<EntrySalix>) {
|
||||||
|
if (response.body() != null) {
|
||||||
|
_entryUpdate.value = response.body()
|
||||||
|
} else {
|
||||||
|
_entryUpdate.value = EntrySalix(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
fun entry_uploadPhotoSalix(id: Number, warehouseId: Number, companyId: Number, dmsTypeId: Number, reference: String, description: String, hasFile: Boolean, file: MultipartBody.Part) {
|
fun entry_uploadPhotoSalix(id: Number, warehouseId: Number, companyId: Number, dmsTypeId: Number, reference: String, description: String, hasFile: Boolean, file: MultipartBody.Part) {
|
||||||
salix.uploadEntryPhoto(id, warehouseId, companyId, dmsTypeId, reference, description, hasFile, file)
|
salix.uploadEntryPhoto(id, warehouseId, companyId, dmsTypeId, reference, description, hasFile, file)
|
||||||
.enqueue(object : SilexCallback<Any>(context){})
|
.enqueue(object : SilexCallback<Any>(context){})
|
||||||
|
@ -187,6 +228,89 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
|
|
||||||
fun entry_addFromBuy(id: Number, item: Number, printedStickers: Number) {
|
fun entry_addFromBuy(id: Number, item: Number, printedStickers: Number) {
|
||||||
salix.addFromBuy(id, item, printedStickers)
|
salix.addFromBuy(id, item, printedStickers)
|
||||||
.enqueue(object : SilexCallback<Any>(context){})
|
.enqueue(object : SilexCallback<EntrySalix>(context){override fun onError(t: Throwable) {
|
||||||
|
_entryAdd.value = EntrySalix(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
t.message!!
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSuccess(response: Response<EntrySalix>) {
|
||||||
|
if (response.body() != null) {
|
||||||
|
_entryAdd.value = response.body()
|
||||||
|
} else {
|
||||||
|
_entryAdd.value = EntrySalix(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fun entry_addFromPackaging(supplier: Number,isPackaging: Boolean) {
|
||||||
|
salix.addFromPackaging(supplier, isPackaging)
|
||||||
|
.enqueue(object : SilexCallback<EntrySalix>(context) {
|
||||||
|
override fun onError(t: Throwable) {
|
||||||
|
_entryAdd.value = EntrySalix(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
t.message!!
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSuccess(response: Response<EntrySalix>) {
|
||||||
|
if (response.body() != null) {
|
||||||
|
_entryAdd.value = response.body()
|
||||||
|
} else {
|
||||||
|
_entryAdd.value = EntrySalix(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
fun getItemsPackaging(supplierId: Int,entryId: Int) {
|
||||||
|
salix.getItemsPackaging(supplierId, entryId)
|
||||||
|
.enqueue(object : SilexCallback<List<ItemSupplier>>(context){
|
||||||
|
override fun onError(t: Throwable) {
|
||||||
|
val listError: ArrayList<ItemSupplier> = ArrayList()
|
||||||
|
listError.add(
|
||||||
|
ItemSupplier(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
t.message!!
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
_itemSupplierList.value = itemSupplierList(listError)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onSuccess(response: Response<List<ItemSupplier>>) {
|
||||||
|
if (response.body() != null) {
|
||||||
|
_itemSupplierList.value =
|
||||||
|
response.body()?.let { itemSupplierList(it) }
|
||||||
|
} else {
|
||||||
|
val listError: ArrayList<ItemSupplier> = ArrayList()
|
||||||
|
listError.add(ItemSupplier(null, null))
|
||||||
|
_itemSupplierList.value = itemSupplierList(listError)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,27 +1,22 @@
|
||||||
package es.verdnatura.presentation.view.feature.packaging.fragment
|
package es.verdnatura.presentation.view.feature.packaging.fragment
|
||||||
|
|
||||||
import android.content.ContentResolver
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.net.Uri
|
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log.d
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import es.verdnatura.R
|
import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.FragmentPackagingBinding
|
import es.verdnatura.databinding.FragmentPackagingBinding
|
||||||
|
import es.verdnatura.domain.notNull
|
||||||
import es.verdnatura.presentation.base.BaseFragment
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||||
import es.verdnatura.presentation.common.convertToDateString
|
import es.verdnatura.presentation.common.convertToDateString
|
||||||
import es.verdnatura.presentation.view.component.CustomDialog
|
import es.verdnatura.presentation.view.component.CustomDialog
|
||||||
import es.verdnatura.presentation.view.feature.inventario.fragment.SearchSupplierModel
|
import es.verdnatura.presentation.view.feature.inventario.fragment.SearchSupplierModel
|
||||||
import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingViewModel.PackagingViewModel
|
import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingViewModel.PackagingViewModel
|
||||||
|
import es.verdnatura.presentation.view.feature.packaging.model.EntrySalix
|
||||||
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
|
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
|
||||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||||
import ir.mirrajabi.searchdialog.SimpleSearchDialogCompat
|
import ir.mirrajabi.searchdialog.SimpleSearchDialogCompat
|
||||||
import okhttp3.MediaType
|
|
||||||
import okhttp3.MultipartBody
|
|
||||||
import okhttp3.RequestBody
|
|
||||||
import java.io.File
|
|
||||||
|
|
||||||
|
|
||||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||||
|
@ -40,6 +35,7 @@ class SupplierFragment(
|
||||||
private lateinit var customDialog: CustomDialog
|
private lateinit var customDialog: CustomDialog
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun newInstance(entryPoint: String) = SupplierFragment(entryPoint)
|
fun newInstance(entryPoint: String) = SupplierFragment(entryPoint)
|
||||||
}
|
}
|
||||||
|
@ -55,24 +51,21 @@ class SupplierFragment(
|
||||||
|
|
||||||
viewModel.getSuppliers()
|
viewModel.getSuppliers()
|
||||||
|
|
||||||
/* viewModel.getSuppliers(
|
|
||||||
)*/
|
|
||||||
|
|
||||||
val drawableId: Int =
|
val drawableId: Int =
|
||||||
R.drawable.background_test // Reemplaza "mi_drawable" con el nombre de tu recurso Drawable
|
R.drawable.background_test // Reemplaza "mi_drawable" con el nombre de tu recurso Drawable
|
||||||
|
|
||||||
|
|
||||||
/* val uri: Uri = Uri.parse(
|
/* val uri: Uri = Uri.parse(
|
||||||
ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
|
ContentResolver.SCHEME_ANDROID_RESOURCE + "://" +
|
||||||
context!!.resources.getResourcePackageName(drawableId) + '/' +
|
context!!.resources.getResourcePackageName(drawableId) + '/' +
|
||||||
context!!.resources.getResourceTypeName(drawableId) + '/' +
|
context!!.resources.getResourceTypeName(drawableId) + '/' +
|
||||||
context!!.resources.getResourceEntryName(drawableId)
|
context!!.resources.getResourceEntryName(drawableId)
|
||||||
)
|
)
|
||||||
|
|
||||||
val rutaAbsoluta: String = uri.toString()*/
|
|
||||||
|
|
||||||
|
val rutaAbsoluta: String = uri.toString()*/
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
val file = File("/storage/emulated/0/Android/data/es.verdnatura.sfusion/files/Pictures/test.png")
|
val file = File("/storage/emulated/0/Android/data/es.verdnatura.sfusion/files/Pictures/test.png")
|
||||||
val filePart = MultipartBody.Part.createFormData(
|
val filePart = MultipartBody.Part.createFormData(
|
||||||
"file",
|
"file",
|
||||||
|
@ -88,7 +81,7 @@ class SupplierFragment(
|
||||||
"Example description",
|
"Example description",
|
||||||
false,
|
false,
|
||||||
file = filePart
|
file = filePart
|
||||||
)
|
)*/
|
||||||
// viewModel.entry_addFromBuy(8,1,100)
|
// viewModel.entry_addFromBuy(8,1,100)
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
}
|
}
|
||||||
|
@ -113,12 +106,12 @@ class SupplierFragment(
|
||||||
binding.filterSupplier.setText((nombre.getName()))
|
binding.filterSupplier.setText((nombre.getName()))
|
||||||
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
|
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
|
||||||
saveData("SUPPLIERNAME", nombre.getName())
|
saveData("SUPPLIERNAME", nombre.getName())
|
||||||
saveData("SUPPLIERID", nombre.getId())
|
saveDataInt("SUPPLIERID", nombre.getId().toInt())
|
||||||
viewModel.getEntries_fromSupplier(nombre.getId().toInt())
|
viewModel.getEntries_fromSupplier(nombre.getId().toInt())
|
||||||
baseSearchDialogCompat.dismiss()
|
baseSearchDialogCompat.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
customDialog = CustomDialog(requireContext())
|
||||||
ma.hideBottomNavigation(View.GONE)
|
ma.hideBottomNavigation(View.GONE)
|
||||||
setToolBar()
|
setToolBar()
|
||||||
setEvents()
|
setEvents()
|
||||||
|
@ -135,46 +128,7 @@ class SupplierFragment(
|
||||||
binding.mainToolbar.backButton.setOnClickListener {
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
requireActivity().onBackPressed()
|
requireActivity().onBackPressed()
|
||||||
}
|
}
|
||||||
/*binding.filterEntry.setOnClickListener {
|
|
||||||
|
|
||||||
val builder = AlertDialog.Builder(context)
|
|
||||||
builder.setTitle(getString(R.string.selectEntryToFill))
|
|
||||||
val labelCount = arrayOf("Entrada 1", "Entrada 2", "Añadir Nueva")
|
|
||||||
builder.setItems(labelCount) { dialog, which ->
|
|
||||||
|
|
||||||
if (labelCount[which] == "Añadir Nueva") {
|
|
||||||
customDialog = CustomDialog(requireContext())
|
|
||||||
customDialog.setTitle(getString(R.string.newEntry))
|
|
||||||
.setDescription(getString(R.string.confirmEntry))
|
|
||||||
.setOkButton(
|
|
||||||
getString(
|
|
||||||
R.string.createEntry
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
d("VERDNATURA::", "borrado")
|
|
||||||
}
|
|
||||||
|
|
||||||
.setKoButton(getString(R.string.cancel)) {
|
|
||||||
customDialog.cancel()
|
|
||||||
customDialog.dismiss()
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
customDialog.show()
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
ma.onPasillerosItemClickListener(
|
|
||||||
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
|
||||||
getString(R.string.titlePackagingCount)
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
val dialog = builder.create()
|
|
||||||
dialog.show()
|
|
||||||
|
|
||||||
}*/
|
|
||||||
|
|
||||||
binding.radiobuttonTypePackaging.setOnCheckedChangeListener { buttonView, isChecked ->
|
binding.radiobuttonTypePackaging.setOnCheckedChangeListener { buttonView, isChecked ->
|
||||||
when (isChecked) {
|
when (isChecked) {
|
||||||
|
@ -188,14 +142,6 @@ class SupplierFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
binding.filterEntry.visibility = View.VISIBLE
|
binding.filterEntry.visibility = View.VISIBLE
|
||||||
if (!onBack) {
|
|
||||||
ma.onPasillerosItemClickListener(
|
|
||||||
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
|
||||||
getString(R.string.titlePackagingCount)
|
|
||||||
)
|
|
||||||
|
|
||||||
}
|
|
||||||
onBack = false
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -211,12 +157,16 @@ class SupplierFragment(
|
||||||
) { baseSearchDialogCompat, nombre, position ->
|
) { baseSearchDialogCompat, nombre, position ->
|
||||||
binding.filterEntry.setText((nombre.getName()))
|
binding.filterEntry.setText((nombre.getName()))
|
||||||
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
|
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
|
||||||
saveData("ENTRYID", nombre.getId())
|
|
||||||
d("VERDNATURA::","Ha seleccionado:"+nombre.getId())
|
if (nombre.getName() == getString(R.string.newEntry)) {
|
||||||
ma.onPasillerosItemClickListener(
|
addEntry()
|
||||||
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
} else {
|
||||||
getString(R.string.titlePackagingCount)
|
saveDataInt("ENTRYID", nombre.getId().toInt())
|
||||||
)
|
ma.onPasillerosItemClickListener(
|
||||||
|
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
||||||
|
getString(R.string.titlePackagingCount)
|
||||||
|
)
|
||||||
|
}
|
||||||
baseSearchDialogCompat.dismiss()
|
baseSearchDialogCompat.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
}
|
}
|
||||||
|
@ -241,15 +191,46 @@ class SupplierFragment(
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
entry.observe(viewLifecycleOwner) {
|
|
||||||
binding.splashProgress.visibility=View.GONE
|
loadEntryAdd.observe(viewLifecycleOwner) { event ->
|
||||||
println("Entrada")
|
event.getContentIfNotHandled().notNull {
|
||||||
|
binding.splashProgress.visibility = View.INVISIBLE
|
||||||
|
if (it.isError) {
|
||||||
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
saveDataInt("ENTRYID", it.id!!.toInt())
|
||||||
|
ma.onPasillerosItemClickListener(
|
||||||
|
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
||||||
|
it.id!!.toString()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* entryAdd.observe(viewLifecycleOwner) {
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
|
|
||||||
}else{
|
} else {
|
||||||
saveDataInt("ENTRY", it.id!!)
|
saveDataInt("ENTRYID", it.id!!.toInt())
|
||||||
println("Entrada"+it.id)
|
ma.onPasillerosItemClickListener(
|
||||||
|
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
||||||
|
it.id!!.toString()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
|
entry.observe(viewLifecycleOwner) {
|
||||||
|
binding.splashProgress.visibility = View.GONE
|
||||||
|
if (it.isError) {
|
||||||
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
|
|
||||||
|
} else {
|
||||||
|
saveDataInt("ENTRYID", it.id!!.toInt())
|
||||||
ma.onPasillerosItemClickListener(
|
ma.onPasillerosItemClickListener(
|
||||||
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
||||||
getString(R.string.titlePackagingCount)
|
getString(R.string.titlePackagingCount)
|
||||||
|
@ -279,8 +260,8 @@ class SupplierFragment(
|
||||||
try {
|
try {
|
||||||
entries.add(
|
entries.add(
|
||||||
SearchSupplierModel(
|
SearchSupplierModel(
|
||||||
entry.id.toString() + "->" + convertToDateString( entry.dated.toString()),
|
entry.id.toString() + "->" + convertToDateString(entry.created),
|
||||||
id = entry.id.toString()
|
id = entry.id.toString()
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
|
@ -288,19 +269,38 @@ class SupplierFragment(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
entries.add(SearchSupplierModel("Añadir Nueva", ""))
|
entries.add(SearchSupplierModel(getString(R.string.newEntry), ""))
|
||||||
setEntryDialog()
|
setEntryDialog()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun addEntry(){
|
private fun addEntry() {
|
||||||
|
|
||||||
|
customDialog.setTitle(getString(R.string.createEntryDescrip))
|
||||||
|
.setDescription(getString(R.string.sure))
|
||||||
|
.setOkButton(
|
||||||
|
getString(
|
||||||
|
R.string.accept
|
||||||
|
)
|
||||||
|
|
||||||
|
) {
|
||||||
|
customDialog.cancel()
|
||||||
|
customDialog.dismiss()
|
||||||
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
viewModel.entry_addFromPackaging(
|
||||||
|
getDataInt("SUPPLIERID"),
|
||||||
|
getData("ENTRYTYPE") == "Rec"
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.setKoButton(getString(R.string.cancel)) {
|
||||||
|
customDialog.cancel()
|
||||||
|
customDialog.dismiss()
|
||||||
|
|
||||||
|
|
||||||
if (getData("ENTRYTYPE" )=="Rec"){
|
}
|
||||||
viewModel.entry_addSalix(EntrySalix(supplierFk = getData("SUPPLIERID").toInt(), travelFk = 186025, companyFk = 442))
|
.show()
|
||||||
}else{
|
|
||||||
viewModel.entry_addSalix(EntrySalix(supplierFk = getData("SUPPLIERID").toInt(), travelFk = 186025, companyFk = 442))
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
package es.verdnatura.presentation.view.feature.packaging.model
|
package es.verdnatura.presentation.view.feature.packaging.model
|
||||||
|
|
||||||
import android.content.Context
|
|
||||||
import es.verdnatura.presentation.common.convertToDateString
|
import es.verdnatura.presentation.common.convertToDateString
|
||||||
import java.util.ArrayList
|
|
||||||
|
|
||||||
class EntrySalix(
|
class EntrySalix(
|
||||||
var id: Int? = null,
|
var id: Number? = null,
|
||||||
var dated: String? = null,
|
var dated: String? = null,
|
||||||
var supplierFk: Int? = null,
|
var created: String? = null,
|
||||||
var travelFk: Int? = null,
|
var supplierFk: Number? = null,
|
||||||
var companyFk: Int? = null,
|
var travelFk: Number? = null,
|
||||||
|
var companyFk: Number? = null,
|
||||||
var isError: Boolean = false,
|
var isError: Boolean = false,
|
||||||
var errorMessage: String = ""
|
var errorMessage: String = ""
|
||||||
)
|
)
|
||||||
|
@ -20,9 +19,14 @@ fun List<EntrySalix>.toDateFormat(): ArrayList<EntrySalix> {
|
||||||
entries.add(
|
entries.add(
|
||||||
EntrySalix(
|
EntrySalix(
|
||||||
dated = convertToDateString(it.dated),
|
dated = convertToDateString(it.dated),
|
||||||
|
created = convertToDateString(it.created)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
return entries.sortedBy{it.dated} as ArrayList
|
return entries.sortedBy { it.dated } as ArrayList
|
||||||
}
|
}
|
||||||
|
|
||||||
|
data class obervationEntry(
|
||||||
|
val observation:String
|
||||||
|
)
|
|
@ -21,8 +21,8 @@ class itemSupplierList(
|
||||||
data class ItemSupplier(
|
data class ItemSupplier(
|
||||||
var id: Int? = null,
|
var id: Int? = null,
|
||||||
var name: String? = null,
|
var name: String? = null,
|
||||||
var quantity: Int? = 0,
|
var quantity: Int = 0,
|
||||||
var quantityTotal: Int? = 0,
|
var quantityTotal: Int = 0,
|
||||||
var buy: Int? = null,
|
var buy: Int? = null,
|
||||||
var isError: Boolean = false,
|
var isError: Boolean = false,
|
||||||
var errorMessage: String? = null
|
var errorMessage: String? = null
|
||||||
|
|
|
@ -499,13 +499,13 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
//#tarea4021
|
//#tarea4021
|
||||||
_pasillerositem.add(
|
_pasillerositem.add(
|
||||||
PasillerosItemVO(
|
PasillerosItemVO(
|
||||||
6,
|
6,
|
||||||
R.drawable.ic_packaging,
|
R.drawable.ic_packaging_entries,
|
||||||
contextApp.getString(R.string.titlePackaging),
|
contextApp.getString(R.string.titlePackaging),
|
||||||
R.string.titlePackaging,
|
R.string.titlePackaging,
|
||||||
contextApp.getString(R.string.titlePackagingDescrip)
|
contextApp.getString(R.string.titlePackagingDescrip)
|
||||||
|
@ -519,7 +519,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
||||||
R.string.titlePhotos,
|
R.string.titlePhotos,
|
||||||
contextApp.getString(R.string.titlePhotos)
|
contextApp.getString(R.string.titlePhotos)
|
||||||
)
|
)
|
||||||
)*/
|
)
|
||||||
|
|
||||||
val working_in_test=false
|
val working_in_test=false
|
||||||
if (working_in_test){
|
if (working_in_test){
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="960"
|
||||||
|
android:viewportHeight="960"
|
||||||
|
>
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M120,920L120,40L180,40L180,120L780,120L780,40L840,40L840,920L780,920L780,840L180,840L180,920L120,920ZM180,451L290,451L290,291L510,291L510,451L780,451L780,180L180,180L180,451ZM180,780L450,780L450,620L670,620L670,780L780,780L780,511L180,511L180,780ZM350,451L450,451L450,351L350,351L350,451ZM510,780L610,780L610,680L510,680L510,780ZM350,451L350,451L450,451L450,451L350,451ZM510,780L510,780L610,780L610,780L510,780Z"/>
|
||||||
|
</vector>
|
|
@ -39,6 +39,7 @@
|
||||||
android:textColor="#FFF"
|
android:textColor="#FFF"
|
||||||
android:textSize="18dp"
|
android:textSize="18dp"
|
||||||
android:drawableEnd="@drawable/ic_add_black_24dp"
|
android:drawableEnd="@drawable/ic_add_black_24dp"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintStart_toEndOf="@+id/observations"
|
app:layout_constraintStart_toEndOf="@+id/observations"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/observations" />
|
app:layout_constraintTop_toBottomOf="@+id/observations" />
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
|
@ -50,6 +51,7 @@
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
android:paddingLeft="@dimen/layout_margin_min"
|
||||||
android:paddingRight="@dimen/layout_margin_min"
|
android:paddingRight="@dimen/layout_margin_min"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/openPickerImages" >
|
app:layout_constraintTop_toBottomOf="@+id/openPickerImages" >
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +63,7 @@
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="Añadir nueva..."
|
android:text="Añadir nueva..."
|
||||||
android:visibility="gone"
|
android:visibility="visible"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/body2" />
|
android:textSize="@dimen/body2" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -70,7 +72,7 @@
|
||||||
android:id="@+id/listImagesRecycler"
|
android:id="@+id/listImagesRecycler"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="550dp"
|
android:layout_height="550dp"
|
||||||
android:visibility="visible"
|
android:visibility="gone"
|
||||||
app:layout_constraintStart_toEndOf="@+id/textImages"
|
app:layout_constraintStart_toEndOf="@+id/textImages"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/textImages"
|
app:layout_constraintTop_toBottomOf="@+id/textImages"
|
||||||
tools:listitem="@layout/item_image_row"
|
tools:listitem="@layout/item_image_row"
|
||||||
|
@ -91,7 +93,7 @@
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
android:background="@color/verdnatura_black_8_alpha_6"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="visible"
|
android:visibility="invisible"
|
||||||
tools:layout_editor_absoluteX="0dp"
|
tools:layout_editor_absoluteX="0dp"
|
||||||
tools:layout_editor_absoluteY="0dp">
|
tools:layout_editor_absoluteY="0dp">
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/textinputlayout_username"
|
android:id="@+id/textinputlayout_data"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColorHint="@android:color/darker_gray">
|
android:textColorHint="@android:color/darker_gray">
|
||||||
|
@ -27,207 +27,143 @@
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="horizontal"/>
|
|
||||||
|
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
|
<com.google.android.material.textfield.TextInputEditText
|
||||||
|
android:id="@+id/filter_itemFk"
|
||||||
|
style="@style/InputLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_weight="1.5"
|
||||||
|
android:backgroundTint="@android:color/white"
|
||||||
|
android:hint="Nombre o apellido"
|
||||||
|
android:inputType="text"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textColorHint="@android:color/darker_gray"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/filter_department"
|
||||||
|
style="@style/InputLineTextSearch"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:backgroundTint="@android:color/white"
|
||||||
|
android:drawableEnd="@drawable/ic_arrow_drop_down_black_24dp"
|
||||||
|
android:focusable="false"
|
||||||
|
android:hint="Embalajes"
|
||||||
|
android:inputType="text"
|
||||||
|
android:lines="1"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||||
|
android:textColorHint="@android:color/darker_gray"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
|
||||||
|
</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_min"
|
android:paddingLeft="@dimen/layout_margin_min"
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
android:paddingRight="@dimen/layout_margin_min">
|
||||||
|
|
||||||
<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:layout_weight="0.75"
|
||||||
android:gravity="center"
|
|
||||||
android:text="Descripción"
|
android:text="Descripción"
|
||||||
|
android:textAlignment="viewStart"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/body2" />
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/quantityPackaging"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:gravity="center"
|
||||||
|
android:text="@string/Cantidad"
|
||||||
|
android:visibility="gone"
|
||||||
|
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"
|
android:layout_weight="1"
|
||||||
android:gravity="center"
|
|
||||||
android:text="Total"
|
android:text="Total"
|
||||||
|
android:textAlignment="textStart"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:paddingStart="@dimen/layout_margin_3"
|
||||||
android:textSize="@dimen/body2" />
|
android:textSize="@dimen/body2" />
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="CC ROJO"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textSize="@dimen/body2" />
|
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="220"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textSize="@dimen/body2" />
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="25dp"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:background="@drawable/ic_delete_black_24dp" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
|
||||||
android:paddingRight="@dimen/layout_margin_min" />
|
|
||||||
|
|
||||||
<LinearLayout
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:layout_width="match_parent"
|
android:id="@+id/itemsupplier_recyclerview"
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
android:clipToPadding="false"
|
||||||
android:orientation="horizontal"
|
android:visibility="visible"
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
tools:listitem="@layout/item_itemsupplier_row" />
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
|
||||||
|
|
||||||
<TextView
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:orientation="horizontal"
|
||||||
android:gravity="center"
|
android:layout_marginBottom="@dimen/h5"
|
||||||
android:text="DC"
|
android:layout_marginTop="@dimen/h5">
|
||||||
android:textColor="@color/verdnatura_white"
|
<TextView
|
||||||
android:textSize="@dimen/body2" />
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/attachImage"
|
||||||
|
android:textColor="@color/verdnatura_white"
|
||||||
|
android:textSize="@dimen/body2"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/totalImages"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text=""
|
||||||
|
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||||
|
android:textSize="@dimen/body2"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<TextView
|
</LinearLayout>
|
||||||
android:layout_width="match_parent"
|
<LinearLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_height="wrap_content"
|
||||||
android:gravity="center"
|
android:orientation="horizontal">
|
||||||
android:text="30"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textSize="@dimen/body2" />
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:visibility="gone"
|
|
||||||
android:layout_width="25dp"
|
|
||||||
android:layout_height="25dp"
|
|
||||||
android:background="@drawable/ic_delete_black_24dp" />
|
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
|
||||||
android:paddingRight="@dimen/layout_margin_min" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/layout_total_images"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Imágenes adjuntas:"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/totalImages"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="0"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textSize="@dimen/body2"
|
|
||||||
android:textStyle="bold" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/observa"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Observaciones:"
|
android:text="@string/observations"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textSize="@dimen/body2"
|
android:textSize="@dimen/body2"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold" />
|
||||||
|
|
||||||
<LinearLayout
|
<TextView
|
||||||
android:id="@+id/layout_observations"
|
android:id="@+id/observations"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="@dimen/layout_margin_min"
|
android:hint="@string/observations"
|
||||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||||
android:orientation="horizontal"
|
android:textSize="@dimen/body2"
|
||||||
android:paddingLeft="@dimen/layout_margin_min"
|
android:textStyle="bold" />
|
||||||
android:paddingRight="@dimen/layout_margin_min">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/observations"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="100dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:hint="Observaciones"
|
|
||||||
android:inputType="textCapSentences|textMultiLine"
|
|
||||||
android:textColor="@color/verdnatura_white"
|
|
||||||
android:textColorHint="@android:color/tertiary_text_light"
|
|
||||||
android:visibility="visible"
|
|
||||||
app:layout_constraintStart_toEndOf="@+id/layout_total_images"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/layout_total_images" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
|
||||||
android:id="@+id/workermistake_recyclerview"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:clipToPadding="false"
|
|
||||||
android:visibility="gone"
|
|
||||||
tools:listitem="@layout/item_general_row" />
|
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -238,6 +174,7 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/splash_progress"
|
android:id="@+id/splash_progress"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
@ -245,20 +182,23 @@
|
||||||
android:background="@color/verdnatura_black_8_alpha_6"
|
android:background="@color/verdnatura_black_8_alpha_6"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:visibility="visible"
|
android:visibility="invisible"
|
||||||
tools:layout_editor_absoluteX="0dp"
|
android:textSize="@dimen/body2"
|
||||||
tools:layout_editor_absoluteY="0dp">
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
<com.airbnb.lottie.LottieAnimationView
|
<com.airbnb.lottie.LottieAnimationView
|
||||||
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
android:layout_height="@dimen/verdnatura_logo_large_height"
|
||||||
app:lottie_autoPlay="true"
|
app:lottie_autoPlay="true"
|
||||||
app:lottie_loop="true"
|
app:lottie_loop="true"
|
||||||
app:lottie_rawRes="@raw/orange_loading"
|
app:lottie_rawRes="@raw/orange_loading"
|
||||||
app:lottie_speed="2" />
|
app:lottie_speed="2" />
|
||||||
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</layout>
|
</layout>
|
|
@ -245,7 +245,7 @@
|
||||||
<string name="take">Coger</string>
|
<string name="take">Coger</string>
|
||||||
<string name="errorRegistered">Causa del error registrado</string>
|
<string name="errorRegistered">Causa del error registrado</string>
|
||||||
<string name="printerFault">Falta seleccionar impresora</string>
|
<string name="printerFault">Falta seleccionar impresora</string>
|
||||||
<string name="observations">Observaciones</string>
|
<string name="observations">"Observaciones: "</string>
|
||||||
<string name="scanShelvingHistorical">Escanea matrícula para ver histórico</string>
|
<string name="scanShelvingHistorical">Escanea matrícula para ver histórico</string>
|
||||||
<string name="scanPlate">Escanea matrícula del vehículo</string>
|
<string name="scanPlate">Escanea matrícula del vehículo</string>
|
||||||
<string name="scanPlateTakeoff">Escanea matrícula para dejar vehículo</string>
|
<string name="scanPlateTakeoff">Escanea matrícula para dejar vehículo</string>
|
||||||
|
@ -590,5 +590,18 @@
|
||||||
<string name="checkItemShelving">¿Desea resetear la revisión del carro?</string>
|
<string name="checkItemShelving">¿Desea resetear la revisión del carro?</string>
|
||||||
<string name="item_checking">Al pulsar permite resetear la revisión</string>
|
<string name="item_checking">Al pulsar permite resetear la revisión</string>
|
||||||
<string name="checkItemShelvingDescrip">Revisión del carro</string>
|
<string name="checkItemShelvingDescrip">Revisión del carro</string>
|
||||||
|
<string name="quantityReviewed">Cantidad revisada a sumar/restar del total</string>
|
||||||
|
<string name="deleteEntryReviewed">Vas a borrar la cantidad de la compra de la entrada</string>
|
||||||
|
<string name="quantityToReview">Cantidad a revisar</string>
|
||||||
|
<string name="selectEntryToFill">Selecciona entrada</string>
|
||||||
|
<string name="entryCreate">Crear entrada</string>
|
||||||
|
<string name="entryNew">Añadir nueva</string>
|
||||||
|
<string name="newEntry">Añadir nueva</string>
|
||||||
|
<string name="createEntry">Crear entrada</string>
|
||||||
|
<string name="createEntryDescrip">Va a crear una entrada para el proveedor seleccionado.</string>
|
||||||
|
<string name="warningEntry">Va a notificar la entrada al dpto de Logística</string>
|
||||||
|
<string name="sendEntry">Enviar entrada embalajes</string>
|
||||||
|
<string name="attachImage">"Imágenes: "</string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -245,7 +245,7 @@
|
||||||
<string name="take">Coger</string>
|
<string name="take">Coger</string>
|
||||||
<string name="errorRegistered">Causa del error registrado</string>
|
<string name="errorRegistered">Causa del error registrado</string>
|
||||||
<string name="printerFault">Falta seleccionar impresora</string>
|
<string name="printerFault">Falta seleccionar impresora</string>
|
||||||
<string name="observations">Observaciones</string>
|
<string name="observations">"Observaciones: "</string>
|
||||||
<string name="scanShelvingHistorical">Escanea matrícula para ver histórico</string>
|
<string name="scanShelvingHistorical">Escanea matrícula para ver histórico</string>
|
||||||
<string name="scanPlate">Escanea matrícula del vehículo</string>
|
<string name="scanPlate">Escanea matrícula del vehículo</string>
|
||||||
<string name="scanPlateTakeoff">Escanea matrícula para dejar vehículo</string>
|
<string name="scanPlateTakeoff">Escanea matrícula para dejar vehículo</string>
|
||||||
|
@ -590,5 +590,17 @@
|
||||||
<string name="checkItemShelving">Souhaitez-vous supprimer la révision de la voiture?</string>
|
<string name="checkItemShelving">Souhaitez-vous supprimer la révision de la voiture?</string>
|
||||||
<string name="item_checking">Al pulsar permite resetear la revisión</string>
|
<string name="item_checking">Al pulsar permite resetear la revisión</string>
|
||||||
<string name="checkItemShelvingDescrip">Revisión del carro</string>
|
<string name="checkItemShelvingDescrip">Revisión del carro</string>
|
||||||
|
<string name="quantityReviewed">Cantidad revisada a sumar/restar del total</string>
|
||||||
|
<string name="deleteEntryReviewed">Borrar entrada</string>
|
||||||
|
<string name="quantityToReview">Cantidad a revisar</string>
|
||||||
|
<string name="selectEntryToFill">Selecciona entrada</string>
|
||||||
|
<string name="entryCreate">Crear entrada</string>
|
||||||
|
<string name="entryNew">Añadir nueva</string>
|
||||||
|
<string name="newEntry">Añadir nueva</string>
|
||||||
|
<string name="createEntry">Crear entrada</string>
|
||||||
|
<string name="createEntryDescrip">Va a crear una entrada para el proveedor seleccionado.</string>
|
||||||
|
<string name="warningEntry">Va a notificar la entrada al dpto de Logística</string>
|
||||||
|
<string name="sendEntry">Enviar entrada embalajes</string>
|
||||||
|
<string name="attachImage">"Imágenes: "</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -245,7 +245,7 @@
|
||||||
<string name="take">Coger</string>
|
<string name="take">Coger</string>
|
||||||
<string name="errorRegistered">Causa del error registrado</string>
|
<string name="errorRegistered">Causa del error registrado</string>
|
||||||
<string name="printerFault">Falta seleccionar impresora</string>
|
<string name="printerFault">Falta seleccionar impresora</string>
|
||||||
<string name="observations">Observaciones</string>
|
<string name="observations">"Observaciones: "</string>
|
||||||
<string name="scanShelvingHistorical">Escanea matrícula para ver histórico</string>
|
<string name="scanShelvingHistorical">Escanea matrícula para ver histórico</string>
|
||||||
<string name="scanPlate">Escanea matrícula del vehículo</string>
|
<string name="scanPlate">Escanea matrícula del vehículo</string>
|
||||||
<string name="scanPlateTakeoff">Escanea matrícula para dejar vehículo</string>
|
<string name="scanPlateTakeoff">Escanea matrícula para dejar vehículo</string>
|
||||||
|
@ -590,5 +590,17 @@
|
||||||
<string name="checkItemShelving">Você deseja excluir a revisão do carro?</string>
|
<string name="checkItemShelving">Você deseja excluir a revisão do carro?</string>
|
||||||
<string name="item_checking">Al pulsar permite resetear la revisión</string>
|
<string name="item_checking">Al pulsar permite resetear la revisión</string>
|
||||||
<string name="checkItemShelvingDescrip">Revisión del carro</string>
|
<string name="checkItemShelvingDescrip">Revisión del carro</string>
|
||||||
|
<string name="quantityReviewed">Cantidad revisada a sumar/restar del total</string>
|
||||||
|
<string name="deleteEntryReviewed">Borrar entrada</string>
|
||||||
|
<string name="quantityToReview">Cantidad a revisar</string>
|
||||||
|
<string name="selectEntryToFill">Selecciona entrada</string>
|
||||||
|
<string name="entryCreate">Crear entrada</string>
|
||||||
|
<string name="entryNew">Añadir nueva</string>
|
||||||
|
<string name="newEntry">Añadir nueva</string>
|
||||||
|
<string name="createEntry">Crear entrada</string>
|
||||||
|
<string name="createEntryDescrip">Va a crear una entrada para el proveedor seleccionado.</string>
|
||||||
|
<string name="warningEntry">Va a notificar la entrada al dpto de Logística</string>
|
||||||
|
<string name="sendEntry">Enviar entrada embalajes</string>
|
||||||
|
<string name="attachImage">"Imágenes: "</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -273,7 +273,7 @@
|
||||||
<string name="take">Take</string>
|
<string name="take">Take</string>
|
||||||
<string name="errorRegistered">Cause of error registered</string>
|
<string name="errorRegistered">Cause of error registered</string>
|
||||||
<string name="printerFault">Select printer</string>
|
<string name="printerFault">Select printer</string>
|
||||||
<string name="observations">Observations</string>
|
<string name="observations">"Observaciones: "</string>
|
||||||
<string name="scanShelvingHistorical">Scan plate for looking historical </string>
|
<string name="scanShelvingHistorical">Scan plate for looking historical </string>
|
||||||
<string name="scanPlate">Scan vehicle plate</string>
|
<string name="scanPlate">Scan vehicle plate</string>
|
||||||
<string name="scanPlateTakeoff">"Scan plate to take off "</string>
|
<string name="scanPlateTakeoff">"Scan plate to take off "</string>
|
||||||
|
@ -589,5 +589,17 @@
|
||||||
<string name="checkItemShelving">Do you want to delete the shelving review?</string>
|
<string name="checkItemShelving">Do you want to delete the shelving review?</string>
|
||||||
<string name="item_checking">By pressing it allows resetting the review</string>
|
<string name="item_checking">By pressing it allows resetting the review</string>
|
||||||
<string name="checkItemShelvingDescrip">Shelving checking</string>
|
<string name="checkItemShelvingDescrip">Shelving checking</string>
|
||||||
|
<string name="quantityReviewed">Cantidad revisada a sumar/restar del total</string>
|
||||||
|
<string name="deleteEntryReviewed">Borrar entrada</string>
|
||||||
|
<string name="quantityToReview">Cantidad a revisar</string>
|
||||||
|
<string name="selectEntryToFill">Selecciona entrada</string>
|
||||||
|
<string name="entryCreate">Crear entrada</string>
|
||||||
|
<string name="entryNew">Añadir nueva</string>
|
||||||
|
<string name="createEntry">Crear entrada</string>
|
||||||
|
<string name="newEntry">Añadir nueva</string>
|
||||||
|
<string name="createEntryDescrip">Va a crear una entrada para el proveedor seleccionado.</string>
|
||||||
|
<string name="warningEntry">Va a notificar la entrada al dpto de Logística</string>
|
||||||
|
<string name="sendEntry">Enviar entrada embalajes</string>
|
||||||
|
<string name="attachImage">Imágenes: </string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue