* Migrated EdiCo and Co views to Syncfusion
This commit is contained in:
@@ -193,7 +193,6 @@
|
|||||||
<GridFilterSettings Type="FilterType.Excel"/>
|
<GridFilterSettings Type="FilterType.Excel"/>
|
||||||
<GridPageSettings PageSize="10"/>
|
<GridPageSettings PageSize="10"/>
|
||||||
<GridSelectionSettings Mode="SelectionMode.Row" Type="SelectionType.Single"/>
|
<GridSelectionSettings Mode="SelectionMode.Row" Type="SelectionType.Single"/>
|
||||||
<GridEvents TValue="CustomerOrderLineItemDto" RowSelected="OnSelectedLineItemRow"></GridEvents>
|
|
||||||
</SfGrid>
|
</SfGrid>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,7 +206,6 @@
|
|||||||
private IEnumerable<ScheduleOrderDto>? _scheduleOrders;
|
private IEnumerable<ScheduleOrderDto>? _scheduleOrders;
|
||||||
|
|
||||||
CustomerOrderLineDto? _selectedCustomerOrderLine;
|
CustomerOrderLineDto? _selectedCustomerOrderLine;
|
||||||
CustomerOrderLineItemDto? _selectedCustomerOrderLineItem;
|
|
||||||
|
|
||||||
private SfGrid<CustomerOrderLineDto>? _customerOrderLinesGrid;
|
private SfGrid<CustomerOrderLineDto>? _customerOrderLinesGrid;
|
||||||
private SfGrid<CustomerOrderLineItemDto>? _customerOrderLineItemsGrid;
|
private SfGrid<CustomerOrderLineItemDto>? _customerOrderLineItemsGrid;
|
||||||
@@ -283,9 +281,4 @@
|
|||||||
_isVisibleCustomerOrderLine = _selectedCustomerOrderLine != null;
|
_isVisibleCustomerOrderLine = _selectedCustomerOrderLine != null;
|
||||||
_customerOrderLineItems = _selectedCustomerOrderLine?.CustomerOrderLineItems.ToList() ?? [];
|
_customerOrderLineItems = _selectedCustomerOrderLine?.CustomerOrderLineItems.ToList() ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnSelectedLineItemRow<TValue>(RowSelectEventArgs<TValue> obj)
|
|
||||||
{
|
|
||||||
_selectedCustomerOrderLineItem = obj.Data as CustomerOrderLineItemDto;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -7,10 +7,7 @@
|
|||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
|
||||||
<h5>Zamówienia Klienta</h5>
|
<h5>Zamówienia Klienta</h5>
|
||||||
|
<SfGrid AllowFiltering="true"
|
||||||
|
|
||||||
<SfGrid @ref="_grid"
|
|
||||||
AllowFiltering="true"
|
|
||||||
AllowPaging="true"
|
AllowPaging="true"
|
||||||
AllowSorting="true"
|
AllowSorting="true"
|
||||||
AllowSelection="true"
|
AllowSelection="true"
|
||||||
@@ -69,7 +66,6 @@
|
|||||||
</SfGrid>
|
</SfGrid>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
SfGrid<CustomerOrderDto>? _grid;
|
|
||||||
private IEnumerable<CustomerOrderDto>? _customerOrders;
|
private IEnumerable<CustomerOrderDto>? _customerOrders;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
|
|||||||
@@ -2,240 +2,209 @@
|
|||||||
|
|
||||||
@inject EdiCustomerOrderService EdiCustomerOrderService
|
@inject EdiCustomerOrderService EdiCustomerOrderService
|
||||||
@using SytelineSaAppEfDataModel.Dtos
|
@using SytelineSaAppEfDataModel.Dtos
|
||||||
@using BlazorBootstrap
|
@using Syncfusion.Blazor.Grids
|
||||||
|
@using Syncfusion.Blazor.Cards
|
||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
|
||||||
<div class="row">
|
<h5>Zamówienie klienta nr @EdiCustomerOrderDto?.CustomerOrderNumber</h5>
|
||||||
<h3>Zamówienie Klienta EDI</h3>
|
<SfCard>
|
||||||
</div>
|
<CardContent>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<SortableList TItem="EdiCustomerOrderDto" Data="_ediCustomerOrder">
|
<u>Numer zamówienia EDI:</u> <b>@EdiCustomerOrderDto?.CustomerOrderNumber</b><br />
|
||||||
<ItemTemplate>
|
<u>Numer zamówienia Klienta:</u> <b>@EdiCustomerOrderDto?.CustomerPoNumber</b><br />
|
||||||
<u>Numer zamówienia EDI:</u> <b>@context.CustomerOrderNumber</b><br />
|
<u>Numer klienta:</u> <b>@EdiCustomerOrderDto?.CustomerNumber</b><br />
|
||||||
<u>Numer zamówienia Klienta:</u> <b>@context.CustomerPoNumber</b><br />
|
<u>Klient:</u> <b>@EdiCustomerOrderDto?.CustomerName</b><br />
|
||||||
<u>Numer klienta:</u> <b>@context.CustomerNumber</b><br />
|
<u>Numer odbiorcy:</u> <b>@(EdiCustomerOrderDto?.CustomerSequence?.ToString() ?? "N/A")</b><br />
|
||||||
<u>Klient:</u> <b>@context.CustomerName</b><br />
|
<u>Data otrzymania:</u> <b>@(EdiCustomerOrderDto?.RecivedDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
||||||
<u>Numer odbiorcy:</u> <b>@(context.CustomerSequence?.ToString() ?? "N/A")</b><br />
|
<u>Wysłano do Syteline?:</u> <b>@((EdiCustomerOrderDto?.Posted?.ToString() ?? "0") == "0" ? "NIE" : "TAK")</b><br />
|
||||||
<u>Data otrzymania:</u> <b>@(context.RecivedDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
<u>Data wysyłki do Syteline:</u> <b>@(EdiCustomerOrderDto?.PostedDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
||||||
<u>Wysłano do Syteline?:</u> <b>@((context.Posted?.ToString() ?? "0") == "0" ? "NIE" : "TAK")</b><br />
|
<u>Data zamówienia:</u> <b>@(EdiCustomerOrderDto?.OrderDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
||||||
<u>Data wysyłki do Syteline:</u> <b>@(context.PostedDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
</div>
|
||||||
<u>Data zamówienia:</u> <b>@(context.OrderDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
<div class="col">
|
||||||
</ItemTemplate>
|
<u>Cena:</u> <b>@(EdiCustomerOrderDto?.Price?.ToString("F2") ?? "N/A")</b><br />
|
||||||
</SortableList>
|
<u>Waga:</u> <b>@(EdiCustomerOrderDto?.Weight?.ToString("F2") ?? "N/A")</b><br />
|
||||||
</div>
|
<u>Magazyn:</u> <b>@EdiCustomerOrderDto?.Warehouse</b><br />
|
||||||
<div class="col">
|
<u>Gate:</u> <b>@EdiCustomerOrderDto?.Gate</b><br />
|
||||||
<SortableList TItem="EdiCustomerOrderDto" Data="_ediCustomerOrder" Class="bg-light">
|
<u>Kod odbiorcy:</u> <b>@EdiCustomerOrderDto?.RecipientCode</b><br />
|
||||||
<ItemTemplate>
|
<u>Kod wysyłającego:</u> <b>@EdiCustomerOrderDto?.SenderCode</b><br />
|
||||||
<u>Cena:</u> <b>@(context.Price?.ToString("F2") ?? "N/A")</b><br />
|
<u>Kod sprzedawcy:</u> <b>@EdiCustomerOrderDto?.SellerCode</b><br />
|
||||||
<u>Waga:</u> <b>@(context.Weight?.ToString("F2") ?? "N/A")</b><br />
|
<u>Kod kupującego:</u> <b>@EdiCustomerOrderDto?.BuyerCode</b><br />
|
||||||
<u>Magazyn:</u> <b>@context.Warehouse</b><br />
|
<u>Typ dokumentu:</u> <b>@EdiCustomerOrderDto?.DocType</b><br />
|
||||||
<u>Gate:</u> <b>@context.Gate</b><br />
|
</div>
|
||||||
<u>Kod odbiorcy:</u> <b>@context.RecipientCode</b><br />
|
</div>
|
||||||
<u>Kod wysyłającego:</u> <b>@context.SenderCode</b><br />
|
</CardContent>
|
||||||
<u>Kod sprzedawcy:</u> <b>@context.SellerCode</b><br />
|
</SfCard>
|
||||||
<u>Kod kupującego:</u> <b>@context.BuyerCode</b><br />
|
|
||||||
<u>Typ dokumentu:</u> <b>@context.DocType</b><br />
|
|
||||||
</ItemTemplate>
|
|
||||||
</SortableList>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br/>
|
<br/>
|
||||||
<div class="row">
|
<h5>Indeksy</h5>
|
||||||
<h3>Indeksy</h3>
|
<SfGrid @ref="_ediCustomerOrderLinesGrid"
|
||||||
</div>
|
AllowFiltering="true"
|
||||||
<div class="row">
|
AllowPaging="true"
|
||||||
<Grid @ref="_ediCustomerOrderLinesGrid"
|
AllowSorting="true"
|
||||||
TItem="EdiCustomerOrderLineDto"
|
AllowSelection="true"
|
||||||
Class="table table-hover table-bordered table-striped"
|
TValue="EdiCustomerOrderLineDto"
|
||||||
Data="_ediCustomerOrderLines"
|
DataSource="@_ediCustomerOrderLines"
|
||||||
AllowFiltering="true"
|
EnableAdaptiveUI="true">
|
||||||
Responsive="true"
|
<GridTemplates>
|
||||||
AllowPaging="true"
|
<DetailTemplate>
|
||||||
PageSize="10"
|
@{
|
||||||
AllowSelection="true"
|
var order = context as EdiCustomerOrderLineDto;
|
||||||
AllowRowClick="true"
|
<SfCard>
|
||||||
SelectionMode="GridSelectionMode.Single"
|
<CardContent>
|
||||||
SelectedItemsChanged="SelectedEdiCustomerOrderLineChanged">
|
<div class="row">
|
||||||
<GridColumns>
|
<h6>Szczegóły</h6>
|
||||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Linia" PropertyName="CustomerOrderLine">
|
<div class="col">
|
||||||
@context.CustomerOrderLine
|
<u>Numer zamówienia EDI:</u> <b>@order?.CustomerOrderNumber</b><br />
|
||||||
</GridColumn>
|
<u>Linia:</u> <b>@order?.CustomerOrderLine</b><br />
|
||||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Pozycja" PropertyName="Item">
|
<u>Pozycja:</u> <b>@order?.Item</b><br />
|
||||||
@context.Item
|
<u>Pozycja Klienta:</u> <b>@order?.CustomerItemNumber</b><br />
|
||||||
</GridColumn>
|
<u>Opis:</u> <b>@order?.Description</b><br />
|
||||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Pozycja Klienta" PropertyName="CustomerItemNumber">
|
<u>Łączna Ilość:</u> <b>@(order?.BlanketQty?.ToString("F2") ?? "N/A")</b><br />
|
||||||
@context.CustomerItemNumber
|
<u>Status:</u> <b>@order?.TranslatedStatus</b><br />
|
||||||
</GridColumn>
|
</div>
|
||||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Opis" PropertyName="Description">
|
<div class="col">
|
||||||
@context.Description
|
<u>Cena:</u> <b>@(order?.ContPrice?.ToString("F2") ?? "N/A")</b><br />
|
||||||
</GridColumn>
|
<u>Ważne Od:</u> <b>@(order?.EffectiveDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
||||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Ilość" TextAlignment="Alignment.End" PropertyName="BlanketQty">
|
<u>J/M:</u> <b>@order?.Uom</b><br />
|
||||||
@context.BlanketQty
|
<u>BoxType:</u> <b>@order?.BoxType</b><br/>
|
||||||
</GridColumn>
|
<u>Address:</u> <b>@order?.Address</b><br/>
|
||||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="J/M" PropertyName="Uom">
|
<u>FinalDestination:</u> <b>@order?.FinalDestination</b><br/>
|
||||||
@context.Uom
|
<u>QtyPerBox:</u> <b>@(order?.QtyPerBox?.ToString() ?? "N/A")</b>
|
||||||
</GridColumn>
|
</div>
|
||||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Cena" PropertyName="ContPrice">
|
</div>
|
||||||
@context.ContPrice
|
</CardContent>
|
||||||
</GridColumn>
|
</SfCard>
|
||||||
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Status" PropertyName="TranslatedStatus">
|
}
|
||||||
@context.TranslatedStatus
|
</DetailTemplate>
|
||||||
</GridColumn>
|
</GridTemplates>
|
||||||
</GridColumns>
|
<GridColumns>
|
||||||
</Grid>
|
<GridColumn Field=@nameof(EdiCustomerOrderLineDto.CustomerOrderLine) HeaderText="Linia" Width="70"></GridColumn>
|
||||||
</div>
|
<GridColumn Field=@nameof(EdiCustomerOrderLineDto.Item) HeaderText="Pozycja" Width="100"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderLineDto.CustomerItemNumber) HeaderText="Pozycja Klienta"
|
||||||
|
Width="120"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderLineDto.Description) HeaderText="Opis" Width="200"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderLineDto.BlanketQty) HeaderText="Ilość" TextAlign="TextAlign.Right"
|
||||||
|
Width="100"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderLineDto.Uom) HeaderText="J/M" Width="50"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderLineDto.ContPrice) HeaderText="Cena" Width="100"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderLineDto.TranslatedStatus) HeaderText="Status"
|
||||||
|
Width="100"></GridColumn>
|
||||||
|
</GridColumns>
|
||||||
|
<GridFilterSettings Type="FilterType.Excel"/>
|
||||||
|
<GridPageSettings PageSize="10"/>
|
||||||
|
<GridSelectionSettings Mode="SelectionMode.Row" Type="SelectionType.Single"/>
|
||||||
|
<GridEvents TValue="EdiCustomerOrderLineDto" RowSelected="OnSelectedLineRow"></GridEvents>
|
||||||
|
</SfGrid>
|
||||||
@if (_isVisibleEdiCustomerOrderLine)
|
@if (_isVisibleEdiCustomerOrderLine)
|
||||||
{
|
{
|
||||||
<div class="row">
|
<br/>
|
||||||
<h3>Szczegóły</h3>
|
<h5>Harmonogramy</h5>
|
||||||
</div>
|
<SfGrid @ref="_ediCustomerOrderLineItemsGrid"
|
||||||
<div class="row">
|
TValue="EdiCustomerOrderLineItemDto"
|
||||||
<div class="col">
|
DataSource="@_ediCustomerOrderLineItems"
|
||||||
<SortableList TItem="EdiCustomerOrderLineDto" Data="_selectedEdiCustomerOrderLine">
|
AllowFiltering="true"
|
||||||
<ItemTemplate>
|
AllowPaging="true"
|
||||||
<u>Numer zamówienia EDI:</u> <b>@context.CustomerOrderNumber</b><br />
|
AllowSelection="true"
|
||||||
<u>Linia:</u> <b>@context.CustomerOrderLine</b><br />
|
AllowSorting="true"
|
||||||
<u>Pozycja:</u> <b>@context.Item</b><br />
|
SelectionMode="Syncfusion.Blazor.Grids.SelectionMode.Single"
|
||||||
<u>Pozycja Klienta:</u> <b>@context.CustomerItemNumber</b><br />
|
SelectedItemsChanged="SelectedCustomerOrderLineItemChanged">
|
||||||
<u>Opis:</u> <b>@context.Description</b><br />
|
<GridTemplates>
|
||||||
<u>Łączna Ilość:</u> <b>@(context.BlanketQty?.ToString("F2") ?? "N/A")</b><br />
|
<DetailTemplate>
|
||||||
<u>Status:</u> <b>@context.TranslatedStatus</b><br />
|
@{
|
||||||
</ItemTemplate>
|
var detailLineItem = context as EdiCustomerOrderLineItemDto;
|
||||||
</SortableList>
|
<SfCard>
|
||||||
</div>
|
<CardContent>
|
||||||
<div class="col">
|
<div class="row">
|
||||||
<SortableList TItem="EdiCustomerOrderLineDto" Data="_selectedEdiCustomerOrderLine">
|
<h6>Szczegóły</h6>
|
||||||
<ItemTemplate>
|
<div class="col">
|
||||||
<u>Cena:</u> <b>@(context.ContPrice?.ToString("F2") ?? "N/A")</b><br />
|
<u>Numer Zamówienia:</u> <b>@detailLineItem?.CustomerOrderNumber</b><br />
|
||||||
<u>Ważne Od:</u> <b>@(context.EffectiveDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
<u>Linia:</u> <b>@detailLineItem?.CustomerOrderLine</b><br />
|
||||||
<u>J/M:</u> <b>@context.Uom</b><br />
|
<u>Zwolnienie:</u> <b>@detailLineItem?.CustomerOrderRelease</b><br />
|
||||||
<u>BoxType:</u> <b>@context.BoxType</b><br/>
|
<u>Pozycja:</u> <b>@detailLineItem?.Item</b><br />
|
||||||
<u>Address:</u> <b>@context.Address</b><br/>
|
<u>Pozycja Klienta:</u> <b>@detailLineItem?.CustomerItem</b><br />
|
||||||
<u>FinalDestination:</u> <b>@context.FinalDestination</b><br/>
|
<u>Łączna Ilość Sztuk:</u> <b>@(detailLineItem?.QtyOrdered?.ToString("F2") ?? "N/A")</b><br />
|
||||||
<u>QtyPerBox:</u> <b>@(context.QtyPerBox?.ToString() ?? "N/A")</b>
|
<u>Cena:</u> <b>@(detailLineItem?.Price?.ToString("F2") ?? "N/A")</b><br />
|
||||||
</ItemTemplate>
|
<u>Data Wykonania:</u> <b>@(detailLineItem?.DueDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
||||||
</SortableList>
|
<u>Data Rejestracji:</u> <b>@(detailLineItem?.ReleaseDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
||||||
</div>
|
<u>Magazyn:</u> <b>@detailLineItem?.Warehouse</b><br />
|
||||||
</div>
|
<u>Typ Documentu:</u> <b>@detailLineItem?.DocumentType</b><br />
|
||||||
<br />
|
</div>
|
||||||
<h3>Harmonogramy</h3>
|
<div class="col">
|
||||||
<div class="row">
|
<u>Kod VAT:</u> <b>@detailLineItem?.TaxCodeOne</b><br />
|
||||||
<Grid @ref="_ediCustomerOrderLineItemsGrid"
|
<u>J/M:</u> <b>@detailLineItem?.Uom</b><br />
|
||||||
TItem="EdiCustomerOrderLineItemDto"
|
<u>Numer Klienta:</u> <b>@detailLineItem?.CustomerOrderCustomerNumber</b><br />
|
||||||
Class="table table-hover table-bordered table-striped"
|
<u>Opis:</u> <b>@detailLineItem?.Description</b><br />
|
||||||
Data="_ediCustomerOrderLineItems"
|
<u>Status:</u> <b>@detailLineItem?.TranslatedStatus</b><br />
|
||||||
AllowFiltering="true"
|
<u>RoutingCode:</u> <b>@detailLineItem?.RoutingCode</b><br />
|
||||||
Responsive="true"
|
<u>DeliveryCallNumber:</u> <b>@detailLineItem?.DeliveryCallNumber</b><br />
|
||||||
AllowPaging="true"
|
<u>UnloadingPoint:</u> <b>@detailLineItem?.UnloadingPoint</b><br />
|
||||||
PageSize="10"
|
<u>DestinationPoint:</u> <b>@detailLineItem?.DestinationPoint</b><br />
|
||||||
AllowSelection="true"
|
<u>PalletCode:</u> <b>@detailLineItem?.PalletCode</b><br />
|
||||||
AllowRowClick="true"
|
<u>PalletNumber:</u> <b>@detailLineItem?.PalletNumber</b>
|
||||||
SelectionMode="GridSelectionMode.Single"
|
</div>
|
||||||
SelectedItemsChanged="SelectedEdiCustomerOrderLineItemChanged">
|
</div>
|
||||||
<GridColumns>
|
</CardContent>
|
||||||
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Linia" PropertyName="CustomerOrderLine">
|
</SfCard>
|
||||||
@context.CustomerOrderLine
|
}
|
||||||
</GridColumn>
|
</DetailTemplate>
|
||||||
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Zwolnienie" PropertyName="CustomerOrderRelease">
|
</GridTemplates>
|
||||||
@context.CustomerOrderRelease
|
<Syncfusion.Blazor.Grids.GridColumns>
|
||||||
</GridColumn>
|
<Syncfusion.Blazor.Grids.GridColumn Field=@nameof(CustomerOrderLineItemDto.CoLine) HeaderText="Linia"
|
||||||
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Pozycja" PropertyName="Item">
|
Width="70"/>
|
||||||
@context.Item
|
<Syncfusion.Blazor.Grids.GridColumn Field=@nameof(CustomerOrderLineItemDto.CoRelease)
|
||||||
</GridColumn>
|
HeaderText="Zwolnienie" Width="70"/>
|
||||||
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Pozycja" PropertyName="CustomerItem">
|
<Syncfusion.Blazor.Grids.GridColumn Field=@nameof(CustomerOrderLineItemDto.Item) HeaderText="Pozycja"
|
||||||
@context.CustomerItem
|
Width="100"></Syncfusion.Blazor.Grids.GridColumn>
|
||||||
</GridColumn>
|
<Syncfusion.Blazor.Grids.GridColumn Field=@nameof(CustomerOrderLineItemDto.CustItem)
|
||||||
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Łączna Ilość" TextAlignment="Alignment.End" PropertyName="QtyOrdered">
|
HeaderText="Pozycja"
|
||||||
@context.QtyOrdered
|
Width="100"></Syncfusion.Blazor.Grids.GridColumn>
|
||||||
</GridColumn>
|
<Syncfusion.Blazor.Grids.GridColumn Field=@nameof(CustomerOrderLineItemDto.QtyOrdered)
|
||||||
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Data Wykonania" PropertyName="DueDate">
|
HeaderText="Łączna Ilość" TextAlign="TextAlign.Right"
|
||||||
@context.DueDate?.ToString("dd.MM.yyyy")
|
Width="120"></Syncfusion.Blazor.Grids.GridColumn>
|
||||||
</GridColumn>
|
<Syncfusion.Blazor.Grids.GridColumn Field=@nameof(CustomerOrderLineItemDto.DueDate)
|
||||||
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Status" PropertyName="TranslatedStatus">
|
HeaderText="Data Wykonania" Width="100"/>
|
||||||
@context.TranslatedStatus
|
<Syncfusion.Blazor.Grids.GridColumn Field=@nameof(CustomerOrderLineItemDto.TranslatedStatus)
|
||||||
</GridColumn>
|
HeaderText="Status"
|
||||||
</GridColumns>
|
Width="100"></Syncfusion.Blazor.Grids.GridColumn>
|
||||||
</Grid>
|
</Syncfusion.Blazor.Grids.GridColumns>
|
||||||
</div>
|
<GridFilterSettings Type="FilterType.Excel"/>
|
||||||
}@if (_isVisibleEdiCustomerOrderLineItem)
|
<GridPageSettings PageSize="10"/>
|
||||||
{
|
<GridSelectionSettings Mode="SelectionMode.Row" Type="SelectionType.Single"/>
|
||||||
<div class="row">
|
</SfGrid>
|
||||||
<h3>Szczegóły</h3>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col">
|
|
||||||
<SortableList TItem="EdiCustomerOrderLineItemDto" Data="_selectedEdiCustomerOrderLineItem">
|
|
||||||
<ItemTemplate>
|
|
||||||
<u>Numer Zamówienia:</u> <b>@context.CustomerOrderNumber</b><br />
|
|
||||||
<u>Linia:</u> <b>@context.CustomerOrderLine</b><br />
|
|
||||||
<u>Zwolnienie:</u> <b>@context.CustomerOrderRelease</b><br />
|
|
||||||
<u>Pozycja:</u> <b>@context.Item</b><br />
|
|
||||||
<u>Pozycja Klienta:</u> <b>@context.CustomerItem</b><br />
|
|
||||||
<u>Łączna Ilość Sztuk:</u> <b>@(context.QtyOrdered?.ToString("F2") ?? "N/A")</b><br />
|
|
||||||
<u>Cena:</u> <b>@(context.Price?.ToString("F2") ?? "N/A")</b><br />
|
|
||||||
<u>Data Wykonania:</u> <b>@(context.DueDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
|
||||||
<u>Data Rejestracji:</u> <b>@(context.ReleaseDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br />
|
|
||||||
<u>Magazyn:</u> <b>@context.Warehouse</b><br />
|
|
||||||
<u>Typ Documentu:</u> <b>@context.DocumentType</b><br />
|
|
||||||
</ItemTemplate>
|
|
||||||
</SortableList>
|
|
||||||
</div>
|
|
||||||
<div class="col">
|
|
||||||
<SortableList TItem="EdiCustomerOrderLineItemDto" Data="_selectedEdiCustomerOrderLineItem">
|
|
||||||
<ItemTemplate>
|
|
||||||
<u>Kod VAT:</u> <b>@context.TaxCodeOne</b><br />
|
|
||||||
<u>J/M:</u> <b>@context.Uom</b><br />
|
|
||||||
<u>Numer Klienta:</u> <b>@context.CustomerOrderCustomerNumber</b><br />
|
|
||||||
<u>Opis:</u> <b>@context.Description</b><br />
|
|
||||||
<u>Status:</u> <b>@context.TranslatedStatus</b><br />
|
|
||||||
<u>RoutingCode:</u> <b>@context.RoutingCode</b><br />
|
|
||||||
<u>DeliveryCallNumber:</u> <b>@context.DeliveryCallNumber</b><br />
|
|
||||||
<u>UnloadingPoint:</u> <b>@context.UnloadingPoint</b><br />
|
|
||||||
<u>DestinationPoint:</u> <b>@context.DestinationPoint</b><br />
|
|
||||||
<u>PalletCode:</u> <b>@context.PalletCode</b><br />
|
|
||||||
<u>PalletNumber:</u> <b>@context.PalletNumber</b>
|
|
||||||
</ItemTemplate>
|
|
||||||
</SortableList>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
[Parameter] public Guid CustomerOrderId { get; set; }
|
||||||
|
|
||||||
[Parameter]
|
private EdiCustomerOrderDto? EdiCustomerOrderDto { get; set; }
|
||||||
public Guid CustomerOrderId { get; set; }
|
private List<EdiCustomerOrderLineDto> _ediCustomerOrderLines = [];
|
||||||
|
private List<EdiCustomerOrderLineItemDto> _ediCustomerOrderLineItems = [];
|
||||||
|
|
||||||
List<EdiCustomerOrderDto?>? _ediCustomerOrder;
|
EdiCustomerOrderLineDto? _selectedEdiCustomerOrderLine;
|
||||||
List<EdiCustomerOrderLineDto> _ediCustomerOrderLines = [];
|
|
||||||
List<EdiCustomerOrderLineItemDto> _ediCustomerOrderLineItems = [];
|
|
||||||
|
|
||||||
List<EdiCustomerOrderLineDto?> _selectedEdiCustomerOrderLine = [];
|
SfGrid<EdiCustomerOrderLineDto>? _ediCustomerOrderLinesGrid;
|
||||||
List<EdiCustomerOrderLineItemDto?> _selectedEdiCustomerOrderLineItem = [];
|
SfGrid<EdiCustomerOrderLineItemDto>? _ediCustomerOrderLineItemsGrid;
|
||||||
|
|
||||||
Grid<EdiCustomerOrderLineDto>? _ediCustomerOrderLinesGrid;
|
|
||||||
Grid<EdiCustomerOrderLineItemDto>? _ediCustomerOrderLineItemsGrid;
|
|
||||||
|
|
||||||
private bool _isVisibleEdiCustomerOrderLine;
|
private bool _isVisibleEdiCustomerOrderLine;
|
||||||
private bool _isVisibleEdiCustomerOrderLineItem;
|
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
EdiCustomerOrderDto? ediCustomerOrder = await EdiCustomerOrderService.GetEdiCustomerOrderAsync(CustomerOrderId);
|
EdiCustomerOrderDto? ediCustomerOrder = await EdiCustomerOrderService.GetEdiCustomerOrderAsync(CustomerOrderId);
|
||||||
|
|
||||||
_ediCustomerOrder = [ediCustomerOrder];
|
EdiCustomerOrderDto = ediCustomerOrder;
|
||||||
_ediCustomerOrderLines = ediCustomerOrder?.EdiCustomerOrderLines.ToList() ?? [];
|
_ediCustomerOrderLines = ediCustomerOrder?.EdiCustomerOrderLines.ToList() ?? [];
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SelectedEdiCustomerOrderLineChanged(HashSet<EdiCustomerOrderLineDto> obj)
|
private void OnSelectedLineRow<TValue>(RowSelectEventArgs<TValue> obj)
|
||||||
{
|
{
|
||||||
_isVisibleEdiCustomerOrderLine = obj.Any();
|
_isVisibleEdiCustomerOrderLine = obj.Data is not null;
|
||||||
_selectedEdiCustomerOrderLine = [obj.FirstOrDefault()];
|
_selectedEdiCustomerOrderLine = obj.Data as EdiCustomerOrderLineDto;
|
||||||
_ediCustomerOrderLineItems = obj.FirstOrDefault()?.EdiCustomerOrderLineItems.ToList() ?? [];
|
_ediCustomerOrderLineItems = _selectedEdiCustomerOrderLine?.EdiCustomerOrderLineItems.ToList() ?? [];
|
||||||
}
|
|
||||||
|
|
||||||
private void SelectedEdiCustomerOrderLineItemChanged(HashSet<EdiCustomerOrderLineItemDto> obj)
|
|
||||||
{
|
|
||||||
_isVisibleEdiCustomerOrderLineItem = obj.Any();
|
|
||||||
_selectedEdiCustomerOrderLineItem = [obj.FirstOrDefault()];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,126 +4,146 @@
|
|||||||
@inject NavigationManager NavigationManager
|
@inject NavigationManager NavigationManager
|
||||||
@using OrdersManagement.Dtos
|
@using OrdersManagement.Dtos
|
||||||
@using SytelineSaAppEfDataModel.Dtos
|
@using SytelineSaAppEfDataModel.Dtos
|
||||||
@using BlazorBootstrap
|
@using Syncfusion.Blazor.Grids
|
||||||
|
@using Syncfusion.Blazor.Cards
|
||||||
|
@using Syncfusion.Blazor.Popups
|
||||||
|
@using Syncfusion.Blazor.Buttons
|
||||||
|
@using SelectionType = Syncfusion.Blazor.Grids.SelectionType
|
||||||
@inherits LayoutComponentBase
|
@inherits LayoutComponentBase
|
||||||
|
|
||||||
<div class="row">
|
<h5>Zamówienia Klienta EDI</h5>
|
||||||
<h3>Zamówienia Klienta EDI</h3>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<Switch ValueExpression="() => _filter" ValueChanged="FilterChanged" Label="Pokaż wszystkie" />
|
<label for="checked" style="padding: 10px 10px 10px 0">Pokaż wszystkie</label>
|
||||||
|
<SfSwitch @bind-Checked="_filter" ValueChange="FilterChanged" TChecked="bool?" OnLabel="Pokaż tylko Wysłanr do SL" OffLabel="Pokaż wszystkie" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br/>
|
||||||
@if (_isVisible)
|
@if (_isVisible)
|
||||||
{
|
{
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<Button Color="ButtonColor.Primary" @onclick="SendOrderToSyteLine">@_text</Button>
|
<SfButton @onclick="SendOrderToSyteLine">@_text</SfButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<br/>
|
||||||
}
|
}
|
||||||
<br />
|
<SfGrid @ref="_grid"
|
||||||
<div class="row">
|
AllowFiltering="true"
|
||||||
<Grid @ref="_grid"
|
AllowPaging="true"
|
||||||
TItem="EdiCustomerOrderDto"
|
AllowSorting="true"
|
||||||
Class="table table-hover table-bordered table-striped"
|
AllowSelection="true"
|
||||||
DataProvider="EdiCustomerOrdersDataProvider"
|
TValue="EdiCustomerOrderDto"
|
||||||
AllowFiltering="true"
|
DataSource="@_ediCustomerOrders"
|
||||||
Responsive="true"
|
EnableAdaptiveUI="true">
|
||||||
AllowPaging="true"
|
<GridTemplates>
|
||||||
PageSize="10"
|
<DetailTemplate>
|
||||||
AllowSelection="true"
|
@{
|
||||||
AllowRowClick="true"
|
var order = context as EdiCustomerOrderDto;
|
||||||
SelectionMode="GridSelectionMode.Multiple"
|
<SfCard>
|
||||||
OnRowDoubleClick="OnRowDoubleClick"
|
<CardContent>
|
||||||
SelectedItemsChanged="SelectedItemsChanged">
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
<GridColumns>
|
<u>Numer zamówienia EDI:</u> <b>@order?.CustomerOrderNumber</b><br/>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Numer Zamówienia" PropertyName="CustomerOrderNumber">
|
<u>Numer zamówienia Klienta:</u> <b>@order?.CustomerPoNumber</b><br/>
|
||||||
@context.CustomerOrderNumber
|
<u>Numer klienta:</u> <b>@order?.CustomerNumber</b><br/>
|
||||||
</GridColumn>
|
<u>Klient:</u> <b>@order?.CustomerName</b><br/>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Zamówienie Klienta" PropertyName="CustomerPoNumber">
|
<u>Numer odbiorcy:</u> <b>@(order?.CustomerSequence?.ToString() ?? "N/A")</b><br/>
|
||||||
@context.CustomerPoNumber
|
<u>Data
|
||||||
</GridColumn>
|
otrzymania:</u> <b>@(order?.RecivedDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br/>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Numer Klienta" PropertyName="CustomerNumber">
|
<u>Wysłano do
|
||||||
@context.CustomerNumber
|
Syteline?:</u> <b>@((order?.Posted?.ToString() ?? "0") == "0" ? "NIE" : "TAK")</b><br/>
|
||||||
</GridColumn>
|
<u>Data wysyłki do
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Klient" PropertyName="CustomerName">
|
Syteline:</u> <b>@(order?.PostedDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br/>
|
||||||
@context.CustomerName
|
<u>Data zamówienia:</u> <b>@(order?.OrderDate?.ToString("dd.MM.yyyy") ?? "N/A")</b><br/>
|
||||||
</GridColumn>
|
</div>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Odbiorca" PropertyName="CustomerSequence">
|
<div class="col">
|
||||||
@context.CustomerSequence
|
<u>Cena:</u> <b>@(order?.Price?.ToString("F2") ?? "N/A")</b><br/>
|
||||||
</GridColumn>
|
<u>Waga:</u> <b>@(order?.Weight?.ToString("F2") ?? "N/A")</b><br/>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Data Otrzymania" PropertyName="CreateDate">
|
<u>Magazyn:</u> <b>@order?.Warehouse</b><br/>
|
||||||
@context.CreateDate
|
<u>Gate:</u> <b>@order?.Gate</b><br/>
|
||||||
</GridColumn>
|
<u>Kod odbiorcy:</u> <b>@order?.RecipientCode</b><br/>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Zamówienie SL" PropertyName="SlOrderNumber">
|
<u>Kod wysyłającego:</u> <b>@order?.SenderCode</b><br/>
|
||||||
@context.SlOrderNumber
|
<u>Kod sprzedawcy:</u> <b>@order?.SellerCode</b><br/>
|
||||||
</GridColumn>
|
<u>Kod kupującego:</u> <b>@order?.BuyerCode</b><br/>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Wysłane do SL" PropertyName="SentToSl">
|
<u>Typ dokumentu:</u> <b>@order?.DocType</b><br/>
|
||||||
@context.SentToSl
|
</div>
|
||||||
</GridColumn>
|
</div>
|
||||||
</GridColumns>
|
</CardContent>
|
||||||
</Grid>
|
</SfCard>
|
||||||
</div>
|
|
||||||
|
|
||||||
<Modal @ref="_modal" Title="@_text">
|
|
||||||
<BodyTemplate>
|
|
||||||
@if (_responses.Any(x => x.Status == 1))
|
|
||||||
{
|
|
||||||
foreach (ResponseDto response in _responses.Where(x => x.Status == 1))
|
|
||||||
{
|
|
||||||
<p>Zamówienie EDI @response.Identifier zostało poprawnie zaksięgowane w Zamówieniach klienta pod numerem '@response.ExternalIdentifier'</p>
|
|
||||||
}
|
}
|
||||||
}
|
</DetailTemplate>
|
||||||
@if (_responses.Any(x => x.Status == 0))
|
</GridTemplates>
|
||||||
{
|
<GridColumns>
|
||||||
foreach (ResponseDto response in _responses.Where(x => x.Status == 0))
|
<GridColumn Field=@nameof(EdiCustomerOrderDto.CustomerOrderNumber) HeaderText="Numer Zamówienia"
|
||||||
|
Width="110"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderDto.CustomerPoNumber) HeaderText="Zamówienie Klienta"
|
||||||
|
Width="100"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderDto.CustomerNumber) HeaderText="Numer Klienta"
|
||||||
|
Width="90"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderDto.CustomerSequence) HeaderText="Odbiorca" Width="80"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderDto.CreateDate) HeaderText="Data Otrzymania"
|
||||||
|
TextAlign="TextAlign.Center" Width="110"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderDto.SlOrderNumber) HeaderText="Zamówienie SL"
|
||||||
|
Width="100"></GridColumn>
|
||||||
|
<GridColumn Field=@nameof(EdiCustomerOrderDto.SentToSl) HeaderText="Wysłane do SL"
|
||||||
|
TextAlign="TextAlign.Center" Width="80"></GridColumn>
|
||||||
|
</GridColumns>
|
||||||
|
<GridFilterSettings Type="FilterType.Excel"/>
|
||||||
|
<GridPageSettings PageSize="10"/>
|
||||||
|
<GridSelectionSettings Mode="SelectionMode.Row" Type="SelectionType.Multiple"/>
|
||||||
|
<GridEvents TValue="EdiCustomerOrderDto" OnRecordDoubleClick="OnRowDoubleClick" RowSelected="RowSelected" />
|
||||||
|
</SfGrid>
|
||||||
|
|
||||||
|
<SfDialog Width="500px" Title="@_text" IsModal="true" @bind-Visible="Visibility" AllowPrerender="true">
|
||||||
|
<DialogTemplates>
|
||||||
|
<Content>
|
||||||
|
@if (_responses.Any(x => x.Status == 1))
|
||||||
{
|
{
|
||||||
<p>Błąd: Zamówienie EDI @response.Identifier nie zostało poprawnie zaksięgowane w Zamówieniach klienta.<br/>Lista błędów:<br/>@response.Message</p>
|
foreach (ResponseDto response in _responses.Where(x => x.Status == 1))
|
||||||
|
{
|
||||||
|
<p>Zamówienie EDI @response.Identifier zostało poprawnie zaksięgowane w Zamówieniach klienta pod
|
||||||
|
numerem '@response.ExternalIdentifier'</p>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
@if (_responses.Any(x => x.Status == 0))
|
||||||
</BodyTemplate>
|
{
|
||||||
<FooterTemplate>
|
foreach (ResponseDto response in _responses.Where(x => x.Status == 0))
|
||||||
<Button Color="ButtonColor.Primary" @onclick="OnHideModalClick">OK</Button>
|
{
|
||||||
</FooterTemplate>
|
<p>Błąd: Zamówienie EDI @response.Identifier nie zostało poprawnie zaksięgowane w Zamówieniach
|
||||||
</Modal>
|
klienta.<br/>Lista błędów:<br/>@response.Message</p>
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</Content>
|
||||||
|
</DialogTemplates>
|
||||||
|
<DialogButtons>
|
||||||
|
<DialogButton Content="OK" IsPrimary="true" OnClick="@HideModal" />
|
||||||
|
</DialogButtons>
|
||||||
|
</SfDialog>
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
Grid<EdiCustomerOrderDto>? _grid;
|
private bool Visibility { get; set; }
|
||||||
private List<EdiCustomerOrderDto> _ediCustomerOrders = new();
|
|
||||||
|
private SfGrid<EdiCustomerOrderDto>? _grid;
|
||||||
|
|
||||||
|
private IEnumerable<EdiCustomerOrderDto> _ediCustomerOrders = [];
|
||||||
private List<EdiCustomerOrderDto> _selectedEdiCustomerOrders = new();
|
private List<EdiCustomerOrderDto> _selectedEdiCustomerOrders = new();
|
||||||
|
|
||||||
private List<ResponseDto> _responses = new();
|
private List<ResponseDto> _responses = new();
|
||||||
|
|
||||||
private Modal _modal = null!;
|
|
||||||
|
|
||||||
private bool _isVisible;
|
private bool _isVisible;
|
||||||
private bool _filter;
|
private bool? _filter = false;
|
||||||
|
|
||||||
private string _text = "Księguj bieżący";
|
private string _text = "Księguj bieżący";
|
||||||
|
|
||||||
private async Task<GridDataProviderResult<EdiCustomerOrderDto>> EdiCustomerOrdersDataProvider(GridDataProviderRequest<EdiCustomerOrderDto> request)
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
_ediCustomerOrders = (await EdiCustomerOrderService.GetEdiCustomerOrdersAsync() ?? new List<EdiCustomerOrderDto>()).ToList();
|
await LoadData();
|
||||||
_ediCustomerOrders = _ediCustomerOrders.OrderByDescending(x => x.CreateDate).ToList();
|
|
||||||
|
|
||||||
if (!_filter)
|
|
||||||
{
|
|
||||||
_ediCustomerOrders = _ediCustomerOrders.Where(x => x.Posted == 0).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
StateHasChanged();
|
|
||||||
|
|
||||||
return await Task.FromResult(request.ApplyTo(_ediCustomerOrders));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnRowDoubleClick(GridRowEventArgs<EdiCustomerOrderDto> obj)
|
private void OnRowDoubleClick(RecordDoubleClickEventArgs<EdiCustomerOrderDto> obj)
|
||||||
{
|
{
|
||||||
Guid customerOrderId = obj.Item.RowPointer;
|
Guid customerOrderId = obj.RowData.RowPointer;
|
||||||
|
|
||||||
NavigationManager.NavigateTo($"/EdiCustomerOrder/{customerOrderId}");
|
NavigationManager.NavigateTo($"/EdiCustomerOrder/{customerOrderId}");
|
||||||
}
|
}
|
||||||
@@ -146,31 +166,53 @@
|
|||||||
_responses.Add(response);
|
_responses.Add(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _modal.ShowAsync();
|
Visibility = true;
|
||||||
_grid?.RefreshDataAsync();
|
|
||||||
|
await LoadData();
|
||||||
|
|
||||||
|
_grid?.Refresh();
|
||||||
|
|
||||||
|
_isVisible = false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SelectedItemsChanged(HashSet<EdiCustomerOrderDto> obj)
|
private void HideModal()
|
||||||
{
|
{
|
||||||
|
Visibility = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task RowSelected(RowSelectEventArgs<EdiCustomerOrderDto> obj)
|
||||||
|
{
|
||||||
|
List<EdiCustomerOrderDto> selectedRecords = await _grid.GetSelectedRecordsAsync();
|
||||||
|
|
||||||
_isVisible = false;
|
_isVisible = false;
|
||||||
|
|
||||||
if (!obj.Any()) return;
|
if (!selectedRecords.Any()) return;
|
||||||
|
|
||||||
_selectedEdiCustomerOrders = obj.ToList();
|
_selectedEdiCustomerOrders = selectedRecords;
|
||||||
_isVisible = _selectedEdiCustomerOrders.Any(x => x.Posted == 0);
|
_isVisible = _selectedEdiCustomerOrders.Any(x => x.Posted == 0);
|
||||||
_text = obj.Count > 1 ? "Księguj zaznaczone" : "Księguj bieżący";
|
_text = selectedRecords.Count > 1 ? "Księguj zaznaczone" : "Księguj bieżący";
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task OnHideModalClick()
|
private async Task FilterChanged(ChangeEventArgs<bool?> obj)
|
||||||
{
|
{
|
||||||
await _modal.HideAsync();
|
_filter = obj.Checked;
|
||||||
|
await LoadData();
|
||||||
|
_grid?.Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FilterChanged(bool obj)
|
private async Task LoadData()
|
||||||
{
|
{
|
||||||
_filter = obj;
|
_ediCustomerOrders = await EdiCustomerOrderService.GetEdiCustomerOrdersAsync() ?? new List<EdiCustomerOrderDto>();
|
||||||
_grid?.RefreshDataAsync();
|
|
||||||
|
if (_filter == false)
|
||||||
|
{
|
||||||
|
_ediCustomerOrders = _ediCustomerOrders.Where(x => x.Posted == 0).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
_ediCustomerOrders = _ediCustomerOrders.OrderByDescending(x => x.CreateDate).ToList();
|
||||||
|
|
||||||
|
StateHasChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Blazor.Bootstrap" Version="3.2.0" />
|
<PackageReference Include="Blazor.Bootstrap" Version="3.2.0" />
|
||||||
|
<PackageReference Include="Syncfusion.Blazor.Buttons" Version="28.2.3" />
|
||||||
<PackageReference Include="Syncfusion.Blazor.Cards" Version="28.2.3" />
|
<PackageReference Include="Syncfusion.Blazor.Cards" Version="28.2.3" />
|
||||||
<PackageReference Include="Syncfusion.Blazor.Core" Version="28.2.3" />
|
<PackageReference Include="Syncfusion.Blazor.Core" Version="28.2.3" />
|
||||||
<PackageReference Include="Syncfusion.Blazor.Grid" Version="28.2.3" />
|
<PackageReference Include="Syncfusion.Blazor.Grid" Version="28.2.3" />
|
||||||
|
|||||||
Reference in New Issue
Block a user