refs #5322 NaturePhotos

This commit is contained in:
Sergio De la torre 2023-06-09 14:07:11 +02:00
parent fd04b7b52f
commit bdec030f66
16 changed files with 500 additions and 329 deletions

View File

@ -83,10 +83,23 @@
</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="refs #5322 NaturePhotos">
<change afterPath="$PROJECT_DIR$/app/src/main/res/drawable/ic_image_upload.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/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/build.gradle" beforeDir="false" afterPath="$PROJECT_DIR$/app/build.gradle" 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/articulo/fragment/ItemCardFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/articulo/fragment/ItemCardViewModel.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/activity/LoginActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/activity/LoginActivity.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/login/fragment/LoginFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/main/activity/MainActivity.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/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/java/es/verdnatura/presentation/view/feature/photos/fragment/PhotosFragment.kt" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/photos/fragment/PhotosFragment.kt" afterDir="false" />
<change beforePath="$PROJECT_DIR$/app/src/main/res/layout/fragment_photos.xml" beforeDir="false" afterPath="$PROJECT_DIR$/app/src/main/res/layout/fragment_photos.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" />
@ -184,7 +197,7 @@
</option> </option>
<option name="RECENT_BRANCH_BY_REPOSITORY"> <option name="RECENT_BRANCH_BY_REPOSITORY">
<map> <map>
<entry key="$PROJECT_DIR$" value="master" /> <entry key="$PROJECT_DIR$" value="4021-gestion_embalajes" />
</map> </map>
</option> </option>
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@ -232,40 +245,40 @@
<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": { &quot;keyToString&quot;: {
"ApkExportedModule": "Gestor_Almacén.app", &quot;ApkExportedModule&quot;: &quot;Gestor_Almacén.app&quot;,
"ExportApk.ApkPathForGestor_Almacén.app": "C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app", &quot;ExportApk.ApkPathForGestor_Almacén.app&quot;: &quot;C:\\Users\\sergiodt\\AndroidStudioProjects\\vn-warehouseManager\\app&quot;,
"PROJECT_TRUSTED_KEY": "true", &quot;PROJECT_TRUSTED_KEY&quot;: &quot;true&quot;,
"RunOnceActivity.OpenProjectViewOnStart": "true", &quot;RunOnceActivity.OpenProjectViewOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.ShowReadmeOnStart": "true", &quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
"RunOnceActivity.cidr.known.project.marker": "true", &quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
"SHARE_PROJECT_CONFIGURATION_FILES": "true", &quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
"ScreenRecorder.SavePath": "C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4", &quot;ScreenRecorder.SavePath&quot;: &quot;C:\\Users\\sergiodt\\device-2023-03-17-114045.mp4&quot;,
"android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED": "RecyclerView", &quot;android-custom-viewC:/Users/sergiodt/.gradle/caches/modules-2/files-2.1/androidx.recyclerview/recyclerview/1.2.1/f0f93e67af3f7417bdd560d5142f6dec4fe629c3/recyclerview-1.2.1-sources.jar!/androidx/recyclerview/widget/RecyclerView.java_SELECTED&quot;: &quot;RecyclerView&quot;,
"cidr.known.project.marker": "true", &quot;cidr.known.project.marker&quot;: &quot;true&quot;,
"com.developerphil.adbidea.selecteddevices": "21114523025303", &quot;com.developerphil.adbidea.selecteddevices&quot;: &quot;21114523025303&quot;,
"com.google.services.firebase.aqiPopupShown": "true", &quot;com.google.services.firebase.aqiPopupShown&quot;: &quot;true&quot;,
"last_opened_file_path": "C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable", &quot;last_opened_file_path&quot;: &quot;C:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable&quot;,
"project.structure.last.edited": "Modules", &quot;project.structure.last.edited&quot;: &quot;Modules&quot;,
"project.structure.proportion": "0.17", &quot;project.structure.proportion&quot;: &quot;0.17&quot;,
"project.structure.side.proportion": "0.2", &quot;project.structure.side.proportion&quot;: &quot;0.2&quot;,
"run.code.analysis.last.selected.profile": "pProject Default", &quot;run.code.analysis.last.selected.profile&quot;: &quot;pProject Default&quot;,
"settings.editor.selected.configurable": "preferences.sourceCode.Shell Script" &quot;settings.editor.selected.configurable&quot;: &quot;preferences.sourceCode.Shell Script&quot;
}, },
"keyToStringList": { &quot;keyToStringList&quot;: {
"ExportApk.BuildVariants": [ &quot;ExportApk.BuildVariants&quot;: [
"generalRelease" &quot;generalRelease&quot;
], ],
"com.android.tools.idea.sqlite.queryhistory": [ &quot;com.android.tools.idea.sqlite.queryhistory&quot;: [
"select * from expedition e where e.addressFk= 34915", &quot;select * from expedition e where e.addressFk= 34915&quot;,
"select * from expedition e where e.id= 6872921", &quot;select * from expedition e where e.id= 6872921&quot;,
"select count(*) from expeditionPending\n", &quot;select count(*) from expeditionPending\n&quot;,
"select count(*) from expedition\n", &quot;select count(*) from expedition\n&quot;,
"select count(*) from expedition" &quot;select count(*) from expedition&quot;
] ]
} }
}]]></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" />
@ -872,12 +885,12 @@
<MESSAGE value="refs #5764 Añadir onclick pantalla Día de venta" /> <MESSAGE value="refs #5764 Añadir onclick pantalla Día de venta" />
<MESSAGE value="refs #5322 Nature" /> <MESSAGE value="refs #5322 Nature" />
<MESSAGE value="strings" /> <MESSAGE value="strings" />
<MESSAGE value="refs #5322 NaturePhotos" />
<MESSAGE value="Translation" /> <MESSAGE value="Translation" />
<MESSAGE value="refs #5513" /> <MESSAGE value="refs #5513" />
<MESSAGE value="refs #4678" /> <MESSAGE value="refs #4678" />
<MESSAGE value="refs #5713" /> <MESSAGE value="refs #5713" />
<option name="LAST_COMMIT_MESSAGE" value="refs #5713" /> <MESSAGE value="refs #5322 NaturePhotos" />
<option name="LAST_COMMIT_MESSAGE" value="refs #5322 NaturePhotos" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
@ -895,16 +908,6 @@
<line>457</line> <line>457</line>
<option name="timeStamp" value="3" /> <option name="timeStamp" value="3" />
</line-breakpoint> </line-breakpoint>
<line-breakpoint enabled="true" type="kotlin-line">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/photos/fragment/PhotosFragment.kt</url>
<line>150</line>
<option name="timeStamp" value="8" />
</line-breakpoint>
<line-breakpoint enabled="true" type="kotlin-line">
<url>file://$PROJECT_DIR$/app/src/main/java/es/verdnatura/presentation/view/feature/photos/fragment/PhotosViewModel.kt</url>
<line>55</line>
<option name="timeStamp" value="9" />
</line-breakpoint>
</breakpoints> </breakpoints>
</breakpoint-manager> </breakpoint-manager>
<pin-to-top-manager> <pin-to-top-manager>

View File

@ -179,7 +179,6 @@ interface SalixService {
@Multipart @Multipart
fun uploadImage( fun uploadImage(
@Query ("collection") collection: String, @Query ("collection") collection: String,
//@Query("fileName") file: String,
@Query("id") id: Int, @Query("id") id: Int,
@Part filePart: MultipartBody.Part, @Part filePart: MultipartBody.Part,
): ):

View File

@ -238,6 +238,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
R.drawable.camion ->getString(R.string.openLoadingConsignee) R.drawable.camion ->getString(R.string.openLoadingConsignee)
R.drawable.exit ->getString(R.string.exitScreen) R.drawable.exit ->getString(R.string.exitScreen)
R.drawable.ic_image_upload->getString(R.string.messageUpload)
else -> { else -> {

View File

@ -190,7 +190,7 @@ class ItemCardFragment(
private fun getItemCard(itemFk: String) { private fun getItemCard(itemFk: String) {
warehouseFk = getDataInt(WAREHOUSEFK) warehouseFk = getDataInt(WAREHOUSEFK)
binding.splashProgressTwo.visibility = View.VISIBLE binding.splashProgressTwo.visibility = View.VISIBLE
viewModel.getItemCard(itemFk, warehouseFk!!) viewModel.getItemCard(itemFk.toInt(), warehouseFk!!)
this.itemFk = itemFk this.itemFk = itemFk
} }

View File

@ -16,7 +16,13 @@ import es.verdnatura.presentation.view.feature.articulo.model.ItemCardVO
import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingTypeList import es.verdnatura.presentation.view.feature.articulo.model.ItemPackingTypeList
import es.verdnatura.presentation.view.feature.articulo.model.ItemProposal import es.verdnatura.presentation.view.feature.articulo.model.ItemProposal
import es.verdnatura.presentation.view.feature.articulo.model.ItemProposalList import es.verdnatura.presentation.view.feature.articulo.model.ItemProposalList
import okhttp3.MediaType
import okhttp3.MultipartBody
import okhttp3.RequestBody
import retrofit2.Response import retrofit2.Response
import java.io.File
import java.util.*
import kotlin.collections.ArrayList
class ItemCardViewModel(var context: Context) : BaseViewModel(context) { class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
@ -39,7 +45,7 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
fun getItemCard( fun getItemCard(
itemFk: String, itemFk: Int,
warehouseFk: Int, warehouseFk: Int,
) { ) {
@ -304,4 +310,39 @@ class ItemCardViewModel(var context: Context) : BaseViewModel(context) {
}) })
} }
private val _responseinsert by lazy { MutableLiveData<ResponseItemVO>() }
val responseinsert: LiveData<ResponseItemVO>
get() = _responseinsert
fun uploadPhoto(
urlImage:String,
itemFK:Int,
file: File = File("$urlImage"),
fileRequestBody: RequestBody = RequestBody.create(MediaType.parse("image/jpeg"), file),
filePart: MultipartBody.Part = MultipartBody.Part.createFormData("file", file.name, fileRequestBody),
) {
salix.uploadImage("catalog",itemFK,filePart)
.enqueue(object : SilexCallback<Any>(context) {
override fun onError(t: Throwable) {
_responseinsert.value = ResponseItemVO(
isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
)
}
override fun onSuccess(response: Response<Any>) {
_responseinsert.value = ResponseItemVO(
isError = false
)
}
})
}
} }

View File

@ -1,6 +1,7 @@
package es.verdnatura.presentation.view.feature.login.activity package es.verdnatura.presentation.view.feature.login.activity
import android.content.Intent import android.content.Intent
import android.net.Uri
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.ActivityLoginBinding import es.verdnatura.databinding.ActivityLoginBinding
import es.verdnatura.presentation.base.BaseActivity import es.verdnatura.presentation.base.BaseActivity
@ -9,39 +10,26 @@ import es.verdnatura.presentation.common.addFragment
import es.verdnatura.presentation.view.feature.login.fragment.LoginFragment import es.verdnatura.presentation.view.feature.login.fragment.LoginFragment
import es.verdnatura.presentation.view.feature.main.activity.MainActivity import es.verdnatura.presentation.view.feature.main.activity.MainActivity
class LoginActivity : BaseActivity<ActivityLoginBinding>() {
class LoginActivity : BaseActivity<ActivityLoginBinding>() {
private var imageUri: Uri? = null
override fun getLayoutId(): Int = R.layout.activity_login override fun getLayoutId(): Int = R.layout.activity_login
override fun init() { override fun init() {
/* val intent = intent val intent = intent
val action = intent.action val action = intent.action
val type = intent.type*/ val type = intent.type
/* val crashButton = Button(this)
crashButton.text = "Crash!" //Tarea 5322
crashButton.setOnClickListener { if (Intent.ACTION_SEND == action && type?.startsWith("image/") == true) {
throw RuntimeException("Test Crash") // Force a crash val clipData = intent.clipData
if (clipData != null) {
imageUri = clipData.getItemAt(0).uri
}
} }
addContentView(crashButton, ViewGroup.LayoutParams( addFragment(LoginFragment.newInstance(imageUri), R.id.main_frame_layout, LoginFragment.TAG)
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT))*/
//goToMain()
/*Tarea 5322
if (Intent.ACTION_SEND == action && type?.startsWith("image/") == true) {
val imageUri: Uri? = intent.getParcelableExtra(Intent.EXTRA_STREAM)
imageUri?.let {
// Aquí puedes procesar la imagen recibida
// por ejemplo, mostrarla en una ImageView
val imageView: ImageView = findViewById(R.id.imageView)
imageView.setImageURI(imageUri)
}
}*/
addFragment(LoginFragment.newInstance(), R.id.main_frame_layout, LoginFragment.TAG)
} }
fun goToMain() { fun goToMain() {

View File

@ -10,7 +10,6 @@ import android.content.pm.PackageManager
import android.net.Uri import android.net.Uri
import android.os.Environment import android.os.Environment
import android.provider.Settings import android.provider.Settings
import android.util.Log.d
import android.view.View import android.view.View
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
@ -34,7 +33,8 @@ import java.util.*
import kotlin.system.exitProcess import kotlin.system.exitProcess
class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginViewModel::class) { class LoginFragment(var imageUri: Uri?) :
BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginViewModel::class) {
private lateinit var customDialog: CustomDialog private lateinit var customDialog: CustomDialog
private lateinit var customNewForm: CustomDialogInputThreeValues private lateinit var customNewForm: CustomDialogInputThreeValues
@ -42,13 +42,15 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
private lateinit var customDialogList: CustomDialogList private lateinit var customDialogList: CustomDialogList
private lateinit var listForms: List<WorkForms> private lateinit var listForms: List<WorkForms>
companion object { companion object {
fun newInstance() = LoginFragment() fun newInstance(imageUri: Uri?) = LoginFragment(imageUri)
} }
override fun getLayoutId(): Int = R.layout.fragment_login override fun getLayoutId(): Int = R.layout.fragment_login
override fun init() { override fun init() {
customDialogList = CustomDialogList(requireContext()) customDialogList = CustomDialogList(requireContext())
customDialog = CustomDialog(requireContext()) customDialog = CustomDialog(requireContext())
@ -63,8 +65,11 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
password = binding.edittextPassword.text.toString() password = binding.edittextPassword.text.toString()
) )
}
if (imageUri != null && getData(TOKEN).isNotBlank()) {
goToMain()
} }
binding.textviewRememberPassword.setOnClickListener { binding.textviewRememberPassword.setOnClickListener {
@ -271,7 +276,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
openURL.data = openURL.data =
Uri.parse(it.url) Uri.parse(it.url)
startActivity(openURL) startActivity(openURL)
} catch (ex:Exception) { } catch (ex: Exception) {
getString(R.string.problemUpdate).toast(requireActivity()) getString(R.string.problemUpdate).toast(requireActivity())
} }
@ -517,6 +522,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
private fun goToMain() { private fun goToMain() {
val intent = Intent(activity, MainActivity::class.java) val intent = Intent(activity, MainActivity::class.java)
intent.data = imageUri
startActivity(intent) startActivity(intent)
binding.splashProgress.visibility = View.GONE binding.splashProgress.visibility = View.GONE
requireActivity().finish() requireActivity().finish()

View File

@ -5,6 +5,7 @@ package es.verdnatura.presentation.view.feature.main.activity
import PhotosFragment import PhotosFragment
import android.content.SharedPreferences import android.content.SharedPreferences
import android.media.MediaPlayer import android.media.MediaPlayer
import android.net.Uri
import android.view.Menu import android.view.Menu
import android.widget.Toast import android.widget.Toast
import androidx.core.content.ContextCompat import androidx.core.content.ContextCompat
@ -18,7 +19,6 @@ import es.verdnatura.domain.ConstAndValues.PREITEMPICKER
import es.verdnatura.domain.toast import es.verdnatura.domain.toast
import es.verdnatura.presentation.base.BaseActivity import es.verdnatura.presentation.base.BaseActivity
import es.verdnatura.presentation.common.* import es.verdnatura.presentation.common.*
import es.verdnatura.presentation.testing.testPrint
import es.verdnatura.presentation.view.component.CustomDialogMainActivity import es.verdnatura.presentation.view.component.CustomDialogMainActivity
import es.verdnatura.presentation.view.feature.ajustes.fragment.AjustesFragment import es.verdnatura.presentation.view.feature.ajustes.fragment.AjustesFragment
import es.verdnatura.presentation.view.feature.articulo.fragment.ItemCardFragment import es.verdnatura.presentation.view.feature.articulo.fragment.ItemCardFragment
@ -65,9 +65,9 @@ import es.verdnatura.presentation.view.feature.reubication.fragment.ReubicationC
import es.verdnatura.presentation.view.feature.reubication.fragment.ReubicationFragment import es.verdnatura.presentation.view.feature.reubication.fragment.ReubicationFragment
import es.verdnatura.presentation.view.feature.reubication.model.Reubication import es.verdnatura.presentation.view.feature.reubication.model.Reubication
import es.verdnatura.presentation.view.feature.sacador.fragment.SacadorFragment import es.verdnatura.presentation.view.feature.sacador.fragment.SacadorFragment
import es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowTicketFragment
import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO import es.verdnatura.presentation.view.feature.sacador.model.CollectionVO
import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingFragment import es.verdnatura.presentation.view.feature.shelvingparking.fragment.ShelvingParkingFragment
import es.verdnatura.presentation.view.feature.sacador.fragment.showticket.ShowTicketFragment
import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragment import es.verdnatura.presentation.view.feature.ubicador.fragment.AutomaticAddItemFragment
import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment import es.verdnatura.presentation.view.feature.ubicador.fragment.UbicadorFragment
import es.verdnatura.presentation.view.feature.workermistake.adapter.WorkermistakeFragment import es.verdnatura.presentation.view.feature.workermistake.adapter.WorkermistakeFragment
@ -108,58 +108,33 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
private fun setFragments() { private fun setFragments() {
try { try {
val extras = intent.extras val extras = intent.extras
if (extras != null && extras.containsKey("menu")) { val uriImage = intent.data
comeFromDelivery = true
val option = extras.getString("menu")
saveDataInt("USERFK", extras.getString("userfk")!!.toInt())
saveUserAccesPref(
extras.getString("user").toString(),
extras.getString("password").toString()
)
when (option) { if (extras != null && extras.containsKey("menu")) {
"log" -> onPasillerosItemClickListener( comeFromDelivery = true
PasillerosItemVO( val option = extras.getString("menu")
30, saveDataInt("USERFK", extras.getString("userfk")!!.toInt())
R.drawable.expedition_find, saveUserAccesPref(
getString(R.string.titleLog), extras.getString("user").toString(),
R.string.titleLog, extras.getString("password").toString()
getString(
R.string.titleLogDescrip
)
), getString(R.string.titleLog)
) )
"info" -> onPasillerosItemClickListener(
PasillerosItemVO(
30,
R.drawable.ic_info,
getString(R.string.titleInfo),
R.string.titleInfo,
getString(
R.string.titleInfoDescription
)
), getString(R.string.titleInfo) when (option) {
) "log" -> onPasillerosItemClickListener(
"summary"->{
onPasillerosItemClickListener(
PasillerosItemVO( PasillerosItemVO(
30, 30,
R.drawable.ic_info, R.drawable.expedition_find,
getString(R.string.titleDeliverySummary), getString(R.string.titleLog),
R.string.titleDeliverySummary, R.string.titleLog,
getString( getString(
R.string.titleDeliverySummary R.string.titleLogDescrip
) )
),extras.getString("route").toString() ), getString(R.string.titleLog)
) )
} "info" -> onPasillerosItemClickListener(
"unload"->{
onPasillerosItemClickListener(
PasillerosItemVO( PasillerosItemVO(
30, 30,
R.drawable.ic_info, R.drawable.ic_info,
@ -171,28 +146,74 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
), getString(R.string.titleInfo) ), getString(R.string.titleInfo)
) )
"summary" -> {
onPasillerosItemClickListener(
PasillerosItemVO(
30,
R.drawable.ic_info,
getString(R.string.titleDeliverySummary),
R.string.titleDeliverySummary,
getString(
R.string.titleDeliverySummary
)
), extras.getString("route").toString()
)
}
"unload" -> {
onPasillerosItemClickListener(
PasillerosItemVO(
30,
R.drawable.ic_info,
getString(R.string.titleInfo),
R.string.titleInfo,
getString(
R.string.titleInfoDescription
)
), getString(R.string.titleInfo)
)
}
} }
} else {
if (haveSector() && havePrinter()) addFragment(
PasilleroFragment.newInstance(getString(R.string.main), true),
R.id.main_frame_layout,
PasilleroFragment.TAG,
false
)
else addFragment(
AjustesFragment.newInstance(),
R.id.main_frame_layout,
AjustesFragment.TAG,
false
)
if (uriImage != null && uriImage is Uri) {
onPasillerosItemClickListener(
PasillerosItemVO(
30,
R.drawable.photo_camera,
getString(R.string.titlePhotos),
R.string.titlePhotos,
getString(
R.string.titlePhotosDescrip
)
), uriImage.toString()
)
}
} }
} else {
if (haveSector() && havePrinter()) addFragment(
PasilleroFragment.newInstance(getString(R.string.main), true),
R.id.main_frame_layout,
PasilleroFragment.TAG,
false
)
else addFragment(
AjustesFragment.newInstance(),
R.id.main_frame_layout,
AjustesFragment.TAG,
false
)
}
} catch (exception: Exception) { } catch (exception: Exception) {
getString(R.string.error).toast(this) getString(R.string.error).toast(this)
} }
} }
fun haveSector(): Boolean { fun haveSector(): Boolean {
@ -674,7 +695,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
getString(R.string.titleLoadTruck) -> { getString(R.string.titleLoadTruck) -> {
addFragmentOnTop( addFragmentOnTop(
LoadUnloadFragment.newInstance(item.title, "ON DELIVERY",entryPoint), LoadUnloadFragment.newInstance(item.title, "ON DELIVERY", entryPoint),
if (comeFromDelivery == true) { if (comeFromDelivery == true) {
getString(R.string.titleLoadTruck) getString(R.string.titleLoadTruck)
} else { } else {
@ -687,7 +708,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
getString(R.string.titleUnLoadTruck) -> { getString(R.string.titleUnLoadTruck) -> {
addFragmentOnTop( addFragmentOnTop(
LoadUnloadFragment.newInstance(item.title, "DELIVERED",entryPoint), LoadUnloadFragment.newInstance(item.title, "DELIVERED", entryPoint),
if (comeFromDelivery == true) { if (comeFromDelivery == true) {
getString(R.string.titleUnLoadTruck) getString(R.string.titleUnLoadTruck)
} else { } else {
@ -700,7 +721,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
getString(R.string.titleDeliverySummary) -> { getString(R.string.titleDeliverySummary) -> {
addFragmentOnTop( addFragmentOnTop(
SummaryFragment.newInstance(item.title, "ON DELIVERY",entryPoint.toInt()), SummaryFragment.newInstance(item.title, "ON DELIVERY", entryPoint.toInt()),
if (comeFromDelivery == true) { if (comeFromDelivery == true) {
getString(R.string.titleDeliverySummary) getString(R.string.titleDeliverySummary)
} else { } else {
@ -712,12 +733,13 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
getString(R.string.titlePhotos) -> { getString(R.string.titlePhotos) -> {
addFragmentOnTop( addFragmentOnTop(
PhotosFragment.newInstance(item.title)) PhotosFragment.newInstance(item.title, entryPoint)
)
} }
getString(R.string.testing) -> { getString(R.string.testing) -> {
addFragmentOnTop( // addFragmentOnTop(
PhotosFragment.newInstance(item.title)) // PhotosFragment.newInstance(item.title))
//addFragmentOnTop(testPrint.newInstance(item.title)) //addFragmentOnTop(testPrint.newInstance(item.title))
} }
} }
@ -923,7 +945,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
} }
} }
} }
}else{ } else {
mpErrorRepeat?.start() mpErrorRepeat?.start()
} }

View File

@ -510,7 +510,8 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
R.string.titlePackaging, R.string.titlePackaging,
contextApp.getString(R.string.titlePackagingDescrip) contextApp.getString(R.string.titlePackagingDescrip)
) )
) )*/
//Tarea 5322
_pasillerositem.add( _pasillerositem.add(
PasillerosItemVO( PasillerosItemVO(
6, 6,
@ -519,7 +520,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){

View File

@ -1,171 +1,242 @@
import android.app.Activity.RESULT_OK
import android.content.Context import android.content.Context
import android.content.Intent import android.content.Intent
import android.graphics.Bitmap import android.graphics.Bitmap
import android.graphics.drawable.BitmapDrawable import android.graphics.drawable.BitmapDrawable
import android.graphics.drawable.Drawable import android.graphics.drawable.Drawable
import android.net.Uri import android.net.Uri
import android.os.Build import android.os.Build
import android.os.Environment import android.os.Environment
import android.view.View import android.provider.MediaStore
import android.view.View.* import android.view.View.*
import android.widget.ImageView import android.view.inputmethod.EditorInfo
import androidx.annotation.RequiresApi import android.widget.ImageView
import androidx.lifecycle.Observer import androidx.annotation.RequiresApi
import androidx.recyclerview.widget.LinearLayoutManager import androidx.core.net.toUri
import es.verdnatura.R import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.databinding.FragmentPhotosBinding import es.verdnatura.R
import es.verdnatura.databinding.FragmentVehiclecontrolUserBinding import es.verdnatura.databinding.FragmentPhotosBinding
import es.verdnatura.presentation.base.BaseFragment import es.verdnatura.domain.toast
import es.verdnatura.presentation.common.OnOptionsSelectedListener import es.verdnatura.presentation.base.BaseFragment
import es.verdnatura.presentation.common.ToolBarAdapterTooltip import es.verdnatura.presentation.common.OnOptionsSelectedListener
import es.verdnatura.presentation.common.loadUrl import es.verdnatura.presentation.common.ToolBarAdapterTooltip
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoUsuarioFragment import es.verdnatura.presentation.common.itemScanValue
import es.verdnatura.presentation.view.feature.controlvehiculo.fragment.ControlVehiculoViewModel import es.verdnatura.presentation.common.loadUrl
import es.verdnatura.presentation.view.feature.photos.fragment.PhotosViewModel import es.verdnatura.presentation.view.feature.articulo.fragment.ItemCardViewModel
import java.io.File import java.io.File
import java.io.FileOutputStream import java.io.FileOutputStream
import java.io.IOException import java.io.IOException
import java.text.SimpleDateFormat import java.text.SimpleDateFormat
import java.util.* import java.util.*
import kotlin.collections.ArrayList
class PhotosFragment( class PhotosFragment(
var title: String var title: String,
) : BaseFragment<FragmentPhotosBinding, PhotosViewModel>( var uriImage: Uri?
PhotosViewModel::class ) : BaseFragment<FragmentPhotosBinding, ItemCardViewModel>(
) { ItemCardViewModel::class
) {
private val PICK_IMAGE_REQUEST = 1
private val REQUEST_IMAGE_CAPTURE = 2
private val imageUri: Uri? = null
private var originalItem = 0
override fun getLayoutId(): Int = R.layout.fragment_photos override fun getLayoutId(): Int = R.layout.fragment_photos
companion object {
fun newInstance(title: String, uriImage: String) = PhotosFragment(title, uriImage.toUri())
}
companion object { @RequiresApi(Build.VERSION_CODES.O)
fun newInstance(title: String) = PhotosFragment(title) override fun init() {
binding.mainToolbar.toolbarTitle.text = title
binding.splashProgress.visibility = GONE
setEvents()
setToolBar()
setImage()
super.init()
}
private fun setImage() {
if (uriImage != null) {
binding.itemcardImage.setImageURI(uriImage)
} }
}
@RequiresApi(Build.VERSION_CODES.O) @RequiresApi(Build.VERSION_CODES.O)
override fun init() { private fun setToolBar() {
binding.mainToolbar.toolbarTitle.text = title
binding.splashProgress.visibility = GONE
setEvents()
setToolBar()
upLoadPhoto()
super.init()
}
@RequiresApi(Build.VERSION_CODES.O) binding.mainToolbar.toolbarSubtitle.visibility = VISIBLE
private fun setToolBar() { binding.mainToolbar.toolbarIcons.visibility = VISIBLE
binding.mainToolbar.backButton.visibility = VISIBLE
binding.mainToolbar.toolbarSubtitle.visibility = VISIBLE val listIcons: ArrayList<ImageView> = ArrayList()
binding.mainToolbar.toolbarIcons.visibility = VISIBLE val iconPhoto = ImageView(context)
binding.mainToolbar.backButton.visibility = VISIBLE val iconSend = ImageView(context)
iconSend.setImageResource(R.drawable.ic_image_upload)
iconPhoto.setImageResource(R.drawable.ef_ic_camera_white)
val listIcons: ArrayList<ImageView> = ArrayList() iconPhoto.tooltipText = getTooltip(R.drawable.ef_ic_camera_white)
val iconPhone = ImageView(context) iconSend.tooltipText = getTooltip(R.drawable.ic_image_upload)
iconPhone.setImageResource(R.drawable.phone_call)
iconPhone.tooltipText = getTooltip(R.drawable.phone_call) listIcons.add(iconPhoto)
listIcons.add(iconPhone) listIcons.add(iconSend)
binding.mainToolbar.toolbarIcons.adapter =
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
when (item) { binding.mainToolbar.toolbarIcons.adapter =
iconPhone.drawable -> upLoadPhoto() ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
override fun onOptionsItemSelected(item: Drawable) {
}
when (item) {
iconPhoto.drawable -> getPhoto()
iconSend.drawable -> upLoadPhoto()
} }
})
binding.mainToolbar.toolbarIcons.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false) }
})
binding.mainToolbar.toolbarIcons.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
}
private fun getPhoto() {
pickImage()
}
private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed()
} }
binding.editItemFk.setOnEditorActionListener { _, actionId, _ ->
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
if (!binding.editItemFk.text.toString().isEmpty())
{
originalItem = itemScanValue(
binding.editItemFk.text.toString(),
"buy",
"more"
).toString().toInt()
try {
private fun loadImage() { binding.splashProgress.visibility = VISIBLE
viewModel.getItemCard(
// binding.splashProgress.visibility = VISIBLE originalItem, getDataInt(WAREHOUSEFK)
binding.userImage.loadUrl(
getData("base_urlSalix") + "/api/Images/user/160x160/19591/download?access_token=${
getData(
TOKEN
)
}"
)
}
private fun setEvents() {
binding.mainToolbar.backButton.setOnClickListener {
requireActivity().onBackPressed()
}
}
override fun observeViewModel() {
with(viewModel) {
binding.splashProgress.visibility = View.GONE
responseinsert.observe(viewLifecycleOwner, Observer {
binding.splashProgress.visibility = GONE
if (it.isError) {
ma.messageWithSound(
it.errorMessage + getString(R.string.user) + title,
isError = true,
true
) )
} catch (Ex: Exception) {
ma.messageWithSound(Ex.message.toString(), true, true)
}
}
binding.editItemFk.setText("")
ma.hideKeyboard(binding.editItemFk)
return@setOnEditorActionListener true
}
false
}
binding.editItemFk.requestFocus()
}
override fun observeViewModel() {
with(viewModel) {
responseinsert.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
if (it.isError) {
ma.messageWithSound(
it.errorMessage + getString(R.string.user) + title,
isError = true,
true
)
} else {
ma.messageWithSound(
getString(R.string.itemUpdated),
isError = it.isError,
true
)
}
}
itemcard.observe(viewLifecycleOwner) {
binding.splashProgress.visibility = GONE
if (it.isError) {
ma.messageWithSound(it.errorMessage, true, false)
} else {
if (it.id != 0) {
binding.itemData.text = "${it.id}: ${it.longName}"
} else { } else {
ma.messageWithSound( ma.messageWithSound(
getString(R.string.itemUpdated), getString(R.string.itemNotFound),
isError = it.isError, true,
true, isToasted = null, false,
getString(R.string.noResults)
) )
} }
}) }
} }
} }
private fun upLoadPhoto() { }
val drawable = binding.userImage.drawable private fun upLoadPhoto() {
if (binding.itemData.text.isNullOrEmpty()) {
getString(R.string.messageUploadItem).toast(requireContext()).show()
} else {
val drawable = binding.itemcardImage.drawable
if (drawable is BitmapDrawable) { if (drawable is BitmapDrawable) {
val bitmap = drawable.bitmap val bitmap = drawable.bitmap
binding.splashProgress.visibility=VISIBLE
println("Ruta"+saveBitmapAsTempFile(requireContext(),bitmap)) viewModel.uploadPhoto(itemFK = originalItem, urlImage = saveBitmapAsTempFile(requireContext(), bitmap))
viewModel.uploadPhoto(saveBitmapAsTempFile(requireContext(),bitmap))
}
}
fun saveBitmapAsTempFile(context: Context, bitmap: Bitmap): String {
val timeStamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
val fileName = "IMG_$timeStamp.jpg"
val storageDir = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES)
val tempFile = File.createTempFile(fileName, null, storageDir)
return try {
val fileOutputStream = FileOutputStream(tempFile)
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fileOutputStream)
fileOutputStream.close()
tempFile.absolutePath
} catch (e: IOException) {
e.printStackTrace()
""
} }
} }
} }
fun saveBitmapAsTempFile(context: Context, bitmap: Bitmap): String {
val timeStamp = SimpleDateFormat("yyyyMMdd_HHmmss", Locale.getDefault()).format(Date())
val fileName = "IMG_$timeStamp.jpg"
val storageDir = context.getExternalFilesDir(Environment.DIRECTORY_PICTURES)
val tempFile = File.createTempFile(fileName, null, storageDir)
return try {
val fileOutputStream = FileOutputStream(tempFile)
bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fileOutputStream)
fileOutputStream.close()
tempFile.absolutePath
} catch (e: IOException) {
e.printStackTrace()
""
}
}
private fun pickImage() {
val pickIntent = Intent(Intent.ACTION_PICK)
pickIntent.type = "image/*"
val captureIntent = Intent(MediaStore.ACTION_IMAGE_CAPTURE)
val chooserIntent = Intent.createChooser(pickIntent, "Seleccionar imagen")
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, arrayOf(captureIntent))
startActivityForResult(chooserIntent, PICK_IMAGE_REQUEST)
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK) {
if (data != null && data.data != null) {
// Imagen seleccionada desde la galería
binding.itemcardImage.setImageURI(data.data)
} else {
// Imagen cámara
var uri = saveBitmapAsTempFile(requireContext(),data?.extras?.get("data") as Bitmap).toUri()
binding.itemcardImage.setImageURI(uri)
//binding.itemcardImage.setImageBitmap(data?.extras?.get("data") as? Bitmap?)
}
}
}
}

View File

@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="48dp"
android:height="48dp"
android:viewportWidth="960"
android:viewportHeight="960"
android:tint="#FFF">
<path
android:fillColor="@android:color/white"
android:pathData="M250,800Q164,800 102,738Q40,676 40,590Q40,512 89.5,452.5Q139,393 217,381Q237,284 311,222.5Q385,161 482,161Q595,161 671.5,242.5Q748,324 748,438L748,462L748,462Q820,460 870,508.5Q920,557 920,631Q920,700 870,750Q820,800 751,800L510,800Q486,800 468,782Q450,764 450,740L450,482L367,565L324,522L480,366L636,522L593,565L510,482L510,740Q510,740 510,740Q510,740 510,740L751,740Q796,740 828,708Q860,676 860,631Q860,586 828,554Q796,522 751,522L688,522L688,438Q688,349 627.5,285Q567,221 478,221Q389,221 328,285Q267,349 267,438L248,438Q186,438 143,481.5Q100,525 100,589Q100,651 143.93,695.5Q187.86,740 250,740L390,740L390,800L250,800ZM480,510L480,510L480,510Q480,510 480,510Q480,510 480,510L480,510L480,510Q480,510 480,510Q480,510 480,510L480,510Q480,510 480,510Q480,510 480,510L480,510Q480,510 480,510Q480,510 480,510Q480,510 480,510Q480,510 480,510L480,510L480,510Q480,510 480,510Q480,510 480,510Q480,510 480,510Q480,510 480,510L480,510Q480,510 480,510Q480,510 480,510Q480,510 480,510Q480,510 480,510L480,510L480,510Z"/>
</vector>

View File

@ -1,80 +1,96 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android" <layout xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"> xmlns:app="http://schemas.android.com/apk/res-auto">
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent"> android:layout_height="match_parent">
<LinearLayout <ScrollView
android:id="@+id/itemcard_layout" android:id="@+id/scroll_view"
android:layout_width="match_parent" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<TextView
android:id="@+id/name_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="@dimen/toolbar_height"
android:hint="Item"
android:textColor="@color/verdnatura_white"
android:textSize="@dimen/h5"
android:textStyle="bold" />
<ImageView
android:id="@+id/user_image"
android:layout_width="match_parent"
android:layout_height="@dimen/itemcard_image_height"
android:layout_margin="10dp"
android:scaleType="centerCrop"
android:src="@drawable/camion"
app:srcCompat="@drawable/alpha_b_circle_outline" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="10dp" android:orientation="vertical" >
android:layout_marginBottom="@dimen/layout_margin_min"
android:orientation="vertical"
android:padding="@dimen/layout_margin_min"> <com.google.android.material.textfield.TextInputEditText
android:id="@+id/edit_itemFk"
style="@style/ScanLineTextSearch"
android:layout_width="match_parent"
android:hint="@string/scanItemUpload"
android:inputType="text"
android:textColor="@color/verdnatura_white"
android:textColorHint="@color/verdnatura_white"
/>
<LinearLayout <LinearLayout
android:id="@+id/itemcard_layout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:orientation="vertical"
android:orientation="vertical" /> android:visibility="visible">
<ImageView
android:id="@+id/itemcard_image"
android:layout_width="match_parent"
android:layout_height="@dimen/itemcard_image_height"
android:scaleType="centerCrop"
android:src="@drawable/loadphoto"
android:layout_margin="@dimen/item_image_width_min"/>
<TextView
android:id="@+id/item_data"
android:layout_height="match_parent"
android:layout_width="match_parent"
android:gravity="center"
android:inputType="text"
android:textSize="@dimen/body1"
android:textColor="@color/verdnatura_pumpkin_orange"
android:textColorHint="@color/verdnatura_white"
android:layout_margin="@dimen/ef_margin_medium"
/>
</LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView>
</LinearLayout>
<include <include
android:id="@+id/main_toolbar" android:id="@+id/main_toolbar"
layout="@layout/toolbar_fragment" layout="@layout/toolbar_fragment"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="parent" />
<LinearLayout <LinearLayout
android:id="@+id/splash_progress" android:id="@+id/splash_progress"
android:visibility="gone"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/verdnatura_black_8_alpha_6"
android:gravity="center"
android:orientation="vertical" android:orientation="vertical"
android:visibility="gone" android:background="@color/verdnatura_black_8_alpha_6"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent"
android:gravity="center">
<com.airbnb.lottie.LottieAnimationView <com.airbnb.lottie.LottieAnimationView
@ -87,5 +103,7 @@
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</layout> </layout>

View File

@ -229,7 +229,7 @@
<string name="operation">Operación </string> <string name="operation">Operación </string>
<string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string> <string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string>
<string name="confirm">Confirmar acción</string> <string name="confirm">Confirmar acción</string>
<string name="scanItem">Escanea un item</string> <string name="scanItem">Escanea un artículo</string>
<string name="itemNotFound">No hemos podido encontrar el artículo. Revisa el sector.</string> <string name="itemNotFound">No hemos podido encontrar el artículo. Revisa el sector.</string>
<string name="errorOperation">Error al realizar la operación</string> <string name="errorOperation">Error al realizar la operación</string>
<string name="scanLabelExpedition">Escanea expedición.</string> <string name="scanLabelExpedition">Escanea expedición.</string>
@ -590,5 +590,8 @@
<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="scanItemUpload">Escanea artículo a subir</string>
<string name="messageUploadItem">Tienes que escanear el artículo para poder subirlo</string>
<string name="messageUpload">Sube la imagen al servidor</string>
</resources> </resources>

View File

@ -229,7 +229,7 @@
<string name="operation">Operación </string> <string name="operation">Operación </string>
<string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string> <string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string>
<string name="confirm">Confirmar acción</string> <string name="confirm">Confirmar acción</string>
<string name="scanItem">Escanea un item</string> <string name="scanItem">Escanear artículo</string>
<string name="itemNotFound">No hemos podido encontrar el artículo. Revisa el sector.</string> <string name="itemNotFound">No hemos podido encontrar el artículo. Revisa el sector.</string>
<string name="errorOperation">Error al realizar la operación</string> <string name="errorOperation">Error al realizar la operación</string>
<string name="scanLabelExpedition">Escanea expedición.</string> <string name="scanLabelExpedition">Escanea expedición.</string>
@ -590,5 +590,8 @@
<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="scanItemUpload">Escanea artículo a subir</string>
<string name="messageUploadItem">Tienes que escanear el artículo para poder subirlo</string>
<string name="messageUpload">Sube la imagen al servidor</string>
</resources> </resources>

View File

@ -229,7 +229,7 @@
<string name="operation">Operación </string> <string name="operation">Operación </string>
<string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string> <string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string>
<string name="confirm">Confirmar acción</string> <string name="confirm">Confirmar acción</string>
<string name="scanItem">Escanea un item</string> <string name="scanItem">Escanear artículo</string>
<string name="itemNotFound">No hemos podido encontrar el artículo. Revisa el sector.</string> <string name="itemNotFound">No hemos podido encontrar el artículo. Revisa el sector.</string>
<string name="errorOperation">Error al realizar la operación</string> <string name="errorOperation">Error al realizar la operación</string>
<string name="scanLabelExpedition">Escanea expedición.</string> <string name="scanLabelExpedition">Escanea expedición.</string>
@ -590,5 +590,8 @@
<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="scanItemUpload">Escanea artículo a subir</string>
<string name="messageUploadItem">Tienes que escanear el artículo para poder subirlo</string>
<string name="messageUpload">Sube la imagen al servidor</string>
</resources> </resources>

View File

@ -589,5 +589,7 @@
<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="scanItemUpload">Scan item upload</string>
<string name="messageUploadItem">Tienes que escanear el artículo para poder subirlo</string>
<string name="messageUpload">Sube la imagen al servidor</string>
</resources> </resources>