Add project files.

This commit is contained in:
pkus
2025-01-24 13:37:01 +01:00
parent ee70a3c8af
commit ed726eea09
94 changed files with 4591 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<base href="/" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous" />
<link href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.3/font/bootstrap-icons.css" rel="stylesheet" />
<link href="_content/Blazor.Bootstrap/blazor.bootstrap.css" rel="stylesheet" />
<link rel="stylesheet" href="app.css" />
<link rel="stylesheet" href="OrdersManagement.styles.css" />
<HeadOutlet @rendermode="@InteractiveServer" />
</head>
<body>
<Routes @rendermode="@InteractiveServer" />
<script src="_framework/blazor.web.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<!-- Add chart.js reference if chart components are used in your application. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.0.1/chart.umd.js" integrity="sha512-gQhCDsnnnUfaRzD8k1L5llCCV6O9HN09zClIzzeJ8OJ9MpGmIlCxm+pdCkqTwqJ4JcjbojFr79rl2F1mzcoLMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<!-- Add chartjs-plugin-datalabels.min.js reference if chart components with data label feature is used in your application. -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/chartjs-plugin-datalabels/2.2.0/chartjs-plugin-datalabels.min.js" integrity="sha512-JPcRR8yFa8mmCsfrw4TNte1ZvF1e3+1SdGMslZvmrzDYxS69J7J49vkFL8u6u8PlPJK+H3voElBtUCzaXj+6ig==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdn.jsdelivr.net/npm/sortablejs@latest/Sortable.min.js"></script>
<script src="_content/Blazor.Bootstrap/blazor.bootstrap.js"></script>
</body>
</html>

View File

@@ -0,0 +1,52 @@
@using BlazorBootstrap
@inherits LayoutComponentBase
<div class="bb-page">
<Sidebar @ref="sidebar"
IconName="IconName.BootstrapFill"
Title="Blazor Bootstrap"
DataProvider="SidebarDataProvider" />
<main>
<div class="bb-top-row px-4 d-flex justify-content-end">
<a href="https://docs.microsoft.com/aspnet/" target="_blank">About</a>
</div>
<article class="content px-4">
<div class="py-2">@Body</div>
</article>
</main>
</div>
@code {
Sidebar sidebar;
IEnumerable<NavItem> navItems;
private async Task<SidebarDataProviderResult> SidebarDataProvider(SidebarDataProviderRequest request)
{
if (navItems is null)
navItems = GetNavItems();
return await Task.FromResult(request.ApplyTo(navItems));
}
private IEnumerable<NavItem> GetNavItems()
{
navItems = new List<NavItem>
{
new NavItem { Id = "1", Href = "/", IconName = IconName.HouseDoorFill, Text = "Zamówienia DELFOR", Match=NavLinkMatch.All},
new NavItem { Id = "2", Href = "/edicustomerorders", IconName = IconName.Database, Text = "Zamówienia klienta EDI"}
};
return navItems;
}
}
<div id="blazor-error-ui">
An unhandled error has occurred.
<a href="" class="reload">Reload</a>
<a class="dismiss">🗙</a>
</div>

View File

@@ -0,0 +1,96 @@
.page {
position: relative;
display: flex;
flex-direction: column;
}
main {
flex: 1;
}
.sidebar {
background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}
.top-row {
background-color: #f7f7f7;
border-bottom: 1px solid #d6d5d5;
justify-content: flex-end;
height: 3.5rem;
display: flex;
align-items: center;
}
.top-row ::deep a, .top-row ::deep .btn-link {
white-space: nowrap;
margin-left: 1.5rem;
text-decoration: none;
}
.top-row ::deep a:hover, .top-row ::deep .btn-link:hover {
text-decoration: underline;
}
.top-row ::deep a:first-child {
overflow: hidden;
text-overflow: ellipsis;
}
@media (max-width: 640.98px) {
.top-row {
justify-content: space-between;
}
.top-row ::deep a, .top-row ::deep .btn-link {
margin-left: 0;
}
}
@media (min-width: 641px) {
.page {
flex-direction: row;
}
.sidebar {
width: 250px;
height: 100vh;
position: sticky;
top: 0;
}
.top-row {
position: sticky;
top: 0;
z-index: 1;
}
.top-row.auth ::deep a:first-child {
flex: 1;
text-align: right;
width: 0;
}
.top-row, article {
padding-left: 2rem !important;
padding-right: 1.5rem !important;
}
}
#blazor-error-ui {
background: lightyellow;
bottom: 0;
box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
display: none;
left: 0;
padding: 0.6rem 1.25rem 0.7rem 1.25rem;
position: fixed;
width: 100%;
z-index: 1000;
}
#blazor-error-ui .dismiss {
cursor: pointer;
position: absolute;
right: 0.75rem;
top: 0.5rem;
}

View File

@@ -0,0 +1,30 @@
<div class="top-row ps-3 navbar navbar-dark">
<div class="container-fluid">
<a class="navbar-brand" href="">OrdersManagement</a>
</div>
</div>
<input type="checkbox" title="Navigation menu" class="navbar-toggler" />
<div class="nav-scrollable" onclick="document.querySelector('.navbar-toggler').click()">
<nav class="flex-column">
<div class="nav-item px-3">
<NavLink class="nav-link" href="" Match="NavLinkMatch.All">
<span class="bi bi-house-door-fill-nav-menu" aria-hidden="true"></span> Home
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="counter">
<span class="bi bi-plus-square-fill-nav-menu" aria-hidden="true"></span> Counter
</NavLink>
</div>
<div class="nav-item px-3">
<NavLink class="nav-link" href="weather">
<span class="bi bi-list-nested-nav-menu" aria-hidden="true"></span> Weather
</NavLink>
</div>
</nav>
</div>

View File

@@ -0,0 +1,105 @@
.navbar-toggler {
appearance: none;
cursor: pointer;
width: 3.5rem;
height: 2.5rem;
color: white;
position: absolute;
top: 0.5rem;
right: 1rem;
border: 1px solid rgba(255, 255, 255, 0.1);
background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") no-repeat center/1.75rem rgba(255, 255, 255, 0.1);
}
.navbar-toggler:checked {
background-color: rgba(255, 255, 255, 0.5);
}
.top-row {
height: 3.5rem;
background-color: rgba(0,0,0,0.4);
}
.navbar-brand {
font-size: 1.1rem;
}
.bi {
display: inline-block;
position: relative;
width: 1.25rem;
height: 1.25rem;
margin-right: 0.75rem;
top: -1px;
background-size: cover;
}
.bi-house-door-fill-nav-menu {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-house-door-fill' viewBox='0 0 16 16'%3E%3Cpath d='M6.5 14.5v-3.505c0-.245.25-.495.5-.495h2c.25 0 .5.25.5.5v3.5a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5v-7a.5.5 0 0 0-.146-.354L13 5.793V2.5a.5.5 0 0 0-.5-.5h-1a.5.5 0 0 0-.5.5v1.293L8.354 1.146a.5.5 0 0 0-.708 0l-6 6A.5.5 0 0 0 1.5 7.5v7a.5.5 0 0 0 .5.5h4a.5.5 0 0 0 .5-.5Z'/%3E%3C/svg%3E");
}
.bi-plus-square-fill-nav-menu {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-plus-square-fill' viewBox='0 0 16 16'%3E%3Cpath d='M2 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2zm6.5 4.5v3h3a.5.5 0 0 1 0 1h-3v3a.5.5 0 0 1-1 0v-3h-3a.5.5 0 0 1 0-1h3v-3a.5.5 0 0 1 1 0z'/%3E%3C/svg%3E");
}
.bi-list-nested-nav-menu {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='white' class='bi bi-list-nested' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M4.5 11.5A.5.5 0 0 1 5 11h10a.5.5 0 0 1 0 1H5a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 3 7h10a.5.5 0 0 1 0 1H3a.5.5 0 0 1-.5-.5zm-2-4A.5.5 0 0 1 1 3h10a.5.5 0 0 1 0 1H1a.5.5 0 0 1-.5-.5z'/%3E%3C/svg%3E");
}
.nav-item {
font-size: 0.9rem;
padding-bottom: 0.5rem;
}
.nav-item:first-of-type {
padding-top: 1rem;
}
.nav-item:last-of-type {
padding-bottom: 1rem;
}
.nav-item ::deep .nav-link {
color: #d7d7d7;
background: none;
border: none;
border-radius: 4px;
height: 3rem;
display: flex;
align-items: center;
line-height: 3rem;
width: 100%;
}
.nav-item ::deep a.active {
background-color: rgba(255,255,255,0.37);
color: white;
}
.nav-item ::deep .nav-link:hover {
background-color: rgba(255,255,255,0.1);
color: white;
}
.nav-scrollable {
display: none;
}
.navbar-toggler:checked ~ .nav-scrollable {
display: block;
}
@media (min-width: 641px) {
.navbar-toggler {
display: none;
}
.nav-scrollable {
/* Never collapse the sidebar for wide screens */
display: block;
/* Allow sidebar to scroll for tall menus */
height: calc(100vh - 3.5rem);
overflow-y: auto;
}
}

View File

@@ -0,0 +1,269 @@
@page "/edicustomerorder/{CustomerOrderId}"
@inject EdiCustomerOrderService EdiCustomerOrderService
@using SytelineSaAppEfDataModel.Dtos
@inherits LayoutComponentBase
<div class="row">
<h3>Zamówienie Klienta EDI</h3>
</div>
<div class="row">
<div class="col">
<SortableList TItem="EdiCustomerOrderDto" Data="_ediCustomerOrder">
<ItemTemplate>
<u>Numer zamówienia EDI:</u>&emsp;<b>@context.CustomerOrderNumber</b><br />
<u>Numer zamówienia Klienta:</u>&emsp;<b>@context.CustomerPoNumber</b><br />
<u>Numer klienta:</u>&emsp;<b>@context.CustomerNumber</b><br />
<u>Klient:</u>&emsp;<b>@context.CustomerName</b><br />
<u>Numer odbiorcy:</u>&emsp;<b>@(context.CustomerSequence?.ToString() ?? "N/A")</b><br />
<u>Data otrzymania:</u>&emsp;<b>@(context.RecivedDate?.ToString("dd.MM.yyyy HH:mm:ss") ?? "N/A")</b><br />
<u>Wysłano do Syteline?:</u>&emsp;<b>@((context.Posted?.ToString() ?? "0") == "0" ? "NIE" : "TAK")</b><br />
<u>Data wysyłki do Syteline:</u>&emsp;<b>@(context.PostedDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A")</b><br />
<u>Data zamówienia:</u>&emsp;<b>@(context.OrderDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A")</b><br />
</ItemTemplate>
</SortableList>
</div>
<div class="col">
<SortableList TItem="EdiCustomerOrderDto" Data="_ediCustomerOrder" Class="bg-light">
<ItemTemplate>
<u>Cena:</u>&emsp;<b>@(context.Price?.ToString("F2") ?? "N/A")</b><br />
<u>Waga:</u>&emsp;<b>@(context.Weight?.ToString("F2") ?? "N/A")</b><br />
<u>Magazyn:</u>&emsp;<b>@context.Warehouse</b><br />
<u>Gate:</u>&emsp;<b>@context.Gate</b><br />
<u>Kod odbiorcy:</u>&emsp;<b>@context.RecipientCode</b><br />
<u>Kod wysyłającego:</u>&emsp;<b>@context.SenderCode</b><br />
<u>Kod sprzedawcy:</u>&emsp;<b>@context.SellerCode</b><br />
<u>Kod kupującego:</u>&emsp;<b>@context.BuyerCode</b><br />
<u>Typ dokumentu:</u>&emsp;<b>@context.DocType</b><br />
</ItemTemplate>
</SortableList>
</div>
</div>
<br/>
<SortableList TItem="EdiCustomerOrderTranslateDto" Data="_ediCustomerOrderTranslate">
<ItemTemplate>
<u>Id:</u>&emsp;<b>@context.Id</b><br />
<u>CoEdiOrder:</u>&emsp;<b>@context.CoEdiOrder</b><br />
<u>CoRowPointer:</u>&emsp;<b>@context.CoRowPointer</b><br />
<u>CoCoNum:</u>&emsp;<b>@context.CoCoNum</b><br />
<u>CoType:</u>&emsp;<b>@context.CoType</b><br />
<u>CoTakenBy:</u>&emsp;<b>@context.CoTakenBy</b><br />
<u>EdiCoCoNum:</u>&emsp;<b>@context.EdiCoCoNum</b><br />
<u>OrdersCount:</u>&emsp;<b>@context.OrdersCount</b><br />
<u>OrderFound:</u>&emsp;<b>@context.OrderFound</b><br />
<u>CreatedDate:</u>&emsp;<b>@context.CreatedDate.ToString("yyyy-MM-dd HH:mm:ss")</b><br />
<u>FoundNumbers:</u>&emsp;<b>@context.FoundNumbers</b><br />
<u>ScheduleOrderId:</u>&emsp;<b>@context.ScheduleOrderId</b><br />
</ItemTemplate>
</SortableList>
<br />
<div class="row">
<h3>Indeksy</h3>
</div>
<div class="row">
<Grid @ref="_ediCustomerOrderLinesGrid"
TItem="EdiCustomerOrderLineDto"
Class="table table-hover table-bordered table-striped"
Data="_ediCustomerOrderLines"
AllowFiltering="true"
Responsive="true"
AllowPaging="true"
PageSize="20"
AllowSelection="true"
AllowRowClick="true"
SelectionMode="GridSelectionMode.Single"
SelectedItemsChanged="SelectedEdiCustomerOrderLineChanged">
<GridColumns>
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="CoLine" PropertyName="CoLine">
@context.CustomerOrderLine
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="SalesChannelProductCode" PropertyName="SalesChannelProductCode">
@context.Item
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="ShipperProductCode" PropertyName="ShipperProductCode">
@context.CustomerItemNumber
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Qty" TextAlignment="Alignment.End" PropertyName="Qty">
@context.BlanketQty
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="Address" PropertyName="Address">
@context.Address
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="BoxType" PropertyName="BoxType">
@context.BoxType
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="FinalDestination" PropertyName="FinalDestination">
@context.FinalDestination
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineDto" HeaderText="QtyPerBox" PropertyName="QtyPerBox">
@context.QtyPerBox
</GridColumn>
</GridColumns>
</Grid>
</div>
@if (_isVisibleEdiCustomerOrderLine)
{
<div class="row">
<h3>Szczegóły</h3>
</div>
<div class="row">
<div class="col">
<SortableList TItem="EdiCustomerOrderLineDto" Data="_selectedEdiCustomerOrderLine">
<ItemTemplate>
<u>CustomerOrderNumber:</u>&emsp;<b>@context.CustomerOrderNumber</b><br />
<u>CustomerOrderLine:</u>&emsp;<b>@context.CustomerOrderLine</b><br />
<u>Item:</u>&emsp;<b>@context.Item</b><br />
<u>CustomerItemNumber:</u>&emsp;<b>@context.CustomerItemNumber</b><br />
<u>BlanketQty:</u>&emsp;<b>@(context.BlanketQty?.ToString("F2") ?? "N/A")</b><br />
<u>EffectiveDate:</u>&emsp;<b>@(context.EffectiveDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A")</b><br />
<u>ExpirationDate:</u>&emsp;<b>@(context.ExpirationDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A")</b><br />
<u>ContPrice:</u>&emsp;<b>@(context.ContPrice?.ToString("F2") ?? "N/A")</b><br />
<u>Status:</u>&emsp;<b>@context.Status</b><br />
<u>Uom:</u>&emsp;<b>@context.Uom</b><br />
</ItemTemplate>
</SortableList>
</div>
<div class="col">
<SortableList TItem="EdiCustomerOrderLineDto" Data="_selectedEdiCustomerOrderLine">
<ItemTemplate>
<u>BlanketQtyReleased:</u>&emsp;<b>@(context.BlanketQtyReleased?.ToString("F2") ?? "N/A")</b><br />
<u>ContPriceReleased:</u>&emsp;<b>@(context.ContPriceReleased?.ToString("F2") ?? "N/A")</b><br />
<u>QtySent:</u>&emsp;<b>@(context.QtySent?.ToString("F2") ?? "N/A")</b><br />
<u>RecordDate:</u>&emsp;<b>@context.RecordDate.ToString("yyyy-MM-dd HH:mm:ss")</b><br />
<u>Description:</u>&emsp;<b>@context.Description</b><br />
<u>CreateDate:</u>&emsp;<b>@context.CreateDate.ToString("yyyy-MM-dd HH:mm:ss")</b><br />
<u>BoxType:</u>&emsp;<b>@context.BoxType</b><br />
<u>Address:</u>&emsp;<b>@context.Address</b><br />
<u>FinalDestination:</u>&emsp;<b>@context.FinalDestination</b><br />
<u>QtyPerBox:</u>&emsp;<b>@(context.QtyPerBox?.ToString() ?? "N/A")</b>
</ItemTemplate>
</SortableList>
</div>
</div>
<br />
<h3>Harmonogramy</h3>
<div class="row">
<Grid @ref="_ediCustomerOrderLineItemsGrid"
TItem="EdiCustomerOrderLineItemDto"
Class="table table-hover table-bordered table-striped"
Data="_ediCustomerOrderLineItems"
AllowFiltering="true"
Responsive="true"
AllowPaging="true"
PageSize="20"
AllowSelection="true"
AllowRowClick="true"
SelectionMode="GridSelectionMode.Single"
SelectedItemsChanged="SelectedEdiCustomerOrderLineItemChanged">
<GridColumns>
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Id" PropertyName="Id">
@context.CustomerOrderRelease
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Quantity Ordered" TextAlignment="Alignment.End" PropertyName="Quantity Ordered">
@context.QtyOrdered
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="Due Date" PropertyName="Due Date">
@context.DueDate?.ToString("yyyy-MM-dd")
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="RoutingCode" PropertyName="RoutingCode">
@context.RoutingCode
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="PalletCode" PropertyName="PalletCode">
@context.PalletCode
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="UnloadingPoint" PropertyName="UnloadingPoint">
@context.UnloadingPoint
</GridColumn>
<GridColumn TItem="EdiCustomerOrderLineItemDto" HeaderText="DestinationPoint" PropertyName="DestinationPoint">
@context.DestinationPoint
</GridColumn>
</GridColumns>
</Grid>
</div>
}@if (_isVisibleEdiCustomerOrderLineItem)
{
<div class="row">
<h3>Szczegóły</h3>
</div>
<div class="row">
<div class="col">
<SortableList TItem="EdiCustomerOrderLineItemDto" Data="_selectedEdiCustomerOrderLineItem">
<ItemTemplate>
<u>ReceivedDate:</u>&emsp;<b>@(context.ReceivedDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A")</b><br />
<u>CustomerOrderNumber:</u>&emsp;<b>@context.CustomerOrderNumber</b><br />
<u>CustomerOrderLine:</u>&emsp;<b>@context.CustomerOrderLine</b><br />
<u>CustomerOrderRelease:</u>&emsp;<b>@context.CustomerOrderRelease</b><br />
<u>Item:</u>&emsp;<b>@context.Item</b><br />
<u>CustomerItem:</u>&emsp;<b>@context.CustomerItem</b><br />
<u>QtyOrdered:</u>&emsp;<b>@(context.QtyOrdered?.ToString("F2") ?? "N/A")</b><br />
<u>QtyReady:</u>&emsp;<b>@(context.QtyReady?.ToString("F2") ?? "N/A")</b><br />
<u>Cost:</u>&emsp;<b>@(context.Cost?.ToString("F2") ?? "N/A")</b><br />
<u>Price:</u>&emsp;<b>@(context.Price?.ToString("F2") ?? "N/A")</b><br />
<u>DueDate:</u>&emsp;<b>@(context.DueDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A")</b><br />
<u>ReleaseDate:</u>&emsp;<b>@(context.ReleaseDate?.ToString("yyyy-MM-dd HH:mm:ss") ?? "N/A")</b><br />
<u>Warehouse:</u>&emsp;<b>@context.Warehouse</b><br />
</ItemTemplate>
</SortableList>
</div>
<div class="col">
<SortableList TItem="EdiCustomerOrderLineItemDto" Data="_selectedEdiCustomerOrderLineItem">
<ItemTemplate>
<u>TaxCodeOne:</u>&emsp;<b>@context.TaxCodeOne</b><br />
<u>Uom:</u>&emsp;<b>@context.Uom</b><br />
<u>QtyOrderedReleased:</u>&emsp;<b>@(context.QtyOrderedReleased?.ToString("F2") ?? "N/A")</b><br />
<u>PriceReleased:</u>&emsp;<b>@(context.PriceReleased?.ToString("F2") ?? "N/A")</b><br />
<u>CustomerOrderCustomerNumber:</u>&emsp;<b>@context.CustomerOrderCustomerNumber</b><br />
<u>Description:</u>&emsp;<b>@context.Description</b><br />
<u>CreateDate:</u>&emsp;<b>@context.CreateDate.ToString("yyyy-MM-dd HH:mm:ss")</b><br />
<u>RoutingCode:</u>&emsp;<b>@context.RoutingCode</b><br />
<u>DeliveryCallNumber:</u>&emsp;<b>@context.DeliveryCallNumber</b><br />
<u>UnloadingPoint:</u>&emsp;<b>@context.UnloadingPoint</b><br />
<u>DestinationPoint:</u>&emsp;<b>@context.DestinationPoint</b><br />
<u>PalletCode:</u>&emsp;<b>@context.PalletCode</b><br />
<u>PalletNumber:</u>&emsp;<b>@context.PalletNumber</b>
</ItemTemplate>
</SortableList>
</div>
</div>
}
@code {
[Parameter]
public string CustomerOrderId { get; set; } = string.Empty;
List<EdiCustomerOrderDto?>? _ediCustomerOrder;
List<EdiCustomerOrderTranslateDto?> _ediCustomerOrderTranslate = new();
List<EdiCustomerOrderLineDto> _ediCustomerOrderLines = new();
List<EdiCustomerOrderLineItemDto> _ediCustomerOrderLineItems = new();
List<EdiCustomerOrderLineDto?> _selectedEdiCustomerOrderLine = new();
List<EdiCustomerOrderLineItemDto?> _selectedEdiCustomerOrderLineItem = new();
Grid<EdiCustomerOrderLineDto>? _ediCustomerOrderLinesGrid;
Grid<EdiCustomerOrderLineItemDto>? _ediCustomerOrderLineItemsGrid;
private bool _isVisibleEdiCustomerOrderLine;
private bool _isVisibleEdiCustomerOrderLineItem;
protected override async Task OnInitializedAsync()
{
EdiCustomerOrderDto? ediCustomerOrder = await EdiCustomerOrderService.GetEdiCustomerOrderAsync(CustomerOrderId);
_ediCustomerOrder = new List<EdiCustomerOrderDto?> { ediCustomerOrder };
_ediCustomerOrderLines = ediCustomerOrder?.EdiCustomerOrderLines.ToList() ?? new List<EdiCustomerOrderLineDto>();
_ediCustomerOrderTranslate = new List<EdiCustomerOrderTranslateDto?> { ediCustomerOrder?.EdiCustomerOrderTranslates.MaxBy(x => x.CreatedDate) };
}
private void SelectedEdiCustomerOrderLineChanged(HashSet<EdiCustomerOrderLineDto> obj)
{
_isVisibleEdiCustomerOrderLine = obj.Any();
_selectedEdiCustomerOrderLine = new List<EdiCustomerOrderLineDto?> { obj.FirstOrDefault() };
_ediCustomerOrderLineItems = obj.FirstOrDefault()?.EdiCustomerOrderLineItems.ToList() ?? new List<EdiCustomerOrderLineItemDto>();
}
private void SelectedEdiCustomerOrderLineItemChanged(HashSet<EdiCustomerOrderLineItemDto> obj)
{
_isVisibleEdiCustomerOrderLineItem = obj.Any();
_selectedEdiCustomerOrderLineItem = new List<EdiCustomerOrderLineItemDto?> { obj.FirstOrDefault() };
}
}

View File

@@ -0,0 +1,161 @@
@page "/edicustomerorders"
@inject EdiCustomerOrderService EdiCustomerOrderService
@inject NavigationManager NavigationManager
@using SytelineSaAppEfDataModel.Dtos
@using FaKrosnoApi.Dtos
@using OrdersManagement.Dtos
@inherits LayoutComponentBase
<div class="row">
<h3>EdiCustomerOrders</h3>
</div>
<br />
<div class="row">
<div class="col-md-12">
<Switch ValueExpression="() => _filter" ValueChanged="FilterChanged" Label="Pokaż tylko niezaksięgowane" />
</div>
</div>
<br />
@if (_isVisible)
{
<div class="row">
<div class="col-md-12">
<Button Color="ButtonColor.Primary" @onclick="SendOrderToSyteLine">Księguj bieżący</Button>
</div>
</div>
}
<br />
<div class="row">
<Grid @ref="_grid"
TItem="EdiCustomerOrderDto"
Class="table table-hover table-bordered table-striped"
DataProvider="EdiCustomerOrdersDataProvider"
AllowFiltering="true"
Responsive="true"
AllowPaging="true"
PageSize="20"
AllowSelection="true"
AllowRowClick="true"
OnRowDoubleClick="OnRowDoubleClick"
SelectedItemsChanged="SelectedItemsChanged">
<GridColumns>
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="CO Number" PropertyName="CoNumber">
@context.CustomerOrderNumber
</GridColumn>
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Customer Number" PropertyName="CustNum">
@context.CustomerNumber
</GridColumn>
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Recipient" PropertyName="Recipient">
@context.CustomerSequence
</GridColumn>
<GridColumn TItem="EdiCustomerOrderDto" HeaderText="Last Update Date" PropertyName="LastUpdateDate">
@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>
</GridColumns>
</Grid>
</div>
<Modal @ref="_modal" Title="@_modalDto.Title">
<BodyTemplate>
@_modalDto.Body
</BodyTemplate>
<FooterTemplate>
<Button Color="ButtonColor.Primary" @onclick="OnHideModalClick">OK</Button>
</FooterTemplate>
</Modal>
@code {
Grid<EdiCustomerOrderDto>? _grid;
private IEnumerable<EdiCustomerOrderDto>? _ediCustomerOrders;
private EdiCustomerOrderDto? _selectedEdiCustomerOrder;
private Modal _modal = default!;
private ModalDto _modalDto = new(null, null);
private bool _isVisible;
private bool _filter;
// protected override async Task OnInitializedAsync()
// {
// _ediCustomerOrders = await EdiCustomerOrderService.GetEdiCustomerOrdersAsync() ?? new List<EdiCustomerOrderDto>();
// _ediCustomerOrders = _ediCustomerOrders.OrderByDescending(x => x.CreateDate).ToList();
// }
private async Task<GridDataProviderResult<EdiCustomerOrderDto>> EdiCustomerOrdersDataProvider(GridDataProviderRequest<EdiCustomerOrderDto> request)
{
_ediCustomerOrders = await EdiCustomerOrderService.GetEdiCustomerOrdersAsync() ?? new List<EdiCustomerOrderDto>();
_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)
{
string customerOrderId = obj.Item.CustomerOrderNumber;
NavigationManager.NavigateTo($"/edicustomerorder/{customerOrderId}");
}
private async void SendOrderToSyteLine()
{
if (_selectedEdiCustomerOrder == null) return;
ResponseDto response = await EdiCustomerOrderService.SendOrderToSyteline(_selectedEdiCustomerOrder.CustomerOrderNumber);
if (response.Status == 1)
{
_modalDto = new ModalDto("Wysłano", $"Zamówienie EDI {_selectedEdiCustomerOrder.CustomerOrderNumber} zostało poprawnie zaksięgowane w Zamówieniach klienta pod numerem '{_selectedEdiCustomerOrder.EdiCustomerOrderTranslates.FirstOrDefault()?.CoCoNum}'");
await _modal.ShowAsync();
_grid?.RefreshDataAsync();
}
else
{
_modalDto = new ModalDto("Błąd", $"Zamówienie EDI {_selectedEdiCustomerOrder.CustomerOrderNumber} nie zostało poprawnie zaksięgowane w Zamówieniach klienta.{Environment.NewLine}Lista błędów:{Environment.NewLine}{response.Message}");
await _modal.ShowAsync();
}
}
private void SelectedItemsChanged(HashSet<EdiCustomerOrderDto> obj)
{
_selectedEdiCustomerOrder = obj.FirstOrDefault() ?? null;
_isVisible = _selectedEdiCustomerOrder?.Posted == 0;
}
private async Task OnHideModalClick()
{
await _modal.HideAsync();
}
private void FilterChanged(bool obj)
{
_filter = obj;
_grid?.RefreshDataAsync();
}
}

View File

@@ -0,0 +1,36 @@
@page "/Error"
@using System.Diagnostics
<PageTitle>Error</PageTitle>
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>
@code{
[CascadingParameter]
private HttpContext? HttpContext { get; set; }
private string? RequestId { get; set; }
private bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
protected override void OnInitialized() =>
RequestId = Activity.Current?.Id ?? HttpContext?.TraceIdentifier;
}

View File

@@ -0,0 +1,135 @@
@page "/details/{ScheduleOrderId:int}"
@inject ScheduleOrderDetailsService ScheduleOrderDetailsService
<div class="container-fluid">
<div class="row">
<div class="col-md-4 bg-light" style="min-height: 150vh;">
<h2 style="margin: 5px">Indeksy:</h2>
<Grid @ref="_grid"
TItem="ScheduleOrderDetailDto"
Class="table table-hover table-bordered table-striped"
DataProvider="ScheduleOrderDetailsDataProvider"
AllowFiltering="true"
Responsive="true"
AllowPaging="true"
PageSize="20"
AllowSelection="true"
AllowRowClick="true"
SelectionMode="GridSelectionMode.Single"
SelectedItemsChanged="SelectedItemChanged">
<GridColumns>
<GridColumn TItem="ScheduleOrderDetailDto" HeaderText="Id" PropertyName="Id">
@context.ID
</GridColumn>
<GridColumn TItem="ScheduleOrderDetailDto" HeaderText="SalesChannelProductCode" PropertyName="SalesChannelProductCode">
@context.Sc_productCode
</GridColumn>
<GridColumn TItem="ScheduleOrderDetailDto" HeaderText="ShipperProductCode" PropertyName="ShipperProductCode">
@context.Sh_productCode
</GridColumn>
<GridColumn TItem="ScheduleOrderDetailDto" HeaderText="Price" PropertyName="Price">
@context.Price
</GridColumn>
</GridColumns>
</Grid>
@if (_isVisible)
{
<div id="rightTopContainer" class="col-12 bg-light" style="height: auto;">
<h2 style="margin: 5px">Dodatkowe informacje:</h2>
<SortableList TItem="ScheduleOrderDetailMiscDto" Data="_scheduleOrderDetailMiscs">
<ItemTemplate>
<u>@context.Label:</u>&emsp;<b>@context.Value</b>
</ItemTemplate>
</SortableList>
</div>
}
</div>
<div class="col-md-8">
<div class="row">
@if (_isVisible)
{
<div id="rightBottomContainer" class="col-12 bg-light">
<h2 style="margin: 5px">Harmonogramy:</h2>
<Grid @ref="_detailDetailsGrid"
TItem="ScheduleOrderDetailDetailDto"
Data="_scheduleOrderDetailsDetails"
Class="table table-hover table-bordered table-striped"
AllowFiltering="true"
Responsive="true"
AllowPaging="true"
PageSize="20"
AllowSelection="true"
SelectionMode="GridSelectionMode.Single"
SelectedItemsChanged="SelectedDetailDetailChanged">
<GridColumns>
<GridColumn TItem="ScheduleOrderDetailDetailDto" HeaderText="Id" PropertyName="Id">
@context.ID
</GridColumn>
<GridColumn TItem="ScheduleOrderDetailDetailDto" HeaderText="DateFrom" PropertyName="DateFrom">
@context.DateFrom
</GridColumn>
<GridColumn TItem="ScheduleOrderDetailDetailDto" HeaderText="DateTo" PropertyName="DateTo">
@context.DateTo
</GridColumn>
<GridColumn TItem="ScheduleOrderDetailDetailDto" HeaderText="Qty" PropertyName="Qty">
@context.Qty
</GridColumn>
</GridColumns>
</Grid>
</div>
@if (_isVisibleDetailDetail)
{
<div id="rightTopContainer" class="col-12 bg-light" style="height: auto;">
<h2 style="margin: 5px">Dodatkowe informacje:</h2>
<SortableList TItem="ScheduleOrderDetailDetailMiscDto" Data="_scheduleOrderDetailDetailMiscs">
<ItemTemplate>
<u>@context.Label:</u>&emsp;<b>@context.Value</b>
</ItemTemplate>
</SortableList>
</div>
}
}
</div>
</div>
</div>
</div>
@code {
[Parameter]
public int ScheduleOrderId { get; set; }
private bool _isVisible;
private bool _isVisibleDetailDetail;
Grid<ScheduleOrderDetailDto>? _grid;
Grid<ScheduleOrderDetailDetailDto>? _detailDetailsGrid;
private IEnumerable<ScheduleOrderDetailDto>? _scheduleOrderDetails;
private IEnumerable<ScheduleOrderDetailDetailDto>? _scheduleOrderDetailsDetails;
private List<ScheduleOrderDetailMiscDto>? _scheduleOrderDetailMiscs;
private List<ScheduleOrderDetailDetailMiscDto>? _scheduleOrderDetailDetailMiscs;
private async Task<GridDataProviderResult<ScheduleOrderDetailDto>> ScheduleOrderDetailsDataProvider(GridDataProviderRequest<ScheduleOrderDetailDto> request)
{
_scheduleOrderDetails = await ScheduleOrderDetailsService.GetScheduleOrderDetails(ScheduleOrderId) ?? new List<ScheduleOrderDetailDto>();
StateHasChanged();
return await Task.FromResult(request.ApplyTo(_scheduleOrderDetails));
}
private void SelectedItemChanged(HashSet<ScheduleOrderDetailDto> obj)
{
_isVisible = obj.Any();
_scheduleOrderDetailMiscs = obj.FirstOrDefault()?.ScheduleOrderDetailMiscs.ToList();
_scheduleOrderDetailsDetails = obj.FirstOrDefault()?.ScheduleOrderDetailDetails.ToList();
}
private void SelectedDetailDetailChanged(HashSet<ScheduleOrderDetailDetailDto> obj)
{
_isVisibleDetailDetail = obj.Any();
_scheduleOrderDetailDetailMiscs = obj.FirstOrDefault()?.ScheduleOrderDetailDetailMiscs.ToList();
}
}

View File

@@ -0,0 +1,62 @@
@page "/"
@inject ScheduleOrderService ScheduleOrderService
@inject NavigationManager NavigationManager
@inherits LayoutComponentBase
<h3>ScheduleOrders</h3>
<Grid @ref="_grid"
TItem="ScheduleOrderDto"
Class="table table-hover table-bordered table-striped"
DataProvider="ScheduleOrdersDataProvider"
AllowFiltering="true"
Responsive="true"
AllowPaging="true"
PageSize="20"
AllowSelection="true"
AllowRowClick="true"
OnRowDoubleClick="OnRowDoubleClick">
<GridColumns>
<GridColumn TItem="ScheduleOrderDto" HeaderText="Id" PropertyName="Id">
@context.ID
</GridColumn>
<GridColumn TItem="ScheduleOrderDto" HeaderText="OrderID" PropertyName="OrderID">
@context.OrderID
</GridColumn>
<GridColumn TItem="ScheduleOrderDto" HeaderText="PO Number" PropertyName="PONum">
@context.PONum
</GridColumn>
<GridColumn TItem="ScheduleOrderDto" HeaderText="Recipient" PropertyName="Recipient">
@context.Recipient.RecipientCode
</GridColumn>
<GridColumn TItem="ScheduleOrderDto" HeaderText="Purchaser" Filterable="true" PropertyName="Purchaser">
@context.Recipient.Purchaser.PurchaserCode
</GridColumn>
<GridColumn TItem="ScheduleOrderDto" HeaderText="Last Update Date" PropertyName="LastUpdateDate">
@context.LastUpdateDate
</GridColumn>
</GridColumns>
</Grid>
@code {
Grid<ScheduleOrderDto>? _grid;
private IEnumerable<ScheduleOrderDto>? _scheduleOrders;
private async Task<GridDataProviderResult<ScheduleOrderDto>> ScheduleOrdersDataProvider(GridDataProviderRequest<ScheduleOrderDto> request)
{
_scheduleOrders = await ScheduleOrderService.GetScheduleOrdersAsync() ?? new List<ScheduleOrderDto>();
_scheduleOrders = _scheduleOrders.OrderByDescending(x => x.LastUpdateDate).ToList();
StateHasChanged();
return await Task.FromResult(request.ApplyTo(_scheduleOrders));
}
private void OnRowDoubleClick(GridRowEventArgs<ScheduleOrderDto> obj)
{
int scheduleOrderId = obj.Item.ID;
NavigationManager.NavigateTo($"/details/{scheduleOrderId}");
}
}

View File

@@ -0,0 +1,7 @@
@using OrdersManagement.Components.Layout
<Router AppAssembly="@typeof(Program).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(Layout.MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
</Router>

View File

@@ -0,0 +1,11 @@
@using System.Net.Http
@using System.Net.Http.Json
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using static Microsoft.AspNetCore.Components.Web.RenderMode
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using BlazorBootstrap;
@using FaKrosnoEfDataModel.Dtos
@using OrdersManagement.Services

View File

@@ -0,0 +1,8 @@
namespace OrdersManagement.Dtos
{
public class ModalDto(string? title, string? body)
{
public string? Title { get; set; } = title;
public string? Body { get; set; } = body;
}
}

View File

@@ -0,0 +1,16 @@
namespace FaKrosnoApi.Dtos
{
public class ResponseDto
{
public int Status { get; set; }
public string Identifier { get; set; }
public string? Message { get; set; }
public ResponseDto(int status, string identifier, string? message)
{
Status = status;
Identifier = identifier;
Message = message;
}
}
}

View File

@@ -0,0 +1,36 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazor.Bootstrap" Version="3.2.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FaKrosnoEfDataModel\FaKrosnoEfDataModel.csproj" />
<ProjectReference Include="..\SytelineSaAppEfDataModel\SytelineSaAppEfDataModel.csproj" />
</ItemGroup>
<ItemGroup>
<Content Update="Components\App.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Update="Components\Layout\MainLayout.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Update="Components\Pages\Error.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Update="Components\Routes.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
<Content Update="Components\_Imports.razor">
<ExcludeFromSingleFile>true</ExcludeFromSingleFile>
</Content>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,39 @@
using Microsoft.AspNetCore.Routing.Constraints;
using OrdersManagement.Components;
using OrdersManagement.Services;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddBlazorBootstrap();
string apiUrl = builder.Configuration["ApiUrl"] ?? "http://localhost:5000"; // Ustawienie na adres twojego API
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(apiUrl) });
// Add services to the container.
builder.Services.AddRazorComponents()
.AddInteractiveServerComponents();
builder.Services.AddScoped<ScheduleOrderService>();
builder.Services.AddScoped<ScheduleOrderDetailsService>();
builder.Services.AddScoped<EdiCustomerOrderService>();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error", createScopeForErrors: true);
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseAntiforgery();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode();
app.Run();

View File

@@ -0,0 +1,38 @@
{
"$schema": "http://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:61370",
"sslPort": 44319
}
},
"profiles": {
"http": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "http://localhost:5295",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:7215;http://localhost:5295",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -0,0 +1,41 @@
using FaKrosnoApi.Dtos;
using SytelineSaAppEfDataModel.Dtos;
namespace OrdersManagement.Services
{
public class EdiCustomerOrderService(HttpClient httpClient)
{
public async Task<IEnumerable<EdiCustomerOrderDto>?> GetEdiCustomerOrdersAsync()
{
return await httpClient.GetFromJsonAsync<IEnumerable<EdiCustomerOrderDto>>("api/EdiCustomerOrders");
}
public async Task<EdiCustomerOrderDto?> GetEdiCustomerOrderAsync(string customerOrderNumber)
{
return await httpClient.GetFromJsonAsync<EdiCustomerOrderDto>(
$"api/EdiCustomerOrders/by-order-number/?customerOrderNumber={Uri.EscapeDataString(customerOrderNumber)}");
}
public async Task<ResponseDto> SendOrderToSyteline(string customerOrderNumber)
{
HttpResponseMessage responseMessage = await httpClient.PostAsync(
$"api/EdiCustomerOrders/send-to-syteline?customerOrderNumber={Uri.EscapeDataString(customerOrderNumber)}", null);
if (responseMessage.IsSuccessStatusCode)
{
return new ResponseDto(1, customerOrderNumber, null);
}
string? errorMessage = null;
IEnumerable<ErrorLogDto>? logs = await httpClient.GetFromJsonAsync<IEnumerable<ErrorLogDto>>(
$"api/ErrorLog/by-order-number/?customerOrderNumber={Uri.EscapeDataString(customerOrderNumber)}");
if (logs != null)
{
errorMessage = string.Join("\r\n", logs.Select(x => x.ErrMsg));
}
return new ResponseDto(0, customerOrderNumber, errorMessage);
}
}
}

View File

@@ -0,0 +1,13 @@
using FaKrosnoEfDataModel.Dtos;
namespace OrdersManagement.Services
{
public class ScheduleOrderDetailsService(HttpClient httpClient)
{
public async Task<IEnumerable<ScheduleOrderDetailDto>?> GetScheduleOrderDetails(int scheduleOrderId)
{
return await httpClient.GetFromJsonAsync<IEnumerable<ScheduleOrderDetailDto>>(
$"api/scheduleOrderDetails/order/{scheduleOrderId}");
}
}
}

View File

@@ -0,0 +1,12 @@
using FaKrosnoEfDataModel.Dtos;
namespace OrdersManagement.Services
{
public class ScheduleOrderService(HttpClient httpClient)
{
public async Task<IEnumerable<ScheduleOrderDto>?> GetScheduleOrdersAsync()
{
return await httpClient.GetFromJsonAsync<IEnumerable<ScheduleOrderDto>>("api/ScheduleOrders");
}
}
}

View File

@@ -0,0 +1,8 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@@ -0,0 +1,51 @@
html, body {
font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
a, .btn-link {
color: #006bb7;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
.content {
padding-top: 1.1rem;
}
h1:focus {
outline: none;
}
.valid.modified:not([type=checkbox]) {
outline: 1px solid #26b050;
}
.invalid {
outline: 1px solid #e50000;
}
.validation-message {
color: #e50000;
}
.blazor-error-boundary {
background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
padding: 1rem 1rem 1rem 3.7rem;
color: white;
}
.blazor-error-boundary::after {
content: "An error has occurred."
}
.darker-border-checkbox.form-check-input {
border-color: #929292;
}