- Timestamp:
- 03/06/23 19:01:32 (21 months ago)
- Branches:
- main
- Children:
- c79897f
- Parents:
- bba352b
- Location:
- src/main
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/com/example/autopartz/controller/HomeController.java
rbba352b r60e9cc1 20 20 import java.io.IOException; 21 21 import java.util.ArrayList; 22 import java.util.Comparator; 22 23 import java.util.List; 23 24 import java.util.Objects; 25 import java.util.stream.Collectors; 24 26 25 27 @Controller … … 220 222 Deliveryman dm = (Deliveryman) userService.findByUsername(request.getRemoteUser()); 221 223 List<Delivery> deliveries = deliveryService.findAllByDeliverer(dm); 224 deliveries = deliveries.stream().sorted((p1,p2)->p2.getOrder().getDate().compareTo(p1.getOrder().getDate())).collect(Collectors.toList()); 222 225 model.addAttribute("bodyContent","myDeliveries"); 223 226 model.addAttribute("deliveries",deliveries); -
src/main/resources/templates/fragments/header.html
rbba352b r60e9cc1 48 48 <li class="nav-item m-auto"> 49 49 <a class="nav-link active" href="/myDeliveries">Мои достави</a> 50 </li> 51 </th:block> 52 <th:block sec:authorize="hasAuthority('ROLE_PENDING_DELIVERYMAN')"> 53 <li class="nav-item m-auto text-white"> 54 Чека одобрување од администратор 55 </li> 56 </th:block> 57 <th:block sec:authorize="hasAuthority('ROLE_PENDING_WAREHOUSEMAN')"> 58 <li class="nav-item m-auto text-white"> 59 Чека одобрување од администратор 50 60 </li> 51 61 </th:block>
Note:
See TracChangeset
for help on using the changeset viewer.