renamed files
This commit is contained in:
parent
71aeb5f0ad
commit
72d44d1dd4
2 changed files with 25 additions and 20 deletions
|
@ -13,10 +13,8 @@
|
|||
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||
*@
|
||||
|
||||
@using Wonky.Client.Components
|
||||
@using Wonky.Client.Helpers
|
||||
<div class="modal" tabindex="-1" role="dialog" style="display:@_modalDisplay">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-fullscreen">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">@ProductName</h5>
|
||||
|
@ -32,18 +30,21 @@
|
|||
<th scope="col">Antal</th>
|
||||
<th scope="col">Rabat</th>
|
||||
<th scope="col">Pris</th>
|
||||
@* <th scope="col"></th> *@
|
||||
<th scope="col"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var entry in History)
|
||||
@if (ProductHistory.Any())
|
||||
{
|
||||
<tr>
|
||||
<td>@entry.DeliveryDate</td>
|
||||
<td>@entry.Quantity</td>
|
||||
<td>@entry.Discount</td>
|
||||
<td>@entry.Price</td>
|
||||
</tr>
|
||||
@foreach (var entry in ProductHistory)
|
||||
{
|
||||
<tr>
|
||||
<td>@entry.DeliveryDate</td>
|
||||
<td>@entry.Quantity</td>
|
||||
<td>@entry.Discount</td>
|
||||
<td>@entry.Price</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
|
@ -13,35 +13,39 @@
|
|||
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||
//
|
||||
|
||||
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using Wonky.Client.HttpRepository;
|
||||
using Wonky.Entity.Views;
|
||||
|
||||
namespace Wonky.Client.OverlayB2B;
|
||||
#pragma warning disable CS8618
|
||||
|
||||
public partial class B2BProductHistoryOverlay
|
||||
namespace Wonky.Client.OverlayB2B;
|
||||
|
||||
public partial class B2BProductPriceHistoryOverlay
|
||||
{
|
||||
// ##############################################################
|
||||
[Inject] public IB2BRepository HistoryRepo { get; set; }
|
||||
|
||||
// ##############################################################
|
||||
[Parameter] public string CompanyId { get; set; } = "";
|
||||
[Parameter] public string ItemSku { get; set; } = "";
|
||||
[Parameter] public string Sku { get; set; } = "";
|
||||
|
||||
// ##############################################################
|
||||
private List<ProductHistoryView>? History { get; set; }
|
||||
private List<ProductHistoryView>? ProductHistory { get; set; }
|
||||
private string ProductName { get; set; } = "";
|
||||
private string _modalDisplay = "";
|
||||
private bool _showBackdrop;
|
||||
|
||||
|
||||
protected override async Task OnParametersSetAsync()
|
||||
{
|
||||
History = await HistoryRepo.GetCustomerProductHistory(CompanyId, ItemSku);
|
||||
if (History.Any())
|
||||
if (string.IsNullOrWhiteSpace(Sku))
|
||||
return;
|
||||
|
||||
ProductHistory = await HistoryRepo.GetCustomerProductHistory(CompanyId, Sku);
|
||||
if (ProductHistory.Any())
|
||||
{
|
||||
ProductName = History[0].Description;
|
||||
ProductName = ProductHistory[0].Description;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue