Changeset 0ba5d1a for src


Ignore:
Timestamp:
02/08/23 16:31:52 (22 months ago)
Author:
DenicaKj <dkorvezir@…>
Branches:
master
Children:
00fa72f
Parents:
2c7a732
Message:

First part of reservation

Location:
src/main
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/com/example/moviezone/model/Ticket.java

    r2c7a732 r0ba5d1a  
    2727    @JoinColumn(name = "id_customer")
    2828    Customer customer;
     29    @ManyToOne
     30    @JoinColumn(name = "id_projection")
     31    Projection projection;
     32    @ManyToOne
     33    @JoinColumn(name = "id_discount")
     34    Discount discount;
     35    @ManyToOne
     36    @JoinColumn(name = "id_seat")
     37    Seat seat;
    2938
    3039    public Ticket(long price, Customer customer) {
  • src/main/java/com/example/moviezone/web/HomeController.java

    r2c7a732 r0ba5d1a  
    66
    77import com.example.moviezone.model.manytomany.ProjectionIsPlayedInRoom;
    8 import com.example.moviezone.repository.ProjectionIsPlayedInRoomRepository;
    98
    109import com.example.moviezone.model.procedures.FilmsReturnTable;
     
    1615import org.springframework.web.bind.annotation.*;
    1716
    18 import javax.naming.event.EventDirContext;
    1917import javax.servlet.http.HttpSession;
    2018import javax.transaction.Transactional;
     
    3937private final CinemaPlaysFilmService cinemaPlaysFilmService;
    4038private final ProjectionIsPlayedInRoomService projectionIsPlayedInRoomService;
    41 
    42 
    43     public HomeController(FilmService filmService, UserService userService, ProjectionService projectionService, EventService eventService, TicketService ticketService, WorkerService workerService, CustomerRatesFilmService customerRatesFilmService, CinemaService cinemaService, CinemaOrganizesEventService cinemaOrganizesEventService, CinemaPlaysFilmService cinemaPlaysFilmService, ProjectionIsPlayedInRoomService projectionIsPlayedInRoomService)
     39private final CategoryService categoryService;
     40
     41    public HomeController(FilmService filmService, UserService userService, ProjectionService projectionService, EventService eventService, TicketService ticketService, WorkerService workerService, CustomerRatesFilmService customerRatesFilmService, CinemaService cinemaService, CinemaOrganizesEventService cinemaOrganizesEventService, CinemaPlaysFilmService cinemaPlaysFilmService, ProjectionIsPlayedInRoomService projectionIsPlayedInRoomService, CategoryService categoryService)
    4442    {
    4543
     
    5553        this.cinemaPlaysFilmService = cinemaPlaysFilmService;
    5654        this.projectionIsPlayedInRoomService = projectionIsPlayedInRoomService;
     55        this.categoryService = categoryService;
    5756    }
    5857
     
    9493        model.addAttribute("film",film);
    9594        model.addAttribute("projections",projectionService.getProjectionsForFilms(id.intValue()));
     95        model.addAttribute("categories",categoryService.findAllCategories());
    9696        model.addAttribute("bodyContent", "projectionsForFilm");
    9797
  • src/main/resources/templates/events.html

    r2c7a732 r0ba5d1a  
    184184    .button {
    185185        top:250px;
    186         background-color: white;
     186        background-color: #ff5019;
    187187        border: none;
    188188        color: black;
  • src/main/resources/templates/films.html

    r2c7a732 r0ba5d1a  
    184184    .button {
    185185        top:250px;
    186         background-color: white;
     186        background-color: #ff5019;
    187187        border: none;
    188188        color: black;
  • src/main/resources/templates/projections.html

    r2c7a732 r0ba5d1a  
    184184    .button {
    185185        top:250px;
    186         background-color: white;
     186        background-color: #ff5019;
    187187        border: none;
    188188        color: black;
  • src/main/resources/templates/projectionsForFilm.html

    r2c7a732 r0ba5d1a  
    1010        transform: scale(1.05);
    1111    }
     12    .button {
     13        top:250px;
     14        background-color: #ff5019;
     15        border: none;
     16        color: black;
     17        padding: 10px 20px;
     18        text-align: center;
     19        text-decoration: none;
     20        display: inline-block;
     21        font-size: 16px;
     22        border-radius: 20px;
     23    }
     24    .form-group{
     25        width: 200px;
     26    }
    1227</style>
    1328<h1 style="color: white" th:text="${film.name}"></h1>
     
    1530    <div class="row">
    1631        <div class="col-12 mt-3" style="padding-left:100px;height:75%;">
    17             <div class="card" style=" border-radius: 30px;width:92%;align-self:center">
    18                 <div class="card-horizontal" th:each="projection : ${projections}">
     32            <div class="card" th:each="projection : ${projections}" style=" border-radius: 30px;width:92%;align-self:center">
     33                <div class="card-horizontal" >
    1934                    <div class="card-body">
    2035
     
    3247                <div class="card-footer" style="border-bottom-right-radius:30px;border-bottom-left-radius:30px">
    3348                    <small>
     49                        <form th:action="@{'/home/getSeats/{id}' (id=${film.getId_film()})}"
     50                              th:method="GET">
     51
     52                            <div class="form-group">
     53                                <label style="color: black;font-size: 20px;font-weight: bold">Категорија на седиште</label>
     54                                <select name="id_cinema" class="form-control" id="id_cinema">
     55                                    <option
     56                                            th:each="category : ${categories}"
     57                                            th:value="${category.id_category}"
     58                                            th:text="${category.getName()}">
     59                                    </option>
     60                                </select>
     61
     62                            </div>
     63                            <button class="button" type="submit">Резервирај</button>
     64                        </form>
    3465
    3566                    </small>
Note: See TracChangeset for help on using the changeset viewer.