Index: src/main/java/com/tourMate/config/SecurityConfig.java
===================================================================
--- src/main/java/com/tourMate/config/SecurityConfig.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/config/SecurityConfig.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -7,4 +7,5 @@
 import org.springframework.http.HttpHeaders;
 import org.springframework.http.HttpMethod;
+import org.springframework.http.HttpStatus;
 import org.springframework.security.config.annotation.web.builders.HttpSecurity;
 import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
@@ -14,4 +15,5 @@
 import org.springframework.security.web.SecurityFilterChain;
 import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+import org.springframework.security.web.authentication.logout.HttpStatusReturningLogoutSuccessHandler;
 import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
 import org.springframework.web.cors.CorsConfiguration;
@@ -72,8 +74,9 @@
                                         .anyRequest().authenticated()
                                         .and()
-                                        .formLogin().loginPage("http://localhost:3000/login")
+                                        .formLogin()
                                         .loginProcessingUrl("/api/login").usernameParameter("username").passwordParameter("password")
                                         .successHandler((request, response, authentication) -> {
                                             response.setStatus(HttpServletResponse.SC_OK);
+                                            response.setCharacterEncoding("UTF-8");
                                             response.setContentType("application/json");
                                             response.getWriter().print("{\"message\": \"Login successful\",");
@@ -83,5 +86,6 @@
                                         .failureHandler((request, response, exception) -> {
                                             response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
-                                            response.getWriter().print("Pukla veza\n" + exception.getMessage());
+                                            response.sendRedirect("/login");
+                                            response.getWriter().print("Neuspesna najava\n" + exception.getMessage());
                                             response.getWriter().flush();
                                         })
@@ -91,5 +95,5 @@
                                         .sessionCreationPolicy(SessionCreationPolicy.ALWAYS)
                                         .and()
-                                        .logout()
+                                        .logout().logoutSuccessHandler((new HttpStatusReturningLogoutSuccessHandler(HttpStatus.OK)))
                                         .permitAll();
 
Index: src/main/java/com/tourMate/controllers/HotelController.java
===================================================================
--- src/main/java/com/tourMate/controllers/HotelController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/controllers/HotelController.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -2,4 +2,6 @@
 
 import com.tourMate.dto.HotelDto;
+import com.tourMate.dto.HotelReservationDto;
+import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
 import com.tourMate.services.HotelManager;
@@ -117,7 +119,8 @@
     //HOTEL ROOM CRUD
     @PostMapping(path = "/hotel/rooms/add")
-    public void addRoom(@RequestBody HotelRoom room, @RequestParam(name = "hotelId") long hotelId) {
+    public void addRoom(@RequestBody HotelRoom room,
+                        @RequestParam(name = "hotelId") long hotelId) {
         Hotels h = hotelManager.findHotelByID(hotelId);
-        hotelManager.createRoom(h, room.getHotelRoomDescription(), room.getHotelRoomName(), room.getKitchenAvailable(), room.getAirConditioning(), room.getBalcony(), room.getPrice());
+        hotelManager.createRoom(h, room.getHotelRoomDescription(), room.getHotelRoomName(), room.getKitchenAvailable(), room.getAirConditioning(), room.getBalcony(), room.getPrice(), room.getNumOfBeds());
     }
 
@@ -162,5 +165,6 @@
         //HOTEL AVAILABILITY CRUD
     @PostMapping(path = "/hotel/rooms/available/{id}/add")
-    public void addRoomAvailible(@RequestBody HotelRoomAvailable hotelRoomAvailable, @PathVariable long id)
+    public void addRoomAvailible(@RequestBody HotelRoomAvailable hotelRoomAvailable,
+                                 @PathVariable long id)
     {
         HotelRoom hotelRoom = hotelManager.findRoomById(id);
@@ -191,10 +195,12 @@
     public List<HotelRoomAvailable> getRoomAvailability(@PathVariable Long id)
     {
-        return hotelManager.getRoomsAvailibility();
+        return hotelManager.getRoomsAvailableById(id);
     }
 
     @GetMapping(path = "/hotel/search")
-    public List<HotelDto> searchAvailibleRooms(@RequestParam(name = "hotelLocation") String hotelLocation, @RequestParam(name = "dateFrom") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateFrom,
-                                               @RequestParam(name = "dateTo") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateTo, @RequestParam(name = "numBeds") int numBeds)
+    public List<HotelDto> searchAvailibleRooms(@RequestParam(name = "hotelLocation") String hotelLocation,
+                                               @RequestParam(name = "dateFrom") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateFrom,
+                                               @RequestParam(name = "dateTo") @DateTimeFormat(pattern = "yyyy-MM-dd") Date dateTo,
+                                               @RequestParam(name = "numBeds") int numBeds)
     {
         System.out.println(hotelLocation);
@@ -216,3 +222,14 @@
     }
 
+    @GetMapping(path = "/hotel/{id}/reservations/active")
+    public List<HotelReservationDto> getActiveReservationsForHotel(@PathVariable Long id)
+    {
+        return hotelManager.findVaidReseravtionsByHotel(id);
+    }
+
+    @GetMapping(path = "/hotel/reservations/user/{id}")
+    public List<HotelReservationUserDto> getActiveReservationsForUser(@PathVariable Long id)
+    {
+        return hotelManager.findValidHotelReservationsByUser(id);
+    }
 }
Index: src/main/java/com/tourMate/controllers/TransportController.java
===================================================================
--- src/main/java/com/tourMate/controllers/TransportController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/controllers/TransportController.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -23,7 +23,8 @@
 
     // TRANSPORT CRUD //
-    @PostMapping(path = "/transport/add")
-    public void add(@RequestBody Transport transport) {
-        transportManager.createTransport(transport.getTransportName(), transport.getCarBrand(), transport.getCarType(), transport.getCarManufacturedYear(), transport.getNoPassengers(), transport.getNoBags(), transport.getEMBG(), new User(), transport.getCarPlate());
+    @PostMapping(path = "/transport/add/{userId}")
+    public void add(@RequestBody Transport transport,
+                    @PathVariable Long userId) {
+        transportManager.createTransport(transport.getTransportName(), transport.getCarBrand(), transport.getCarType(), transport.getCarManufacturedYear(), transport.getNoPassengers(), transport.getNoBags(), transport.getEMBG(), userId, transport.getCarPlate());
 
     }
@@ -48,5 +49,4 @@
     public TransportDto getTransport(@PathVariable(name = "id") long transportId)
     {
-        System.out.println("TUKA SUUUUUM");
         return transportManager.findTransportById(transportId);
     }
@@ -92,6 +92,4 @@
     @PostMapping(path = "/transport/available/add")
     public void add(@RequestBody TransportAvailible transportAvailable, @RequestParam(name = "transportId") long transportId) {
-        System.out.println("OREEEEEL");
-        System.out.println("DVA ORLA");
         Transport t = transportManager.getTransportById(transportId);
         List<TransportRoute> routes = transportAvailable.getRoutes().stream().toList();
@@ -135,7 +133,9 @@
 
     @GetMapping(path = "/transport/search")
-    public List<TransportListingDto> searchAvailableTransport(@RequestParam(name = "from") String from, @RequestParam(name = "to") String to,
-                                                              @RequestParam(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date){
-        return transportManager.getTransportsAvailableByFilters(from, to, date);
+    public List<TransportListingDto> searchAvailableTransport(@RequestParam(name = "from") String from,
+                                                              @RequestParam(name = "to") String to,
+                                                              @RequestParam(name = "date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date,
+                                                              @RequestParam(name = "numPassengers") int numPassengers){
+        return transportManager.getTransportsAvailableByFilters(from, to, date, numPassengers);
     }
 }
Index: src/main/java/com/tourMate/controllers/UsersController.java
===================================================================
--- src/main/java/com/tourMate/controllers/UsersController.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/controllers/UsersController.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -11,5 +11,4 @@
 import org.springframework.web.bind.annotation.*;
 
-import java.util.ArrayList;
 import java.util.List;
 
@@ -39,4 +38,32 @@
     {
         return businessManager.getUnapprovedBusinessesOfUser(userId);
+    }
+
+    @GetMapping(path = "/business/unapproved")
+    public List<Business> getAllUnapprovedBusinesses()
+    {
+        return businessManager.getUnapprovedBusinesses();
+    }
+
+    @GetMapping(path = "/users/unapproved")
+    public List<User> getAllUnapprovedUsers()
+    {
+        return usersManager.getUnapprovedUsers();
+    }
+
+    @GetMapping(path = "/users/approve/{userId}")
+    public ResponseEntity<?> approveUserProfile(@PathVariable Long userId)
+    {
+        usersManager.approveUserProfile(userId);
+        return new ResponseEntity<>(HttpStatus.OK);
+
+
+    }
+
+    @GetMapping(path = "/business/approve/{businessId}")
+    public ResponseEntity<?> approveBusiness(@PathVariable Long businessId)
+    {
+        businessManager.approveBusiness(businessId);
+        return new ResponseEntity<>(HttpStatus.OK);
     }
 
Index: src/main/java/com/tourMate/dao/BusinessDao.java
===================================================================
--- src/main/java/com/tourMate/dao/BusinessDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/BusinessDao.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -11,12 +11,15 @@
     @Transactional
     void createBusiness(Business business, long userId);
-    public List<Business> getUnapprovedBusinessesOfUser(long userId);
-    public void deleteBusiness(long businessId);
-    public List<Business> getCreatedBusinesses();
-    public Business findBusinessById (long businessId);
+    List<Business> getUnapprovedBusinessesOfUser(long userId);
+    void deleteBusiness(long businessId);
+    List<Business> getCreatedBusinesses();
+    Business findBusinessById (long businessId);
 
     @Transactional
     void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
-    public boolean hasBusiness(long userId);
+    boolean hasBusiness(long userId);
 
+    List<Business> getUnapprovedBusinesses();
+
+    void approveBusiness(Business business);
 }
Index: src/main/java/com/tourMate/dao/HotelDao.java
===================================================================
--- src/main/java/com/tourMate/dao/HotelDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/HotelDao.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -23,5 +23,5 @@
     public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
 
-    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds);
     public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String HotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
     public void deleteRoom(long hotelRoomId);
Index: src/main/java/com/tourMate/dao/TransportDao.java
===================================================================
--- src/main/java/com/tourMate/dao/TransportDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/TransportDao.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -12,5 +12,5 @@
 public interface TransportDao {
 
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate);
 
     public void deleteTransport(long transportId);
@@ -47,5 +47,5 @@
     public List<TransportAvailible> getTransportsAvailable();
 
-    public List<TransportRoute> getTransportsAvailableByFilters (String from,String to,Date date);
+    public List<TransportRoute> getTransportsAvailableByFilters (String from, String to, Date date, int numPassengers);
 
     public void createTransportRoute(TransportAvailible parentRoute, String from, String to, double price, Date departure, Date arrival, int freeSpace, int order);
Index: src/main/java/com/tourMate/dao/UsersDao.java
===================================================================
--- src/main/java/com/tourMate/dao/UsersDao.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/UsersDao.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -23,3 +23,7 @@
 
     UserDetails findUserByUsername(String username);
+
+    List<User> getUnapprovedUsers();
+
+    void approveUserProfile(User u);
 }
Index: src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/impl/BusinessDaoImpl.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -46,4 +46,16 @@
     }
 
+    @Override
+    public List<Business> getUnapprovedBusinesses() {
+        return em.createQuery("select b from Business b where not b.approved").getResultList();
+    }
+
+    @Override
+    @Transactional
+    public void approveBusiness(Business b) {
+        b.setApproved(true);
+        em.persist(b);
+    }
+
 
     @Override
Index: src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/impl/HotelDaoImpl.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -28,5 +28,4 @@
     public List<Hotels> getHotels() {
         List<Hotels> hoteli = em.createQuery("select h from Hotels h order by h.hotelId").getResultList();
-        System.out.println("OREEEEEEL");
         return hoteli;
         //return em.createQuery("select h from Hotels h order by h.hotelId").getResultList();
@@ -119,6 +118,6 @@
     @Transactional
     @Override
-    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        HotelRoom hotelRoom = new HotelRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
+        HotelRoom hotelRoom = new HotelRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price, numOfBeds);
         em.persist(hotelRoom);
     }
@@ -188,5 +187,5 @@
     public List<HotelRoomAvailable> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds) {
         return em.createQuery("select hr from HotelRoomAvailable hr where hr.dateFrom <= :dateFrom and hr.dateTo >= :dateTo " +
-                "and hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation and hr.numberOfBeds >= :numBeds")
+                "and hr.hotelRoom.hotel.hotelLocation LIKE :hotelLocation and hr.hotelRoom.numOfBeds >= :numBeds")
                 .setParameter("hotelLocation", hotelLocation)
                 .setParameter("dateFrom", dateFrom)
@@ -236,5 +235,5 @@
     public List<HotelRoomReservations> findReservationByHotel(Hotels hotel) {
         List<HotelRoom> hotelRooms = getRoomsOfHotel(hotel.getHotelId());
-        return em.createQuery("select hr from HotelRoomReservations hr where hr.hotelRoom in :hotelRooms").setParameter("hotelRooms", hotelRooms).getResultList();
+        return em.createQuery("select hr from HotelRoomReservations hr where hr.hotelRoom.hotel = :hotel").setParameter("hotel", hotel).getResultList();
     }
 
Index: src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/impl/TransportDaoImpl.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -22,6 +22,6 @@
     @Override
     @Transactional
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
-        User u = em.find(User.class, 1);
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate) {
+        User u = em.find(User.class, userId);
         Transport t=new Transport(transportName,carBrand,carType,carManufacturedYear,noPassengers,noBags,EMBG,u,carPlate);
         em.persist(t);
@@ -62,6 +62,13 @@
                         y.getFreeSpace(),
                         y.getTime(),
-                        y.getRoutes()
-                )).toList()
+                        y.getRoutes(),
+                        y.getRoutes().stream()
+                                .mapToDouble(TransportRoute::getPrice)
+                                .max().orElse(0)
+                )).toList(),
+                x.getAvailableRoutes().stream()
+                        .flatMapToDouble(y -> y.getRoutes()
+                                .stream()
+                                .mapToDouble(TransportRoute::getPrice)).max().orElseGet(() -> 0)
         )).toList();
     }
@@ -78,5 +85,8 @@
                 x.getFreeSpace(),
                 x.getTime(),
-                x.getRoutes()
+                x.getRoutes(),
+                x.getRoutes().stream()
+                        .mapToDouble(TransportRoute::getPrice)
+                        .max().orElse(0)
         )).toList();
     }
@@ -103,6 +113,13 @@
                         y.getFreeSpace(),
                         y.getTime(),
-                        y.getRoutes()
-                )).toList());
+                        y.getRoutes(),
+                        y.getRoutes().stream()
+                                .mapToDouble(TransportRoute::getPrice)
+                                .max().orElse(0)
+                )).toList(),
+                x.getAvailableRoutes().stream()
+                        .flatMapToDouble(y -> y.getRoutes()
+                                                        .stream()
+                                                        .mapToDouble(TransportRoute::getPrice)).max().orElseGet(() -> 0));
     }
 
@@ -151,8 +168,11 @@
 
     @Override
-    public List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date) {
+    public List<TransportRoute> getTransportsAvailableByFilters(String fromL, String toL, Date date, int numPassengers) {
         System.out.println(fromL + " " + toL);
-        return em.createQuery("select h from TransportRoute h where h.from = :froml and h.to = :tol").setParameter("froml", fromL).
-                setParameter("tol", toL).getResultList();
+        return em.createQuery("select h from TransportRoute h where h.from = :froml and h.to = :tol and h.freeSpace >= :nump")
+                .setParameter("froml", fromL)
+                .setParameter("tol", toL)
+                .setParameter("nump", numPassengers)
+                .getResultList();
     }
 
Index: src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java
===================================================================
--- src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dao/impl/UsersDaoImpl.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -74,4 +74,15 @@
     }
 
+    @Override
+    public List<User> getUnapprovedUsers() {
+        return em.createQuery("select u from User u where not u.enabled").getResultList();
+    }
+
+    @Override
+    @Transactional
+    public void approveUserProfile(User u) {
+        u.setEnabled(true);
+        em.persist(u);
+    }
 
 
Index: src/main/java/com/tourMate/dto/RouteListingDto.java
===================================================================
--- src/main/java/com/tourMate/dto/RouteListingDto.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dto/RouteListingDto.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -18,6 +18,7 @@
     private Date time;
     private Collection<String> routes;
+    private Double maxPrice;
 
-    public RouteListingDto(long transportAvailibleId, String from, String to, Date date, int freeSpace, Date time, Collection<TransportRoute> routes) {
+    public RouteListingDto(long transportAvailibleId, String from, String to, Date date, int freeSpace, Date time, Collection<TransportRoute> routes, Double maxPrice) {
         this.transportAvailibleId = transportAvailibleId;
         this.from = from;
@@ -27,4 +28,5 @@
         this.time = time;
         this.routes = routes.stream().map(x -> x.getFrom()).distinct().skip(1).toList();
+        this.maxPrice = maxPrice;
     }
 
@@ -84,3 +86,7 @@
         this.routes = routes;
     }
+
+    public Double getMaxPrice() {
+        return maxPrice;
+    }
 }
Index: src/main/java/com/tourMate/dto/TransportDto.java
===================================================================
--- src/main/java/com/tourMate/dto/TransportDto.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/dto/TransportDto.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -16,7 +16,8 @@
     private User owner;
     private String carPlate;
+    private Double maxPrice;
     private Collection<RouteListingDto> availableRoutes;
 
-    public TransportDto(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate, Collection<RouteListingDto> availableRoutes) {
+    public TransportDto(long transportID, String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate, Collection<RouteListingDto> availableRoutes, Double maxPrice) {
         this.transportID = transportID;
         this.transportName = transportName;
@@ -30,4 +31,5 @@
         this.carPlate = carPlate;
         this.availableRoutes = availableRoutes;
+        this.maxPrice = maxPrice;
     }
 
Index: src/main/java/com/tourMate/entities/Business.java
===================================================================
--- src/main/java/com/tourMate/entities/Business.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/entities/Business.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -88,5 +88,5 @@
     }
 
-    @OneToOne(fetch = FetchType.LAZY)
+    @OneToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "owner_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_biznis_kon_korisnik"))
     public User getUser() {
@@ -107,3 +107,4 @@
         this.approved = approved;
     }
+
 }
Index: src/main/java/com/tourMate/entities/HotelRoom.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoom.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/entities/HotelRoom.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -16,9 +16,10 @@
     private String hotelRoomName;
     private double price;
+    private int numOfBeds;
     private Boolean kitchenAvailable;
     private Boolean airConditioning;
     private Boolean balcony;
 
-    public HotelRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, double price, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony) {
+    public HotelRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, double price, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, int numOfBeds) {
         this.hotelRoomId = hotelRoomId;
         this.hotel = hotel;
@@ -29,8 +30,9 @@
         this.airConditioning = airConditioning;
         this.balcony = balcony;
+        this.numOfBeds = numOfBeds;
     }
 
     public HotelRoom(Hotels hotel, String hotelRoomDescription, String type,
-                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
+                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
         this.hotel = hotel;
         this.hotelRoomDescription = hotelRoomDescription;
@@ -40,8 +42,9 @@
         this.balcony = balcony;
         this.price = price;
+        this.numOfBeds = numOfBeds;
     }
 
     public HotelRoom(String hotelRoomDescription, String type,
-                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
+                     Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
         this.hotel = hotel;
         this.hotelRoomDescription = hotelRoomDescription;
@@ -51,4 +54,5 @@
         this.balcony = balcony;
         this.price = price;
+        this.numOfBeds = numOfBeds;
     }
 
@@ -68,5 +72,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.LAZY)
+    @ManyToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "hotel_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_room_kon_hotel"))
     public Hotels getHotel() {
@@ -134,3 +138,12 @@
         this.balcony = balcony;
     }
+
+    @Column(name = "hotel_room_num_beds", unique = false)
+    public int getNumOfBeds() {
+        return numOfBeds;
+    }
+
+    public void setNumOfBeds(int numOfBeds) {
+        this.numOfBeds = numOfBeds;
+    }
 }
Index: src/main/java/com/tourMate/entities/HotelRoomReservations.java
===================================================================
--- src/main/java/com/tourMate/entities/HotelRoomReservations.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/entities/HotelRoomReservations.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -41,5 +41,5 @@
     }
 
-    @ManyToOne(fetch = FetchType.LAZY)
+    @ManyToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "room_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomres_kon_room"))
     public HotelRoom getHotelRoom() {
@@ -57,5 +57,5 @@
     }
 
-    @OneToOne(fetch = FetchType.LAZY)
+    @OneToOne(fetch = FetchType.EAGER)
     @JoinColumn(name = "user_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_roomres_kon_user"))
     public User getUser() {
Index: src/main/java/com/tourMate/entities/Reviews.java
===================================================================
--- src/main/java/com/tourMate/entities/Reviews.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/entities/Reviews.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -71,5 +71,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "hotel_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_hotel"))
+    @JoinColumn(name = "hotel_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_hotel"))
     public Hotels getHotel () {
         return hotel;
@@ -81,5 +81,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "restaurant_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_restorani"))
+    @JoinColumn(name = "restaurant_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_restorani"))
     public Restaurant getRestaurant () {
         return restaurant;
@@ -91,5 +91,5 @@
 
     @ManyToOne(fetch = FetchType.LAZY)
-    @JoinColumn(name = "transport_id", unique = false, nullable = false, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_transport"))
+    @JoinColumn(name = "transport_id", unique = false, nullable = true, foreignKey = @ForeignKey(name = "fk_ref_od_review_kon_transport"))
     public Transport getTransport () {
         return transport;
Index: src/main/java/com/tourMate/entities/User.java
===================================================================
--- src/main/java/com/tourMate/entities/User.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/entities/User.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -52,5 +52,5 @@
     private Role role;
     @Column(name = "locked", unique = false, nullable = false)
-    boolean locked;
+    boolean locked = false;
 
     @Column(name = "enabled", unique = false, nullable = false)
@@ -162,5 +162,5 @@
     @Override
     public boolean isAccountNonLocked() {
-        return true;
+        return locked;
     }
 
Index: src/main/java/com/tourMate/services/BusinessManager.java
===================================================================
--- src/main/java/com/tourMate/services/BusinessManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/BusinessManager.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -9,5 +9,6 @@
     public List<Business> getUnapprovedBusinessesOfUser(long userId);
     public void deleteBusiness(long businessId);
-    public List<Business> getCreatedBusinesses();
+    public List<Business> getUnapprovedBusinesses();
+    public void approveBusiness(Long businessId);
     public Business findBusinessById (long businessId);
     public void editBusiness(long businessId, String name, String phone, String address, String edbs, User user, boolean approved);
Index: src/main/java/com/tourMate/services/HotelManager.java
===================================================================
--- src/main/java/com/tourMate/services/HotelManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/HotelManager.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -2,4 +2,6 @@
 
 import com.tourMate.dto.HotelDto;
+import com.tourMate.dto.HotelReservationDto;
+import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
 
@@ -23,8 +25,7 @@
     public HotelRoom findRoomById (long hotelRoomId);
     public List<HotelRoomImages> getRoomImages(HotelRoom hotelRoom);
-    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds);
     public void editRoom(long hotelRoomId, Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price);
     public void deleteRoom(long hotelRoomId);
-    public List<HotelRoomAvailable> getRoomsAvailable(Long id);
     public void createRoomAvailible(HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
     public void editRoomAvailible(long hotelRoomAvailableId, HotelRoom hotelRoom, Date dateFrom, Date dateTo, int numberOfBeds);
@@ -33,4 +34,5 @@
     public HotelRoomAvailable findAvailibleRoomById(long hotelRoomAvailableId);
     public List<HotelRoomAvailable> getRoomsAvailibility();
+    public List<HotelRoomAvailable> getRoomsAvailableById(Long id);
     public List<HotelRoomAvailable> getRoomsAvailibilityByHotel(Hotels hotel);
     public List<HotelDto> getRoomsAvailibilityByDateAndLocation(String hotelLocation, Date dateFrom, Date dateTo, int numberOfBeds);
@@ -38,4 +40,6 @@
     public void editReservation(long hotelRoomReservedId, User user, HotelRoom hotelRoom, Date dateFrom, Date dateTo, Integer numberOfBeds);
     public void deleteReservation(long hotelRoomReservedId);
+    public List<HotelReservationDto> findVaidReseravtionsByHotel(Long hotelId);
+    public List<HotelReservationUserDto> findValidHotelReservationsByUser(Long userId);
     public HotelRoomReservations findReservationById(long hotelRoomReservedId);
     public List<HotelRoomReservations> findReservationByUser(User user);
Index: src/main/java/com/tourMate/services/TransportManager.java
===================================================================
--- src/main/java/com/tourMate/services/TransportManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/TransportManager.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -12,5 +12,5 @@
 public interface TransportManager {
 
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate);
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate);
 
     public void deleteTransport(long transportId);
@@ -33,5 +33,5 @@
     public Transport getTransportById(long transportId);
 
-    public List<TransportListingDto> getTransportsAvailableByFilters (String from, String to, Date date);
+    public List<TransportListingDto> getTransportsAvailableByFilters (String from, String to, Date date, int numPassengers);
 
     public List<TransportReservation> getTransportsReservationsByUserID(long userID);
Index: src/main/java/com/tourMate/services/UsersManager.java
===================================================================
--- src/main/java/com/tourMate/services/UsersManager.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/UsersManager.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -16,3 +16,5 @@
 
     public void editUser(long userID, String name, String surname, String email, Date birthDate, String address, String contact);
+    public List<User> getUnapprovedUsers();
+    public void approveUserProfile(long userId);
 }
Index: src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/impl/BusinessManagerImpl.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -34,11 +34,17 @@
 
     @Override
-    public boolean hasBusiness(long userId){
-        return businessDao.hasBusiness(userId);
+    public List<Business> getUnapprovedBusinesses() {
+        return businessDao.getUnapprovedBusinesses();
     }
 
     @Override
-    public List<Business> getCreatedBusinesses() {
-        return businessDao.getCreatedBusinesses();
+    public void approveBusiness(Long businessId) {
+        Business b = findBusinessById(businessId);
+        businessDao.approveBusiness(b);
+    }
+
+    @Override
+    public boolean hasBusiness(long userId){
+        return businessDao.hasBusiness(userId);
     }
 
Index: src/main/java/com/tourMate/services/impl/HotelManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/HotelManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/impl/HotelManagerImpl.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -4,4 +4,6 @@
 import com.tourMate.dao.UsersDao;
 import com.tourMate.dto.HotelDto;
+import com.tourMate.dto.HotelReservationDto;
+import com.tourMate.dto.HotelReservationUserDto;
 import com.tourMate.entities.*;
 import com.tourMate.services.HotelManager;
@@ -10,5 +12,4 @@
 
 import java.time.Duration;
-import java.util.Collection;
 import java.util.Date;
 import java.util.List;
@@ -104,6 +105,6 @@
 
     @Override
-    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price) {
-        hotelDao.createRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price);
+    public void createRoom(Hotels hotel, String hotelRoomDescription, String hotelRoomName, Boolean kitchenAvailable, Boolean airConditioning, Boolean balcony, double price, int numOfBeds) {
+        hotelDao.createRoom(hotel, hotelRoomDescription, hotelRoomName, kitchenAvailable, airConditioning, balcony, price, numOfBeds);
     }
 
@@ -118,6 +119,7 @@
     }
 
-    @Override
-    public List<HotelRoomAvailable> getRoomsAvailable(Long id) {
+
+    @Override
+    public List<HotelRoomAvailable> getRoomsAvailableById(Long id) {
         return hotelDao.getRoomsAvailable(id);
     }
@@ -203,4 +205,35 @@
 
     @Override
+    public List<HotelReservationDto> findVaidReseravtionsByHotel(Long hotelId) {
+        Hotels hotel = findHotelByID(hotelId);
+        List<HotelRoomReservations> reservations = hotelDao.findReservationByHotel(hotel);
+        return reservations.stream()
+//                .filter(x -> x.getDateFrom().after(new Date()))
+                .map(x -> new HotelReservationDto(
+                        x.getUser(),
+                        x.getHotelRoom(),
+                        x.getDateFrom(),
+                        x.getDateTo(),
+                        x.getNumberOfBeds()
+                )).toList();
+    }
+
+    @Override
+    public List<HotelReservationUserDto> findValidHotelReservationsByUser(Long userId) {
+        User u = usersDao.findUserByID(userId);
+        List<HotelRoomReservations> reservations = hotelDao.findReservationByUser(u);
+        return reservations.stream().map(x -> new HotelReservationUserDto(
+                x.getUser(),
+                x.getHotelRoom(),
+                x.getDateFrom(),
+                x.getDateTo(),
+                x.getNumberOfBeds(),
+                x.getHotelRoom().getHotel().getHotelName(),
+                x.getHotelRoom().getHotel().getHotelLocation(),
+                ""
+        )).toList();
+    }
+
+    @Override
     public HotelRoomReservations findReservationById(long hotelRoomReservedId) {
         return hotelDao.findReservationById(hotelRoomReservedId);
Index: src/main/java/com/tourMate/services/impl/TransportManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/TransportManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/impl/TransportManagerImpl.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -24,6 +24,6 @@
 
     @Override
-    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, User owner, String carPlate) {
-        transportDao.createTransport(transportName, carBrand, carType, carManufacturedYear, noPassengers, noBags, EMBG, owner, carPlate);
+    public void createTransport(String transportName, String carBrand, String carType, int carManufacturedYear, int noPassengers, int noBags, long EMBG, Long userId, String carPlate) {
+        transportDao.createTransport(transportName, carBrand, carType, carManufacturedYear, noPassengers, noBags, EMBG, userId, carPlate);
     }
 
@@ -83,6 +83,6 @@
 
     @Override
-    public List<TransportListingDto> getTransportsAvailableByFilters(String from, String to, Date date) {
-        List<TransportRoute> transportAvailable = transportDao.getTransportsAvailableByFilters(from, to, date);
+    public List<TransportListingDto> getTransportsAvailableByFilters(String from, String to, Date date, int numPassengers) {
+        List<TransportRoute> transportAvailable = transportDao.getTransportsAvailableByFilters(from, to, date, numPassengers);
         Map<TransportAvailible, List<TransportRoute>> transportsByTransporter = transportAvailable.stream().collect(Collectors.groupingBy(x -> x.getParentRoute()));
         List<TransportListingDto> transportList = transportsByTransporter.keySet().stream().toList().stream()
Index: src/main/java/com/tourMate/services/impl/UsersManagerImpl.java
===================================================================
--- src/main/java/com/tourMate/services/impl/UsersManagerImpl.java	(revision e9b4ba920295b1b329df3313a9e80743d23804ee)
+++ src/main/java/com/tourMate/services/impl/UsersManagerImpl.java	(revision ac19a0cf7321de5f2be8991b7fc81fc71fe07f6c)
@@ -45,4 +45,15 @@
 
     @Override
+    public List<User> getUnapprovedUsers() {
+        return usersDao.getUnapprovedUsers();
+    }
+
+    @Override
+    public void approveUserProfile(long userId) {
+        User u = findUserByID(userId);
+        usersDao.approveUserProfile(u);
+    }
+
+    @Override
     public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
         return usersDao.findUserByUsername(username);
