97 lines
No EOL
4.9 KiB
Text
97 lines
No EOL
4.9 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.Models
|
|
@using System.ComponentModel.Design
|
|
@using Wonky.Client.Enums
|
|
@using Wonky.Client.Components
|
|
<div class="row">
|
|
@if (Inventory.Any())
|
|
{
|
|
<div class="list-group mt-2">
|
|
<div class="list-group-item">
|
|
<div class="row">
|
|
<div class="col-sm-7 text-end">
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" type="checkbox" id="sortOrder" checked @onclick="@SetSortOrder"/>
|
|
<label class="form-check-label" for="sortOrder"><i class="@(Descending ? "bi-sort-up" : "bi-sort-down") "></i></label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" type="radio" name="sortCol" id="description" value="description"
|
|
onclick="@(() => SortProducts(Enums.SortColumn.Description))">
|
|
<label class="form-check-label" for="description">Navn</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" type="radio" name="sortCol" id="itemNumber" value="itemNumber"
|
|
onclick="@(() => SortProducts(Enums.SortColumn.Sku))">
|
|
<label class="form-check-label" for="itemNumber">Vare Nr.</label>
|
|
</div>
|
|
<div class="form-check form-check-inline">
|
|
<input class="form-check-input" type="radio" name="sortCol" id="lastInvoiceDate" value="itemDate"
|
|
onclick="@(() => SortProducts(Enums.SortColumn.LastInvoiceDate))" checked>
|
|
<label class="form-check-label" for="lastInvoiceDate">Sidst leveret</label>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-5">
|
|
<SearchPhraseComponent OnChanged="OnSearchChanged" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@foreach (var product in DisplayList)
|
|
{
|
|
<div class="list-group-item">
|
|
<div class="row align-items-center">
|
|
<div class="col-sm-2">
|
|
<div class="position-relative">
|
|
@product.LastInvoiceDate
|
|
@if (product.AgedProduct() && !product.Discontinued)
|
|
{
|
|
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">
|
|
Længe siden
|
|
<span class="visually-hidden">Længe siden</span>
|
|
</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
<div class="position-relative">
|
|
@product.Description
|
|
@if (product.Discontinued)
|
|
{
|
|
<span class="position-absolute top-0 start-100 translate-middle badge rounded-pill bg-danger">Udgået</span>
|
|
<span class="visually-hidden">Produktet er udgået</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-3">
|
|
@product.Sku
|
|
</div>
|
|
<div class="col-sm-2 text-center">
|
|
@product.Quantity
|
|
</div>
|
|
<div class="col">
|
|
<button class="btn btn-info d-block" type="button" @onclick="@(() => CallShowReorderModal(product.Sku))"><i class="bi-cart"></i> Genbestil</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
}
|
|
</div>
|
|
}
|
|
else
|
|
{
|
|
<div>Ingen data</div>
|
|
}
|
|
</div> |