Compare commits
2 Commits
57bacdc5f8
...
e1f9e1748d
| Author | SHA1 | Date |
|---|---|---|
|
|
e1f9e1748d | |
|
|
63b02a4a93 |
|
|
@ -22,17 +22,17 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||
<PackageReference Include="Moq" Version="4.20.70" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.5.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.5.0" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.2">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
|
|
|||
|
|
@ -8,10 +8,10 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DevExpress.Data" Version="24.1.3" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="2.5.168" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
|
||||
<PackageReference Include="MessagePack.Annotations" Version="2.5.171" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.7" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using Newtonsoft.Json;
|
||||
using TIAM.Core.Enums;
|
||||
using TIAM.Entities.Profiles;
|
||||
|
||||
|
|
@ -23,6 +24,10 @@ public abstract class ProductBase : IProductBase, ITimeStampInfo
|
|||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public float Price { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public string? JsonDetails { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Abstractions" Version="8.0.7" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using Newtonsoft.Json;
|
||||
using TIAM.Entities.Drivers;
|
||||
using TIAM.Entities.Products;
|
||||
|
||||
|
|
@ -27,6 +28,8 @@ public class UserProductMapping : IEntityGuid, IUserRelation, IProductRelation,
|
|||
|
||||
//[Column("JsonDetailModel")]
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public UserProductJsonDetailModel? JsonDetailModel { get; set; } = null;
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
|
|
|
|||
|
|
@ -26,10 +26,10 @@
|
|||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.5.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.7" />
|
||||
<PackageReference Include="SendGrid" Version="9.29.3" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,14 @@
|
|||
@using AyCode.Interfaces.Addresses
|
||||
@using AyCode.Core
|
||||
@using AyCode.Core.Extensions
|
||||
@using AyCode.Core.Helpers
|
||||
@inject IStringLocalizer<TIAMResources> Localizer
|
||||
@inject IEnumerable<IAcLogWriterClientBase> LogWriters
|
||||
@inject AdminSignalRClient AdminSignalRClient;
|
||||
|
||||
|
||||
<ProductDetailGrid @ref="_productGrid"
|
||||
ContextIds="@(ContextId.IsNullOrEmpty() ? throw new InvalidDataException($"ContextId.IsNullOrEmpty(); ContextId: {ContextId}") : [ContextId.Value])"
|
||||
ContextIds="@(ContextId.IsNullOrEmpty() ? throw new InvalidDataException($"ContextId.IsNullOrEmpty(); ContextId: {ContextId}") : [ContextId])"
|
||||
DataSource="ParentData?.Products ?? []"
|
||||
GetAllMessageTag="GetAllTag"
|
||||
Logger="_logger"
|
||||
|
|
@ -121,30 +122,39 @@
|
|||
</ProductDetailGrid>
|
||||
|
||||
@code {
|
||||
[Parameter] public Guid? ContextId { get; set; }
|
||||
[Parameter] public Guid ContextId { get; set; }
|
||||
[Parameter] public IProductsRelation? ParentData { get; set; } = null!;
|
||||
[Parameter] public EventCallback<GridEditModelSavingEventArgs> OnGridEditModelSaving { get; set; }
|
||||
[Parameter] public int GetAllTag { get; set; } = SignalRTags.GetProductsByOwnerId;
|
||||
[Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never;
|
||||
|
||||
private List<TransferDestination>? destinations = null;
|
||||
//private static Dictionary<Guid, List<TransferDestination>> _destinations = [];
|
||||
private static List<TransferDestination> _destinations = [];
|
||||
|
||||
private ProductDetailGrid _productGrid = null!;
|
||||
private LoggerClient<ProductDetailGridComponent> _logger = null!;
|
||||
private LoggerClient<ProductDetailGridComponent> _logger = null!;
|
||||
|
||||
// private List<TransferDestination> GetDestinationsByContextId(Guid contextId)
|
||||
// {
|
||||
// if (_destinations.TryGetValue(contextId, out var transferDestinations) && transferDestinations != null)
|
||||
// return transferDestinations;
|
||||
|
||||
// _destinations[contextId] = [];
|
||||
// return _destinations[contextId];
|
||||
// }
|
||||
|
||||
protected override void OnInitialized()
|
||||
{
|
||||
_logger = new LoggerClient<ProductDetailGridComponent>(LogWriters.ToArray());
|
||||
//DataSource = new List<Address>();
|
||||
|
||||
AdminSignalRClient.GetAllIntoAsync(_destinations, SignalRTags.GetAllTransferDestinations).Forget();
|
||||
}
|
||||
|
||||
private bool CheckDestinations(Guid addressId)
|
||||
{
|
||||
|
||||
|
||||
if(destinations!=null)
|
||||
if(_destinations!=null)
|
||||
{
|
||||
if (destinations.Any(d => d.AddressId == addressId))
|
||||
if (_destinations.Any(d => d.AddressId == addressId))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
@ -179,12 +189,6 @@
|
|||
_productGrid.Reload();
|
||||
}
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
destinations = await AdminSignalRClient.GetAllAsync<List<TransferDestination>>(SignalRTags.GetAllTransferDestinations);
|
||||
await base.OnInitializedAsync();
|
||||
}
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
// if (ParentData != null)
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@
|
|||
<PackageReference Include="Blazor.AnimateOnScroll" Version="1.1.0" />
|
||||
<PackageReference Include="BlazorAnimation" Version="2.2.0" />
|
||||
<PackageReference Include="DevExpress.Blazor" Version="24.1.3" />
|
||||
<PackageReference Include="MessagePack" Version="2.5.168" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.6" />
|
||||
<PackageReference Include="MessagePack" Version="2.5.171" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.7" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.6" PrivateAssets="all" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Authentication" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.7" PrivateAssets="all" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.8" />
|
||||
<PackageReference Include="SkiaSharp.Views.Desktop.Common" Version="2.88.8" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
|
|
@ -215,7 +215,13 @@ public class DevAdminSignalRHub : Hub<ISignalRHubItemServer>, IAcSignalRHubServe
|
|||
}
|
||||
else _logger.Debug($"{logText}(); {tagName}");
|
||||
|
||||
await ResponseToCaller(messageTag, new SignalResponseJsonMessage(messageTag, SignalResponseStatus.Success, methodInfoModel.MethodInfo.InvokeMethod(methodsByDeclaringObject.InstanceObject, paramValues)), requestId);
|
||||
var responseDataJson = new SignalResponseJsonMessage(messageTag, SignalResponseStatus.Success, methodInfoModel.MethodInfo.InvokeMethod(methodsByDeclaringObject.InstanceObject, paramValues));
|
||||
var responseDataJsonKiloBytes = System.Text.Encoding.Unicode.GetByteCount(responseDataJson.ResponseData!) / 1024;
|
||||
|
||||
//File.WriteAllText(Path.Combine("h:", $"{requestId}.json"), responseDataJson.ResponseData);
|
||||
|
||||
_logger.Info($"[{responseDataJsonKiloBytes}kb] responseData serialized to json");
|
||||
await ResponseToCaller(messageTag, responseDataJson, requestId);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
@ -309,9 +315,10 @@ public class DevAdminSignalRHub : Hub<ISignalRHubItemServer>, IAcSignalRHubServe
|
|||
|
||||
protected async Task SendMessageToClient(ISignalRHubItemServer sendTo, int messageTag, ISignalRMessage message, int? requestId = null)
|
||||
{
|
||||
_logger.Info($"Server SendMessageToClient; {nameof(requestId)}: {requestId}; ConnectionId: {Context.ConnectionId}; {ConstHelper.NameByValue<SignalRTags>(messageTag)}");
|
||||
var responseDataMessagePack = message.ToMessagePack(ContractlessStandardResolver.Options);
|
||||
_logger.Info($"[{(responseDataMessagePack.Length/1024)}kb] Server sending responseDataMessagePack to client; {nameof(requestId)}: {requestId}; ConnectionId: {Context.ConnectionId}; {ConstHelper.NameByValue<SignalRTags>(messageTag)}");
|
||||
|
||||
await sendTo.OnReceiveMessage(messageTag, message.ToMessagePack(ContractlessStandardResolver.Options), requestId);
|
||||
await sendTo.OnReceiveMessage(messageTag, responseDataMessagePack, requestId);
|
||||
}
|
||||
|
||||
public async Task SendMessageToGroup(string groupId, int messageTag, string message)
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="GoogleApi" Version="5.4.4" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.OpenApi" Version="1.6.15" />
|
||||
<PackageReference Include="QRCoderNetCore" Version="1.0.0" />
|
||||
<PackageReference Include="SendGrid" Version="9.29.3" />
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MessagePack" Version="2.5.168" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.6" />
|
||||
<PackageReference Include="Microsoft.JSInterop" Version="8.0.6" />
|
||||
<PackageReference Include="MessagePack" Version="2.5.171" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Cryptography.KeyDerivation" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.7" />
|
||||
<PackageReference Include="Microsoft.JSInterop" Version="8.0.7" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.8" />
|
||||
<PackageReference Include="SkiaSharp.Views.Desktop.Common" Version="2.88.8" />
|
||||
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.4.3" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.4.3" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="3.5.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="3.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue