From 58962faf891db013d0bf619220b699aa8efe4bee Mon Sep 17 00:00:00 2001 From: Danya_Mochalov Date: Wed, 8 Nov 2023 04:34:27 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=D1=87=D0=B8=D0=BD=D0=B0=D0=B5?= =?UTF-8?q?=D0=BC=20=D0=B4=D0=B5=D0=BB=D0=B0=D1=82=D1=8C=20=D1=8D=D0=BA?= =?UTF-8?q?=D1=80=D0=B0=D0=BD=20=D0=BF=D1=80=D0=BE=D0=B4=D1=83=D0=BA=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20+=20=D1=80=D0=B0=D0=BD=D0=BD=D0=B8=D0=B5=20?= =?UTF-8?q?=D1=84=D0=B8=D0=BA=D1=81=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/shawarma/data/dao/OrderDao.kt | 2 +- .../shawarma/screens/discount/DiscountScreen.kt | 4 +--- .../com/example/shawarma/utils/BottomNavItem.kt | 2 ++ .../com/example/shawarma/utils/ScreenPaths.kt | 2 +- app/src/main/res/drawable/pen_icon.png | Bin 0 -> 7033 bytes 5 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 app/src/main/res/drawable/pen_icon.png 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 0000000000000000000000000000000000000000..512d1b40a60b592319cc42b86f14affd430ddaea GIT binary patch literal 7033 zcmd5>2~bn%mc9Wrs3^FMY-&UUxU_;I&?pePaf^VlZCg=PqBbIp8XHg+fg7KSfFNxm z2m%SV3N9!pB5sg$%hC}A1O-{65Q!m;F$*MQx&Qn(c1_j1s(DlM=1tX5Mdjw~|2f|| z=TDNhY2&)d6YVA<2r`+ve)VPqF@cXJi1~QgsQ{#1#zp?kcYgPwJ2hryts~A;0QxTO9qq-B6p;esRidrw98Eg%@x>etr6>2U=$l&~iaw^z`Fj4w*InmNeJ1-AOf);OH=tuU5a_11MpmL>J7M|huf%DhJ@CpVAQ$STESm<)8eSeqb6dvir=8bJI$me@Id zD@*F)wasy?i@c2lfOn4QJelScuVE>5RNwO=c7ym?19-H-Isr97ehI2&1Swhvlq|B# z#;BLIB=uQp@?rsz)f1iQd*S8h@&hn&36I;?A1N2GWfWQbN6n7it*R*m{WH5w zC<|BaJBySba9OWdOs!#Igga4lXo_16>hZ|T4|&vNC&3j7spqEn?!gE1gh$>k8P8m~ zlsxw8VDhcqGXA+JY_1@yF3ZZq^*Uoi)HW^g=}HqxGOO`L z=O0D2?Y-UAx%#e$&D z(iaTDpv$MENLE>%Jeu1IGrCSjGht#m3J%!D(sz)-3W56S@MB#hTmOMvMM5*mW<2ck zZ=O%x{rYns;#%ZbY7kx&IkUV=cWA{uz zHrUAp;4Br}!@A}CkaT-jp~#t?=wOg_M~FT9^L2!+d+uu}d7^FX#DN)}`}Q_d6^lD} z`pa~2*OXNyj|s?Y*ByEg%j$M|G+mjn-Gh?yR+r3)@nwso&QB7M$9BU$0KIrgrX&qX zS^9hxugtm7GcZx-KE1zBZD>^nv#bN-ULr5(S2dJhM6`|3_8Xo! z2*7%vLnU%g6J)$cYZvgL-pL#Euy`-UJFe{6Xrh;NRy~s9*~$jGd!;fJ<+UeyY?GEZ zr(3CwaIt2#*P=UNcim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