Merge branch 'main' of https://git.aycode.com/Adam/FruitBankHybridApp
This commit is contained in:
commit
fcfe879395
|
|
@ -4,6 +4,7 @@ using FruitBank.Common;
|
||||||
using FruitBank.Common.Loggers;
|
using FruitBank.Common.Loggers;
|
||||||
using FruitBankHybrid.Shared.Services.SignalRs;
|
using FruitBankHybrid.Shared.Services.SignalRs;
|
||||||
using Nop.Core.Domain.Orders;
|
using Nop.Core.Domain.Orders;
|
||||||
|
using Nop.Core.Domain.Payments;
|
||||||
|
|
||||||
namespace FruitBankHybrid.Shared.Tests;
|
namespace FruitBankHybrid.Shared.Tests;
|
||||||
|
|
||||||
|
|
@ -70,7 +71,7 @@ public sealed class OrderClientTests
|
||||||
|
|
||||||
Assert.IsNotNull(orderDtosForMeasuring);
|
Assert.IsNotNull(orderDtosForMeasuring);
|
||||||
//Assert.IsTrue(orderDtosForMeasuring.Any(x=>x.Id ==51));
|
//Assert.IsTrue(orderDtosForMeasuring.Any(x=>x.Id ==51));
|
||||||
Assert.IsTrue(orderDtosForMeasuring.All(o => o.OrderStatus == OrderStatus.Pending));
|
Assert.IsTrue(orderDtosForMeasuring.All(o => o.PaymentStatus < PaymentStatus.Paid));
|
||||||
Assert.IsTrue(orderDtosForMeasuring.Count != 0);
|
Assert.IsTrue(orderDtosForMeasuring.Count != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
<DxGridDataColumn FieldName="MeasurementOwnerId" />
|
<DxGridDataColumn FieldName="MeasurementOwnerId" />
|
||||||
<DxGridDataColumn FieldName="DateOfReceipt" />
|
<DxGridDataColumn FieldName="DateOfReceipt" />
|
||||||
<DxGridDataColumn FieldName="CreatedOnUtc" />
|
<DxGridDataColumn FieldName="CreatedOnUtc" />
|
||||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="110"></DxGridCommandColumn>
|
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@if (IsMasterGrid)
|
@if (IsMasterGrid)
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<DxGridDataColumn FieldName="IsMeasurable" />
|
<DxGridDataColumn FieldName="IsMeasurable" />
|
||||||
<DxGridDataColumn FieldName="IsMeasured" />
|
<DxGridDataColumn FieldName="IsMeasured" />
|
||||||
<DxGridDataColumn FieldName="IsAudited" />
|
<DxGridDataColumn FieldName="IsAudited" />
|
||||||
<DxGridCommandColumn Visible="IsMasterGrid" Width="120"></DxGridCommandColumn>
|
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
<GridDetailOrderItemPallets OrderItemPallets="((OrderItemDto)context.DataItem).OrderItemPallets" />
|
<GridDetailOrderItemPallets OrderItemPallets="((OrderItemDto)context.DataItem).OrderItemPallets" />
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
<DxGridDataColumn FieldName="IsMeasured" />
|
<DxGridDataColumn FieldName="IsMeasured" />
|
||||||
<DxGridDataColumn FieldName="IsAudited" />
|
<DxGridDataColumn FieldName="IsAudited" />
|
||||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="110"></DxGridCommandColumn>
|
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
<GroupSummary>
|
<GroupSummary>
|
||||||
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
<DxGridSummaryItem SummaryType="GridSummaryItemType.Sum"
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<DxGridDataColumn FieldName="IncomingQuantity" />
|
<DxGridDataColumn FieldName="IncomingQuantity" />
|
||||||
<DxGridDataColumn FieldName="NetWeight" />
|
<DxGridDataColumn FieldName="NetWeight" />
|
||||||
<DxGridDataColumn FieldName="IsMeasurable" />
|
<DxGridDataColumn FieldName="IsMeasurable" />
|
||||||
<DxGridCommandColumn Visible="!IsMasterGrid"></DxGridCommandColumn>
|
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@if (IsMasterGrid)
|
@if (IsMasterGrid)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<DxGridDataColumn FieldName="Comment" />
|
<DxGridDataColumn FieldName="Comment" />
|
||||||
<DxGridDataColumn FieldName="Created" />
|
<DxGridDataColumn FieldName="Created" />
|
||||||
<DxGridDataColumn FieldName="Modified" />
|
<DxGridDataColumn FieldName="Modified" />
|
||||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="110"></DxGridCommandColumn>
|
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@if (IsMasterGrid)
|
@if (IsMasterGrid)
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
<DxGridDataColumn FieldName="Created" />
|
<DxGridDataColumn FieldName="Created" />
|
||||||
<DxGridDataColumn FieldName="Modified" />
|
<DxGridDataColumn FieldName="Modified" />
|
||||||
<DxGridCommandColumn Visible="!IsMasterGrid" Width="110"></DxGridCommandColumn>
|
<DxGridCommandColumn Visible="!IsMasterGrid" Width="120"></DxGridCommandColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
<DetailRowTemplate>
|
<DetailRowTemplate>
|
||||||
@* <GridDetailOrderItemPallets OrderItemPallets="((OrderItemDto)context.DataItem).OrderItemPallets" /> *@
|
@* <GridDetailOrderItemPallets OrderItemPallets="((OrderItemDto)context.DataItem).OrderItemPallets" /> *@
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,11 @@
|
||||||
*@
|
*@
|
||||||
<span class="@(ctxShippingitem.DataItem.IsMeasured ? "text-success" : "")">@ctxShippingitem.DisplayText)</span>
|
<span class="@(ctxShippingitem.DataItem.IsMeasured ? "text-success" : "")">@ctxShippingitem.DisplayText)</span>
|
||||||
</ItemDisplayTemplate>
|
</ItemDisplayTemplate>
|
||||||
|
<Buttons>
|
||||||
|
<DxEditorButton IconCssClass="editor-icon editor-icon-add" Text="R" Tooltip="Adatok frissítése..."
|
||||||
|
Click="() => OnOrdersRefreshClick()" />
|
||||||
|
</Buttons>
|
||||||
|
|
||||||
</DxComboBox>
|
</DxComboBox>
|
||||||
</DxFormLayoutItem>
|
</DxFormLayoutItem>
|
||||||
|
|
||||||
|
|
@ -133,7 +138,7 @@
|
||||||
@if (SelectedShippingItem is { ProductId: > 0 })
|
@if (SelectedShippingItem is { ProductId: > 0 })
|
||||||
{
|
{
|
||||||
<h3 style="margin-bottom: 30px;" class="@(SelectedShippingItem.IsMeasured && SelectedShippingItem.ShippingItemPallets!.All(x => x.IsMeasuredAndValid(SelectedShippingItem.IsMeasurable)) ? "text-success" : "")">
|
<h3 style="margin-bottom: 30px;" class="@(SelectedShippingItem.IsMeasured && SelectedShippingItem.ShippingItemPallets!.All(x => x.IsMeasuredAndValid(SelectedShippingItem.IsMeasurable)) ? "text-success" : "")">
|
||||||
@SelectedShippingItem.ProductName
|
#@(SelectedShippingItem.ProductId). @(SelectedShippingItem.ProductName)
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<DxFormLayout Data="@SelectedShippingItem" CaptionPosition="CaptionPosition.Vertical" CssClass="w-100">
|
<DxFormLayout Data="@SelectedShippingItem" CaptionPosition="CaptionPosition.Vertical" CssClass="w-100">
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,10 @@ namespace FruitBankHybrid.Shared.Pages
|
||||||
NotMeasuredShippings = shippings.Where(shipping => MeasurementService.DaysEqual(shipping.ShippingDate.Date, dateTime)).ToList();
|
NotMeasuredShippings = shippings.Where(shipping => MeasurementService.DaysEqual(shipping.ShippingDate.Date, dateTime)).ToList();
|
||||||
|
|
||||||
SelectedShipping = NotMeasuredShippings.FirstOrDefault();
|
SelectedShipping = NotMeasuredShippings.FirstOrDefault();
|
||||||
|
//if (SelectedShipping != null && SelectedShippingItem != null && (SelectedShippingItem.ShippingDocument?.ShippingId ?? 0) == SelectedShipping.Id)
|
||||||
|
//{
|
||||||
|
// SelectedShippingItem = _shippingItemsDataSource.
|
||||||
|
//}
|
||||||
|
|
||||||
LoadingPanelVisible = false;
|
LoadingPanelVisible = false;
|
||||||
}
|
}
|
||||||
|
|
@ -130,6 +134,13 @@ namespace FruitBankHybrid.Shared.Pages
|
||||||
|
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
|
private async Task OnOrdersRefreshClick()
|
||||||
|
{
|
||||||
|
LoadingPanelVisible = true;
|
||||||
|
|
||||||
|
await RefreshShippingsFromDb(SelectedShipping?.ShippingDate ?? DateTime.Now);
|
||||||
|
StateHasChanged();
|
||||||
|
}
|
||||||
|
|
||||||
private Task OnShippingItemPalletValueChanged(ShippingItemPallet shippingItemPallet, ShippingItem shippingItem)
|
private Task OnShippingItemPalletValueChanged(ShippingItemPallet shippingItemPallet, ShippingItem shippingItem)
|
||||||
{
|
{
|
||||||
|
|
@ -140,17 +151,18 @@ namespace FruitBankHybrid.Shared.Pages
|
||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Task OnShippingItemPalletSaved(ShippingItemPallet? responseShippingItemPallet)
|
private async Task OnShippingItemPalletSaved(ShippingItemPallet? responseShippingItemPallet)
|
||||||
{
|
{
|
||||||
if (responseShippingItemPallet != null)
|
if (responseShippingItemPallet != null)
|
||||||
{
|
{
|
||||||
SelectedShippingItem!.ShippingItemPallets!.UpdateCollection(responseShippingItemPallet, false);
|
SelectedShippingItem!.ShippingItemPallets!.UpdateCollection(responseShippingItemPallet, false);
|
||||||
|
SelectedShippingItem.IsMeasured = SelectedShippingItem!.ShippingItemPallets!.All(sip => sip.IsMeasuredAndValid(SelectedShippingItem.IsMeasurable));
|
||||||
|
|
||||||
MeasuringValuesHelper.SetShippingItemTotalMeasuringValues(SelectedShippingItem);
|
MeasuringValuesHelper.SetShippingItemTotalMeasuringValues(SelectedShippingItem);
|
||||||
}
|
}
|
||||||
else DisplayErrorText($"Sikertelen volt a raklap adatainak mentése!");
|
else DisplayErrorText($"Sikertelen volt a raklap adatainak mentése!");
|
||||||
|
|
||||||
StateHasChanged();
|
await InvokeAsync(StateHasChanged);
|
||||||
return Task.CompletedTask;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool IsShippingitemPalletMeasuredAndValid(ShippingItemPallet shippingItemPallet)
|
private bool IsShippingitemPalletMeasuredAndValid(ShippingItemPallet shippingItemPallet)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue