swt23w23/src/main/resources/templates/inventory-mutate.html

44 lines
2.4 KiB
HTML
Raw Normal View History

2023-11-05 16:11:36 +01:00
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security"
2023-11-13 20:09:39 +01:00
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{layout.html(title='Lagerverwaltung')}">
2023-11-05 16:11:36 +01:00
<body>
2023-11-15 17:27:04 +01:00
<div layout:fragment="content">
2023-11-13 20:09:39 +01:00
<h2 th:text="${'Produkt ' + (product == null ? 'anlegen' : 'bearbeiten')}"></h2>
<!-- TODO: maybe migrate to th:field (which is a pain) -->
<form method="post">
2023-11-15 17:27:04 +01:00
<div class="mb-3">
<label class="form-label" for="type">Typ</label>
<div class="form-check form-check-inline" th:each="type : ${T(catering.catalog.CatalogDummyType).values()}">
<input class="form-check-input" type="radio" name="type" th:value="${type}" th:text="${type}" th:checked="${type.name() == product?.type?.name()}" required/>
</div>
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
<div class="mb-3">
<label class="form-label" for="name">Produktname</label>
<input class="form-control" type="text" name="name" th:value="${product?.name}" required/>
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
<div class="mb-3">
<label class="form-label" for="quantity">Menge im Bestand</label>
<input class="form-control" type="number" name="quantity" th:value="${item?.quantity}" required/>
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
<div class="mb-3">
<label class="form-label" for="wholesalePrice">Einkaufspreis</label>
<input class="form-control" type="number" name="wholesalePrice" step="0.01" min="0" th:value="${#numbers.formatDecimal(product?.wholesalePrice?.getNumber()?.doubleValueExact(), 1, 2)}" required/>
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
<div class="mb-3">
<label class="form-label" for="retailPrice">UVP</label>
<input class="form-control" type="number" name="retailPrice" step="0.01" min="0" th:value="${#numbers.formatDecimal(product?.price?.getNumber()?.doubleValueExact(), 1, 2)}" required/>
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
<div class="mb-3">
2023-11-13 20:09:39 +01:00
<!-- FIXME darf nur bei angeboten als teil von partyservice angezeigt werden -->
2023-11-15 17:27:04 +01:00
<label class="form-label" for="promotionPrice">Aktionspreis</label>
<input class="form-control" type="number" name="promotionPrice" step="0.01" min="0" th:value="${#numbers.formatDecimal(product?.promotionPrice?.getNumber()?.doubleValueExact(), 1, 2)}"/>
2023-11-13 20:09:39 +01:00
</div>
2023-11-15 17:27:04 +01:00
<button class="btn btn-primary" type="submit" th:text="${product == null ? 'Hinzufügen' : 'Bearbeiten'}"></button>
2023-11-13 20:09:39 +01:00
<!-- KANN: Bild und Beschreibungstext -->
</form>
2023-11-15 17:27:04 +01:00
</div>
2023-11-05 16:11:36 +01:00
</body>
</html>