mirror of
https://github.com/st-tu-dresden-praktikum/swt23w23
synced 2024-07-19 21:04:36 +02:00
Add full order data to orders.html table
This commit is contained in:
parent
f5454ddab5
commit
b3b817b869
|
@ -1,10 +1,13 @@
|
|||
package catering.order;
|
||||
|
||||
import com.querydsl.core.Tuple;
|
||||
import org.aspectj.weaver.ast.Or;
|
||||
import org.salespointframework.quantity.Quantity;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
|
@ -60,6 +63,12 @@ public class CustomOrder {
|
|||
return products;
|
||||
}
|
||||
|
||||
public Collection<String> getFormattedProducts() {
|
||||
ArrayList<String> formattedProducts = new ArrayList<>();
|
||||
getProducts().forEach((k, v) -> formattedProducts.add(k + ": " + v));
|
||||
return formattedProducts;
|
||||
}
|
||||
|
||||
public boolean invoiceAvailable() {
|
||||
return invoiceAvailable;
|
||||
}
|
||||
|
|
|
@ -16,17 +16,17 @@
|
|||
</div>
|
||||
|
||||
<div>
|
||||
<h1>Auftragsliste</h1>
|
||||
<h1>Auftragsliste</h1>
|
||||
</div>
|
||||
|
||||
<div> <!--th:unless"${cart.empty}"-->
|
||||
<table style="width:100%; text-align:left">
|
||||
<tr>
|
||||
<th>Von</th>
|
||||
<th>Bis</th>
|
||||
<th>Kunde</th>
|
||||
<th>Produktdetails</th>
|
||||
<th>Rechnung</th>
|
||||
<th style="width:10%">Von</th>
|
||||
<th style="width:10%">Bis</th>
|
||||
<th style="width:15%">Kunde</th>
|
||||
<th style="width:30%">Produktdetails</th>
|
||||
<th style="width:10%">Rechnung</th>
|
||||
<th>Bezahlt</th>
|
||||
<th>Preis</th>
|
||||
<th></th>
|
||||
|
@ -36,7 +36,12 @@
|
|||
<td th:text="${order.getFormattedFinish()}">
|
||||
<td th:text="BeispielKunde"/>
|
||||
<td>
|
||||
<a href="#productDetails" th:text="${order.getOrderType()}"/>
|
||||
<div>
|
||||
<a href="#productDetails" th:text="${order.getOrderType()}"/>
|
||||
<ul th:each="product : ${order.getFormattedProducts()}">
|
||||
<li th:text="${product}"/>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div th:if="${order.invoiceAvailable()}">
|
||||
|
@ -69,8 +74,8 @@
|
|||
</body>
|
||||
|
||||
<footer style="bottom: 0; position: absolute;">
|
||||
<p>© Hannes Wurst @ Mampf GmbH</p>
|
||||
<p>
|
||||
<p>© Hannes Wurst @ Mampf GmbH</p>
|
||||
<p>
|
||||
<a href="mailto:catering@mampf.com">catering@mampf.com</a>
|
||||
</p>
|
||||
</footer>
|
||||
|
|
Loading…
Reference in a new issue