* Changed port of API
* Changed filtering and grid headers * Added TranslatedStatus field
This commit is contained in:
@@ -15,6 +15,6 @@
|
|||||||
"Audience": "FaKrosnoClient"
|
"Audience": "FaKrosnoClient"
|
||||||
},
|
},
|
||||||
"Host": {
|
"Host": {
|
||||||
"Urls": "http://0.0.0.0:5000"
|
"Urls": "http://0.0.0.0:5555"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<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>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
AllowFiltering="true"
|
AllowFiltering="true"
|
||||||
Responsive="true"
|
Responsive="true"
|
||||||
AllowPaging="true"
|
AllowPaging="true"
|
||||||
PageSize="20"
|
PageSize="10"
|
||||||
AllowSelection="true"
|
AllowSelection="true"
|
||||||
AllowRowClick="true"
|
AllowRowClick="true"
|
||||||
SelectionMode="GridSelectionMode.Multiple"
|
SelectionMode="GridSelectionMode.Multiple"
|
||||||
@@ -42,32 +42,23 @@
|
|||||||
SelectedItemsChanged="SelectedItemsChanged">
|
SelectedItemsChanged="SelectedItemsChanged">
|
||||||
|
|
||||||
<GridColumns>
|
<GridColumns>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="CO Number" PropertyName="CustomerOrderNumber">
|
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Numer Zamówienia" PropertyName="CustomerOrderNumber">
|
||||||
@context.CustomerOrderNumber
|
@context.CustomerOrderNumber
|
||||||
</GridColumn>
|
</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
|
@context.CustomerNumber
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Recipient" PropertyName="CustomerSequence">
|
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Odbiorca" PropertyName="CustomerSequence">
|
||||||
@context.CustomerSequence
|
@context.CustomerSequence
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Last Update Date" PropertyName="CreateDate">
|
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Data Otrzymania" PropertyName="CreateDate">
|
||||||
@context.CreateDate
|
@context.CreateDate
|
||||||
</GridColumn>
|
</GridColumn>
|
||||||
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Gate" PropertyName="Gate">
|
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Status" PropertyName="TranslatedStatus">
|
||||||
@context.Gate
|
@context.TranslatedStatus
|
||||||
</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>
|
</GridColumn>
|
||||||
</GridColumns>
|
</GridColumns>
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -106,7 +97,7 @@
|
|||||||
private ModalDto _modalDto = new(null, null);
|
private ModalDto _modalDto = new(null, null);
|
||||||
|
|
||||||
private bool _isVisible;
|
private bool _isVisible;
|
||||||
private bool _filter = true;
|
private bool _filter;
|
||||||
|
|
||||||
private string _text = "Księguj bieżący";
|
private string _text = "Księguj bieżący";
|
||||||
|
|
||||||
@@ -115,13 +106,11 @@
|
|||||||
_ediCustomerOrders = (await EdiCustomerOrderService.GetEdiCustomerOrdersAsync() ?? new List<EdiCustomerOrderDto>()).ToList();
|
_ediCustomerOrders = (await EdiCustomerOrderService.GetEdiCustomerOrdersAsync() ?? new List<EdiCustomerOrderDto>()).ToList();
|
||||||
_ediCustomerOrders = _ediCustomerOrders.OrderByDescending(x => x.CreateDate).ToList();
|
_ediCustomerOrders = _ediCustomerOrders.OrderByDescending(x => x.CreateDate).ToList();
|
||||||
|
|
||||||
if (_filter)
|
if (!_filter)
|
||||||
{
|
{
|
||||||
_ediCustomerOrders = _ediCustomerOrders.Where(x => x.Posted == 0).ToList();
|
_ediCustomerOrders = _ediCustomerOrders.Where(x => x.Posted == 0).ToList();
|
||||||
}
|
}
|
||||||
|
|
||||||
_filter = true;
|
|
||||||
|
|
||||||
StateHasChanged();
|
StateHasChanged();
|
||||||
|
|
||||||
return await Task.FromResult(request.ApplyTo(_ediCustomerOrders));
|
return await Task.FromResult(request.ApplyTo(_ediCustomerOrders));
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ var builder = WebApplication.CreateBuilder(args);
|
|||||||
|
|
||||||
builder.Services.AddBlazorBootstrap();
|
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) });
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(apiUrl) });
|
||||||
|
|
||||||
// Add services to the container.
|
// Add services to the container.
|
||||||
|
|||||||
@@ -102,7 +102,21 @@ namespace SytelineSaAppEfDataModel.Dtos
|
|||||||
public string DocType { get; set; }
|
public string DocType { get; set; }
|
||||||
public string BuyerCode { get; set; }
|
public string BuyerCode { get; set; }
|
||||||
|
|
||||||
|
public string TranslatedStatus => TranslateStatus(Status);
|
||||||
|
|
||||||
public IEnumerable<EdiCustomerOrderLineDto> EdiCustomerOrderLines { get; set; } = new List<EdiCustomerOrderLineDto>();
|
public IEnumerable<EdiCustomerOrderLineDto> EdiCustomerOrderLines { get; set; } = new List<EdiCustomerOrderLineDto>();
|
||||||
public IEnumerable<EdiCustomerOrderTranslateDto> EdiCustomerOrderTranslates { get; set; } = new List<EdiCustomerOrderTranslateDto>();
|
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