Минорные фиксы
This commit is contained in:
parent
963ef167c8
commit
af6a0ffe3e
@ -24,6 +24,6 @@ interface OrderDao {
|
||||
fun getByUserId(userId: Int): Flow<List<OrderWithProducts>>
|
||||
@Query("select * from orders where orders.user_id =:userId and orders.order_status = 'Неоплачено'")
|
||||
fun getUnpaidByUser(userId: Int) : Flow<OrderWithProducts>
|
||||
@Query("select * from orders where orders.user_id =:userId and orders.order_status = 'Готовится'")
|
||||
@Query("select * from orders where orders.user_id =:userId and (orders.order_status = 'Готовится' or orders.order_status = 'Готово')")
|
||||
fun getPaidByUser(userId: Int) : Flow<List<OrderWithProducts>>
|
||||
}
|
@ -7,5 +7,6 @@ data class OrderProductModelWithProduct(
|
||||
@Embedded
|
||||
val orderProductModel: OrderProductModel,
|
||||
@Relation(entity = ProductModel::class, parentColumn = "product_id", entityColumn = "id")
|
||||
val product: ProductModel
|
||||
val product: ProductModel,
|
||||
|
||||
)
|
||||
|
@ -199,7 +199,7 @@ fun PaidItem(order : OrderWithProducts) {
|
||||
fontWeight = FontWeight.Bold
|
||||
)
|
||||
Text(
|
||||
text = order.orderWithProducts[index].orderProductModel.totalPrice.toString() + " руб.",
|
||||
text = (order.orderWithProducts[index].orderProductModel.quantity * order.orderWithProducts[index].product.price).toString() + " руб.",
|
||||
fontFamily = NunitoFamily,
|
||||
fontSize = 20.sp,
|
||||
modifier = Modifier.padding(top = 15.dp),
|
||||
@ -250,7 +250,7 @@ fun CartItem(order : OrderWithProducts) {
|
||||
fontWeight = FontWeight.Bold
|
||||
)
|
||||
Text(
|
||||
text = order.orderWithProducts[index].orderProductModel.totalPrice.toString() + " руб.",
|
||||
text = (order.orderWithProducts[index].orderProductModel.quantity * order.orderWithProducts[index].product.price).toString() + " руб.",
|
||||
fontFamily = NunitoFamily,
|
||||
fontSize = 18.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
|
@ -54,11 +54,11 @@ class UserViewModel @Inject constructor(
|
||||
_registrationState.postValue(false)
|
||||
return
|
||||
}
|
||||
if (login.length < 8 || login.length > 20) {
|
||||
if (login.length < 5 || login.length > 20) {
|
||||
_registrationState.postValue(false)
|
||||
return
|
||||
}
|
||||
if (password.length < 8 || password.length > 20) {
|
||||
if (password.length < 5 || password.length > 20) {
|
||||
_registrationState.postValue(false)
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user