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:
Sergio De la torre 2022-10-06 07:01:04 +02:00
parent 0c87ae654b
commit ddb4ab09c4
27 changed files with 754 additions and 260 deletions

View File

@ -5,6 +5,7 @@
<map> <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_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/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_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_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" /> <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_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/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.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_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_checked.xml" value="0.2359375" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/background_oval_unchecked.xml" value="0.30052083333333335" /> <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_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_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_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.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/barcode_scan.xml" value="0.1" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/border.xml" value="0.27447916666666666" /> <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_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_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_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.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_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" /> <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_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.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_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_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.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" /> <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_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_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_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_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.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" /> <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/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/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/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_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/round_outline.xml" value="0.11979166666666667" />
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/settings_icon.xml" value="0.2635" /> <entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/settings_icon.xml" value="0.2635" />

View File

@ -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, token:String,
WorkerId: String WorkerId: String
): Call<Any> { ): Call<Any> {
@ -72,7 +98,7 @@ class GetSacadorControladorUserCase(context: Context) : RestClient(context) {
params params
) )
} }
*/
fun ticket_checkFullyControlled( fun ticket_checkFullyControlled(
usuario: String, usuario: String,

View File

@ -237,6 +237,25 @@ class GetUbicadorUserCase(context: Context) : RestClient(context) {
params 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> { fun itemShelvingDelete(usuario: String, password: String, itemFk: String): Call<Any> {
val params: ArrayList<String> = ArrayList() val params: ArrayList<String> = ArrayList()
params.add(itemFk) params.add(itemFk)

View File

@ -120,5 +120,16 @@ class GetVehicleControlTimeUserCase(context: Context) : RestClient(context) {
params 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
)
}
} }

View File

@ -442,6 +442,17 @@ interface VerdnaturaService {
): ):
Call<CollectionVO> 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 @POST("almacennew/ticket_get")//REVISADA
fun ticket_get( fun ticket_get(
@Header("aplicacion") aplicacion: String, @Header("aplicacion") aplicacion: String,
@ -1186,6 +1197,18 @@ interface VerdnaturaService {
): ):
Call<Any> 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 @POST("almacennew/itemShelvingDelete")//REVISADA
fun itemShelvingDelete( fun itemShelvingDelete(
@Header("aplicacion") aplicacion: String, @Header("aplicacion") aplicacion: String,

View File

@ -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_delete_forever_black_24dp -> getString(R.string.deleteAllitems)
R.drawable.ic_flash_auto_black_24dp -> getString(R.string.allowAutomaticAddItem) R.drawable.ic_flash_auto_black_24dp -> getString(R.string.allowAutomaticAddItem)
R.drawable.ic_logo_salix -> getString(R.string.accessSalix) 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 -> { else -> {
"" ""
} }
@ -661,7 +662,7 @@ abstract class BaseFragment<T : ViewDataBinding, V : BaseViewModel>(viewModelCla
saveWorkForm( saveWorkForm(
WorkForms( WorkForms(
"Sergio", "Sergio",
"httpsergiodt://10.1.4.42:9000", "http://10.1.4.42:9000",
urlSalix = "https://test-salix.verdnatura.es/api/" urlSalix = "https://test-salix.verdnatura.es/api/"
) )
) )

View File

@ -115,9 +115,9 @@ class CustomDialogInputThreeValues(context: Context) : Dialog(context, R.style.D
fun setInfoTex(text:String,text2:String,text3:String){ fun setInfoTex(text:String,text2:String,text3:String){
binding.textinputlayoutOne.hint = text binding.customDialogValueOne.hint = text
binding.textinputlayoutTwo.hint = text2 binding.customDialogValueTwo.hint = text2
binding.textinputlayoutThree.hint = text3 binding.customDialogValueThree.hint = text3
} }

View File

@ -2,10 +2,12 @@ package es.verdnatura.presentation.view.feature.collection.adapter
import android.content.Context import android.content.Context
import android.graphics.Color import android.graphics.Color
import android.graphics.drawable.Drawable
import android.view.LayoutInflater import android.view.LayoutInflater
import android.view.View import android.view.View
import android.view.ViewGroup import android.view.ViewGroup
import androidx.core.content.ContextCompat.getColor import androidx.core.content.ContextCompat.getColor
import androidx.core.graphics.drawable.DrawableCompat
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import es.verdnatura.R import es.verdnatura.R
@ -119,10 +121,13 @@ class SaleAdapter(
txtError.text = binding.root.context.getString(R.string.newItem) txtError.text = binding.root.context.getString(R.string.newItem)
} }
//3969 Refactor collectionColors
paintTicketcolor(sale.rgb, itemTicketColor)
//paintTicketcolorOld(sale.level, itemTicketColor)
paintTicketcolor(sale.level, itemTicketColor) val backgroundDrawableSac: Drawable = binding.itemArticleRowSemaforoSac.background
//paintTicketcolor(sale.color, itemColor) val backgroundDrawablePre: Drawable = binding.itemArticleRowSemaforoPre.background
val backgroundDrawableCon: Drawable = binding.itemArticleRowSemaforoCon.background
if (!sale.isNew && sale.originalQuantity == sale.quantity) { if (!sale.isNew && sale.originalQuantity == sale.quantity) {
layoutError.visibility = View.GONE layoutError.visibility = View.GONE
@ -131,53 +136,60 @@ class SaleAdapter(
//SEMAFORO //SEMAFORO
if (sale.isPreviousPrepared == "1") { if (sale.isPreviousPrepared == "1") {
itemArticleRowSemaforoPre.setBackgroundColor( DrawableCompat.setTint(backgroundDrawablePre, getColor(context!!,R.color.verdnatura_dark_sky_blue))
/*itemArticleRowSemaforoPre.setBackgroundColor(
getColor( getColor(
context!!, context!!,
R.color.verdnatura_dark_sky_blue R.color.verdnatura_dark_sky_blue
) )
) )*/
} else { } else {
itemArticleRowSemaforoPre.setBackgroundColor( DrawableCompat.setTint(backgroundDrawablePre, getColor(context!!,R.color.verdnatura_warm_grey))
/* itemArticleRowSemaforoPre.setBackgroundColor(
getColor( getColor(
context!!, context!!,
R.color.verdnatura_warm_grey R.color.verdnatura_warm_grey
) )
) )*/
} }
if (sale.isPrepared == "1") { if (sale.isPrepared == "1") {
itemArticleRowSemaforoSac.setBackgroundColor( DrawableCompat.setTint(backgroundDrawableSac, getColor(context!!,R.color.verdnatura_pumpkin_orange))
/* itemArticleRowSemaforoSac.setBackgroundColor(
getColor( getColor(
context!!, context!!,
R.color.verdnatura_pumpkin_orange R.color.verdnatura_pumpkin_orange
) )
) )*/
} else { } else {
itemArticleRowSemaforoSac.setBackgroundColor( DrawableCompat.setTint(backgroundDrawableSac, getColor(context!!,R.color.verdnatura_warm_grey))
/* itemArticleRowSemaforoSac.setBackgroundColor(
getColor( getColor(
context!!, context!!,
R.color.verdnatura_warm_grey R.color.verdnatura_warm_grey
) )
) )*/
} }
if (sale.isControlled == "1") { if (sale.isControlled == "1") {
itemArticleRowSemaforoCon.setBackgroundColor(
DrawableCompat.setTint(backgroundDrawableCon, getColor(context!!,R.color.verdnatura_dark_mint))
/*itemArticleRowSemaforoCon.setBackgroundColor(
getColor( getColor(
context!!, context!!,
R.color.verdnatura_dark_mint R.color.verdnatura_dark_mint
) )
) )*/
} else { } else {
itemArticleRowSemaforoCon.setBackgroundColor( DrawableCompat.setTint(backgroundDrawableCon, getColor(context!!,R.color.verdnatura_warm_grey))
/*itemArticleRowSemaforoCon.setBackgroundColor(
getColor( getColor(
context!!, context!!,
R.color.verdnatura_warm_grey R.color.verdnatura_warm_grey
) )
) )*/
} }
@ -210,12 +222,13 @@ class SaleAdapter(
R.color.verdnatura_dark_mint_light_precontrolled R.color.verdnatura_dark_mint_light_precontrolled
) )
) )
itemArticleRowSemaforoCon.setBackgroundColor( DrawableCompat.setTint(backgroundDrawableCon, getColor(context!!,R.color.verdnatura_dark_mint_light_precontrolled))
/* itemArticleRowSemaforoCon.setBackgroundColor(
getColor( getColor(
context!!, context!!,
R.color.verdnatura_dark_mint_light_precontrolled R.color.verdnatura_dark_mint_light_precontrolled
) )
) )*/
} else if (sale.isPreviousPrepared == "1") { } else if (sale.isPreviousPrepared == "1") {
contentLayout.setBackgroundColor( contentLayout.setBackgroundColor(
getColor( getColor(
@ -230,12 +243,13 @@ class SaleAdapter(
//sergio: para de momento que pinten las lineas sin actualizar ni nada //sergio: para de momento que pinten las lineas sin actualizar ni nada
if (sale.isControlled == "2") { if (sale.isControlled == "2") {
itemArticleRowSemaforoCon.setBackgroundColor( DrawableCompat.setTint(backgroundDrawableCon, getColor(context!!,R.color.verdnatura_white))
/* itemArticleRowSemaforoCon.setBackgroundColor(
getColor( getColor(
context!!, context!!,
R.color.verdnatura_white R.color.verdnatura_white
) )
) )*/
contentLayout.setBackgroundColor( contentLayout.setBackgroundColor(
getColor( getColor(
context!!, context!!,
@ -245,6 +259,7 @@ class SaleAdapter(
} }
//ASIGNAMOS VALOR A LA VSITA //ASIGNAMOS VALOR A LA VSITA
this.sale = sale 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()) { when (color.uppercase().trim()) {

View File

@ -9,7 +9,6 @@ import android.net.Uri
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.speech.SpeechRecognizer import android.speech.SpeechRecognizer
import android.util.Log
import android.view.View import android.view.View
import android.view.View.GONE import android.view.View.GONE
import android.view.View.VISIBLE import android.view.View.VISIBLE
@ -17,7 +16,6 @@ import android.view.inputmethod.EditorInfo
import android.view.inputmethod.InputMethodManager import android.view.inputmethod.InputMethodManager
import android.widget.ImageView import android.widget.ImageView
import android.widget.Toast import android.widget.Toast
import androidx.core.view.isVisible
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
@ -88,6 +86,8 @@ class CollectionFragment(
private var itemShelvingSaleSupplyAddCall = -1 private var itemShelvingSaleSupplyAddCall = -1
private var saleTrackingCall = -1 private var saleTrackingCall = -1
private var lastScanned: String = ""
private var buttonPushedGetCollection = false
//private var myKM: KeyguardManager? = null //private var myKM: KeyguardManager? = null
private var positionUnmarked = -1 private var positionUnmarked = -1
@ -152,7 +152,8 @@ class CollectionFragment(
override fun onResume() { override fun onResume() {
if (type == CONTROLADOR && storedBackPosition != 0) { if (type == CONTROLADOR && storedBackPosition != 0) {
setListPosition(storedBackPosition, false)} setListPosition(storedBackPosition, true)
}
super.onResume() super.onResume()
scanRequest() scanRequest()
} }
@ -162,7 +163,7 @@ class CollectionFragment(
customDialogInput = CustomDialogInput(requireContext()) customDialogInput = CustomDialogInput(requireContext())
customDialog = CustomDialog(requireContext()) customDialog = CustomDialog(requireContext())
customDialogThreeButtons = CustomDialogThreeButtons(requireContext()) customDialogThreeButtons = CustomDialogThreeButtons(requireContext())
ma.hideBottomNavigation(View.GONE) ma.hideBottomNavigation(GONE)
binding.splashProgress.visibility = VISIBLE binding.splashProgress.visibility = VISIBLE
setEvents() setEvents()
@ -181,7 +182,6 @@ class CollectionFragment(
goBack = true goBack = true
goBack2 = true goBack2 = true
goMistakeBack = true goMistakeBack = true
} }
private fun setToolBar() { private fun setToolBar() {
@ -195,14 +195,23 @@ class CollectionFragment(
val listIcons: ArrayList<ImageView> = ArrayList() val listIcons: ArrayList<ImageView> = ArrayList()
val iconPrint = ImageView(context) val iconPrint = ImageView(context)
iconPrint.setImageResource(R.drawable.ic_print_black_24dp) iconPrint.setImageResource(R.drawable.ic_print_black_24dp)
val iconAdd = ImageView(context) val iconAdd = ImageView(context)
iconAdd.setImageResource(R.drawable.ic_playlist_add_black_24dp) iconAdd.setImageResource(R.drawable.ic_playlist_add_black_24dp)
val iconViewCollection = ImageView(context)
iconViewCollection.setImageResource(R.drawable.ic_collection)
val iconWorker = ImageView(context) val iconWorker = ImageView(context)
iconWorker.setImageResource(R.drawable.ic_worker) iconWorker.setImageResource(R.drawable.ic_worker)
val iconPhone = ImageView(context) val iconPhone = ImageView(context)
iconPhone.setImageResource(R.drawable.phone_call) iconPhone.setImageResource(R.drawable.phone_call)
val iconParking = ImageView(context) val iconParking = ImageView(context)
iconParking.setImageResource(R.drawable.ic_local_parking_black_24dp) iconParking.setImageResource(R.drawable.ic_local_parking_black_24dp)
@ -210,20 +219,26 @@ class CollectionFragment(
iconPrint.tooltipText = getTooltip(R.drawable.ic_print_black_24dp) iconPrint.tooltipText = getTooltip(R.drawable.ic_print_black_24dp)
iconAdd.tooltipText = getTooltip(R.drawable.ic_playlist_add_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) iconPhone.tooltipText = getTooltip(R.drawable.phone_call)
iconParking.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp) iconParking.tooltipText = getTooltip(R.drawable.ic_local_parking_black_24dp)
} }
if (type.equals("CHECKER")) { if (type.equals("CHECKER")) {
listIcons.add(iconPhone) // listIcons.add(iconPhone)
} }
listIcons.add(iconWorker)
listIcons.add(iconPrint) listIcons.add(iconPrint)
if (type == CONTROLADOR) {
listIcons.add(iconViewCollection)
}
listIcons.add(iconAdd) listIcons.add(iconAdd)
listIcons.add(iconWorker)
if (type.equals(PRECHECKER)) { if (type.equals(PRECHECKER)) {
listIcons.add(iconParking) listIcons.add(iconParking)
listIcons.remove(iconPrint) listIcons.remove(iconPrint)
@ -235,10 +250,11 @@ class CollectionFragment(
override fun onOptionsItemSelected(item: Drawable) { override fun onOptionsItemSelected(item: Drawable) {
when (item) { when (item) {
iconViewCollection.drawable -> getCollection()
iconPrint.drawable -> print() iconPrint.drawable -> print()
iconAdd.drawable -> addItem() iconAdd.drawable -> addItem()
iconWorker.drawable -> showUser() iconWorker.drawable -> showUser()
iconPhone.drawable -> getExtensionFromUser() //iconPhone.drawable -> getExtensionFromUser()
iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener( iconParking.drawable -> pasillerosItemClickListener?.onPasillerosItemClickListener(
PasillerosItemVO( PasillerosItemVO(
title = getString(R.string.Parking) title = getString(R.string.Parking)
@ -252,8 +268,36 @@ class CollectionFragment(
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false) 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 binding.splashProgress.visibility = VISIBLE
@ -270,7 +314,7 @@ class CollectionFragment(
}*/ }*/
} }*/
private fun scanRequest() { private fun scanRequest() {
binding.scanInput.requestFocus() binding.scanInput.requestFocus()
@ -306,6 +350,7 @@ class CollectionFragment(
binding.scanInput.setText(textScanned_filterDouble(binding.scanInput.text!!.toString())) binding.scanInput.setText(textScanned_filterDouble(binding.scanInput.text!!.toString()))
findSale(binding.scanInput.text.toString()) findSale(binding.scanInput.text.toString())
buttonPushedGetCollection = false
} }
binding.scanInput.setText("") binding.scanInput.setText("")
@ -331,6 +376,7 @@ class CollectionFragment(
getData(SECTORFK), getData(SECTORFK),
type type
) )
buttonPushedGetCollection = false
binding.collectionSwipe.isRefreshing = 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 { responseSaleMove.observe(viewLifecycleOwner, Observer {
if (it.isError) { if (it.isError) {
@ -1211,7 +1275,6 @@ class CollectionFragment(
if (!isOk) { if (!isOk) {
if (txtscan.contains("-")) { if (txtscan.contains("-")) {
// Log.d("VERDNATURA::", "VAMOS A PARKING DESDE PANTALLA CONTROLADOR")
if (tickets.size > 0) { if (tickets.size > 0) {
@ -1386,6 +1449,7 @@ class CollectionFragment(
} }
} else if (isFromBack) { } else if (isFromBack) {
if (binding.fragmentSacadorCollections != null) { if (binding.fragmentSacadorCollections != null) {
binding.fragmentSacadorCollections.addViewObserver { binding.fragmentSacadorCollections.addViewObserver {
lm!!.scrollToPositionWithOffset(position, 0) lm!!.scrollToPositionWithOffset(position, 0)
@ -1413,7 +1477,6 @@ class CollectionFragment(
} }
//Tarea #4371 se quita para ver si funciona correctamente //Tarea #4371 se quita para ver si funciona correctamente
private fun saleTracking_mark(position: Int, type: String) { private fun saleTracking_mark(position: Int, type: String) {
@ -1434,6 +1497,7 @@ class CollectionFragment(
) )
} }
private fun unMarkLine(position: Int, newType: String) { private fun unMarkLine(position: Int, newType: String) {
state = 0 state = 0
if (sales[position].isPrepared == "1") { if (sales[position].isPrepared == "1") {

View File

@ -48,6 +48,10 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
val response: LiveData<ResponseItemVO> val response: LiveData<ResponseItemVO>
get() = _response get() = _response
private val _responseSaleMistakeAdd by lazy { MutableLiveData<ResponseItemVO>() }
val responseSaleMistakeAdd: LiveData<ResponseItemVO>
get() = _responseSaleMistakeAdd
private val _responseItemShelvingSaleSupplyAdd by lazy { MutableLiveData<ResponseItemVO>() } private val _responseItemShelvingSaleSupplyAdd by lazy { MutableLiveData<ResponseItemVO>() }
val responseItemShelvingSaleSupplyAdd: LiveData<ResponseItemVO> val responseItemShelvingSaleSupplyAdd: LiveData<ResponseItemVO>
get() = _responseItemShelvingSaleSupplyAdd 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( fun saleTrackingReplace(
usuario: String, usuario: String,
@ -1007,7 +1051,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
.enqueue(object : .enqueue(object :
Callback<Any> { Callback<Any> {
override fun onFailure(call: Call<Any>, t: Throwable) { override fun onFailure(call: Call<Any>, t: Throwable) {
_response.value = ResponseItemVO( _responseSaleMistakeAdd.value = ResponseItemVO(
isError = true, isError = true,
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!) errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
) )
@ -1018,7 +1062,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
response: Response<Any> response: Response<Any>
) { ) {
if (!response.isSuccessful) { if (!response.isSuccessful) {
_response.value = ResponseItemVO( _responseSaleMistakeAdd.value = ResponseItemVO(
isError = true, isError = true,
errorMessage = getMessageFromAllResponse( errorMessage = getMessageFromAllResponse(
nameofFunction(this), nameofFunction(this),
@ -1026,7 +1070,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
) )
) )
} else { } else {
_response.value = _responseSaleMistakeAdd.value =
ResponseItemVO(isError = false, response = response.message()) ResponseItemVO(isError = false, response = response.message())
} }
} }
@ -1059,7 +1103,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
} }
fun sip_getExtension( /* fun sip_getExtension(
usuario: String, usuario: String,
password: String, password: String,
workerId: String workerId: String
@ -1155,7 +1199,7 @@ class CollectionViewModel(context: Context) : BaseViewModel() {
} }
} }
}) })
} }*/
fun ticket_checkFullyControlled( fun ticket_checkFullyControlled(
usuario: String, usuario: String,

View File

@ -1,13 +1,21 @@
package es.verdnatura.presentation.view.feature.controlvehiculo.fragment 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.view.View.*
import android.widget.ImageView
import androidx.annotation.RequiresApi
import androidx.lifecycle.Observer import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import es.verdnatura.R import es.verdnatura.R
import es.verdnatura.databinding.FragmentVehiclecontrolUserBinding import es.verdnatura.databinding.FragmentVehiclecontrolUserBinding
import es.verdnatura.presentation.base.BaseFragment 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.common.loadUrl
import es.verdnatura.presentation.view.component.CustomDialog import es.verdnatura.presentation.view.feature.pasillero.model.PasillerosItemVO
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
class ControlVehiculoUsuarioFragment( class ControlVehiculoUsuarioFragment(
@ -19,22 +27,57 @@ class ControlVehiculoUsuarioFragment(
private var userFk = "" private var userFk = ""
private var goBack: Boolean = false private var goBack: Boolean = false
override fun getLayoutId(): Int = R.layout.fragment_vehiclecontrol_user override fun getLayoutId(): Int = R.layout.fragment_vehiclecontrol_user
//private lateinit var customDialog: CustomDialog
companion object { companion object {
fun newInstance(vUserFK: String) = ControlVehiculoUsuarioFragment(vUserFK) fun newInstance(vUserFK: String) = ControlVehiculoUsuarioFragment(vUserFK)
} }
@RequiresApi(Build.VERSION_CODES.O)
override fun init() { override fun init() {
binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclecontroluser) binding.mainToolbar.toolbarTitle.text = getString(R.string.vehiclecontroluser)
// customDialog = CustomDialog(requireContext())
goBack = false goBack = false
binding.splashProgress.visibility = GONE binding.splashProgress.visibility = GONE
setEvents() setEvents()
setToolBar()
setControlVehicleUser() setControlVehicleUser()
super.init() 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() { override fun onPause() {
goBack = true goBack = true
super.onPause() super.onPause()
@ -48,8 +91,16 @@ class ControlVehiculoUsuarioFragment(
binding.splashProgress.visibility = VISIBLE binding.splashProgress.visibility = VISIBLE
viewModel.machine_getWorkerPlate(getData(USER), getData(PASSWORD)) viewModel.machine_getWorkerPlate(getData(USER), getData(PASSWORD))
viewModel.deviceProduction_getnameDevice(getData(USER),getData(PASSWORD), getData(ANDROID_ID)) viewModel.deviceProduction_getnameDevice(
viewModel.deviceProductionUser_getWorker(getData(USER),getData(PASSWORD), getData(ANDROID_ID)) getData(USER),
getData(PASSWORD),
getData(ANDROID_ID)
)
viewModel.deviceProductionUser_getWorker(
getData(USER),
getData(PASSWORD),
getData(ANDROID_ID)
)
} else { } else {
userFk = vUserFK userFk = vUserFK
@ -57,10 +108,16 @@ class ControlVehiculoUsuarioFragment(
binding.userInformation.visibility = INVISIBLE binding.userInformation.visibility = INVISIBLE
binding.nameVehiclecontrol.visibility = INVISIBLE binding.nameVehiclecontrol.visibility = INVISIBLE
binding.userInformation.setOnClickListener({ binding.mainToolbar.backButton.performClick() }) binding.userInformation.setOnClickListener({ binding.mainToolbar.backButton.performClick() })
}
binding.userImage.loadUrl("https://salix.verdnatura.es/api/Images/user/160x160/$userFk/download?access_token=${getData(TOKEN)}")
viewModel.machine_getWorkerPlate(getData(USER), getData(PASSWORD)) 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.nameVehiclecontrol.text = getData(USER)
binding.registeredVehiclecontrol.text = "" binding.registeredVehiclecontrol.text = ""
binding.deviceName.text = "" binding.deviceName.text = ""
@ -90,30 +147,60 @@ class ControlVehiculoUsuarioFragment(
ma.messageWithSound(it.errorMessage, true, false) ma.messageWithSound(it.errorMessage, true, false)
} else { } 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.response == "false") {
if (it.type.equals("getWorker")) {
binding.assignedDevicename.text =
getString(R.string.noAssigned)}
} else {
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 { } else {
callPicker(it.response)
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
}
}
} }
}) })
} }
}
private fun callPicker(extensionNumber: String) {
try {
val intent = Intent(Intent.ACTION_DIAL).apply {
data = Uri.parse("tel:$extensionNumber")
}
startActivity(intent)
} catch (e: Exception) {
}
} }
} }

View File

@ -9,6 +9,7 @@ import es.verdnatura.presentation.base.getMessageFromAllResponse
import es.verdnatura.presentation.base.nameofFunction import es.verdnatura.presentation.base.nameofFunction
import es.verdnatura.presentation.common.ResponseItemMachineControl import es.verdnatura.presentation.common.ResponseItemMachineControl
import es.verdnatura.presentation.common.ResponseItemVO import es.verdnatura.presentation.common.ResponseItemVO
import org.json.JSONObject
import retrofit2.Call import retrofit2.Call
import retrofit2.Callback import retrofit2.Callback
import retrofit2.Response import retrofit2.Response
@ -30,6 +31,10 @@ class ControlVehiculoViewModel(context: Context) : BaseViewModel() {
val responsemachine: LiveData<ResponseItemMachineControl> val responsemachine: LiveData<ResponseItemMachineControl>
get() = _responsemachine get() = _responsemachine
private val _responseGetExtensionFromUserId by lazy { MutableLiveData<ResponseItemVO>() }
val responseGetExtensionFromUserId: LiveData<ResponseItemVO>
get() = _responseGetExtensionFromUserId
fun machineWorker_add( fun machineWorker_add(
usuario: String, usuario: String,
password: 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()!!
)
}
}
})
}
} }

View File

@ -62,7 +62,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel() {
_pasillerositem.add( _pasillerositem.add(
PasillerosItemVO( PasillerosItemVO(
10, 10,
R.drawable.ic_visibility_black_24dp, R.drawable.ic_ticket,
contextApp.getString(R.string.titleShowTicket), contextApp.getString(R.string.titleShowTicket),
R.string.titleShowTicket, R.string.titleShowTicket,
contextApp.getString( contextApp.getString(
@ -74,7 +74,7 @@ class PasilleroViewModel(context: Context) : BaseViewModel() {
_pasillerositem.add( _pasillerositem.add(
PasillerosItemVO( PasillerosItemVO(
0, 0,
R.drawable.ic_loyalty_black_24dp, R.drawable.ic_item,
contextApp.getString(R.string.titleItemConsult), contextApp.getString(R.string.titleItemConsult),
R.string.titleItemConsult, R.string.titleItemConsult,
contextApp.getString( contextApp.getString(

View File

@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable
import android.media.MediaPlayer import android.media.MediaPlayer
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.util.Log.d
import android.view.View import android.view.View
import android.view.inputmethod.EditorInfo import android.view.inputmethod.EditorInfo
import android.widget.ImageView import android.widget.ImageView
@ -45,6 +46,7 @@ class UbicadorFragment(
private var parking: String = "" private var parking: String = ""
private var etiquetas: String = "0" private var etiquetas: String = "0"
private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null private var pasillerosItemClickListener: OnPasillerosItemClickListener? = null
private var isShelvinLogfromMainScreen = false
var mperror: MediaPlayer? = null var mperror: MediaPlayer? = null
var mpok: MediaPlayer? = null var mpok: MediaPlayer? = null
@ -72,9 +74,14 @@ class UbicadorFragment(
setEvents() setEvents()
setToolBar() setToolBar()
if (!shelvingFk.isNullOrEmpty()) { if (!shelvingFk.isNullOrEmpty()) {
isShelvinLogfromMainScreen = false
binding.splashProgress.visibility = View.VISIBLE binding.splashProgress.visibility = View.VISIBLE
binding.mainToolbar.toolbarTitle.text = shelvingFk binding.mainToolbar.toolbarTitle.text = shelvingFk
viewModel.itemShelvingList(getData(USER), getData(PASSWORD), shelvingFk) viewModel.itemShelvingList(getData(USER), getData(PASSWORD), shelvingFk)
} else {
isShelvinLogfromMainScreen = true
} }
super.init() super.init()
} }
@ -141,6 +148,7 @@ class UbicadorFragment(
binding.mainToolbar.toolbarTitle.text = binding.editMatricula.text.toString() binding.mainToolbar.toolbarTitle.text = binding.editMatricula.text.toString()
shelvingFk = binding.editMatricula.text.toString() shelvingFk = binding.editMatricula.text.toString()
binding.splashProgress.visibility = View.VISIBLE binding.splashProgress.visibility = View.VISIBLE
viewModel.itemShelvingList( viewModel.itemShelvingList(
getData(USER), getData(USER),
getData(PASSWORD), getData(PASSWORD),
@ -186,8 +194,12 @@ class UbicadorFragment(
} }
binding.parkingImg.setOnClickListener { binding.parkingImg.setOnClickListener {
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("").setOkButton(getString( customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("")
R.string.parking)) { .setOkButton(
getString(
R.string.parking
)
) {
viewModel.shelvingPark( viewModel.shelvingPark(
getData(USER), getData(USER),
getData(PASSWORD), getData(PASSWORD),
@ -196,7 +208,9 @@ class UbicadorFragment(
) )
parking = customDialogInput.getValue() parking = customDialogInput.getValue()
binding.mainToolbar.toolbarTitle.text = 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() if (mpok != null) mpok!!.start()
customDialogInput.dismiss() customDialogInput.dismiss()
}.setKoButton(getString(R.string.cancel)) { }.setKoButton(getString(R.string.cancel)) {
@ -217,7 +231,9 @@ class UbicadorFragment(
customDialogInput.dismiss() customDialogInput.dismiss()
parking = customDialogInput.getValue() parking = customDialogInput.getValue()
binding.mainToolbar.toolbarTitle.text = 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) { if (mpok != null) {
mpok!!.start() mpok!!.start()
} }
@ -230,7 +246,8 @@ class UbicadorFragment(
} }
binding.editImg.setOnClickListener { binding.editImg.setOnClickListener {
customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("").setOkButton(getString(R.string.save)) { customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("")
.setOkButton(getString(R.string.save)) {
viewModel.shelvingChange( viewModel.shelvingChange(
getData(USER), getData(USER),
getData(PASSWORD), getData(PASSWORD),
@ -239,7 +256,9 @@ class UbicadorFragment(
) )
shelvingFk = customDialogInput.getValue() shelvingFk = customDialogInput.getValue()
binding.mainToolbar.toolbarTitle.text = 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() if (mpok != null) mpok!!.start()
customDialogInput.dismiss() customDialogInput.dismiss()
}.setKoButton(getString(R.string.cancel)) { }.setKoButton(getString(R.string.cancel)) {
@ -259,7 +278,9 @@ class UbicadorFragment(
) )
shelvingFk = customDialogInput.getValue() shelvingFk = customDialogInput.getValue()
binding.mainToolbar.toolbarTitle.text = 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() if (mpok != null) mpok!!.start()
customDialogInput.dismiss() customDialogInput.dismiss()
return@setOnEditorActionListener true return@setOnEditorActionListener true
@ -271,7 +292,8 @@ class UbicadorFragment(
binding.deleteImg.setOnClickListener { binding.deleteImg.setOnClickListener {
customDialog.setTitle(getString(R.string.empty)) 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( viewModel.clearShelvingList(
getData(USER), getData(USER),
getData(PASSWORD), shelvingFk getData(PASSWORD), shelvingFk
@ -325,7 +347,9 @@ class UbicadorFragment(
} }
etiquetas = contEtiquetas.toString() etiquetas = contEtiquetas.toString()
binding.mainToolbar.toolbarTitle.text = 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) if (it.list.size > 0)
binding.editPrioridad.setText(it.list[0].priority) binding.editPrioridad.setText(it.list[0].priority)
binding.splashProgress.visibility = View.GONE binding.splashProgress.visibility = View.GONE
@ -363,6 +387,11 @@ class UbicadorFragment(
binding.locationRecyclerview.layoutManager = binding.locationRecyclerview.layoutManager =
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, true) LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, true)
if (isShelvinLogfromMainScreen){
//tarea 4454
viewModel.shelvinLog_add(getData(USER),getData(PASSWORD),shelvingFk)
}
} }
}) })
@ -373,7 +402,7 @@ class UbicadorFragment(
} else { } else {
ma.messageWithSound("", it.isError, true) ma.messageWithSound("", it.isError, true, isToasted = false)
} }
}) })
@ -623,7 +652,10 @@ class UbicadorFragment(
} }
} else { } else {
getString(R.string.mandatoryPacking).toast((activity as MainActivity), Toast.LENGTH_LONG) getString(R.string.mandatoryPacking).toast(
(activity as MainActivity),
Toast.LENGTH_LONG
)
} }
} }

View File

@ -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( fun itemShelving_return(
usuario: String, usuario: String,
password: String, password: String,
@ -370,9 +402,7 @@ class UbicadorViewModel(context: Context) : BaseViewModel() {
} else { } else {
_reubicationList.value = response.body()?.let { ReubicationList(it) } _reubicationList.value = response.body()?.let { ReubicationList(it) }
/* for (item in response.body()!!){
Log.d("VERDNATURA","El item es "+item.itemFk+":"+item.shelvingFk)
}*/
} }
} }
}) })

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -1,5 +1,7 @@
<vector android:height="24dp" android:tint="#FFFFFF" <vector android:height="24dp" android:tint="#FFFFFF"
android:viewportHeight="24.0" android:viewportWidth="24.0" android:viewportHeight="24.0" android:viewportWidth="24.0"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> android:width="24dp"
<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"/> 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> </vector>

View File

@ -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>

View File

@ -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>

View File

@ -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>

View File

@ -45,37 +45,43 @@
android:id="@+id/textinputlayout_one" android:id="@+id/textinputlayout_one"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/layout_margin_min" android:layout_marginTop="@dimen/default_layout_margin"
android:textColorHint="@android:color/darker_gray"> android:textColorHint="@android:color/darker_gray"
app:hintEnabled="false">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_dialog_value_one" android:id="@+id/custom_dialog_value_one"
style="@style/DefaultButton.NormalButton" style="@style/DefaultButton.NormalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginBottom="@dimen/default_layout_margin"
android:background="@drawable/background_round" android:background="@drawable/background_round"
android:enabled="true" android:enabled="true"
android:hint="@string/quantity" android:hint="@string/name"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
android:textColor="@color/verdnatura_white" android:textColor="@color/verdnatura_white"
android:textColorHint="@android:color/darker_gray" 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>
<com.google.android.material.textfield.TextInputLayout <com.google.android.material.textfield.TextInputLayout
android:id="@+id/textinputlayout_two" android:id="@+id/textinputlayout_two"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/layout_margin_min" android:layout_margin="@dimen/layout_margin_min"
android:hint="@string/scanShelving"
android:textColorHint="@android:color/darker_gray" android:textColorHint="@android:color/darker_gray"
android:visibility="visible"> app:hintEnabled="false">
>
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_dialog_value_two" android:id="@+id/custom_dialog_value_two"
style="@style/DefaultButton.NormalButton" style="@style/DefaultButton.NormalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginBottom="@dimen/default_layout_margin"
android:background="@drawable/background_round" android:background="@drawable/background_round"
android:hint="@string/scanShelving"
android:inputType="text" android:inputType="text"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"
@ -87,15 +93,18 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="@dimen/layout_margin_min" android:layout_margin="@dimen/layout_margin_min"
android:hint="@string/scanShelving"
android:textColorHint="@android:color/darker_gray" android:textColorHint="@android:color/darker_gray"
android:visibility="visible"> app:hintEnabled="false"
>
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/custom_dialog_value_three" android:id="@+id/custom_dialog_value_three"
style="@style/DefaultButton.NormalButton" style="@style/DefaultButton.NormalButton"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginBottom="@dimen/default_layout_margin"
android:background="@drawable/background_round" android:background="@drawable/background_round"
android:hint="@string/scanShelving"
android:inputType="text" android:inputType="text"
android:lines="1" android:lines="1"
android:maxLines="1" android:maxLines="1"

View File

@ -101,6 +101,32 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_alignParentRight="true" android:layout_alignParentRight="true"
app:srcCompat="@drawable/emoticon_error_fragment" /> 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> </RelativeLayout>
</LinearLayout> </LinearLayout>
@ -137,32 +163,12 @@
<!--SEMAFORO=================================================--> <!--SEMAFORO=================================================-->
<LinearLayout <LinearLayout
android:id="@+id/linearLayout3" 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:layout_height="wrap_content"
android:orientation="vertical" android:orientation="vertical"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="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
</LinearLayout> </LinearLayout>
<!--CONTENIDO=================================================--> <!--CONTENIDO=================================================-->

View File

@ -373,7 +373,7 @@
<string name="pallet">Pallet </string> <string name="pallet">Pallet </string>
<string name="expeditionP">Expedition (</string> <string name="expeditionP">Expedition (</string>
<string name="sureCloseSession">¿Estás seguro de cerrar la sesión?</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="itemPoints">Artículo: </string>
<string name="originalQuantity">"Cantidad original: "</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> <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="name">Nombre</string>
<string name="deleteWorkForm">Borrar forma trabajo</string> <string name="deleteWorkForm">Borrar forma trabajo</string>
<string name="deleteWorkFormConfirmation">¿Desea borrar definitivamente la forma de 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> </resources>

View File

@ -90,6 +90,8 @@
<dimen name="semaforo_width">20dp</dimen> <dimen name="semaforo_width">20dp</dimen>
<dimen name="semaforo_width_to_modify">15dp</dimen> <dimen name="semaforo_width_to_modify">15dp</dimen>
<dimen name="semaforo_height">30dp</dimen> <dimen name="semaforo_height">30dp</dimen>
<dimen name="semaforo_next_to_ticket">18dp</dimen>
<!-- Pintar ticket --> <!-- Pintar ticket -->
<dimen name="ticketColor_height">90dp</dimen> <dimen name="ticketColor_height">90dp</dimen>

View File

@ -285,6 +285,7 @@
<string name="errorNotNumber">Element introduced is not a number</string> <string name="errorNotNumber">Element introduced is not a number</string>
<string name="buyer">Buyer</string> <string name="buyer">Buyer</string>
<string name="accessSalix">Access Salix to see more information</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="item">Ítem : </string>
<string name="changeShelving">Change plate</string> <string name="changeShelving">Change plate</string>
<string name="registerOneWagoon">Wagoon scaned¿Do you want register another?</string> <string name="registerOneWagoon">Wagoon scaned¿Do you want register another?</string>
@ -486,7 +487,8 @@
<string name="salixServer">Server Salix</string> <string name="salixServer">Server Salix</string>
<string name="name">Name</string> <string name="name">Name</string>
<string name="deleteWorkForm">Delete work form</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> </resources>