diff --git a/app/src/main/java/com/example/shawarma/data/dao/OrderDao.kt b/app/src/main/java/com/example/shawarma/data/dao/OrderDao.kt index 1cc87b5..4fa164b 100644 --- a/app/src/main/java/com/example/shawarma/data/dao/OrderDao.kt +++ b/app/src/main/java/com/example/shawarma/data/dao/OrderDao.kt @@ -20,7 +20,7 @@ interface OrderDao { @Delete suspend fun delete(order: OrderModel) - @Query("select * from orders where orders.user_id is not null") + @Query("select * from orders") fun getAll() : Flow> @Query("select * from orders where orders.id =:id") fun getById(id: Int): Flow> diff --git a/app/src/main/java/com/example/shawarma/screens/discount/DiscountScreen.kt b/app/src/main/java/com/example/shawarma/screens/discount/DiscountScreen.kt index 7da6757..8267a69 100644 --- a/app/src/main/java/com/example/shawarma/screens/discount/DiscountScreen.kt +++ b/app/src/main/java/com/example/shawarma/screens/discount/DiscountScreen.kt @@ -36,10 +36,7 @@ import androidx.compose.ui.unit.sp import androidx.compose.ui.zIndex import com.example.shawarma.R import com.example.shawarma.data.db.AppDatabase -import com.example.shawarma.data.models.DiscountProductModel import com.example.shawarma.data.models.ProductModel -import com.example.shawarma.data.models.getAllDiscountProducts -import com.example.shawarma.screens.home.HomeList import com.example.shawarma.ui.theme.MarckFamily import com.example.shawarma.ui.theme.MyLightYellow import com.example.shawarma.ui.theme.MyMainBackground @@ -149,6 +146,7 @@ fun DiscountCard(product : ProductModel){ .size(160.dp, 36.dp) ) { Row( + horizontalArrangement = Arrangement.SpaceBetween ){ Box( modifier = Modifier.padding(start = 12.dp) diff --git a/app/src/main/java/com/example/shawarma/utils/BottomNavItem.kt b/app/src/main/java/com/example/shawarma/utils/BottomNavItem.kt index b64b010..7a57f9a 100644 --- a/app/src/main/java/com/example/shawarma/utils/BottomNavItem.kt +++ b/app/src/main/java/com/example/shawarma/utils/BottomNavItem.kt @@ -7,4 +7,6 @@ sealed class BottomNavItem(var title:String, var icon:Int, var screen_route:Stri object Discount : BottomNavItem("Discount", R.drawable.discount_icon,ScreenPaths.discount.name) object Cart : BottomNavItem("Cart", R.drawable.cart_icon,ScreenPaths.cart.name) object Orders: BottomNavItem("Orders", R.drawable.orders_icon,ScreenPaths.orders.name) + object Products: BottomNavItem("Products", R.drawable.pen_icon, ScreenPaths.products.name) + } diff --git a/app/src/main/java/com/example/shawarma/utils/ScreenPaths.kt b/app/src/main/java/com/example/shawarma/utils/ScreenPaths.kt index f1561fb..df263ef 100644 --- a/app/src/main/java/com/example/shawarma/utils/ScreenPaths.kt +++ b/app/src/main/java/com/example/shawarma/utils/ScreenPaths.kt @@ -1,5 +1,5 @@ package com.example.shawarma.utils enum class ScreenPaths { - authorization, registration, home, discount, cart, orders + authorization, registration, home, discount, cart, orders, products } \ No newline at end of file diff --git a/app/src/main/res/drawable/pen_icon.png b/app/src/main/res/drawable/pen_icon.png new file mode 100644 index 0000000..512d1b4 Binary files /dev/null and b/app/src/main/res/drawable/pen_icon.png differ