2023-11-05 09:38:25 +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='Bestellungen')}">
|
2023-11-05 09:38:25 +01:00
|
|
|
<body>
|
2023-11-15 17:27:04 +01:00
|
|
|
<div layout:fragment="content">
|
2023-11-13 20:09:39 +01:00
|
|
|
<div> <!--th:unless"${cart.empty}"-->
|
2023-11-15 17:27:04 +01:00
|
|
|
<table class="table">
|
2023-11-13 20:09:39 +01:00
|
|
|
<tr>
|
2023-11-15 17:27:04 +01:00
|
|
|
<th>Von</th>
|
|
|
|
<th>Bis</th>
|
2023-11-26 16:59:50 +01:00
|
|
|
<th style="width: 14%">Kunde</th>
|
2023-11-15 17:27:04 +01:00
|
|
|
<th>Produktdetails</th>
|
|
|
|
<th>Rechnung</th>
|
2023-11-19 13:00:21 +01:00
|
|
|
<th>Status</th>
|
2023-11-13 20:09:39 +01:00
|
|
|
<th>Preis</th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
<tr th:each="order : ${orders}">
|
|
|
|
<td th:text="${order.getFormattedStart()}">
|
|
|
|
<td th:text="${order.getFormattedFinish()}">
|
2023-11-20 22:08:08 +01:00
|
|
|
<td th:text="${order.getUserAccountIdentifier()}"/>
|
2023-11-13 20:09:39 +01:00
|
|
|
<td>
|
|
|
|
<div>
|
2023-12-07 16:58:29 +01:00
|
|
|
<strong class="text-danger" th:text="${order.getOrderType().toHumanReadable()}"/>
|
2023-11-20 22:08:08 +01:00
|
|
|
<ul th:each="orderLine : ${order.getOrderLines()}">
|
|
|
|
<li>
|
|
|
|
<b th:text="${orderLine.getProductName()}"/><br>
|
|
|
|
<th:block th:text="'Menge: ' + ${orderLine.getQuantity()}"/><br>
|
2023-12-07 16:58:29 +01:00
|
|
|
<th:block th:text="'Pauschale: ' + ${orderLine.getPrice().getNumber().doubleValue()} + '€'"/><br>
|
|
|
|
<th:block th:text="'Mietkosten: ' + ${order.getChargeLines(orderLine).getTotal().getNumber()} + '€'"/>
|
2023-11-20 22:08:08 +01:00
|
|
|
</li>
|
2023-11-13 20:09:39 +01:00
|
|
|
</ul>
|
2023-11-26 16:59:50 +01:00
|
|
|
<ul th:each="employee : ${order.getStaff()}">
|
|
|
|
<li>
|
|
|
|
<b th:text="${employee.getName()} + ', ' + ${employee.getJob()}"/><br>
|
2023-12-07 16:58:29 +01:00
|
|
|
<th:block th:text="'Preis: ' + ${order.getDurationInHours() * employee.getWage()}"/>
|
2023-11-26 16:59:50 +01:00
|
|
|
</li>
|
|
|
|
</ul>
|
2023-11-13 20:09:39 +01:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
2023-11-28 20:40:43 +01:00
|
|
|
<div>
|
|
|
|
<a th:href="@{/myOrders/{id}/invoice(id=${order.id})}">Rechnung</a>
|
2023-11-13 20:09:39 +01:00
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
2023-11-20 22:08:08 +01:00
|
|
|
<p style="color: red" th:if="${order.getOrderStatus()} == ${cancelled}" th:text="STORNIERT"/>
|
|
|
|
<p style="color: green" th:if="${order.getOrderStatus()} == ${completed}" th:text="ABGESCHLOSSEN"/>
|
|
|
|
</td> <!--von Admin bearbeitbar-->
|
2023-12-07 16:58:29 +01:00
|
|
|
<td th:text="${order.getTotal().getNumber().doubleValue()} + '€'"/>
|
2023-11-20 22:08:08 +01:00
|
|
|
<td sec:authorize="hasRole('ADMIN')" th:if="${order.getOrderStatus()} != ${cancelled}">
|
2023-11-19 13:00:21 +01:00
|
|
|
<form method="post" th:action="@{/allOrders/remove}">
|
2023-12-07 16:58:29 +01:00
|
|
|
<input type="hidden" name="orderID" value="0" th:value="${order.getId()}"/>
|
2023-11-20 22:08:08 +01:00
|
|
|
<input class="btn btn-danger" type="submit" value="remove" th:value="Stornieren"/>
|
2023-11-13 20:09:39 +01:00
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<span>
|
|
|
|
<th:block th:text="Insgesamt "/>
|
|
|
|
<th:block th:text="${total}"/>
|
|
|
|
<th:block th:text=" Aufträge"/>
|
|
|
|
</span>
|
2023-11-15 17:27:04 +01:00
|
|
|
</div>
|
2023-11-05 09:38:25 +01:00
|
|
|
</body>
|
|
|
|
</html>
|