Changeset 60e9cc1


Ignore:
Timestamp:
03/06/23 19:01:32 (21 months ago)
Author:
andrejtodorovski <82031894+andrejtodorovski@…>
Branches:
main
Children:
c79897f
Parents:
bba352b
Message:

Sredeni zabeleshki po diskusija

Location:
src/main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/autopartz/controller/HomeController.java

    rbba352b r60e9cc1  
    2020import java.io.IOException;
    2121import java.util.ArrayList;
     22import java.util.Comparator;
    2223import java.util.List;
    2324import java.util.Objects;
     25import java.util.stream.Collectors;
    2426
    2527@Controller
     
    220222        Deliveryman dm = (Deliveryman) userService.findByUsername(request.getRemoteUser());
    221223        List<Delivery> deliveries = deliveryService.findAllByDeliverer(dm);
     224        deliveries = deliveries.stream().sorted((p1,p2)->p2.getOrder().getDate().compareTo(p1.getOrder().getDate())).collect(Collectors.toList());
    222225        model.addAttribute("bodyContent","myDeliveries");
    223226        model.addAttribute("deliveries",deliveries);
  • src/main/resources/templates/fragments/header.html

    rbba352b r60e9cc1  
    4848            <li class="nav-item m-auto">
    4949              <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              Чека одобрување од администратор
    5060            </li>
    5161          </th:block>
Note: See TracChangeset for help on using the changeset viewer.