diff --git a/Netina.AdminPanel.PWA/Dialogs/OrderActionDialogBox.razor b/Netina.AdminPanel.PWA/Dialogs/OrderActionDialogBox.razor index 6244790..b245a96 100644 --- a/Netina.AdminPanel.PWA/Dialogs/OrderActionDialogBox.razor +++ b/Netina.AdminPanel.PWA/Dialogs/OrderActionDialogBox.razor @@ -9,183 +9,184 @@ @inject IJSRuntime JsRuntime @inject IConfiguration Configuration - + - - + + + - - - - اطلاعات سفارش - - - @ViewModel.PageDto.OrderStatus.ToDisplay() - - - - - - @ViewModel.PageDto.CustomerFullName - - - - @ViewModel.PageDto.CustomerPhoneNumber - - - - @ViewModel.PageDto.DiscountCode - - - @ViewModel.PageDto?.OrderDelivery?.Address - - - - @ViewModel.PageDto?.OrderDelivery?.ShippingMethod - - - @ViewModel.PageDto?.OrderDelivery?.TrackingCode - - - - - - کالاهای این سفارش - - - @ViewModel.PageDto.OrderProducts.Sum(op => op.Count) قلم کالا - - - - - - - - - - @context.Item.ProductName - - - - - - -

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

-
-
- - - - - -

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

-
-
-
-
+ + اطلاعات سفارش + + + @ViewModel.PageDto.OrderStatus.ToDisplay() + + + + + @ViewModel.PageDto.CustomerFullName + + + + @ViewModel.PageDto.CustomerPhoneNumber + + + + @ViewModel.PageDto.DiscountCode + + + @ViewModel.PageDto?.OrderDelivery?.Address + + + + @ViewModel.PageDto?.OrderDelivery?.ShippingMethod + + + @ViewModel.PageDto?.OrderDelivery?.TrackingCode + + + + + + کالاهای این سفارش + + + @ViewModel.PageDto.OrderProducts.Sum(op => op.Count) قلم کالا + + + + + + + + + + @context.Item.ProductName + + + + + + +

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

+
+
+ + + + + +

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

+
+
+
+
+
- مبــــالغ - - - - - جمع کالاها : - - @ViewModel.PageDto.TotalProductsPrice.ToString("N0") ریالــ - - - - - - مالیات : - - @ViewModel.PageDto.TaxesPrice.ToString("N0") ریالــ - - - - - - بسته بندی : - - @ViewModel.PageDto.PackingPrice.ToString("N0") ریالــ - - - - - - هزینه ارسال : - - @ViewModel.PageDto.DeliveryPrice.ToString("N0") ریالــ - - - - - - + + مبــــالغ + - جمع کل : + جمع کالاها : - @ViewModel.PageDto.TotalPriceWithoutDiscount.ToString("N0") ریالــ + @ViewModel.PageDto.TotalProductsPrice.ToString("N0") ریالــ - مقدار تخفیف : + مالیات : - @ViewModel.PageDto.DiscountPrice.ToString("N0") ریالــ + @ViewModel.PageDto.TaxesPrice.ToString("N0") ریالــ - مبلغ قابل پرداخت : + بسته بندی : - @ViewModel.PageDto.TotalPrice.ToString("N0") ریالــ + @ViewModel.PageDto.PackingPrice.ToString("N0") ریالــ + + + + + + هزینه ارسال : + + @ViewModel.PageDto.DeliveryPrice.ToString("N0") ریالــ - - - پرداختــ ها + - - + + + + جمع کل : + + @ViewModel.PageDto.TotalPriceWithoutDiscount.ToString("N0") ریالــ + + + + + + مقدار تخفیف : + + @ViewModel.PageDto.DiscountPrice.ToString("N0") ریالــ + + + + + + مبلغ قابل پرداخت : + + @ViewModel.PageDto.TotalPrice.ToString("N0") ریالــ + - @foreach (var item in ViewModel.PageDto.Payments) - { - - @item.Type.ToDisplay() - - - @item.Status.ToDisplay() - - @item.Amount.ToString("N0") ریالــ - } + + -
- + پرداختــ ها + + + + + @foreach (var item in ViewModel.PageDto.Payments) + { + + @item.Type.ToDisplay() + - + @item.Status.ToDisplay() + + @item.Amount.ToString("N0") ریالــ + + } + + + +
- + + - +
@@ -18,13 +18,13 @@ - + - + - + -
- -

منتظر بمانید

+
+ +

منتظر بمانید

@@ -46,7 +46,7 @@ - + -
- -

منتظر بمانید

+
+ +

منتظر بمانید

@@ -68,39 +68,39 @@ - + - + - + - + - + - + - + - + - + @@ -116,24 +116,25 @@ - + - + - + افزودن - + @@ -176,7 +177,7 @@
- + تصاویر محصول می توانید برای محصول چند تصویر اپلود کنید @@ -185,15 +186,15 @@ @foreach (var item in ViewModel.Files) { -
- +
+ @if (item.IsHeader) { -

هدر

+

هدر

} @if (item.IsPrimary) { -

اصلی

+

اصلی

}
} @@ -232,7 +233,7 @@ Color="Color.Info" /> - + @@ -240,20 +241,20 @@ - + - + - + - + @@ -266,18 +267,18 @@ - + @if (ViewModel.IsEditing) { - } else { - diff --git a/Netina.AdminPanel.PWA/Pages/OrdersPage.razor b/Netina.AdminPanel.PWA/Pages/OrdersPage.razor index 0f6e269..5fba2a5 100644 --- a/Netina.AdminPanel.PWA/Pages/OrdersPage.razor +++ b/Netina.AdminPanel.PWA/Pages/OrdersPage.razor @@ -6,9 +6,9 @@ @inject ISnackbar Snackbar @inject IUserUtility UserUtility @inject IRestWrapper RestWrapper +@inject IBrowserViewportService BrowserViewportService - - + @@ -85,7 +85,7 @@ Clearable="true" AdornmentIcon="@Icons.Material.Filled.Search" IconSize="Size.Medium" - class="my-auto" + class="mx-2 my-auto" @bind-Value="@ViewModel.FactorCodeSearch" OnAdornmentClick="@ViewModel.SearchAsync"> @@ -94,7 +94,7 @@ Value="@ViewModel.OrderStatusSearch" SearchFunc="@ViewModel.OrderStatusSearchAsync" T="FilterOptionDto" - class="-mt-0.5" + class="-mt-0.5 mx-2" OnClearButtonClick="async () => await ViewModel.SearchByOrderStatusAsync(null)" Clearable="true" Label="وظعیت سفارش"> @@ -238,7 +238,7 @@ public OrdersPageViewModel ViewModel { get; set; } protected override async Task OnInitializedAsync() { - ViewModel = new OrdersPageViewModel(NavigationManager, Snackbar, UserUtility, RestWrapper, DialogService); + ViewModel = new OrdersPageViewModel(NavigationManager, Snackbar, UserUtility, RestWrapper, DialogService, BrowserViewportService); await ViewModel.InitializeAsync(); await base.OnInitializedAsync(); } diff --git a/Netina.AdminPanel.PWA/Pages/OrdersPage.razor.cs b/Netina.AdminPanel.PWA/Pages/OrdersPage.razor.cs index 858d36d..eb9434d 100644 --- a/Netina.AdminPanel.PWA/Pages/OrdersPage.razor.cs +++ b/Netina.AdminPanel.PWA/Pages/OrdersPage.razor.cs @@ -6,6 +6,7 @@ public class OrdersPageViewModel : BaseViewModel private readonly ISnackbar _snackbar; private readonly IUserUtility _userUtility; private readonly IDialogService _dialogService; + private readonly IBrowserViewportService _browserViewportService; private readonly IRestWrapper _restWrapper; public string Search = string.Empty; @@ -18,13 +19,15 @@ public class OrdersPageViewModel : BaseViewModel ISnackbar snackbar, IUserUtility userUtility, IRestWrapper restWrapper, - IDialogService dialogService) : base(userUtility) + IDialogService dialogService, + IBrowserViewportService browserViewportService) : base(userUtility) { _navigationManager = navigationManager; _snackbar = snackbar; _userUtility = userUtility; _restWrapper = restWrapper; _dialogService = dialogService; + _browserViewportService = browserViewportService; } public override async Task InitializeAsync() @@ -109,6 +112,11 @@ public class OrdersPageViewModel : BaseViewModel public async Task ShowClicked(OrderSDto order) { DialogOptions maxWidth = new DialogOptions() { MaxWidth = MaxWidth.False, NoHeader = true, FullWidth = true, DisableBackdropClick = true }; + + var breakPoint = await _browserViewportService.GetCurrentBreakpointAsync(); + if (breakPoint == Breakpoint.Xs) + maxWidth = new DialogOptions { FullScreen = true, CloseButton = true }; + var parameters = new DialogParameters(); parameters.Add(x => x.Order, order); var dialogResult = await _dialogService.ShowAsync($" سفارش {order.FactorCode}", parameters, maxWidth); diff --git a/Netina.AdminPanel.PWA/Pages/ProductsPage.razor b/Netina.AdminPanel.PWA/Pages/ProductsPage.razor index ec8b1f2..d4a76fc 100644 --- a/Netina.AdminPanel.PWA/Pages/ProductsPage.razor +++ b/Netina.AdminPanel.PWA/Pages/ProductsPage.razor @@ -6,8 +6,9 @@ @inject ISnackbar Snackbar @inject IUserUtility UserUtility @inject IRestWrapper RestWrapper +@inject IBrowserViewportService BrowserViewportService - + @@ -23,13 +24,13 @@ StartIcon="@Icons.Material.Outlined.Add" Color="Color.Secondary" OnClick="@ViewModel.AddProductClicked" - class="md:my-auto w-full md:w-auto">افزودن محصول + class="w-full md:my-auto md:w-auto">افزودن محصول افزودن محصول از دیجیکالا + class="w-full md:my-auto md:w-auto">افزودن محصول از دیجیکالا @@ -54,9 +55,9 @@ -
- -

منتظر بمانید

+
+ +

منتظر بمانید

@@ -77,7 +78,7 @@ SortMode="@SortMode.None" Groupable="false"> - + -
- -

منتظر بمانید

+
+ +

منتظر بمانید

@@ -161,7 +162,7 @@ + SelectedChanged="@ViewModel.ChangePageAsync" class="mx-auto my-4"/> @@ -176,7 +177,7 @@ public ProductsPageViewModel ViewModel { get; set; } protected override async Task OnInitializedAsync() { - ViewModel = new ProductsPageViewModel(NavigationManager, Snackbar, UserUtility, RestWrapper, DialogService); + ViewModel = new ProductsPageViewModel(NavigationManager, Snackbar, UserUtility, RestWrapper, DialogService, BrowserViewportService); await ViewModel.InitializeAsync(); await base.OnInitializedAsync(); } diff --git a/Netina.AdminPanel.PWA/Pages/ProductsPage.razor.cs b/Netina.AdminPanel.PWA/Pages/ProductsPage.razor.cs index 531e87e..3bf5030 100644 --- a/Netina.AdminPanel.PWA/Pages/ProductsPage.razor.cs +++ b/Netina.AdminPanel.PWA/Pages/ProductsPage.razor.cs @@ -1,4 +1,6 @@ -namespace Netina.AdminPanel.PWA.Pages; +using MudBlazor.Services; + +namespace Netina.AdminPanel.PWA.Pages; public class ProductsPageViewModel : BaseViewModel> { @@ -6,6 +8,7 @@ public class ProductsPageViewModel : BaseViewModel("افزودن محصول جدید", maxWidth); var result = await dialogResult.Result; if (!result.Canceled && result.Data is bool and true) diff --git a/Netina.AdminPanel.PWA/_Imports.razor b/Netina.AdminPanel.PWA/_Imports.razor index da3cc6f..261f4dc 100644 --- a/Netina.AdminPanel.PWA/_Imports.razor +++ b/Netina.AdminPanel.PWA/_Imports.razor @@ -18,4 +18,5 @@ @using Netina.Common.Extensions @using Netina.Domain.Entities.Users @using Netina.AdminPanel.PWA.Components.Originals -@using Netina.Domain.Models.Claims \ No newline at end of file +@using Netina.Domain.Models.Claims +@using MudBlazor.Services \ 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 6d17a33..2777857 100644 --- a/Netina.AdminPanel.PWA/wwwroot/css/app.min.css +++ b/Netina.AdminPanel.PWA/wwwroot/css/app.min.css @@ -1298,9 +1298,6 @@ input:checked + .toggle-bg { .max-h-\[30rem\] { max-height: 30rem; } -.max-h-\[50rem\] { - max-height: 50rem; -} .max-h-\[60vh\] { max-height: 60vh; } @@ -2223,10 +2220,18 @@ code { @media (min-width: 640px) { + .sm\:mr-3 { + margin-right: 0.75rem; + } + .sm\:mt-6 { margin-top: 1.5rem; } + .sm\:w-64 { + width: 16rem; + } + .sm\:py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; diff --git a/Netina.AdminPanel.PWA/wwwroot/css/app.output.css b/Netina.AdminPanel.PWA/wwwroot/css/app.output.css index 0b86ecf..b51dbc1 100644 --- a/Netina.AdminPanel.PWA/wwwroot/css/app.output.css +++ b/Netina.AdminPanel.PWA/wwwroot/css/app.output.css @@ -1443,10 +1443,6 @@ input:checked + .toggle-bg { max-height: 30rem; } -.max-h-\[50rem\] { - max-height: 50rem; -} - .max-h-\[60vh\] { max-height: 60vh; } @@ -1987,10 +1983,6 @@ input:checked + .toggle-bg { text-align: center; } -.text-justify { - text-align: justify; -} - .align-bottom { vertical-align: bottom; } @@ -2049,11 +2041,6 @@ input:checked + .toggle-bg { color: rgb(217 119 6 / var(--tw-text-opacity)); } -.text-blue-500 { - --tw-text-opacity: 1; - color: rgb(63 131 248 / var(--tw-text-opacity)); -} - .text-blue-600 { --tw-text-opacity: 1; color: rgb(28 100 242 / var(--tw-text-opacity)); @@ -2571,10 +2558,18 @@ code { } @media (min-width: 640px) { + .sm\:mr-3 { + margin-right: 0.75rem; + } + .sm\:mt-6 { margin-top: 1.5rem; } + .sm\:w-64 { + width: 16rem; + } + .sm\:py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem;