nuget packages update; improvements, fixes

This commit is contained in:
Loretta 2025-10-18 18:46:00 +02:00
parent 94cc71513c
commit 0938422103
10 changed files with 100 additions and 55 deletions

View File

@ -10,10 +10,10 @@
<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.9" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Common" Version="9.0.9" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.9" />
<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.Extensions.Configuration.Abstractions" Version="9.0.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>

View File

@ -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.9" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="9.0.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>

View File

@ -46,30 +46,30 @@
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="18.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="17.14.2" />
<PackageReference Update="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="1.8.4" />
<PackageReference Update="Microsoft.Testing.Extensions.TrxReport" Version="2.0.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="MSTest.Analyzers" Version="3.10.4">
<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.TestAdapter" Version="3.10.4" />
<PackageReference Update="MSTest.TestAdapter" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="MSTest.TestFramework" Version="3.10.4" />
<PackageReference Update="MSTest.TestFramework" Version="4.0.1" />
</ItemGroup>
</Project>

View File

@ -19,12 +19,12 @@
<DxFormLayoutItem Context="ctxFromLayoutItemPallet" CaptionCssClass="@(GetOrderItemPalletsCssClassNames(nameof(IMeasuringItemPalletBase.PalletWeight)))"
Field="@nameof(ShippingItemPallet.PalletWeight)"
Enabled="@(IsMeasurable && ProductId > 0)"
Caption="Rakl.súly(kg)" ColSpanMd="2" />
Caption="Rakl.súly(kg)" ColSpanMd="2"@ref="_weightFormLayoutItem" />
<DxFormLayoutItem Context="ctxFromLayoutItemPallet" CaptionCssClass="@(GetOrderItemPalletsCssClassNames(nameof(IMeasuringItemPalletBase.TareWeight)))"
Field="@nameof(ShippingItemPallet.TareWeight)"
Enabled="@(IsMeasurable && ProductId > 0)"
Caption="Tára(kg)" ColSpanMd="2" />
Caption="Tára(kg)" ColSpanMd="2" />
<DxFormLayoutItem Context="ctxFromLayoutItemPallet" ColSpanMd="1" />
<DxFormLayoutItem Context="ctxFromLayoutItemPallet" CaptionCssClass="@(GetOrderItemPalletsCssClassNames(nameof(IMeasuringItemPalletBase.TrayQuantity)))"
@ -63,11 +63,14 @@
[Inject] public required FruitBankSignalRClient FruitBankSignalRClient { get; set; }
[Inject] public required LoggedInModel LoggedInModel { get; set; }
private DxFormLayoutItem _weightFormLayoutItem;
public bool _btnSaveEnabled { get; set; }
protected override async Task OnInitializedAsync()
{
_btnSaveEnabled = PalletItem.IsValidMeasuringValues(IsMeasurable) && !PalletItem.IsMeasured;
//((DxSpinEdit<double>)_weightFormLayoutItem.Template.Target).DisplayFormat = "N3";
await base.OnInitializedAsync();
}

View File

@ -14,8 +14,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.Web" Version="9.0.9" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="9.0.10" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>

View File

@ -54,8 +54,8 @@
</ItemDisplayTemplate>
</DxComboBox>
</DxFormLayoutItem>
<DxFormLayoutItem Caption="Partner:" ColSpanMd="3" CaptionCssClass="@(SelectedShippingDocument?.IsAllMeasured == true ? "text-success" : "")">
@* <DxFormLayoutItem Caption="Partner:" ColSpanMd="3" CaptionCssClass="@(SelectedShippingDocument?.IsAllMeasured == true ? "text-success" : "")">
<DxComboBox Data="@SelectedShipping?.ShippingDocuments"
@bind-Value="@SelectedShippingDocument"
Text="Select partner"
@ -71,14 +71,21 @@
</ItemDisplayTemplate>
</DxComboBox>
</DxFormLayoutItem>
*@
<DxFormLayoutItem Caption="Termék:" ColSpanMd="5" CaptionCssClass="@(SelectedShippingItem?.IsMeasured == true ? "text-success" : "")">
<DxComboBox Data="@SelectedShippingDocument?.ShippingItems"
<DxComboBox Data="@_shippingItemsDataSource"
@bind-Value="@SelectedShippingItem"
Text="Select item"
ValueFieldName="@nameof(ShippingItem.Id)"
TextFieldName="@(nameof(ShippingItem.Name))"
CssClass="cw-480"
SearchMode="ListSearchMode.AutoSearch"
SearchFilterCondition="ListSearchFilterCondition.Contains"
SearchTextParseMode="ListSearchTextParseMode.GroupWordsByAnd"
ClearButtonDisplayMode="DataEditorClearButtonDisplayMode.Auto"
DropDownTriggerMode="DropDownTriggerMode.Click"
ListRenderMode="ListRenderMode.Entire"
ShowDropDownButton="false"
DropDownBodyCssClass="dd-body-class"
Context="ctxShippingitem"
SelectedDataItemChanged="@((SelectedDataItemChangedEventArgs<ShippingItem> args) => OnSelectedShippingItemChanged(args))"
@ -96,11 +103,26 @@
</ItemDisplayTemplate>
</DxComboBox>
</DxFormLayoutItem>
<DxFormLayoutItem Caption="Partner:" ColSpanMd="3" CaptionCssClass="@(SelectedShippingItem?.ShippingDocument?.IsAllMeasured == true ? "text-success" : "")">
@{
var sd = SelectedShippingItem?.ShippingDocument;
if (sd != null)
{
var partnerName = sd.Partner?.Name;
<span class="@(sd.IsAllMeasured == true ? " text-success" : "")">
@($"{partnerName}, {sd.ShippingItems?.Count(si => si.IsMeasured) ?? 0}/{sd.ShippingItems?.Count ?? 0} kész.")
</span>
}
}
</DxFormLayoutItem>
</DxFormLayout>
</div>
<div style="margin-top: 50px;">
@if (SelectedShippingItem != null && SelectedShippingItem.ProductId.GetValueOrDefault(0) > 0)
@if (SelectedShippingItem is { ProductId: > 0 })
{
<h3 style="margin-bottom: 30px;" class="@(SelectedShippingItem.IsMeasured && SelectedShippingItem.ShippingItemPallets!.All(x => x.IsMeasuredAndValid(SelectedShippingItem.IsMeasurable)) ? "text-success" : "")">
@SelectedShippingItem.Name

View File

@ -26,11 +26,12 @@ namespace FruitBankHybrid.Shared.Pages
private List<Shipping> NotMeasuredShippings { get; set; } = null!;
private Shipping? SelectedShipping { get; set; }
private ShippingDocument? SelectedShippingDocument { get; set; }
//private ShippingDocument? SelectedShippingDocument { get; set; }
private ShippingItem? SelectedShippingItem { get; set; }
protected bool BtnSaveEnabled { get; set; }
private List<ShippingItem>? _shippingItemsDataSource;
private List<MeasuringDateSelectorModel> _measuringDates = null!;
protected override async Task OnInitializedAsync()
@ -52,6 +53,9 @@ namespace FruitBankHybrid.Shared.Pages
SelectedShipping = NotMeasuredShippings.FirstOrDefault();
}
private static List<ShippingItem>? GetShippingItemsDataSource(Shipping? shipping)
=> shipping?.ShippingDocuments?.SelectMany(sd => sd.ShippingItems!).OrderBy(si => si.Name).ToList() ?? null;
private async Task OnMeasuringDateChanged(DateTime selectedDateTime)
=> await RefreshShippingsFromDb(selectedDateTime);
@ -67,12 +71,12 @@ namespace FruitBankHybrid.Shared.Pages
private void OnSelectedShippingChanged(SelectedDataItemChangedEventArgs<Shipping> eventArgs)
{
SelectedShippingDocument = eventArgs.DataItem?.ShippingDocuments?.FirstOrDefault();
}
var shipping = eventArgs.DataItem;
private void OnSelectedShippingDocumentChanged(SelectedDataItemChangedEventArgs<ShippingDocument> eventArgs)
{
SelectedShippingItem = eventArgs.DataItem?.ShippingItems?.FirstOrDefault();
PrepareShippingItems(shipping);
_shippingItemsDataSource = GetShippingItemsDataSource(shipping);
SelectedShippingItem = _shippingItemsDataSource?.FirstOrDefault();
}
private void OnSelectedShippingItemChanged(SelectedDataItemChangedEventArgs<ShippingItem> eventArgs)
@ -86,31 +90,14 @@ namespace FruitBankHybrid.Shared.Pages
return;
}
SelectedShippingDocument!.IsAllMeasured = SelectedShippingDocument.ShippingItems?.All(si => si.IsMeasured) ?? false;
//SelectedShippingDocument!.IsAllMeasured = SelectedShippingDocument.ShippingItems?.All(si => si.IsMeasured) ?? false;
shippingItem.ShippingDocument!.IsAllMeasured = shippingItem.ShippingDocument.ShippingItems?.All(si => si.IsMeasured) ?? false;
SelectedShipping!.IsAllMeasured = SelectedShipping.ShippingDocuments?.All(sd => sd.IsAllMeasured) ?? false;
var shippingDate = _measuringDates.FirstOrDefault(shipping => shipping.ShippingId == SelectedShipping.Id);
if (shippingDate != null) shippingDate.IsMeasured = SelectedShipping.IsAllMeasured;
MeasuringValuesHelper.SetShippingItemTotalMeasuringValues(shippingItem);
//_logger.Info($"{shippingItem.ProductDto?.Tare}");
shippingItem.ShippingItemPallets ??= new List<ShippingItemPallet>(shippingItem.PalletsOnDocument);
//if (shippingItem.ShippingItemPallets.Count >= shippingItem.PalletsOnDocument) return;
for (var i = shippingItem.ShippingItemPallets.Count; i < shippingItem.PalletsOnDocument; i++)
shippingItem.ShippingItemPallets.Add(new ShippingItemPallet
{
ShippingItemId = shippingItem.Id,
PalletWeight = shippingItem.Pallet?.Weight ?? 0,
TareWeight = shippingItem.ProductDto?.Tare?? 0,
CreatorId = LoggedInModel.CustomerDto?.Id,
ModifierId = LoggedInModel.CustomerDto?.Id
});
//if (shippingItem.Id == SelectedShippingItem?.Id) return;
//await RefreshSelectedShippingItemMeasuredValuesFromDb(shippingItem.Id);
//PrepareShippingItems(SelectedShipping);
}
private async Task RefreshSelectedShippingItemMeasuredValuesFromDb(int shippingItemId)
@ -120,7 +107,7 @@ namespace FruitBankHybrid.Shared.Pages
private void RefreshSelectedShippingItemMeasuredValuesFromDb(ShippingItem? shippingItemFromDb)
{
if (SelectedShipping == null || SelectedShippingDocument == null || shippingItemFromDb == null) return;
if (SelectedShipping == null || SelectedShippingItem?.ShippingDocument == null || shippingItemFromDb == null) return;
//SelectedShippingItem.MeasuredQuantity = shippingItemFromDb.MeasuredQuantity;
//SelectedShippingItem.MeasuredNetWeight = shippingItemFromDb.MeasuredNetWeight;
@ -128,7 +115,9 @@ namespace FruitBankHybrid.Shared.Pages
//SelectedShippingItem.IsMeasurable = shippingItemFromDb.IsMeasurable;
//SelectedShippingItem.IsMeasured = shippingItemFromDb.IsMeasured;
SelectedShippingDocument.ShippingItems!.UpdateCollection(shippingItemFromDb, false);
SelectedShippingItem.ShippingDocument.ShippingItems?.UpdateCollection(shippingItemFromDb, false);
_shippingItemsDataSource?.UpdateCollection(shippingItemFromDb, false);
SelectedShippingItem = shippingItemFromDb;
StateHasChanged();
@ -171,5 +160,36 @@ namespace FruitBankHybrid.Shared.Pages
//Nem végezhető el a mérés, nincs megadva a ProductId! Jelezze a vezetőségnek...
}
private void PrepareShippingItems(Shipping? shipping)
{
if (shipping?.ShippingDocuments == null) return;
foreach (var shippingShippingDocument in shipping.ShippingDocuments)
{
shippingShippingDocument.Shipping = shipping;
if (shippingShippingDocument.ShippingItems == null) continue;
foreach (var shippingItem in shippingShippingDocument.ShippingItems)
{
shippingItem.ShippingDocument = shippingShippingDocument;
MeasuringValuesHelper.SetShippingItemTotalMeasuringValues(shippingItem);
shippingItem.ShippingItemPallets ??= new List<ShippingItemPallet>(shippingItem.MeasuringCount);
for (var i = shippingItem.ShippingItemPallets.Count; i < shippingItem.MeasuringCount; i++)
{
shippingItem.ShippingItemPallets.Add(new ShippingItemPallet
{
ShippingItemId = shippingItem.Id,
PalletWeight = shippingItem.Pallet?.Weight ?? 0,
TareWeight = shippingItem.ProductDto?.Tare ?? 0,
CreatorId = LoggedInModel.CustomerDto?.Id,
ModifierId = LoggedInModel.CustomerDto?.Id
});
}
}
}
}
}
}

View File

@ -12,7 +12,7 @@
<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.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>

View File

@ -17,8 +17,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.9" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.9" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.10" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Protocols.NewtonsoftJson" Version="9.0.10" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
</ItemGroup>

View File

@ -27,7 +27,7 @@
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">15.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">24.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">33.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
@ -63,9 +63,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="9.0.110" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.110" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.9" />
<PackageReference Include="Microsoft.Maui.Controls" Version="9.0.120" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" Version="9.0.120" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="9.0.10" />
</ItemGroup>
<ItemGroup>