refs #4021 falta fotos, correo y modificación del back
This commit is contained in:
parent
4c59d4cb10
commit
258c4d134b
|
@ -7,11 +7,11 @@
|
|||
<deviceKey>
|
||||
<Key>
|
||||
<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>
|
||||
</deviceKey>
|
||||
</Target>
|
||||
</targetSelectedWithDropDown>
|
||||
<timeTargetWasSelectedWithDropDown value="2023-06-05T13:46:57.531979300Z" />
|
||||
<timeTargetWasSelectedWithDropDown value="2023-06-08T05:09:47.471985800Z" />
|
||||
</component>
|
||||
</project>
|
|
@ -83,10 +83,29 @@
|
|||
</select>
|
||||
</component>
|
||||
<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$/app/beta/release/output-metadata.json" beforeDir="false" afterPath="$PROJECT_DIR$/app/beta/release/output-metadata.json" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/domain/SalixService.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/base/BaseFragment.kt" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/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>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
|
@ -97,7 +116,7 @@
|
|||
<component name="CodeInsightWorkspaceSettings">
|
||||
<option name="optimizeImportsOnTheFly" value="true" />
|
||||
</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">
|
||||
<option name="OPEN_IN_BROWSER" value="true" />
|
||||
<option name="OUTPUT_DIRECTORY" value="C:\Program Files\Android\Android Studio\inspections" />
|
||||
|
@ -232,40 +251,41 @@
|
|||
<option name="showLibraryContents" value="true" />
|
||||
<option name="showMembers" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"ApkExportedModule": "Gestor_Almacén.app",
|
||||
"ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
|
||||
"PROJECT_TRUSTED_KEY": "true",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"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",
|
||||
"cidr.known.project.marker": "true",
|
||||
"com.developerphil.adbidea.selecteddevices": "21114523025303",
|
||||
"com.google.services.firebase.aqiPopupShown": "true",
|
||||
"last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.17",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"run.code.analysis.last.selected.profile": "pProject Default",
|
||||
"settings.editor.selected.configurable": "preferences.sourceCode.Shell Script"
|
||||
<component name="PropertiesComponent">{
|
||||
"keyToString": {
|
||||
"ApkExportedModule": "Gestor_Almacén.app",
|
||||
"ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app",
|
||||
"PROJECT_TRUSTED_KEY": "true",
|
||||
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"RunOnceActivity.cidr.known.project.marker": "true",
|
||||
"SHARE_PROJECT_CONFIGURATION_FILES": "true",
|
||||
"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",
|
||||
"cidr.known.project.marker": "true",
|
||||
"com.developerphil.adbidea.selecteddevices": "21114523025303",
|
||||
"com.google.services.firebase.aqiPopupShown": "true",
|
||||
"last_directory_selection": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
|
||||
"last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable",
|
||||
"project.structure.last.edited": "Modules",
|
||||
"project.structure.proportion": "0.17",
|
||||
"project.structure.side.proportion": "0.2",
|
||||
"run.code.analysis.last.selected.profile": "pProject Default",
|
||||
"settings.editor.selected.configurable": "preferences.sourceCode.Shell Script"
|
||||
},
|
||||
"keyToStringList": {
|
||||
"ExportApk.BuildVariants": [
|
||||
"generalRelease"
|
||||
"keyToStringList": {
|
||||
"ExportApk.BuildVariants": [
|
||||
"generalRelease"
|
||||
],
|
||||
"com.android.tools.idea.sqlite.queryhistory": [
|
||||
"select * from expedition e where e.addressFk= 34915",
|
||||
"select * from expedition e where e.id= 6872921",
|
||||
"select count(*) from expeditionPending\n",
|
||||
"select count(*) from expedition\n",
|
||||
"select count(*) from expedition"
|
||||
"com.android.tools.idea.sqlite.queryhistory": [
|
||||
"select * from expedition e where e.addressFk= 34915",
|
||||
"select * from expedition e where e.id= 6872921",
|
||||
"select count(*) from expeditionPending\n",
|
||||
"select count(*) from expedition\n",
|
||||
"select count(*) from expedition"
|
||||
]
|
||||
}
|
||||
}]]></component>
|
||||
}</component>
|
||||
<component name="PsdUISettings">
|
||||
<option name="MODULE_TAB" value="Default Config" />
|
||||
<option name="LAST_EDITED_SIGNING_CONFIG" value="debug" />
|
||||
|
@ -793,7 +813,7 @@
|
|||
<entry key="branch">
|
||||
<value>
|
||||
<list>
|
||||
<option value="dev" />
|
||||
<option value="4021_embalajes" />
|
||||
</list>
|
||||
</value>
|
||||
</entry>
|
||||
|
@ -882,14 +902,6 @@
|
|||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager>
|
||||
<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">
|
||||
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/ubicador/fragment/UbicadorViewModel.kt</url>
|
||||
<line>457</line>
|
||||
|
|
|
@ -14,7 +14,7 @@ android {
|
|||
minSdkVersion 24 //21
|
||||
targetSdkVersion 33
|
||||
versionCode 200
|
||||
versionName = "23.22.1"
|
||||
versionName = "23.22.1Beta"
|
||||
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.ItemSupplier
|
||||
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.workermistake.model.DepartmentMistake
|
||||
import okhttp3.MultipartBody
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Call
|
||||
import retrofit2.http.*
|
||||
|
||||
|
@ -80,7 +82,7 @@ interface SalixService {
|
|||
@Query("item") item: Number,
|
||||
@Query("printedStickers") printedStickers: Number
|
||||
):
|
||||
Call<Any>
|
||||
Call<EntrySalix>
|
||||
|
||||
|
||||
@POST("tickets/{idTicket}/transferSales") //-->saleMove en Silex
|
||||
|
@ -176,6 +178,13 @@ interface SalixService {
|
|||
):
|
||||
Call<EntrySalix>
|
||||
|
||||
@PATCH("Entries/{entryId}")//REVISADA
|
||||
fun entry_updateObserv(
|
||||
@Path("entryId") entryId:Int,
|
||||
@Body entry: obervationEntry
|
||||
):
|
||||
Call<EntrySalix>
|
||||
|
||||
@GET("Shelvings")
|
||||
fun Shelvings(
|
||||
@Query("filter") filter: String
|
||||
|
@ -192,7 +201,7 @@ interface SalixService {
|
|||
|
||||
@POST("Entries/addFromPackaging")
|
||||
fun addFromPackaging(
|
||||
@Query("supplier") supplier: Int,
|
||||
@Query("supplier") supplier: Number,
|
||||
@Query("isTravelReception") isTravelReception: Boolean
|
||||
|
||||
):
|
||||
|
|
|
@ -513,6 +513,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
PRINTERFK -> prefs.getInt(name, 0)
|
||||
USERFK -> prefs.getInt(USERFK, 0)
|
||||
SUPPLIERID->prefs.getInt(SUPPLIERID,0)
|
||||
"ENTRYID"->prefs.getInt(name,0)
|
||||
else -> {
|
||||
0
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package es.verdnatura.presentation.view.feature.packaging.adapter
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -10,11 +11,10 @@ import es.verdnatura.presentation.view.feature.packaging.model.ItemSupplier
|
|||
|
||||
class ItemSupplierAdapter(
|
||||
private val items: List<ItemSupplier>,
|
||||
private val onImageUpdateClickListener: OnImageUpdateClickListener,
|
||||
private val onImageTrashClickListener: OnImageTrashClickListener,
|
||||
private val onEditSubQuantityListener: OnEditSubQuantityListener
|
||||
// private val OnGeneralItemRowClickListener: OnGeneralItemRowClickListener,
|
||||
// private var showDelete: Boolean = false
|
||||
private val onImageUpdateClickListener: OnImageUpdateClickListener? ,
|
||||
private val onImageTrashClickListener: OnImageTrashClickListener?,
|
||||
private val onEditSubQuantityListener: OnEditSubQuantityListener?,
|
||||
private var showItems: Boolean = true
|
||||
) : RecyclerView.Adapter<ItemSupplierAdapter.ItemHolder>() {
|
||||
|
||||
|
||||
|
@ -42,16 +42,20 @@ class ItemSupplierAdapter(
|
|||
binding.apply {
|
||||
this.item = item
|
||||
|
||||
if (!showItems){
|
||||
itemAdd.visibility= View.GONE
|
||||
itemRemove.visibility=View.GONE
|
||||
}
|
||||
itemAdd.setOnClickListener {
|
||||
onImageUpdateClickListener.OnImageUpdateClickListener(
|
||||
onImageUpdateClickListener!!.OnImageUpdateClickListener(
|
||||
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) {
|
||||
onEditSubQuantityListener.OnEditSubQuantityListener(
|
||||
|
@ -61,7 +65,7 @@ class ItemSupplierAdapter(
|
|||
v.clearFocus()
|
||||
}
|
||||
return@setOnEditorActionListener false
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ import es.verdnatura.presentation.base.BaseFragment
|
|||
import es.verdnatura.presentation.common.*
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
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.fragment.PackagingViewModel.PackagingViewModel
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
|
||||
|
||||
|
@ -26,8 +26,8 @@ import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
|||
class ObservFragment(
|
||||
var entryPoint: String = ""
|
||||
|
||||
) : BaseFragment<FragmentPackagingObsBinding, InventaryViewModel>(
|
||||
InventaryViewModel::class
|
||||
) : BaseFragment<FragmentPackagingObsBinding, PackagingViewModel>(
|
||||
PackagingViewModel::class
|
||||
) {
|
||||
|
||||
private var adapterListImage: ListImageAdapter? = null
|
||||
|
@ -51,7 +51,6 @@ class ObservFragment(
|
|||
override fun init() {
|
||||
customDialog = CustomDialog(requireContext())
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
setToolBar()
|
||||
setEvents()
|
||||
super.init()
|
||||
|
@ -59,7 +58,7 @@ class ObservFragment(
|
|||
|
||||
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 iconNext = ImageView(context)
|
||||
|
@ -79,7 +78,10 @@ class ObservFragment(
|
|||
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(
|
||||
PasillerosItemVO(title = 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.os.Build
|
||||
import android.os.Bundle
|
||||
import android.text.InputType
|
||||
import android.util.Log.d
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
|
@ -39,27 +39,18 @@ class PackagingCountFragment(
|
|||
|
||||
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() {
|
||||
binding.quantityPackaging.setOnClickListener {
|
||||
/* binding.quantityPackaging.setOnClickListener {
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = 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())
|
||||
customDialog = CustomDialog(requireContext())
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
|
@ -70,7 +61,7 @@ class PackagingCountFragment(
|
|||
|
||||
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 iconNext = ImageView(context)
|
||||
|
@ -112,6 +103,21 @@ class PackagingCountFragment(
|
|||
override fun observeViewModel() {
|
||||
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) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
adapteritemsupplier =
|
||||
|
@ -119,29 +125,15 @@ class PackagingCountFragment(
|
|||
|
||||
override fun OnImageUpdateClickListener(item: Any) {
|
||||
d("VERDNATURA::", "Seleccionado update" + (item as ItemSupplier).name)
|
||||
printCustomDialog("quantity")
|
||||
/* 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()
|
||||
showCustomDialog("quantity", item)
|
||||
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
|
||||
customDialogInput.dismiss()
|
||||
|
||||
}.setValue("").show()
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
}, object : OnImageTrashClickListener {
|
||||
override fun OnImageTrashClickListener(item: Any) {
|
||||
d("VERDNATURA::", "Seleccionado trash" + (item as ItemSupplier).name)
|
||||
printCustomDialog("delete")
|
||||
showCustomDialog("delete", item)
|
||||
}
|
||||
|
||||
}, object : OnEditSubQuantityListener {
|
||||
|
@ -164,31 +156,49 @@ class PackagingCountFragment(
|
|||
}
|
||||
}
|
||||
|
||||
private fun printCustomDialog(action: String) {
|
||||
private fun showCustomDialog(action: String, item: ItemSupplier) {
|
||||
|
||||
when (action) {
|
||||
"quantity" -> {
|
||||
customDialogInput.getEditText().setRawInputType(InputType.TYPE_CLASS_NUMBER)
|
||||
// customDialogInput.getEditText().inputType = InputType.TYPE_CLASS_NUMBER
|
||||
customDialogInput.setTitle(getString(R.string.quantityReviewed))
|
||||
.setDescription(getString(R.string.Indicanuevacantidad))
|
||||
.setOkButton(getString(R.string.accept)) {
|
||||
if (!customDialogInput.getValue().isNullOrEmpty()) {
|
||||
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()
|
||||
customDialogInput.dismiss()
|
||||
requireActivity().showKeyboard()
|
||||
customDialogInput.setValue("")
|
||||
// requireActivity().showKeyboard()
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialog.cancel()
|
||||
customDialogInput.dismiss()
|
||||
requireActivity().showKeyboard()
|
||||
// requireActivity().showKeyboard()
|
||||
}.setValue("")
|
||||
.show()
|
||||
|
||||
customDialogInput.setInputText()
|
||||
|
||||
|
||||
customDialogInput.currentFocus
|
||||
customDialogInput.setFocusText()
|
||||
//requireActivity().showKeyboard()
|
||||
// requireActivity().showKeyboard()
|
||||
}
|
||||
"delete" -> {
|
||||
customDialog.setTitle(getString(R.string.deleteEntryReviewed))
|
||||
|
@ -201,7 +211,11 @@ class PackagingCountFragment(
|
|||
) {
|
||||
customDialog.cancel()
|
||||
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)) {
|
||||
|
@ -217,7 +231,6 @@ class PackagingCountFragment(
|
|||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -4,80 +4,44 @@ import android.graphics.drawable.Drawable
|
|||
import android.os.Build
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.core.widget.addTextChangedListener
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentPackagingSummaryBinding
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.*
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.component.CustomDialogInput
|
||||
import es.verdnatura.presentation.view.component.CustomDialogList
|
||||
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
|
||||
import es.verdnatura.presentation.view.feature.packaging.adapter.ItemSupplierAdapter
|
||||
import es.verdnatura.presentation.view.feature.packaging.fragment.PackagingViewModel.PackagingViewModel
|
||||
|
||||
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
class PackagingSummaryFragment(
|
||||
var entryPoint: String = ""
|
||||
|
||||
) : BaseFragment<FragmentPackagingSummaryBinding, InventaryViewModel>(
|
||||
InventaryViewModel::class
|
||||
) : BaseFragment<FragmentPackagingSummaryBinding, PackagingViewModel>(
|
||||
PackagingViewModel::class
|
||||
) {
|
||||
|
||||
private var adapterworker: WorkermistakeAdapter? = null
|
||||
|
||||
private lateinit var customDialogInput: CustomDialogInput
|
||||
|
||||
|
||||
private var listWorker: MutableList<WorkerFromMistake> = ArrayList()
|
||||
private var listWorkerAuxiliary: MutableList<WorkerFromMistake> = ArrayList()
|
||||
private var adapteritemsupplier: ItemSupplierAdapter? = null
|
||||
private lateinit var customDialog: CustomDialog
|
||||
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = 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 {
|
||||
fun newInstance(entryPoint: String) = PackagingSummaryFragment(entryPoint)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_packaging_summary
|
||||
|
||||
|
||||
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())
|
||||
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)
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
setToolBar()
|
||||
|
@ -87,7 +51,7 @@ class PackagingSummaryFragment(
|
|||
|
||||
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 iconConfirm = ImageView(context)
|
||||
|
@ -102,7 +66,7 @@ class PackagingSummaryFragment(
|
|||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
when (item) {
|
||||
iconConfirm.drawable -> {
|
||||
// TODO()
|
||||
showWarning()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -126,149 +90,43 @@ class PackagingSummaryFragment(
|
|||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
|
||||
|
||||
mistakeDepartmentList.observe(viewLifecycleOwner) {
|
||||
itemSupplierList.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
createDepartmentList(it.list)
|
||||
|
||||
}
|
||||
workerFromMistakeList.observe(viewLifecycleOwner) {
|
||||
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
|
||||
var mySummaryList = it.list.filter { it.quantity > 0 }
|
||||
adapteritemsupplier =
|
||||
ItemSupplierAdapter(mySummaryList, null, null, null, showItems = false)
|
||||
binding.itemsupplierRecyclerview.adapter = adapteritemsupplier
|
||||
layoutManager =
|
||||
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
|
||||
|
||||
})
|
||||
private fun showWarning() {
|
||||
|
||||
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
|
||||
customDialog.setTitle(getString(R.string.sendEntry))
|
||||
customDialog.setTitle(getString(R.string.warningEntry))
|
||||
.setOkButton(
|
||||
getString(
|
||||
R.string.accept
|
||||
)
|
||||
|
||||
})
|
||||
|
||||
response.observe(viewLifecycleOwner, {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
) {
|
||||
customDialog.dismiss()
|
||||
}
|
||||
|
||||
|
||||
private fun showMistakeList(list: List<MistakeWorkerType>) {
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
listMistakes = ArrayList()
|
||||
list.forEach {
|
||||
listMistakes.add(BarcodeVO(code = it.description))
|
||||
}
|
||||
|
||||
|
||||
customDialogList.setTitle(getString(R.string.errorCause) + workerMistakeName!!.firstName)
|
||||
.setKoButton(
|
||||
getString(
|
||||
R.string.cancel
|
||||
)
|
||||
) {
|
||||
customDialogList.dismiss()
|
||||
}.hideDialog().show()
|
||||
customDialog.dismiss()
|
||||
}.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 androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import es.verdnatura.domain.SilexCallback
|
||||
import es.verdnatura.presentation.base.BaseViewModel
|
||||
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.Event
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
import es.verdnatura.presentation.view.feature.packaging.model.*
|
||||
import okhttp3.MultipartBody
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
||||
class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
||||
|
@ -33,10 +33,20 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
|||
val entry: LiveData<EntrySalix>
|
||||
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>() }
|
||||
val response: LiveData<ResponseItemVO>
|
||||
get() = _response
|
||||
|
||||
val loadEntryAdd = Transformations.map(_entryAdd) { Event(it) }
|
||||
|
||||
fun getSuppliers() {
|
||||
salix.getSuppliers()
|
||||
.enqueue(object :
|
||||
|
@ -78,7 +88,7 @@ class PackagingViewModel(val context: Context) : BaseViewModel(context) {
|
|||
}
|
||||
|
||||
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 :
|
||||
SilexCallback<List<EntrySalix>>(context) {
|
||||
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) {
|
||||
salix.uploadEntryPhoto(id, warehouseId, companyId, dmsTypeId, reference, description, hasFile, file)
|
||||
.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) {
|
||||
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
|
||||
|
||||
import android.content.ContentResolver
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.util.Log.d
|
||||
import android.view.View
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentPackagingBinding
|
||||
import es.verdnatura.domain.notNull
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnPasillerosItemClickListener
|
||||
import es.verdnatura.presentation.common.convertToDateString
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
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.model.EntrySalix
|
||||
import es.verdnatura.presentation.view.feature.packaging.model.Supplier
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
import ir.mirrajabi.searchdialog.SimpleSearchDialogCompat
|
||||
import okhttp3.MediaType
|
||||
import okhttp3.MultipartBody
|
||||
import okhttp3.RequestBody
|
||||
import java.io.File
|
||||
|
||||
|
||||
@Suppress("UNUSED_ANONYMOUS_PARAMETER")
|
||||
|
@ -40,6 +35,7 @@ class SupplierFragment(
|
|||
private lateinit var customDialog: CustomDialog
|
||||
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(entryPoint: String) = SupplierFragment(entryPoint)
|
||||
}
|
||||
|
@ -55,9 +51,6 @@ class SupplierFragment(
|
|||
|
||||
viewModel.getSuppliers()
|
||||
|
||||
/* viewModel.getSuppliers(
|
||||
)*/
|
||||
|
||||
val drawableId: Int =
|
||||
R.drawable.background_test // Reemplaza "mi_drawable" con el nombre de tu recurso Drawable
|
||||
|
||||
|
@ -72,7 +65,7 @@ class SupplierFragment(
|
|||
val rutaAbsoluta: String = uri.toString()*/
|
||||
|
||||
|
||||
|
||||
/*
|
||||
val file = File("/storage/emulated/0/Android/data/es.verdnatura.sfusion/files/Pictures/test.png")
|
||||
val filePart = MultipartBody.Part.createFormData(
|
||||
"file",
|
||||
|
@ -88,7 +81,7 @@ class SupplierFragment(
|
|||
"Example description",
|
||||
false,
|
||||
file = filePart
|
||||
)
|
||||
)*/
|
||||
// viewModel.entry_addFromBuy(8,1,100)
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
|
@ -113,12 +106,12 @@ class SupplierFragment(
|
|||
binding.filterSupplier.setText((nombre.getName()))
|
||||
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
|
||||
saveData("SUPPLIERNAME", nombre.getName())
|
||||
saveData("SUPPLIERID", nombre.getId())
|
||||
saveDataInt("SUPPLIERID", nombre.getId().toInt())
|
||||
viewModel.getEntries_fromSupplier(nombre.getId().toInt())
|
||||
baseSearchDialogCompat.dismiss()
|
||||
}.show()
|
||||
}
|
||||
|
||||
customDialog = CustomDialog(requireContext())
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
setToolBar()
|
||||
setEvents()
|
||||
|
@ -135,46 +128,7 @@ class SupplierFragment(
|
|||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
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 ->
|
||||
when (isChecked) {
|
||||
|
@ -188,14 +142,6 @@ class SupplierFragment(
|
|||
|
||||
}
|
||||
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 ->
|
||||
binding.filterEntry.setText((nombre.getName()))
|
||||
binding.radiobuttonTypePackaging.visibility = View.VISIBLE
|
||||
saveData("ENTRYID", nombre.getId())
|
||||
d("VERDNATURA::","Ha seleccionado:"+nombre.getId())
|
||||
|
||||
if (nombre.getName() == getString(R.string.newEntry)) {
|
||||
addEntry()
|
||||
} else {
|
||||
saveDataInt("ENTRYID", nombre.getId().toInt())
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
||||
getString(R.string.titlePackagingCount)
|
||||
)
|
||||
}
|
||||
baseSearchDialogCompat.dismiss()
|
||||
}.show()
|
||||
}
|
||||
|
@ -241,15 +191,46 @@ class SupplierFragment(
|
|||
|
||||
}
|
||||
}
|
||||
entry.observe(viewLifecycleOwner) {
|
||||
binding.splashProgress.visibility=View.GONE
|
||||
println("Entrada")
|
||||
|
||||
loadEntryAdd.observe(viewLifecycleOwner) { event ->
|
||||
event.getContentIfNotHandled().notNull {
|
||||
binding.splashProgress.visibility = View.INVISIBLE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
}else{
|
||||
saveDataInt("ENTRY", it.id!!)
|
||||
println("Entrada"+it.id)
|
||||
} else {
|
||||
saveDataInt("ENTRYID", it.id!!.toInt())
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
||||
it.id!!.toString()
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* entryAdd.observe(viewLifecycleOwner) {
|
||||
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()
|
||||
)
|
||||
}
|
||||
}*/
|
||||
|
||||
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(
|
||||
PasillerosItemVO(title = getString(R.string.titlePackagingCount)),
|
||||
getString(R.string.titlePackagingCount)
|
||||
|
@ -279,7 +260,7 @@ class SupplierFragment(
|
|||
try {
|
||||
entries.add(
|
||||
SearchSupplierModel(
|
||||
entry.id.toString() + "->" + convertToDateString( entry.dated.toString()),
|
||||
entry.id.toString() + "->" + convertToDateString(entry.created),
|
||||
id = entry.id.toString()
|
||||
)
|
||||
)
|
||||
|
@ -288,19 +269,38 @@ class SupplierFragment(
|
|||
}
|
||||
}
|
||||
|
||||
entries.add(SearchSupplierModel("Añadir Nueva", ""))
|
||||
entries.add(SearchSupplierModel(getString(R.string.newEntry), ""))
|
||||
setEntryDialog()
|
||||
}
|
||||
|
||||
private fun addEntry(){
|
||||
private fun addEntry() {
|
||||
|
||||
customDialog.setTitle(getString(R.string.createEntryDescrip))
|
||||
.setDescription(getString(R.string.sure))
|
||||
.setOkButton(
|
||||
getString(
|
||||
R.string.accept
|
||||
)
|
||||
|
||||
if (getData("ENTRYTYPE" )=="Rec"){
|
||||
viewModel.entry_addSalix(EntrySalix(supplierFk = getData("SUPPLIERID").toInt(), travelFk = 186025, companyFk = 442))
|
||||
}else{
|
||||
viewModel.entry_addSalix(EntrySalix(supplierFk = getData("SUPPLIERID").toInt(), travelFk = 186025, companyFk = 442))
|
||||
}
|
||||
) {
|
||||
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()
|
||||
|
||||
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
package es.verdnatura.presentation.view.feature.packaging.model
|
||||
|
||||
import android.content.Context
|
||||
import es.verdnatura.presentation.common.convertToDateString
|
||||
import java.util.ArrayList
|
||||
|
||||
class EntrySalix(
|
||||
var id: Int? = null,
|
||||
var id: Number? = null,
|
||||
var dated: String? = null,
|
||||
var supplierFk: Int? = null,
|
||||
var travelFk: Int? = null,
|
||||
var companyFk: Int? = null,
|
||||
var created: String? = null,
|
||||
var supplierFk: Number? = null,
|
||||
var travelFk: Number? = null,
|
||||
var companyFk: Number? = null,
|
||||
var isError: Boolean = false,
|
||||
var errorMessage: String = ""
|
||||
)
|
||||
|
@ -20,9 +19,14 @@ fun List<EntrySalix>.toDateFormat(): ArrayList<EntrySalix> {
|
|||
entries.add(
|
||||
EntrySalix(
|
||||
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(
|
||||
var id: Int? = null,
|
||||
var name: String? = null,
|
||||
var quantity: Int? = 0,
|
||||
var quantityTotal: Int? = 0,
|
||||
var quantity: Int = 0,
|
||||
var quantityTotal: Int = 0,
|
||||
var buy: Int? = null,
|
||||
var isError: Boolean = false,
|
||||
var errorMessage: String? = null
|
||||
|
|
|
@ -499,13 +499,13 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
)
|
||||
)
|
||||
|
||||
|
||||
*/
|
||||
|
||||
//#tarea4021
|
||||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
6,
|
||||
R.drawable.ic_packaging,
|
||||
R.drawable.ic_packaging_entries,
|
||||
contextApp.getString(R.string.titlePackaging),
|
||||
R.string.titlePackaging,
|
||||
contextApp.getString(R.string.titlePackagingDescrip)
|
||||
|
@ -519,7 +519,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
R.string.titlePhotos,
|
||||
contextApp.getString(R.string.titlePhotos)
|
||||
)
|
||||
)*/
|
||||
)
|
||||
|
||||
val working_in_test=false
|
||||
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:textSize="18dp"
|
||||
android:drawableEnd="@drawable/ic_add_black_24dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toEndOf="@+id/observations"
|
||||
app:layout_constraintTop_toBottomOf="@+id/observations" />
|
||||
<LinearLayout
|
||||
|
@ -50,6 +51,7 @@
|
|||
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||
android:paddingLeft="@dimen/layout_margin_min"
|
||||
android:paddingRight="@dimen/layout_margin_min"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintTop_toBottomOf="@+id/openPickerImages" >
|
||||
|
||||
|
||||
|
@ -61,7 +63,7 @@
|
|||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="Añadir nueva..."
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2" />
|
||||
</LinearLayout>
|
||||
|
@ -70,7 +72,7 @@
|
|||
android:id="@+id/listImagesRecycler"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="550dp"
|
||||
android:visibility="visible"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toEndOf="@+id/textImages"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textImages"
|
||||
tools:listitem="@layout/item_image_row"
|
||||
|
@ -91,7 +93,7 @@
|
|||
android:background="@color/verdnatura_black_8_alpha_6"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
android:visibility="invisible"
|
||||
tools:layout_editor_absoluteX="0dp"
|
||||
tools:layout_editor_absoluteY="0dp">
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textinputlayout_username"
|
||||
android:id="@+id/textinputlayout_data"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColorHint="@android:color/darker_gray">
|
||||
|
@ -27,145 +27,106 @@
|
|||
<LinearLayout
|
||||
android:layout_width="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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_marginTop="@dimen/layout_margin_min"
|
||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||
android:orientation="horizontal"
|
||||
android:paddingLeft="@dimen/layout_margin_min"
|
||||
android:paddingRight="@dimen/layout_margin_min">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1.25"
|
||||
android:gravity="center"
|
||||
android:layout_weight="0.75"
|
||||
android:text="Descripción"
|
||||
android:textAlignment="viewStart"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
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
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="Total"
|
||||
android:textAlignment="textStart"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:paddingStart="@dimen/layout_margin_3"
|
||||
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
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/itemsupplier_recyclerview"
|
||||
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" />
|
||||
android:clipToPadding="false"
|
||||
android:visibility="visible"
|
||||
tools:listitem="@layout/item_itemsupplier_row" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_width="wrap_content"
|
||||
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="DC"
|
||||
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="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">
|
||||
|
||||
android:layout_marginBottom="@dimen/h5"
|
||||
android:layout_marginTop="@dimen/h5">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Imágenes adjuntas:"
|
||||
android:text="@string/attachImage"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold" />
|
||||
|
@ -174,61 +135,36 @@
|
|||
android:id="@+id/totalImages"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:text=""
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Observaciones:"
|
||||
android:orientation="horizontal">
|
||||
<TextView
|
||||
android:id="@+id/observa"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/observations"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_observations"
|
||||
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: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" />
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/observations"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/body2"
|
||||
android:textStyle="bold" />
|
||||
|
||||
</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>
|
||||
|
||||
<include
|
||||
|
@ -238,6 +174,7 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/splash_progress"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -245,20 +182,23 @@
|
|||
android:background="@color/verdnatura_black_8_alpha_6"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical"
|
||||
android:visibility="visible"
|
||||
tools:layout_editor_absoluteX="0dp"
|
||||
tools:layout_editor_absoluteY="0dp">
|
||||
android:visibility="invisible"
|
||||
android:textSize="@dimen/body2"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.airbnb.lottie.LottieAnimationView
|
||||
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/verdnatura_logo_large_height"
|
||||
app:lottie_autoPlay="true"
|
||||
app:lottie_loop="true"
|
||||
app:lottie_rawRes="@raw/orange_loading"
|
||||
app:lottie_speed="2" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
|
@ -245,7 +245,7 @@
|
|||
<string name="take">Coger</string>
|
||||
<string name="errorRegistered">Causa del error registrado</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="scanPlate">Escanea matrícula del 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="item_checking">Al pulsar permite resetear la revisión</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>
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
<string name="take">Coger</string>
|
||||
<string name="errorRegistered">Causa del error registrado</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="scanPlate">Escanea matrícula del 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="item_checking">Al pulsar permite resetear la revisión</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>
|
||||
|
|
|
@ -245,7 +245,7 @@
|
|||
<string name="take">Coger</string>
|
||||
<string name="errorRegistered">Causa del error registrado</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="scanPlate">Escanea matrícula del 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="item_checking">Al pulsar permite resetear la revisión</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>
|
||||
|
|
|
@ -273,7 +273,7 @@
|
|||
<string name="take">Take</string>
|
||||
<string name="errorRegistered">Cause of error registered</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="scanPlate">Scan vehicle plate</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="item_checking">By pressing it allows resetting the review</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>
|
||||
|
|
Loading…
Reference in New Issue