mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-06-23 21:43:42 +02:00
This finally makes the licensing under AGPL-3.0-or-later explicit after I got the okay from the kickstart source owners. This also checks the REUSE compliance in a pre commit hook, and therefore also in CI.
74 lines
2.7 KiB
HTML
74 lines
2.7 KiB
HTML
<!--/*-->
|
|
SPDX-License-Identifier: AGPL-3.0-or-later
|
|
SPDX-FileCopyrightText: 2023 swt23w23
|
|
<!--*/-->
|
|
<!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='Bestellungen')}">
|
|
<body>
|
|
<div layout:fragment="content">
|
|
<div> <!--th:unless"${cart.empty}"-->
|
|
<table class="table">
|
|
<tr>
|
|
<th>Von</th>
|
|
<th>Bis</th>
|
|
<th style="width: 14%">Kunde</th>
|
|
<th>Produktdetails</th>
|
|
<th>Rechnung</th>
|
|
<th>Status</th>
|
|
<th>Preis</th>
|
|
<th></th>
|
|
</tr>
|
|
<tr th:each="order : ${orders}">
|
|
<td th:text="${order.getFormattedStart()}">
|
|
<td th:text="${order.getFormattedFinish()}">
|
|
<td th:text="${order.getUserAccountIdentifier()}"/>
|
|
<td>
|
|
<div>
|
|
<strong class="text-danger" th:text="${order.getOrderType().toHumanReadable()}"/>
|
|
<ul th:each="orderLine : ${order.getOrderLines()}">
|
|
<li>
|
|
<b th:text="${orderLine.getProductName()}"/><br>
|
|
<th:block th:text="'Menge: ' + ${orderLine.getQuantity()}"/><br>
|
|
<th:block th:text="'Pauschale: ' + ${orderLine.getPrice().getNumber().doubleValue()} + '€'"/><br>
|
|
<th:block th:text="'Mietkosten: ' + ${order.getChargeLines(orderLine).getTotal().getNumber()} + '€'"/>
|
|
</li>
|
|
</ul>
|
|
<ul th:each="employee : ${order.getStaff()}">
|
|
<li>
|
|
<b th:text="${employee.getName()} + ', ' + ${employee.getJob()}"/><br>
|
|
<th:block th:text="'Preis: ' + ${order.getDurationInHours() * employee.getWage()}"/>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<a th:href="@{/myOrders/{id}/invoice(id=${order.id})}">Rechnung</a>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<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-->
|
|
<td th:text="${order.getTotal().getNumber().doubleValue()} + '€'"/>
|
|
<td sec:authorize="hasRole('ADMIN')" th:if="${order.getOrderStatus()} != ${cancelled}">
|
|
<form method="post" th:action="@{/allOrders/remove}">
|
|
<input type="hidden" name="orderID" value="0" th:value="${order.getId()}"/>
|
|
<input class="btn btn-danger" type="submit" value="remove" th:value="Stornieren"/>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<span>
|
|
<th:block th:text="Insgesamt "/>
|
|
<th:block th:text="${total}"/>
|
|
<th:block th:text=" Aufträge"/>
|
|
</span>
|
|
</div>
|
|
</body>
|
|
</html>
|