.Net10, VS2026; StockTaking in progress...
This commit is contained in:
parent
7e4d0a85e8
commit
e13e32dc57
|
|
@ -10,11 +10,11 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="9.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.11" />
|
||||
<!--<PackageReference Include="Microsoft.AspNetCore.SignalR.Core" Version="1.2.0" />-->
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.11" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
@ -39,7 +39,7 @@
|
|||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Core">
|
||||
<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.10\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>
|
||||
<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.11\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
using FruitBank.Common.Interfaces;
|
||||
|
||||
namespace FruitBank.Common.Server.Interfaces;
|
||||
|
||||
public interface IStockSignalREndpointServer : IStockSignalREndpointCommon
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -29,11 +29,12 @@ namespace FruitBank.Common.Server.Services.SignalRs;
|
|||
public class DevAdminSignalRHub : AcWebSignalRHubWithSessionBase<SignalRTags, Logger<DevAdminSignalRHub>>
|
||||
{
|
||||
public DevAdminSignalRHub(IConfiguration configuration, IFruitBankDataControllerServer fruitBankDataController/*, SessionService sessionService*/,
|
||||
ICustomOrderSignalREndpointServer customOrderSignalREndpoint, IEnumerable<IAcLogWriterBase> logWriters)
|
||||
ICustomOrderSignalREndpointServer customOrderSignalREndpoint, IStockSignalREndpointServer stockSignalREndpointServer, IEnumerable<IAcLogWriterBase> logWriters)
|
||||
: base(configuration, new Logger<DevAdminSignalRHub>(logWriters.ToArray()))
|
||||
{
|
||||
DynamicMethodCallModels.Add(new AcDynamicMethodCallModel<SignalRAttribute>(fruitBankDataController));
|
||||
DynamicMethodCallModels.Add(new AcDynamicMethodCallModel<SignalRAttribute>(customOrderSignalREndpoint));
|
||||
DynamicMethodCallModels.Add(new AcDynamicMethodCallModel<SignalRAttribute>(stockSignalREndpointServer));
|
||||
}
|
||||
|
||||
protected override void LogContextUserNameAndId()
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
using LinqToDB.Mapping;
|
||||
using Mango.Nop.Core.Entities;
|
||||
|
||||
namespace FruitBank.Common.Entities;
|
||||
|
||||
[Table(Name = FruitBankConstClient.StockTakingDbTableName)]
|
||||
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.StockTakingDbTableName)]
|
||||
public class StockTaking : MgStockTaking<StockTakingItem>
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
using FruitBank.Common.Dtos;
|
||||
using LinqToDB;
|
||||
using LinqToDB.Mapping;
|
||||
using Mango.Nop.Core.Entities;
|
||||
|
||||
namespace FruitBank.Common.Entities;
|
||||
|
||||
[Table(Name = FruitBankConstClient.StockTakingItemDbTableName)]
|
||||
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.StockTakingItemDbTableName)]
|
||||
public class StockTakingItem : MgStockTakingItem<StockTaking, ProductDto>
|
||||
{
|
||||
[Column(DataType = DataType.DecFloat, CanBeNull = false)]
|
||||
public double OriginalNetWeight { get; set; }
|
||||
|
||||
[Column(DataType = DataType.DecFloat, CanBeNull = false)]
|
||||
public double MeasuredNetWeight { get; set; }
|
||||
|
||||
[Association(ThisKey = nameof(Id), OtherKey = nameof(StockTakingItemPallet.StockTakingItemId), CanBeNull = true)]
|
||||
public List<StockTakingItemPallet>? StockTakingItemPallets { get; set; }
|
||||
|
||||
public bool IsRequiredForMeasuring => OriginalStockQuantity != 0 || OriginalNetWeight != 0;
|
||||
|
||||
public string DisplayText
|
||||
{
|
||||
get
|
||||
{
|
||||
if (IsMeasured) return $"[KÉSZ] {Product!.Name}";
|
||||
|
||||
return IsRequiredForMeasuring ? $"[KÖT] {Product!.Name}" : $"{Product!.Name}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
using FruitBank.Common.Dtos;
|
||||
using FruitBank.Common.Interfaces;
|
||||
using LinqToDB.Mapping;
|
||||
using Mango.Nop.Core.Entities;
|
||||
|
||||
namespace FruitBank.Common.Entities;
|
||||
|
||||
public interface IStockTakingItemPallet : IMeasuringItemPalletBase
|
||||
{
|
||||
int StockTakingItemId { get; set; }
|
||||
public StockTakingItem? StockTakingItem{ get; set; }
|
||||
}
|
||||
|
||||
[Table(Name = FruitBankConstClient.StockTakingItemPalletDbTableName)]
|
||||
[System.ComponentModel.DataAnnotations.Schema.Table(FruitBankConstClient.StockTakingItemPalletDbTableName)]
|
||||
public class StockTakingItemPallet : MeasuringItemPalletBase, IStockTakingItemPallet
|
||||
{
|
||||
public int StockTakingItemId
|
||||
{
|
||||
get => ForeignItemId;
|
||||
set => ForeignItemId = value;
|
||||
}
|
||||
|
||||
[Association(ThisKey = nameof(StockTakingItemId), OtherKey = nameof(StockTakingItem.Id), CanBeNull = true)]
|
||||
public StockTakingItem? StockTakingItem { get; set; }
|
||||
|
||||
public override double CalculateNetWeight() => base.CalculateNetWeight();
|
||||
|
||||
public override bool IsValidSafeMeasuringValues()
|
||||
{
|
||||
return StockTakingItemId > 0 && base.IsValidSafeMeasuringValues();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// "Szigorúbb" mint az IsValidSafeMeasuringValues()
|
||||
/// </summary>
|
||||
/// <param name="isMeasurable"></param>
|
||||
/// <returns></returns>
|
||||
public override bool IsValidMeasuringValues(bool isMeasurable)
|
||||
{
|
||||
return StockTakingItemId > 0 && base.IsValidMeasuringValues(isMeasurable);
|
||||
}
|
||||
}
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
<PackageReference Include="linq2db.EntityFrameworkCore" Version="9.0.0" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.11" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,11 @@ public static class FruitBankConstClient
|
|||
|
||||
public const string StockQuantityHistoryExtDbTableName = "fbStockQuantityHistoryExt";
|
||||
|
||||
public const string StockTakingDbTableName = "fbStockTaking";
|
||||
public const string StockTakingItemDbTableName = "fbStockTakingItem";
|
||||
public const string StockTakingItemPalletDbTableName = "fbStockTakingItemPallet";
|
||||
|
||||
|
||||
|
||||
//public static Guid[] DevAdminIds = new Guid[2] { Guid.Parse("dcf451d2-cc4c-4ac2-8c1f-da00041be1fd"), Guid.Parse("4cbaed43-2465-4d99-84f1-c8bc6b7025f7") };
|
||||
//public static Guid[] SysAdmins = new Guid[3]
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using FruitBank.Common.Entities;
|
||||
using FruitBank.Common.Models;
|
||||
using Mango.Nop.Core.Dtos;
|
||||
using Mango.Nop.Core.Entities;
|
||||
using Mango.Nop.Core.Models;
|
||||
using Nop.Core.Domain.Customers;
|
||||
|
||||
|
|
@ -72,4 +73,11 @@ public interface IFruitBankDataControllerCommon
|
|||
|
||||
Task<MgLoginModelResponse?> LoginMeasuringUser(MgLoginModelRequest loginModelRequest);
|
||||
Task<List<Partner>?> ProcessAndSaveFullShippingJson(string fullShippingJson, int customerId);
|
||||
|
||||
public Task<List<GenericAttributeDto>?> GetGenericAttributeDtosByEntityIdAndKeyGroup(int productId, string keyGroup, int storeId);
|
||||
|
||||
public Task<GenericAttributeDto?> AddGenericAttributeDto(GenericAttributeDto genericAttributeDto);
|
||||
|
||||
public Task<GenericAttributeDto?> UpdateGenericAttributeDto(GenericAttributeDto genericAttributeDto);
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IStockSignalREndpointClient : IStockSignalREndpointCommon
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
using FruitBank.Common.Entities;
|
||||
using Mango.Nop.Core.Entities;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public interface IStockSignalREndpointCommon
|
||||
{
|
||||
public Task<List<StockTaking>?> GetStockTakings();
|
||||
public Task<List<StockTaking>?> GetStockTakingsByProductId(int productId);
|
||||
public Task<StockTaking?> AddStockTaking(StockTaking stockTaking);
|
||||
public Task<StockTaking?> UpdateStockTaking(StockTaking stockTaking);
|
||||
|
||||
public Task<List<StockTakingItem>?> GetStockTakingItems();
|
||||
public Task<StockTakingItem?> GetStockTakingItemsById(int stockTakingItemId);
|
||||
public Task<List<StockTakingItem>?> GetStockTakingItemsByProductId(int productId);
|
||||
public Task<List<StockTakingItem>?> GetStockTakingItemsByStockTakingId(int stockTakingId);
|
||||
public Task<StockTakingItem?> AddStockTakingItem(StockTakingItem stockTakingItem);
|
||||
public Task<StockTakingItem?> UpdateStockTakingItem(StockTakingItem stockTakingItem);
|
||||
|
||||
public Task<List<StockTakingItemPallet>?> GetStockTakingItemPallets();
|
||||
public Task<List<StockTakingItemPallet>?> GetStockTakingItemPalletsByProductId(int productId);
|
||||
public Task<StockTakingItemPallet?> AddStockTakingItemPallet(StockTakingItemPallet stockTakingItemPallet);
|
||||
public Task<StockTakingItemPallet?> UpdateStockTakingItemPallet(StockTakingItemPallet stockTakingItemPallet);
|
||||
}
|
||||
|
|
@ -90,6 +90,11 @@ public class SignalRTags : AcSignalRTags
|
|||
public const int AddGenericAttributeDto = 168;
|
||||
public const int UpdateGenericAttributeDto = 169;
|
||||
|
||||
public const int GetStockTakings = 170;
|
||||
public const int GetStockTakingItems = 173;
|
||||
public const int GetStockTakingItemsById = 174;
|
||||
public const int AddStockTaking = 175;
|
||||
|
||||
public const int AuthenticateUser = 195;
|
||||
public const int RefreshToken = 200;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,15 +1,18 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
</ItemGroup>
|
||||
<RunAOTCompilation>true</RunAOTCompilation>
|
||||
<WasmStripILAfterAOT>true</WasmStripILAfterAOT>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -1,69 +1,71 @@
|
|||
<Project Sdk="MSTest.Sdk/3.6.4">
|
||||
<Project Sdk="MSTest.Sdk/4.0.2">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<!--
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseVSTest>false</UseVSTest>
|
||||
|
||||
<!--
|
||||
Displays error on console in addition to the log file. Note that this feature comes with a performance impact.
|
||||
For more information, visit https://learn.microsoft.com/dotnet/core/testing/unit-testing-platform-integration-dotnet-test#show-failure-per-test
|
||||
-->
|
||||
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
|
||||
</PropertyGroup>
|
||||
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared.Common\FruitBankHybrid.Shared.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared.Common\FruitBankHybrid.Shared.Common.csproj" />
|
||||
<ProjectReference Include="..\FruitBankHybrid.Shared\FruitBankHybrid.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Utils">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Services">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Services\bin\FruitBank\Debug\net9.0\Mango.Nop.Services.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Utils">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Services">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Services\bin\FruitBank\Debug\net9.0\Mango.Nop.Services.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="18.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="2.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="2.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Update="MSTest.Analyzers" Version="4.0.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="MSTest.Analyzers" Version="4.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Update="MSTest.TestAdapter" Version="4.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="MSTest.TestAdapter" Version="4.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Update="MSTest.TestFramework" Version="4.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Update="MSTest.TestFramework" Version="4.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,39 @@ public sealed class OrderClientTests
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetAllStockTakings()
|
||||
{
|
||||
var stockTakings = await _signalRClient.GetStockTakings();
|
||||
|
||||
Assert.IsNotNull(stockTakings);
|
||||
Assert.IsTrue(stockTakings.Count != 0);
|
||||
|
||||
Assert.IsTrue(stockTakings.All(o => o.StockTakingItems.All(oi => oi.Product != null && oi.Product.Id == oi.ProductId)));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetAllStockTakingItems()
|
||||
{
|
||||
var stockTakingItems = await _signalRClient.GetStockTakingItems();
|
||||
|
||||
Assert.IsNotNull(stockTakingItems);
|
||||
Assert.IsTrue(stockTakingItems.Count != 0);
|
||||
|
||||
Assert.IsTrue(stockTakingItems.All(oi => oi.StockTaking != null && oi.Product != null && oi.Product.Id == oi.ProductId));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetAllStockTakingItemById()
|
||||
{
|
||||
var stockTakingItem = await _signalRClient.GetStockTakingItemsById(100);
|
||||
|
||||
Assert.IsNotNull(stockTakingItem);
|
||||
Assert.IsNotNull(stockTakingItem.Product);
|
||||
Assert.IsNotNull(stockTakingItem.StockTaking);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public async Task GetAllOrderDtos()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
{
|
||||
LoadingPanelVisibility.Visible = true;
|
||||
|
||||
using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
//using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
{
|
||||
if (ProductDtos == null || !ProductDtos.Any() || forceReload) ProductDtos = await Database.ProductDtoTable.LoadDataAsync(!forceReload);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,9 +34,18 @@
|
|||
{
|
||||
var productDto = ((ProductDto)(context.DataItem));
|
||||
var productId = productDto.Id;
|
||||
|
||||
|
||||
|
||||
<DxTabs ActiveTabIndexChanged="(i) => OnActiveTabChanged(i, productId)">
|
||||
<DxTabPage Text="Készlet mennyiség változások">
|
||||
@{
|
||||
//GetOrderItemDtosFromDbAsync(productId).Forget();
|
||||
//var orderItemDtos = _orderItemDtos?.Where(oi => oi.ProductId == productId).ToList() ?? [];
|
||||
|
||||
var contextIds = new[] { (object)productDto.Id };
|
||||
<GridStockQuantityHistoryDtoTemplate ContextIds="@(contextIds)" ParentDataItem="@productDto" />
|
||||
}
|
||||
</DxTabPage>
|
||||
<DxTabPage Text="Rendelések melyben megtalálható" Visible="@LoggedInModel.IsDeveloper">
|
||||
@{
|
||||
//GetOrderDtosFromDbAsync(productId).Forget();
|
||||
|
|
@ -51,15 +60,6 @@
|
|||
<GridDetailOrderItemDto OrderItemDtos="_currentOrderItemDtos" IsMasterGrid="false" />
|
||||
}
|
||||
</DxTabPage>
|
||||
<DxTabPage Text="Készlet mennyiség változások">
|
||||
@{
|
||||
//GetOrderItemDtosFromDbAsync(productId).Forget();
|
||||
//var orderItemDtos = _orderItemDtos?.Where(oi => oi.ProductId == productId).ToList() ?? [];
|
||||
|
||||
var contextIds = new[] { (object)productDto.Id };
|
||||
<GridStockQuantityHistoryDtoTemplate ContextIds="@(contextIds)" ParentDataItem="@productDto" />
|
||||
}
|
||||
</DxTabPage>
|
||||
<DxTabPage Text="Speciális jellemzők" Visible="@LoggedInModel.IsDeveloper">
|
||||
@{
|
||||
var genericAttributeDtos = new AcObservableCollection<GenericAttributeDto>(productDto.GenericAttributes);
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<FruitBankToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)"/>
|
||||
<FruitBankToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridProductDto>
|
||||
|
|
@ -124,7 +124,7 @@
|
|||
if (!IsMasterGrid) return;
|
||||
|
||||
LoadingPanelVisibility.Visible = true;
|
||||
using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
//using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
{
|
||||
if (ProductDtos == null || !ProductDtos.Any() || forceReload) ProductDtos = await Database.ProductDtoTable.LoadDataAsync(!forceReload);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,10 +15,10 @@
|
|||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject FruitBankSignalRClient FruitBankSignalRClient
|
||||
|
||||
<GridShippingItemBase @ref="Grid" ParentDataItem="ParentDataItem" DataSource="ShippingItems" AutoSaveLayoutName="GridShippingItem"
|
||||
SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false"
|
||||
FocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<GridShippingItemBase @ref="Grid" ParentDataItem="ParentDataItem" DataSource="ShippingItems" AutoSaveLayoutName="GridShippingItem"
|
||||
SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false" CustomizeElement="Grid_CustomizeElement"
|
||||
FocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" Caption="oiId" Width="125" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="ShippingDocumentId" Caption="ShippingDocument"
|
||||
|
|
@ -75,9 +75,9 @@
|
|||
<DxGridDataColumn FieldName="GrossWeightOnDocument" Caption="Br.súly(OnDoc)" />
|
||||
<DxGridDataColumn FieldName="MeasuringCount" Caption="Mérések száma" />
|
||||
|
||||
<DxGridDataColumn FieldName="MeasuredQuantity" Caption="Mért mennyiség" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredNetWeight" Caption="Mért net.súly(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredGrossWeight" Caption="Mért br.súly(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredQuantity" Name="MeasuredQuantity" Caption="Mért mennyiség" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredNetWeight" Name="MeasuredNetWeight" Caption="Mért net.súly(kg)" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="MeasuredGrossWeight" Name="MeasuredGrossWeight" Caption="Mért br.súly(kg)" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="IsMeasurable" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="IsMeasured" ReadOnly="true" />
|
||||
|
|
@ -159,7 +159,7 @@
|
|||
|
||||
public async Task ReloadDataFromDb(bool forceReload = false)
|
||||
{
|
||||
using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
//using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
{
|
||||
if (ProductDtos == null || !ProductDtos.Any() || forceReload) ProductDtos = await Database.ProductDtoTable.LoadDataAsync(!forceReload);
|
||||
}
|
||||
|
|
@ -190,11 +190,60 @@
|
|||
if (forceReload) Grid.Reload();
|
||||
}
|
||||
|
||||
void Grid_CustomizeElement(GridCustomizeElementEventArgs e)
|
||||
{
|
||||
if (e.ElementType != GridElementType.DataCell) return;
|
||||
|
||||
if (e.Column.Name != nameof(ShippingItem.MeasuredNetWeight) &&
|
||||
e.Column.Name != nameof(ShippingItem.MeasuredGrossWeight) &&
|
||||
e.Column.Name != nameof(ShippingItem.MeasuredQuantity)) return;
|
||||
|
||||
var isMeasured = (bool)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.IsMeasured));
|
||||
if (!isMeasured) return;
|
||||
|
||||
switch (e.Column.Name)
|
||||
{
|
||||
case nameof(ShippingItem.MeasuredNetWeight) or nameof(ShippingItem.MeasuredGrossWeight):
|
||||
{
|
||||
var isMeasurable = (bool)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.IsMeasurable));
|
||||
if (!isMeasurable) return;
|
||||
|
||||
var valueOnDocument = 0d;
|
||||
var measuredValue = 0d;
|
||||
|
||||
if (e.Column.Name == nameof(ShippingItem.MeasuredGrossWeight))
|
||||
{
|
||||
valueOnDocument = (double)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.GrossWeightOnDocument));
|
||||
measuredValue = (double)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.MeasuredGrossWeight));
|
||||
}
|
||||
else
|
||||
{
|
||||
valueOnDocument = (double)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.NetWeightOnDocument));
|
||||
measuredValue = (double)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.MeasuredNetWeight));
|
||||
}
|
||||
|
||||
if (valueOnDocument > 0 && valueOnDocument > measuredValue) e.CssClass = "text-danger";
|
||||
//else if (valueOnDocument <= measuredValue) e.CssClass = "text-success";
|
||||
|
||||
break;
|
||||
}
|
||||
case nameof(ShippingItem.MeasuredQuantity):
|
||||
{
|
||||
var quantityOnDocument = (int)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.QuantityOnDocument));
|
||||
var measuredQuantity = (int)e.Grid.GetRowValue(e.VisibleIndex, nameof(ShippingItem.MeasuredQuantity));
|
||||
|
||||
if (quantityOnDocument > 0 && quantityOnDocument > measuredQuantity) e.CssClass = "text-danger";
|
||||
//else if (quantityOnDocument <= measuredQuantity) e.CssClass = "text-success";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async Task Grid_FocusedRowChanged(GridFocusedRowChangedEventArgs args)
|
||||
{
|
||||
if ((args.Grid.IsEditing() || args.Grid.IsEditingNewRow()) && (args.DataItem as IId<int>).Id > 0)
|
||||
await args.Grid.SaveChangesAsync();
|
||||
|
||||
|
||||
FocusedRowVisibleIndex = args.VisibleIndex;
|
||||
EditItemsEnabled = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,18 @@
|
|||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" Width="125" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="ProductId" Width="125" ReadOnly="true" Visible="false" />
|
||||
<DxGridDataColumn FieldName="ProductId" ReadOnly="true" Visible="@IsMasterGrid">
|
||||
<EditSettings>
|
||||
<DxComboBoxSettings Data="ProductDtos"
|
||||
ValueFieldName="Id"
|
||||
TextFieldName="Name"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
ListRenderMode="ListRenderMode.Entire"
|
||||
SearchMode="ListSearchMode.AutoSearch"
|
||||
SearchFilterCondition="ListSearchFilterCondition.Contains"
|
||||
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto" />
|
||||
</EditSettings>
|
||||
</DxGridDataColumn>
|
||||
<DxGridDataColumn FieldName="QuantityAdjustment" Width="135" Caption="Adj. Quantity" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="StockQuantity" Width="135" ReadOnly="true" />
|
||||
|
||||
|
|
@ -77,7 +88,7 @@
|
|||
{
|
||||
if (!IsMasterGrid) return;
|
||||
|
||||
using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
//using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
{
|
||||
if (ProductDtos == null || !ProductDtos.Any() || forceReload) ProductDtos = await Database.ProductDtoTable.LoadDataAsync(!forceReload);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,11 @@ public class GridShippingItemBase : FruitBankGridBase<ShippingItem>, IGrid
|
|||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
//protected override Task OnCustomizeEditModel(GridCustomizeEditModelEventArgs e)
|
||||
//{
|
||||
// return base.OnCustomizeEditModel(e);
|
||||
//}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,89 @@
|
|||
@using System.Collections.ObjectModel
|
||||
@using AyCode.Core.Helpers
|
||||
@using AyCode.Core.Loggers
|
||||
@using AyCode.Utils.Extensions
|
||||
@using FruitBank.Common.Dtos
|
||||
@using FruitBank.Common.Entities
|
||||
@using FruitBankHybrid.Shared.Components.Grids.Shippings
|
||||
@using FruitBankHybrid.Shared.Components.Toolbars
|
||||
@using FruitBankHybrid.Shared.Databases
|
||||
@using FruitBankHybrid.Shared.Services.Loggers
|
||||
@using FruitBankHybrid.Shared.Services.SignalRs
|
||||
|
||||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject FruitBankSignalRClient FruitBankSignalRClient
|
||||
|
||||
<GridStockTakingItemBase @ref="Grid" AutoSaveLayoutName="GridStockTakingItem" SignalRClient="FruitBankSignalRClient" Logger="_logger"
|
||||
CssClass="@GridCss" ValidationEnabled="false"
|
||||
FocusedRowChanged="Grid_FocusedRowChanged">
|
||||
<Columns>
|
||||
<DxGridDataColumn FieldName="Id" SortIndex="0" SortOrder="GridColumnSortOrder.Descending" ReadOnly="true" />
|
||||
|
||||
<DxGridDataColumn FieldName="StockTaking.StartDateTime" />
|
||||
<DxGridDataColumn FieldName="Product.Name" />
|
||||
<DxGridDataColumn FieldName="IsMeasured" />
|
||||
<DxGridDataColumn FieldName="OriginalStockQuantity" />
|
||||
<DxGridDataColumn FieldName="MeasuredStockQuantity" />
|
||||
<DxGridDataColumn FieldName="OriginalNetWeight" />
|
||||
<DxGridDataColumn FieldName="MeasuredNetWeight" />
|
||||
|
||||
<DxGridDataColumn FieldName="Created" ReadOnly="true" />
|
||||
<DxGridDataColumn FieldName="Modified" ReadOnly="true" />
|
||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||
</Columns>
|
||||
<ToolbarTemplate>
|
||||
@if (IsMasterGrid)
|
||||
{
|
||||
<FruitBankToolbarTemplate Grid="Grid" OnReloadDataClick="() => ReloadDataFromDb(true)" />
|
||||
}
|
||||
</ToolbarTemplate>
|
||||
</GridStockTakingItemBase>
|
||||
|
||||
@code {
|
||||
//[Inject] public required ObjectLock ObjectLock { get; set; }
|
||||
[Inject] public required DatabaseClient Database { get; set; }
|
||||
|
||||
[Parameter] public bool IsMasterGrid { get; set; } = false;
|
||||
[Parameter] public AcObservableCollection<Partner>? Partners { get; set; }
|
||||
[Parameter] public AcObservableCollection<Shipping>? Shippings { get; set; }
|
||||
|
||||
const string ExportFileName = "ExportResult";
|
||||
string GridSearchText = "";
|
||||
bool EditItemsEnabled { get; set; }
|
||||
int FocusedRowVisibleIndex { get; set; }
|
||||
public GridStockTakingItemBase Grid { get; set; }
|
||||
string GridCss => !IsMasterGrid ? "hide-toolbar" : string.Empty;
|
||||
|
||||
private int _activeTabIndex;
|
||||
private LoggerClient<GridStockTakingItem> _logger;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
_logger = new LoggerClient<GridStockTakingItem>(LogWriters.ToArray());
|
||||
await ReloadDataFromDb(false);
|
||||
}
|
||||
|
||||
private async Task ReloadDataFromDb(bool forceReload = false)
|
||||
{
|
||||
if (!IsMasterGrid) return;
|
||||
|
||||
if (Grid == null) return;
|
||||
|
||||
//using (await ObjectLock.GetSemaphore<StockTakingItem>().UseWaitAsync())
|
||||
//if (forceReload) await Grid.ReloadDataSourceAsync();
|
||||
|
||||
if (forceReload) Grid.Reload();
|
||||
}
|
||||
|
||||
async Task Grid_FocusedRowChanged(GridFocusedRowChangedEventArgs args)
|
||||
{
|
||||
if (Grid == null) return;
|
||||
|
||||
if (Grid.IsEditing() && !Grid.IsEditingNewRow())
|
||||
await Grid.SaveChangesAsync();
|
||||
|
||||
FocusedRowVisibleIndex = args.VisibleIndex;
|
||||
EditItemsEnabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using AyCode.Core.Interfaces;
|
||||
using DevExpress.Blazor;
|
||||
using FruitBank.Common.Entities;
|
||||
using FruitBank.Common.Interfaces;
|
||||
using FruitBank.Common.SignalRs;
|
||||
using FruitBankHybrid.Shared.Pages;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Components.Grids.StockTakingItems;
|
||||
|
||||
public class GridStockTakingItemBase: FruitBankGridBase<StockTakingItem>, IGrid
|
||||
{
|
||||
private bool _isFirstInitializeParameterCore;
|
||||
private bool _isFirstInitializeParameters;
|
||||
|
||||
public GridStockTakingItemBase() : base()
|
||||
{
|
||||
GetAllMessageTag = SignalRTags.GetStockTakingItems;
|
||||
//AddMessageTag = SignalRTags.AddPartner;
|
||||
//UpdateMessageTag = SignalRTags.UpdatePartner;
|
||||
|
||||
//RemoveMessageTag = SignalRTags.;
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
base.OnParametersSet();
|
||||
|
||||
if (!_isFirstInitializeParameters)
|
||||
{
|
||||
//if (!IsMasterGrid && (ContextIds == null || ContextIds.Length == 0))
|
||||
//{
|
||||
// ContextIds = [ParentDataItem!.Id];
|
||||
// GetAllMessageTag = SignalRTags.GetShippingItemsByDocumentId;
|
||||
//}
|
||||
|
||||
_isFirstInitializeParameters = false;
|
||||
}
|
||||
}
|
||||
|
||||
protected override async Task SetParametersAsyncCore(ParameterView parameters)
|
||||
{
|
||||
await base.SetParametersAsyncCore(parameters);
|
||||
|
||||
if (!_isFirstInitializeParameterCore)
|
||||
{
|
||||
//if (!IsMasterGrid && (ContextIds == null || ContextIds.Length == 0))
|
||||
//{
|
||||
// ContextIds = [ParentDataItem!.Id];
|
||||
// GetAllMessageTag = SignalRTags.GetShippingItemsByDocumentId;
|
||||
//}
|
||||
|
||||
//ShowFilterRow = true;
|
||||
//ShowGroupPanel = true;
|
||||
//AllowSort = false;
|
||||
|
||||
//etc...
|
||||
|
||||
_isFirstInitializeParameterCore = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
@using AyCode.Utils.Extensions
|
||||
@using FruitBank.Common.Dtos
|
||||
@using FruitBank.Common.Entities
|
||||
@using FruitBank.Common.Models
|
||||
@using FruitBankHybrid.Shared.Databases
|
||||
@using FruitBankHybrid.Shared.Services.SignalRs
|
||||
@using Mango.Nop.Core.Entities
|
||||
|
||||
<DxFormLayout CaptionPosition="CaptionPosition.Vertical" CssClass="w-100">
|
||||
<DxFormLayoutItem Caption="Termék:" ColSpanMd="2">
|
||||
@* CaptionCssClass="@(SelectedProductDto?.IsMeasured == true ? "text-success" : "")"> *@
|
||||
<DxComboBox Data="@_stockTakings"
|
||||
TextFieldName="@nameof(StockTaking.StartDateTime)"
|
||||
CssClass="cw-480"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
Context="ctxProduct"
|
||||
InputId="cbProduct"
|
||||
Value="@SelectedStockTaking"
|
||||
ValueChanged="@((StockTaking stockTaking) => ValueChanged(stockTaking))">
|
||||
</DxComboBox>
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem ColSpanMd="4">
|
||||
<DxComboBox Data="@_stockTakingItems"
|
||||
@bind-Value="@SelectedStockTakingItem"
|
||||
TextFieldName="@nameof(StockTakingItem.DisplayText)"
|
||||
CssClass="cw-480"
|
||||
DropDownBodyCssClass="dd-body-class"
|
||||
Context="ctxProduct2"
|
||||
InputId="cbProduct2">
|
||||
</DxComboBox>
|
||||
</DxFormLayoutItem>
|
||||
@* TextFieldName="StockTakingItem.Product.Name" *@
|
||||
<DxFormLayoutItem ColSpanMd="1">
|
||||
<DxButton Text="Új" Enabled="@(_stockTakings.All(x => x.IsClosed))" Click="() => Callback()"></DxButton>
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem ColSpanMd="1">
|
||||
<DxButton Text="Módosít" Enabled="@(SelectedStockTaking?.IsClosed ?? false)" Click="() => Callback2()"></DxButton>
|
||||
</DxFormLayoutItem>
|
||||
<DxFormLayoutItem ColSpanMd="1">
|
||||
<DxButton Text="Lezárás" Enabled="@(SelectedStockTaking?.StockTakingItems?.Where(x=>x.IsRequiredForMeasuring).All(x=>x.IsMeasured) ?? false)" Click="() => Callback3()"></DxButton>
|
||||
</DxFormLayoutItem>
|
||||
|
||||
</DxFormLayout>
|
||||
|
||||
@code
|
||||
{
|
||||
[Inject] public required DatabaseClient Database { get; set; }
|
||||
[Inject] public required LoggedInModel LoggedInModel { get; set; }
|
||||
[Inject] public required FruitBankSignalRClient FruitBankSignalRClient { get; set; }
|
||||
|
||||
List<StockTaking> _stockTakings { get; set; } = [];
|
||||
List<StockTakingItem> _stockTakingItems { get; set; } = [];
|
||||
List<StockTakingItemPallet> _stockTakingItemPallets { get; set; } = [];
|
||||
StockTaking? SelectedStockTaking { get; set; }
|
||||
StockTakingItem? SelectedStockTakingItem { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await ReloadDataFromDb(false);
|
||||
}
|
||||
|
||||
public async Task ReloadDataFromDb(bool forceReload)
|
||||
{
|
||||
LoadingPanelVisibility.Visible = true;
|
||||
|
||||
_stockTakings = await FruitBankSignalRClient.GetStockTakings() ?? [];
|
||||
ValueChanged(_stockTakings.FirstOrDefault());
|
||||
|
||||
LoadingPanelVisibility.Visible = false;
|
||||
}
|
||||
|
||||
private async Task Callback()
|
||||
{
|
||||
var stockTaking = new StockTaking();
|
||||
stockTaking.StartDateTime = DateTime.Now;
|
||||
stockTaking.Creator = LoggedInModel.CustomerDto!.Id;
|
||||
|
||||
var resultStockTaking = await FruitBankSignalRClient.AddStockTaking(stockTaking);
|
||||
if (resultStockTaking == null) return;
|
||||
|
||||
_stockTakings.Add(resultStockTaking);
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private async Task Callback2()
|
||||
{
|
||||
// var resultStockTaking = await FruitBankSignalRClient.AddStockTaking(stockTaking);
|
||||
// if (resultStockTaking == null) return;
|
||||
|
||||
// _stockTakings.Add(resultStockTaking);
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private async Task Callback3()
|
||||
{
|
||||
// var resultStockTaking = await FruitBankSignalRClient.AddStockTaking(stockTaking);
|
||||
// if (resultStockTaking == null) return;
|
||||
|
||||
// _stockTakings.Add(resultStockTaking);
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
private void ValueChanged(StockTaking? newValue)
|
||||
{
|
||||
SelectedStockTaking = newValue;
|
||||
_stockTakingItems = SelectedStockTaking?.StockTakingItems?.OrderByDescending(x => x.IsMeasured).ThenByDescending(x => x.OriginalStockQuantity != 0 || x.OriginalNetWeight != 0).ThenBy(x => x.Product?.Name).ToList() ?? [];
|
||||
|
||||
SelectedStockTakingItem = _stockTakingItems.FirstOrDefault();
|
||||
}
|
||||
}
|
||||
|
|
@ -58,12 +58,13 @@ public class ShippingItemTable : SignalRDataSourceList<ShippingItemTableItem>
|
|||
|
||||
public class ProductDtoTable(FruitBankSignalRClient fruitBankSignalRClient) : AcObservableCollection<ProductDtoTableItem>
|
||||
{
|
||||
private readonly SemaphoreSlim _semaphoreSlim = new(1);
|
||||
//private readonly SemaphoreSlim _semaphoreSlim = new(1);
|
||||
public async Task<ProductDtoTable> LoadDataAsync(bool onlyIfEmpty = true)
|
||||
{
|
||||
if (onlyIfEmpty && Count > 0) return this;
|
||||
|
||||
using (await _semaphoreSlim.UseWaitAsync())
|
||||
//using (await _semaphoreSlim.UseWaitAsync())
|
||||
using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
{
|
||||
//Előfordulhat, h egy másik szálban már megtörtént a refresh... - J.
|
||||
if (onlyIfEmpty && Count > 0) return this;
|
||||
|
|
@ -83,13 +84,14 @@ public class ProductDtoTable(FruitBankSignalRClient fruitBankSignalRClient) : Ac
|
|||
}
|
||||
public class OrderDtoTable(FruitBankSignalRClient fruitBankSignalRClient) : AcObservableCollection<OrderDtoTableItem>
|
||||
{
|
||||
private readonly SemaphoreSlim _semaphoreSlim = new(1);
|
||||
//private readonly SemaphoreSlim _semaphoreSlim = new(1);
|
||||
|
||||
public async Task<OrderDtoTable> LoadDataAsync(bool onlyIfEmpty = true)
|
||||
{
|
||||
if (onlyIfEmpty && Count > 0) return this;
|
||||
|
||||
using (await _semaphoreSlim.UseWaitAsync())
|
||||
//using (await _semaphoreSlim.UseWaitAsync())
|
||||
using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
{
|
||||
if (Count > 0) return this;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,68 +1,71 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
|
||||
<ItemGroup>
|
||||
<SupportedPlatform Include="browser" />
|
||||
</ItemGroup>
|
||||
<RunAOTCompilation>true</RunAOTCompilation>
|
||||
<WasmStripILAfterAOT>true</WasmStripILAfterAOT>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DevExpress.Blazor" Version="25.1.3" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.10" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<SupportedPlatform Include="browser" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Aycode\Source\AyCode.Blazor\AyCode.Blazor.Components\AyCode.Blazor.Components.csproj" />
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DevExpress.Blazor" Version="25.1.3" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.11" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Models">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Models.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Utils">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.Resources.v25.1">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v25.1">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v25.1">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\Aycode\Source\AyCode.Blazor\AyCode.Blazor.Components\AyCode.Blazor.Components.csproj" />
|
||||
<ProjectReference Include="..\FruitBank.Common\FruitBank.Common.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="AyCode.Core">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Entities">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Entities.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Interfaces">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Interfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Models">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Models.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Services.Server">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="AyCode.Utils">
|
||||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.Resources.v25.1">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Blazor.v25.1.Viewer">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v25.1">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v25.1">
|
||||
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -53,9 +53,7 @@
|
|||
<span class="icon counter-icon" aria-hidden="true"></span> Rendelések - Adminisztrátor
|
||||
</NavLink>
|
||||
</div>
|
||||
}
|
||||
@if (LoggedInModel.IsDeveloper)
|
||||
{
|
||||
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="ShippingsAdmin">
|
||||
<span class="icon counter-icon" aria-hidden="true"></span> Szállítmányok - Adminisztrátor
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public partial class OrdersAdmin : ComponentBase
|
|||
private async Task ReloadDataFromDb(bool forceReload = false)
|
||||
{
|
||||
LoadingPanelVisibility.Visible = true;
|
||||
using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
//using (await ObjectLock.GetSemaphore<ProductDto>().UseWaitAsync())
|
||||
{
|
||||
if (ProductDtos == null || !ProductDtos.Any() || forceReload) ProductDtos = await Database.ProductDtoTable.LoadDataAsync(!forceReload);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
@page "/StockTaking"
|
||||
@using FruitBankHybrid.Shared.Components.Grids.Products
|
||||
@using FruitBankHybrid.Shared.Components.Grids.StockTakingItems
|
||||
@using FruitBankHybrid.Shared.Components.StockTakings
|
||||
@using FruitBankHybrid.Shared.Databases
|
||||
|
||||
<h3>Leltározás</h3>
|
||||
|
|
@ -14,8 +17,19 @@
|
|||
Text="Adatok szinkronizálása folyamatban...">
|
||||
|
||||
<DxTabs RenderMode="TabsRenderMode.OnDemand">
|
||||
<DxTabPage Text="Leltározás"></DxTabPage>
|
||||
<DxTabPage Text="Előzmények"></DxTabPage>
|
||||
<DxTabPage Text="Leltározás">
|
||||
<StockTakingTemplate></StockTakingTemplate>
|
||||
</DxTabPage>
|
||||
<DxTabPage Text="Leltár előzmények">
|
||||
@{
|
||||
<GridStockTakingItem IsMasterGrid="true"></GridStockTakingItem>
|
||||
}
|
||||
</DxTabPage>
|
||||
<DxTabPage Text="Készlet mennyiség változások">
|
||||
@{
|
||||
<GridStockQuantityHistoryDtoTemplate></GridStockQuantityHistoryDtoTemplate>
|
||||
}
|
||||
</DxTabPage>
|
||||
</DxTabs>
|
||||
|
||||
</DxLoadingPanel>
|
||||
|
|
|
|||
|
|
@ -19,10 +19,11 @@ using Microsoft.AspNetCore.SignalR.Client;
|
|||
using Nop.Core.Domain.Customers;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ServiceModel.Channels;
|
||||
using Mango.Nop.Core.Entities;
|
||||
|
||||
namespace FruitBankHybrid.Shared.Services.SignalRs
|
||||
{
|
||||
public class FruitBankSignalRClient : AcSignalRClientBase, IFruitBankDataControllerClient, ICustomOrderSignalREndpointClient
|
||||
public class FruitBankSignalRClient : AcSignalRClientBase, IFruitBankDataControllerClient, ICustomOrderSignalREndpointClient, IStockSignalREndpointClient
|
||||
{
|
||||
public FruitBankSignalRClient( /*IServiceProvider serviceProvider, */ IEnumerable<IAcLogWriterClientBase> logWriters) : base($"{FruitBankConstClient.BaseUrl}/{FruitBankConstClient.DefaultHubName}", new LoggerClient(nameof(FruitBankSignalRClient), logWriters.ToArray()))
|
||||
{
|
||||
|
|
@ -263,5 +264,80 @@ namespace FruitBankHybrid.Shared.Services.SignalRs
|
|||
=> GetAllAsync<List<StockQuantityHistoryDto>>(SignalRTags.GetStockQuantityHistoryDtosByProductId, [productId]);
|
||||
|
||||
#endregion Orders
|
||||
|
||||
public async Task<List<GenericAttributeDto>?> GetGenericAttributeDtosByEntityIdAndKeyGroup(int productId, string keyGroup, int storeId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<GenericAttributeDto?> AddGenericAttributeDto(GenericAttributeDto genericAttributeDto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<GenericAttributeDto?> UpdateGenericAttributeDto(GenericAttributeDto genericAttributeDto)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
|
||||
public Task<List<StockTaking>?> GetStockTakings() => GetAllAsync<List<StockTaking>>(SignalRTags.GetStockTakings);
|
||||
|
||||
public async Task<List<StockTaking>?> GetStockTakingsByProductId(int productId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<StockTaking?> AddStockTaking(StockTaking stockTaking) => PostDataAsync(SignalRTags.AddStockTaking, stockTaking);
|
||||
|
||||
public async Task<StockTaking?> UpdateStockTaking(StockTaking stockTaking)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<List<StockTakingItem>?> GetStockTakingItems() => GetAllAsync<List<StockTakingItem>>(SignalRTags.GetStockTakingItems);
|
||||
|
||||
public Task<StockTakingItem?> GetStockTakingItemsById(int stockTakingItemId)
|
||||
=> GetByIdAsync<StockTakingItem>(SignalRTags.GetStockTakingItemsById, [stockTakingItemId]);
|
||||
|
||||
public async Task<List<StockTakingItem>?> GetStockTakingItemsByProductId(int productId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<List<StockTakingItem>?> GetStockTakingItemsByStockTakingId(int stockTakingId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<StockTakingItem?> AddStockTakingItem(StockTakingItem stockTakingItem)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<StockTakingItem?> UpdateStockTakingItem(StockTakingItem stockTakingItem)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<List<StockTakingItemPallet>?> GetStockTakingItemPallets()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<List<StockTakingItemPallet>?> GetStockTakingItemPalletsByProductId(int productId)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<StockTakingItemPallet?> AddStockTakingItemPallet(StockTakingItemPallet stockTakingItemPallet)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public async Task<StockTakingItemPallet?> UpdateStockTakingItemPallet(StockTakingItemPallet stockTakingItemPallet)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,4 +7,10 @@
|
|||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
|
||||
@using FruitBankHybrid
|
||||
@using FruitBankHybrid.Shared
|
||||
@using FruitBankHybrid.Shared.Layout
|
||||
@using FruitBankHybrid.Shared.Components
|
||||
@using FruitBankHybrid.Shared.Components.Grids.Products
|
||||
|
||||
@using DevExpress.Blazor
|
||||
|
|
@ -6,14 +6,20 @@
|
|||
<Nullable>enable</Nullable>
|
||||
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
|
||||
<StaticWebAssetProjectMode>Default</StaticWebAssetProjectMode>
|
||||
|
||||
<RunAOTCompilation>true</RunAOTCompilation>
|
||||
<WasmStripILAfterAOT>true</WasmStripILAfterAOT>
|
||||
<OverrideHtmlAssetPlaceholders>true</OverrideHtmlAssetPlaceholders>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DevExpress.Blazor" Version="25.1.*" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="10.0.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
|
||||
<StaticWebAssetFingerprintPattern Include="JS" Pattern="*.js" Expression="#[.{fingerprint}]!" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
|
||||
@using FruitBankHybrid.Shared
|
||||
@using FruitBankHybrid.Web.Client
|
||||
|
||||
|
|
|
|||
|
|
@ -8,18 +8,23 @@
|
|||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<base href="/" />
|
||||
|
||||
<ResourcePreloader />
|
||||
@DxResourceManager.RegisterScripts()
|
||||
@DxResourceManager.RegisterTheme(Themes.Fluent)
|
||||
|
||||
<link href=@AppendVersion("_content/FruitBankHybrid.Shared/bootstrap/bootstrap.min.css") rel="stylesheet" />
|
||||
<link href=@AppendVersion("_content/FruitBankHybrid.Shared/app.css") rel="stylesheet" />
|
||||
<link href=@AppendVersion("FruitBankHybrid.Web.styles.css") rel="stylesheet" />
|
||||
|
||||
<ImportMap />
|
||||
<link href=@AppendVersion("_content/FruitBankHybrid.Shared/favicon.png") rel="icon" type="image/png" />
|
||||
<HeadOutlet @rendermode="InteractiveWebAssembly" />
|
||||
</head>
|
||||
|
||||
<body class="dxbl-theme-fluent">
|
||||
<Routes @rendermode="InteractiveWebAssembly" />
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
<script src="@Assets["_framework/blazor.web.js"]"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,9 @@
|
|||
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||
@using Microsoft.JSInterop
|
||||
|
||||
@using FruitBankHybrid.Shared
|
||||
@using FruitBankHybrid.Shared.Layout
|
||||
@using FruitBankHybrid.Web
|
||||
@using FruitBankHybrid.Web.Client
|
||||
@using FruitBankHybrid.Web.Components
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<!--<PublishTrimmed>true</PublishTrimmed>-->
|
||||
|
||||
<RunAOTCompilation>true</RunAOTCompilation>
|
||||
<WasmStripILAfterAOT>true</WasmStripILAfterAOT>
|
||||
<OverrideHtmlAssetPlaceholders>true</OverrideHtmlAssetPlaceholders>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
@ -17,8 +21,8 @@
|
|||
<PackageReference Include="DevExpress.Blazor" Version="25.1.3" />
|
||||
<PackageReference Include="MessagePack" Version="3.1.4" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.11" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using FruitBankHybrid.Web.Services;
|
|||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddRazorComponents().AddInteractiveServerComponents().AddInteractiveWebAssemblyComponents();
|
||||
builder.Services.AddRazorComponents().AddInteractiveWebAssemblyComponents();
|
||||
builder.Services.AddDevExpressBlazor(configure => configure.SizeMode = DevExpress.Blazor.SizeMode.Medium);
|
||||
builder.Services.AddMvc();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36414.22
|
||||
# Visual Studio Version 18
|
||||
VisualStudioVersion = 18.0.11222.15 d18.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FruitBankHybrid", "FruitBankHybrid\FruitBankHybrid.csproj", "{85ADEDE3-C271-47DF-B273-2EDB32792CEF}"
|
||||
EndProject
|
||||
|
|
|
|||
|
|
@ -22,6 +22,10 @@
|
|||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>1</ApplicationVersion>
|
||||
|
||||
<RunAOTCompilation>true</RunAOTCompilation>
|
||||
<WasmStripILAfterAOT>true</WasmStripILAfterAOT>
|
||||
<OverrideHtmlAssetPlaceholders>true</OverrideHtmlAssetPlaceholders>
|
||||
|
||||
<!-- To develop, package, and publish an app to the Microsoft Store, see: https://aka.ms/MauiTemplateUnpackaged -->
|
||||
<!--<WindowsPackageType>None</WindowsPackageType>-->
|
||||
|
||||
|
|
@ -89,9 +93,9 @@
|
|||
<!--<PackageReference Include="DevExpress.Maui.Controls" Version="25.1.3" />
|
||||
<PackageReference Include="DevExpress.Maui.Editors" Version="25.1.3" />
|
||||
<PackageReference Include="DevExpress.Maui.CollectionView" Version="25.1.3" />-->
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.10" />
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="10.0.11" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="10.0.11" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="10.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue