fixes, improvements, etc...
This commit is contained in:
parent
2d03a6d60b
commit
95933933b8
|
|
@ -35,7 +35,8 @@
|
|||
<HintPath>..\..\..\..\Aycode\Source\AyCode.Core\AyCode.Services.Server\bin\FruitBank\Debug\net9.0\AyCode.Services.Server.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Core">
|
||||
<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.9\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>
|
||||
<!--<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.9\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>-->
|
||||
<HintPath>C:\Program Files\dotnet\packs\Microsoft.AspNetCore.App.Ref\9.0.10\ref\net9.0\Microsoft.AspNetCore.SignalR.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mango.Nop.Core">
|
||||
<HintPath>..\..\NopCommerce.Common\4.70\Libraries\Mango.Nop.Core\bin\FruitBank\Debug\net9.0\Mango.Nop.Core.dll</HintPath>
|
||||
|
|
|
|||
|
|
@ -5,16 +5,29 @@ namespace FruitBankHybrid.Shared.Extensions;
|
|||
|
||||
public static class DevextremeComponentExtension
|
||||
{
|
||||
public static async Task ShowMessageBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle, MessageBoxType messageBoxType = MessageBoxType.Alert)
|
||||
public static async Task ShowMessageBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle)
|
||||
{
|
||||
var messageBoxOptions = CreateMessageBoxOptions(title, text, messageBoxRenderStyle);
|
||||
|
||||
await messageBox.AlertAsync(messageBoxOptions);
|
||||
}
|
||||
|
||||
public static async Task<bool> ShowConfirmBoxAsync(this IDialogService messageBox, string title, string text, MessageBoxRenderStyle messageBoxRenderStyle)
|
||||
{
|
||||
var messageBoxOptions = CreateMessageBoxOptions(title, text, messageBoxRenderStyle);
|
||||
|
||||
return await messageBox.ConfirmAsync(messageBoxOptions);
|
||||
}
|
||||
|
||||
private static MessageBoxOptions CreateMessageBoxOptions(string title, string text, MessageBoxRenderStyle messageBoxRenderStyle)
|
||||
{
|
||||
var messageBoxOptions = new MessageBoxOptions
|
||||
{
|
||||
Title = title,
|
||||
Text = text,
|
||||
RenderStyle = messageBoxRenderStyle,
|
||||
ShowIcon = false
|
||||
};
|
||||
|
||||
if (messageBoxType == MessageBoxType.Alert) await messageBox.AlertAsync(messageBoxOptions);
|
||||
else await messageBox.ConfirmAsync(messageBoxOptions);
|
||||
return messageBoxOptions;
|
||||
}
|
||||
}
|
||||
|
|
@ -11,6 +11,14 @@
|
|||
<h3>Bejövő mérés</h3>
|
||||
|
||||
<div style="margin-top: 50px;">
|
||||
<DxLoadingPanel @bind-Visible="LoadingPanelVisible"
|
||||
IsContentBlocked="true"
|
||||
ApplyBackgroundShading="true"
|
||||
IndicatorAreaVisible="true"
|
||||
IsContentVisible="true"
|
||||
IndicatorAnimationType="WaitIndicatorAnimationType.Spin"
|
||||
Text="Adatok szinkronizálása folyamatban...">
|
||||
|
||||
<DxFormLayout CaptionPosition="CaptionPosition.Vertical" CssClass="w-100">
|
||||
<DxFormLayoutItem Caption="Érkezés dátuma" ColSpanMd="2" CaptionCssClass="@(SelectedShipping != null && _measuringDates.Where(x => MeasuringService.DaysEqual(x.DateTime, SelectedShipping.ShippingDate)).All(x => x.IsMeasured) ? "text-success" : "")">
|
||||
<DxDateEdit CssClass="cw-320"
|
||||
|
|
@ -55,7 +63,7 @@
|
|||
</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"
|
||||
|
|
@ -119,9 +127,8 @@
|
|||
|
||||
</DxFormLayoutItem>
|
||||
</DxFormLayout>
|
||||
</div>
|
||||
|
||||
<div style="margin-top: 50px;">
|
||||
<div style="margin-top: 50px;">
|
||||
@if (SelectedShippingItem is { ProductId: > 0 })
|
||||
{
|
||||
<h3 style="margin-bottom: 30px;" class="@(SelectedShippingItem.IsMeasured && SelectedShippingItem.ShippingItemPallets!.All(x => x.IsMeasuredAndValid(SelectedShippingItem.IsMeasurable)) ? "text-success" : "")">
|
||||
|
|
@ -149,13 +156,13 @@
|
|||
<DxFormLayoutItem Context="vfdfgfd" ColSpanMd="12" BeginRow="true">
|
||||
<DxFormLayout CssClass="w-100">
|
||||
<DxFormLayoutItem ColSpanMd="1" BeginRow="false"><strong>TOTAL:</strong></DxFormLayoutItem>
|
||||
<DxFormLayoutItem ColSpanMd="2" BeginRow="false"/>
|
||||
<DxFormLayoutItem ColSpanMd="2" BeginRow="false"/>
|
||||
<DxFormLayoutItem ColSpanMd="1" BeginRow="false"/>
|
||||
<DxFormLayoutItem ColSpanMd="2" BeginRow="false" />
|
||||
<DxFormLayoutItem ColSpanMd="2" BeginRow="false" />
|
||||
<DxFormLayoutItem ColSpanMd="1" BeginRow="false" />
|
||||
<DxFormLayoutItem ColSpanMd="2" BeginRow="false"><strong>@(SelectedShippingItem.MeasuredQuantity) db</strong></DxFormLayoutItem>
|
||||
<DxFormLayoutItem ColSpanMd="2" BeginRow="false"><strong>@(SelectedShippingItem.MeasuredGrossWeight) kg</strong></DxFormLayoutItem>
|
||||
<DxFormLayoutItem ColSpanMd="1" BeginRow="false"><strong>@(SelectedShippingItem.MeasuredNetWeight) kg</strong></DxFormLayoutItem>
|
||||
<DxFormLayoutItem ColSpanMd="1" BeginRow="false"/>
|
||||
<DxFormLayoutItem ColSpanMd="1" BeginRow="false" />
|
||||
</DxFormLayout>
|
||||
</DxFormLayoutItem>
|
||||
|
||||
|
|
@ -172,4 +179,6 @@
|
|||
}
|
||||
</DxFormLayout>
|
||||
}
|
||||
</div>
|
||||
</DxLoadingPanel>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ namespace FruitBankHybrid.Shared.Pages
|
|||
//private ShippingDocument? SelectedShippingDocument { get; set; }
|
||||
private ShippingItem? SelectedShippingItem { get; set; }
|
||||
|
||||
public bool LoadingPanelVisible { get; set; } = true;
|
||||
protected bool BtnSaveEnabled { get; set; }
|
||||
|
||||
private List<ShippingItem>? _shippingItemsDataSource;
|
||||
|
|
@ -36,6 +37,8 @@ namespace FruitBankHybrid.Shared.Pages
|
|||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
LoadingPanelVisible = true;
|
||||
|
||||
_logger = new LoggerClient<MeasuringIn>(LogWriters.ToArray());
|
||||
_logger.Info("OnInitializedAsync");
|
||||
|
||||
|
|
@ -51,6 +54,8 @@ namespace FruitBankHybrid.Shared.Pages
|
|||
NotMeasuredShippings = shippings.Where(shipping => MeasuringService.DaysEqual(shipping.ShippingDate.Date, dateTime)).ToList();
|
||||
|
||||
SelectedShipping = NotMeasuredShippings.FirstOrDefault();
|
||||
|
||||
LoadingPanelVisible = false;
|
||||
}
|
||||
|
||||
private static List<ShippingItem>? GetShippingItemsDataSource(Shipping? shipping)
|
||||
|
|
|
|||
|
|
@ -12,13 +12,14 @@
|
|||
<DxDialogProvider />
|
||||
|
||||
<div style="margin-top: 50px;">
|
||||
|
||||
<DxLoadingPanel @bind-Visible="LoadingPanelVisible"
|
||||
IsContentBlocked="true"
|
||||
ApplyBackgroundShading="true"
|
||||
IndicatorAreaVisible="true"
|
||||
IsContentVisible="true"
|
||||
IndicatorAnimationType="WaitIndicatorAnimationType.Spin"
|
||||
Text="Adatok betöltése...">
|
||||
Text="Adatok szinkronizálása folyamatban...">
|
||||
|
||||
<DxFormLayout CaptionPosition="CaptionPosition.Vertical" CssClass="w-100">
|
||||
<DxFormLayoutItem Caption="Átvétel dátuma" ColSpanMd="2"
|
||||
|
|
@ -69,19 +70,25 @@
|
|||
</DxComboBox>
|
||||
</DxFormLayoutItem>
|
||||
|
||||
@if (HasMeasuringAccess && SelectedOrder?.MeasurementOwnerId == 0)
|
||||
@switch (SelectedOrder)
|
||||
{
|
||||
case null:
|
||||
<DxFormLayoutItem ColSpanMd="2" />
|
||||
break;
|
||||
|
||||
case { MeasurementOwnerId: 0, IsComplete: false } when HasMeasuringAccess:
|
||||
<DxFormLayoutItem ColSpanMd="2">
|
||||
<DxButton Enabled="@(HasMeasuringAccess && SelectedOrder?.MeasurementOwnerId == 0)" Visible="@(SelectedOrder != null)" CssClass="w-100"
|
||||
Text="@(HasMeasuringAccess && SelectedOrder?.MeasurementOwnerId == 0 ? "Mérés indítása" : "Mérés folyamatban...")"
|
||||
Click="() => OnStartMeasuringClick()" />
|
||||
</DxFormLayoutItem>
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
|
||||
default:
|
||||
<DxFormLayoutItem ColSpanMd="2" Caption="Mérést indította" CaptionCssClass="@(SelectedOrder?.IsMeasured == true ? "text-success" : "")">
|
||||
<DxTextBox Enabled="false" Text="@(LoggedInModel.MeasuringUsers.FirstOrDefault(x => x.Id == SelectedOrder?.MeasurementOwnerId)?.Email)" />
|
||||
<DxTextBox Enabled="false" Text="@(LoggedInModel.MeasuringUsers.FirstOrDefault(x => x.Id == SelectedOrder?.MeasurementOwnerId)?.FullName)" />
|
||||
</DxFormLayoutItem>
|
||||
break;
|
||||
}
|
||||
|
||||
<DxFormLayoutItem ColSpanMd="1"></DxFormLayoutItem>
|
||||
|
|
@ -96,7 +103,7 @@
|
|||
}
|
||||
</DxFormLayout>
|
||||
|
||||
@if (SelectedOrder == null)
|
||||
@if (SelectedOrder == null || LoadingPanelVisible)
|
||||
{
|
||||
}
|
||||
else if (!HasMeasuringAccess)
|
||||
|
|
@ -110,9 +117,9 @@
|
|||
//Átvétel dátuma október 23. [AUDITED] 15:51 - Vegetable Kft. Rendelés azonosító: #8
|
||||
|
||||
<div style="margin-top: 50px;">
|
||||
<h3 style="margin-bottom: 30px;" class="@(SelectedOrder?.IsMeasured == true ? "text-success" : "")">
|
||||
<h4 style="margin-bottom: 30px;" class="@(SelectedOrder?.IsMeasured == true ? "text-success" : "")">
|
||||
Rendelés azonosító: #@(SelectedOrder?.CustomOrderNumber)
|
||||
</h3>
|
||||
</h4>
|
||||
|
||||
<DxAccordion Data="@SelectedOrder?.OrderItemDtos" Enabled="@(HasMeasuringAccess && SelectedOrder?.MeasurementOwnerId > 0 && !(SelectedOrder?.IsComplete ?? false))"
|
||||
ExpandMode="AccordionExpandMode.SingleOrNone"
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace FruitBankHybrid.Shared.Pages
|
|||
private async Task RefreshOrdersFromDb(DateTime dateTime)
|
||||
{
|
||||
LoadingPanelVisible = true;
|
||||
var orders = (await FruitBankSignalRClient.GetPendingOrderDtos() ?? []);//.Where(o => o.HasMeasuringAccess(LoggedInModel.CustomerDto?.Id, LoggedInModel.IsRevisor)).ToList();
|
||||
var orders = (await FruitBankSignalRClient.GetPendingOrderDtos() ?? []).Where(o => o.HasMeasuringAccess(LoggedInModel.CustomerDto?.Id, LoggedInModel.IsRevisor)).ToList();
|
||||
|
||||
_measuringDates = orders.Select(order => new MeasuringDateSelectorModel(order.Id, order.DateOfReceiptOrCreated, order.IsMeasured)).ToList();
|
||||
|
||||
|
|
@ -140,7 +140,7 @@ namespace FruitBankHybrid.Shared.Pages
|
|||
selectedOrderItemDto.OrderItemPallets.UpdateCollection(orderItemPallet, false);
|
||||
//MeasuringValuesHelper.SetShippingItemTotalMeasuringValues(SelectedShippingItem);
|
||||
}
|
||||
else await DialogService.ShowMessageBoxAsync("Hiba", "Adatok mentése sikertelen volt!", MessageBoxRenderStyle.Danger);
|
||||
else await DialogService.ShowMessageBoxAsync("Hiba", "Adatok mentése sikertelen volt, ellenőrizze a mérés adatait!", MessageBoxRenderStyle.Danger);
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
|
|
@ -194,6 +194,8 @@ namespace FruitBankHybrid.Shared.Pages
|
|||
private async Task OnMeasuringAuditorClick()
|
||||
{
|
||||
if (SelectedOrder != null && LoggedInModel.IsRevisor && SelectedOrder.IsMeasured && SelectedOrder.OrderStatus != OrderStatus.Complete)
|
||||
{
|
||||
if (await DialogService.ShowConfirmBoxAsync("Megerősítés", "Biztoan jóváhagyja a rendelést? Jóváhagyás után a mérések nem módosíthatóak!", MessageBoxRenderStyle.Danger))
|
||||
{
|
||||
var responseOrderDto = await FruitBankSignalRClient.SetOrderStatusToComplete(SelectedOrder.Id, LoggedInModel.CustomerDto!.Id);
|
||||
if (responseOrderDto != null)
|
||||
|
|
@ -205,11 +207,12 @@ namespace FruitBankHybrid.Shared.Pages
|
|||
|
||||
//await DialogService.ShowMessageBoxAsync("Információ", "Adatok mentése sikeres volt!", MessageBoxRenderStyle.Info);
|
||||
}
|
||||
else await DialogService.ShowMessageBoxAsync("Hiba", "Rendelés jóváhagyása sikertelen volt!", MessageBoxRenderStyle.Danger);
|
||||
else await DialogService.ShowMessageBoxAsync("Hiba", "Rendelés jóváhagyása sikertelen volt, ellenőrizze a mérés adatait!", MessageBoxRenderStyle.Danger);
|
||||
|
||||
StateHasChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void PrepareOrderDto(OrderDto orderDto)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
html, body {
|
||||
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
a, .btn-link {
|
||||
|
|
|
|||
Loading…
Reference in New Issue