Начинаем третью (коммит для роллбэка в случае апокалипсиса)
This commit is contained in:
parent
d40de4701a
commit
57d4d6b0c8
@ -6,17 +6,17 @@ import java.util.Date
|
||||
data class OrderModel(
|
||||
val id: Int,
|
||||
val status: OrderStatus,
|
||||
val productsId: HashMap<ProductModel, Int>,
|
||||
val productsId: HashMap<Int, Int>,
|
||||
val userId: Int,
|
||||
val date: Date
|
||||
)
|
||||
|
||||
fun getOrdersByUserId() : List<OrderModel> {
|
||||
val map1 = HashMap<ProductModel, Int>()
|
||||
map1[ProductModel(1, "Классика", 150)] = 2
|
||||
val map1 = HashMap<Int, Int>()
|
||||
map1[1] = 2
|
||||
|
||||
val map2 = HashMap<ProductModel, Int>()
|
||||
map2[ProductModel(1, "Классика", 150)] = 2
|
||||
val map2 = HashMap<Int, Int>()
|
||||
map2[1] = 2
|
||||
return listOf(
|
||||
OrderModel(1, OrderStatus.Unpaid, map1, 1, Date()),
|
||||
OrderModel(2, OrderStatus.Preparing, map2 , 1, Date())
|
||||
@ -24,11 +24,11 @@ fun getOrdersByUserId() : List<OrderModel> {
|
||||
}
|
||||
|
||||
fun getAllOrders() : List<OrderModel> {
|
||||
val map1 = HashMap<ProductModel, Int>()
|
||||
map1[ProductModel(1, "Классика", 150)] = 2
|
||||
val map1 = HashMap<Int, Int>()
|
||||
map1[1] = 2
|
||||
return listOf(
|
||||
OrderModel(1, OrderStatus.Prepared, map1, 1, Date()),
|
||||
OrderModel(2, OrderStatus.Preparing, map1 , 1, Date()),
|
||||
OrderModel(2, OrderStatus.Processed, map1 , 1, Date())
|
||||
OrderModel(3, OrderStatus.Processed, map1 , 1, Date())
|
||||
)
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ fun PaidItem(order : OrderModel) {
|
||||
.padding(horizontal = 20.dp)
|
||||
){
|
||||
Text(
|
||||
text = order.productsId.keys.first().title,
|
||||
text = "Классика",
|
||||
fontFamily = NunitoFamily,
|
||||
fontSize = 20.sp,
|
||||
modifier = Modifier.padding(top = 15.dp),
|
||||
@ -187,7 +187,7 @@ fun PaidItem(order : OrderModel) {
|
||||
fontWeight = FontWeight.Bold
|
||||
)
|
||||
Text(
|
||||
text = order.productsId.keys.first().price.toString() + " руб.",
|
||||
text = "150 руб.",
|
||||
fontFamily = NunitoFamily,
|
||||
fontSize = 20.sp,
|
||||
modifier = Modifier.padding(top = 15.dp),
|
||||
@ -245,7 +245,7 @@ fun CartItem(order : OrderModel) {
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
){
|
||||
Text(
|
||||
text = order.productsId.keys.first().title,
|
||||
text = "Классика",
|
||||
fontFamily = NunitoFamily,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
@ -258,7 +258,7 @@ fun CartItem(order : OrderModel) {
|
||||
)
|
||||
}
|
||||
Text(
|
||||
text = order.productsId.keys.first().price.toString() + " руб.",
|
||||
text = "150 руб.",
|
||||
fontFamily = NunitoFamily,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
|
@ -183,7 +183,7 @@ fun PreparingItem(order : OrderModel){
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
){
|
||||
Text(
|
||||
text = order.productsId.keys.first().title,
|
||||
text = "Классика",
|
||||
fontFamily = NunitoFamily,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
@ -251,7 +251,7 @@ fun PreparedItem(order : OrderModel){
|
||||
modifier = Modifier.fillMaxWidth()
|
||||
){
|
||||
Text(
|
||||
text = order.productsId.keys.first().title,
|
||||
text = "Классика",
|
||||
fontFamily = NunitoFamily,
|
||||
fontSize = 20.sp,
|
||||
fontWeight = FontWeight.Bold
|
||||
|
Loading…
Reference in New Issue
Block a user