feat: refs #8099 addSalarySupplement
This commit is contained in:
parent
5f614e0d6d
commit
d0e5e5d748
|
@ -25,6 +25,9 @@ import es.verdnatura.presentation.view.feature.delivery.model.DeliveryInfo
|
|||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLoadUnload
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoLog
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteAction
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplement
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplementAdd
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteDelivery
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.TicketObservation
|
||||
|
@ -550,9 +553,29 @@ interface SalixService {
|
|||
@Query("params") params: Any, @Query("schema") schema: String = "vn"
|
||||
): Call<List<WorkerFromMistake>>
|
||||
|
||||
@GET("RouteActions")
|
||||
fun getRouteAction(
|
||||
@Query("filter") filter: Any = """{"fields": {"id": true,"name": true,"price":true},"order": "name"}"""
|
||||
): Call<List<RouteAction>>
|
||||
|
||||
@POST("RouteComplements")
|
||||
fun addRouteComplements(
|
||||
@Body params: RouteComplementAdd
|
||||
): Call<Any>
|
||||
|
||||
@GET("RouteComplements")
|
||||
fun getRouteComplements(
|
||||
@Query("filter") filter: Any
|
||||
): Call<List<RouteComplement>>
|
||||
|
||||
@DELETE("RouteComplements/{id}")
|
||||
fun routeComplementDelete(
|
||||
@Path("id") id: Number
|
||||
): Call<Any>
|
||||
|
||||
@POST("Applications/sectorCollection_new/execute-proc")
|
||||
fun sectorCollectionNew(
|
||||
@Query("params") params: Any, @Query("schema") schema: String = "vn"
|
||||
@Query("params") filter: Any, @Query("schema") schema: String = "vn"
|
||||
): Call<Any>
|
||||
|
||||
@POST("Applications/ticketStateToday_setState/execute-proc")
|
||||
|
|
|
@ -10,6 +10,7 @@ import es.verdnatura.presentation.view.feature.buscaritem.model.ItemLocationVO
|
|||
import es.verdnatura.presentation.view.feature.claim.fragment.reubication.model.Reubication
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketSalix
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSummary
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplement
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.Ticket
|
||||
import es.verdnatura.presentation.view.feature.historicoarticulo.model.ItemHistoricoVO
|
||||
|
@ -50,6 +51,10 @@ interface OnMistakeWorkerClickListener {
|
|||
fun onMistakeWorkerClickListener(item: WorkerFromMistake)
|
||||
}
|
||||
|
||||
interface OnSalarySupplementClickListener {
|
||||
fun onSalarySupplementClickListener(item: RouteComplement)
|
||||
}
|
||||
|
||||
interface HideBottomNavigation {
|
||||
fun hideBottomNavigation(entryPoint: String)
|
||||
}
|
||||
|
|
|
@ -29,6 +29,10 @@ import com.bumptech.glide.request.transition.Transition
|
|||
import java.text.DecimalFormat
|
||||
import java.text.ParseException
|
||||
import java.text.SimpleDateFormat
|
||||
import java.time.LocalDate
|
||||
import java.time.LocalDateTime
|
||||
import java.time.LocalTime
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
|
||||
|
@ -233,3 +237,12 @@ fun convertToDateString(date: String?): String? {
|
|||
val dateToConvert = formatoEntrada.parse(date) // Convertir fecha de String a objeto Date
|
||||
return formatoSalida.format(dateToConvert!!) // Convertir fecha a String con formato deseado
|
||||
}
|
||||
|
||||
fun getDayBounds(dateString: String): Pair<LocalDateTime, LocalDateTime> {
|
||||
val formatter = DateTimeFormatter.ofPattern("dd-MM-yyyy")
|
||||
val date = LocalDate.parse(dateString, formatter)
|
||||
val startOfDay = date.atTime(LocalTime.MIN)
|
||||
val endOfDay = date.atTime(LocalTime.MAX)
|
||||
|
||||
return Pair(startOfDay, endOfDay)
|
||||
}
|
||||
|
|
|
@ -14,23 +14,23 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import es.verdnatura.domain.toast
|
||||
|
||||
class SearchableAdapter(
|
||||
private var names: MutableList<String>,
|
||||
private var listElements: MutableList<NameWithId>,
|
||||
private var context: Context,
|
||||
private val onItemClick: (String) -> Unit,
|
||||
private val onItemClick: (NameWithId) -> Unit,
|
||||
) : RecyclerView.Adapter<SearchableAdapter.NameViewHolder>() {
|
||||
private var nombresFiltrados = names.toMutableList()
|
||||
|
||||
private var listElementsFiltered = listElements.toMutableList()
|
||||
private var currentQuery: String = ""
|
||||
private lateinit var searchView: SearchView
|
||||
|
||||
inner class NameViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
|
||||
private val nombreTextView: TextView = itemView.findViewById(android.R.id.text1)
|
||||
|
||||
fun bind(nombre: String, query: String) {
|
||||
val spannableString = SpannableString(nombre)
|
||||
fun bind(nameWithId: NameWithId, query: String) {
|
||||
val spannableString = SpannableString(nameWithId.name)
|
||||
try {
|
||||
|
||||
if (query.isNotEmpty()) {
|
||||
val startIndex = nombre.indexOf(query, ignoreCase = true)
|
||||
val startIndex = nameWithId.name.indexOf(query, ignoreCase = true)
|
||||
if (startIndex >= 0) {
|
||||
val endIndex = startIndex + query.length
|
||||
spannableString.setSpan(
|
||||
|
@ -43,10 +43,10 @@ class SearchableAdapter(
|
|||
}
|
||||
nombreTextView.text = spannableString
|
||||
itemView.setOnClickListener {
|
||||
onItemClick(nombre)
|
||||
onItemClick(nameWithId)
|
||||
}
|
||||
} catch (ex: Exception) {
|
||||
ex.message!!.toast(context = context)
|
||||
ex.message?.toast(context)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,25 +58,30 @@ class SearchableAdapter(
|
|||
}
|
||||
|
||||
override fun onBindViewHolder(holder: NameViewHolder, position: Int) {
|
||||
val nombre = nombresFiltrados[position]
|
||||
holder.bind(nombre, currentQuery)
|
||||
val nameWithId = listElementsFiltered[position]
|
||||
holder.bind(nameWithId, currentQuery)
|
||||
}
|
||||
|
||||
fun filter(query: String) {
|
||||
currentQuery = query
|
||||
nombresFiltrados = if (query.isEmpty()) {
|
||||
names.toMutableList()
|
||||
listElementsFiltered = if (query.isEmpty()) {
|
||||
listElements.toMutableList()
|
||||
} else {
|
||||
names.filter { it.contains(query, ignoreCase = true) }
|
||||
listElements.filter { it.name.contains(query, ignoreCase = true) }
|
||||
.toMutableList()
|
||||
}
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
override fun getItemCount(): Int = nombresFiltrados.size
|
||||
override fun getItemCount(): Int = listElementsFiltered.size
|
||||
|
||||
fun updateList(newList: MutableList<String>) {
|
||||
names = newList
|
||||
fun updateList(newList: MutableList<NameWithId>) {
|
||||
listElements = newList
|
||||
filter("")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
data class NameWithId(
|
||||
val id: Number,
|
||||
val name: String
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@ class SearchableRecyclerView @JvmOverloads constructor(
|
|||
private val searchView: SearchView
|
||||
private val recyclerView: RecyclerView
|
||||
lateinit var adapter: SearchableAdapter
|
||||
private var allItems: MutableList<String> = mutableListOf()
|
||||
private var allItems: MutableList<NameWithId> = mutableListOf()
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.component_searchable_dialog, this, true)
|
||||
|
@ -46,7 +46,7 @@ class SearchableRecyclerView @JvmOverloads constructor(
|
|||
})
|
||||
}
|
||||
|
||||
fun setAdapter(adapter: SearchableAdapter, items: MutableList<String>) {
|
||||
fun setAdapter(adapter: SearchableAdapter, items: MutableList<NameWithId>) {
|
||||
this.adapter = adapter
|
||||
this.allItems = items
|
||||
recyclerView.adapter = adapter
|
||||
|
@ -55,6 +55,9 @@ class SearchableRecyclerView @JvmOverloads constructor(
|
|||
|
||||
fun setVisibilityRecycler(visibility: Int) {
|
||||
recyclerView.visibility = visibility
|
||||
if (visibility == View.VISIBLE) {
|
||||
searchView.requestFocus()
|
||||
}
|
||||
}
|
||||
|
||||
fun setOnCloseListener(listener: () -> Boolean) {
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
package es.verdnatura.presentation.view.feature.delivery.adapters
|
||||
|
||||
import android.view.LayoutInflater
|
||||
import android.view.ViewGroup
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import es.verdnatura.databinding.ItemSalaryComplementRowBinding
|
||||
import es.verdnatura.presentation.common.OnSalarySupplementClickListener
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplement
|
||||
|
||||
class SalarySupplementAdapter(
|
||||
private var items: List<RouteComplement>,
|
||||
private val onSalarySupplementClickListener: OnSalarySupplementClickListener
|
||||
) : RecyclerView.Adapter<SalarySupplementAdapter.ItemHolder>() {
|
||||
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ItemHolder {
|
||||
return ItemHolder(
|
||||
ItemSalaryComplementRowBinding.inflate(
|
||||
LayoutInflater.from(parent.context),
|
||||
parent,
|
||||
false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getItemCount() = items.size
|
||||
|
||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||
holder.bind(items[position])
|
||||
}
|
||||
|
||||
fun updateData(list: List<RouteComplement>) {
|
||||
items = list
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
|
||||
inner class ItemHolder(
|
||||
val binding: ItemSalaryComplementRowBinding
|
||||
) : RecyclerView.ViewHolder(binding.root) {
|
||||
private val res = binding.root.context.resources
|
||||
fun bind(item: RouteComplement) {
|
||||
binding.apply {
|
||||
this.item = item
|
||||
}
|
||||
binding.imageDelete.setOnClickListener {
|
||||
onSalarySupplementClickListener.onSalarySupplementClickListener(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
package es.verdnatura.presentation.view.feature.delivery.fragments
|
||||
|
||||
import android.app.DatePickerDialog
|
||||
import android.graphics.drawable.Drawable
|
||||
import android.view.View
|
||||
import android.widget.ImageView
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import es.verdnatura.R
|
||||
import es.verdnatura.databinding.FragmentSalaryComplementBinding
|
||||
import es.verdnatura.domain.toDateString
|
||||
import es.verdnatura.presentation.base.BaseFragment
|
||||
import es.verdnatura.presentation.common.OnOptionsSelectedListener
|
||||
import es.verdnatura.presentation.common.OnSalarySupplementClickListener
|
||||
import es.verdnatura.presentation.common.ToolBarAdapterTooltip
|
||||
import es.verdnatura.presentation.view.commom.NameWithId
|
||||
import es.verdnatura.presentation.view.commom.SearchableAdapter
|
||||
import es.verdnatura.presentation.view.feature.delivery.adapters.SalarySupplementAdapter
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteActionList
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplement
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplementAdd
|
||||
import es.verdnatura.presentation.view.feature.delivery.viewmodels.DeliveryViewModel
|
||||
import java.time.LocalDate
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.Calendar
|
||||
import java.util.Date
|
||||
|
||||
class SalaryComplementFragment(
|
||||
var entryPoint: String = ""
|
||||
|
||||
) : BaseFragment<FragmentSalaryComplementBinding, DeliveryViewModel>(
|
||||
DeliveryViewModel::class
|
||||
) {
|
||||
|
||||
private val adapterComplement: SalarySupplementAdapter by lazy {
|
||||
SalarySupplementAdapter(emptyList(), object : OnSalarySupplementClickListener {
|
||||
override fun onSalarySupplementClickListener(item: RouteComplement) {
|
||||
viewModel.routeComplementDelete(item.id, binding.date.text.toString())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private val layoutManager: LinearLayoutManager by lazy {
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.VERTICAL, false)
|
||||
}
|
||||
|
||||
private lateinit var routeActionComplementsList: RouteActionList
|
||||
|
||||
companion object {
|
||||
fun newInstance(entryPoint: String) = SalaryComplementFragment(entryPoint)
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int = R.layout.fragment_salary_complement
|
||||
|
||||
private fun showDatePicker() {
|
||||
val currentDate = Calendar.getInstance()
|
||||
val year = currentDate[Calendar.YEAR]
|
||||
val month = currentDate[Calendar.MONTH]
|
||||
val day = currentDate[Calendar.DAY_OF_MONTH]
|
||||
|
||||
DatePickerDialog(
|
||||
requireContext(), { _, selectedYear, selectedMonth, selectedDay ->
|
||||
binding.date.text =
|
||||
getString(R.string.dateDay, selectedDay, selectedMonth + 1, selectedYear)
|
||||
viewModel.getRouteComplements(binding.date.text.toString())
|
||||
}, year, month, day
|
||||
).apply {
|
||||
setTitle(getString(R.string.selectDate))
|
||||
show()
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
viewModel.getRouteAction()
|
||||
binding.date.text = toDateString(Date())
|
||||
viewModel.getRouteComplements(binding.date.text.toString())
|
||||
ma.hideBottomNavigation(View.GONE)
|
||||
setToolBar()
|
||||
setEvents()
|
||||
super.init()
|
||||
}
|
||||
|
||||
private fun setToolBar() {
|
||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.supplementDelivery)
|
||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||
val iconAdd = ImageView(context).apply {
|
||||
setImageResource(R.drawable.ic_add_black_24dp)
|
||||
tooltipText = getTooltip(R.drawable.ic_add_black_24dp)
|
||||
}
|
||||
|
||||
binding.mainToolbar.toolbarIcons.adapter =
|
||||
ToolBarAdapterTooltip(listOf(iconAdd), object : OnOptionsSelectedListener {
|
||||
|
||||
override fun onOptionsItemSelected(item: Drawable) {
|
||||
|
||||
when (item) {
|
||||
iconAdd.drawable -> {
|
||||
binding.salarySearchableRecyclerView.visibility = View.VISIBLE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
binding.mainToolbar.toolbarIcons.layoutManager =
|
||||
LinearLayoutManager(requireContext(), LinearLayoutManager.HORIZONTAL, false)
|
||||
}
|
||||
|
||||
private fun setEvents() {
|
||||
binding.mainToolbar.backButton.setOnClickListener {
|
||||
ma.onMyBackPressed()
|
||||
}
|
||||
binding.date.setOnClickListener {
|
||||
showDatePicker()
|
||||
}
|
||||
}
|
||||
|
||||
private fun setSearchable(listElements: MutableList<NameWithId>) {
|
||||
|
||||
val searchableRecyclerView = binding.salarySearchableRecyclerView
|
||||
val adapter =
|
||||
SearchableAdapter(
|
||||
listElements = listElements,
|
||||
context = requireContext()
|
||||
) { nameWithId ->
|
||||
val foundItem = routeActionComplementsList.list.find { item ->
|
||||
item.id == nameWithId.id
|
||||
}
|
||||
foundItem?.apply {
|
||||
val dateFormatted = LocalDate.parse(
|
||||
binding.date.text.toString(), DateTimeFormatter.ofPattern("dd-MM-yyyy")
|
||||
).format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))
|
||||
viewModel.addRouteComplements(
|
||||
RouteComplementAdd(
|
||||
workerFk = mobileApplication.userId!!,
|
||||
routeActionFk = foundItem.id,
|
||||
price = foundItem.price,
|
||||
dated = dateFormatted,
|
||||
)
|
||||
)
|
||||
|
||||
}
|
||||
searchableRecyclerView.visibility = View.GONE
|
||||
}
|
||||
searchableRecyclerView.setAdapter(adapter, listElements)
|
||||
|
||||
}
|
||||
|
||||
override fun observeViewModel() {
|
||||
with(viewModel) {
|
||||
routeActionList.observe(viewLifecycleOwner) { list ->
|
||||
routeActionComplementsList = list
|
||||
setSearchable(list.list.map { item ->
|
||||
NameWithId(
|
||||
id = item.id,
|
||||
name = item.name
|
||||
)
|
||||
}.toMutableList())
|
||||
}
|
||||
routeComplementList.observe(viewLifecycleOwner) {
|
||||
adapterComplement.updateData(it.list)
|
||||
binding.salaryComplementRecyclerview.adapter = adapterComplement
|
||||
binding.salaryComplementRecyclerview.layoutManager = layoutManager
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -102,7 +102,6 @@ class TicketsFragment : BaseFragment<FragmentTicketsBinding, DeliveryViewModel>(
|
|||
binding.mainToolbar.toolbarTitle.text = route.name
|
||||
viewModel.getTickets(route.id)
|
||||
db = database(requireContext().applicationContext)
|
||||
println("tickets in ")
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@ import androidx.room.PrimaryKey
|
|||
import androidx.room.TypeConverters
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import es.verdnatura.db.MapTypeConverter
|
||||
import es.verdnatura.domain.isoToString
|
||||
import java.io.Serializable
|
||||
|
||||
class ClientTicketList(
|
||||
|
@ -58,12 +59,13 @@ data class TicketObservation
|
|||
(
|
||||
var ticketFk: Long,
|
||||
var description: String,
|
||||
var observationType:ObservationType?=null
|
||||
var observationType: ObservationType? = null
|
||||
)
|
||||
|
||||
data class ObservationType(
|
||||
var code:String?
|
||||
var code: String?
|
||||
)
|
||||
|
||||
@Entity(tableName = "signedPending")
|
||||
data class SignedTickets(
|
||||
@TypeConverters(MapTypeConverter::class) val queryMapList: MutableMap<String?, String?>,
|
||||
|
@ -71,3 +73,35 @@ data class SignedTickets(
|
|||
val fileName: String
|
||||
)
|
||||
|
||||
data class RouteActionList(
|
||||
var list: List<RouteAction> = listOf()
|
||||
)
|
||||
|
||||
data class RouteAction(
|
||||
val id: Number,
|
||||
val price: Double,
|
||||
val name: String,
|
||||
)
|
||||
|
||||
data class RouteComplementList(
|
||||
var list: List<RouteComplement> = listOf()
|
||||
)
|
||||
|
||||
data class RouteComplement(
|
||||
val id: Number,
|
||||
val price: Number,
|
||||
val workerFk: Number,
|
||||
val routeAction: RouteAction
|
||||
) {
|
||||
var dated: String = ""
|
||||
get() {
|
||||
return field.isoToString(returnOnlyDate = true)
|
||||
}
|
||||
}
|
||||
|
||||
data class RouteComplementAdd(
|
||||
val price: Number,
|
||||
val workerFk: Number,
|
||||
val routeActionFk: Number,
|
||||
val dated: String,
|
||||
)
|
||||
|
|
|
@ -11,6 +11,7 @@ import es.verdnatura.presentation.base.BaseViewModel
|
|||
import es.verdnatura.presentation.common.Event
|
||||
import es.verdnatura.presentation.common.ExpeditionPrintOut
|
||||
import es.verdnatura.presentation.common.ResponseSign
|
||||
import es.verdnatura.presentation.common.getDayBounds
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketList
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketSalix
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.DeliveryInfo
|
||||
|
@ -21,6 +22,11 @@ import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionInfoSumm
|
|||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionList
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ExpeditionSummaryList
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.FreeLanceDeliveryInfoList
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteAction
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteActionList
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplement
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplementAdd
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteComplementList
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteDelivery
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteDeliveryList
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.RouteInfo
|
||||
|
@ -35,6 +41,8 @@ import org.json.JSONObject
|
|||
import retrofit2.Call
|
||||
import retrofit2.Response
|
||||
import java.io.File
|
||||
import java.time.LocalDate
|
||||
import java.time.format.DateTimeFormatter
|
||||
|
||||
class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
||||
|
||||
|
@ -106,6 +114,69 @@ class DeliveryViewModel(val context: Context) : BaseViewModel(context) {
|
|||
|
||||
private val _responseStateList by lazy { MutableLiveData<Boolean>() }
|
||||
val responseStateList: LiveData<Boolean> = _responseStateList
|
||||
|
||||
private val _routeActionList by lazy { MutableLiveData<RouteActionList>() }
|
||||
val routeActionList: LiveData<RouteActionList> = _routeActionList
|
||||
|
||||
private val _routeComplementList by lazy { MutableLiveData<RouteComplementList>() }
|
||||
val routeComplementList: LiveData<RouteComplementList> = _routeComplementList
|
||||
|
||||
private val _routeActionAdd by lazy { MutableLiveData<Boolean>() }
|
||||
val routeActionAdd: LiveData<Boolean> = _routeActionAdd
|
||||
|
||||
fun getRouteAction() {
|
||||
salix.getRouteAction()
|
||||
.enqueue(object : SalixCallback<List<RouteAction>>(context) {
|
||||
override fun onSuccess(response: Response<List<RouteAction>>) {
|
||||
_routeActionList.value =
|
||||
response.body()?.let { RouteActionList(it) }
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
fun addRouteComplements(routeComplementAdd: RouteComplementAdd) {
|
||||
salix.addRouteComplements(routeComplementAdd)
|
||||
.enqueue(object : SalixCallback<Any>(context) {
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
getRouteComplements(
|
||||
LocalDate.parse(
|
||||
routeComplementAdd.dated,
|
||||
DateTimeFormatter.ofPattern("yyyy-MM-dd")
|
||||
)
|
||||
.format(DateTimeFormatter.ofPattern("dd-MM-yyyy"))
|
||||
)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
fun getRouteComplements(date: String) {
|
||||
val (startOfDay, endOfDay) = getDayBounds(date)
|
||||
salix.getRouteComplements(
|
||||
"""{"where": {"dated": {
|
||||
"between": ["$startOfDay",
|
||||
"$endOfDay"]}},"include":[{"relation":"routeAction","scope":{"fields":{"routeActionFk":true,"name":true}}}]}"""
|
||||
)
|
||||
.enqueue(object : SalixCallback<List<RouteComplement>>(context) {
|
||||
override fun onSuccess(response: Response<List<RouteComplement>>) {
|
||||
_routeComplementList.value =
|
||||
response.body()?.let { RouteComplementList(it) }
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
fun routeComplementDelete(id: Number, date: String) {
|
||||
salix.routeComplementDelete(id)
|
||||
.enqueue(object : SalixCallback<Any>(context) {
|
||||
override fun onSuccess(response: Response<Any>) {
|
||||
getRouteComplements(date)
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
fun getTicketObservations(
|
||||
listTickets: List<Long>
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ import es.verdnatura.presentation.view.feature.delivery.fragments.InfoFragment
|
|||
import es.verdnatura.presentation.view.feature.delivery.fragments.LoadUnloadFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.fragments.LogExpeditionFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.fragments.RoutesFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.fragments.SalaryComplementFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.fragments.SummaryFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.fragments.TicketsFragment
|
||||
import es.verdnatura.presentation.view.feature.delivery.model.ClientTicketSalix
|
||||
|
@ -944,6 +945,10 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
|||
addFragmentOnTop(PickerHelperFragment.newInstance(itemTitle))
|
||||
}
|
||||
|
||||
getString(R.string.salarySupplementTitle) -> {
|
||||
addFragmentOnTop(SalaryComplementFragment.newInstance(itemTitle))
|
||||
}
|
||||
|
||||
"PREITEMPICKERTEST" -> {
|
||||
addFragmentOnTop(
|
||||
CollectionFragmentPickerPreviousNew.newInstance(
|
||||
|
|
|
@ -513,6 +513,14 @@ class PasilleroViewModel(context: Context) : BaseViewModel(context) {
|
|||
R.drawable.ic_packaging, R.string.titlePackingHolland, R.string.titleUbicatorDescrip
|
||||
)
|
||||
)
|
||||
//tarea 8099
|
||||
/* _pasillerositem.add(
|
||||
PasillerosItemVO(
|
||||
R.drawable.ic_salary_supplement,
|
||||
R.string.salarySupplementTitle,
|
||||
R.string.salarySupplementTitle
|
||||
)
|
||||
)*/
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorPrimary">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M200,880Q167,880 143.5,856.5Q120,833 120,800L120,240Q120,207 143.5,183.5Q167,160 200,160L240,160L240,80L320,80L320,160L640,160L640,80L720,80L720,160L760,160Q793,160 816.5,183.5Q840,207 840,240L840,800Q840,833 816.5,856.5Q793,880 760,880L200,880ZM200,800L760,800Q760,800 760,800Q760,800 760,800L760,400L200,400L200,800Q200,800 200,800Q200,800 200,800ZM200,320L760,320L760,240Q760,240 760,240Q760,240 760,240L200,240Q200,240 200,240Q200,240 200,240L200,320ZM200,320L200,240Q200,240 200,240Q200,240 200,240L200,240Q200,240 200,240Q200,240 200,240L200,320ZM480,560Q463,560 451.5,548.5Q440,537 440,520Q440,503 451.5,491.5Q463,480 480,480Q497,480 508.5,491.5Q520,503 520,520Q520,537 508.5,548.5Q497,560 480,560ZM320,560Q303,560 291.5,548.5Q280,537 280,520Q280,503 291.5,491.5Q303,480 320,480Q337,480 348.5,491.5Q360,503 360,520Q360,537 348.5,548.5Q337,560 320,560ZM640,560Q623,560 611.5,548.5Q600,537 600,520Q600,503 611.5,491.5Q623,480 640,480Q657,480 668.5,491.5Q680,503 680,520Q680,537 668.5,548.5Q657,560 640,560ZM480,720Q463,720 451.5,708.5Q440,697 440,680Q440,663 451.5,651.5Q463,640 480,640Q497,640 508.5,651.5Q520,663 520,680Q520,697 508.5,708.5Q497,720 480,720ZM320,720Q303,720 291.5,708.5Q280,697 280,680Q280,663 291.5,651.5Q303,640 320,640Q337,640 348.5,651.5Q360,663 360,680Q360,697 348.5,708.5Q337,720 320,720ZM640,720Q623,720 611.5,708.5Q600,697 600,680Q600,663 611.5,651.5Q623,640 640,640Q657,640 668.5,651.5Q680,663 680,680Q680,697 668.5,708.5Q657,720 640,720Z"/>
|
||||
</vector>
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="960"
|
||||
android:viewportHeight="960"
|
||||
android:tint="?attr/colorPrimary">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M521,82Q664,96 764.5,196.5Q865,297 879,440L593,440Q584,414 565.5,394.5Q547,375 521,366L521,82ZM601,184L601,320Q612,329 622,339Q632,349 641,360L777,360Q753,300 707,254Q661,208 601,184ZM441,82L441,366Q405,379 383,410.5Q361,442 361,480Q361,518 383,548.5Q405,579 441,592L441,878Q287,863 184,749Q81,635 81,480Q81,325 184,211Q287,97 441,82ZM361,184Q270,219 215.5,300Q161,381 161,480Q161,579 215.5,660Q270,741 361,778L361,640Q323,611 302,569.5Q281,528 281,480Q281,432 302,390.5Q323,349 361,320L361,184ZM593,520L879,520Q865,663 764.5,763.5Q664,864 521,878L521,592Q547,583 565.5,564.5Q584,546 593,520ZM641,600Q633,611 622.5,621Q612,631 601,640L601,776Q661,752 707,706Q753,660 777,600L641,600ZM281,481L281,481Q281,481 281,481Q281,481 281,481Q281,481 281,481Q281,481 281,481L281,481Q281,481 281,481Q281,481 281,481Q281,481 281,481Q281,481 281,481ZM641,360Q641,360 641,360Q641,360 641,360L641,360Q641,360 641,360Q641,360 641,360ZM641,600L641,600Q641,600 641,600Q641,600 641,600L641,600Q641,600 641,600Q641,600 641,600Z"/>
|
||||
</vector>
|
|
@ -1,6 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
|
@ -8,228 +7,227 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView20"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/km"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView28"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/hours"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout7" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView20" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout2">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView20"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/km"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/textView28"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/km_init"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:text="@string/hours"
|
||||
android:textAllCaps="true"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp" />
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout7" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout2"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView20" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout6"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:autofillHints="phone"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout2">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/km_init"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:autofillHints="phone"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:hint="@string/zero"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:padding="5dp"
|
||||
android:text="@string/zero" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout7"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:inputType="number"
|
||||
android:padding="5dp"
|
||||
android:text="@string/zero"
|
||||
android:hint="@string/zero"
|
||||
android:imeOptions="actionDone"
|
||||
android:maxLines="1"/>
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout6">
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout7"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
android:inputType="number"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout6">
|
||||
<TextView
|
||||
android:id="@+id/textView21"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/km_end"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:autofillHints="phone"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="number"
|
||||
android:maxLines="1"
|
||||
android:padding="5dp"
|
||||
android:text="@string/zero" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView28" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout9"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout8">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView212"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/hour_start"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText12"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:autofillHints="text"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:focusable="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:padding="5dp"
|
||||
android:text="@string/zeroHour" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout9">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView2123"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:text="@string/hour_end"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText123"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:autofillHints="text"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:focusable="false"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:maxLines="1"
|
||||
android:padding="5dp"
|
||||
android:text="@string/zeroHour" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView21"
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/textView37"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/km_end"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText1"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:autofillHints="phone"
|
||||
android:inputType="number"
|
||||
android:padding="5dp"
|
||||
android:text="@string/zero"
|
||||
android:imeOptions="actionDone"
|
||||
android:maxLines="1"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout8"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:background="@color/colorPrimary"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/textView28" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayout9"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout8">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView212"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:text="@string/hour_start"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText12"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:padding="5dp"
|
||||
android:inputType="text"
|
||||
android:autofillHints="text"
|
||||
android:text="@string/zeroHour"
|
||||
android:imeOptions="actionDone"
|
||||
android:maxLines="1"
|
||||
android:focusable="false"/>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout9">
|
||||
<TextView
|
||||
android:id="@+id/textView2123"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
|
||||
android:text="@string/hour_end"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="18sp" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editText123"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_white"
|
||||
android:ems="10"
|
||||
android:padding="5dp"
|
||||
android:text="@string/zeroHour"
|
||||
android:imeOptions="actionDone"
|
||||
android:inputType="text"
|
||||
android:autofillHints="text"
|
||||
android:maxLines="1"
|
||||
android:focusable="false"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView37"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="17dp"
|
||||
android:text="@string/save"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
/>
|
||||
android:layout_marginBottom="17dp"
|
||||
android:text="@string/save"
|
||||
android:textAlignment="center"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
|
@ -0,0 +1,101 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingTop="@dimen/toolbar_height"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/textinputlayout_username"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColorHint="@android:color/darker_gray">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_gravity="center"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/date"
|
||||
style="@style/InputLineTextSearch"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:backgroundTint="@android:color/white"
|
||||
android:drawableEnd="@drawable/ic_calendar"
|
||||
android:gravity="center"
|
||||
android:hint="@string/Fecha"
|
||||
android:lines="1"
|
||||
android:maxLines="1"
|
||||
android:textAlignment="center"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textColorHint="@android:color/darker_gray" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="@dimen/layout_margin_min"
|
||||
android:layout_marginBottom="@dimen/layout_margin_1"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/layout_margin_min"
|
||||
android:paddingEnd="@dimen/layout_margin_min">
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:text="@string/complement"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/body2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/salaryComplementRecyclerview"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clipToPadding="false"
|
||||
tools:listitem="@layout/item_salary_complement_row" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<es.verdnatura.presentation.view.commom.SearchableRecyclerView
|
||||
android:id="@+id/salarySearchableRecyclerView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toTopOf="@id/main_toolbar"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/main_toolbar"
|
||||
app:layout_constraintVertical_bias="0" />
|
||||
|
||||
<include
|
||||
android:id="@+id/main_toolbar"
|
||||
layout="@layout/toolbar_fragment"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</layout>
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tool="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="es.verdnatura.presentation.view.feature.delivery.model.RouteComplement" />
|
||||
</data>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/verdnatura_black_5"
|
||||
android:paddingStart="@dimen/pasilleros_margin_main_picker"
|
||||
android:paddingTop="@dimen/pasilleros_margin_main_menu"
|
||||
android:paddingEnd="@dimen/pasilleros_margin_main_picker"
|
||||
android:paddingBottom="@dimen/pasilleros_margin_main_menu">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_date"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_weight="1.75"
|
||||
android:ellipsize="end"
|
||||
android:gravity="start"
|
||||
android:text="@{item.dated}"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/row"
|
||||
tool:text="6-11-2024" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_complement"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="start"
|
||||
android:text="@{item.routeAction.name}"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/row"
|
||||
tool:text="de la Torre Nebot" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_prize"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="5dp"
|
||||
android:gravity="start"
|
||||
android:text="@{String.valueOf(item.price)}"
|
||||
android:textColor="@color/verdnatura_pumpkin_orange"
|
||||
android:textSize="@dimen/row"
|
||||
android:visibility="gone"
|
||||
tool:text="30" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageDelete"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:contentDescription="@string/error"
|
||||
android:gravity="center"
|
||||
app:srcCompat="@drawable/ic_delete_black_24dp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</layout>
|
|
@ -728,6 +728,7 @@
|
|||
<string name="m3">m3</string>
|
||||
<string name="options">Opciones</string>
|
||||
<string name="hourMinute">%1$d:%2$d</string>
|
||||
<string name="dateDay">%02d-%02d-%04d</string>
|
||||
<string name="level">Nivel:</string>
|
||||
<string name="ticketAbb">-T:</string>
|
||||
<string name="signPackaging">Firma:</string>
|
||||
|
@ -893,6 +894,9 @@
|
|||
<string name="holdpositionAuto">Al revisar desplazar:</string>
|
||||
<string name="parkingIn">Aparcado en %1$s</string>
|
||||
<string name="filterLevelColor">Al pulsar filtras o no la lista por el color del nivel</string>
|
||||
<string name="salarySupplementTitle">Complementos salariales reparto</string>
|
||||
<string name="complement">Tus complementos:</string>
|
||||
<string name="supplementDelivery">Complementos reparto</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -728,6 +728,7 @@
|
|||
<string name="m3">m3</string>
|
||||
<string name="options">Opciones</string>
|
||||
<string name="hourMinute">%1$d:%2$d</string>
|
||||
<string name="dateDay">%02d-%02d-%04d</string>
|
||||
<string name="level">Nivel:</string>
|
||||
<string name="ticketAbb">-T:</string>
|
||||
<string name="signPackaging">Firma:</string>
|
||||
|
@ -893,5 +894,8 @@
|
|||
<string name="holdpositionAuto">Al revisar desplazar:</string>
|
||||
<string name="parkingIn">Aparcado en %1$s</string>
|
||||
<string name="filterLevelColor">Al pulsar filtras o no la lista por color del nivel</string>
|
||||
<string name="salarySupplementTitle">Complementos salariales reparto</string>
|
||||
<string name="complement">Tus complementos:</string>
|
||||
<string name="supplementDelivery">Complementos reparto</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -728,6 +728,7 @@
|
|||
<string name="m3">m3</string>
|
||||
<string name="options">Opciones</string>
|
||||
<string name="hourMinute">%1$d:%2$d</string>
|
||||
<string name="dateDay">%02d-%02d-%04d</string>
|
||||
<string name="level">Nivel:</string>
|
||||
<string name="ticketAbb">-T:</string>
|
||||
<string name="signPackaging">Firma:</string>
|
||||
|
@ -893,5 +894,8 @@
|
|||
<string name="holdpositionAuto">Al revisar desplazar:</string>
|
||||
<string name="parkingIn">Aparcado en %1$s</string>
|
||||
<string name="filterLevelColor">Al pulsar filtras o no la lista por el color del nivel</string>
|
||||
<string name="salarySupplementTitle">Complementos salariales reparto</string>
|
||||
<string name="complement">Tus complementos:</string>
|
||||
<string name="supplementDelivery">Complementos reparto</string>
|
||||
|
||||
</resources>
|
||||
|
|
|
@ -729,6 +729,7 @@
|
|||
<string name="m3">m3</string>
|
||||
<string name="options">Opciones</string>
|
||||
<string name="hourMinute">%1$d:%2$d</string>
|
||||
<string name="dateDay">%02d-%02d-%04d</string>
|
||||
<string name="level">Nivel:</string>
|
||||
<string name="ticketAbb">-T:</string>
|
||||
<string name="signPackaging">Firma:</string>
|
||||
|
@ -896,5 +897,8 @@
|
|||
<string name="holdpositionAuto">Al revisar desplazar:</string>
|
||||
<string name="parkingIn">Aparcado en %1$s</string>
|
||||
<string name="filterLevelColor">Al pulsar filtras o no la lista por el color del nivel</string>
|
||||
<string name="salarySupplementTitle">Complementos salariales reparto</string>
|
||||
<string name="complement">Tus complementos:</string>
|
||||
<string name="supplementDelivery">Complementos reparto</string>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in New Issue