|
|
@@ -126,14 +126,59 @@
|
|
|
</thead>
|
|
|
|
|
|
<tbody>
|
|
|
- <tr th:each="auction : ${history}">
|
|
|
- <td th:text="${auction.itemName}"></td>
|
|
|
- <td th:text="${auction.sellerUsername}"></td>
|
|
|
- <td th:text="${auction.winnerUsername}"></td>
|
|
|
- <td th:text="${auction.finalPrice}"></td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
-
|
|
|
+ <th:block th:each="auction, iterStat : ${history}">
|
|
|
+
|
|
|
+ <!-- fila principal -->
|
|
|
+ <tr data-bs-toggle="collapse"
|
|
|
+ th:attr="data-bs-target='#bids-' + ${iterStat.index}"
|
|
|
+ style="cursor: pointer;">
|
|
|
+
|
|
|
+ <td th:text="${auction.itemName}"></td>
|
|
|
+ <td th:text="${auction.sellerUsername}"></td>
|
|
|
+ <td th:text="${auction.winnerUsername}"></td>
|
|
|
+ <td th:text="${auction.finalPrice}"></td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ <!-- fila expandida -->
|
|
|
+ <tr>
|
|
|
+ <td colspan="4">
|
|
|
+
|
|
|
+ <div class="collapse" th:id="'bids-' + ${iterStat.index}">
|
|
|
+
|
|
|
+ <div th:if="${auction.bids != null and !#lists.isEmpty(auction.bids)}">
|
|
|
+
|
|
|
+ <table class="table table-sm mt-2">
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th>User</th>
|
|
|
+ <th>Amount</th>
|
|
|
+ <th>Time</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+
|
|
|
+ <tbody>
|
|
|
+ <tr th:each="bid : ${auction.bids}">
|
|
|
+ <td th:text="${bid.userId}"></td>
|
|
|
+ <td th:text="${bid.amount}"></td>
|
|
|
+ <td th:text="${bid.timestamp}"></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div th:if="${auction.bids == null or #lists.isEmpty(auction.bids)}">
|
|
|
+ <em>No hay pujas</em>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+
|
|
|
+ </th:block>
|
|
|
+ </tbody>
|
|
|
+
|
|
|
</table>
|
|
|
|
|
|
</div>
|
|
|
@@ -141,5 +186,6 @@
|
|
|
|
|
|
</div>
|
|
|
|
|
|
+<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
|
|
|
</body>
|
|
|
</html>
|