Wonky.Client/Wonky.Client/Shared/ProductHistoryModal.razor
2022-08-05 13:03:19 +02:00

68 lines
No EOL
2.8 KiB
Text

@*
// Copyright (C) 2022 FCS Frede's Computer Services.
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// 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-lg modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">@ProductName</h5>
<button type="button" class="btn-close" @onclick="Hide" data-bs-dismiss="modal" aria-label="Luk"></button>
</div>
<div class="modal-body">
@if (!string.IsNullOrWhiteSpace(ProductName))
{
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Dato</th>
<th scope="col">Antal</th>
<th scope="col">Rabat</th>
<th scope="col">Pris</th>
@* <th scope="col"></th> *@
</tr>
</thead>
<tbody>
@foreach (var entry in History)
{
<tr>
<td>@entry.DeliveryDate</td>
<td>@entry.Quantity</td>
<td>@entry.Discount</td>
<td>@entry.Price</td>
@*
<td>
<button type="button" class="btn btn-primary" data-bs-dismiss="modal" @onclick="() => SelectPrice(entry.Price)">Overfør</button>
</td>
*@
</tr>
}
</tbody>
</table>
}
else
{
<h3>Ingen data</h3>
}
</div>
</div>
</div>
</div>
@if (_showBackdrop)
{
<div class="modal-backdrop fade show"></div>
}