improvements, fixes, etc...
This commit is contained in:
parent
9c91650c6d
commit
0c2c5ab8ee
|
|
@ -1,4 +1,6 @@
|
|||
namespace FruitBank.Common.Interfaces;
|
||||
using System.Runtime;
|
||||
|
||||
namespace FruitBank.Common.Interfaces;
|
||||
|
||||
public class MeasuringAttributeValues : IMeasuringAttributeValues
|
||||
{
|
||||
|
|
@ -22,6 +24,10 @@ public class MeasuringAttributeValues : IMeasuringAttributeValues
|
|||
IsMeasurable = isMeasurable;
|
||||
}
|
||||
|
||||
public bool HasValues()
|
||||
=> NetWeight != null && GrossWeight != null && IsMeasurable != null;
|
||||
public bool HasValues() => NetWeight != null && GrossWeight != null && IsMeasurable != null;
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"NetWeight: {NetWeight}; GrossWeight: {GrossWeight}; IsMeasurable: {IsMeasurable}";
|
||||
}
|
||||
}
|
||||
|
|
@ -30,13 +30,14 @@
|
|||
</NavLink>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="Login">
|
||||
<span class="icon weather-icon" aria-hidden="true"></span> Bejelentkezés
|
||||
</NavLink>
|
||||
</div>
|
||||
|
||||
else
|
||||
{
|
||||
<div class="nav-item px-3">
|
||||
<NavLink class="nav-link" href="Login">
|
||||
<span class="icon weather-icon" aria-hidden="true"></span> Bejelentkezés
|
||||
</NavLink>
|
||||
</div>
|
||||
}
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@
|
|||
|
||||
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
||||
Field="@nameof(ShippingItem.MeasuredQuantity)"
|
||||
Enabled="@(SelectedShippingItem.ProductId.GetValueOrDefault(0) > 0)"
|
||||
Caption="MeasuredQuantity:"
|
||||
ColSpanMd="2"
|
||||
BeginRow="false">
|
||||
|
|
@ -115,14 +116,14 @@
|
|||
|
||||
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
||||
Field="@nameof(ShippingItem.MeasuredGrossWeight)"
|
||||
Enabled="@(SelectedShippingItem.IsMeasurable)"
|
||||
Enabled="@(SelectedShippingItem.IsMeasurable && SelectedShippingItem.ProductId.GetValueOrDefault(0) > 0)"
|
||||
Caption="MeasuredGrossWeight:"
|
||||
ColSpanMd="2">
|
||||
</DxFormLayoutItem>
|
||||
|
||||
<DxFormLayoutItem CaptionCssClass="@(SelectedShippingItem.IsMeasured ? "text-success" : "")"
|
||||
Field="@nameof(ShippingItem.MeasuredNetWeight)"
|
||||
Enabled="@(SelectedShippingItem.IsMeasurable)"
|
||||
Enabled="@(SelectedShippingItem.IsMeasurable && SelectedShippingItem.ProductId.GetValueOrDefault(0) > 0)"
|
||||
Caption="MeasuredNetWeight:"
|
||||
ColSpanMd="2">
|
||||
</DxFormLayoutItem>
|
||||
|
|
@ -136,9 +137,18 @@
|
|||
<ValidationSummary />
|
||||
</DxFormLayoutItem>
|
||||
|
||||
<DxFormLayoutItem ColSpanMd="12" BeginRow="true">
|
||||
<DxButton Text="@(SelectedShippingItem.IsMeasured ? "Módosít" : "Mentés")" Enabled="BtnSaveEnabled" SubmitFormOnClick="true" CssClass="w-100" />
|
||||
</DxFormLayoutItem>
|
||||
@if (SelectedShippingItem.ProductId.GetValueOrDefault(0) > 0)
|
||||
{
|
||||
<DxFormLayoutItem ColSpanMd="12" BeginRow="true">
|
||||
<DxButton Text="@(SelectedShippingItem.IsMeasured ? "Módosít" : "Mentés")" Enabled="BtnSaveEnabled" SubmitFormOnClick="true" CssClass="w-100"/>
|
||||
</DxFormLayoutItem>
|
||||
}
|
||||
else
|
||||
{
|
||||
<DxFormLayoutItem ColSpanMd="12" BeginRow="true">
|
||||
<text>Nem végezhető el a mérés, nincs megadva a ProductId! Jelezze a vezetőségnek...</text>
|
||||
</DxFormLayoutItem>
|
||||
}
|
||||
</DxFormLayout>
|
||||
</EditForm>
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue