Update cell in calender links to orders filteredByDay

This commit is contained in:
Theo Reichert 2023-11-15 00:34:16 +01:00 committed by Simon Bruder
parent 9b71926c58
commit bb5e89a83d
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 9 additions and 8 deletions

View file

@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.LocalDate; import java.time.LocalDate;
import java.time.temporal.ChronoUnit; import java.time.temporal.ChronoUnit;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import java.util.Comparator; import java.util.Comparator;
@ -124,6 +125,7 @@ public class OrderController {
for (LocalDate date : datesOfTheWeek) { for (LocalDate date : datesOfTheWeek) {
ArrayList<String> x = new ArrayList<String>(2); ArrayList<String> x = new ArrayList<String>(2);
x.add(Integer.toString(date.getDayOfMonth())); x.add(Integer.toString(date.getDayOfMonth()));
x.add(date.format(DateTimeFormatter.ISO_LOCAL_DATE));
week_to_add_to_month.add(x); week_to_add_to_month.add(x);
} }
//datesOfTheWeek.clear(); //datesOfTheWeek.clear();

View file

@ -64,18 +64,17 @@
<div class="content"> <div class="content">
<div <div
class="header" class="header"
th:text="${day.get(0)}"
> >
<a
href="orders.html" th:href="@{'/orders/' + ${day.get(1)}}"
th:text="${day.get(0)}"
class="description"
>
</a>
</div> </div>
</div> </div>
<div class="content"> <div class="content">
<a <p th:each="item, stat : ${day}" th:if="${stat.index} > 1" th:text="${item}"></p>
class="description"
>
<span th:text="${#lists.size(day)-1}"></span><br>
<span th:each="item, stat : ${day}" th:if="${stat.index} >= 1" th:text="${item}"></span>
<!-- <span th:text="${99+2}"></span>-->
</a>
</div> </div>
</td> </td>
</tr> </tr>