feat: #refs 6861 reservas
This commit is contained in:
parent
2c42f3b54b
commit
746972d226
|
@ -13,8 +13,8 @@ android {
|
|||
applicationId "es.verdnatura"
|
||||
minSdkVersion 26
|
||||
targetSdkVersion 33 // se deja con target si no Play Protect la bloquea
|
||||
versionCode 326
|
||||
versionName = "24.36Beta"
|
||||
versionCode 330
|
||||
versionName = "24.38Beta"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
|
|
|
@ -12,9 +12,8 @@ import java.util.Calendar
|
|||
fun CollectionVO.map(context: Context): CollectionVO {
|
||||
try {
|
||||
|
||||
|
||||
this.tickets.forEach { ticket ->
|
||||
// if (ticket.sales.size>0){
|
||||
// if (ticket.sales.size>0){
|
||||
ticket.sales.forEach {
|
||||
it.ticketFk = ticket.ticketFk
|
||||
it.level = ticket.level
|
||||
|
@ -22,11 +21,10 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
|||
it.salePersonFk = ticket.salesPersonFk
|
||||
it.agencyName = ticket.agencyName
|
||||
it.isNew = it.isAdded == "1"
|
||||
|
||||
it.code= it.cel3
|
||||
it.code = it.cel3
|
||||
it.quantity = it.quantity!!.toInt()
|
||||
it.originalQuantity = it.originalQuantity!!.toInt()
|
||||
if (it.originalQuantity==-1) it.originalQuantity = it.quantity
|
||||
if (it.originalQuantity == -1) it.originalQuantity = it.quantity
|
||||
it.pickedQuantity =
|
||||
if (it.isPrepared == "1" || it.isPreviousPrepared == "1" || it.isControlled == "1") it.quantity else it.pickedQuantity
|
||||
if (!it.placements.isNullOrEmpty()) {
|
||||
|
@ -39,7 +37,7 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
|||
}
|
||||
}
|
||||
placement.created =
|
||||
getCalendarFromDate(placement.created,context).convertToDateString()
|
||||
getCalendarFromDate(placement.created, context).convertToDateString()
|
||||
placement.visible =
|
||||
"(" + (if (placement.visible.toInt() > 0) placement.visible else "0") + ")"
|
||||
}
|
||||
|
@ -47,7 +45,6 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
|||
it.placements = listOf()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}//}
|
||||
} catch (e: Exception) {
|
||||
|
@ -66,11 +63,11 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
|||
|
||||
fun CollectionTicket.map(context: Context): CollectionTicket {
|
||||
try {
|
||||
|
||||
this.tickets.forEach { ticket ->
|
||||
ticket.sales.forEach {
|
||||
it.level = ticket.level?:""
|
||||
it.rgb = ticket.rgb?:""}
|
||||
it.level = ticket.level ?: ""
|
||||
it.rgb = ticket.rgb ?: ""
|
||||
}
|
||||
}
|
||||
|
||||
} catch (e: Exception) {
|
||||
|
@ -78,25 +75,26 @@ fun CollectionTicket.map(context: Context): CollectionTicket {
|
|||
if (this.tickets.isNullOrEmpty()) {
|
||||
this.errorMessage = context.getString(R.string.collectionNoTicketsError)
|
||||
} else {
|
||||
|
||||
this.errorMessage =
|
||||
context.getString(R.string.collectionErrorBuilding) + ".Revisa el sector por si acaso"
|
||||
context.getString(R.string.collectionErrorBuilding) + context.getString(R.string.reviewSector)
|
||||
}
|
||||
|
||||
}
|
||||
return this
|
||||
}
|
||||
private fun getCalendarFromDate(date: String,context:Context): Calendar {
|
||||
|
||||
private fun getCalendarFromDate(date: String, context: Context): Calendar {
|
||||
val sdf = SimpleDateFormat(context.getString(R.string.dateFormat))
|
||||
val cal = Calendar.getInstance()
|
||||
cal.time = sdf.parse(date)!!
|
||||
return cal
|
||||
}
|
||||
|
||||
// para cuando se pase a Salix el modelo
|
||||
//Tarea 5134
|
||||
fun PlacementSupplyVO.proposal(context: Context): PlacementSupplyVO {
|
||||
try {
|
||||
}catch (ex:Exception){
|
||||
} catch (ex: Exception) {
|
||||
}
|
||||
return this
|
||||
}
|
|
@ -199,10 +199,10 @@ class SectorCollectionReserveFragment(
|
|||
isPlayed = true,
|
||||
isToasted = true
|
||||
)
|
||||
listSalesGroup.removeAt(0)
|
||||
// listSalesGroup.removeAt(0)
|
||||
}
|
||||
|
||||
listSaleGroupAdapter!!.notifyItemChanged(0)
|
||||
// listSaleGroupAdapter!!.notifyItemChanged(0)
|
||||
}
|
||||
customDialogList.setValue("")
|
||||
ma.hideKeyboard(customDialogList.getEditText())
|
||||
|
@ -359,7 +359,8 @@ class SectorCollectionReserveFragment(
|
|||
if (::customDialogList.isInitialized) customDialogList.dismiss()
|
||||
|
||||
ma.onPasillerosItemClickListener(
|
||||
PasillerosItemVO(title =R.string.preitempickertestMayus), entryPoint = collectionFk.toString()
|
||||
PasillerosItemVO(title = R.string.preitempickertestMayus),
|
||||
entryPoint = collectionFk.toString()
|
||||
)
|
||||
// onBack = true
|
||||
}
|
||||
|
|
|
@ -32,8 +32,7 @@
|
|||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:visibility="visible"
|
||||
/>
|
||||
android:visibility="visible" />
|
||||
|
||||
<LinearLayout
|
||||
|
||||
|
@ -45,95 +44,93 @@
|
|||
android:textColor="@color/verdnatura_black">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/levelTxt"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_minest"
|
||||
android:text="@string/level"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/levelTxt"
|
||||
<TextView
|
||||
android:id="@+id/level"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_minest"
|
||||
android:text="@{sale.level}"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textStyle="bold"
|
||||
tool:text="2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_minest"
|
||||
android:text="@string/ticketAbb"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ticketFk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{Integer.toString(sale.ticketFk)}"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textStyle="bold"
|
||||
tool:text="123456789"
|
||||
|
||||
/>
|
||||
|
||||
<View
|
||||
android:id="@+id/item_ticket_color"
|
||||
android:layout_width="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_height="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="1dp"
|
||||
android:background="@drawable/background_and_round_collection_fragment" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/previous"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/layout_margin_minest"
|
||||
android:text=""
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h9"
|
||||
android:textStyle="bold"
|
||||
tool:text="PREV:"
|
||||
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivArrow"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:contentDescription="@string/previousCollected"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/ic_arrow_down" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageErrorMessage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_minest"
|
||||
android:text="@string/level"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/level"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_minest"
|
||||
android:text="@{sale.level}"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textStyle="bold"
|
||||
tool:text="2" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="@dimen/layout_margin_minest"
|
||||
android:text="@string/ticketAbb"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/ticketFk"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@{Integer.toString(sale.ticketFk)}"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h8"
|
||||
android:textStyle="bold"
|
||||
tool:text="123456789"
|
||||
|
||||
/>
|
||||
<View
|
||||
android:id="@+id/item_ticket_color"
|
||||
android:layout_width="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_height="@dimen/semaforo_next_to_ticket"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginStart="1dp"
|
||||
android:background="@drawable/background_and_round_collection_fragment" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/previous"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:layout_marginStart="@dimen/layout_margin_minest"
|
||||
android:textColor="@color/verdnatura_black"
|
||||
android:textSize="@dimen/h9"
|
||||
android:textStyle="bold"
|
||||
tool:text="PREV:"
|
||||
|
||||
/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivArrow"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:rotation="180"
|
||||
android:src="@drawable/ic_arrow_down"
|
||||
android:contentDescription="@string/previousCollected"/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imageErrorMessage"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_alignParentEnd="true"
|
||||
app:srcCompat="@drawable/emoticon_error_fragment"
|
||||
android:contentDescription="@string/error"/>
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
android:layout_alignParentEnd="true"
|
||||
android:contentDescription="@string/error"
|
||||
app:srcCompat="@drawable/emoticon_error_fragment" />
|
||||
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -144,13 +141,14 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="horizontal"
|
||||
android:baselineAligned="false">
|
||||
android:baselineAligned="false"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/content_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:background="@color/verdnatura_black"
|
||||
android:paddingTop="@dimen/layout_margin_min"
|
||||
android:paddingBottom="@dimen/layout_margin_min">
|
||||
|
@ -159,8 +157,8 @@
|
|||
|
||||
<LinearLayout
|
||||
android:id="@+id/infoSale"
|
||||
android:layout_width="250dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="240dp"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
@ -168,14 +166,14 @@
|
|||
<LinearLayout
|
||||
android:id="@+id/linearLayoutItem"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="25dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="@dimen/layout_margin_prepicker">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_parking_code"
|
||||
|
@ -206,21 +204,19 @@
|
|||
tool:text="25 x 5" />
|
||||
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/linearLayoutLongItem"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="@dimen/layout_margin_prepicker"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutItem">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="25dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_code"
|
||||
|
@ -252,13 +248,13 @@
|
|||
<LinearLayout
|
||||
android:id="@+id/linearLayoutItemOrigin"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="25dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutLongItem">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="@dimen/layout_margin_prepicker">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_itemFkNew"
|
||||
|
@ -272,6 +268,7 @@
|
|||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="@dimen/bodyPicker"
|
||||
tool:text="123456" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/item_article_colour"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -317,7 +314,7 @@
|
|||
<LinearLayout
|
||||
android:id="@+id/linearLayoutItemColor"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="20dp"
|
||||
android:layout_height="@dimen/layout_margin_prepicker"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutItemOrigin">
|
||||
|
||||
|
@ -376,15 +373,15 @@
|
|||
android:layout_marginStart="5dp"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintEnd_toStartOf="@+id/linearLayoutColor"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
>
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/packingTopicker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="26sp"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="26sp"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
</TextView>
|
||||
|
@ -397,17 +394,18 @@
|
|||
android:layout_height="0dp"
|
||||
android:layout_marginStart="50dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutRight"
|
||||
app:layout_constraintEnd_toStartOf="@+id/linearLayoutColor"
|
||||
app:layout_constraintTop_toBottomOf="@+id/linearLayoutRight"
|
||||
tool:layout_editor_absoluteY="4dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/selectToPicker"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:textSize="22sp"
|
||||
android:gravity="start"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:textSize="21sp"
|
||||
tools:text="11/22">
|
||||
|
||||
</TextView>
|
||||
|
@ -416,11 +414,11 @@
|
|||
android:id="@+id/quantityReserved"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="0.30"
|
||||
android:textSize="22sp"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:layout_weight="0.4"
|
||||
android:gravity="end"
|
||||
android:textColor="@color/verdnatura_white"
|
||||
android:layout_marginEnd="5dp"
|
||||
android:textSize="21sp"
|
||||
tool:text="2000/3000">
|
||||
|
||||
</TextView>
|
||||
|
@ -445,8 +443,8 @@
|
|||
android:layout_width="@dimen/semaforo_width"
|
||||
android:layout_height="@dimen/ticketColor_height"
|
||||
android:layout_marginBottom="1dp"
|
||||
android:visibility="invisible"
|
||||
android:background="@drawable/border" />
|
||||
android:background="@drawable/border"
|
||||
android:visibility="invisible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@ -472,7 +470,7 @@
|
|||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/verdnatura_white"/>
|
||||
android:background="@color/verdnatura_white" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/item_article_placements"
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
<dimen name="layout_margin_7">64dp</dimen>
|
||||
<dimen name="layout_margin_8">72dp</dimen>
|
||||
<dimen name="layout_margin_12">104dp</dimen>
|
||||
<dimen name="layout_margin_prepicker">25dp</dimen>
|
||||
|
||||
<dimen name="layout_margin_min_dynamic">64dp</dimen>
|
||||
<dimen name="layout_height_dynamic">36dp</dimen>
|
||||
|
|
Loading…
Reference in New Issue