Compare commits
2 Commits
f64cd7d960
...
edf22ff1ca
Author | SHA1 | Date |
---|---|---|
|
edf22ff1ca | |
|
82ace9a4dd |
|
@ -1,10 +1,11 @@
|
|||
@inject NavigationManager NavigationManager
|
||||
@inject IRestWrapper RestWrapper
|
||||
@inject IUserUtility UserUtility
|
||||
@inject ISnackbar Snackbar
|
||||
|
||||
<MudStack class="w-full pt-4 h-screen bg-[--mud-palette-background]">
|
||||
<MudStack class="bg-[--mud-palette-background] h-screen w-full pt-4">
|
||||
|
||||
<MudNavMenu Rounded="true" Margin="Margin.Dense" Color="Color.Warning" Class="pa-2" Bordered="true">
|
||||
<MudNavMenu Rounded="true" Margin="Margin.Dense" Color="Color.Warning" Bordered="true">
|
||||
<MudNavLink Href="home" Match="NavLinkMatch.Prefix" Icon="@Icons.Material.Filled.Dashboard">داشبورد</MudNavLink>
|
||||
@if (isShop)
|
||||
{
|
||||
|
@ -21,6 +22,9 @@
|
|||
Icon="@Icons.Material.Outlined.AllInbox">دسته بندی محصولاتـــ</MudNavLink>
|
||||
<MudNavLink Href="product/brands"
|
||||
Icon="@Icons.Custom.Brands.Facebook">برند محصولاتــــ</MudNavLink>
|
||||
|
||||
<MudNavLink Href="product/shipping"
|
||||
Icon="@Icons.Material.Outlined.AirportShuttle">روش های ارسال</MudNavLink>
|
||||
</MudNavGroup>
|
||||
}
|
||||
|
||||
|
@ -51,18 +55,6 @@
|
|||
</MudNavGroup>
|
||||
}
|
||||
|
||||
@if (isShop)
|
||||
{
|
||||
<MudNavGroup Title="انبارداری" Expanded="false"
|
||||
Icon="@Icons.Material.Outlined.Inventory">
|
||||
|
||||
<MudNavLink Href="inveroty"
|
||||
Icon="@Icons.Material.Outlined.Inventory2">انبار</MudNavLink>
|
||||
|
||||
<MudNavLink Href="inventory/shipping"
|
||||
Icon="@Icons.Material.Outlined.AirportShuttle">روش های ارسال</MudNavLink>
|
||||
</MudNavGroup>
|
||||
}
|
||||
@if (isShop)
|
||||
{
|
||||
<MudNavGroup Title="باشگاه مشتریانـــ" Expanded="false"
|
||||
|
@ -70,23 +62,16 @@
|
|||
|
||||
<MudNavLink Href="customers"
|
||||
Icon="@Icons.Material.Outlined.PeopleAlt">مشترکین</MudNavLink>
|
||||
<MudNavLink Href="smspanel"
|
||||
Icon="@Icons.Material.Outlined.Sms">پنل پیامکی</MudNavLink>
|
||||
<MudNavLink Href="newsletler"
|
||||
Icon="@Icons.Material.Outlined.Newspaper">خبرنامه</MudNavLink>
|
||||
</MudNavGroup>
|
||||
}
|
||||
@if (isShop)
|
||||
{
|
||||
<MudNavGroup Title="شخصی سازی" Expanded="false" Icon="@Icons.Material.Outlined.PersonalInjury">
|
||||
<MudNavLink Href="personalization/nav" Icon="@Icons.Material.Filled.Navigation">فهرست ها</MudNavLink>
|
||||
</MudNavGroup>
|
||||
}
|
||||
@if (isShop)
|
||||
{
|
||||
<MudNavGroup Title="فروشگاه من" Expanded="false" Icon="@Icons.Material.Outlined.Settings">
|
||||
<MudNavLink Href="management/shop" Icon="@Icons.Material.Filled.Shop2">فروشگاه</MudNavLink>
|
||||
<MudNavLink Href="management/marketer" Icon="@Icons.Material.Filled.Person4">بازاریاب ها</MudNavLink>
|
||||
<MudNavLink Href="personalization/nav" Icon="@Icons.Material.Filled.MenuOpen">فهرست ها</MudNavLink>
|
||||
</MudNavGroup>
|
||||
}
|
||||
else
|
||||
|
@ -101,7 +86,7 @@
|
|||
<MudNavLink Href="setting/users" Icon="@Icons.Material.Filled.ManageAccounts">نقش ها و کاربران</MudNavLink>
|
||||
</MudNavGroup>
|
||||
</MudNavMenu>
|
||||
<p class="bottom-0 align-bottom mx-auto">Version : @version</p>
|
||||
<p class="bottom-0 mx-auto align-bottom">Version : @version</p>
|
||||
</MudStack>
|
||||
|
||||
@code
|
||||
|
@ -112,20 +97,27 @@
|
|||
{
|
||||
try
|
||||
{
|
||||
_permissions = await UserUtility.GetPermissionsAsync() ?? new List<string>();
|
||||
var token = await UserUtility.GetBearerTokenAsync();
|
||||
if (token == null)
|
||||
try
|
||||
{
|
||||
await UserUtility.LogoutAsync();
|
||||
NavigationManager.NavigateTo("login", true, true);
|
||||
return;
|
||||
}
|
||||
_permissions = await UserUtility.GetPermissionsAsync() ?? new List<string>();
|
||||
var token = await UserUtility.GetBearerTokenAsync();
|
||||
if (token == null)
|
||||
{
|
||||
await UserUtility.LogoutAsync();
|
||||
NavigationManager.NavigateTo("login", true, true);
|
||||
return;
|
||||
}
|
||||
|
||||
var rest = await RestWrapper.SettingRestApi.GetSettingAsync<NetinaSetting>(nameof(NetinaSetting), token);
|
||||
if (rest.WebSiteType == 0)
|
||||
isShop = true;
|
||||
else
|
||||
isShop = false;
|
||||
var rest = await RestWrapper.SettingRestApi.GetSettingAsync<NetinaSetting>(nameof(NetinaSetting), token);
|
||||
if (rest.WebSiteType == 0)
|
||||
isShop = true;
|
||||
else
|
||||
isShop = false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Snackbar.Add("در دریافت اطلاعات مشکلی رخ داده است", Severity.Error);
|
||||
}
|
||||
await base.OnInitializedAsync();
|
||||
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<MudStack Row="true">
|
||||
<MudText Typo="Typo.h6" class="my-auto">افزودن سریع محصول</MudText>
|
||||
<MudSpacer />
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Close" OnClick="()=>MudDialog.Close()"></MudIconButton>
|
||||
<MudIconButton Icon="@Icons.Material.Filled.Close" OnClick="()=>MudDialog.Close(DialogResult.Ok(true))"></MudIconButton>
|
||||
</MudStack>
|
||||
<MudAlert Dense="true" NoIcon="true" Variant="Variant.Outlined" ContentAlignment="HorizontalAlignment.Center" class="mb-4 mt-2" Severity="Severity.Warning">در این صفحه تنها اطلاعات اولیه ثبت میشوند و باید برای تکمیل اطلاعات محصول به صحفه اصلی تغییرات محصول بروید</MudAlert>
|
||||
<MudStack Row="true" class="no-scrollbar h-full w-full overflow-x-auto">
|
||||
|
@ -34,7 +34,11 @@
|
|||
<MudTextField Disabled="@ViewModel.FormEnable.Not()" @bind-Value="@ViewModel.PageDto.PersianName" Variant="Variant.Outlined" T="string" Label="نام فارسی کالا" />
|
||||
</MudItem>
|
||||
<MudItem xs="12" md="6">
|
||||
<MudAutocomplete Disabled="@ViewModel.FormEnable.Not()" Required="true" ToStringFunc="dto => dto.PersianName" @bind-Value="@ViewModel.SelectedBrand"
|
||||
<MudAutocomplete Disabled="@ViewModel.FormEnable.Not()"
|
||||
Required="true"
|
||||
ToStringFunc="dto => dto.PersianName"
|
||||
Strict="true"
|
||||
@bind-Value="@ViewModel.SelectedBrand"
|
||||
SearchFunc="ViewModel.SearchBrand"
|
||||
@bind-Text="@brandAutocompleteText"
|
||||
T="BrandSDto"
|
||||
|
@ -88,6 +92,52 @@
|
|||
<MudTextField Disabled="@ViewModel.FormEnable.Not()" @bind-Value="@ViewModel.PageDto.Cost" Format="N0" Variant="Variant.Outlined" T="double" Label="قیمت ( تومان )" />
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
<MudExpansionPanels>
|
||||
<MudExpansionPanel Text="ویژگی ها ( اختیاری )">
|
||||
<MudGrid>
|
||||
|
||||
|
||||
<MudItem xs="12" lg="6" md="6">
|
||||
<MudTextField @bind-Value="@ViewModel.SpecificationTitle" T="string" Label="عنوان" Variant="Variant.Outlined"></MudTextField>
|
||||
</MudItem>
|
||||
|
||||
<MudItem xs="12" lg="6" md="6">
|
||||
<MudStack Row="true">
|
||||
|
||||
<MudTextField @bind-Value="@ViewModel.SpecificationValue" T="string" Label="مقدار" Variant="Variant.Outlined"></MudTextField>
|
||||
|
||||
<MudButton Variant="Variant.Filled"
|
||||
Size="Size.Large"
|
||||
Color="Color.Info"
|
||||
class="mt-2 py-2"
|
||||
OnClick="ViewModel.AddSpecification"
|
||||
StartIcon="@Icons.Material.Outlined.Add">افزودن</MudButton>
|
||||
</MudStack>
|
||||
</MudItem>
|
||||
|
||||
<MudItem xs="12">
|
||||
<MudDataGrid Items="@ViewModel.Specifications" Elevation="0" Outlined="true" Bordered="true" Striped="true" Filterable="false" SortMode="@SortMode.None" Groupable="false">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Title" Title="عنوان" />
|
||||
<PropertyColumn Property="x => x.Value" Title="مقدار" />
|
||||
<TemplateColumn T="SpecificationSDto" CellClass="d-flex justify-end">
|
||||
<CellTemplate>
|
||||
<MudStack Row>
|
||||
<MudButton DisableElevation="true"
|
||||
Size="@Size.Small"
|
||||
Variant="@Variant.Filled"
|
||||
OnClick="()=>ViewModel.RemoveSpecification(context.Item)"
|
||||
Color="@Color.Error"
|
||||
StartIcon="@Icons.Material.Outlined.Delete">حذف</MudButton>
|
||||
</MudStack>
|
||||
</CellTemplate>
|
||||
</TemplateColumn>
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
</MudExpansionPanel>
|
||||
</MudExpansionPanels>
|
||||
<MudFileUpload T="IReadOnlyList<IBrowserFile>"
|
||||
AppendMultipleFiles
|
||||
OnFilesChanged="@ViewModel.OnInputFileChanged"
|
||||
|
@ -114,7 +164,7 @@
|
|||
</MudPaper>
|
||||
</ButtonTemplate>
|
||||
</MudFileUpload>
|
||||
|
||||
|
||||
<MudButton Disabled="@ViewModel.FormEnable.Not()" Color="Color.Success" StartIcon="@Icons.Material.Filled.Check" OnClick="@ViewModel.SubmitCreateProduct">ثبت محصول</MudButton>
|
||||
</MudStack>
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using Microsoft.AspNetCore.Components.Forms;
|
||||
using Netina.Common.Models.Api;
|
||||
using Netina.Domain.Entities.Brands;
|
||||
|
||||
namespace Netina.AdminPanel.PWA.Dialogs;
|
||||
|
@ -25,7 +24,7 @@ public class FastProductCreateDialogBoxViewModel(ISnackbar snackbar, IRestWrappe
|
|||
{
|
||||
var categories = await restWrapper.ProductCategoryRestApi.ReadAll(true);
|
||||
categories.ForEach(c => Categories.Add(c));
|
||||
PageDto.Stock = 1;
|
||||
PageDto.Stock = 10;
|
||||
await base.InitializeAsync();
|
||||
}
|
||||
|
||||
|
@ -83,18 +82,19 @@ public class FastProductCreateDialogBoxViewModel(ISnackbar snackbar, IRestWrappe
|
|||
{
|
||||
if (brandName.IsNullOrEmpty())
|
||||
return;
|
||||
var brand = new BrandSDto { PersianName = brandName };
|
||||
brands.Add(brand);
|
||||
SelectedBrand = brand;
|
||||
Task.Run(async () =>
|
||||
{
|
||||
var token = await userUtility.GetBearerTokenAsync();
|
||||
if (token == null)
|
||||
return;
|
||||
var brand = new BrandSDto { PersianName = brandName };
|
||||
brands.Add(brand);
|
||||
var command = brand.Adapt<CreateBrandCommand>() with {Files = new()};
|
||||
var command = brand.Adapt<CreateBrandCommand>() with { Files = new() };
|
||||
var response = await restWrapper.CrudApiRest<Brand, Guid>(Address.BrandController)
|
||||
.Create(command, token);
|
||||
brand.Id = response;
|
||||
SelectedBrand = brand;
|
||||
snackbar.Add($"افزودن برند {brand.PersianName} با موفقیت انجام شد");
|
||||
});
|
||||
}
|
||||
public void SubmitCreateProduct()
|
||||
|
@ -110,6 +110,7 @@ public class FastProductCreateDialogBoxViewModel(ISnackbar snackbar, IRestWrappe
|
|||
var product = PageDto.Clone();
|
||||
var brand = SelectedBrand.Clone();
|
||||
var browserFiles = Files.ToList();
|
||||
var specifications = Specifications.ToList();
|
||||
Task.Run(async () =>
|
||||
{
|
||||
var token = await userUtility.GetBearerTokenAsync();
|
||||
|
@ -136,19 +137,23 @@ public class FastProductCreateDialogBoxViewModel(ISnackbar snackbar, IRestWrappe
|
|||
FileType = StorageFileType.Image
|
||||
});
|
||||
}
|
||||
|
||||
product.Cost *= 10;
|
||||
var command = product.Adapt<CreateProductCommand>() with
|
||||
{
|
||||
BeDisplayed = true,
|
||||
BrandId = brand.Id,
|
||||
CategoryId = SelectedCategory.Id,
|
||||
Files = files
|
||||
Files = files,
|
||||
Specifications = specifications
|
||||
};
|
||||
await restWrapper.CrudApiRest<Product, Guid>(Address.ProductController)
|
||||
.Create(command, token);
|
||||
|
||||
|
||||
});
|
||||
PageDto = new ProductLDto{Stock = 1};
|
||||
PageDto = new ProductLDto { Stock = 1 };
|
||||
FileNames.Clear();
|
||||
//Specifications.Clear();
|
||||
Files.Clear();
|
||||
}
|
||||
catch (Exception e)
|
||||
|
@ -156,4 +161,35 @@ public class FastProductCreateDialogBoxViewModel(ISnackbar snackbar, IRestWrappe
|
|||
snackbar.Add(e.Message, Severity.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string SpecificationTitle = string.Empty;
|
||||
public string SpecificationValue = string.Empty;
|
||||
public readonly ObservableCollection<SpecificationSDto> Specifications = new ObservableCollection<SpecificationSDto>();
|
||||
|
||||
public void AddSpecification()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (SpecificationTitle.IsNullOrEmpty())
|
||||
throw new AppException("عنوان ویژگی مورد نظر را وارد کنید");
|
||||
if (SpecificationValue.IsNullOrEmpty())
|
||||
throw new AppException("مقدار ویژگی مورد نظر را وارد کنید");
|
||||
Specifications.Add(new SpecificationSDto { Title = SpecificationTitle.ToString(), Value = SpecificationValue.ToString() });
|
||||
|
||||
SpecificationTitle = string.Empty;
|
||||
SpecificationValue = string.Empty;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
snackbar.Add(e.Message, Severity.Error);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveSpecification(SpecificationSDto specification)
|
||||
{
|
||||
var spec = Specifications.FirstOrDefault(s => s.Value == specification.Value && s.Title == specification.Title);
|
||||
if (spec != null)
|
||||
Specifications.Remove(spec);
|
||||
}
|
||||
}
|
|
@ -5,8 +5,8 @@
|
|||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<ServiceWorkerAssetsManifest>service-worker-assets.js</ServiceWorkerAssetsManifest>
|
||||
<AssemblyVersion>1.0.3.3</AssemblyVersion>
|
||||
<FileVersion>1.0.3.3</FileVersion>
|
||||
<AssemblyVersion>1.1.8.11</AssemblyVersion>
|
||||
<FileVersion>1.1.8.11</FileVersion>
|
||||
<AssemblyName>$(MSBuildProjectName)</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
@inject IUserUtility UserUtility
|
||||
@inject IRestWrapper RestWrapper
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full p-8">
|
||||
<MudStack class="h-full w-full p-8">
|
||||
<MudGrid>
|
||||
<MudItem xs="12">
|
||||
<MudStack Row="true" class="mb-5">
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
@inject IConfiguration Configuration
|
||||
@inject IJSRuntime JsRuntime
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full p-8">
|
||||
<MudStack class="h-full w-full p-8">
|
||||
<MudGrid>
|
||||
<MudItem xs="12">
|
||||
<MudStack Row="true" class="mb-5">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
@inject IUserUtility UserUtility
|
||||
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full p-8">
|
||||
<MudStack class="h-full w-full p-8">
|
||||
<MudGrid>
|
||||
<MudItem xs="12">
|
||||
<MudStack Row="true" class="mb-5">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
background-color: var(--mud-palette-background-grey);
|
||||
}
|
||||
</style> *@
|
||||
<MudPaper class="bg-[--mud-palette-background-grey] h-screen w-full p-3 md:p-8">
|
||||
<MudStack class="h-full w-full p-3 md:p-8">
|
||||
<MudStack Row="true" class="overflow-x-auto pb-3">
|
||||
<MudStack Spacing="1" class="min-w-[340px]">
|
||||
<MudStack Row="true" class="mb-5">
|
||||
|
@ -105,7 +105,7 @@
|
|||
|
||||
|
||||
</MudStack>
|
||||
</MudPaper>
|
||||
</MudStack>
|
||||
|
||||
@code
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
@inject IUserUtility UserUtility
|
||||
@inject IRestWrapper RestWrapper
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full p-8">
|
||||
<MudStack class="h-full w-full p-8">
|
||||
<MudGrid>
|
||||
<MudItem xs="12">
|
||||
<MudStack Row="true" class="mb-5">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
@inject IUserUtility UserUtility
|
||||
@inject IRestWrapper RestWrapper
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full overflow-x-hidden px-0 md:p-5 lg:p-8">
|
||||
<MudStack class="h-full w-full overflow-x-hidden px-0 md:p-5 lg:p-8">
|
||||
<MudHidden Breakpoint="Breakpoint.Xs">
|
||||
<MudGrid>
|
||||
<MudItem xs="12" sm="4" lg="2">
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
@inject IUserUtility UserUtility
|
||||
@inject IRestWrapper RestWrapper
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full p-8">
|
||||
<MudStack class="h-full w-full p-8">
|
||||
<MudGrid>
|
||||
<MudItem xs="12">
|
||||
<MudPaper class="px-5 py-5">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
@inject IRestWrapper RestWrapper
|
||||
@inject IBrowserViewportService BrowserViewportService
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full overflow-x-hidden overflow-y-scroll md:p-5 lg:px-8">
|
||||
<MudStack class="h-full w-full overflow-x-hidden overflow-y-scroll md:p-5 lg:px-8">
|
||||
|
||||
<MudHidden Breakpoint="Breakpoint.Xs">
|
||||
<MudGrid>
|
||||
|
@ -108,7 +108,7 @@
|
|||
</MudItem>
|
||||
</MudGrid>
|
||||
</MudHidden>
|
||||
<MudPaper >
|
||||
<MudPaper>
|
||||
<MudDataGrid FixedFooter="true" FixedHeader="true" Striped="true"
|
||||
T="OrderSDto" Items="@ViewModel.MainOrders" CurrentPage="@ViewModel.MainGridCurrentPage"
|
||||
RowsPerPage="20" Filterable="false" Loading="@ViewModel.IsProcessing"
|
||||
|
@ -116,7 +116,7 @@
|
|||
|
||||
<ToolBarContent>
|
||||
<MudGrid class="collapse md:visible">
|
||||
<MudItem md="6">
|
||||
<MudItem md="5">
|
||||
<MudTextField T="string" Placeholder="جست جو بر اساس کد فاکتور" OnClearButtonClick="@ViewModel.SearchAsync"
|
||||
Adornment="Adornment.Start"
|
||||
Immediate="true"
|
||||
|
@ -127,12 +127,12 @@
|
|||
@bind-Value="@ViewModel.FactorCodeSearch"
|
||||
OnAdornmentClick="@ViewModel.SearchAsync"></MudTextField>
|
||||
</MudItem>
|
||||
<MudItem md="6">
|
||||
<MudItem md="5">
|
||||
<MudAutocomplete ToStringFunc="arg => arg.Title" ValueChanged="@ViewModel.SearchByOrderStatusAsync"
|
||||
Value="@ViewModel.OrderStatusSearch"
|
||||
SearchFunc="@ViewModel.OrderStatusSearchAsync"
|
||||
T="FilterOptionDto<OrderStatus>"
|
||||
class="-mt-0.5"
|
||||
class="my-auto"
|
||||
OnClearButtonClick="async () => await ViewModel.SearchByOrderStatusAsync(null)"
|
||||
Clearable="true"
|
||||
Label="وظعیت سفارش">
|
||||
|
@ -144,6 +144,9 @@
|
|||
</ItemTemplate>
|
||||
</MudAutocomplete>
|
||||
</MudItem>
|
||||
<MudItem md="2">
|
||||
<MudSwitch class="mt-4" T="bool" Value="@ViewModel.ShowOrderBags" ValueChanged="async (flag) => await ViewModel.ChangeShowOrderBagsAsync(flag) " Label="نمایش سبد خرید ها" Color="Color.Info" />
|
||||
</MudItem>
|
||||
</MudGrid>
|
||||
</ToolBarContent>
|
||||
<Columns>
|
||||
|
|
|
@ -85,10 +85,14 @@ public class OrdersPageViewModel : BaseViewModel<OrderDashboardDto>
|
|||
throw new Exception("Token is null");
|
||||
|
||||
|
||||
var dto = await _restWrapper.OrderRestApi.ReadAll(MainGridCurrentPage, FactorCodeSearch, null,
|
||||
OrderStatusSearch?.Value, null, token);
|
||||
var dto = await _restWrapper.OrderRestApi.ReadAll(MainGridCurrentPage, token,
|
||||
FactorCodeSearch,
|
||||
null,
|
||||
OrderStatusSearch?.Value,
|
||||
null,
|
||||
ShowOrderBags == false ? null : true);
|
||||
dto.ForEach(d => MainOrders.Add(d));
|
||||
if (MainOrders.Count == 15)
|
||||
if (MainOrders.Count % 15 == 0)
|
||||
MainGridPageCount = MainGridCurrentPage + 2;
|
||||
|
||||
}
|
||||
|
@ -128,6 +132,8 @@ public class OrdersPageViewModel : BaseViewModel<OrderDashboardDto>
|
|||
}
|
||||
|
||||
public string? FactorCodeSearch { get; set; } = null;
|
||||
public bool ShowOrderBags { get; set; } = false;
|
||||
|
||||
public async Task SearchAsync()
|
||||
{
|
||||
try
|
||||
|
@ -139,8 +145,12 @@ public class OrdersPageViewModel : BaseViewModel<OrderDashboardDto>
|
|||
MainOrders.Clear();
|
||||
List<OrderSDto> dto;
|
||||
|
||||
dto = await _restWrapper.OrderRestApi.ReadAll(MainGridCurrentPage, FactorCodeSearch, null,
|
||||
OrderStatusSearch?.Value, null, token);
|
||||
dto = await _restWrapper.OrderRestApi.ReadAll(MainGridCurrentPage, token,
|
||||
FactorCodeSearch,
|
||||
null,
|
||||
OrderStatusSearch?.Value,
|
||||
null,
|
||||
ShowOrderBags == false ? null : true);
|
||||
|
||||
dto.ForEach(d => MainOrders.Add(d));
|
||||
if (MainOrders.Count == 15)
|
||||
|
@ -187,10 +197,15 @@ public class OrdersPageViewModel : BaseViewModel<OrderDashboardDto>
|
|||
return OrderStatusFilterOptions;
|
||||
return OrderStatusFilterOptions.Where(o => o.Title == orderStatus).ToList();
|
||||
}
|
||||
|
||||
public async Task SearchByOrderStatusAsync(FilterOptionDto<OrderStatus>? arg)
|
||||
{
|
||||
OrderStatusSearch = arg;
|
||||
await SearchAsync();
|
||||
}
|
||||
|
||||
public async Task ChangeShowOrderBagsAsync(bool? arg)
|
||||
{
|
||||
ShowOrderBags = arg ?? false;
|
||||
await SearchAsync();
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
@inject IUserUtility UserUtility
|
||||
@inject IRestWrapper RestWrapper
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full p-8">
|
||||
<MudStack class="h-full w-full p-8">
|
||||
<MudGrid>
|
||||
<MudItem xs="12">
|
||||
<MudStack Row="true" class="mb-5">
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
@inject IRestWrapper RestWrapper
|
||||
@inject IBrowserViewportService BrowserViewportService
|
||||
|
||||
<MudStack class="no-scrollbar h-full w-full p-8">
|
||||
<MudStack class="h-full w-full p-8">
|
||||
<MudGrid>
|
||||
<MudItem xs="12">
|
||||
<MudStack Row="@ViewModel.IsXs.Not()" class="mb-5">
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
@page "/inventory/shipping"
|
||||
@page "/product/shipping"
|
||||
@attribute [Microsoft.AspNetCore.Authorization.Authorize]
|
||||
|
||||
@inject IDialogService DialogService
|
||||
|
|
|
@ -3,11 +3,13 @@
|
|||
public interface IOrderRestApi
|
||||
{
|
||||
[Get("")]
|
||||
Task<List<OrderSDto>> ReadAll([Query]int page, [Query] string? factorCode, [Query] long? selectedDate, [Query] OrderStatus? orderStatus, [Query] OrderQueryDateFilter? dateFilter, [Header("Authorization")] string authorization);
|
||||
|
||||
|
||||
[Get("")]
|
||||
Task<List<OrderSDto>> ReadAll([Query] int page, [Header("Authorization")] string authorization);
|
||||
Task<List<OrderSDto>> ReadAll([Query]int page,
|
||||
[Header("Authorization")] string authorization,
|
||||
[Query] string? factorCode = null,
|
||||
[Query] long? selectedDate = null,
|
||||
[Query] OrderStatus? orderStatus = null,
|
||||
[Query] OrderQueryDateFilter? dateFilter = null,
|
||||
[Query] bool? orderBags = null);
|
||||
|
||||
[Get("/{id}")]
|
||||
Task<OrderLDto> ReadOne(Guid id, [Header("Authorization")] string authorization);
|
||||
|
@ -16,7 +18,4 @@ public interface IOrderRestApi
|
|||
Task<bool> ConfirmOrderStepAsync(Guid id,[Query] OrderStatus nextOrderStatus, [Header("Authorization")] string authorization);
|
||||
[Post("/{id}/confirm")]
|
||||
Task<bool> ConfirmOrderStepAsync(Guid id, [Query] OrderStatus nextOrderStatus, [Query]string trackingCode, [Header("Authorization")] string authorization);
|
||||
|
||||
[Get("/{id}/invoice")]
|
||||
Task<HttpContent> GetOrderInvoice(Guid id, [Header("Authorization")] string authorization);
|
||||
}
|
|
@ -91,9 +91,9 @@
|
|||
--color-primary: rgba(9, 16, 68, 1);
|
||||
--color-secondary: rgba(229, 159, 46, 1);
|
||||
--color-background: rgba(243, 244, 246, 1);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.revert-tailwind {
|
||||
all: initial;
|
||||
}
|
||||
|
@ -113,6 +113,16 @@
|
|||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
|
||||
|
||||
|
||||
.auto-scrollbar {
|
||||
-ms-overflow-style: auto; /* IE and Edge */
|
||||
scrollbar-width: auto; /* Firefox */
|
||||
}
|
||||
.auto-scrollbar::-webkit-scrollbar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mud-dialog-title {
|
||||
font-family: iranyekan !important;
|
||||
}
|
||||
|
@ -132,7 +142,7 @@ a, .btn-link {
|
|||
}
|
||||
|
||||
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
|
|
@ -864,7 +864,6 @@ input:checked + .toggle-bg {
|
|||
--color-primary: rgba(9, 16, 68, 1);
|
||||
--color-secondary: rgba(229, 159, 46, 1);
|
||||
--color-background: rgba(243, 244, 246, 1);
|
||||
|
||||
}
|
||||
|
||||
*, ::before, ::after {
|
||||
|
@ -1956,6 +1955,7 @@ input:checked + .toggle-bg {
|
|||
url('../assets/fonts/woff/iranyekanwebextrablackfanum.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
|
||||
url('../assets/fonts/ttf/iranyekanwebextrablackfanum.ttf') format('truetype');
|
||||
}
|
||||
|
||||
.revert-tailwind {
|
||||
all: initial;
|
||||
}
|
||||
|
@ -1975,6 +1975,16 @@ input:checked + .toggle-bg {
|
|||
scrollbar-width: none; /* Firefox */
|
||||
}
|
||||
|
||||
|
||||
|
||||
.auto-scrollbar {
|
||||
-ms-overflow-style: auto; /* IE and Edge */
|
||||
scrollbar-width: auto; /* Firefox */
|
||||
}
|
||||
.auto-scrollbar::-webkit-scrollbar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mud-dialog-title {
|
||||
font-family: iranyekan !important;
|
||||
}
|
||||
|
@ -1994,7 +2004,7 @@ a, .btn-link {
|
|||
}
|
||||
|
||||
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
|
||||
}
|
||||
|
||||
.content {
|
||||
|
|
|
@ -2323,6 +2323,17 @@ input:checked + .toggle-bg {
|
|||
/* Firefox */
|
||||
}
|
||||
|
||||
.auto-scrollbar {
|
||||
-ms-overflow-style: auto;
|
||||
/* IE and Edge */
|
||||
scrollbar-width: auto;
|
||||
/* Firefox */
|
||||
}
|
||||
|
||||
.auto-scrollbar::-webkit-scrollbar {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.mud-dialog-title {
|
||||
font-family: iranyekan !important;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
@ -32,8 +32,8 @@
|
|||
<h1 class="text-5xl"><b>پنـــــل ادمین فروشگاه</b></h1>
|
||||
<div class="my-10" style="display:flex; gap:10px; justify-content:center; align-items:center">
|
||||
<div class="relative">
|
||||
<div class="h-24 w-24 rounded-full border-t-8 border-b-8 border-gray-200"></div>
|
||||
<div class="absolute top-0 left-0 h-24 w-24 rounded-full border-t-8 border-b-8 border-indigo-500 animate-spin">
|
||||
<div class="border-t-8 border-b-8 h-24 w-24 rounded-full border-gray-200"></div>
|
||||
<div class="border-t-8 border-b-8 absolute left-0 top-0 h-24 w-24 animate-spin rounded-full border-indigo-500">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -43,10 +43,10 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div id="blazor-error-ui">
|
||||
An unhandled error has occurred.
|
||||
<a href="" class="reload">Reload</a>
|
||||
<a class="dismiss">🗙</a>
|
||||
<div dir="rtl" id="blazor-error-ui" class="!text-black">
|
||||
<b>مشکلی رخ داده است</b>
|
||||
<a href="" class="reload">بارگزاری مجدد</a>
|
||||
<a class="dismiss">بستن</a>
|
||||
</div>
|
||||
<script src="_framework/blazor.webassembly.js"></script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue