* Changed port of API
* Changed filtering and grid headers * Added TranslatedStatus field
This commit is contained in:
@@ -15,6 +15,6 @@
|
||||
"Audience": "FaKrosnoClient"
|
||||
},
|
||||
"Host": {
|
||||
"Urls": "http://0.0.0.0:5000"
|
||||
"Urls": "http://0.0.0.0:5555"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<Switch ValueExpression="() => _filter" ValueChanged="FilterChanged" Label="Pokaż tylko niezaksięgowane" />
|
||||
<Switch ValueExpression="() => _filter" ValueChanged="FilterChanged" Label="Pokaż wszystkie" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
@@ -34,7 +34,7 @@
|
||||
AllowFiltering="true"
|
||||
Responsive="true"
|
||||
AllowPaging="true"
|
||||
PageSize="20"
|
||||
PageSize="10"
|
||||
AllowSelection="true"
|
||||
AllowRowClick="true"
|
||||
SelectionMode="GridSelectionMode.Multiple"
|
||||
@@ -42,32 +42,23 @@
|
||||
SelectedItemsChanged="SelectedItemsChanged">
|
||||
|
||||
<GridColumns>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="CO Number" PropertyName="CustomerOrderNumber">
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Numer Zamówienia" PropertyName="CustomerOrderNumber">
|
||||
@context.CustomerOrderNumber
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Customer Number" PropertyName="CustomerNumber">
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Zamówienie Klienta" PropertyName="CustomerPoNumber">
|
||||
@context.CustomerPoNumber
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Klient" PropertyName="CustomerNumber">
|
||||
@context.CustomerNumber
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Recipient" PropertyName="CustomerSequence">
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Odbiorca" PropertyName="CustomerSequence">
|
||||
@context.CustomerSequence
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Last Update Date" PropertyName="CreateDate">
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Data Otrzymania" PropertyName="CreateDate">
|
||||
@context.CreateDate
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Gate" PropertyName="Gate">
|
||||
@context.Gate
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="RecipientCode" PropertyName="RecipientCode">
|
||||
@context.RecipientCode
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="SellerCode" PropertyName="SellerCode">
|
||||
@context.SellerCode
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="SenderCode" PropertyName="SenderCode">
|
||||
@context.SenderCode
|
||||
</GridColumn>
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="BuyerCode" PropertyName="BuyerCode">
|
||||
@context.BuyerCode
|
||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Status" PropertyName="TranslatedStatus">
|
||||
@context.TranslatedStatus
|
||||
</GridColumn>
|
||||
</GridColumns>
|
||||
</Grid>
|
||||
@@ -106,7 +97,7 @@
|
||||
private ModalDto _modalDto = new(null, null);
|
||||
|
||||
private bool _isVisible;
|
||||
private bool _filter = true;
|
||||
private bool _filter;
|
||||
|
||||
private string _text = "Księguj bieżący";
|
||||
|
||||
@@ -115,13 +106,11 @@
|
||||
_ediCustomerOrders = (await EdiCustomerOrderService.GetEdiCustomerOrdersAsync() ?? new List<EdiCustomerOrderDto>()).ToList();
|
||||
_ediCustomerOrders = _ediCustomerOrders.OrderByDescending(x => x.CreateDate).ToList();
|
||||
|
||||
if (_filter)
|
||||
if (!_filter)
|
||||
{
|
||||
_ediCustomerOrders = _ediCustomerOrders.Where(x => x.Posted == 0).ToList();
|
||||
}
|
||||
|
||||
_filter = true;
|
||||
|
||||
StateHasChanged();
|
||||
|
||||
return await Task.FromResult(request.ApplyTo(_ediCustomerOrders));
|
||||
|
||||
@@ -6,7 +6,7 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddBlazorBootstrap();
|
||||
|
||||
string apiUrl = builder.Configuration["ApiUrl"] ?? "http://localhost:5000"; // Ustawienie na adres twojego API
|
||||
string apiUrl = builder.Configuration["ApiUrl"] ?? "http://localhost:5555"; // Ustawienie na adres twojego API
|
||||
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(apiUrl) });
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
@@ -102,7 +102,21 @@ namespace SytelineSaAppEfDataModel.Dtos
|
||||
public string DocType { get; set; }
|
||||
public string BuyerCode { get; set; }
|
||||
|
||||
public string TranslatedStatus => TranslateStatus(Status);
|
||||
|
||||
public IEnumerable<EdiCustomerOrderLineDto> EdiCustomerOrderLines { get; set; } = new List<EdiCustomerOrderLineDto>();
|
||||
public IEnumerable<EdiCustomerOrderTranslateDto> EdiCustomerOrderTranslates { get; set; } = new List<EdiCustomerOrderTranslateDto>();
|
||||
|
||||
private static string TranslateStatus(string status)
|
||||
{
|
||||
return status switch
|
||||
{
|
||||
"O" => "Zamówione",
|
||||
"S" => "Zatrzymane",
|
||||
"P" => "Planowane",
|
||||
"C" => "Zakończone",
|
||||
_ => status
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user