Index: src/main/java/mk/ukim/finki/busngo/model/enums/VrabotenType.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/model/enums/VrabotenType.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
+++ src/main/java/mk/ukim/finki/busngo/model/enums/VrabotenType.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.enums;
+
+public enum VrabotenType {
+    KONDUKTER,
+    VOZAC,
+    ADMIN
+}
Index: src/main/java/mk/ukim/finki/busngo/model/exceptions/UnauthorizedAccess.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/model/exceptions/UnauthorizedAccess.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
+++ src/main/java/mk/ukim/finki/busngo/model/exceptions/UnauthorizedAccess.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -0,0 +1,7 @@
+package mk.ukim.finki.busngo.model.exceptions;
+
+public class UnauthorizedAccess extends RuntimeException {
+    public UnauthorizedAccess(String message) {
+        super(message);
+    }
+}
Index: src/main/java/mk/ukim/finki/busngo/repository/BiletRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/repository/BiletRepository.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/repository/BiletRepository.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -15,3 +15,4 @@
 //    List<Bilet> findAllByKorisnikByPatnikKId(Korisnik korisnik);
     Optional<Bilet> findByBIdAndAndKorisnikByPatnikKId(Long bid, Patnik patnik);
+//    List<Bilet> findAllByKorisnikByPatnikKIdAndBStatus(Patnik patnik, BILET_STATUS status);
 }
Index: src/main/java/mk/ukim/finki/busngo/repository/VozenjeRepository.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/repository/VozenjeRepository.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/repository/VozenjeRepository.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -3,4 +3,5 @@
 import mk.ukim.finki.busngo.model.entities.Patnik;
 import mk.ukim.finki.busngo.model.entities.Vozenje;
+import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
 import org.springframework.data.jpa.repository.JpaRepository;
 
@@ -9,3 +10,4 @@
 public interface VozenjeRepository extends JpaRepository<Vozenje, Long> {
     List<Vozenje> findAllByKorisnikByPatnikKId(Patnik patnik);
+    List<Vozenje> findAllByKorisnikByPatnikKIdAndAndVozenjeStatus(Patnik patnik, VOZENJE_STATUS vozenjeStatus);
 }
Index: src/main/java/mk/ukim/finki/busngo/service/AuthService.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/AuthService.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/AuthService.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -2,8 +2,10 @@
 
 import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.enums.VrabotenType;
 
 public interface AuthService {
     Korisnik login(String email, String password);
     Korisnik registerPatnik(String ime, String email, String password, String confirmPassword, String address, String telefon);
+    Korisnik registerVraboten(String ime, String email, String password, String confirmPassword, String address, String telefon, VrabotenType type, Double salary);
 
 }
Index: src/main/java/mk/ukim/finki/busngo/service/BiletService.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/BiletService.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/BiletService.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -16,4 +16,5 @@
 
     List<Bilet> findAllByPatnikEmail(String email);
+//    List<Bilet> findAllByPatnikEmailACTIVE(String email);
     Bilet findBybIdAndPatnikEmail(Long bId, String email);
 
Index: src/main/java/mk/ukim/finki/busngo/service/InstancaNaLinijaService.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/InstancaNaLinijaService.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/InstancaNaLinijaService.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -11,5 +11,5 @@
     Instancanalinija findById(Long inlId);
     Instancanalinija start(Long liId, String a_registracija, String email);
-    Instancanalinija end(Long inlId);
+    Instancanalinija end(Long inlId, String email);
     List<Instancanalinija> findAllActive();
 
Index: src/main/java/mk/ukim/finki/busngo/service/KaznaService.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/KaznaService.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/KaznaService.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -8,3 +8,5 @@
     List<Kazna> findAll();
     List<Kazna> findAllByKontrolaId(Long kontrolaId);
+    Kazna pay(Long kaznaId);
+    Kazna findById(Long id);
 }
Index: src/main/java/mk/ukim/finki/busngo/service/KaznaZaRegistriranService.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/KaznaZaRegistriranService.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/KaznaZaRegistriranService.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -1,4 +1,5 @@
 package mk.ukim.finki.busngo.service;
 
+import mk.ukim.finki.busngo.model.entities.Kazna;
 import mk.ukim.finki.busngo.model.entities.Kaznazaregistriran;
 import mk.ukim.finki.busngo.model.exceptions.UserShouldNotBeTicketedException;
@@ -10,3 +11,5 @@
 
     Kaznazaregistriran create(Long kontrolaId, String dokument, Double iznos, Long patnik, String email) throws UserShouldNotBeTicketedException;
+    Kaznazaregistriran pay(Long kaznaId);
+    Kaznazaregistriran findById(Long id);
 }
Index: src/main/java/mk/ukim/finki/busngo/service/VozenjeService.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/VozenjeService.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/VozenjeService.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -2,4 +2,5 @@
 
 import mk.ukim.finki.busngo.model.entities.Vozenje;
+import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
 
 import java.util.List;
@@ -7,4 +8,5 @@
 public interface VozenjeService {
     List<Vozenje> findVozenjaByPatnik(String email);
+    List<Vozenje> findVozenjaByPatnikAndStatus(String email, VOZENJE_STATUS status);
     Vozenje start(String email, Long bId, Long pnlId, Long inlId);
     Vozenje end(Long vozenjeId, Long pnlId);
Index: src/main/java/mk/ukim/finki/busngo/service/impl/AuthServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/impl/AuthServiceImpl.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/impl/AuthServiceImpl.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -1,13 +1,21 @@
 package mk.ukim.finki.busngo.service.impl;
 
+import mk.ukim.finki.busngo.model.entities.Kondukter;
 import mk.ukim.finki.busngo.model.entities.Korisnik;
 import mk.ukim.finki.busngo.model.entities.Patnik;
+import mk.ukim.finki.busngo.model.entities.Vozac;
+import mk.ukim.finki.busngo.model.enums.VrabotenType;
 import mk.ukim.finki.busngo.model.exceptions.InvalidCredentialsException;
 import mk.ukim.finki.busngo.model.exceptions.UserAlreadyExistsException;
+import mk.ukim.finki.busngo.repository.KondukterRepository;
 import mk.ukim.finki.busngo.repository.KorisnikRepository;
 import mk.ukim.finki.busngo.repository.PatnikRepository;
-import mk.ukim.finki.busngo.service.AuthService;
+import mk.ukim.finki.busngo.repository.VozacRepository;
+import mk.ukim.finki.busngo.service.*;
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
+
+import java.sql.Date;
+import java.time.LocalDate;
 
 @Service
@@ -15,10 +23,20 @@
     private final KorisnikRepository korisnikRepository;
     private final PatnikRepository patnikRepository;
+    private final VozacRepository vozacRepository;
+    private final KondukterRepository kondukterRepository;
     private final PasswordEncoder passwordEncoder;
+    private final PatnikService patnikService;
+    private final KondukterService kondukterService;
+    private final VozacService vozacService;
 
-    public AuthServiceImpl(KorisnikRepository korisnikRepository, PatnikRepository patnikRepository, PasswordEncoder passwordEncoder) {
+    public AuthServiceImpl(KorisnikRepository korisnikRepository, PatnikRepository patnikRepository, VozacRepository vozacRepository, KondukterRepository kondukterRepository, PasswordEncoder passwordEncoder, PatnikService patnikService, KondukterService kondukterService, VozacService vozacService) {
         this.korisnikRepository = korisnikRepository;
         this.patnikRepository = patnikRepository;
+        this.vozacRepository = vozacRepository;
+        this.kondukterRepository = kondukterRepository;
         this.passwordEncoder = passwordEncoder;
+        this.patnikService = patnikService;
+        this.kondukterService = kondukterService;
+        this.vozacService = vozacService;
     }
 
@@ -52,6 +70,60 @@
         korisnik.setKIsAdmin(false);
 
+        return patnikRepository.save(korisnik);
+    }
 
-        return patnikRepository.save(korisnik);
+    @Override
+    public Korisnik registerVraboten(String ime, String email, String password, String confirmPassword, String address, String telefon, VrabotenType type, Double salary) {
+        if (email == null || password == null || email.isEmpty() || password.isEmpty()) {
+            throw new InvalidCredentialsException();
+        }
+
+        if (!password.equals(confirmPassword)) {
+            throw new InvalidCredentialsException();
+        }
+
+        if(this.korisnikRepository.findByKEmail(email).isPresent()) {
+            throw new UserAlreadyExistsException(email);
+        }
+
+
+        switch (type){
+            case ADMIN:
+                Korisnik korisnik = new Korisnik();
+                korisnik.setKIme(ime);
+                korisnik.setKAdresa(address);
+                korisnik.setKLozinka(passwordEncoder.encode(password));
+                korisnik.setKEmail(email);
+                korisnik.setKTelefon(telefon);
+                korisnik.setKIsAdmin(true);
+                return korisnikRepository.save(korisnik);
+            case VOZAC:
+                Vozac vozac = new Vozac();
+                vozac.setKIme(ime);
+                vozac.setKAdresa(address);
+                vozac.setKLozinka(passwordEncoder.encode(password));
+                vozac.setKEmail(email);
+                vozac.setKTelefon(telefon);
+                vozac.setKIsAdmin(false);
+                vozac.setVPlata(salary);
+                vozac.setVDatumNaVrabotuvanje(Date.valueOf(LocalDate.now()));
+                this.korisnikRepository.save(vozac);
+
+                return vozacRepository.save(vozac);
+            case KONDUKTER:
+                Kondukter kondukter = new Kondukter();
+                kondukter.setKIme(ime);
+                kondukter.setKAdresa(address);
+                kondukter.setKLozinka(passwordEncoder.encode(password));
+                kondukter.setKEmail(email);
+                kondukter.setKTelefon(telefon);
+                kondukter.setKIsAdmin(false);
+                kondukter.setVPlata(salary);
+                kondukter.setVDatumNaVrabotuvanje(Date.valueOf(LocalDate.now()));
+                this.korisnikRepository.save(kondukter);
+
+                return kondukterRepository.save(kondukter);
+        }
+        return null;
     }
 
Index: src/main/java/mk/ukim/finki/busngo/service/impl/BiletServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/impl/BiletServiceImpl.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/impl/BiletServiceImpl.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -16,4 +16,5 @@
 import org.springframework.security.crypto.password.PasswordEncoder;
 import org.springframework.stereotype.Service;
+import org.thymeleaf.expression.Lists;
 
 import java.sql.Timestamp;
@@ -75,4 +76,13 @@
     }
 
+//    @Override
+//    public List<Bilet> findAllByPatnikEmailACTIVE(String email) {
+//        Patnik patnik = patnikService.loadUserByEmail(email);
+//        List<Bilet> allByKorisnikByPatnikKIdAndBStatus = biletRepository.findAllByKorisnikByPatnikKIdAndBStatus(patnik, BILET_STATUS.ACTIVE);
+//        List<Bilet> allByKorisnikByPatnikKIdAndBStatus1 = biletRepository.findAllByKorisnikByPatnikKIdAndBStatus(patnik, BILET_STATUS.INACTIVE);
+//        allByKorisnikByPatnikKIdAndBStatus1.addAll(allByKorisnikByPatnikKIdAndBStatus);
+//        return allByKorisnikByPatnikKIdAndBStatus1;
+//    }
+
     @Override
     public Bilet findBybIdAndPatnikEmail(Long bId, String email) {
Index: src/main/java/mk/ukim/finki/busngo/service/impl/InstancaNaLinijaServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/impl/InstancaNaLinijaServiceImpl.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/impl/InstancaNaLinijaServiceImpl.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -52,5 +52,6 @@
 
     @Override
-    public Instancanalinija end(Long inlId) {
+    public Instancanalinija end(Long inlId, String email) {
+        Vozac vozac = vozacService.findByEmail(email);
         Instancanalinija instancanalinija = this.findById(inlId);
         instancanalinija.setInlDatumEnd(Timestamp.valueOf(LocalDateTime.now()));
Index: src/main/java/mk/ukim/finki/busngo/service/impl/KaznaServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/impl/KaznaServiceImpl.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/impl/KaznaServiceImpl.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -8,4 +8,6 @@
 import org.springframework.stereotype.Service;
 
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
 import java.util.List;
 
@@ -30,3 +32,16 @@
         return kaznaRepository.findAllByKontroliByKontrolaId(kontroli);
     }
+
+    @Override
+    public Kazna pay(Long kaznaId) {
+        Kazna kazna = this.findById(kaznaId);
+        kazna.setKzPlateno(true);
+        kazna.setKzDatumPlateno(Timestamp.valueOf(LocalDateTime.now()));
+        return kaznaRepository.save(kazna);
+    }
+
+    @Override
+    public Kazna findById(Long id) {
+        return kaznaRepository.findById(id).orElseThrow(RuntimeException::new);
+    }
 }
Index: src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaRegistriranServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaRegistriranServiceImpl.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/impl/KaznaZaRegistriranServiceImpl.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -59,3 +59,18 @@
                 kontroli.getInstancanalinijaByInlId().getInlId()));
     }
+
+    @Override
+    public Kaznazaregistriran pay(Long kaznaId) {
+        Kaznazaregistriran kazna = this.findById(kaznaId);
+        if(!kazna.getKzPlateno()){
+            kazna.setKzPlateno(true);
+            kazna.setKzDatumPlateno(Timestamp.valueOf(LocalDateTime.now()));
+        }
+        return kaznaZaRegistriranRepository.save(kazna);
+    }
+
+    @Override
+    public Kaznazaregistriran findById(Long id) {
+        return kaznaZaRegistriranRepository.findById(id).orElseThrow(RuntimeException::new);
+    }
 }
Index: src/main/java/mk/ukim/finki/busngo/service/impl/VozenjeServiceImpl.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/service/impl/VozenjeServiceImpl.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/service/impl/VozenjeServiceImpl.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -33,4 +33,10 @@
         Patnik patnik = patnikService.loadUserByEmail(email);
         return vozenjeRepository.findAllByKorisnikByPatnikKId(patnik);
+    }
+
+    @Override
+    public List<Vozenje> findVozenjaByPatnikAndStatus(String email, VOZENJE_STATUS status) {
+        Patnik patnik = patnikService.loadUserByEmail(email);
+        return vozenjeRepository.findAllByKorisnikByPatnikKIdAndAndVozenjeStatus(patnik, status);
     }
 
Index: src/main/java/mk/ukim/finki/busngo/web/BiletController.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/web/BiletController.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/web/BiletController.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -41,4 +41,5 @@
         Patnik patnik = null;
         try{
+            patnik = patnikService.loadUserByEmail(authentication.getName());
             model.addAttribute("bileti", biletService.findAllByPatnikEmail(authentication.getName()));
         }
Index: src/main/java/mk/ukim/finki/busngo/web/InstancaNaLinijaController.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/web/InstancaNaLinijaController.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/web/InstancaNaLinijaController.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -71,6 +71,7 @@
 
     @PostMapping("/{inlId}/end")
-    public String endInstanca(@PathVariable Long inlId){
-        Instancanalinija ended = instancaNaLinijaService.end(inlId);
+    public String endInstanca(@PathVariable Long inlId,
+                              Authentication authentication){
+        Instancanalinija ended = instancaNaLinijaService.end(inlId, authentication.getName());
         return "redirect:/instanca-na-linija/" + ended.getInlId();
     }
Index: src/main/java/mk/ukim/finki/busngo/web/KaznaController.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/web/KaznaController.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/web/KaznaController.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -9,4 +9,6 @@
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
@@ -37,3 +39,11 @@
         return "master-template";
     }
+
+    @PostMapping("/{id}/pay")
+    public String pay(@PathVariable Long id,
+                      Model model){
+        kaznaZaRegistriranService.pay(id);
+        return "redirect:/kazna";
+    }
+
 }
Index: src/main/java/mk/ukim/finki/busngo/web/RegisterController.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/web/RegisterController.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/web/RegisterController.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -2,4 +2,5 @@
 
 import mk.ukim.finki.busngo.model.entities.Korisnik;
+import mk.ukim.finki.busngo.model.enums.VrabotenType;
 import mk.ukim.finki.busngo.model.exceptions.InvalidCredentialsException;
 import mk.ukim.finki.busngo.model.exceptions.UserAlreadyExistsException;
@@ -34,4 +35,6 @@
         }
 
+        model.addAttribute("types", VrabotenType.values());
+
         model.addAttribute("bodyContent", "register");
         return "master-template";
@@ -44,9 +47,16 @@
                            @RequestParam String confirmPassword,
                            @RequestParam String address,
-                           @RequestParam String phone
-    ) {
+                           @RequestParam String phone,
+                           @RequestParam(required = false)VrabotenType vrabotenType,
+                           @RequestParam(required = false) Double salary
+                           ) {
         try{
-            Korisnik korisnik = this.authService.registerPatnik(name, email, password, confirmPassword, address, phone);
-            this.patnikService.save(korisnik);
+            Korisnik korisnik;
+            if(vrabotenType != null){
+                 korisnik = this.authService.registerVraboten(name, email, password, confirmPassword, address, phone, vrabotenType, salary);
+
+            }
+            else
+                korisnik = this.authService.registerPatnik(name, email, password, confirmPassword, address, phone);
             return "redirect:/login";
         } catch (InvalidCredentialsException | UserAlreadyExistsException exception) {
Index: src/main/java/mk/ukim/finki/busngo/web/VozenjeController.java
===================================================================
--- src/main/java/mk/ukim/finki/busngo/web/VozenjeController.java	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/java/mk/ukim/finki/busngo/web/VozenjeController.java	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -4,4 +4,5 @@
 import mk.ukim.finki.busngo.model.entities.Patnik;
 import mk.ukim.finki.busngo.model.entities.Vozenje;
+import mk.ukim.finki.busngo.model.enums.VOZENJE_STATUS;
 import mk.ukim.finki.busngo.model.exceptions.InvalidPatnikIdException;
 import mk.ukim.finki.busngo.model.exceptions.InvalidPostojkaNaLinijaIdException;
@@ -29,9 +30,14 @@
     @GetMapping()
     public String getVozenjePage(Model model,
-                                 Authentication authentication){
+                                 Authentication authentication,
+                                 @RequestParam(required = false) VOZENJE_STATUS status){
         model.addAttribute("bodyContent", "listVozenja");
         Patnik patnik = null;
         try{
-            model.addAttribute("vozenja", vozenjeService.findVozenjaByPatnik(authentication.getName()));
+            if(status != null)
+                model.addAttribute("vozenja", vozenjeService.findVozenjaByPatnikAndStatus(authentication.getName(), status));
+            else
+                model.addAttribute("vozenja", vozenjeService.findVozenjaByPatnikAndStatus(authentication.getName(), VOZENJE_STATUS.ACTIVE));
+            model.addAttribute("vozStatus", VOZENJE_STATUS.values());
         }
         catch (InvalidPatnikIdException e){
Index: src/main/resources/templates/fragments/header.html
===================================================================
--- src/main/resources/templates/fragments/header.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/fragments/header.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -10,5 +10,5 @@
       <div class="collapse navbar-collapse justify-content-end" id="navbarsExampleDefault">
         <ul class="navbar-nav m-auto">
-          <li class="nav-item m-auto">
+          <li sec:hasRole class="nav-item m-auto">
             <a class="nav-link active" href="/bilet">Bileti</a>
           </li>
@@ -42,9 +42,5 @@
             <a class="nav-link" href="#"></a>
           </li>
-          <li class="nav-item">
-            <a class="btn btn-success btn-sm ml-3" href="/shopping-cart">
-              <i class="fa fa-shopping-cart"></i> Cart
-            </a>
-          </li>
+
           <li class="nav-item" sec:authorize="isAuthenticated()">
             <a href="#" class="btn btn-light btn-sm ml-3" sec:authentication="name">
Index: src/main/resources/templates/kontrola.html
===================================================================
--- src/main/resources/templates/kontrola.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/kontrola.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -1,10 +1,7 @@
 <div xmlns:th="http://www.thymeleaf.org">
-    <section class="jumbotron text-center">
-        <div class="container">
-            <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
-            <h3 class="jumbotron-heading">All products</h3>
-        </div>
-    </section>
 
+    <div class="container mb-4">
+        <div class="row">
+            <div class="col-12" >
 
     <form class="form-signin mt-xl-5" method="post" th:action="@{'/kontrola/{id}/kazni-neregistriran'(id=${kontrola.kontrolaId})}">
@@ -12,5 +9,5 @@
 
         <p>
-            <label for="dokument" class="sr-only">Email</label>
+            <label for="dokument" >Dokument</label>
             <input class="form-control" name="dokument" id="dokument" type="text">
         </p>
@@ -18,15 +15,15 @@
 
         <p>
-            <label for="telefon" class="sr-only">Telefon</label>
+            <label for="telefon" >Telefon</label>
             <input class="form-control" name="telefon" id="telefon" type="text">
         </p>
 
         <p>
-            <label for="ime" class="sr-only">Ime</label>
+            <label for="ime" >Ime</label>
             <input class="form-control" name="ime" id="ime" type="text">
         </p>
 
         <p>
-            <label for="adresa" class="sr-only">Adresa</label>
+            <label for="adresa" >Adresa</label>
             <input class="form-control" name="adresa" id="adresa" type="text">
         </p>
@@ -34,5 +31,5 @@
 
         <p>
-            <label for="iznos" class="sr-only">Iznos</label>
+            <label for="iznos" >Iznos</label>
             <input class="form-control" name="iznos" id="iznos" type="number">
         </p>
@@ -49,19 +46,20 @@
 
 
+
     <form class="form-signin mt-xl-5" method="post" th:action="@{'/kontrola/{id}/kazni-registriran'(id=${kontrola.kontrolaId})}">
         <h2 class="form-signin-heading">Kazna za regirstiran</h2>
 
         <p>
-            <label for="dk" class="sr-only">Dokument</label>
+            <label for="dk" >Dokument</label>
             <input class="form-control" name="dokument" id="dk" type="text">
         </p>
 
         <p>
-            <label for="iz" class="sr-only">Iznos</label>
+            <label for="iz" >Iznos</label>
             <input class="form-control" name="iznos" id="iz" type="number">
         </p>
 
         <p>
-            <label for="patnik" class="sr-only">Patnik</label>
+            <label for="patnik" >Patnik</label>
             <select id="patnik" name="patnik" class="form-control">
                 <option th:each="patnik : ${patnici}"
@@ -82,4 +80,9 @@
         </div>
     </form>
+
+            </div>
+        </div>
+    </div>
+
 
 
@@ -114,29 +117,24 @@
 
                             <td class="text-right">
-                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">
-                                    <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"
-                                          th:method="DELETE">
-                                        <button type="submit"
-                                                class="btn btn-sm btn-danger delete-product">
-                                            <i class="fas fa-trash-alt"></i> Delete
-                                        </button>
-                                    </form>
-                                </th:block>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"-->
+<!--                                          th:method="DELETE">-->
+<!--                                        <button type="submit"-->
+<!--                                                class="btn btn-sm btn-danger delete-product">-->
+<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
+<!--                                        </button>-->
+<!--                                    </form>-->
+<!--                                </th:block>-->
                             </td>
                             <td>
-                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">
-                                    <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"
-                                       class="btn btn-sm btn-info edit-product">
-                                        <i class="fas fa-edit"></i> Edit
-                                    </a>
-                                </th:block>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
                             </td>
                             <td>
-                                <form th:action="@{'/shopping-cart/add-product/{id}' (id=${kazna.kzId})}"
-                                      th:method="POST">
-                                    <button type="submit" class="btn btn-sm btn-success add-to-cart">
-                                        <i class="fas fa-shopping-cart"></i> Add to cart
-                                    </button>
-                                </form>
+
                             </td>
                         </tr>
Index: src/main/resources/templates/kupiBilet.html
===================================================================
--- src/main/resources/templates/kupiBilet.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/kupiBilet.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -1,9 +1,4 @@
 <div xmlns:th="http://www.thymeleaf.org">
-    <section class="jumbotron text-center">
-        <div class="container">
-            <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
-            <h3 class="jumbotron-heading">All products</h3>
-        </div>
-    </section>
+
 
     <div style="width: 500px">
Index: src/main/resources/templates/listBileti.html
===================================================================
--- src/main/resources/templates/listBileti.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/listBileti.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -1,9 +1,4 @@
 <div xmlns:th="http://www.thymeleaf.org">
-    <section class="jumbotron text-center">
-        <div class="container">
-            <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
-            <h3 class="jumbotron-heading">All products</h3>
-        </div>
-    </section>
+
 
     <div class="container mb-4">
@@ -31,29 +26,24 @@
 
                             <td class="text-right">
-                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">
-                                    <form th:action="@{'/products/delete/{id}' (id=${bilet.bId})}"
-                                          th:method="DELETE">
-                                        <button type="submit"
-                                                class="btn btn-sm btn-danger delete-product">
-                                            <i class="fas fa-trash-alt"></i> Delete
-                                        </button>
-                                    </form>
-                                </th:block>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <form th:action="@{'/products/delete/{id}' (id=${bilet.bId})}"-->
+<!--                                          th:method="DELETE">-->
+<!--                                        <button type="submit"-->
+<!--                                                class="btn btn-sm btn-danger delete-product">-->
+<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
+<!--                                        </button>-->
+<!--                                    </form>-->
+<!--                                </th:block>-->
                             </td>
                             <td>
-                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">
-                                    <a th:href="@{'/products/edit-form/{id}' (id=${bilet.bId})}"
-                                       class="btn btn-sm btn-info edit-product">
-                                        <i class="fas fa-edit"></i> Edit
-                                    </a>
-                                </th:block>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${bilet.bId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
                             </td>
                             <td>
-                                <form th:action="@{'/shopping-cart/add-product/{id}' (id=${bilet.bId})}"
-                                      th:method="POST">
-                                    <button type="submit" class="btn btn-sm btn-success add-to-cart">
-                                        <i class="fas fa-shopping-cart"></i> Add to cart
-                                    </button>
-                                </form>
+
                             </td>
                         </tr>
Index: src/main/resources/templates/listInstanci.html
===================================================================
--- src/main/resources/templates/listInstanci.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/listInstanci.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -1,9 +1,4 @@
 <div xmlns:th="http://www.thymeleaf.org">
-    <section class="jumbotron text-center">
-        <div class="container">
-            <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
-            <h3 class="jumbotron-heading">All products</h3>
-        </div>
-    </section>
+
 
     <div class="container mb-4">
@@ -61,5 +56,5 @@
                                       th:method="GET">
                                     <button type="submit" class="btn btn-sm btn-success add-to-cart">
-                                        <i class="fas fa-shopping-cart"></i> Kontrola
+                                         Kontrola
                                     </button>
                                 </form>
Index: src/main/resources/templates/listKazni.html
===================================================================
--- src/main/resources/templates/listKazni.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/listKazni.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -1,9 +1,4 @@
 <div xmlns:th="http://www.thymeleaf.org">
-    <section class="jumbotron text-center">
-        <div class="container">
-            <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
-            <h3 class="jumbotron-heading">All products</h3>
-        </div>
-    </section>
+
 
     <div class="container mb-4">
@@ -16,5 +11,7 @@
                             <th scope="col">#</th>
                             <th scope="col">Iznos</th>
+                            <th scope="col">Datum</th>
                             <th scope="col">Plateno</th>
+                            <th scope="col">Datum plateno</th>
                             <th scope="col">Dokument</th>
                             <th scope="col"></th>
@@ -27,31 +24,33 @@
                             <td th:text="${kazna.kzId}"></td>
                             <td th:text="${kazna.kzIznos}"></td>
+                            <td th:text="${kazna.kzDatum}"></td>
                             <td th:text="${kazna.kzPlateno}"></td>
+                            <td th:text="${kazna.kzDatumPlateno}"></td>
                             <td th:text="${kazna.kzDokument}"></td>
 
                             <td class="text-right">
-                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">
-                                    <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"
-                                          th:method="DELETE">
-                                        <button type="submit"
-                                                class="btn btn-sm btn-danger delete-product">
-                                            <i class="fas fa-trash-alt"></i> Delete
-                                        </button>
-                                    </form>
-                                </th:block>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <form th:action="@{'/products/delete/{id}' (id=${kazna.kzId})}"-->
+<!--                                          th:method="DELETE">-->
+<!--                                        <button type="submit"-->
+<!--                                                class="btn btn-sm btn-danger delete-product">-->
+<!--                                            <i class="fas fa-trash-alt"></i> Delete-->
+<!--                                        </button>-->
+<!--                                    </form>-->
+<!--                                </th:block>-->
                             </td>
                             <td>
-                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">
-                                    <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"
-                                       class="btn btn-sm btn-info edit-product">
-                                        <i class="fas fa-edit"></i> Edit
-                                    </a>
-                                </th:block>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${kazna.kzId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
                             </td>
                             <td>
-                                <form th:action="@{'/shopping-cart/add-product/{id}' (id=${kazna.kzId})}"
+                                <form th:action="@{'/kazna/{id}/pay' (id=${kazna.kzId})}"
                                       th:method="POST">
                                     <button type="submit" class="btn btn-sm btn-success add-to-cart">
-                                        <i class="fas fa-shopping-cart"></i> Add to cart
+                                         Pay
                                     </button>
                                 </form>
Index: src/main/resources/templates/listVozenja.html
===================================================================
--- src/main/resources/templates/listVozenja.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/listVozenja.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -6,4 +6,12 @@
         </div>
     </section>
+
+    <form method="get" action="/vozenje">
+        <select name="status">
+            <option th:each="status : ${vozStatus}" th:value="${status}" th:text="${status.name()}"></option>
+        </select>
+
+        <input type="submit" value="Search">
+    </form>
 
     <div class="container mb-4">
@@ -33,10 +41,11 @@
 
                             <td class="text-right">
-                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">
-                                    <form th:action="@{'/products/delete/{id}' (id=${vozenje.vozenjeId})}"
-                                          th:method="DELETE">
+                                <th:block  >
+                                    <form th:action="@{'/vozenje/{id}/end' (id=${vozenje.vozenjeId})}"
+                                          th:hidden="${vozenje.vozenjeStatus.name().equals('FINISHED')} ? 'true' : 'false'"
+                                          th:method="GET">
                                         <button type="submit"
                                                 class="btn btn-sm btn-danger delete-product">
-                                            <i class="fas fa-trash-alt"></i> Delete
+                                            <i class="fas fa-trash-alt"></i> End
                                         </button>
                                     </form>
@@ -44,18 +53,13 @@
                             </td>
                             <td>
-                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">
-                                    <a th:href="@{'/products/edit-form/{id}' (id=${vozenje.vozenjeId})}"
-                                       class="btn btn-sm btn-info edit-product">
-                                        <i class="fas fa-edit"></i> Edit
-                                    </a>
-                                </th:block>
+<!--                                <th:block sec:authorize="hasRole('ROLE_ADMIN')">-->
+<!--                                    <a th:href="@{'/products/edit-form/{id}' (id=${vozenje.vozenjeId})}"-->
+<!--                                       class="btn btn-sm btn-info edit-product">-->
+<!--                                        <i class="fas fa-edit"></i> Edit-->
+<!--                                    </a>-->
+<!--                                </th:block>-->
                             </td>
                             <td>
-                                <form th:action="@{'/vozenje/{vozenjeId}/end'(vozenjeId=${vozenje.vozenjeId})}"
-                                      th:method="GET">
-                                    <button type="submit" class="btn btn-sm btn-success add-to-cart">
-                                        <i class="fas fa-shopping-cart"></i> End vozenje
-                                    </button>
-                                </form>
+
                             </td>
                         </tr>
Index: src/main/resources/templates/master-template.html
===================================================================
--- src/main/resources/templates/master-template.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/master-template.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -20,4 +20,6 @@
 <header th:replace="fragments/header"/>
 
+<div th:text="${error}"></div>
+
 <section th:include="${bodyContent}">
 
Index: src/main/resources/templates/register.html
===================================================================
--- src/main/resources/templates/register.html	(revision bde8b1381c72e66b4414f8010493f3f189b15c03)
+++ src/main/resources/templates/register.html	(revision 4d026a5e5b12d6fe64a4a57a4d7c6ca5f10561ed)
@@ -1,9 +1,3 @@
 <div xmlns:th="http://www.thymeleaf.org">
-  <section class="jumbotron text-center">
-    <div class="container">
-      <h1 class="jumbotron-heading">WEB PROGRAMMING SHOP</h1>
-      <h3 class="jumbotron-heading">All products</h3>
-    </div>
-  </section>
 
   <div class="container mb-4">
@@ -35,4 +29,19 @@
       </p>
 
+      <p sec:authorize="hasRole('ROLE_ADMIN')">
+        <label for="vrabotenType" class="sr-only">Vraboten Type</label>
+        <select name="vrabotenType" id="vrabotenType">
+          <option th:each="type : ${types}"
+                  th:text="${type.name()}"
+                  th:value="${type}" ></option>
+        </select>
+      </p>
+
+      <p sec:authorize="hasRole('ROLE_ADMIN')">
+        <label for="salary" class="sr-only">Salary</label>
+        <input type="number" id="salary" name="salary">
+      </p>
+
+
 
 
