diff --git a/OrdersManagement/Components/Pages/CustomerOrder.razor b/OrdersManagement/Components/Pages/CustomerOrder.razor
index ba8a68b..6637a61 100644
--- a/OrdersManagement/Components/Pages/CustomerOrder.razor
+++ b/OrdersManagement/Components/Pages/CustomerOrder.razor
@@ -1,12 +1,239 @@
@page "/CustomerOrder/{CustomerOrderId:guid}"
-@inject EdiCustomerOrderService CustomerOrderService
+@inject CustomerOrderService CustomerOrderService
@using SytelineSaAppEfDataModel.Dtos
@inherits LayoutComponentBase
-
CustomerOrder
+Zamówienie klienta nr @_customerOrder?.FirstOrDefault()?.CoNum
+
+
+
+
+ Numer Zamówienia: @context.CoNum
+ Numer Zamówienia Klienta: @context.CustPo
+ Klient: @context.CustNum
+ Numer Odbiorcy: @context.CustSeq
+ Kontakt: @context.Contact
+ Telefon: @context.Phone
+ Data Zamówienia: @context.OrderDate.ToString("yyyy-MM-dd HH:mm:ss")
+ Warunki: @context.TermsCode
+ Wartość Brutto: @(context.Price?.ToString("F2") ?? "N/A")
+ Status: @context.TranslatedStatus
+
+
+
+
+
+
+ Magazyn: @context.Whse
+ VAT: @context.FrtTaxCode1
+ Typ Odbiorcy: @context.EndUserType
+ Kurs Wymiany: @(context.ExchRate?.ToString("F4") ?? "N/A")
+ Gate: @context.Uf_FKR_EDI_Gate
+ RecipientCode: @context.Uf_FKR_EDI_RecipientCode
+ SelletCode: @context.Uf_FKR_EDI_SellerCode
+ SenderCode: @context.Uf_FKR_EDI_SenderCode
+ BuyerCode: @context.Uf_FKR_EDI_BuyerCode
+ Typ Dokumentu: @context.Uf_DocType
+
+
+
+
+
+
+
Indeksy
+
+
+
+
+
+ @context.CoLine
+
+
+ @context.Item
+
+
+ @context.CustItem
+
+
+ @context.Description
+
+
+ @context.BlanketQty
+
+
+ @context.UM
+
+
+ @context.ContPrice
+
+
+ @context.TranslatedStatus
+
+
+
+
+@if (_isVisibleCustomerOrderLine)
+{
+
+
Szczegóły
+
+
+
+
+
+ Numer zamówienia: @context.CoNum
+ Linia: @context.CoLine
+ Pozycja: @context.Item
+ Pozycja Klienta: @context.CustItem
+ Opis: @context.Description
+ Łączna Ilość: @context.BlanketQty.ToString("F2")
+ Status: @context.TranslatedStatus
+
+
+
+
+
+
+ Cena: @(context.ContPrice?.ToString("F2") ?? "N/A")
+ Ważne Od: @(context.EffDate?.ToString("dd.MM.yyyy") ?? "N/A")
+ J/M: @context.UM
+ BoxType: @context.Uf_FKR_EDI_BLN_BoxType
+ Address: @context.Uf_FKR_EDI_BLN_Address
+ FinalDestination: @context.Uf_FKR_EDI_BLN_FinalDestination
+ QtyPerBox: @(context.Uf_FKR_EDI_BLN_QtyPerBox?.ToString() ?? "N/A")
+
+
+
+
+
+ Harmonogramy
+
+
+
+
+ @context.CoLine
+
+
+ @context.CoRelease
+
+
+ @context.Item
+
+
+ @context.CustItem
+
+
+ @context.QtyOrdered
+
+
+ @context.DueDate?.ToString("dd.MM.yyyy")
+
+
+ @context.TranslatedStatus
+
+
+
+
+ @if (_isVisibleCustomerOrderLineItem)
+ {
+
+
Szczegóły
+
+
+
+
+
+ Numer Zamówienia: @context.CoNum
+ Linia: @context.CoLine
+ Zwolnienie: @context.CoRelease
+ Pozycja: @context.Item
+ Pozycja Klienta: @context.CustItem
+ Łączna Ilość Sztuk: @(context.QtyOrdered.ToString("F2") ?? "N/A")
+ Cena: @(context.Price.ToString("F2") ?? "N/A")
+ Data Wykonania: @(context.DueDate?.ToString("dd.MM.yyyy") ?? "N/A")
+ Data Rejestracji: @(context.ReleaseDate?.ToString("dd.MM.yyyy") ?? "N/A")
+ Magazyn: @context.Whse
+
+
+
+
+
+
+ Kod VAT: @context.TaxCode1
+ J/M: @context.UM
+ Numer Klienta: @context.CoCustNum
+ Opis: @context.Description
+ Status: @context.TranslatedStatus
+ RoutingCode: @context.Uf_FKR_EDI_ITEM_RoutingCode
+ DeliveryCallNumber: @context.Uf_FKR_EDI_ITEM_DeliveryCallNum
+ UnloadingPoint: @context.Uf_LOC_11_UnloadingPoint
+ DestinationPoint: @context.Uf_LOC_159_DestinationPoint
+ PalletCode: @context.Uf_FKR_EDI_ITEM_PalletCode
+
+
+
+
+ }
+}
@code {
- [Parameter]
- public Guid CustomerOrderId { get; set; }
+ [Parameter] public Guid CustomerOrderId { get; set; }
+
+ List? _customerOrder { get; set; }
+ List _customerOrderLines = [];
+ List _customerOrderLineItems = [];
+
+ List _selectedCustomerOrderLine = [];
+ List _selectedCustomerOrderLineItem = [];
+
+ Grid? _customerOrderLinesGrid;
+ Grid? _customerOrderLineItemsGrid;
+
+ private bool _isVisibleCustomerOrderLine;
+ private bool _isVisibleCustomerOrderLineItem;
+
+ protected override async Task OnInitializedAsync()
+ {
+ CustomerOrderDto? customerOrder = await CustomerOrderService.GetCustomerOrderAsync(CustomerOrderId);
+
+ _customerOrder = [customerOrder];
+ _customerOrderLines = customerOrder?.CustomerOrderLines.ToList() ?? [];
+ }
+
+ private void SelectedCustomerOrderLineChanged(HashSet obj)
+ {
+ _isVisibleCustomerOrderLine = obj.Any();
+ _selectedCustomerOrderLine = [obj.FirstOrDefault()];
+ _customerOrderLineItems = obj.FirstOrDefault()?.CustomerOrderLineItems.ToList() ?? [];
+ }
+
+ private void SelectedCustomerOrderLineItemChanged(HashSet obj)
+ {
+ _isVisibleCustomerOrderLineItem = obj.Any();
+ _selectedCustomerOrderLineItem = [obj.FirstOrDefault()];
+ }
}
\ No newline at end of file
diff --git a/SytelineSaAppEfDataModel/Dtos/CustomerOrderDto.cs b/SytelineSaAppEfDataModel/Dtos/CustomerOrderDto.cs
index cced078..8ad2f31 100644
--- a/SytelineSaAppEfDataModel/Dtos/CustomerOrderDto.cs
+++ b/SytelineSaAppEfDataModel/Dtos/CustomerOrderDto.cs
@@ -1,6 +1,6 @@
namespace SytelineSaAppEfDataModel.Dtos
{
- public class CustomerOrderDto
+ public class CustomerOrderDto : DtoBase
{
public string Type { get; set; }
public string CoNum { get; set; }
@@ -119,6 +119,8 @@
public string Uf_FKR_EDI_SenderCode { get; set; }
public string Uf_DocType { get; set; }
public string Uf_FKR_EDI_BuyerCode { get; set; }
+
+ public string TranslatedStatus => TranslateStatus(Stat);
public IEnumerable CustomerOrderLines { get; set; } = new List();
}
diff --git a/SytelineSaAppEfDataModel/Dtos/CustomerOrderLineDto.cs b/SytelineSaAppEfDataModel/Dtos/CustomerOrderLineDto.cs
index ff3e941..4cd433a 100644
--- a/SytelineSaAppEfDataModel/Dtos/CustomerOrderLineDto.cs
+++ b/SytelineSaAppEfDataModel/Dtos/CustomerOrderLineDto.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace SytelineSaAppEfDataModel.Dtos
{
- public class CustomerOrderLineDto
+ public class CustomerOrderLineDto : DtoBase
{
public string CoNum { get; set; }
public short CoLine { get; set; }
@@ -50,6 +50,8 @@ namespace SytelineSaAppEfDataModel.Dtos
public string Uf_FKR_EDI_BLN_BoxType { get; set; }
public string Uf_FKR_EDI_BLN_FinalDestination { get; set; }
public int? Uf_FKR_EDI_BLN_QtyPerBox { get; set; }
+
+ public string TranslatedStatus => TranslateStatus(Stat);
public IEnumerable CustomerOrderLineItems { get; set; } =
new List();
diff --git a/SytelineSaAppEfDataModel/Dtos/CustomerOrderLineItemDto.cs b/SytelineSaAppEfDataModel/Dtos/CustomerOrderLineItemDto.cs
index 10512b9..e4af2ba 100644
--- a/SytelineSaAppEfDataModel/Dtos/CustomerOrderLineItemDto.cs
+++ b/SytelineSaAppEfDataModel/Dtos/CustomerOrderLineItemDto.cs
@@ -6,7 +6,7 @@ using System.Threading.Tasks;
namespace SytelineSaAppEfDataModel.Dtos
{
- public class CustomerOrderLineItemDto
+ public class CustomerOrderLineItemDto : DtoBase
{
public string CoNum { get; set; }
public short CoLine { get; set; }
@@ -129,5 +129,7 @@ namespace SytelineSaAppEfDataModel.Dtos
public string Uf_LOC_159_DestinationPoint { get; set; }
public string Uf_Status { get; set; }
public string Uf_FKR_EDI_ITEM_PalletCode { get; set; }
+
+ public string TranslatedStatus => TranslateStatus(Stat);
}
}
diff --git a/SytelineSaAppEfDataModel/Dtos/DtoBase.cs b/SytelineSaAppEfDataModel/Dtos/DtoBase.cs
index b233e31..c8ed538 100644
--- a/SytelineSaAppEfDataModel/Dtos/DtoBase.cs
+++ b/SytelineSaAppEfDataModel/Dtos/DtoBase.cs
@@ -10,6 +10,7 @@
"S" => "Zatrzymane",
"P" => "Planowane",
"C" => "Zakończone",
+ "F" => "Wypełnione",
_ => status
};
}