From 63b02a4a93e5e1b6c7aa8f85ddfc14bfc82f283a Mon Sep 17 00:00:00 2001 From: Loretta Date: Thu, 18 Jul 2024 17:59:49 +0200 Subject: [PATCH] improvements, fixes, etc... --- TIAM.Database.Test/TIAM.Database.Test.csproj | 14 ++++---- TIAM.Database/TIAM.Database.csproj | 8 ++--- TIAM.Entities/TIAM.Entities.csproj | 2 +- .../TIAM.Services.Server.Tests.csproj | 6 ++-- .../TIAM.Services.Server.csproj | 2 +- .../ProductDetailGridComponent.razor | 34 +++++++++++-------- TIAMSharedUI/TIAMSharedUI.csproj | 6 ++-- TIAMWebApp/Client/TIAMWebApp.Client.csproj | 6 ++-- TIAMWebApp/Server/TIAMWebApp.Server.csproj | 8 ++--- .../TIAMWebApp.Shared.Application.csproj | 10 +++--- .../Tiam.Services.Client.Tests.csproj | 4 +-- 11 files changed, 52 insertions(+), 48 deletions(-) diff --git a/TIAM.Database.Test/TIAM.Database.Test.csproj b/TIAM.Database.Test/TIAM.Database.Test.csproj index 06d9d95e..42009a81 100644 --- a/TIAM.Database.Test/TIAM.Database.Test.csproj +++ b/TIAM.Database.Test/TIAM.Database.Test.csproj @@ -22,17 +22,17 @@ - - - - - + + + + + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/TIAM.Database/TIAM.Database.csproj b/TIAM.Database/TIAM.Database.csproj index 86d68894..90fd0f00 100644 --- a/TIAM.Database/TIAM.Database.csproj +++ b/TIAM.Database/TIAM.Database.csproj @@ -8,10 +8,10 @@ - - - - + + + + diff --git a/TIAM.Entities/TIAM.Entities.csproj b/TIAM.Entities/TIAM.Entities.csproj index 0d7c9be8..122ec9d2 100644 --- a/TIAM.Entities/TIAM.Entities.csproj +++ b/TIAM.Entities/TIAM.Entities.csproj @@ -32,7 +32,7 @@ - + diff --git a/TIAM.Services.Server.Tests/TIAM.Services.Server.Tests.csproj b/TIAM.Services.Server.Tests/TIAM.Services.Server.Tests.csproj index 30c93c25..53e51fc9 100644 --- a/TIAM.Services.Server.Tests/TIAM.Services.Server.Tests.csproj +++ b/TIAM.Services.Server.Tests/TIAM.Services.Server.Tests.csproj @@ -26,10 +26,10 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + diff --git a/TIAM.Services.Server/TIAM.Services.Server.csproj b/TIAM.Services.Server/TIAM.Services.Server.csproj index c650cf4e..f429caa5 100644 --- a/TIAM.Services.Server/TIAM.Services.Server.csproj +++ b/TIAM.Services.Server/TIAM.Services.Server.csproj @@ -7,7 +7,7 @@ - + diff --git a/TIAMSharedUI/Pages/User/SysAdmins/ProductDetailGridComponent.razor b/TIAMSharedUI/Pages/User/SysAdmins/ProductDetailGridComponent.razor index 3232473b..5988ae07 100644 --- a/TIAMSharedUI/Pages/User/SysAdmins/ProductDetailGridComponent.razor +++ b/TIAMSharedUI/Pages/User/SysAdmins/ProductDetailGridComponent.razor @@ -18,13 +18,14 @@ @using AyCode.Interfaces.Addresses @using AyCode.Core @using AyCode.Core.Extensions +@using AyCode.Core.Helpers @inject IStringLocalizer Localizer @inject IEnumerable LogWriters @inject AdminSignalRClient AdminSignalRClient; @code { - [Parameter] public Guid? ContextId { get; set; } + [Parameter] public Guid ContextId { get; set; } [Parameter] public IProductsRelation? ParentData { get; set; } = null!; [Parameter] public EventCallback OnGridEditModelSaving { get; set; } [Parameter] public int GetAllTag { get; set; } = SignalRTags.GetProductsByOwnerId; [Parameter] public GridDetailExpandButtonDisplayMode DetailExpandButtonDisplayMode { get; set; } = GridDetailExpandButtonDisplayMode.Never; - private List? destinations = null; + //private static Dictionary> _destinations = []; + private static List _destinations = []; private ProductDetailGrid _productGrid = null!; - private LoggerClient _logger = null!; + private LoggerClient _logger = null!; + + // private List 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(LogWriters.ToArray()); - //DataSource = new List
(); + 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>(SignalRTags.GetAllTransferDestinations); - await base.OnInitializedAsync(); - } - protected override async Task OnParametersSetAsync() { // if (ParentData != null) diff --git a/TIAMSharedUI/TIAMSharedUI.csproj b/TIAMSharedUI/TIAMSharedUI.csproj index d87f2a8b..f8321858 100644 --- a/TIAMSharedUI/TIAMSharedUI.csproj +++ b/TIAMSharedUI/TIAMSharedUI.csproj @@ -19,9 +19,9 @@ - - - + + + diff --git a/TIAMWebApp/Client/TIAMWebApp.Client.csproj b/TIAMWebApp/Client/TIAMWebApp.Client.csproj index adff4fe3..9502f5ba 100644 --- a/TIAMWebApp/Client/TIAMWebApp.Client.csproj +++ b/TIAMWebApp/Client/TIAMWebApp.Client.csproj @@ -11,9 +11,9 @@ - - - + + + diff --git a/TIAMWebApp/Server/TIAMWebApp.Server.csproj b/TIAMWebApp/Server/TIAMWebApp.Server.csproj index a18eebbd..a604fa22 100644 --- a/TIAMWebApp/Server/TIAMWebApp.Server.csproj +++ b/TIAMWebApp/Server/TIAMWebApp.Server.csproj @@ -12,10 +12,10 @@ - - - - + + + + diff --git a/TIAMWebApp/Shared/TIAMWebApp.Shared.Application.csproj b/TIAMWebApp/Shared/TIAMWebApp.Shared.Application.csproj index ca85dd73..0162055d 100644 --- a/TIAMWebApp/Shared/TIAMWebApp.Shared.Application.csproj +++ b/TIAMWebApp/Shared/TIAMWebApp.Shared.Application.csproj @@ -22,11 +22,11 @@ - - - - - + + + + + diff --git a/Tiam.Services.Client.Tests/Tiam.Services.Client.Tests.csproj b/Tiam.Services.Client.Tests/Tiam.Services.Client.Tests.csproj index 6bad5966..98b8174b 100644 --- a/Tiam.Services.Client.Tests/Tiam.Services.Client.Tests.csproj +++ b/Tiam.Services.Client.Tests/Tiam.Services.Client.Tests.csproj @@ -15,8 +15,8 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - + +