WIP: customer order
This commit is contained in:
parent
59cb830dcd
commit
614df811a2
4 changed files with 84 additions and 1 deletions
|
@ -66,7 +66,18 @@
|
||||||
@item.Sku
|
@item.Sku
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-2 text-sm-start">
|
<div class="col-sm-2 text-sm-start">
|
||||||
|
<div class="position-relative">
|
||||||
|
@* OnDemand flag 2023-08-15 *@
|
||||||
@item.ShortName
|
@item.ShortName
|
||||||
|
@if (item.OnDemand)
|
||||||
|
{
|
||||||
|
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-warning">
|
||||||
|
Skaffevare
|
||||||
|
<span class="visually-hidden">Skaffevare</span>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
@* @item.ShortName *@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-1 text-center">
|
<div class="col-sm-1 text-center">
|
||||||
@item.BoxSize
|
@item.BoxSize
|
||||||
|
|
|
@ -58,6 +58,37 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if (DraftProvider.Draft.Items.Any())
|
||||||
|
{
|
||||||
|
<table class="table table-striped">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Varenr</th>
|
||||||
|
<th>Beskrivelse</th>
|
||||||
|
<th>Antal</th>
|
||||||
|
<th></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
@foreach (var line in DraftProvider.Draft.Items)
|
||||||
|
{
|
||||||
|
<tr>
|
||||||
|
<td>@line.Item.Sku</td>
|
||||||
|
<td>@line.Item.Name</td>
|
||||||
|
<td>@line.Quantity</td>
|
||||||
|
<td><button class="btn btn-danger" @onclick="() => RemoveItem(line.Item.Sku)" >Slet</button></td>
|
||||||
|
</tr>
|
||||||
|
}
|
||||||
|
<tr>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td></td>
|
||||||
|
<td><button class="btn btn-primary">Send bestilling</button></td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
}
|
||||||
|
|
||||||
@if (_productInventory.Any())
|
@if (_productInventory.Any())
|
||||||
{
|
{
|
||||||
<div class="row row-cols-1 row-cols-md-2 g-2">
|
<div class="row row-cols-1 row-cols-md-2 g-2">
|
||||||
|
|
1
Wonky.Client/Pages/BusinessOrderViewPage.razor
Normal file
1
Wonky.Client/Pages/BusinessOrderViewPage.razor
Normal file
|
@ -0,0 +1 @@
|
||||||
|
@page "/b2b/{countryCode}/{companyId}/order/new"
|
40
Wonky.Client/Pages/BusinessOrderViewPage.razor.cs
Normal file
40
Wonky.Client/Pages/BusinessOrderViewPage.razor.cs
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
using Microsoft.AspNetCore.Components;
|
||||||
|
using Microsoft.Extensions.Options;
|
||||||
|
using Wonky.Client.HttpInterceptors;
|
||||||
|
using Wonky.Client.HttpRepository;
|
||||||
|
using Wonky.Client.Models;
|
||||||
|
using Wonky.Client.OverlayB2B;
|
||||||
|
using Wonky.Client.Shared;
|
||||||
|
using Wonky.Entity.Configuration;
|
||||||
|
using Wonky.Entity.DTO;
|
||||||
|
using Wonky.Entity.Views;
|
||||||
|
|
||||||
|
namespace Wonky.Client.Pages;
|
||||||
|
#pragma warning disable CS8618
|
||||||
|
|
||||||
|
public partial class BusinessOrderViewPage
|
||||||
|
{
|
||||||
|
// ##############################################################
|
||||||
|
[Inject] public HttpInterceptorService Interceptor { get; set; }
|
||||||
|
[Inject] public IB2BRepository B2BRepo { get; set; }
|
||||||
|
|
||||||
|
[Inject]
|
||||||
|
public ICountryCatalogRepository Catalog { get; set; }
|
||||||
|
[Inject] private IOptions<ApiConfig> Config { get; set; }
|
||||||
|
|
||||||
|
// ##############################################################
|
||||||
|
[CascadingParameter] private DraftStateProvider DraftProvider { get; set; } = new();
|
||||||
|
[Parameter] public string CountryCode { get; set; } = "";
|
||||||
|
[Parameter] public string CompanyId { get; set; } = "";
|
||||||
|
|
||||||
|
// ##############################################################
|
||||||
|
private B2BBusinessInfo _businessInfo = new();
|
||||||
|
private B2BAdvisorInfo _advisorInfo = new();
|
||||||
|
private List<ProductHistoryView> _productHistory = new();
|
||||||
|
private List<ProductInventoryItemView> _productInventory = new();
|
||||||
|
private ApiConfig _config = new();
|
||||||
|
private B2BProductPriceHistoryOverlay PriceHistoryOverlay { get; set; }
|
||||||
|
private ItemSelect _selectedItem = new();
|
||||||
|
private ActivityDto Activity { get; set; } = new();
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in a new issue