* Further improvements of Warehouse view
* Fixed issue with not saving Products updates
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
@using Syncfusion.Blazor.Grids
|
||||
@using SytelineSaAppEfDataModel.Dtos
|
||||
@using Syncfusion.Blazor.Navigations
|
||||
@using Syncfusion.Blazor.Popups
|
||||
|
||||
@inject WarehouseService WarehouseService
|
||||
|
||||
@@ -13,13 +14,13 @@
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<SfGrid @ref="_grid"
|
||||
AllowFiltering="true"
|
||||
AllowPaging="true"
|
||||
AllowSorting="true"
|
||||
AllowSelection="true"
|
||||
TValue="WzRowMeyleDto"
|
||||
DataSource="@_wzRowsMeyle"
|
||||
EnableAdaptiveUI="true">
|
||||
AllowFiltering="true"
|
||||
AllowPaging="true"
|
||||
AllowSorting="true"
|
||||
AllowSelection="true"
|
||||
TValue="WzRowMeyleDto"
|
||||
DataSource="@_wzRowsMeyle"
|
||||
EnableAdaptiveUI="true">
|
||||
<SfToolbar>
|
||||
<ToolbarItems>
|
||||
<ToolbarItem Type="ItemType.Button" Text="Zapisz" Id="SaveButton"
|
||||
@@ -59,6 +60,25 @@
|
||||
<GridEvents OnBatchSave="OnBatchSave" TValue="WzRowMeyleDto"></GridEvents>
|
||||
</SfGrid>
|
||||
</CardContent>
|
||||
|
||||
<SfDialog Width="500px" Title="Informacja" IsModal="true" @bind-Visible="Visibility" AllowPrerender="true">
|
||||
<DialogTemplates>
|
||||
<Content>
|
||||
@if (_isValid)
|
||||
{
|
||||
<p>Packing List został wygenerowany i wysłany!</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p>Błąd: Nie Wszystkie linie mają wypełniony <b>NUMER PALETY</b>.<br/>Packing List nie zostanie wygenerowany!</p>
|
||||
}
|
||||
</Content>
|
||||
</DialogTemplates>
|
||||
<DialogButtons>
|
||||
<DialogButton Content="OK" IsPrimary="true" OnClick="@HideModal"/>
|
||||
</DialogButtons>
|
||||
</SfDialog>
|
||||
|
||||
<CardFooter>
|
||||
<small class="text-muted">FA Krosno Manager © @(DateTime.Now.Year)</small>
|
||||
</CardFooter>
|
||||
@@ -71,6 +91,15 @@
|
||||
private SfGrid<WzRowMeyleDto> _grid;
|
||||
private IEnumerable<WzRowMeyleDto> _wzRowsMeyle { get; set; } = new List<WzRowMeyleDto>();
|
||||
|
||||
private bool _isValid;
|
||||
|
||||
private bool Visibility { get; set; }
|
||||
|
||||
private void HideModal()
|
||||
{
|
||||
Visibility = false;
|
||||
}
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
@@ -99,6 +128,15 @@
|
||||
|
||||
private async Task ExportXls()
|
||||
{
|
||||
await WarehouseService.GenerateXlsForMeyleAsync(WzHeader);
|
||||
int count = _wzRowsMeyle.Count(x => x.PalletNumber == null);
|
||||
|
||||
_isValid = count == 0;
|
||||
|
||||
if (_isValid)
|
||||
{
|
||||
await WarehouseService.GenerateXlsForMeyleAsync(WzHeader);
|
||||
}
|
||||
|
||||
Visibility = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user