diff --git a/app/src/main/java/com/example/labwork/database/AppDatabase.kt b/app/src/main/java/com/example/labwork/database/AppDatabase.kt index 9c4b5d2..2b9191c 100644 --- a/app/src/main/java/com/example/labwork/database/AppDatabase.kt +++ b/app/src/main/java/com/example/labwork/database/AppDatabase.kt @@ -59,9 +59,9 @@ abstract class AppDatabase : RoomDatabase() { userDao.insertUser(user2) // Создание велосипедов - val bicycle1 = Bicycle(brand = "Trek", model = "Велосипед 1", color = "Black", userId = null, id = null) + val bicycle1 = Bicycle(brand = "Trek", model = "Велосипед 1", color = "Black", userId = 1, id = null) val bicycle2 = Bicycle(brand = "Trek", model = "Велосипед 2", color = "Black", userId = null, id = null) - val bicycle3 = Bicycle(brand = "Trek", model = "Велосипед 3", color = "Black", userId = null, id = null) + val bicycle3 = Bicycle(brand = "Trek", model = "Велосипед 3", color = "Black", userId = 1, id = null) val bicycle4 = Bicycle(brand = "Trek", model = "Велосипед 4", color = "Black", userId = null, id = null) val bicycle5 = Bicycle(brand = "Trek", model = "Велосипед 5", color = "Black", userId = null, id = null) val bicycle6 = Bicycle(brand = "Trek", model = "Велосипед 6", color = "Black", userId = null, id = null) diff --git a/app/src/main/java/com/example/labwork/pages/product/ListProduct.kt b/app/src/main/java/com/example/labwork/pages/product/ListProduct.kt index a8e39d1..f7f1f5d 100644 --- a/app/src/main/java/com/example/labwork/pages/product/ListProduct.kt +++ b/app/src/main/java/com/example/labwork/pages/product/ListProduct.kt @@ -148,6 +148,24 @@ fun ListProduct(item: Bicycle, bicycleDao: BicycleDao, navHostController: NavHos modifier = Modifier .fillMaxWidth() ) + Text( + color = Color.Black, + text = item.brand, + maxLines = 10, + fontSize = 14.sp, + textAlign = TextAlign.Center, + modifier = Modifier + .fillMaxWidth() + ) + Text( + color = Color.Black, + text = if (item.userId != null) "Занято" else "Свободно", + maxLines = 10, + fontSize = 14.sp, + textAlign = TextAlign.Center, + modifier = Modifier + .fillMaxWidth() + ) } } }