improvements, fixes, etc...

This commit is contained in:
Loretta 2025-09-23 10:41:31 +02:00
parent fa56d6d363
commit 17e4fcf09e
17 changed files with 122 additions and 85 deletions

View File

@ -1,4 +1,5 @@
using FruitBank.Common.Loggers; using FruitBank.Common.Loggers;
using Mango.Nop.Core.Loggers;
namespace FruitBank.Common.Server.Services.Loggers; namespace FruitBank.Common.Server.Services.Loggers;

View File

@ -4,6 +4,7 @@ using AyCode.Services.SignalRs;
using FruitBank.Common.Interfaces; using FruitBank.Common.Interfaces;
using FruitBank.Common.Loggers; using FruitBank.Common.Loggers;
using FruitBank.Common.SignalRs; using FruitBank.Common.SignalRs;
using Mango.Nop.Core.Loggers;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
namespace FruitBank.Common.Server.Services.SignalRs; namespace FruitBank.Common.Server.Services.SignalRs;

View File

@ -16,7 +16,7 @@ public class Partner : MgEntityBase, IPartner
public string City { get; set; } public string City { get; set; }
public string Street { get; set; } public string Street { get; set; }
[Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingDocument.ShippingId))] [Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingDocument.ShippingId), CanBeNull = true)]
public List<ShippingDocument>? ShippingDocuments { get; set; } public List<ShippingDocument>? ShippingDocuments { get; set; }

View File

@ -13,7 +13,7 @@ public class Shipping : MgEntityBase, IShipping
public string LicencePlate { get; set; } public string LicencePlate { get; set; }
public bool IsAllMeasured { get; set; } public bool IsAllMeasured { get; set; }
[Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingDocument.ShippingId))] [Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingDocument.ShippingId), CanBeNull = true)]
public List<ShippingDocument>? ShippingDocuments { get; set; } public List<ShippingDocument>? ShippingDocuments { get; set; }

View File

@ -14,13 +14,13 @@ public class ShippingDocument : MgEntityBase, IShippingDocument
public string Country { get; set; } public string Country { get; set; }
public bool IsAllMeasured { get; set; } public bool IsAllMeasured { get; set; }
[Association(ThisKey = nameof(ShippingId), OtherKey = nameof(Shipping.Id))] [Association(ThisKey = nameof(ShippingId), OtherKey = nameof(Shipping.Id), CanBeNull = true)]
public Shipping? Shipping{ get; set; } public Shipping? Shipping{ get; set; }
[Association(ThisKey = nameof(PartnerId), OtherKey = nameof(Partner.Id))] [Association(ThisKey = nameof(PartnerId), OtherKey = nameof(Partner.Id), CanBeNull = true)]
public Partner? Partner { get; set; } public Partner? Partner { get; set; }
[Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingItem.ShippingDocumentId))] [Association(ThisKey = nameof(Id), OtherKey = nameof(ShippingItem.ShippingDocumentId), CanBeNull = true)]
public List<ShippingItem>? ShippingItems { get; set; } public List<ShippingItem>? ShippingItems { get; set; }

View File

@ -6,6 +6,7 @@ using Mango.Nop.Core.Entities;
using Nop.Core.Domain.Customers; using Nop.Core.Domain.Customers;
using Nop.Core.Domain.Orders; using Nop.Core.Domain.Orders;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Nop.Core.Domain.Catalog;
using DataType = LinqToDB.DataType; using DataType = LinqToDB.DataType;
namespace FruitBank.Common.Entities; namespace FruitBank.Common.Entities;
@ -20,28 +21,42 @@ public class ShippingItem : MgEntityBase, IShippingItem
public int ShippingDocumentId { get; set; } public int ShippingDocumentId { get; set; }
public string Name { get; set; } public string Name { get; set; }
[Column(DataType = DataType.DecFloat)]
public double NetWeight { get; set; }
[Column(DataType = DataType.DecFloat)]
public double GrossWeight { get; set; }
public int Quantity { get; set; }
[Column(DataType = DataType.DecFloat)] public double NetWeight { get; set; }
[Column(DataType = DataType.DecFloat)] public double GrossWeight { get; set; }
[Nullable]
[Column(CanBeNull = true)]
[Range(1, 100000, ErrorMessage = "The MeasuredQuantity value should be a number between 1 and 100,000.")]
public int? MeasuredQuantity { get; set; }
[Nullable]
[Column(DataType = DataType.DecFloat, CanBeNull = true)] [Column(DataType = DataType.DecFloat, CanBeNull = true)]
[Required]
[Range(1, 100000, ErrorMessage = "The MeasuredNetWeight value should be a number between 1 and 100,000.")] [Range(1, 100000, ErrorMessage = "The MeasuredNetWeight value should be a number between 1 and 100,000.")]
public double? MeasuredNetWeight { get; set; } public double? MeasuredNetWeight { get; set; }
[Nullable]
[Column(DataType = DataType.DecFloat, CanBeNull = true)] [Column(DataType = DataType.DecFloat, CanBeNull = true)]
[Required]
[Range(1, 100000, ErrorMessage = "The MeasuredGrossWeight value should be a number between 1 and 100,000.")] [Range(1, 100000, ErrorMessage = "The MeasuredGrossWeight value should be a number between 1 and 100,000.")]
public double? MeasuredGrossWeight { get; set; } public double? MeasuredGrossWeight { get; set; }
public bool IsMeasurable { get; set; }
public bool IsMeasured { get; set; } public bool IsMeasured { get; set; }
[LinqToDB.Mapping.Association(ThisKey = nameof(ShippingDocumentId), OtherKey = nameof(ShippingDocument.Id))] [LinqToDB.Mapping.Association(ThisKey = nameof(ProductId), OtherKey = nameof(Product.Id), CanBeNull = true)]
public Product? Product { get; set; }
[LinqToDB.Mapping.Association(ThisKey = nameof(ShippingDocumentId), OtherKey = nameof(ShippingDocument.Id), CanBeNull = true)]
public ShippingDocument? ShippingDocument { get; set; } public ShippingDocument? ShippingDocument { get; set; }
[SkipValuesOnUpdate] public DateTime Created { get; set; }
[SkipValuesOnUpdate]
public DateTime Created { get; set; }
public DateTime Modified { get; set; } public DateTime Modified { get; set; }
public bool IsValidMeasuringValues()
{
return /*ProductId > 0 && */MeasuredQuantity > 0 && (!IsMeasurable || (MeasuredNetWeight > 0 && MeasuredGrossWeight > 0));
}
} }

View File

@ -27,6 +27,7 @@ public interface IFruitBankDataControllerCommon
public Task<List<ShippingItem>?> GetShippingItems(); public Task<List<ShippingItem>?> GetShippingItems();
public Task<ShippingItem?> GetShippingItemById(int id); public Task<ShippingItem?> GetShippingItemById(int id);
public Task<ShippingItem?> UpdateShippingItem(ShippingItem shippingItem); public Task<ShippingItem?> UpdateShippingItem(ShippingItem shippingItem);
public Task<ShippingItem?> UpdateMeasuredShippingItem(ShippingItem shippingItem);
#endregion ShippingItem #endregion ShippingItem
#region ShippingDocument #region ShippingDocument

View File

@ -13,5 +13,6 @@ public interface IShippingDocument: IEntityInt, ITimeStampInfo
public bool IsAllMeasured { get; set; } public bool IsAllMeasured { get; set; }
public Partner? Partner { get; set; } public Partner? Partner { get; set; }
public Shipping? Shipping{ get; set; }
public List<ShippingItem>? ShippingItems { get; set; } public List<ShippingItem>? ShippingItems { get; set; }
} }

View File

@ -1,5 +1,7 @@
using AyCode.Interfaces.Entities; using AyCode.Interfaces.Entities;
using AyCode.Interfaces.TimeStampInfo; using AyCode.Interfaces.TimeStampInfo;
using FruitBank.Common.Entities;
using Nop.Core.Domain.Catalog;
namespace FruitBank.Common.Interfaces; namespace FruitBank.Common.Interfaces;
@ -9,10 +11,19 @@ public interface IShippingItem : IEntityInt, ITimeStampInfo
int? ProductId { get; set; } int? ProductId { get; set; }
string Name { get; set; } string Name { get; set; }
int Quantity { get; set; }
double NetWeight { get; set; } double NetWeight { get; set; }
double GrossWeight { get; set; } double GrossWeight { get; set; }
int? MeasuredQuantity { get; set; }
double? MeasuredNetWeight { get; set; } double? MeasuredNetWeight { get; set; }
double? MeasuredGrossWeight { get; set; } double? MeasuredGrossWeight { get; set; }
bool IsMeasurable { get; set; }
bool IsMeasured { get; set; } bool IsMeasured { get; set; }
public Product? Product { get; set; }
public ShippingDocument? ShippingDocument { get; set; }
public bool IsValidMeasuringValues();
} }

View File

@ -1,12 +0,0 @@
using AyCode.Core.Loggers;
namespace FruitBank.Common.Loggers;
public interface ILogger<TCategory> : ILogger
{
}
public interface ILogger : IAcLoggerBase
{
}

View File

@ -1,32 +0,0 @@
using AyCode.Core.Enums;
using AyCode.Core.Loggers;
namespace FruitBank.Common.Loggers;
public class Logger<TCategory> : Logger, ILogger<TCategory>
{
public Logger() : base(typeof(TCategory).Name)
{ }
public Logger(params IAcLogWriterBase[] logWriters) : base(typeof(TCategory).Name, logWriters)
{ }
public Logger(AppType appType, LogLevel logLevel, params IAcLogWriterBase[] logWriters) : base(appType, logLevel, typeof(TCategory).Name, logWriters)
{ }
}
public class Logger : AcLoggerBase, ILogger
{
public Logger() : this(null)
{
}
public Logger(string? categoryName) : base(categoryName)
{ }
public Logger(string? categoryName, params IAcLogWriterBase[] logWriters) : base(categoryName, logWriters)
{ }
public Logger(AppType appType, LogLevel logLevel, string? categoryName, params IAcLogWriterBase[] logWriters) : base(appType, logLevel, categoryName, logWriters)
{ }
}

View File

@ -24,6 +24,7 @@ public class SignalRTags : AcSignalRTags
public const int GetShippingItemById = 51; public const int GetShippingItemById = 51;
public const int AddShippingItem = 55; public const int AddShippingItem = 55;
public const int UpdateShippingItem = 56; public const int UpdateShippingItem = 56;
public const int UpdateMeasuredShippingItem = 57;
public const int GetShippingDocuments = 60; public const int GetShippingDocuments = 60;
public const int GetShippingDocumentById = 61; public const int GetShippingDocumentById = 61;

View File

@ -6,6 +6,7 @@ using FruitBank.Common.Loggers;
using FruitBankHybrid.Shared.Services.Loggers; using FruitBankHybrid.Shared.Services.Loggers;
using FruitBankHybrid.Shared.Services.SignalRs; using FruitBankHybrid.Shared.Services.SignalRs;
using Mango.Nop.Core.Dtos; using Mango.Nop.Core.Dtos;
using Mango.Nop.Core.Loggers;
using Mango.Nop.Core.Models; using Mango.Nop.Core.Models;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Web; using Microsoft.AspNetCore.Components.Web;

View File

@ -100,19 +100,36 @@
<EditForm Model="@SelectedShippingItem" Context="FrmContext" <EditForm Model="@SelectedShippingItem" Context="FrmContext"
OnValidSubmit="@HandleValidSubmit" OnValidSubmit="@HandleValidSubmit"
OnInvalidSubmit="@HandleInvalidSubmit"> OnInvalidSubmit="@HandleInvalidSubmit">
<DataAnnotationsValidator /> @* <DataAnnotationsValidator /> *@
<DxFormLayout Data="@SelectedShippingItem" CaptionPosition="CaptionPosition.Vertical" CssClass="w-100" ItemUpdating="@((pair) => OnItemUpdating(pair.Key, pair.Value))"> <DxFormLayout Data="@SelectedShippingItem" CaptionPosition="CaptionPosition.Vertical" CssClass="w-100" ItemUpdating="@((pair) => OnItemUpdating(pair.Key, pair.Value))">
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.Name)" Caption="Item Name:" Enabled="false" ColSpanMd="6" /> <DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.Name)" Caption="Item Name:" Enabled="false" ColSpanMd="6" />
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.GrossWeight)" Caption="GrossWeight:" Enabled="false" ColSpanMd="3" /> <DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.GrossWeight)" Caption="GrossWeight:" Enabled="false" ColSpanMd="3" />
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.NetWeight)" Caption="NetWeight:" Enabled="false" ColSpanMd="3" /> <DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.NetWeight)" Caption="NetWeight:" Enabled="false" ColSpanMd="3" />
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.MeasuredGrossWeight)" Caption="MeasuredGrossWeight:" ColSpanMd="3" BeginRow="true"> <DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
Field="@nameof(ShippingItem.MeasuredQuantity)"
Caption="MeasuredQuantity:"
ColSpanMd="2"
BeginRow="true">
</DxFormLayoutItem> </DxFormLayoutItem>
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.MeasuredNetWeight)" Caption="MeasuredNetWeight:" ColSpanMd="3"> <DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
Field="@nameof(ShippingItem.MeasuredGrossWeight)"
Enabled="@(SelectedShippingItem.IsMeasurable)"
Caption="MeasuredGrossWeight:"
ColSpanMd="2">
</DxFormLayoutItem> </DxFormLayoutItem>
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")" Field="@nameof(ShippingItem.IsMeasured)" Enabled="false" Caption="Sikeres mérés:" ColSpanMd="6"> <DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
Field="@nameof(ShippingItem.MeasuredNetWeight)"
Enabled="@(SelectedShippingItem.IsMeasurable)"
Caption="MeasuredNetWeight:"
ColSpanMd="2">
</DxFormLayoutItem>
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
Field="@nameof(ShippingItem.IsMeasured)"
Enabled="false" Caption="Sikeres mérés:" ColSpanMd="6">
</DxFormLayoutItem> </DxFormLayoutItem>
<DxFormLayoutItem ColSpanMd="12" BeginRow="true"> <DxFormLayoutItem ColSpanMd="12" BeginRow="true">

View File

@ -2,13 +2,16 @@
using AyCode.Core.Loggers; using AyCode.Core.Loggers;
using AyCode.Models.Users; using AyCode.Models.Users;
using DevExpress.Blazor; using DevExpress.Blazor;
using DevExpress.Data.Mask.Internal;
using FruitBank.Common.Entities; using FruitBank.Common.Entities;
using FruitBank.Common.Interfaces;
using FruitBank.Common.Loggers; using FruitBank.Common.Loggers;
using FruitBank.Common.Models; using FruitBank.Common.Models;
using FruitBankHybrid.Shared.Services.Loggers; using FruitBankHybrid.Shared.Services.Loggers;
using FruitBankHybrid.Shared.Services.SignalRs; using FruitBankHybrid.Shared.Services.SignalRs;
using Mango.Nop.Core.Dtos; using Mango.Nop.Core.Dtos;
using Microsoft.AspNetCore.Components; using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.Forms;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
using Microsoft.JSInterop; using Microsoft.JSInterop;
using System; using System;
@ -17,21 +20,21 @@ using System.Linq;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using DevExpress.Data.Mask.Internal;
using Microsoft.AspNetCore.Components.Forms;
using static System.Net.Mime.MediaTypeNames; using static System.Net.Mime.MediaTypeNames;
using static System.Runtime.InteropServices.JavaScript.JSType; using static System.Runtime.InteropServices.JavaScript.JSType;
using ILogger = FruitBank.Common.Loggers.ILogger; using ILogger = Mango.Nop.Core.Loggers.ILogger;
namespace FruitBankHybrid.Shared.Pages namespace FruitBankHybrid.Shared.Pages
{ {
public class ShippingDateModel public class ShippingDateModel
{ {
public int ShippingId { get; set; }
public DateTime DateTime { get; set; } public DateTime DateTime { get; set; }
public bool IsMeasured { get; set; } public bool IsMeasured { get; set; }
public ShippingDateModel(DateTime dateTime, bool isMeasured) public ShippingDateModel(int shippingId, DateTime dateTime, bool isMeasured)
{ {
ShippingId = shippingId;
DateTime = dateTime; DateTime = dateTime;
IsMeasured = isMeasured; IsMeasured = isMeasured;
} }
@ -70,8 +73,8 @@ namespace FruitBankHybrid.Shared.Pages
{ {
var shippings = await FruitBankSignalRClient.GetShippings() ?? []; var shippings = await FruitBankSignalRClient.GetShippings() ?? [];
_shippingDates = shippings.Select(x => new ShippingDateModel(x.ShippingDate.Date, x.IsAllMeasured)).ToList(); _shippingDates = shippings.Select(shipping => new ShippingDateModel(shipping.Id, shipping.ShippingDate.Date, shipping.IsAllMeasured)).ToList();
NotMeasuredShippings = shippings.Where(x => DaysEqual(x.ShippingDate.Date, dateTime)).ToList(); NotMeasuredShippings = shippings.Where(shipping => DaysEqual(shipping.ShippingDate.Date, dateTime)).ToList();
//if (getAllShipping) NotMeasuredShippings = await FruitBankSignalRClient.GetShippings() ?? []; //if (getAllShipping) NotMeasuredShippings = await FruitBankSignalRClient.GetShippings() ?? [];
//else NotMeasuredShippings = await FruitBankSignalRClient.GetNotMeasuredShippings() ?? []; //else NotMeasuredShippings = await FruitBankSignalRClient.GetNotMeasuredShippings() ?? [];
@ -135,10 +138,23 @@ namespace FruitBankHybrid.Shared.Pages
{ {
if (SelectedShippingItem == null || shippingItemFromDb == null) return; if (SelectedShippingItem == null || shippingItemFromDb == null) return;
SelectedShippingItem.MeasuredQuantity = shippingItemFromDb.MeasuredQuantity;
SelectedShippingItem.MeasuredNetWeight = shippingItemFromDb.MeasuredNetWeight; SelectedShippingItem.MeasuredNetWeight = shippingItemFromDb.MeasuredNetWeight;
SelectedShippingItem.MeasuredGrossWeight = shippingItemFromDb.MeasuredGrossWeight; SelectedShippingItem.MeasuredGrossWeight = shippingItemFromDb.MeasuredGrossWeight;
SelectedShippingItem.IsMeasured = shippingItemFromDb.IsMeasured; SelectedShippingItem.IsMeasured = shippingItemFromDb.IsMeasured;
if (SelectedShippingDocument != null)
SelectedShippingDocument.IsAllMeasured = SelectedShippingDocument.ShippingItems?.All(si => si.IsMeasured) ?? false;
if (SelectedShipping != null)
{
SelectedShipping.IsAllMeasured = SelectedShipping.ShippingDocuments?.All(sd => sd.IsAllMeasured) ?? false;
var shippingDate = _shippingDates.FirstOrDefault(shipping => shipping.ShippingId == SelectedShipping.Id);
if (shippingDate != null) shippingDate.IsMeasured = SelectedShipping.IsAllMeasured;
}
//if (SelectedShippingItem is { IsMeasured: true }) //if (SelectedShippingItem is { IsMeasured: true })
//{ //{
// SelectedShippingDocument?.ShippingItems?.Remove(SelectedShippingItem); // SelectedShippingDocument?.ShippingItems?.Remove(SelectedShippingItem);
@ -150,12 +166,20 @@ namespace FruitBankHybrid.Shared.Pages
private async Task UpdateShippingItem(ShippingItem? shippingItem) private async Task UpdateShippingItem(ShippingItem? shippingItem)
{ {
if (shippingItem is { MeasuredGrossWeight: > 0, MeasuredNetWeight: > 0 }) if (shippingItem != null && shippingItem.IsValidMeasuringValues())
{ {
BtnSaveEnabled = false; BtnSaveEnabled = false;
shippingItem.IsMeasured = shippingItem is { MeasuredGrossWeight: > 0, MeasuredNetWeight: > 0 }; var updatedShippingItem = await FruitBankSignalRClient.UpdateMeasuredShippingItem(shippingItem);
RefreshSelectedShippingItemMeasuredValuesFromDb(await FruitBankSignalRClient.UpdateShippingItem(shippingItem)); if (updatedShippingItem == null)
{
_logger.Error($"Sikertelen volt a shippingItem mentése! Id: {shippingItem.Id}");
//TODO: - J.
return;
}
RefreshSelectedShippingItemMeasuredValuesFromDb(updatedShippingItem);
} }
} }
@ -176,24 +200,27 @@ namespace FruitBankHybrid.Shared.Pages
switch (fieldName) switch (fieldName)
{ {
case nameof(ShippingItem.Name): //case nameof(ShippingItem.Name):
SelectedShippingItem.Name = newValue.ToString() ?? string.Empty; // SelectedShippingItem.Name = newValue.ToString() ?? string.Empty;
break; // break;
case nameof(ShippingItem.GrossWeight): //case nameof(ShippingItem.GrossWeight):
SelectedShippingItem.GrossWeight = (double)newValue; // SelectedShippingItem.GrossWeight = (double)newValue;
break; // break;
case nameof(ShippingItem.NetWeight): //case nameof(ShippingItem.NetWeight):
SelectedShippingItem.NetWeight = (double)newValue; // SelectedShippingItem.NetWeight = (double)newValue;
break; // break;
case nameof(ShippingItem.MeasuredGrossWeight): case nameof(ShippingItem.MeasuredQuantity):
SelectedShippingItem.MeasuredGrossWeight = (double)newValue; SelectedShippingItem.MeasuredQuantity = (int)newValue <= 0 ? null : (int)newValue;
break; break;
case nameof(ShippingItem.MeasuredNetWeight): case nameof(ShippingItem.MeasuredNetWeight):
SelectedShippingItem.MeasuredNetWeight = (double)newValue; SelectedShippingItem.MeasuredNetWeight = !SelectedShippingItem.IsMeasurable || (double)newValue <= 0 ? null : (double)newValue;
break;
case nameof(ShippingItem.MeasuredGrossWeight):
SelectedShippingItem.MeasuredGrossWeight = !SelectedShippingItem.IsMeasurable || (double)newValue <= 0 ? null : (double)newValue;
break; break;
} }
//if (SelectedShippingItem.MeasuredGrossWeight > 0 && SelectedShippingItem.MeasuredNetWeight > 0) if (SelectedShippingItem.IsValidMeasuringValues())
BtnSaveEnabled = true; BtnSaveEnabled = true;
} }

View File

@ -2,6 +2,7 @@
using AyCode.Core.Loggers; using AyCode.Core.Loggers;
using FruitBank.Common; using FruitBank.Common;
using FruitBank.Common.Loggers; using FruitBank.Common.Loggers;
using Mango.Nop.Core.Loggers;
namespace FruitBankHybrid.Shared.Services.Loggers; namespace FruitBankHybrid.Shared.Services.Loggers;

View File

@ -72,6 +72,10 @@ namespace FruitBankHybrid.Shared.Services.SignalRs
public Task<ShippingItem?> UpdateShippingItem(ShippingItem shippingItem) public Task<ShippingItem?> UpdateShippingItem(ShippingItem shippingItem)
=> PostDataAsync(SignalRTags.UpdateShippingItem, shippingItem); => PostDataAsync(SignalRTags.UpdateShippingItem, shippingItem);
public Task<ShippingItem?> UpdateMeasuredShippingItem(ShippingItem shippingItem)
=> PostDataAsync(SignalRTags.UpdateMeasuredShippingItem, shippingItem);
#endregion ShippingItem #endregion ShippingItem
#region ShippingDocument #region ShippingDocument