From 53a7bf501fc3d80f8acb3b483a0e2fd3ae88ffee Mon Sep 17 00:00:00 2001 From: "Amir.H Khademi" Date: Thu, 16 May 2024 13:52:55 +0330 Subject: [PATCH] fix : order homepage informations --- Netina.AdminPanel.PWA/App.razor | 2 + .../Components/Originals/SideBarUi.razor | 7 +- .../Dialogs/BlogActionDialogBox.razor | 2 +- .../Dialogs/BlogActionDialogBox.razor.cs | 5 +- .../Extensions/StorageFileExtension.cs | 2 +- Netina.AdminPanel.PWA/Models/Address.cs | 45 +++--- Netina.AdminPanel.PWA/Models/StatConfigs.cs | 6 + .../Netina.AdminPanel.PWA.csproj | 4 +- .../Pages/FaqManagementPage.razor.cs | 4 +- Netina.AdminPanel.PWA/Pages/LoginPage.razor | 27 +++- Netina.AdminPanel.PWA/Pages/OrdersPage.razor | 12 +- .../Pages/OrdersPage.razor.cs | 5 +- .../Pages/PagesManagementPage.razor | 114 ++++++--------- .../Pages/PagesManagementPage.razor.cs | 138 +++++++++++++++++- Netina.AdminPanel.PWA/Pages/TestPage.razor | 7 - Netina.AdminPanel.PWA/Program.cs | 2 +- .../RestServices/IDashboardApiRest.cs | 2 + .../Services/RestServices/IPageRestApi.cs | 6 + .../Services/RestServices/RestWrapper.cs | 46 +++--- Netina.AdminPanel.PWA/version.json | 20 +-- .../wwwroot/appsettings.Development.json | 9 +- .../wwwroot/appsettings.Production.json | 4 +- Netina.AdminPanel.PWA/wwwroot/css/app.min.css | 6 + .../wwwroot/css/app.output.css | 25 +--- 24 files changed, 315 insertions(+), 185 deletions(-) create mode 100644 Netina.AdminPanel.PWA/Models/StatConfigs.cs delete mode 100644 Netina.AdminPanel.PWA/Pages/TestPage.razor diff --git a/Netina.AdminPanel.PWA/App.razor b/Netina.AdminPanel.PWA/App.razor index b1b63cf..0c3c987 100644 --- a/Netina.AdminPanel.PWA/App.razor +++ b/Netina.AdminPanel.PWA/App.razor @@ -2,6 +2,7 @@ @using Netina.AdminPanel.PWA.Layout @using Netina.AdminPanel.PWA.Pages @inject NavigationManager NavigationManager +@inject IConfiguration Configuration @@ -30,3 +31,4 @@ + diff --git a/Netina.AdminPanel.PWA/Components/Originals/SideBarUi.razor b/Netina.AdminPanel.PWA/Components/Originals/SideBarUi.razor index daf9644..fd6c2c3 100644 --- a/Netina.AdminPanel.PWA/Components/Originals/SideBarUi.razor +++ b/Netina.AdminPanel.PWA/Components/Originals/SideBarUi.razor @@ -35,6 +35,12 @@ Icon="@Icons.Material.Outlined.WebAsset">دسته بندی های بلاگـــ + + برگه ها + سوالات متداول + + @if (isShop) { فروشگاه بازاریاب ها - سوالات متداول } else diff --git a/Netina.AdminPanel.PWA/Dialogs/BlogActionDialogBox.razor b/Netina.AdminPanel.PWA/Dialogs/BlogActionDialogBox.razor index 9dafd33..9804258 100644 --- a/Netina.AdminPanel.PWA/Dialogs/BlogActionDialogBox.razor +++ b/Netina.AdminPanel.PWA/Dialogs/BlogActionDialogBox.razor @@ -68,7 +68,7 @@ می توانید کتن کامل بلاگــــ خود را کامل وارد کنید - + diff --git a/Netina.AdminPanel.PWA/Dialogs/BlogActionDialogBox.razor.cs b/Netina.AdminPanel.PWA/Dialogs/BlogActionDialogBox.razor.cs index 4634c9c..b0ed8e5 100644 --- a/Netina.AdminPanel.PWA/Dialogs/BlogActionDialogBox.razor.cs +++ b/Netina.AdminPanel.PWA/Dialogs/BlogActionDialogBox.razor.cs @@ -113,7 +113,8 @@ public class BlogActionDialogBoxViewModel : BaseViewModel if (SelectedCategory == null) throw new Exception("لطفا یک دسته بندی انتخاب کنید"); var token = await _userUtility.GetBearerTokenAsync(); - + if (token == null) + throw new Exception("Token is null"); var request = new BlogLDto { Id = Blog.Id, @@ -126,7 +127,7 @@ public class BlogActionDialogBoxViewModel : BaseViewModel Summery = Summery, Tags = Tags }; - await _restWrapper.CrudApiRest(Address.BlogController).Create(request, token); + await _restWrapper.CrudApiRest(Address.BlogController).Update(request, token); _snackbar.Add($"ویرایش بلاگ {Title} با موفقیت انجام شد", Severity.Success); _mudDialog.Close(); } diff --git a/Netina.AdminPanel.PWA/Extensions/StorageFileExtension.cs b/Netina.AdminPanel.PWA/Extensions/StorageFileExtension.cs index 88692b4..b08b129 100644 --- a/Netina.AdminPanel.PWA/Extensions/StorageFileExtension.cs +++ b/Netina.AdminPanel.PWA/Extensions/StorageFileExtension.cs @@ -4,7 +4,7 @@ public static class StorageFileExtension { public static string GetLink(this StorageFileSDto file) { - var link = $"https://storage.vesmeh.com/{file.FileLocation}"; + var link = $"{Address.StorageAddress}{file.FileLocation}"; return link; } } \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/Models/Address.cs b/Netina.AdminPanel.PWA/Models/Address.cs index 26ca772..70e8006 100644 --- a/Netina.AdminPanel.PWA/Models/Address.cs +++ b/Netina.AdminPanel.PWA/Models/Address.cs @@ -2,32 +2,25 @@ public static class Address { - public static string WebSiteAddress = string.Empty; public static string StorageAddress = string.Empty; -#if DEBUG - public static string BaseAddress = "http://localhost:32770/api"; - //public static string BaseAddress = "https://api.vesmeh.com/api"; -#else - public static string BaseAddress = "https://api.vesmeh.com/api"; -#endif - public static string AuthController = $"{BaseAddress}/auth"; - public static string UserController = $"{BaseAddress}/user"; - public static string ProductCategoryController = $"{BaseAddress}/product/category"; - public static string ProductController = $"{BaseAddress}/product"; - public static string BrandController = $"{BaseAddress}/brand"; - public static string FileController => $"{BaseAddress}/file"; - public static string BlogController => $"{BaseAddress}/blog"; - public static string BlogCategoryController => $"{BaseAddress}/blog/category"; - public static string DiscountController => $"{BaseAddress}/discount"; - public static string RoleController => $"{BaseAddress}/user/role"; - public static string ShippingController => $"{BaseAddress}/warehouse/shipping"; - public static string OrderController => $"{BaseAddress}/order"; - public static string PaymentController => $"{BaseAddress}/accounting/pay"; - public static string PageController => $"{BaseAddress}/page"; - public static string ScraperController => $"{BaseAddress}/scraper"; - public static string NewsletterMemberController => $"{BaseAddress}/newsletter/member"; - public static string DashboardController => $"{BaseAddress}/dashboard"; - public static string SettingController => $"{BaseAddress}/setting"; - public static string DistrictController => $"{BaseAddress}/district"; + public static string AuthController = $"/auth"; + public static string UserController = $"/user"; + public static string ProductCategoryController = $"/product/category"; + public static string ProductController = $"/product"; + public static string BrandController = $"/brand"; + public static string FileController => $"/file"; + public static string BlogController => $"/blog"; + public static string BlogCategoryController => $"/blog/category"; + public static string DiscountController => $"/discount"; + public static string RoleController => $"/user/role"; + public static string ShippingController => $"/warehouse/shipping"; + public static string OrderController => $"/order"; + public static string PaymentController => $"/accounting/pay"; + public static string PageController => $"/page"; + public static string ScraperController => $"/scraper"; + public static string NewsletterMemberController => $"/newsletter/member"; + public static string DashboardController => $"/dashboard"; + public static string SettingController => $"/setting"; + public static string DistrictController => $"/district"; } \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/Models/StatConfigs.cs b/Netina.AdminPanel.PWA/Models/StatConfigs.cs new file mode 100644 index 0000000..2214264 --- /dev/null +++ b/Netina.AdminPanel.PWA/Models/StatConfigs.cs @@ -0,0 +1,6 @@ +namespace Netina.AdminPanel.PWA.Models; + +public static class StatConfigs +{ + public static bool IsShop { get; set; } = false; +} \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/Netina.AdminPanel.PWA.csproj b/Netina.AdminPanel.PWA/Netina.AdminPanel.PWA.csproj index 8a01e26..625f6f5 100644 --- a/Netina.AdminPanel.PWA/Netina.AdminPanel.PWA.csproj +++ b/Netina.AdminPanel.PWA/Netina.AdminPanel.PWA.csproj @@ -5,8 +5,8 @@ enable enable service-worker-assets.js - 0.25.27.48 - 0.25.27.48 + 0.27.31.52 + 0.27.31.52 $(MSBuildProjectName) diff --git a/Netina.AdminPanel.PWA/Pages/FaqManagementPage.razor.cs b/Netina.AdminPanel.PWA/Pages/FaqManagementPage.razor.cs index cc71594..bc2ea93 100644 --- a/Netina.AdminPanel.PWA/Pages/FaqManagementPage.razor.cs +++ b/Netina.AdminPanel.PWA/Pages/FaqManagementPage.razor.cs @@ -38,7 +38,7 @@ public class FaqManagementPageViewModel : BaseViewModel PageDto = dto.GetData(); _request = new PageActionRequestDto { - Name = dto.Name, + Title = dto.Title, Content = dto.Content, Description = dto.Description, Id = dto.Id, @@ -76,7 +76,7 @@ public class FaqManagementPageViewModel : BaseViewModel IsProcessing = true; var request = new PageActionRequestDto { - Name = "سوالات متداول", + Title = "سوالات متداول", Content = string.Empty, Description = string.Empty, Data = PageDto, diff --git a/Netina.AdminPanel.PWA/Pages/LoginPage.razor b/Netina.AdminPanel.PWA/Pages/LoginPage.razor index 61b8da1..1f8fa4f 100644 --- a/Netina.AdminPanel.PWA/Pages/LoginPage.razor +++ b/Netina.AdminPanel.PWA/Pages/LoginPage.razor @@ -69,15 +69,30 @@
- -
- + - داشبورد تخصصی وسمه - شما میتوانید با ورود به داشبورد تخصصی نتینا فروشگاه خود را مدیریت کنید + داشبورد تخصصی وسمه + شما میتوانید با ورود به داشبورد تخصصی نتینا فروشگاه خود را مدیریت کنید + +
+ } + else + { + +
+ + + داشبورد وب سایت شما + شما میتوانید با ورود به داشبورد ، وب سایت خود را مدیریت کنید + +
+ } -
@code { diff --git a/Netina.AdminPanel.PWA/Pages/OrdersPage.razor b/Netina.AdminPanel.PWA/Pages/OrdersPage.razor index f05045d..3da0607 100644 --- a/Netina.AdminPanel.PWA/Pages/OrdersPage.razor +++ b/Netina.AdminPanel.PWA/Pages/OrdersPage.razor @@ -15,28 +15,28 @@ سفارشات امروز - 1124 + @ViewModel.PageDto.TodayOrdersCount عدد سفارشات در انتظار تایید - 845 + @ViewModel.PageDto.PayedOrdersCount عدد - تغییر نسبت هفته پیش - 125 + سفارشات ارسال نشده + @ViewModel.PageDto.UnSendOrdersCount عدد - تغییر نسبت به ماه پیش - 10 + مجموع سفارش ماه + @ViewModel.PageDto.ThisMonthOrdersCount عدد diff --git a/Netina.AdminPanel.PWA/Pages/OrdersPage.razor.cs b/Netina.AdminPanel.PWA/Pages/OrdersPage.razor.cs index 814490b..9b76f24 100644 --- a/Netina.AdminPanel.PWA/Pages/OrdersPage.razor.cs +++ b/Netina.AdminPanel.PWA/Pages/OrdersPage.razor.cs @@ -1,6 +1,6 @@ namespace Netina.AdminPanel.PWA.Pages; -public class OrdersPageViewModel : BaseViewModel +public class OrdersPageViewModel : BaseViewModel { private readonly NavigationManager _navigationManager; private readonly ISnackbar _snackbar; @@ -36,6 +36,9 @@ public class OrdersPageViewModel : BaseViewModel dto.ForEach(d => MainOrders.Add(d)); if (MainOrders.Count == 15) MainGridPageCount = 2; + + var orderDashboardDto = await _restWrapper.DashboardApiRest.GetOrdersDashboardAsync(token); + PageDto = orderDashboardDto; } catch (ApiException ex) { diff --git a/Netina.AdminPanel.PWA/Pages/PagesManagementPage.razor b/Netina.AdminPanel.PWA/Pages/PagesManagementPage.razor index 76d6cd5..9cd2ff7 100644 --- a/Netina.AdminPanel.PWA/Pages/PagesManagementPage.razor +++ b/Netina.AdminPanel.PWA/Pages/PagesManagementPage.razor @@ -1,4 +1,4 @@ -@page "/pages" +@page "/management/pages" @attribute [Microsoft.AspNetCore.Authorization.Authorize] @inject IDialogService DialogService @@ -8,87 +8,69 @@ @inject IRestWrapper RestWrapper - - - - پرداختـــ ها + + + + + تنظیمات برگه ها + برگه های وب سایت خود را ویرایش نمایید + + + @* *@ - - + + - @* - - *@ - - - - - + + افزودن برگه جدید - -

@context.Item.Type.ToDisplay()

-
-
- + - -

@context.Item.Status.ToDisplay()

-
-
+ - + افزودن + - -

@context.Item.Amount.ToString("N0") ریالــ

-
-
+
+ + + @foreach (var navMenuItem in ViewModel.PageDto) + { + + + + @navMenuItem.Title + + + + + - - -

@context.Item.CreatedAt.ToPersianDateTime().ToLongDateString()

-
-
+ + - - - - - - - - - - - - - - -
-
-
-
+ + + } + +
+
+ + @code { - public PaymentsPageViewModel ViewModel { get; set; } + public PagesManagementPageViewModel ViewModel { get; set; } protected override async Task OnInitializedAsync() { - ViewModel = new PaymentsPageViewModel(NavigationManager, Snackbar, UserUtility, RestWrapper, DialogService); + ViewModel = new PagesManagementPageViewModel(NavigationManager, Snackbar, UserUtility, RestWrapper, DialogService); await ViewModel.InitializeAsync(); await base.OnInitializedAsync(); } diff --git a/Netina.AdminPanel.PWA/Pages/PagesManagementPage.razor.cs b/Netina.AdminPanel.PWA/Pages/PagesManagementPage.razor.cs index a52ba95..735b2f5 100644 --- a/Netina.AdminPanel.PWA/Pages/PagesManagementPage.razor.cs +++ b/Netina.AdminPanel.PWA/Pages/PagesManagementPage.razor.cs @@ -1,6 +1,138 @@ -namespace Netina.AdminPanel.PWA.Pages; +using Force.DeepCloner; -public class PagesManagementPageViewModel +namespace Netina.AdminPanel.PWA.Pages; + +public class PagesManagementPageViewModel : BaseViewModel> { - + private readonly NavigationManager _navigationManager; + private readonly ISnackbar _snackbar; + private readonly IUserUtility _userUtility; + private readonly IDialogService _dialogService; + private readonly IRestWrapper _restWrapper; + + public PagesManagementPageViewModel( + NavigationManager navigationManager, + ISnackbar snackbar, + IUserUtility userUtility, + IRestWrapper restWrapper, + IDialogService dialogService) + { + _navigationManager = navigationManager; + _snackbar = snackbar; + _userUtility = userUtility; + _restWrapper = restWrapper; + _dialogService = dialogService; + } + + public override async Task InitializeAsync() + { + try + { + IsProcessing = true; + var token = await _userUtility.GetBearerTokenAsync(); + if (token == null) + throw new Exception("Token is null"); + var pages = await _restWrapper.PageRestApi.ReadAll(token); + PageDto.Clear(); + pages.ForEach(p=>PageDto.Add(p)); + } + catch (ApiException e) + { + var exe = await e.GetContentAsAsync(); + if (e.StatusCode == HttpStatusCode.Unauthorized) + { + await _userUtility.LogoutAsync(); + _navigationManager.NavigateTo("login", true, true); + } + _snackbar.Add(exe != null ? exe.Message : e.Content, Severity.Error); + } + catch (Exception ex) + { + _snackbar.Add(ex.Message, Severity.Error); + } + finally + { + IsProcessing = false; + } + + await base.InitializeAsync(); + } + + public PageActionRequestDto NewPageDto { get; set; } = new(); + + public async Task AddPageAsync() + { + try + { + IsProcessing = true; + var token = await _userUtility.GetBearerTokenAsync(); + if (token == null) + throw new Exception("Token is null"); + + if (NewPageDto.Title.IsNullOrEmpty()) + throw new AppException("عنوان صفحه را وارد کنید"); + if (NewPageDto.Slug.IsNullOrEmpty()) + throw new AppException("اسلاگ صفحه را وارد کنید"); + + await _restWrapper.PageRestApi.CreatePage(NewPageDto.DeepClone(), token); + NewPageDto = new PageActionRequestDto(); + _snackbar.Add("برگه مورد نظر با موفقیت افزوده شد", Severity.Success); + await InitializeAsync(); + + } + catch (ApiException e) + { + var exe = await e.GetContentAsAsync(); + if (e.StatusCode == HttpStatusCode.Unauthorized) + { + await _userUtility.LogoutAsync(); + _navigationManager.NavigateTo("login", true, true); + } + _snackbar.Add(exe != null ? exe.Message : e.Content, Severity.Error); + } + catch (Exception ex) + { + _snackbar.Add(ex.Message, Severity.Error); + } + finally + { + IsProcessing = false; + } + } + + public async Task RemovePageAsync(Guid pageId) + { + try + { + IsProcessing = true; + var token = await _userUtility.GetBearerTokenAsync(); + if (token == null) + throw new Exception("Token is null"); + + await _restWrapper.PageRestApi.DeletePage(pageId, token); + _snackbar.Add("برگه مورد نظر با موفقیت حذف شد", Severity.Success); + await InitializeAsync(); + + + } + catch (ApiException e) + { + var exe = await e.GetContentAsAsync(); + if (e.StatusCode == HttpStatusCode.Unauthorized) + { + await _userUtility.LogoutAsync(); + _navigationManager.NavigateTo("login", true, true); + } + _snackbar.Add(exe != null ? exe.Message : e.Content, Severity.Error); + } + catch (Exception ex) + { + _snackbar.Add(ex.Message, Severity.Error); + } + finally + { + IsProcessing = false; + } + } + } \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/Pages/TestPage.razor b/Netina.AdminPanel.PWA/Pages/TestPage.razor deleted file mode 100644 index d6c92ff..0000000 --- a/Netina.AdminPanel.PWA/Pages/TestPage.razor +++ /dev/null @@ -1,7 +0,0 @@ - - - - -@code { - -} diff --git a/Netina.AdminPanel.PWA/Program.cs b/Netina.AdminPanel.PWA/Program.cs index 76c8305..ee991c4 100644 --- a/Netina.AdminPanel.PWA/Program.cs +++ b/Netina.AdminPanel.PWA/Program.cs @@ -12,7 +12,7 @@ var builder = WebAssemblyHostBuilder.CreateDefault(args); Address.WebSiteAddress = builder.Configuration.GetValue($"WebSiteUrl") ?? string.Empty; Address.StorageAddress = builder.Configuration.GetValue("StorageBaseUrl") ?? string.Empty; - +StatConfigs.IsShop = builder.Configuration.GetValue("IsShop"); builder.RootComponents.Add("#app"); builder.RootComponents.Add("head::after"); diff --git a/Netina.AdminPanel.PWA/Services/RestServices/IDashboardApiRest.cs b/Netina.AdminPanel.PWA/Services/RestServices/IDashboardApiRest.cs index 74e0af5..b4aaccb 100644 --- a/Netina.AdminPanel.PWA/Services/RestServices/IDashboardApiRest.cs +++ b/Netina.AdminPanel.PWA/Services/RestServices/IDashboardApiRest.cs @@ -4,4 +4,6 @@ public interface IDashboardApiRest { [Get("/home")] public Task GetHomeDashboardAsync([Header("Authorization")] string authorization); + [Get("/orders")] + public Task GetOrdersDashboardAsync([Header("Authorization")] string authorization); } \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/Services/RestServices/IPageRestApi.cs b/Netina.AdminPanel.PWA/Services/RestServices/IPageRestApi.cs index 22c7ce9..a8ed376 100644 --- a/Netina.AdminPanel.PWA/Services/RestServices/IPageRestApi.cs +++ b/Netina.AdminPanel.PWA/Services/RestServices/IPageRestApi.cs @@ -2,6 +2,9 @@ public interface IPageRestApi { + [Get("")] + Task> ReadAll([Header("Authorization")] string authorization); + [Get("/type/{type}")] Task ReadByType([Query] string type, [Header("Authorization")] string authorization); @@ -11,4 +14,7 @@ public interface IPageRestApi [Post("")] Task CreatePage([Body] PageActionRequestDto request, [Header("Authorization")] string authorization); + + [Delete("/{id}")] + Task DeletePage(Guid id, [Header("Authorization")] string authorization); } \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/Services/RestServices/RestWrapper.cs b/Netina.AdminPanel.PWA/Services/RestServices/RestWrapper.cs index 2f96115..47f5a6e 100644 --- a/Netina.AdminPanel.PWA/Services/RestServices/RestWrapper.cs +++ b/Netina.AdminPanel.PWA/Services/RestServices/RestWrapper.cs @@ -2,37 +2,41 @@ public class RestWrapper : IRestWrapper { - + private string baseApiAddress; + public RestWrapper(IConfiguration configuration) + { + baseApiAddress = configuration.GetValue("ApiUrl") ?? string.Empty; + } private static RefitSettings setting = new RefitSettings(new NewtonsoftJsonContentSerializer(new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore, - + })); public ICrudApiRest CrudApiRest(string address) where T : class { - return RestService.For>(address, setting); + return RestService.For>(baseApiAddress + address, setting); } public ICrudDtoApiRest CrudDtoApiRest(string address) where T : class where TDto : class { - return RestService.For>(address, setting); + return RestService.For>(baseApiAddress + address, setting); } - public IAuthRestApi AuthRestApi => RestService.For(Address.AuthController, setting); - public IUserRestApi UserRestApi => RestService.For(Address.UserController, setting); - public IProductCategoryRestApi ProductCategoryRestApi => RestService.For(Address.ProductCategoryController, setting); - public IProductRestApi ProductRestApi => RestService.For(Address.ProductController, setting); - public IBrandRestApi BrandRestApi => RestService.For(Address.BrandController, setting); - public IFileRestApi FileRestApi => RestService.For(Address.FileController, setting); - public IBlogRestApi BlogRestApi => RestService.For(Address.BlogController, setting); - public IDiscountRestApi DiscountRest => RestService.For(Address.DiscountController, setting); - public IBlogCategoryRestApi BlogCategoryRestApi => RestService.For(Address.BlogCategoryController, setting); - public IRoleRestApi RoleRestApi => RestService.For(Address.RoleController, setting); - public IOrderRestApi OrderRestApi => RestService.For(Address.OrderController, setting); - public IPaymentRestApi PaymentRestApi => RestService.For(Address.PaymentController, setting); - public IPageRestApi PageRestApi => RestService.For(Address.PageController, setting); - public IScraperRestApi ScraperRestApi => RestService.For(Address.ScraperController, setting); - public ISettingRestApi SettingRestApi => RestService.For(Address.SettingController, setting); - public IDashboardApiRest DashboardApiRest => RestService.For(Address.DashboardController, setting); - public IDistrictApiRest DistrictApiRest => RestService.For(Address.DistrictController, setting); + public IAuthRestApi AuthRestApi => RestService.For($"{baseApiAddress}{Address.AuthController}", setting); + public IUserRestApi UserRestApi => RestService.For($"{baseApiAddress}{Address.UserController}", setting); + public IProductCategoryRestApi ProductCategoryRestApi => RestService.For($"{baseApiAddress}{Address.ProductCategoryController}", setting); + public IProductRestApi ProductRestApi => RestService.For($"{baseApiAddress}{Address.ProductController}", setting); + public IBrandRestApi BrandRestApi => RestService.For($"{baseApiAddress}{Address.BrandController}", setting); + public IFileRestApi FileRestApi => RestService.For($"{baseApiAddress}{Address.FileController}", setting); + public IBlogRestApi BlogRestApi => RestService.For($"{baseApiAddress}{Address.BlogController}", setting); + public IDiscountRestApi DiscountRest => RestService.For($"{baseApiAddress}{Address.DiscountController}",setting); + public IBlogCategoryRestApi BlogCategoryRestApi => RestService.For($"{baseApiAddress}{Address.BlogCategoryController}", setting); + public IRoleRestApi RoleRestApi => RestService.For($"{baseApiAddress}{Address.RoleController}", setting); + public IOrderRestApi OrderRestApi => RestService.For($"{baseApiAddress}{Address.OrderController}", setting); + public IPaymentRestApi PaymentRestApi => RestService.For($"{baseApiAddress}{Address.PaymentController}", setting); + public IPageRestApi PageRestApi => RestService.For($"{baseApiAddress}{Address.PageController}", setting); + public IScraperRestApi ScraperRestApi => RestService.For($"{baseApiAddress}{Address.ScraperController}", setting); + public ISettingRestApi SettingRestApi => RestService.For($"{baseApiAddress}{Address.SettingController}", setting); + public IDashboardApiRest DashboardApiRest => RestService.For($"{baseApiAddress}{Address.DashboardController}", setting); + public IDistrictApiRest DistrictApiRest => RestService.For($"{baseApiAddress}{Address.DistrictController}", setting); } \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/version.json b/Netina.AdminPanel.PWA/version.json index 63bfbde..117b1ad 100644 --- a/Netina.AdminPanel.PWA/version.json +++ b/Netina.AdminPanel.PWA/version.json @@ -4,25 +4,9 @@ "versionName": "چرتکه", "description": "", "features": [ - "افزودن تم دارک", - "تغییر دیالوگ پرسشی", - "افزودن تنظیمات درگاه", - "افزودن کد رهگیری پستی", - "تکمیل پروسه سفارش گیری", - "افزودن بخش تنظیمات فروشگاه", - "قابلیت افزودن تصویر به برند ها", - "قابلیت افزودن تصویر به دسته بندی محصولات", - "عدم نمایش محصولات غیرقابل نمایش برای مشتری", - "افزودن فاکتور برای فروش ها" + "" ], "bugFixes": [ - "حل مشکلات امنیتی", - "رفع مشکلات رسپانسیو", - "رفع مشکل دریافت تصاویر", - "رفع مشکل عدم اتصال به درگاه", - "رفع مشکل عدم نمایش لیست بلاگ ها", - "رفع مشکل عدم ویرایش تگ ها در محصولات", - "رفع مشکل ادیتور متن در بلاگ و محصولات", - "رفع مشکلات ساختاری در ریسپانس" + "نمایش اطلاعات صحیح در صفحه سفارشات" ] } diff --git a/Netina.AdminPanel.PWA/wwwroot/appsettings.Development.json b/Netina.AdminPanel.PWA/wwwroot/appsettings.Development.json index 391531d..23419ff 100644 --- a/Netina.AdminPanel.PWA/wwwroot/appsettings.Development.json +++ b/Netina.AdminPanel.PWA/wwwroot/appsettings.Development.json @@ -10,5 +10,12 @@ }, "WebSiteUrl": "https://vesmeh.com", "AdminPanelBaseUrl": "https://admin.vesmeh.com", - "StorageBaseUrl": "https://storage.vesmeh.com" + "StorageBaseUrl": "https://storage.vesmeh.com", + "ApiUrl": "http://192.168.1.12:32770/api", + "IsShop": true + //"WebSiteUrl": "https://hamyanedalat.com", + //"AdminPanelBaseUrl": "https://admin.hamyanedalat.com", + //"StorageBaseUrl": "https://storage.hamyanedalat.com", + //"ApiUrl": "https://api.hamyanedalat.com/api", + //"IsShop": false } \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/wwwroot/appsettings.Production.json b/Netina.AdminPanel.PWA/wwwroot/appsettings.Production.json index f96b1a7..81e6349 100644 --- a/Netina.AdminPanel.PWA/wwwroot/appsettings.Production.json +++ b/Netina.AdminPanel.PWA/wwwroot/appsettings.Production.json @@ -10,5 +10,7 @@ }, "WebSiteUrl": "https://hamyanedalat.com", "AdminPanelBaseUrl": "https://admin.hamyanedalat.com", - "StorageBaseUrl": "https://storage.hamyanedalat.com" + "StorageBaseUrl": "https://storage.hamyanedalat.com", + "ApiUrl": "https://api.hamyanedalat.com/api", + "IsShop": false } \ No newline at end of file diff --git a/Netina.AdminPanel.PWA/wwwroot/css/app.min.css b/Netina.AdminPanel.PWA/wwwroot/css/app.min.css index 9198976..9c8fb94 100644 --- a/Netina.AdminPanel.PWA/wwwroot/css/app.min.css +++ b/Netina.AdminPanel.PWA/wwwroot/css/app.min.css @@ -1307,6 +1307,9 @@ input:checked + .toggle-bg { .max-h-\[50rem\] { max-height: 50rem; } +.max-h-\[60vh\] { + max-height: 60vh; +} .min-h-\[33rem\] { min-height: 33rem; } @@ -1484,6 +1487,9 @@ input:checked + .toggle-bg { .overflow-x-scroll { overflow-x: scroll; } +.\!overflow-y-scroll { + overflow-y: scroll !important; +} .overflow-y-scroll { overflow-y: scroll; } diff --git a/Netina.AdminPanel.PWA/wwwroot/css/app.output.css b/Netina.AdminPanel.PWA/wwwroot/css/app.output.css index e58f96c..a27e1fe 100644 --- a/Netina.AdminPanel.PWA/wwwroot/css/app.output.css +++ b/Netina.AdminPanel.PWA/wwwroot/css/app.output.css @@ -1455,25 +1455,8 @@ input:checked + .toggle-bg { max-height: 50rem; } -.\!max-h-\[75vh\] { - max-height: 75vh !important; -} - -.\!max-h-\[70vh\] { - max-height: 70vh !important; -} - -.\!max-h-full { - max-height: 100% !important; -} - -.\!max-h-\[70\%\] { - max-height: 70% !important; -} - -.\!max-h-max { - max-height: -moz-max-content !important; - max-height: max-content !important; +.max-h-\[60vh\] { + max-height: 60vh; } .min-h-\[33rem\] { @@ -1707,6 +1690,10 @@ input:checked + .toggle-bg { overflow-x: scroll; } +.\!overflow-y-scroll { + overflow-y: scroll !important; +} + .overflow-y-scroll { overflow-y: scroll; }