mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-01 08:43:43 +02:00
Staff is plural. The singular should be employee or a synonym. Co-authored-by: Mathis Kral <mathis_tiberius.kral@mailbox.tu-dresden.de>
134 lines
4.9 KiB
HTML
134 lines
4.9 KiB
HTML
<!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='Event konfigurieren')}">
|
|
|
|
<body>
|
|
<div layout:fragment="content">
|
|
<form th:action="@{/event/changeOrderType}" method="post">
|
|
<select class="form-select w-auto d-inline-block" name="type">
|
|
<option disabled="disabled" selected value="NULL" th:text="${event.getOrderType()}"/>
|
|
<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'"/>
|
|
</select>
|
|
<button class="btn btn-primary" type="submit">Eventtypen ändern</button>
|
|
</form>
|
|
|
|
<!-- I NEED SPACE -->
|
|
<br>
|
|
|
|
<form th:action="@{/event/changeDate}" method="post">
|
|
<label th:text="'Wählen sie ihren gewünschten Zeitraum aus (min. 7 Tage im voraus):'"/><br>
|
|
<input type="date" th:value="${event.getStart().toLocalDate()}" th:min="${event.getStart().toLocalDate()}" name="startDate"/>
|
|
<select class="i do not know" name="startHour">
|
|
<option disabled="disabled" selected value="NULL" th:text="${event.getStart().getHour()} + ' Uhr'"/>
|
|
<option th:each="i : ${#numbers.sequence(0, 23)}" th:value="${i}" th:text="${i} + ' Uhr'"></option>
|
|
</select>
|
|
<input type="date" th:value="${event.getFinish().toLocalDate()}" th:min="${event.getFinish().toLocalDate()}" name="finishDate"/>
|
|
<select class="i do not know" name="finishHour">
|
|
<option disabled="disabled" selected value="NULL" th:text="${event.getFinish().getHour() + ' Uhr'}"/>
|
|
<option th:each="i : ${#numbers.sequence(0, 23)}" th:value="${i}" th:text="${i} + ' Uhr'"></option>
|
|
</select>
|
|
<button class="btn btn-primary" type="submit">Wunschdatum überprüfen</button>
|
|
</form>
|
|
|
|
<!-- I NEED SPACE -->
|
|
<br>
|
|
|
|
<table class="table">
|
|
<tr>
|
|
<th>Produkt</th>
|
|
<th>Anzahl</th>
|
|
<th>Preis</th>
|
|
<th></th>
|
|
</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().getNumber().doubleValue()} +'€'">10€</td>
|
|
<td>
|
|
<form method="post" th:action="@{/event/removeProduct}">
|
|
<input type="hidden" th:value="${item.getId()}" name="itemId"/>
|
|
<button class="btn btn-danger" type="submit" >Produkt entfernen</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
<th>Angestellter</th>
|
|
<th>Typ</th>
|
|
<th>Preis</th>
|
|
<th></th>
|
|
<tr th:each="employee : ${event.getStaff()}">
|
|
<td th:text="${employee.getName()}">Name</td>
|
|
<td th:text="${employee.getJob()}">Job</td>
|
|
<td th:text="${event.getDurationInHoursTimesRate(12.0)} + '€'">Preis</td> <!--TODO: get from employee-->
|
|
<td>
|
|
<form method="post" th:action="@{/event/removeEmployee}">
|
|
<input type="hidden" th:value="${employee.getId()}" name="sid"/>
|
|
<button class="btn btn-danger" type="submit">Angestellten entfernen</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<span th:text="'Gesamt: ' + ${totalPrice}">Price</span>
|
|
|
|
<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" min="1" 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>
|
|
|
|
<h4>Angestellte hinzufügen</h4>
|
|
<table class="table">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Typ</th>
|
|
<th>Stundensatz</th>
|
|
<th>Verfügbar</th>
|
|
<td></td>
|
|
</tr>
|
|
<tr th:each="employee : ${allStaff}">
|
|
<td th:text="${employee.getName()}">Name</td>
|
|
<td th:text="${employee.getJob()}">Job</td>
|
|
<td th:text="'12€/h'">12€</td> <!--TODO: get from employee-->
|
|
<td style="color: green" th:text="Verfügbar">Verfügbar</td> <!--TODO: get from employee-->
|
|
<td>
|
|
<form th:action="@{/event/addEmployee}" method="post">
|
|
<input type="hidden" name="sid" th:value="${employee.getId()}"/>
|
|
<input class="btn btn-primary" type="submit" th:value="Hinzufügen"/>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</html>
|