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;
|
package catering.order;
|
||||||
|
|
||||||
|
import com.querydsl.core.Tuple;
|
||||||
import org.aspectj.weaver.ast.Or;
|
import org.aspectj.weaver.ast.Or;
|
||||||
import org.salespointframework.quantity.Quantity;
|
import org.salespointframework.quantity.Quantity;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -60,6 +63,12 @@ public class CustomOrder {
|
||||||
return products;
|
return products;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Collection<String> getFormattedProducts() {
|
||||||
|
ArrayList<String> formattedProducts = new ArrayList<>();
|
||||||
|
getProducts().forEach((k, v) -> formattedProducts.add(k + ": " + v));
|
||||||
|
return formattedProducts;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean invoiceAvailable() {
|
public boolean invoiceAvailable() {
|
||||||
return invoiceAvailable;
|
return invoiceAvailable;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,17 +16,17 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<h1>Auftragsliste</h1>
|
<h1>Auftragsliste</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div> <!--th:unless"${cart.empty}"-->
|
<div> <!--th:unless"${cart.empty}"-->
|
||||||
<table style="width:100%; text-align:left">
|
<table style="width:100%; text-align:left">
|
||||||
<tr>
|
<tr>
|
||||||
<th>Von</th>
|
<th style="width:10%">Von</th>
|
||||||
<th>Bis</th>
|
<th style="width:10%">Bis</th>
|
||||||
<th>Kunde</th>
|
<th style="width:15%">Kunde</th>
|
||||||
<th>Produktdetails</th>
|
<th style="width:30%">Produktdetails</th>
|
||||||
<th>Rechnung</th>
|
<th style="width:10%">Rechnung</th>
|
||||||
<th>Bezahlt</th>
|
<th>Bezahlt</th>
|
||||||
<th>Preis</th>
|
<th>Preis</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
@ -36,7 +36,12 @@
|
||||||
<td th:text="${order.getFormattedFinish()}">
|
<td th:text="${order.getFormattedFinish()}">
|
||||||
<td th:text="BeispielKunde"/>
|
<td th:text="BeispielKunde"/>
|
||||||
<td>
|
<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>
|
||||||
<td>
|
<td>
|
||||||
<div th:if="${order.invoiceAvailable()}">
|
<div th:if="${order.invoiceAvailable()}">
|
||||||
|
@ -69,8 +74,8 @@
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<footer style="bottom: 0; position: absolute;">
|
<footer style="bottom: 0; position: absolute;">
|
||||||
<p>© Hannes Wurst @ Mampf GmbH</p>
|
<p>© Hannes Wurst @ Mampf GmbH</p>
|
||||||
<p>
|
<p>
|
||||||
<a href="mailto:catering@mampf.com">catering@mampf.com</a>
|
<a href="mailto:catering@mampf.com">catering@mampf.com</a>
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
Loading…
Reference in a new issue