- Timestamp:
- 02/18/24 22:01:54 (9 months ago)
- Branches:
- master
- Children:
- 4251327
- Parents:
- bde8b13
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/mk/ukim/finki/busngo/web/VozenjeController.java
rbde8b13 re272096 4 4 import mk.ukim.finki.busngo.model.entities.Patnik; 5 5 import mk.ukim.finki.busngo.model.entities.Vozenje; 6 import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS; 6 7 import mk.ukim.finki.busngo.model.exceptions.InvalidPatnikIdException; 7 8 import mk.ukim.finki.busngo.model.exceptions.InvalidPostojkaNaLinijaIdException; … … 29 30 @GetMapping() 30 31 public String getVozenjePage(Model model, 31 Authentication authentication){ 32 Authentication authentication, 33 @RequestParam(required = false) VOZENJE_STATUS status){ 32 34 model.addAttribute("bodyContent", "listVozenja"); 33 35 Patnik patnik = null; 34 36 try{ 35 model.addAttribute("vozenja", vozenjeService.findVozenjaByPatnik(authentication.getName())); 37 if(status != null) 38 model.addAttribute("vozenja", vozenjeService.findVozenjaByPatnikAndStatus(authentication.getName(), status)); 39 else 40 model.addAttribute("vozenja", vozenjeService.findVozenjaByPatnikAndStatus(authentication.getName(), VOZENJE_STATUS.ACTIVE)); 41 model.addAttribute("vozStatus", VOZENJE_STATUS.values()); 36 42 } 37 43 catch (InvalidPatnikIdException e){
Note:
See TracChangeset
for help on using the changeset viewer.