Version 9.2.1 Refactor Inicio, pintar a través del rgb, modificado diseño,se añade shelvingLog y muestra colección a través de ticket
This commit is contained in:
parent
0c87ae654b
commit
ddb4ab09c4
|
@ -5,6 +5,7 @@
|
|||
<map>
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/background_gradient.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/background_round_corner.xml" value="0.2205" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/ic_collection.xml" value="0.1705" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/ic_history_orang.xml" value="0.22037037037037038" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/ic_history_orange_24dp.xml" value="0.16666666666666666" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable-v24/ic_launcher_foreground.xml" value="0.13541666666666666" />
|
||||
|
@ -12,6 +13,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/alpha_b_circle_outline.xml" value="0.2359375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/alpha_f_circle_outline.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_and_round.xml" value="0.2185" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_and_round_collection_fragment.xml" value="0.269" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_item_color.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_oval_checked.xml" value="0.2359375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_oval_unchecked.xml" value="0.30052083333333335" />
|
||||
|
@ -19,6 +21,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_round_corner.xml" value="0.2205" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_round_square.xml" value="0.2205" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_roundl.xml" value="0.232" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_test.xml" value="0.269" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/barcode.xml" value="0.2359375" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/barcode_scan.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/border.xml" value="0.27447916666666666" />
|
||||
|
@ -67,6 +70,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_claim_ui.xml" value="0.186" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_claims.xml" value="0.2425" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_cmr.xml" value="0.267" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_collectionTicket.xml" value="0.1905" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_controller_ui.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_controller_ui_selected.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_corridor_ui.xml" value="0.186" />
|
||||
|
@ -85,6 +89,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_init_selected.xml" value="0.26" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_init_ui.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_init_ui_selected.xml" value="0.212" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_item.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_launcher_background.xml" value="0.24010416666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_florist_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_local_florist_black_24dp_selected.xml" value="0.21041666666666667" />
|
||||
|
@ -118,6 +123,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_start_ok.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_streetview_black_24dp.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_swap_horiz_black_24dp.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_ticket.xml" value="0.1705" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_transaction.xml" value="0.22708333333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_verified_user_black_24dp.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_verified_user_black_24dp_selected.xml" value="0.1" />
|
||||
|
@ -140,6 +146,7 @@
|
|||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/qrcode_scan.xml" value="0.17395833333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/rectangle.xml" value="0.31979166666666664" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/revision_icon.xml" value="0.1" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/round.xml" value="0.1915" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/round_av_timer_24.xml" value="0.15052083333333333" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/round_outline.xml" value="0.11979166666666667" />
|
||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/settings_icon.xml" value="0.2635" />
|
||||
|
|
|
@ -43,7 +43,33 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
|||
)
|
||||
}
|
||||
|
||||
fun sip_getExtensionSalix(
|
||||
|
||||
fun collection_get(
|
||||
usuario: String,
|
||||
password: String,
|
||||
collectionFk: String,
|
||||
sectorFk: String,
|
||||
print: String,
|
||||
type: String
|
||||
): Call<CollectionVO> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(collectionFk)
|
||||
params.add(sectorFk)
|
||||
params.add(print)
|
||||
params.add(type)
|
||||
return restClient!!.collection_get(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* fun sip_getExtensionSalix(
|
||||
token:String,
|
||||
WorkerId: String
|
||||
): Call<Any> {
|
||||
|
@ -72,7 +98,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
|
|||
params
|
||||
)
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
fun ticket_checkFullyControlled(
|
||||
usuario: String,
|
||||
|
|
|
@ -237,6 +237,25 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
|
|||
params
|
||||
)
|
||||
}
|
||||
|
||||
fun shelvinLog_add(
|
||||
usuario: String,
|
||||
password: String,
|
||||
code: String
|
||||
|
||||
): Call<Any> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(code)
|
||||
return restClient!!.shelvingLog_add(
|
||||
"json",
|
||||
"1",
|
||||
usuario,
|
||||
password,
|
||||
"application/json",
|
||||
params
|
||||
)
|
||||
}
|
||||
|
||||
fun itemShelvingDelete(usuario: String, password: String, itemFk: String): Call<Any> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(itemFk)
|
||||
|
|
|
@ -120,5 +120,16 @@ class GetVehicleControlTimeUserCase(context: Context) : RestClient(context) {
|
|||
params
|
||||
)
|
||||
}
|
||||
|
||||
fun sip_getExtensionSalix(
|
||||
token:String,
|
||||
WorkerId: String
|
||||
): Call<Any> {
|
||||
val params: ArrayList<String> = ArrayList()
|
||||
params.add(WorkerId)
|
||||
return salixClient!!.sip_getExtension(
|
||||
content_type = "application/json",
|
||||
authorization = token,
|
||||
idWorker=WorkerId
|
||||
)
|
||||
}
|
||||
}
|
|
@ -442,6 +442,17 @@ interface VerdnaturaService {
|
|||
):
|
||||
Call<CollectionVO>
|
||||
|
||||
@POST("almacennew/collection_get")//REVISADA
|
||||
fun collection_get(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>
|
||||
):
|
||||
Call<CollectionVO>
|
||||
|
||||
@POST("almacennew/ticket_get")//REVISADA
|
||||
fun ticket_get(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
|
@ -1186,6 +1197,18 @@ interface VerdnaturaService {
|
|||
):
|
||||
Call<Any>
|
||||
|
||||
|
||||
@POST("almacennew/shelvingLog_add")//REVISADA
|
||||
fun shelvingLog_add(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
@Header("version") version: String,
|
||||
@Header("user") user: String,
|
||||
@Header("pass") pass: String,
|
||||
@Header("Content-Type") content_type: String,
|
||||
@Body params: List<String>
|
||||
):
|
||||
Call<Any>
|
||||
|
||||
@POST("almacennew/itemShelvingDelete")//REVISADA
|
||||
fun itemShelvingDelete(
|
||||
@Header("aplicacion") aplicacion: String,
|
||||
|
|
|
@ -260,7 +260,8 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
R.drawable.ic_delete_forever_black_24dp -> getString(R.string.deleteAllitems)
|
||||
R.drawable.ic_flash_auto_black_24dp -> getString(R.string.allowAutomaticAddItem)
|
||||
R.drawable.ic_logo_salix -> getString(R.string.accessSalix)
|
||||
|
||||
R.drawable.ic_eye_ui -> getString(R.string.icViewCollection)
|
||||
R.drawable.ic_collection->getString(R.string.icViewCollection)
|
||||
else -> {
|
||||
""
|
||||
}
|
||||
|
@ -661,7 +662,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
|
|||
saveWorkForm(
|
||||
WorkForms(
|
||||
"Sergio",
|
||||
"httpsergiodt://10.1.4.42:9000",
|
||||
"http://10.1.4.42:9000",
|
||||
urlSalix = "https://test-salix.verdnatura.es/api/"
|
||||
)
|
||||
)
|
||||
|
|
|
@ -115,9 +115,9 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
|
|||
|
||||
|
||||
fun setInfoTex(text:String,text2:String,text3:String){
|
||||
binding.textinputlayoutOne.hint = text
|
||||
binding.textinputlayoutTwo.hint = text2
|
||||
binding.textinputlayoutThree.hint = text3
|
||||
binding.customDialogValueOne.hint = text
|
||||
binding.customDialogValueTwo.hint = text2
|
||||
binding.customDialogValueThree.hint = text3
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,10 +2,12 @@ package es.verdnatura.presentation.view.feature.collection.adapter
|
|||
|
||||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.content.ContextCompat.getColor
|
||||
import androidx.core.graphics.drawable.DrawableCompat
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.R
|
||||
|
@ -119,10 +121,13 @@ class SaleAdapter(
|
|||
txtError.text = binding.root.context.getString(R.string.newItem)
|
||||
|
||||
}
|
||||
//3969 Refactor collectionColors
|
||||
paintTicketcolor(sale.rgb, itemTicketColor)
|
||||
//paintTicketcolorOld(sale.level, itemTicketColor)
|
||||
|
||||
paintTicketcolor(sale.level, itemTicketColor)
|
||||
//paintTicketcolor(sale.color, itemColor)
|
||||
|
||||
val backgroundDrawableSac: Drawable = binding.itemArticleRowSemaforoSac.background
|
||||
val backgroundDrawablePre: Drawable = binding.itemArticleRowSemaforoPre.background
|
||||
val backgroundDrawableCon: Drawable = binding.itemArticleRowSemaforoCon.background
|
||||
|
||||
if (!sale.isNew && sale.originalQuantity == sale.quantity) {
|
||||
layoutError.visibility = View.GONE
|
||||
|
@ -131,53 +136,60 @@ class SaleAdapter(
|
|||
|
||||
//SEMAFORO
|
||||
if (sale.isPreviousPrepared == "1") {
|
||||
itemArticleRowSemaforoPre.setBackgroundColor(
|
||||
DrawableCompat.setTint(backgroundDrawablePre, getColor(context!!,R.color.verdnatura_dark_sky_blue))
|
||||
/*itemArticleRowSemaforoPre.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_dark_sky_blue
|
||||
)
|
||||
)
|
||||
)*/
|
||||
} else {
|
||||
itemArticleRowSemaforoPre.setBackgroundColor(
|
||||
DrawableCompat.setTint(backgroundDrawablePre, getColor(context!!,R.color.verdnatura_warm_grey))
|
||||
/* itemArticleRowSemaforoPre.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_warm_grey
|
||||
)
|
||||
)
|
||||
)*/
|
||||
}
|
||||
|
||||
if (sale.isPrepared == "1") {
|
||||
itemArticleRowSemaforoSac.setBackgroundColor(
|
||||
DrawableCompat.setTint(backgroundDrawableSac, getColor(context!!,R.color.verdnatura_pumpkin_orange))
|
||||
/* itemArticleRowSemaforoSac.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_pumpkin_orange
|
||||
)
|
||||
)
|
||||
)*/
|
||||
} else {
|
||||
itemArticleRowSemaforoSac.setBackgroundColor(
|
||||
DrawableCompat.setTint(backgroundDrawableSac, getColor(context!!,R.color.verdnatura_warm_grey))
|
||||
/* itemArticleRowSemaforoSac.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_warm_grey
|
||||
)
|
||||
)
|
||||
)*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (sale.isControlled == "1") {
|
||||
itemArticleRowSemaforoCon.setBackgroundColor(
|
||||
|
||||
DrawableCompat.setTint(backgroundDrawableCon, getColor(context!!,R.color.verdnatura_dark_mint))
|
||||
/*itemArticleRowSemaforoCon.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_dark_mint
|
||||
)
|
||||
)
|
||||
)*/
|
||||
} else {
|
||||
itemArticleRowSemaforoCon.setBackgroundColor(
|
||||
DrawableCompat.setTint(backgroundDrawableCon, getColor(context!!,R.color.verdnatura_warm_grey))
|
||||
/*itemArticleRowSemaforoCon.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_warm_grey
|
||||
)
|
||||
)
|
||||
)*/
|
||||
}
|
||||
|
||||
|
||||
|
@ -210,12 +222,13 @@ class SaleAdapter(
|
|||
R.color.verdnatura_dark_mint_light_precontrolled
|
||||
)
|
||||
)
|
||||
itemArticleRowSemaforoCon.setBackgroundColor(
|
||||
DrawableCompat.setTint(backgroundDrawableCon, getColor(context!!,R.color.verdnatura_dark_mint_light_precontrolled))
|
||||
/* itemArticleRowSemaforoCon.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_dark_mint_light_precontrolled
|
||||
)
|
||||
)
|
||||
)*/
|
||||
} else if (sale.isPreviousPrepared == "1") {
|
||||
contentLayout.setBackgroundColor(
|
||||
getColor(
|
||||
|
@ -230,12 +243,13 @@ class SaleAdapter(
|
|||
|
||||
//sergio: para de momento que pinten las lineas sin actualizar ni nada
|
||||
if (sale.isControlled == "2") {
|
||||
itemArticleRowSemaforoCon.setBackgroundColor(
|
||||
DrawableCompat.setTint(backgroundDrawableCon, getColor(context!!,R.color.verdnatura_white))
|
||||
/* itemArticleRowSemaforoCon.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
R.color.verdnatura_white
|
||||
)
|
||||
)
|
||||
)*/
|
||||
contentLayout.setBackgroundColor(
|
||||
getColor(
|
||||
context!!,
|
||||
|
@ -245,6 +259,7 @@ class SaleAdapter(
|
|||
}
|
||||
|
||||
|
||||
|
||||
//ASIGNAMOS VALOR A LA VSITA
|
||||
this.sale = sale
|
||||
|
||||
|
@ -296,8 +311,16 @@ class SaleAdapter(
|
|||
}
|
||||
}
|
||||
}*/
|
||||
private fun paintTicketcolor(color: String?, itemView: View) {
|
||||
|
||||
private fun paintTicketcolor(color: String, itemView: View) {
|
||||
if (color.isNullOrBlank()) {
|
||||
itemView.setBackgroundColor((Color.TRANSPARENT))
|
||||
} else {
|
||||
itemView.setBackgroundColor(Color.parseColor(color))
|
||||
}
|
||||
|
||||
}
|
||||
private fun paintTicketcolorOld(color: String, itemView: View) {
|
||||
|
||||
|
||||
when (color.uppercase().trim()) {
|
||||
|
|
|
@ -9,7 +9,6 @@ import android.net.Uri
|
|||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.speech.SpeechRecognizer
|
||||
import android.util.Log
|
||||
import android.view.View
|
||||
import android.view.View.GONE
|
||||
import android.view.View.VISIBLE
|
||||
|
@ -17,7 +16,6 @@ import android.view.inputmethod.EditorInfo
|
|||
import android.view.inputmethod.InputMethodManager
|
||||
import android.widget.ImageView
|
||||
import android.widget.Toast
|
||||
import androidx.core.view.isVisible
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
|
@ -88,6 +86,8 @@ class CollectionFragment(
|
|||
|
||||
private var itemShelvingSaleSupplyAddCall = -1
|
||||
private var saleTrackingCall = -1
|
||||
private var lastScanned: String = ""
|
||||
private var buttonPushedGetCollection = false
|
||||
|
||||
//private var myKM: KeyguardManager? = null
|
||||
private var positionUnmarked = -1
|
||||
|
@ -151,8 +151,9 @@ class CollectionFragment(
|
|||
|
||||
override fun onResume() {
|
||||
|
||||
if (type==CONTROLADOR && storedBackPosition!=0){
|
||||
setListPosition(storedBackPosition, false)}
|
||||
if (type == CONTROLADOR && storedBackPosition != 0) {
|
||||
setListPosition(storedBackPosition, true)
|
||||
}
|
||||
super.onResume()
|
||||
scanRequest()
|
||||
}
|
||||
|
@ -162,7 +163,7 @@ class CollectionFragment(
|
|||
customDialogInput = CustomDialogInput(requireContext())
|
||||
customDialog = CustomDialog(requireContext())
|
||||
customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
ma.hideBottomNavigation(GONE)
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
|
||||
setEvents()
|
||||
|
@ -181,7 +182,6 @@ class CollectionFragment(
|
|||
goBack = true
|
||||
goBack2 = true
|
||||
goMistakeBack = true
|
||||
|
||||
}
|
||||
|
||||
private fun setToolBar() {
|
||||
|
@ -195,14 +195,23 @@ class CollectionFragment(
|
|||
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
|
||||
val iconPrint = ImageView(context)
|
||||
iconPrint.setImageResource(R.drawable.ic_print_black_24dp)
|
||||
|
||||
val iconAdd = ImageView(context)
|
||||
iconAdd.setImageResource(R.drawable.ic_playlist_add_black_24dp)
|
||||
|
||||
val iconViewCollection = ImageView(context)
|
||||
iconViewCollection.setImageResource(R.drawable.ic_collection)
|
||||
|
||||
|
||||
val iconWorker = ImageView(context)
|
||||
iconWorker.setImageResource(R.drawable.ic_worker)
|
||||
|
||||
val iconPhone = ImageView(context)
|
||||
iconPhone.setImageResource(R.drawable.phone_call)
|
||||
|
||||
val iconParking = ImageView(context)
|
||||
iconParking.setImageResource(R.drawable.ic_local_parking_black_24dp)
|
||||
|
||||
|
@ -210,20 +219,26 @@ class CollectionFragment(
|
|||
|
||||
iconPrint.tooltipText = getTooltip(R.drawable.ic_print_black_24dp)
|
||||
iconAdd.tooltipText = getTooltip(R.drawable.ic_playlist_add_black_24dp)
|
||||
iconWorker.tooltipText = getTooltip(R.drawable.ic_worker)
|
||||
iconViewCollection.tooltipText = getTooltip(R.drawable.ic_collection)
|
||||
iconPhone.tooltipText = getTooltip(R.drawable.phone_call)
|
||||
iconParking.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp)
|
||||
}
|
||||
|
||||
|
||||
if (type.equals("CHECKER")) {
|
||||
listIcons.add(iconPhone)
|
||||
// listIcons.add(iconPhone)
|
||||
}
|
||||
|
||||
|
||||
listIcons.add(iconWorker)
|
||||
|
||||
listIcons.add(iconPrint)
|
||||
if (type == CONTROLADOR) {
|
||||
listIcons.add(iconViewCollection)
|
||||
}
|
||||
|
||||
listIcons.add(iconAdd)
|
||||
|
||||
listIcons.add(iconWorker)
|
||||
if (type.equals(PRECHECKER)) {
|
||||
listIcons.add(iconParking)
|
||||
listIcons.remove(iconPrint)
|
||||
|
@ -235,10 +250,11 @@ class CollectionFragment(
|
|||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
|
||||
when (item) {
|
||||
iconViewCollection.drawable -> getCollection()
|
||||
iconPrint.drawable -> print()
|
||||
iconAdd.drawable -> addItem()
|
||||
iconWorker.drawable -> showUser()
|
||||
iconPhone.drawable -> getExtensionFromUser()
|
||||
//iconPhone.drawable -> getExtensionFromUser()
|
||||
iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(
|
||||
title = getString(R.string.Parking)
|
||||
|
@ -252,8 +268,36 @@ class CollectionFragment(
|
|||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
}
|
||||
|
||||
private fun getExtensionFromUser() {
|
||||
|
||||
private fun getCollection() {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
|
||||
if (!buttonPushedGetCollection) {
|
||||
viewModel.collection_get(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
collection.collectionFk,
|
||||
getData(SECTORFK),
|
||||
type
|
||||
)
|
||||
|
||||
buttonPushedGetCollection = true
|
||||
} else {
|
||||
viewModel.collectionTicketGet(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
lastScanned,
|
||||
getData(SECTORFK),
|
||||
type
|
||||
|
||||
)
|
||||
buttonPushedGetCollection = false
|
||||
}
|
||||
lastScanned = collection.collectionFk
|
||||
}
|
||||
|
||||
/* private fun getExtensionFromUser() {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
|
||||
|
@ -270,7 +314,7 @@ class CollectionFragment(
|
|||
}*/
|
||||
|
||||
|
||||
}
|
||||
}*/
|
||||
|
||||
private fun scanRequest() {
|
||||
binding.scanInput.requestFocus()
|
||||
|
@ -306,6 +350,7 @@ class CollectionFragment(
|
|||
binding.scanInput.setText(textScanned_filterDouble(binding.scanInput.text!!.toString()))
|
||||
|
||||
findSale(binding.scanInput.text.toString())
|
||||
buttonPushedGetCollection = false
|
||||
|
||||
}
|
||||
binding.scanInput.setText("")
|
||||
|
@ -331,6 +376,7 @@ class CollectionFragment(
|
|||
getData(SECTORFK),
|
||||
type
|
||||
)
|
||||
buttonPushedGetCollection = false
|
||||
binding.collectionSwipe.isRefreshing = false
|
||||
//}
|
||||
}
|
||||
|
@ -607,6 +653,24 @@ class CollectionFragment(
|
|||
|
||||
})
|
||||
|
||||
responseSaleMistakeAdd.observe(viewLifecycleOwner, Observer {
|
||||
|
||||
|
||||
if (!goBack) {
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage, isError = true, true)
|
||||
|
||||
} else {
|
||||
ma.messageWithSound(
|
||||
getString(R.string.errorRegistered),
|
||||
isError = false,
|
||||
false
|
||||
)
|
||||
goBack = true
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
responseSaleMove.observe(viewLifecycleOwner, Observer {
|
||||
|
||||
if (it.isError) {
|
||||
|
@ -1054,10 +1118,10 @@ class CollectionFragment(
|
|||
binding.fragmentSacadorCollections.layoutManager = lm
|
||||
setTotalLines()
|
||||
|
||||
if (storedPosition != 0)
|
||||
setListPosition(storedPosition, true)
|
||||
else if (storedBackPosition != 0)
|
||||
setListPosition(storedBackPosition, true)
|
||||
if (storedPosition != 0)
|
||||
setListPosition(storedPosition, true)
|
||||
else if (storedBackPosition != 0)
|
||||
setListPosition(storedBackPosition, true)
|
||||
|
||||
setScrollListener(lm!!)
|
||||
//sergio: se quita porque se realiza desde triggers
|
||||
|
@ -1211,7 +1275,6 @@ class CollectionFragment(
|
|||
if (!isOk) {
|
||||
if (txtscan.contains("-")) {
|
||||
|
||||
// Log.d("VERDNATURA::", "VAMOS A PARKING DESDE PANTALLA CONTROLADOR")
|
||||
|
||||
if (tickets.size > 0) {
|
||||
|
||||
|
@ -1386,6 +1449,7 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
} else if (isFromBack) {
|
||||
|
||||
if (binding.fragmentSacadorCollections != null) {
|
||||
binding.fragmentSacadorCollections.addViewObserver {
|
||||
lm!!.scrollToPositionWithOffset(position, 0)
|
||||
|
@ -1413,7 +1477,6 @@ class CollectionFragment(
|
|||
}
|
||||
|
||||
|
||||
|
||||
//Tarea #4371 se quita para ver si funciona correctamente
|
||||
private fun saleTracking_mark(position: Int, type: String) {
|
||||
|
||||
|
@ -1434,6 +1497,7 @@ class CollectionFragment(
|
|||
)
|
||||
|
||||
}
|
||||
|
||||
private fun unMarkLine(position: Int, newType: String) {
|
||||
state = 0
|
||||
if (sales[position].isPrepared == "1") {
|
||||
|
|
|
@ -48,6 +48,10 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
val response: LiveData<ResponseItemVO>
|
||||
get() = _response
|
||||
|
||||
private val _responseSaleMistakeAdd by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responseSaleMistakeAdd: LiveData<ResponseItemVO>
|
||||
get() = _responseSaleMistakeAdd
|
||||
|
||||
private val _responseItemShelvingSaleSupplyAdd by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responseItemShelvingSaleSupplyAdd: LiveData<ResponseItemVO>
|
||||
get() = _responseItemShelvingSaleSupplyAdd
|
||||
|
@ -180,7 +184,47 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
})
|
||||
}
|
||||
fun collection_get(
|
||||
usuario: String,
|
||||
password: String,
|
||||
collectionFk: String,
|
||||
sectorFk: String,
|
||||
type: String
|
||||
) {
|
||||
getSacadorControladorUserCase.collection_get(
|
||||
usuario,
|
||||
password,
|
||||
collectionFk,
|
||||
sectorFk,
|
||||
"0",
|
||||
type
|
||||
).enqueue(object :
|
||||
Callback<CollectionVO> {
|
||||
override fun onFailure(call: Call<CollectionVO>, t: Throwable) {
|
||||
_collectionTicketList.value = CollectionVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<CollectionVO>,
|
||||
response: Response<CollectionVO>
|
||||
) {
|
||||
if (response.body() != null) {
|
||||
_collectionTicketList.value = response.body()?.let { it.map(contextApp) }
|
||||
} else {
|
||||
_collectionTicketList.value = CollectionVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun saleTrackingReplace(
|
||||
usuario: String,
|
||||
|
@ -1007,7 +1051,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
.enqueue(object :
|
||||
Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(
|
||||
_responseSaleMistakeAdd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
|
@ -1018,7 +1062,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
response: Response<Any>
|
||||
) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
_responseSaleMistakeAdd.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
|
@ -1026,7 +1070,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
)
|
||||
)
|
||||
} else {
|
||||
_response.value =
|
||||
_responseSaleMistakeAdd.value =
|
||||
ResponseItemVO(isError = false, response = response.message())
|
||||
}
|
||||
}
|
||||
|
@ -1059,103 +1103,103 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
|
|||
}
|
||||
|
||||
|
||||
fun sip_getExtension(
|
||||
usuario: String,
|
||||
password: String,
|
||||
workerId: String
|
||||
) {
|
||||
getSacadorControladorUserCase.sip_getExtension(
|
||||
usuario,
|
||||
password,
|
||||
workerId
|
||||
).enqueue(object :
|
||||
Callback<String> {
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
/* fun sip_getExtension(
|
||||
usuario: String,
|
||||
password: String,
|
||||
workerId: String
|
||||
) {
|
||||
getSacadorControladorUserCase.sip_getExtension(
|
||||
usuario,
|
||||
password,
|
||||
workerId
|
||||
).enqueue(object :
|
||||
Callback<String> {
|
||||
override fun onFailure(call: Call<String>, t: Throwable) {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<String?>,
|
||||
response: Response<String>
|
||||
) {
|
||||
override fun onResponse(
|
||||
call: Call<String?>,
|
||||
response: Response<String>
|
||||
) {
|
||||
|
||||
if (response.body() != "false") {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = false,
|
||||
response = response.body()!!,
|
||||
errorMessage = ""
|
||||
)
|
||||
} else {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
response = response.body()!!,
|
||||
errorMessage = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun sip_getExtensionSalix(
|
||||
token: String,
|
||||
workerId: String
|
||||
) {
|
||||
getSacadorControladorUserCase.sip_getExtensionSalix(
|
||||
token,
|
||||
workerId
|
||||
).enqueue(object :
|
||||
Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<Any>,
|
||||
response: Response<Any?>
|
||||
) {
|
||||
// No se ajusta ya que la response is Successful pero el valor retornado es un error y por lo tanto response.body nulo y tira error
|
||||
/* if (response.isSuccessful ){
|
||||
if (response.body() != "false") {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = false,
|
||||
response = JSONObject(response.body()!!.toString()).get("extension").toString(),
|
||||
errorMessage = "")
|
||||
}else{
|
||||
response = response.body()!!,
|
||||
errorMessage = ""
|
||||
)
|
||||
} else {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
response = response.message()!!,
|
||||
errorMessage = "No se puede realizar la llamada. El usuario no tiene la extensión configurada. Solicítelo a informática.")
|
||||
response = response.body()!!,
|
||||
errorMessage = ""
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}*/
|
||||
if (response.body() != null) {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = false,
|
||||
response = JSONObject(response.body()!!.toString()).get("extension")
|
||||
.toString(),
|
||||
errorMessage = ""
|
||||
)
|
||||
// Se prueba el call como JSONOBJECT pero no da resultado porque el sevidor puede devolver un null directamente y salta error MAlformed
|
||||
// Se deja Any para obtener cualquier tipo de objeto y si no es nulo se parsea a Json
|
||||
fun sip_getExtensionSalix(
|
||||
token: String,
|
||||
workerId: String
|
||||
) {
|
||||
getSacadorControladorUserCase.sip_getExtensionSalix(
|
||||
token,
|
||||
workerId
|
||||
).enqueue(object :
|
||||
Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
// Per al cas que el CAll siga Any enlloc de JsonObject:
|
||||
//var answerError=(JSONObject(response.body().toString()).get("extension").toString())
|
||||
//var messageFromError = answerError.get("extension").toString()
|
||||
//Log.d("VERDNATURA::","Message ext"+messageFromError)
|
||||
} else {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
response = "",
|
||||
errorMessage = response.message()!!
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
override fun onResponse(
|
||||
call: Call<Any>,
|
||||
response: Response<Any?>
|
||||
) {
|
||||
// No se ajusta ya que la response is Successful pero el valor retornado es un error y por lo tanto response.body nulo y tira error
|
||||
/* if (response.isSuccessful ){
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = false,
|
||||
response = JSONObject(response.body()!!.toString()).get("extension").toString(),
|
||||
errorMessage = "")
|
||||
}else{
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
response = response.message()!!,
|
||||
errorMessage = "No se puede realizar la llamada. El usuario no tiene la extensión configurada. Solicítelo a informática.")
|
||||
|
||||
}*/
|
||||
if (response.body() != null) {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = false,
|
||||
response = JSONObject(response.body()!!.toString()).get("extension")
|
||||
.toString(),
|
||||
errorMessage = ""
|
||||
)
|
||||
// Se prueba el call como JSONOBJECT pero no da resultado porque el sevidor puede devolver un null directamente y salta error MAlformed
|
||||
// Se deja Any para obtener cualquier tipo de objeto y si no es nulo se parsea a Json
|
||||
|
||||
// Per al cas que el CAll siga Any enlloc de JsonObject:
|
||||
//var answerError=(JSONObject(response.body().toString()).get("extension").toString())
|
||||
//var messageFromError = answerError.get("extension").toString()
|
||||
//Log.d("VERDNATURA::","Message ext"+messageFromError)
|
||||
} else {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
response = "",
|
||||
errorMessage = response.message()!!
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}*/
|
||||
|
||||
fun ticket_checkFullyControlled(
|
||||
usuario: String,
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
package es.verdnatura.presentation.view.feature.controlvehiculo.fragment
|
||||
|
||||
import android.content.Intent
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.net.Uri
|
||||
import android.os.Build
|
||||
import android.view.View.*
|
||||
import android.widget.ImageView
|
||||
import androidx.annotation.RequiresApi
|
||||
import androidx.lifecycle.Observer
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentVehiclecontrolUserBinding
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
|
||||
import es.verdnatura.presentation.common.loadUrl
|
||||
import es.verdnatura.presentation.view.component.CustomDialog
|
||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||
import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
|
||||
|
||||
|
||||
class ControlVehiculoUsuarioFragment(
|
||||
|
@ -19,22 +27,57 @@ class ControlVehiculoUsuarioFragment(
|
|||
private var userFk = ""
|
||||
private var goBack: Boolean = false
|
||||
override fun getLayoutId(): Int = R.layout.fragment_vehiclecontrol_user
|
||||
//private lateinit var customDialog: CustomDialog
|
||||
|
||||
|
||||
companion object {
|
||||
fun newInstance(vUserFK: String) = ControlVehiculoUsuarioFragment(vUserFK)
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
override fun init() {
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclecontroluser)
|
||||
// customDialog = CustomDialog(requireContext())
|
||||
goBack = false
|
||||
binding.splashProgress.visibility = GONE
|
||||
setEvents()
|
||||
setToolBar()
|
||||
setControlVehicleUser()
|
||||
super.init()
|
||||
}
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
private fun setToolBar() {
|
||||
|
||||
binding.mainToolbar.toolbarSubtitle.visibility = VISIBLE
|
||||
binding.mainToolbar.toolbarIcons.visibility = VISIBLE
|
||||
binding.mainToolbar.backButton.visibility = VISIBLE
|
||||
|
||||
val listIcons: ArrayList<ImageView> = ArrayList()
|
||||
val iconPhone = ImageView(context)
|
||||
iconPhone.setImageResource(R.drawable.phone_call)
|
||||
|
||||
iconPhone.tooltipText = getTooltip(R.drawable.phone_call)
|
||||
// listIcons.add(iconPhone)
|
||||
binding.mainToolbar.toolbarIcons.adapter =
|
||||
ToolBarAdapterTooltip(listIcons, object : OnOptionsSelectedListener {
|
||||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
|
||||
when (item) {
|
||||
iconPhone.drawable -> getExtensionFromUser()
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
}
|
||||
|
||||
private fun getExtensionFromUser() {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.sip_getExtensionSalix(getData(TOKEN), vUserFK)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
goBack = true
|
||||
super.onPause()
|
||||
|
@ -42,25 +85,39 @@ class ControlVehiculoUsuarioFragment(
|
|||
|
||||
private fun setControlVehicleUser() {
|
||||
|
||||
userFk=getData(USERFK)
|
||||
userFk = getData(USERFK)
|
||||
|
||||
if (userFk.equals(vUserFK)) {
|
||||
|
||||
binding.splashProgress.visibility = VISIBLE
|
||||
viewModel.machine_getWorkerPlate(getData(USER),getData(PASSWORD))
|
||||
viewModel.deviceProduction_getnameDevice(getData(USER),getData(PASSWORD), getData(ANDROID_ID))
|
||||
viewModel.deviceProductionUser_getWorker(getData(USER),getData(PASSWORD), getData(ANDROID_ID))
|
||||
viewModel.machine_getWorkerPlate(getData(USER), getData(PASSWORD))
|
||||
viewModel.deviceProduction_getnameDevice(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(ANDROID_ID)
|
||||
)
|
||||
viewModel.deviceProductionUser_getWorker(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
getData(ANDROID_ID)
|
||||
)
|
||||
|
||||
} else {
|
||||
userFk = vUserFK
|
||||
|
||||
binding.userInformation.visibility = INVISIBLE
|
||||
binding.nameVehiclecontrol.visibility = INVISIBLE
|
||||
binding.userInformation.setOnClickListener({binding.mainToolbar.backButton.performClick()})
|
||||
|
||||
binding.userInformation.setOnClickListener({ binding.mainToolbar.backButton.performClick() })
|
||||
viewModel.machine_getWorkerPlate(getData(USER), getData(PASSWORD))
|
||||
}
|
||||
binding.userImage.loadUrl("https://salix.verdnatura.es/api/Images/user/160x160/$userFk/download?access_token=${getData(TOKEN)}")
|
||||
viewModel.machine_getWorkerPlate(getData(USER),getData(PASSWORD))
|
||||
binding.userImage.loadUrl(
|
||||
"https://salix.verdnatura.es/api/Images/user/160x160/$userFk/download?access_token=${
|
||||
getData(
|
||||
TOKEN
|
||||
)
|
||||
}"
|
||||
)
|
||||
|
||||
binding.nameVehiclecontrol.text = getData(USER)
|
||||
binding.registeredVehiclecontrol.text = ""
|
||||
binding.deviceName.text = ""
|
||||
|
@ -87,33 +144,63 @@ class ControlVehiculoUsuarioFragment(
|
|||
responsemachine.observe(viewLifecycleOwner, Observer {
|
||||
binding.splashProgress.visibility = GONE
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(it.errorMessage,true,false)
|
||||
ma.messageWithSound(it.errorMessage, true, false)
|
||||
|
||||
} else {
|
||||
//sergio: se modifica el response = null. En casi todas las llamadas se utilizaba para ver si había error.
|
||||
// Ahora ya no.
|
||||
|
||||
|
||||
if (it.response == "false") {
|
||||
|
||||
if (it.type.equals("getWorker")) {
|
||||
binding.assignedDevicename.text =
|
||||
getString(R.string.noAssigned)}
|
||||
} else {
|
||||
|
||||
|
||||
if (it.type.equals("getnameDevice")) {
|
||||
binding.deviceName.text = it.response
|
||||
}
|
||||
if (it.type.equals("getWorker")) {
|
||||
binding.assignedDevicename.text = it.response
|
||||
}
|
||||
if (it.type.equals("getWorkerPlate")) {
|
||||
binding.registeredVehiclecontrol.text = it.response
|
||||
}
|
||||
when (it.type){
|
||||
"getnameDevice"-> binding.deviceName.text = it.response
|
||||
"getWorker"-> binding.assignedDevicename.text =
|
||||
it.response
|
||||
"getWorkerPlate"-> binding.registeredVehiclecontrol.text = it.response
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
responseGetExtensionFromUserId.observe(viewLifecycleOwner, Observer {
|
||||
|
||||
binding.splashProgress.visibility = GONE
|
||||
|
||||
if (it.isError) {
|
||||
ma.messageWithSound(
|
||||
getString(R.string.noSIP) + it.errorMessage + getString(R.string.user) + vUserFK,
|
||||
isError = true,
|
||||
true
|
||||
)
|
||||
|
||||
} else {
|
||||
|
||||
callPicker(it.response)
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
private fun callPicker(extensionNumber: String) {
|
||||
|
||||
|
||||
try {
|
||||
val intent = Intent(Intent.ACTION_DIAL).apply {
|
||||
data = Uri.parse("tel:$extensionNumber")
|
||||
}
|
||||
|
||||
startActivity(intent)
|
||||
} catch (e: Exception) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import es.verdnatura.presentation.base.getMessageFromAllResponse
|
|||
import es.verdnatura.presentation.base.nameofFunction
|
||||
import es.verdnatura.presentation.common.ResponseItemMachineControl
|
||||
import es.verdnatura.presentation.common.ResponseItemVO
|
||||
import org.json.JSONObject
|
||||
import retrofit2.Call
|
||||
import retrofit2.Callback
|
||||
import retrofit2.Response
|
||||
|
@ -30,6 +31,10 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
val responsemachine: LiveData<ResponseItemMachineControl>
|
||||
get() = _responsemachine
|
||||
|
||||
private val _responseGetExtensionFromUserId by lazy { MutableLiveData<ResponseItemVO>() }
|
||||
val responseGetExtensionFromUserId: LiveData<ResponseItemVO>
|
||||
get() = _responseGetExtensionFromUserId
|
||||
|
||||
fun machineWorker_add(
|
||||
usuario: String,
|
||||
password: String,
|
||||
|
@ -246,5 +251,44 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
|
|||
|
||||
})
|
||||
}
|
||||
fun sip_getExtensionSalix(
|
||||
token: String,
|
||||
workerId: String
|
||||
) {
|
||||
getVehicleControlTimeUserCase.sip_getExtensionSalix(
|
||||
token,
|
||||
workerId
|
||||
).enqueue(object :
|
||||
Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(
|
||||
call: Call<Any>,
|
||||
response: Response<Any?>
|
||||
) {
|
||||
|
||||
if (response.body() != null) {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = false,
|
||||
response = JSONObject(response.body()!!.toString()).get("extension")
|
||||
.toString(),
|
||||
errorMessage = ""
|
||||
)
|
||||
|
||||
} else {
|
||||
_responseGetExtensionFromUserId.value = ResponseItemVO(
|
||||
isError = true,
|
||||
response = "",
|
||||
errorMessage = response.message()!!
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
|
@ -62,7 +62,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel() {
|
|||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
10,
|
||||
R.drawable.ic_visibility_black_24dp,
|
||||
R.drawable.ic_ticket,
|
||||
contextApp.getString(R.string.titleShowTicket),
|
||||
R.string.titleShowTicket,
|
||||
contextApp.getString(
|
||||
|
@ -74,7 +74,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel() {
|
|||
_pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
0,
|
||||
R.drawable.ic_loyalty_black_24dp,
|
||||
R.drawable.ic_item,
|
||||
contextApp.getString(R.string.titleItemConsult),
|
||||
R.string.titleItemConsult,
|
||||
contextApp.getString(
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable
|
|||
import android.media.MediaPlayer
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.util.Log.d
|
||||
import android.view.View
|
||||
import android.view.inputmethod.EditorInfo
|
||||
import android.widget.ImageView
|
||||
|
@ -45,6 +46,7 @@ class UbicadorFragment(
|
|||
private var parking: String = ""
|
||||
private var etiquetas: String = "0"
|
||||
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
|
||||
private var isShelvinLogfromMainScreen = false
|
||||
var mperror: MediaPlayer? = null
|
||||
var mpok: MediaPlayer? = null
|
||||
|
||||
|
@ -72,9 +74,14 @@ class UbicadorFragment(
|
|||
setEvents()
|
||||
setToolBar()
|
||||
if (!shelvingFk.isNullOrEmpty()) {
|
||||
isShelvinLogfromMainScreen = false
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
binding.mainToolbar.toolbarTitle.text = shelvingFk
|
||||
viewModel.itemShelvingList(getData(USER), getData(PASSWORD), shelvingFk)
|
||||
|
||||
} else {
|
||||
isShelvinLogfromMainScreen = true
|
||||
|
||||
}
|
||||
super.init()
|
||||
}
|
||||
|
@ -141,6 +148,7 @@ class UbicadorFragment(
|
|||
binding.mainToolbar.toolbarTitle.text = binding.editMatricula.text.toString()
|
||||
shelvingFk = binding.editMatricula.text.toString()
|
||||
binding.splashProgress.visibility = View.VISIBLE
|
||||
|
||||
viewModel.itemShelvingList(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
|
@ -186,22 +194,28 @@ class UbicadorFragment(
|
|||
}
|
||||
|
||||
binding.parkingImg.setOnClickListener {
|
||||
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("").setOkButton(getString(
|
||||
R.string.parking)) {
|
||||
viewModel.shelvingPark(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
shelvingFk,
|
||||
customDialogInput.getValue()
|
||||
)
|
||||
parking = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) +parking + getString(R.string.label) + etiquetas
|
||||
if (mpok != null) mpok!!.start()
|
||||
customDialogInput.dismiss()
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialogInput.dismiss()
|
||||
}.show()
|
||||
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("")
|
||||
.setOkButton(
|
||||
getString(
|
||||
R.string.parking
|
||||
)
|
||||
) {
|
||||
viewModel.shelvingPark(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
shelvingFk,
|
||||
customDialogInput.getValue()
|
||||
)
|
||||
parking = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
||||
R.string.label
|
||||
) + etiquetas
|
||||
if (mpok != null) mpok!!.start()
|
||||
customDialogInput.dismiss()
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialogInput.dismiss()
|
||||
}.show()
|
||||
|
||||
customDialogInput.getEditText().requestFocus()
|
||||
ma.hideKeyboard(customDialogInput.getEditText())
|
||||
|
@ -217,7 +231,9 @@ class UbicadorFragment(
|
|||
customDialogInput.dismiss()
|
||||
parking = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(R.string.label) + etiquetas
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
||||
R.string.label
|
||||
) + etiquetas
|
||||
if (mpok != null) {
|
||||
mpok!!.start()
|
||||
}
|
||||
|
@ -230,21 +246,24 @@ class UbicadorFragment(
|
|||
}
|
||||
|
||||
binding.editImg.setOnClickListener {
|
||||
customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("").setOkButton(getString(R.string.save)) {
|
||||
viewModel.shelvingChange(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
shelvingFk,
|
||||
customDialogInput.getValue()
|
||||
)
|
||||
shelvingFk = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() +getString(R.string.pUppercase) + parking +getString(R.string.label) + etiquetas
|
||||
if (mpok != null) mpok!!.start()
|
||||
customDialogInput.dismiss()
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialogInput.dismiss()
|
||||
}.show()
|
||||
customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("")
|
||||
.setOkButton(getString(R.string.save)) {
|
||||
viewModel.shelvingChange(
|
||||
getData(USER),
|
||||
getData(PASSWORD),
|
||||
shelvingFk,
|
||||
customDialogInput.getValue()
|
||||
)
|
||||
shelvingFk = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
||||
R.string.label
|
||||
) + etiquetas
|
||||
if (mpok != null) mpok!!.start()
|
||||
customDialogInput.dismiss()
|
||||
}.setKoButton(getString(R.string.cancel)) {
|
||||
customDialogInput.dismiss()
|
||||
}.show()
|
||||
|
||||
customDialogInput.getEditText().requestFocus()
|
||||
ma.hideKeyboard(customDialogInput.getEditText())
|
||||
|
@ -259,7 +278,9 @@ class UbicadorFragment(
|
|||
)
|
||||
shelvingFk = customDialogInput.getValue()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() +getString(R.string.pUppercase) + parking +getString(R.string.label) + etiquetas
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
||||
R.string.label
|
||||
) + etiquetas
|
||||
if (mpok != null) mpok!!.start()
|
||||
customDialogInput.dismiss()
|
||||
return@setOnEditorActionListener true
|
||||
|
@ -271,7 +292,8 @@ class UbicadorFragment(
|
|||
|
||||
binding.deleteImg.setOnClickListener {
|
||||
customDialog.setTitle(getString(R.string.empty))
|
||||
.setDescription(getString(R.string.operationNoReturn)).setOkButton(getString(R.string.empty)) {
|
||||
.setDescription(getString(R.string.operationNoReturn))
|
||||
.setOkButton(getString(R.string.empty)) {
|
||||
viewModel.clearShelvingList(
|
||||
getData(USER),
|
||||
getData(PASSWORD), shelvingFk
|
||||
|
@ -300,7 +322,7 @@ class UbicadorFragment(
|
|||
binding.editPrioridad.tooltipText =
|
||||
getString(R.string.changePriority)
|
||||
binding.parkingImg.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp)
|
||||
binding.automaticImg.tooltipText =getTooltip(R.drawable.ic_flash_auto_black_24dp)
|
||||
binding.automaticImg.tooltipText = getTooltip(R.drawable.ic_flash_auto_black_24dp)
|
||||
|
||||
|
||||
}
|
||||
|
@ -313,7 +335,7 @@ class UbicadorFragment(
|
|||
event.getContentIfNotHandled().notNull {
|
||||
deep = it.list.size
|
||||
listItems = ArrayList()
|
||||
var contEtiquetas= 0
|
||||
var contEtiquetas = 0
|
||||
it.list.forEach { item ->
|
||||
try {
|
||||
contEtiquetas += item.stickers.toInt()
|
||||
|
@ -325,7 +347,9 @@ class UbicadorFragment(
|
|||
}
|
||||
etiquetas = contEtiquetas.toString()
|
||||
binding.mainToolbar.toolbarTitle.text =
|
||||
shelvingFk.uppercase() +getString(R.string.pUppercase) + parking +getString(R.string.label) + etiquetas
|
||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
||||
R.string.label
|
||||
) + etiquetas
|
||||
if (it.list.size > 0)
|
||||
binding.editPrioridad.setText(it.list[0].priority)
|
||||
binding.splashProgress.visibility = View.GONE
|
||||
|
@ -363,6 +387,11 @@ class UbicadorFragment(
|
|||
binding.locationRecyclerview.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, true)
|
||||
|
||||
if (isShelvinLogfromMainScreen){
|
||||
//tarea 4454
|
||||
viewModel.shelvinLog_add(getData(USER),getData(PASSWORD),shelvingFk)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -372,8 +401,8 @@ class UbicadorFragment(
|
|||
ma.messageWithSound(it.errorMessage, it.isError, false)
|
||||
|
||||
|
||||
}else{
|
||||
ma.messageWithSound("", it.isError, true)
|
||||
} else {
|
||||
ma.messageWithSound("", it.isError, true, isToasted = false)
|
||||
|
||||
}
|
||||
})
|
||||
|
@ -567,13 +596,13 @@ class UbicadorFragment(
|
|||
itemShelvingFk,
|
||||
groupingPack
|
||||
)
|
||||
/* changeOfflineValue(
|
||||
ItemUbicadorVO(
|
||||
item = itemFk,
|
||||
visible = visible,
|
||||
packing = packing
|
||||
)
|
||||
)*/
|
||||
/* changeOfflineValue(
|
||||
ItemUbicadorVO(
|
||||
item = itemFk,
|
||||
visible = visible,
|
||||
packing = packing
|
||||
)
|
||||
)*/
|
||||
customDialogUbicador.setItemValue("").setPackingValue("").setGroupingValue("")
|
||||
.setEtiquetaValue("").setVisibleValue("")
|
||||
customDialogUbicador.getEditItem().requestFocus()
|
||||
|
@ -600,14 +629,14 @@ class UbicadorFragment(
|
|||
itemShelvingFk,
|
||||
groupingPack
|
||||
)
|
||||
/* changeOfflineValue(
|
||||
ItemUbicadorVO(
|
||||
item = itemFk,
|
||||
visible = visible_calc,
|
||||
packing = packing,
|
||||
stickers = etiquetas
|
||||
)
|
||||
)*/
|
||||
/* changeOfflineValue(
|
||||
ItemUbicadorVO(
|
||||
item = itemFk,
|
||||
visible = visible_calc,
|
||||
packing = packing,
|
||||
stickers = etiquetas
|
||||
)
|
||||
)*/
|
||||
customDialogUbicador.setItemValue("").setPackingValue("").setGroupingValue("")
|
||||
.setEtiquetaValue("").setVisibleValue("")
|
||||
customDialogUbicador.getEditItem().requestFocus()
|
||||
|
@ -623,7 +652,10 @@ class UbicadorFragment(
|
|||
}
|
||||
|
||||
} else {
|
||||
getString(R.string.mandatoryPacking).toast((activity as MainActivity), Toast.LENGTH_LONG)
|
||||
getString(R.string.mandatoryPacking).toast(
|
||||
(activity as MainActivity),
|
||||
Toast.LENGTH_LONG
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -328,6 +328,38 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
|||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun shelvinLog_add(
|
||||
usuario: String,
|
||||
password: String,
|
||||
code: String
|
||||
|
||||
|
||||
) {
|
||||
getUbicadorUserCase.shelvinLog_add(usuario, password, code)
|
||||
.enqueue(object : Callback<Any> {
|
||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||
)
|
||||
}
|
||||
|
||||
override fun onResponse(call: Call<Any>, response: Response<Any>) {
|
||||
if (!response.isSuccessful) {
|
||||
_response.value = ResponseItemVO(
|
||||
isError = true,
|
||||
errorMessage = getMessageFromAllResponse(
|
||||
nameofFunction(this),
|
||||
response.message()
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
fun itemShelving_return(
|
||||
usuario: String,
|
||||
password: String,
|
||||
|
@ -370,9 +402,7 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
|
|||
} else {
|
||||
|
||||
_reubicationList.value = response.body()?.let { ReubicationList(it) }
|
||||
/* for (item in response.body()!!){
|
||||
Log.d("VERDNATURA","El item es "+item.itemFk+":"+item.shelvingFk)
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<!-- drawable/atom_variant.xml -->
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:height="24dp"
|
||||
android:width="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path android:fillColor="#FFF" android:pathData="M18.36,2.64C20,2.64 21.36,4 21.36,5.64C21.36,7.29 20,8.64 18.36,8.64C16.71,8.64 15.36,7.29 15.36,5.64C15.36,5.34 15.41,5.06 15.5,4.8C14.43,4.29 13.25,4 12,4A8,8 0 0,0 4,12L4.04,12.84L2.05,13.05L2,12A10,10 0 0,1 12,2C13.69,2 15.28,2.42 16.67,3.16C17.16,2.83 17.74,2.64 18.36,2.64M18.36,4.64A1,1 0 0,0 17.36,5.64A1,1 0 0,0 18.36,6.64C18.92,6.64 19.36,6.19 19.36,5.64C19.36,5.08 18.92,4.64 18.36,4.64M5.64,15.36C7.29,15.36 8.64,16.71 8.64,18.36C8.64,18.66 8.59,18.94 8.5,19.2C9.57,19.71 10.75,20 12,20A8,8 0 0,0 20,12L19.96,11.16L21.95,10.95L22,12A10,10 0 0,1 12,22C10.31,22 8.72,21.58 7.33,20.84C6.84,21.17 6.26,21.36 5.64,21.36C4,21.36 2.64,20 2.64,18.36C2.64,16.71 4,15.36 5.64,15.36M5.64,17.36C5.08,17.36 4.64,17.81 4.64,18.36C4.64,18.92 5.08,19.36 5.64,19.36A1,1 0 0,0 6.64,18.36A1,1 0 0,0 5.64,17.36M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8Z" />
|
||||
</vector>
|
|
@ -0,0 +1,20 @@
|
|||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="oval">
|
||||
|
||||
<stroke
|
||||
android:width="2dp"
|
||||
android:color="@color/verdnatura_white" >
|
||||
</stroke>
|
||||
|
||||
<corners
|
||||
android:radius="2dp"/>
|
||||
|
||||
<solid android:color="@color/verdnatura_warm_grey" />
|
||||
|
||||
<padding
|
||||
android:top="5dp"
|
||||
android:bottom="5dp"
|
||||
android:left="5dp"
|
||||
android:right="5dp"/>
|
||||
|
||||
</shape>
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="@color/colorPrimary"/>
|
||||
<corners android:radius="1000dp" />
|
||||
</shape>
|
|
@ -1,5 +1,7 @@
|
|||
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||
android:viewportHeight="24.0" android:viewportWidth="24.0"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FFFFFF" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
|
||||
android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#FFFFFF"
|
||||
android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
|
||||
</vector>
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<vector android:height="24dp" android:viewportHeight="32"
|
||||
android:viewportWidth="32"
|
||||
android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#F7931E" android:pathData="M18.533,25.867v-0.933l0.267,-0.4c1.333,1.2 3.2,1.867 5.2,1.867 4.4,0 7.867,-3.6 7.867,-7.867 0,-4.4 -3.6,-7.867 -7.867,-7.867 -4.4,0 -7.867,3.6 -7.867,7.867 0,2 0.667,3.733 1.867,5.2l-0.4,0.267h-0.933l-6,6.133 1.867,1.867 6,-6.133zM24.133,13.067c3.067,0 5.467,2.4 5.467,5.467s-2.4,5.467 -5.467,5.467c-3.067,0 -5.467,-2.4 -5.467,-5.467 -0.133,-2.933 2.4,-5.467 5.467,-5.467z"/>
|
||||
<path android:fillColor="#F7931E" android:pathData="M14.4,26.533v0,-0.133z"/>
|
||||
<path android:fillColor="#F7931E" android:pathData="M0,0h3.2v26.533h-3.2v-26.533z"/>
|
||||
<path android:fillColor="#F7931E" android:pathData="M32,11.6v-11.6h-3.2v9.067c1.2,0.667 2.267,1.467 3.2,2.533z"/>
|
||||
<path android:fillColor="#F7931E" android:pathData="M14.267,22.8c-0.533,-1.333 -0.8,-2.667 -0.8,-4.133 0,-1.6 0.4,-2.933 0.933,-4.267v-14.4h-4.8v26.533h0.933l3.733,-3.733z"/>
|
||||
<path android:fillColor="#F7931E" android:pathData="M6.4,0h1.6v26.533h-1.6v-26.533z"/>
|
||||
<path android:fillColor="#F7931E" android:pathData="M24.133,8c0.533,0 1.067,0 1.467,0.133v-8.133h-1.6l0.133,8c-0.133,0 -0.133,0 0,0z"/>
|
||||
<path android:fillColor="#F7931E" android:pathData="M20.8,8.533v-8.533h-3.2c0,0 0,5.333 0,10.267 0.933,-0.8 2,-1.333 3.2,-1.733z"/>
|
||||
</vector>
|
|
@ -0,0 +1,8 @@
|
|||
<vector android:height="24dp" android:viewportHeight="32"
|
||||
android:viewportWidth="32" android:width="24dp"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="#F7931E"
|
||||
android:pathData="M6.267,20.267c0.4,-1.2 0.8,-2.4 1.2,-3.6 0.267,-0.8 0.533,-1.733 0.933,-2.533 0.933,-2.533 1.733,-5.2 2.667,-7.733 0.667,-1.733 1.2,-3.467 1.867,-5.2 0.133,-0.4 0.267,-0.667 0.4,-1.067 0,-0.133 0.133,-0.133 0.267,-0.133 1.867,0.4 3.6,0.667 5.467,1.067 2.533,0.533 4.933,1.067 7.467,1.467 1.733,0.4 3.467,0.667 5.333,1.067 0.133,0.133 0.133,0.133 0.133,0.4 -0.933,2.8 -1.867,5.6 -2.8,8.267 -0.667,2 -1.333,4 -2,5.867 -0.8,2.133 -1.467,4.4 -2.4,6.533 -0.533,1.6 -1.2,3.067 -1.867,4.533 -0.4,0.8 -0.8,1.6 -1.467,2.133 -0.533,0.533 -1.067,0.667 -1.867,0.4 -1.867,-0.533 -2.933,-1.867 -3.333,-3.733 -0.133,-0.8 -0.267,-1.6 -0.267,-2.4 0,-0.4 0,-0.8 0,-1.2s-0.267,-0.667 -0.533,-0.8c-2.4,-0.933 -4.8,-2 -7.333,-2.933 -0.8,0 -1.333,-0.133 -1.867,-0.4zM17.333,12.8c-0.533,0 -0.933,0.133 -0.933,0.533 -0.133,0.4 0.133,0.8 0.533,0.933 1.867,0.667 3.867,1.333 5.733,1.867 0.4,0.133 0.8,0 0.933,-0.267 0.267,-0.533 0.133,-0.933 -0.4,-1.2 -1.467,-0.533 -3.067,-1.067 -4.533,-1.467 -0.533,-0.133 -1.067,-0.267 -1.333,-0.4zM14.933,18.267c-0.133,0 -0.267,0 -0.4,0.133 -0.267,0.133 -0.4,0.4 -0.4,0.667 0,0.4 0.267,0.667 0.667,0.8 1.867,0.667 3.733,1.2 5.733,1.867 0.533,0.133 0.933,0 1.067,-0.4s-0.133,-0.8 -0.533,-0.933c-1.333,-0.4 -2.667,-0.933 -4.133,-1.333 -0.8,-0.4 -1.467,-0.667 -2,-0.8zM25.2,10.267c0.667,0 0.933,-0.133 1.067,-0.667 0.133,-0.267 -0.267,-0.667 -0.667,-0.8 -0.667,-0.133 -1.333,-0.4 -2.133,-0.533 -1.2,-0.4 -2.4,-0.667 -3.733,-1.067 -0.533,-0.133 -1.067,0.267 -0.933,0.8 0,0.4 0.4,0.533 0.8,0.667 1.333,0.4 2.8,0.8 4.133,1.2 0.533,0.133 1.067,0.267 1.467,0.4zM16.133,6.667c0,-0.4 -0.4,-0.8 -0.8,-0.8 -0.533,0 -0.8,0.267 -0.8,0.667s0.4,0.8 0.933,0.8c0.4,0.133 0.667,-0.133 0.667,-0.667zM13.333,13.067c0.4,0 0.8,-0.267 0.8,-0.667s-0.4,-0.8 -0.8,-0.8c-0.533,0 -0.933,0.267 -0.8,0.667 -0.133,0.4 0.133,0.8 0.8,0.8zM11.067,16.8c-0.533,0 -0.8,0.267 -0.8,0.8s0.4,0.8 0.933,0.8c0.4,0 0.8,-0.267 0.8,-0.667 -0.133,-0.533 -0.533,-0.933 -0.933,-0.933z"/>
|
||||
<path android:fillColor="#F7931E"
|
||||
android:pathData="M0.133,19.333c0.8,0.4 1.733,0.667 2.533,1.067 1.867,0.8 3.733,1.467 5.467,2.267 1.6,0.667 3.2,1.333 4.933,2 0.267,0.133 0.533,0.267 0.8,0.4s0.4,0.267 0.4,0.533c0,1.333 0.133,2.8 0.667,4 0.267,0.533 0.533,1.2 0.8,1.733 -0.4,-0.133 -0.933,-0.267 -1.333,-0.533 -1.467,-0.533 -2.933,-1.2 -4.533,-1.733 -1.333,-0.533 -2.667,-1.2 -4,-1.733 -0.933,-0.4 -1.867,-0.8 -2.8,-1.2s-1.733,-1.2 -2.267,-2c-0.667,-1.333 -0.8,-2.667 -0.8,-4.133 0,-0.133 0.133,-0.4 0.133,-0.667z"/>
|
||||
</vector>
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||
<solid android:color="#FFFFFF" />
|
||||
<stroke android:width=".05dp" android:color="#d2d2d2" />
|
||||
<corners android:topLeftRadius="50dp" android:topRightRadius="50dp" android:bottomRightRadius="5dp" android:bottomLeftRadius="50dp"/>
|
||||
</shape>
|
|
@ -45,37 +45,43 @@
|
|||
android:id="@+id/textinputlayout_one"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/layout_margin_min"
|
||||
android:textColorHint="@android:color/darker_gray">
|
||||
android:layout_marginTop="@dimen/default_layout_margin"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
app:hintEnabled="false">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/custom_dialog_value_one"
|
||||
style="@style/DefaultButton.NormalButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||
android:background="@drawable/background_round"
|
||||
android:enabled="true"
|
||||
android:hint="@string/quantity"
|
||||
android:hint="@string/name"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:visibility="visible" />
|
||||
android:visibility="visible"
|
||||
app:hintEnabled="false" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textinputlayout_two"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/layout_margin_min"
|
||||
android:hint="@string/scanShelving"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:visibility="visible">
|
||||
app:hintEnabled="false">
|
||||
|
||||
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/custom_dialog_value_two"
|
||||
style="@style/DefaultButton.NormalButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||
android:background="@drawable/background_round"
|
||||
android:hint="@string/scanShelving"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
|
@ -87,15 +93,18 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="@dimen/layout_margin_min"
|
||||
android:hint="@string/scanShelving"
|
||||
android:textColorHint="@android:color/darker_gray"
|
||||
android:visibility="visible">
|
||||
app:hintEnabled="false"
|
||||
|
||||
>
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/custom_dialog_value_three"
|
||||
style="@style/DefaultButton.NormalButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_marginBottom="@dimen/default_layout_margin"
|
||||
android:background="@drawable/background_round"
|
||||
android:hint="@string/scanShelving"
|
||||
android:inputType="text"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
|
|
|
@ -101,6 +101,32 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_alignParentRight="true"
|
||||
app:srcCompat="@drawable/emoticon_error_fragment" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_article_row_semaforo_pre"
|
||||
android:layout_width="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_height="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="2dp"
|
||||
android:background="@drawable/background_and_round_collection_fragment" />
|
||||
|
||||
|
||||
<View
|
||||
android:id="@+id/item_article_row_semaforo_sac"
|
||||
android:layout_width="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_height="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@drawable/background_and_round_collection_fragment" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_article_row_semaforo_con"
|
||||
android:layout_width="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_height="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="48dp"
|
||||
android:background="@drawable/background_and_round_collection_fragment" />
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -137,32 +163,12 @@
|
|||
<!--SEMAFORO=================================================-->
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout3"
|
||||
android:layout_width="@dimen/semaforo_width_to_modify"
|
||||
android:layout_width="@dimen/layout_margin_min"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<View
|
||||
android:id="@+id/item_article_row_semaforo_pre"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/semaforo_height"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@color/verdnatura_warm_grey" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_article_row_semaforo_sac"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/semaforo_height"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:background="@color/verdnatura_warm_grey" />
|
||||
|
||||
<View
|
||||
android:id="@+id/item_article_row_semaforo_con"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/semaforo_height"
|
||||
android:background="@color/verdnatura_warm_grey" />
|
||||
background_oval_checked
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
</LinearLayout>
|
||||
|
||||
<!--CONTENIDO=================================================-->
|
||||
|
|
|
@ -373,7 +373,7 @@
|
|||
<string name="pallet">Pallet </string>
|
||||
<string name="expeditionP">Expedition (</string>
|
||||
<string name="sureCloseSession">¿Estás seguro de cerrar la sesión?</string>
|
||||
<string name="errorCauseRegistered">Causa del error registada</string>
|
||||
<string name="errorCauseRegistered">Causa del error registrada</string>
|
||||
<string name="itemPoints">Artículo: </string>
|
||||
<string name="originalQuantity">"Cantidad original: "</string>
|
||||
<string name="noSIP">No se puede realizar la llamada. El usuario no tiene la extensión configurada. Solicítelo a informática.</string>
|
||||
|
@ -487,5 +487,7 @@
|
|||
<string name="name">Nombre</string>
|
||||
<string name="deleteWorkForm">Borrar forma trabajo</string>
|
||||
<string name="deleteWorkFormConfirmation">¿Desea borrar definitivamente la forma de trabajo?</string>
|
||||
<string name="icViewCollection">Ver colección o último ticket</string>
|
||||
<string name="noAssigned">No asignado</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -90,6 +90,8 @@
|
|||
<dimen name="semaforo_width">20dp</dimen>
|
||||
<dimen name="semaforo_width_to_modify">15dp</dimen>
|
||||
<dimen name="semaforo_height">30dp</dimen>
|
||||
<dimen name="semaforo_next_to_ticket">18dp</dimen>
|
||||
|
||||
|
||||
<!-- Pintar ticket -->
|
||||
<dimen name="ticketColor_height">90dp</dimen>
|
||||
|
|
|
@ -285,6 +285,7 @@
|
|||
<string name="errorNotNumber">Element introduced is not a number</string>
|
||||
<string name="buyer">Buyer</string>
|
||||
<string name="accessSalix">Access Salix to see more information</string>
|
||||
<string name="icViewCollection">Access to collection or ticket</string>
|
||||
<string name="item">Ítem : </string>
|
||||
<string name="changeShelving">Change plate</string>
|
||||
<string name="registerOneWagoon">Wagoon scaned¿Do you want register another?</string>
|
||||
|
@ -486,7 +487,8 @@
|
|||
<string name="salixServer">Server Salix</string>
|
||||
<string name="name">Name</string>
|
||||
<string name="deleteWorkForm">Delete work form</string>
|
||||
<string name="deleteWorkFormConfirmation">¿Do you delete definitely?</string>
|
||||
<string name="deleteWorkFormConfirmation">¿Do you remove definitely?</string>
|
||||
<string name="noAssigned">Not assigned</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue