From aaf1fb6b0aee9c765a983437a3bfaae80d9917e8 Mon Sep 17 00:00:00 2001 From: "Amir.H Khademi" Date: Sun, 14 Apr 2024 12:38:16 +0330 Subject: [PATCH] feat : add new version 0.21.24.41 , fix dont display product --- .../Dialogs/DiscountActionDialogBox.razor.cs | 8 +++-- .../Dialogs/OrderActionDialogBox.razor | 4 +-- .../Pages/ProductsPage.razor.cs | 33 +++++++++++++++---- .../Services/RestServices/IProductRestApi.cs | 6 ++-- NetinaShop.AdminPanel.PWA/version.json | 3 +- .../wwwroot/css/app.output.css | 8 ++--- 6 files changed, 42 insertions(+), 20 deletions(-) diff --git a/NetinaShop.AdminPanel.PWA/Dialogs/DiscountActionDialogBox.razor.cs b/NetinaShop.AdminPanel.PWA/Dialogs/DiscountActionDialogBox.razor.cs index 591a638..05d361b 100644 --- a/NetinaShop.AdminPanel.PWA/Dialogs/DiscountActionDialogBox.razor.cs +++ b/NetinaShop.AdminPanel.PWA/Dialogs/DiscountActionDialogBox.razor.cs @@ -310,10 +310,14 @@ public class DiscountActionDialogBoxViewModel : BaseViewModel try { GetProductsResponseDto response = new GetProductsResponseDto(); + + var token = await _userUtility.GetBearerTokenAsync(); + if (token == null) + throw new Exception("Token is null"); if (product.IsNullOrEmpty()) - response = await _restWrapper.ProductRestApi.ReadAll(0,null,null); + response = await _restWrapper.ProductRestApi.ReadAll(0,null,null, token); else - response = await _restWrapper.ProductRestApi.ReadAll(product); + response = await _restWrapper.ProductRestApi.ReadAll(product, token); _products = response.Products; return _products; } diff --git a/NetinaShop.AdminPanel.PWA/Dialogs/OrderActionDialogBox.razor b/NetinaShop.AdminPanel.PWA/Dialogs/OrderActionDialogBox.razor index 2abe7b0..b51b938 100644 --- a/NetinaShop.AdminPanel.PWA/Dialogs/OrderActionDialogBox.razor +++ b/NetinaShop.AdminPanel.PWA/Dialogs/OrderActionDialogBox.razor @@ -36,15 +36,13 @@ @ViewModel.PageDto.DiscountCode - - @ViewModel.PageDto?.OrderDelivery?.Address + @ViewModel.PageDto?.OrderDelivery?.ShippingMethod - @ViewModel.PageDto?.OrderDelivery?.TrackingCode diff --git a/NetinaShop.AdminPanel.PWA/Pages/ProductsPage.razor.cs b/NetinaShop.AdminPanel.PWA/Pages/ProductsPage.razor.cs index d79d2d0..41177f6 100644 --- a/NetinaShop.AdminPanel.PWA/Pages/ProductsPage.razor.cs +++ b/NetinaShop.AdminPanel.PWA/Pages/ProductsPage.razor.cs @@ -28,9 +28,12 @@ public class ProductsPageViewModel : BaseViewModel PageDto.Add(d)); if (PageDto.Count == 20) PageCount = 2; @@ -60,16 +63,19 @@ public class ProductsPageViewModel : BaseViewModel PageDto.Add(d)); @@ -177,15 +183,21 @@ public class ProductsPageViewModel : BaseViewModel PageDto.Add(d)); if (PageDto.Count == 20) @@ -245,10 +257,14 @@ public class ProductsPageViewModel : BaseViewModel PageDto.Add(d)); if (PageDto.Count == 20) @@ -276,10 +292,13 @@ public class ProductsPageViewModel : BaseViewModel PageDto.Add(d)); if (PageDto.Count == 20) diff --git a/NetinaShop.AdminPanel.PWA/Services/RestServices/IProductRestApi.cs b/NetinaShop.AdminPanel.PWA/Services/RestServices/IProductRestApi.cs index 0004f6e..8816276 100644 --- a/NetinaShop.AdminPanel.PWA/Services/RestServices/IProductRestApi.cs +++ b/NetinaShop.AdminPanel.PWA/Services/RestServices/IProductRestApi.cs @@ -11,11 +11,11 @@ public interface IProductRestApi Task ReadOne(Guid productId); [Get("")] - Task ReadAll([Query] string productName); + Task ReadAll([Query] string productName, [Header("Authorization")] string authorization); [Get("")] - Task ReadAll([Query] int page, [Query] string? productName, [Query] Guid? categoryId); + Task ReadAll([Query] int page, [Query] string? productName, [Query] Guid? categoryId, [Header("Authorization")] string authorization); [Get("")] - Task ReadAll([Query] string productName, [Query] Guid categoryId); + Task ReadAll([Query] string productName, [Query] Guid categoryId, [Header("Authorization")] string authorization); } \ No newline at end of file diff --git a/NetinaShop.AdminPanel.PWA/version.json b/NetinaShop.AdminPanel.PWA/version.json index d357313..d4dbbd3 100644 --- a/NetinaShop.AdminPanel.PWA/version.json +++ b/NetinaShop.AdminPanel.PWA/version.json @@ -11,7 +11,8 @@ "تکمیل پروسه سفارش گیری", "افزودن بخش تنظیمات فروشگاه", "قابلیت افزودن تصویر به برند ها", - "قابلیت افزودن تصویر به دسته بندی محصولات" + "قابلیت افزودن تصویر به دسته بندی محصولات", + "عدم نمایش محصولات غیرقابل نمایش برای مشتری" ], "bugFixes": [ "حل مشکلات امنیتی", diff --git a/NetinaShop.AdminPanel.PWA/wwwroot/css/app.output.css b/NetinaShop.AdminPanel.PWA/wwwroot/css/app.output.css index a06eacd..b59e618 100644 --- a/NetinaShop.AdminPanel.PWA/wwwroot/css/app.output.css +++ b/NetinaShop.AdminPanel.PWA/wwwroot/css/app.output.css @@ -1214,6 +1214,10 @@ input:checked + .toggle-bg { margin-bottom: -0.75rem; } +.-mb-4 { + margin-bottom: -1rem; +} + .-ml-4 { margin-left: -1rem; } @@ -1322,10 +1326,6 @@ input:checked + .toggle-bg { margin-top: 2rem; } -.-mb-4 { - margin-bottom: -1rem; -} - .line-clamp-1 { overflow: hidden; display: -webkit-box;