swt23w23/src/main/resources/templates/event.html

70 lines
2.3 KiB
HTML
Raw Normal View History

<!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='Event konfigurieren')}">
2023-11-13 20:09:39 +01:00
<body>
2023-11-15 17:27:04 +01:00
<div layout:fragment="content">
<span th:text="'Typ: ' + ${event.getOrderType()}"/>
2023-11-13 20:09:39 +01:00
<form th:action="@{/event/changeOrderType}" method="post">
<select class="form-select w-auto d-inline-block" name="type">
2023-11-13 20:09:39 +01:00
<option disabled="disabled" selected value="NULL" th:text="' -- Wählen Sie eine Option -- '"/>
<option th:value="'SE'" th:text="'Something else'"/>
<option th:value="'RaK'" th:text="Rent-a-Cook"/>
<option th:value="'EK'" th:text="Eventcatering"/>
<option th:value="'SN'" th:text="'Sushi Night'"/>
<option th:value="'MB'" th:text="'Mobile Breakfase'"/>
2023-11-13 20:09:39 +01:00
</select>
2023-11-15 17:27:04 +01:00
<button class="btn btn-primary" type="submit">Eventtypen ändern</button>
2023-11-13 20:09:39 +01:00
</form>
2023-11-15 17:27:04 +01:00
<table class="table">
2023-11-13 20:09:39 +01:00
<tr>
<th>Produkt</th>
<th>Anzahl</th>
<th>Preis</th>
2023-11-13 20:09:39 +01:00
</tr>
<tr th:each="item : ${items}">
<td th:text="${item.getProductName()}">Sake Nigiri</td>
<td th:text="${item.getQuantity()}">200</td>
<td th:text="${item.getPrice()} +'€'">10€</td>
2023-11-13 20:09:39 +01:00
</tr>
</table>
<span th:text="'Gesamt: ' + ${totalPrice}">Price</span>
2023-11-15 17:27:04 +01:00
<form method="post" th:action="@{/event/checkout}">
<button class="btn btn-primary" type="submit">Kostenpflichtig bestellen</button>
</form>
<!-- I NEED SPACE -->
<br>
<br>
<h4>Produkt hinzufügen</h4>
<table class="table">
<tr>
<th>Name</th>
<th>Preis/Stück</th>
<th>Verfügbar</th>
<th>Menge</th>
</tr>
<tr th:each="item : ${invItems}">
<td th:text="${item.getProduct().getName()}">Name</td>
<td th:text="${item.getProduct().getPrice()}">Preis</td>
<td th:text="${item.getQuantity()}">Verfügbar</td>
<td>
<form th:action="@{/event/addProduct}" method="post">
<input id="number" type="number" name="number" th:min="${item.getQuantity().negate()}" th:max="${item.getQuantity()}" value="1"/>
<input type="hidden" name="pid" th:value="${item.getProduct().getId()}"/>
<input class="btn btn-primary" type="submit" th:value="Hinzufügen"/>
</form>
</td>
</tr>
</table>
2023-11-15 17:27:04 +01:00
</div>
</html>