diff --git a/src/main/java/com/labwork1/app/student/controller/CinemaMvcController.java b/src/main/java/com/labwork1/app/student/controller/CinemaMvcController.java index 4412914..462c9f8 100644 --- a/src/main/java/com/labwork1/app/student/controller/CinemaMvcController.java +++ b/src/main/java/com/labwork1/app/student/controller/CinemaMvcController.java @@ -42,9 +42,9 @@ public class CinemaMvcController { return "cinema-edit"; } - @GetMapping (value = "/search/") + @GetMapping(value = "/search/") public String searchCinema(@RequestParam String request, - Model model) { + Model model) { List cinemas = cinemaService.findAllCinemas(request) .stream().map(CinemaDto::new).toList(); model.addAttribute("cinemas", cinemas); @@ -62,11 +62,11 @@ public class CinemaMvcController { return "cinema-edit"; } if (id == null || id <= 0) { - cinemaDto.setImage("data:image/jpeg;base64," + Base64.getEncoder().encodeToString(multipartFile.getBytes())); + cinemaDto.setImage("data:" + multipartFile.getContentType() + ";base64," + Base64.getEncoder().encodeToString(multipartFile.getBytes())); cinemaService.addCinema(cinemaDto); } else { cinemaDto.setId(id); - cinemaDto.setImage("data:image/jpeg;base64," + Base64.getEncoder().encodeToString(multipartFile.getBytes())); + cinemaDto.setImage("data:" + multipartFile.getContentType() + ";base64," + Base64.getEncoder().encodeToString(multipartFile.getBytes())); cinemaService.updateCinema(cinemaDto); } return "redirect:/cinema"; diff --git a/src/main/java/com/labwork1/app/student/controller/CustomerMvcController.java b/src/main/java/com/labwork1/app/student/controller/CustomerMvcController.java index 104b787..0a48bd2 100644 --- a/src/main/java/com/labwork1/app/student/controller/CustomerMvcController.java +++ b/src/main/java/com/labwork1/app/student/controller/CustomerMvcController.java @@ -25,7 +25,7 @@ public class CustomerMvcController { return "customer"; } - @GetMapping(value = {"/edit", "/edit/{id}"}) + @GetMapping(value = {"/edit", "/edit/{id}"}) public String editCustomer(@PathVariable(required = false) Long id, Model model) { if (id == null || id <= 0) { diff --git a/src/main/java/com/labwork1/app/student/controller/SessionMvcController.java b/src/main/java/com/labwork1/app/student/controller/SessionMvcController.java index e8ccba1..2a52021 100644 --- a/src/main/java/com/labwork1/app/student/controller/SessionMvcController.java +++ b/src/main/java/com/labwork1/app/student/controller/SessionMvcController.java @@ -24,14 +24,13 @@ public class SessionMvcController { @GetMapping public String getSessions(Model model) { - model.addAttribute("sessions", - sessionService.findAllSessions().stream() - .map(SessionDto::new) - .toList()); + model.addAttribute("sessions", sessionService.findAllSessions().stream() + .map(SessionDto::new) + .toList()); return "session"; } - @GetMapping(value = {"/edit", "/edit/{id}"}) + @GetMapping(value = {"/edit", "/edit/{id}"}) public String editSession(@PathVariable(required = false) Long id, Model model) { if (id == null || id <= 0) { @@ -61,7 +60,7 @@ public class SessionMvcController { return "redirect:/session"; } - @PostMapping(value = "/") + @PostMapping(value = "/") public String saveSession(@RequestParam("price") String price, @RequestParam("timestamp") LocalDateTime timestamp, @RequestParam("cinemaid") Long cinemaId, diff --git a/src/main/resources/public/css/style.css b/src/main/resources/public/css/style.css index b0b24a3..48d6ffc 100644 --- a/src/main/resources/public/css/style.css +++ b/src/main/resources/public/css/style.css @@ -5,12 +5,6 @@ body { .green-mark { background-color: #38a65d; } -.willSee { - background-color: #38a65d; -} -.delete { - background-color: #e94049; -} .icon { width: 50px; height: 50px; @@ -18,30 +12,10 @@ body { hr { height: 2px !important; } -.description { - color: #8f9398; -} -.editIcon { - height: 2.5vh; -} -.posterChoiceToTaste { - width: 290px; - height: 437px; -} .posterFilmPage{ width: 290px; height: 437px; } -a { - text-decoration: none; -} -a:hover { - color: white; -} - -.current a { - color: white; -} /* for film-page */ .table { @@ -81,6 +55,10 @@ form input { max-width: 300px; } +form select { + max-width: 300px; +} + table tbody tr td { border: 0px !important; } @@ -101,12 +79,18 @@ header { header a { color: #c2c2c2; + text-decoration: none; } header a:hover { - color: #ffffff; + color: white; + text-decoration: none; } -.mainInput { - max-width: 200px; +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; } \ No newline at end of file diff --git a/src/main/resources/public/search.jpg b/src/main/resources/public/search.jpg deleted file mode 100644 index c0d82e3..0000000 Binary files a/src/main/resources/public/search.jpg and /dev/null differ diff --git a/src/main/resources/templates/cinema-edit.html b/src/main/resources/templates/cinema-edit.html index 5f79ff4..44d0dc7 100644 --- a/src/main/resources/templates/cinema-edit.html +++ b/src/main/resources/templates/cinema-edit.html @@ -5,10 +5,11 @@ +
Фильм
-

Фильм

-
+
diff --git a/src/main/resources/templates/cinema.html b/src/main/resources/templates/cinema.html index 327bb7c..cccc45d 100644 --- a/src/main/resources/templates/cinema.html +++ b/src/main/resources/templates/cinema.html @@ -5,34 +5,38 @@ +
Фильмы
-

Фильмы

-
- - - +
+ + + + +
+ + + +
-
- - -
-
+
diff --git a/src/main/resources/templates/customer-edit.html b/src/main/resources/templates/customer-edit.html index 297ce31..d81d122 100644 --- a/src/main/resources/templates/customer-edit.html +++ b/src/main/resources/templates/customer-edit.html @@ -5,28 +5,28 @@ +
Пользователь
-

Пользователь

-
-
-
- - -
-
- - -
-
- - - Назад - -
- +
+
+
+ + +
+
+ + +
+
+ + + Назад + +
+
\ No newline at end of file diff --git a/src/main/resources/templates/customer.html b/src/main/resources/templates/customer.html index 8e99be3..61985e1 100644 --- a/src/main/resources/templates/customer.html +++ b/src/main/resources/templates/customer.html @@ -5,8 +5,8 @@ +
Пользователи
-

Пользователи

diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index 9af2ebb..d5a05bd 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -8,7 +8,6 @@ - @@ -40,29 +39,19 @@
-

Киносайт

+

+
+
+

-
\ No newline at end of file diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index a7a11f2..1a622e4 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -5,6 +5,7 @@ +
It's works!
ERROR diff --git a/src/main/resources/templates/order-edit.html b/src/main/resources/templates/order-edit.html index eba3a8d..6ff4935 100644 --- a/src/main/resources/templates/order-edit.html +++ b/src/main/resources/templates/order-edit.html @@ -5,12 +5,11 @@ +
Создание заказа
-

Создание заказа

-

Добавление сеансов в заказ

-
+
- - -
-
- - -
-
- - - Назад - -
-
\ No newline at end of file diff --git a/src/main/resources/templates/order.html b/src/main/resources/templates/order.html index 098b315..c2e730d 100644 --- a/src/main/resources/templates/order.html +++ b/src/main/resources/templates/order.html @@ -5,8 +5,8 @@ +
Заказы
${cinema.name}
-
-

- +

+

+

-
- - - - - - - - - - - - - - - -
IDPriceCinemaTimestampCount
- - - - - -
- - - +
+
+ +
- - -
-
+
+ + +
+
+ + + Назад + +
+ + + + + + + + + + + + + + + + + +
IDPriceCinemaTimestampCount
+ + + + + +
+ + + +
+
+ +
+
\ No newline at end of file diff --git a/src/main/resources/templates/session-edit.html b/src/main/resources/templates/session-edit.html index 60be082..d5bb496 100644 --- a/src/main/resources/templates/session-edit.html +++ b/src/main/resources/templates/session-edit.html @@ -5,13 +5,14 @@ +
-

Сеанс

- +
@@ -23,12 +24,14 @@
- - + +
- +