mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-04 19:09:40 +02:00
45 lines
1.5 KiB
HTML
45 lines
1.5 KiB
HTML
|
<!DOCTYPE html>
|
||
|
<html xmlns:th="http://www.thymeleaf.org"
|
||
|
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
|
||
|
<head>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>Lagerverwaltung</h1>
|
||
|
<table border>
|
||
|
<thead>
|
||
|
<!-- TODO: i18n? -->
|
||
|
<tr>
|
||
|
<th>ID</th> <!-- FIXME UUIDs are long -->
|
||
|
<th>Produktname</th>
|
||
|
<th>Menge</th>
|
||
|
<th>Einkaufspreis</th>
|
||
|
<th>UVP</th>
|
||
|
<th>Gesamtwert</th>
|
||
|
<th></th> <!-- FIXME: this should be replaced by something more reasonable once CSS comes into play -->
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<tr th:each="item : ${inventory}">
|
||
|
<td th:text="${item.id}"></td>
|
||
|
<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.promotionPrice != null}"><del th:text="${item.product.price}"></del> <span th:text="${item.product.promotionPrice}"></span></td>
|
||
|
<td th:if="${item.product.promotionPrice == null}" th:text="${item.product.price}"></td>
|
||
|
<td th:text="${item.product.wholesalePrice.multiply(item.quantity.getAmount())}"></td>
|
||
|
<td><a th:href="@{/inventory/edit/{id}(id=${item.product.id})}"><button>✏</button></a><a th:href="@{/inventory/delete/{id}(id=${item.product.id})}"><button>X</button></a></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><a href="/inventory/add"><button>⊕</button></a></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td>
|
||
|
<td></td><!-- TODO (optional): add total monetary value of inventory -->
|
||
|
<td></td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</body>
|
||
|
</html>
|