v5.2.4
This commit is contained in:
parent
145fad6f5f
commit
321dd9b963
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="BintrayJCenter" />
|
||||||
|
<option name="name" value="BintrayJCenter" />
|
||||||
|
<option name="url" value="https://jcenter.bintray.com/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="Google" />
|
||||||
|
<option name="name" value="Google" />
|
||||||
|
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -2,6 +2,8 @@ apply plugin: 'com.android.application'
|
||||||
apply plugin: 'kotlin-android'
|
apply plugin: 'kotlin-android'
|
||||||
apply plugin: 'kotlin-android-extensions'
|
apply plugin: 'kotlin-android-extensions'
|
||||||
apply plugin: 'kotlin-kapt'
|
apply plugin: 'kotlin-kapt'
|
||||||
|
apply plugin: 'com.google.gms.google-services'
|
||||||
|
apply plugin: 'com.google.firebase.crashlytics'
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
@ -12,8 +14,8 @@ android {
|
||||||
applicationId "es.verdnatura"
|
applicationId "es.verdnatura"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 32
|
versionCode 34
|
||||||
versionName "5.2.2"
|
versionName "5.2.4"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,4 +80,8 @@ dependencies {
|
||||||
implementation "com.github.bumptech.glide:okhttp3-integration:$glide"
|
implementation "com.github.bumptech.glide:okhttp3-integration:$glide"
|
||||||
kapt "com.github.bumptech.glide:compiler:$glide"
|
kapt "com.github.bumptech.glide:compiler:$glide"
|
||||||
|
|
||||||
|
// Add the Firebase Crashlytics SDK.
|
||||||
|
implementation 'com.google.firebase:firebase-analytics:17.5.0'
|
||||||
|
implementation 'com.google.firebase:firebase-crashlytics:17.2.1'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
{
|
||||||
|
"project_info": {
|
||||||
|
"project_number": "519813071137",
|
||||||
|
"firebase_url": "https://gestoralmacen-bfa2a.firebaseio.com",
|
||||||
|
"project_id": "gestoralmacen-bfa2a",
|
||||||
|
"storage_bucket": "gestoralmacen-bfa2a.appspot.com"
|
||||||
|
},
|
||||||
|
"client": [
|
||||||
|
{
|
||||||
|
"client_info": {
|
||||||
|
"mobilesdk_app_id": "1:519813071137:android:3de54686c580a6f79dfe60",
|
||||||
|
"android_client_info": {
|
||||||
|
"package_name": "es.verdnatura"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "519813071137-5099s9mme9juufnrkm88ajt5n7cmluqh.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"api_key": [
|
||||||
|
{
|
||||||
|
"current_key": "AIzaSyA74wQCwDCpCjWs49lCX5m2SsdqcYb_J8s"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"services": {
|
||||||
|
"appinvite_service": {
|
||||||
|
"other_platform_oauth_client": [
|
||||||
|
{
|
||||||
|
"client_id": "519813071137-5099s9mme9juufnrkm88ajt5n7cmluqh.apps.googleusercontent.com",
|
||||||
|
"client_type": 3
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"configuration_version": "1"
|
||||||
|
}
|
|
@ -8,8 +8,8 @@ import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
class ApiUtils {
|
class ApiUtils {
|
||||||
companion object {
|
companion object {
|
||||||
const val BASE_URL:String = "http://192.168.1.33:8009/"
|
//const val BASE_URL:String = "http://192.168.1.54:8009/"
|
||||||
//const val BASE_URL:String = "https://app.verdnatura.es/"
|
const val BASE_URL:String = "https://app.verdnatura.es/"
|
||||||
fun getApiService():VerdnaturaService{
|
fun getApiService():VerdnaturaService{
|
||||||
val retrofit = Retrofit.Builder()
|
val retrofit = Retrofit.Builder()
|
||||||
.baseUrl(BASE_URL)
|
.baseUrl(BASE_URL)
|
||||||
|
|
|
@ -241,10 +241,11 @@ class ItemCardFragment(
|
||||||
itemcard_recyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
itemcard_recyclerview.layoutManager = LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||||
|
|
||||||
scroll_view.post(Runnable {
|
scroll_view.post(Runnable {
|
||||||
val position:IntArray = IntArray(2)
|
val position = IntArray(2)
|
||||||
|
if (itemcard_image != null){
|
||||||
itemcard_image.getLocationInWindow(position)
|
itemcard_image.getLocationInWindow(position)
|
||||||
scroll_view.scrollTo(0, position[1])
|
scroll_view.scrollTo(0, position[1])
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -280,6 +281,7 @@ class ItemCardFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun prepareItemStockUpdate(itemB:ItemCardRowVO,value:String){
|
private fun prepareItemStockUpdate(itemB:ItemCardRowVO,value:String){
|
||||||
|
try{
|
||||||
if (itemB.value!!.toInt() > value.toInt()) {
|
if (itemB.value!!.toInt() > value.toInt()) {
|
||||||
customDialogTwo.setTitle(itemB.title!!).setDescription("Indica la causa de eliminar stock:").setOkButton("Falta"){
|
customDialogTwo.setTitle(itemB.title!!).setDescription("Indica la causa de eliminar stock:").setOkButton("Falta"){
|
||||||
viewModel.itemStockUpdate(itemFk = itemFk,warehouseFk = warehouseFk,user = user,password = password,newValue = value,isTrash = "0")
|
viewModel.itemStockUpdate(itemFk = itemFk,warehouseFk = warehouseFk,user = user,password = password,newValue = value,isTrash = "0")
|
||||||
|
@ -299,6 +301,12 @@ class ItemCardFragment(
|
||||||
changeOfflineValue(itemB,value, listBarcodes)
|
changeOfflineValue(itemB,value, listBarcodes)
|
||||||
viewModel.itemStockUpdate(itemFk = itemFk,warehouseFk = warehouseFk,user = user,password = password,newValue = value,isTrash = "0")
|
viewModel.itemStockUpdate(itemFk = itemFk,warehouseFk = warehouseFk,user = user,password = password,newValue = value,isTrash = "0")
|
||||||
}
|
}
|
||||||
|
}catch (e:Exception){
|
||||||
|
customDialog.setTitle("Error").setDescription("El elemento introducido no es un número").setKoButton("Cancelar"){
|
||||||
|
customDialog.dismiss()
|
||||||
|
}.show()
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -642,7 +642,7 @@ class CollectionFragment(
|
||||||
try {
|
try {
|
||||||
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton("Coger") {
|
customDialogList.setTitle("$shelving($item) $total de $longName").setOkButton("Coger") {
|
||||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||||
if (customDialogList.getValue().toInt() > total.toInt()) {
|
if (customDialogList.getValue().toBigInteger() > total.toBigInteger()) {
|
||||||
"La cantidad supera a la disponible".toast(requireContext())
|
"La cantidad supera a la disponible".toast(requireContext())
|
||||||
} else {
|
} else {
|
||||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||||
|
@ -686,7 +686,8 @@ class CollectionFragment(
|
||||||
customDialogList.getEditTextTwo().setOnEditorActionListener { v, actionId, event ->
|
customDialogList.getEditTextTwo().setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5) {
|
||||||
if (customDialogList.getValueTwo().isNotEmpty()) {
|
if (customDialogList.getValueTwo().isNotEmpty()) {
|
||||||
if (customDialogList.getValue().toInt() > total.toInt()) {
|
try {
|
||||||
|
if (customDialogList.getValue().toBigInteger() > total.toBigInteger()) {
|
||||||
"La cantidad supera a la disponible".toast(requireContext())
|
"La cantidad supera a la disponible".toast(requireContext())
|
||||||
} else {
|
} else {
|
||||||
if (checkItemScan(customDialogList.getValueTwo())) {
|
if (checkItemScan(customDialogList.getValueTwo())) {
|
||||||
|
@ -705,6 +706,10 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}catch (e:Exception){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
"Escanea item para validar".toast(requireContext())
|
"Escanea item para validar".toast(requireContext())
|
||||||
}
|
}
|
||||||
|
@ -737,6 +742,7 @@ class CollectionFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkItemScan(valueToCheck:String):Boolean{
|
private fun checkItemScan(valueToCheck:String):Boolean{
|
||||||
|
if (storedPosition >= 0 && sales.size > storedPosition) {
|
||||||
val saleToCheck = sales[storedPosition]
|
val saleToCheck = sales[storedPosition]
|
||||||
if (saleToCheck.itemFk == valueToCheck)
|
if (saleToCheck.itemFk == valueToCheck)
|
||||||
return true
|
return true
|
||||||
|
@ -746,6 +752,7 @@ class CollectionFragment(
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -889,7 +896,10 @@ class CollectionFragment(
|
||||||
private fun showDisponibility(){
|
private fun showDisponibility(){
|
||||||
|
|
||||||
customDialogInput.setTitle(getString(R.string.Verdisponible)).setDescription(getString(R.string.Escaneaetiqueta)).setOkButton(getString(R.string.Buscar)){
|
customDialogInput.setTitle(getString(R.string.Verdisponible)).setDescription(getString(R.string.Escaneaetiqueta)).setOkButton(getString(R.string.Buscar)){
|
||||||
|
try{
|
||||||
splash_progress.visibility = View.VISIBLE
|
splash_progress.visibility = View.VISIBLE
|
||||||
|
}catch (e:Exception){}
|
||||||
|
|
||||||
hideKeyboards()
|
hideKeyboards()
|
||||||
viewModel.itemGetAvailable(
|
viewModel.itemGetAvailable(
|
||||||
usuario = user,
|
usuario = user,
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package es.verdnatura.presentation.view.feature.login.activity
|
package es.verdnatura.presentation.view.feature.login.activity
|
||||||
|
|
||||||
|
import android.view.ViewGroup
|
||||||
|
import android.widget.Button
|
||||||
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
|
||||||
|
@ -12,6 +14,16 @@ class LoginActivity : BaseActivity<ActivityLoginBinding>() {
|
||||||
override fun getLayoutId(): Int = R.layout.activity_login
|
override fun getLayoutId(): Int = R.layout.activity_login
|
||||||
|
|
||||||
override fun init() {
|
override fun init() {
|
||||||
|
/* val crashButton = Button(this)
|
||||||
|
crashButton.text = "Crash!"
|
||||||
|
crashButton.setOnClickListener {
|
||||||
|
throw RuntimeException("Test Crash") // Force a crash
|
||||||
|
}
|
||||||
|
|
||||||
|
addContentView(crashButton, ViewGroup.LayoutParams(
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
|
ViewGroup.LayoutParams.WRAP_CONTENT))*/
|
||||||
|
|
||||||
addFragment(LoginFragment.newInstance(),R.id.main_frame_layout,LoginFragment.TAG)
|
addFragment(LoginFragment.newInstance(),R.id.main_frame_layout,LoginFragment.TAG)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding,LoginViewModel> (LoginVi
|
||||||
switch_remember.isChecked = false
|
switch_remember.isChecked = false
|
||||||
saveRemember(false)
|
saveRemember(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkUser(){
|
private fun checkUser(){
|
||||||
|
|
|
@ -241,7 +241,10 @@ class UbicadorFragment(
|
||||||
listItems = ArrayList()
|
listItems = ArrayList()
|
||||||
var contEtiquetas:Int = 0
|
var contEtiquetas:Int = 0
|
||||||
it.list.forEach { item ->
|
it.list.forEach { item ->
|
||||||
|
try{
|
||||||
contEtiquetas += item.stickers.toInt()
|
contEtiquetas += item.stickers.toInt()
|
||||||
|
}catch (e: Exception) {}
|
||||||
|
|
||||||
parking = item.code.toUpperCase()
|
parking = item.code.toUpperCase()
|
||||||
listItems.add(item)
|
listItems.add(item)
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,6 +22,8 @@ buildscript {
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.6.2'
|
classpath 'com.android.tools.build:gradle:3.6.2'
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
|
classpath 'com.google.gms:google-services:4.3.3'
|
||||||
|
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|
Loading…
Reference in New Issue