mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-03 23:23:41 +02:00
Simon Bruder
bac025fd0a
This finally makes the licensing under AGPL-3.0-or-later explicit after I got the okay from the kickstart source owners. This also checks the REUSE compliance in a pre commit hook, and therefore also in CI.
51 lines
2.3 KiB
HTML
51 lines
2.3 KiB
HTML
<!--/*-->
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
SPDX-FileCopyrightText: 2023 swt23w23
|
|
<!--*/-->
|
|
<!DOCTYPE html>
|
|
<html xmlns:th="http://www.thymeleaf.org"
|
|
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
|
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
|
layout:decorate="~{layout.html(title='Inventar')}">
|
|
<body>
|
|
<div layout:fragment="content">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Produktname</th>
|
|
<th>Menge</th>
|
|
<th>Einkaufspreis</th>
|
|
<th>UVP</th>
|
|
<th>Buchungstypen</th>
|
|
<th>Gesamtwert</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr th:each="item : ${inventory}">
|
|
<td th:text="${item.product.name}"></td>
|
|
<td th:text="${item.quantity}"></td>
|
|
<td th:text="${item.product.wholesalePrice}"></td>
|
|
<td th:if="${item.product.getClass().getSimpleName() == 'Consumable' && item.product.promotionPrice.isPresent()}"><del th:text="${item.product.retailPrice}"></del> <span th:text="${item.product.promotionPrice.get()}"></span></td>
|
|
<td th:if="${item.product.getClass().getSimpleName() != 'Consumable' || item.product.promotionPrice.isEmpty()}" th:text="${item.product.price}"></td>
|
|
<td style="width: 20%;">
|
|
<div class="d-inline-flex flex-wrap gap-1 flex-column flex-xxl-row">
|
|
<span class="badge bg-secondary" th:each="orderType : ${T(catering.inventory.InventoryMutateForm).orderTypesFromCategories(item.product.categories)}" th:text="${orderType.toHumanReadable()}"/>
|
|
</div>
|
|
</td>
|
|
<td th:text="${item.product.wholesalePrice.multiply(item.quantity.getAmount())}"></td>
|
|
<td>
|
|
<div class="d-inline-flex flex-wrap gap-1 flex-column flex-xxl-row">
|
|
<a th:href="@{/inventory/edit/{id}(id=${item.product.id},type=${item.product.getClass().getSimpleName()})}"><button class="btn btn-warning">Bearbeiten</button></a>
|
|
<a th:href="@{/inventory/delete/{id}(id=${item.product.id})}"><button class="btn btn-danger">Entfernen</button></a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<a href="/inventory/add?type=Consumable"><button class="btn btn-primary">Verbrauchsmaterial hinzufügen</button></a>
|
|
<a href="/inventory/add?type=Rentable"><button class="btn btn-primary">Leihmaterial hinzufügen</button></a>
|
|
</div>
|
|
</body>
|
|
</html>
|