From b54203910ac64a87ed83f3c65cd1de40a0d16a9f Mon Sep 17 00:00:00 2001 From: "gabgutpri@alum.us.es" Date: Mon, 12 Apr 2021 20:05:21 +0200 Subject: [PATCH 1/8] Filtro municipios sin select acabado --- .../springframework/cheapy/model/Client.java | 106 ++++++++++-------- .../cheapy/model/Municipio.java | 7 ++ .../repository/FoodOfferRepository.java | 10 +- .../cheapy/service/FoodOfferService.java | 16 ++- .../cheapy/web/OfertaController.java | 34 +++++- src/main/resources/db/mysql/data.sql | 4 +- .../webapp/WEB-INF/jsp/offers/offersList.jsp | 16 ++- 7 files changed, 131 insertions(+), 62 deletions(-) create mode 100644 src/main/java/org/springframework/cheapy/model/Municipio.java diff --git a/src/main/java/org/springframework/cheapy/model/Client.java b/src/main/java/org/springframework/cheapy/model/Client.java index 41d81ca19..e968f4a10 100644 --- a/src/main/java/org/springframework/cheapy/model/Client.java +++ b/src/main/java/org/springframework/cheapy/model/Client.java @@ -1,3 +1,4 @@ + package org.springframework.cheapy.model; import java.time.LocalTime; @@ -5,6 +6,8 @@ import java.util.List; import javax.persistence.CascadeType; import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; import javax.persistence.JoinColumn; import javax.persistence.OneToMany; import javax.persistence.OneToOne; @@ -19,170 +22,183 @@ import org.springframework.format.annotation.DateTimeFormat; @Table(name = "clients") public class Client extends BaseEntity { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; // (id, name, email, address, init, finish, telephone, description, code, food, // usuar) @NotEmpty - private String name; + private String name; @NotEmpty - private String email; + private String email; @NotEmpty - private String address; + private String address; + + @NotNull + @Enumerated(value = EnumType.STRING) + private Municipio municipio; // Hora de apertura del local @DateTimeFormat(pattern = "HH:mm") @NotNull(message = "Debe introducir una hora de apertura") - private LocalTime init; + private LocalTime init; // Hora de cierre del local @DateTimeFormat(pattern = "HH:mm") @NotNull(message = "Debe introducir una hora de cierre") - private LocalTime finish; + private LocalTime finish; @NotEmpty @Digits(fraction = 0, integer = 10) - private String telephone; + private String telephone; @NotEmpty - private String description; + private String description; // Codigo de activacion de cuenta @NotEmpty - private String code; + private String code; @NotEmpty - private String food; + private String food; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "username", referencedColumnName = "username") - private User usuar; + private User usuar; @OneToMany - private List foodOffers; + private List foodOffers; @OneToMany - private List nuOffers; + private List nuOffers; @OneToMany - private List speedOffers; + private List speedOffers; @OneToMany - private List timeOffers; + private List timeOffers; + public String getName() { - return name; + return this.name; } - public void setName(String name) { + public void setName(final String name) { this.name = name; } public String getEmail() { - return email; + return this.email; } - public void setEmail(String email) { + public void setEmail(final String email) { this.email = email; } public String getAddress() { - return address; + return this.address; } - public void setAddress(String address) { + public void setAddress(final String address) { this.address = address; } - public LocalTime getInit() { - return init; + public Municipio getMunicipio() { + return this.municipio; } - public void setInit(LocalTime init) { + public void setMunicipio(final Municipio municipio) { + this.municipio = municipio; + } + + public LocalTime getInit() { + return this.init; + } + + public void setInit(final LocalTime init) { this.init = init; } public LocalTime getFinish() { - return finish; + return this.finish; } - public void setFinish(LocalTime finish) { + public void setFinish(final LocalTime finish) { this.finish = finish; } public String getTelephone() { - return telephone; + return this.telephone; } - public void setTelephone(String telephone) { + public void setTelephone(final String telephone) { this.telephone = telephone; } public String getDescription() { - return description; + return this.description; } - public void setDescription(String description) { + public void setDescription(final String description) { this.description = description; } public String getCode() { - return code; + return this.code; } - public void setCode(String code) { + public void setCode(final String code) { this.code = code; } public String getFood() { - return food; + return this.food; } - public void setFood(String food) { + public void setFood(final String food) { this.food = food; } public User getUsuar() { - return usuar; + return this.usuar; } - public void setUsuar(User usuar) { + public void setUsuar(final User usuar) { this.usuar = usuar; } public List getFoodOffers() { - return foodOffers; + return this.foodOffers; } - public void setFoodOffers(List foodOffers) { + public void setFoodOffers(final List foodOffers) { this.foodOffers = foodOffers; } public List getNuOffers() { - return nuOffers; + return this.nuOffers; } - public void setNuOffers(List nuOffers) { + public void setNuOffers(final List nuOffers) { this.nuOffers = nuOffers; } public List getSpeedOffers() { - return speedOffers; + return this.speedOffers; } - public void setSpeedOffers(List speedOffers) { + public void setSpeedOffers(final List speedOffers) { this.speedOffers = speedOffers; } public List getTimeOffers() { - return timeOffers; + return this.timeOffers; } - public void setTimeOffers(List timeOffers) { + public void setTimeOffers(final List timeOffers) { this.timeOffers = timeOffers; } -} \ No newline at end of file +} diff --git a/src/main/java/org/springframework/cheapy/model/Municipio.java b/src/main/java/org/springframework/cheapy/model/Municipio.java new file mode 100644 index 000000000..d643f29ed --- /dev/null +++ b/src/main/java/org/springframework/cheapy/model/Municipio.java @@ -0,0 +1,7 @@ + +package org.springframework.cheapy.model; + +public enum Municipio { + Dos_Hermanas, Sevilla + +} diff --git a/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java b/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java index 9a277197d..65682ac84 100644 --- a/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java +++ b/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java @@ -34,13 +34,17 @@ public interface FoodOfferRepository extends PagingAndSortingRepository findFoodOfferActOclByUserId(@Param("id") Integer id); - + @Query("SELECT foodOffer FROM FoodOffer foodOffer WHERE foodOffer.client.name LIKE :name AND foodOffer.status= 'active'") @Transactional(readOnly = true) List findFoodOfferByClientName(String name); - + @Query("SELECT foodOffer FROM FoodOffer foodOffer WHERE foodOffer.client.food LIKE :name AND foodOffer.status= 'active'") @Transactional(readOnly = true) List findFoodOfferByClientFood(String name); - + + @Query("SELECT foodOffer FROM FoodOffer foodOffer WHERE foodOffer.client.municipio =:municip AND foodOffer.status= 'active'") + @Transactional(readOnly = true) + List findFoodOfferByClientPlace(String municip); + } diff --git a/src/main/java/org/springframework/cheapy/service/FoodOfferService.java b/src/main/java/org/springframework/cheapy/service/FoodOfferService.java index eb0a85b14..fe6675191 100644 --- a/src/main/java/org/springframework/cheapy/service/FoodOfferService.java +++ b/src/main/java/org/springframework/cheapy/service/FoodOfferService.java @@ -45,14 +45,18 @@ public class FoodOfferService { public List findFoodOfferActOclByUserId(final int id) { return this.foodOfferRepository.findFoodOfferActOclByUserId(id); } - - public List findFoodOfferByClientName(String name) { - String nameEdit = "%"+name+"%"; + + public List findFoodOfferByClientName(final String name) { + String nameEdit = "%" + name + "%"; return this.foodOfferRepository.findFoodOfferByClientName(nameEdit); } - - public List findFoodOfferByClientFood(String name) { - String nameEdit = "%"+name+"%"; + + public List findFoodOfferByClientFood(final String name) { + String nameEdit = "%" + name + "%"; return this.foodOfferRepository.findFoodOfferByClientFood(nameEdit); } + + public List findFoodOfferByClientPlace(final String municip) { + return this.foodOfferRepository.findFoodOfferByClientPlace(municip); + } } diff --git a/src/main/java/org/springframework/cheapy/web/OfertaController.java b/src/main/java/org/springframework/cheapy/web/OfertaController.java index b2b302cf9..89d4aa4c5 100644 --- a/src/main/java/org/springframework/cheapy/web/OfertaController.java +++ b/src/main/java/org/springframework/cheapy/web/OfertaController.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Map; import org.springframework.cheapy.model.FoodOffer; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.NuOffer; import org.springframework.cheapy.model.SpeedOffer; import org.springframework.cheapy.model.TimeOffer; @@ -52,15 +53,18 @@ public class OfertaController { model.put("speedOfferLs", speedOfferLs); model.put("timeOfferLs", timeOfferLs); + // Añade la lista de municipios al desplegable + model.put("municipios", Municipio.values()); + //Se añade formateador de fecha al modelo model.put("localDateTimeFormat", DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm")); return "offers/offersList"; } - + @GetMapping("/offersByName") - public String processFindFormByName(final Map model, String name) { + public String processFindFormByName(final Map model, final String name) { List foodOfferLs = this.foodOfferService.findFoodOfferByClientName(name); List nuOfferLs = this.nuOfferService.findNuOfferByClientName(name); @@ -71,15 +75,18 @@ public class OfertaController { model.put("speedOfferLs", speedOfferLs); model.put("timeOfferLs", timeOfferLs); + // Añade la lista de municipios al desplegable + model.put("municipios", Municipio.values()); + //Se añade formateador de fecha al modelo model.put("localDateTimeFormat", DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm")); return "offers/offersListSearch"; } - + @GetMapping("/offersByFood") - public String processFindFormByFood(final Map model, String name) { + public String processFindFormByFood(final Map model, final String name) { List foodOfferLs = this.foodOfferService.findFoodOfferByClientFood(name); List nuOfferLs = this.nuOfferService.findNuOfferByClientFood(name); @@ -90,6 +97,25 @@ public class OfertaController { model.put("speedOfferLs", speedOfferLs); model.put("timeOfferLs", timeOfferLs); + // Añade la lista de municipios al desplegable + model.put("municipios", Municipio.values()); + + //Se añade formateador de fecha al modelo + model.put("localDateTimeFormat", DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm")); + + return "offers/offersListSearch"; + + } + + @GetMapping("/offersByPlace") + public String processFindFormByPlace(final Map model, final String municip) { + + List foodOfferLs = this.foodOfferService.findFoodOfferByClientPlace(municip); + model.put("foodOfferLs", foodOfferLs); + + // Añade la lista de municipios al desplegable + model.put("municipios", Municipio.values()); + //Se añade formateador de fecha al modelo model.put("localDateTimeFormat", DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm")); diff --git a/src/main/resources/db/mysql/data.sql b/src/main/resources/db/mysql/data.sql index f32637462..cfc9f4978 100644 --- a/src/main/resources/db/mysql/data.sql +++ b/src/main/resources/db/mysql/data.sql @@ -19,8 +19,8 @@ INSERT INTO usuarios (id, nombre, apellidos, dni, direccion, telefono, email, us INSERT INTO usuarios (id, nombre, apellidos, dni, direccion, telefono, email, username) VALUES (3, 'Lolo', 'Lopez', '25486596L', 'C/Macarena', '690670547' ,'Lolo@gmail.com','lolo'); INSERT INTO usuarios (id, nombre, apellidos, dni, direccion, telefono, email, username) VALUES (4, 'Pepe', 'Lopez', '12456776V', 'C/Macarena', '690670547', 'Pepe@gmail.com','pepe'); -INSERT INTO clients (id, name, email, address, init, finish, telephone, description, code, food, username) VALUES (1,'bar manoli','manoli@gmail.com','C/Betis','10:00:00','22:00:00','608726190', 'description 1', 'code1', 'ESPAÑOLA','manoli'); -INSERT INTO clients (id, name, email, address, init, finish, telephone, description, code, food, username) VALUES (2,'bar david','david@gmail.com','C/Sevilla','09:30:00','22:00:00','608726190', 'description 2', 'code2', 'americana','david'); +INSERT INTO clients (id, name, email, address, municipio, init, finish, telephone, description, code, food, username) VALUES (1,'bar manoli','manoli@gmail.com','C/Betis', 'Sevilla','10:00:00','22:00:00','608726190', 'description 1', 'code1', 'ESPAÑOLA','manoli'); +INSERT INTO clients (id, name, email, address, municipio, init, finish, telephone, description, code, food, username) VALUES (2,'bar david','david@gmail.com', 'C/Sevilla', 'Dos_Hermanas','09:30:00','22:00:00','608726190', 'description 2', 'code2', 'americana','david'); INSERT INTO food_offers(start, end, code, status, client_id, food, discount) VALUES ('2021-08-14 12:00:00', '2021-08-15 12:00:00', 'FO-1', 'inactive', 1, 'macarrones', 15); INSERT INTO food_offers(start, end, code, status, client_id, food, discount) VALUES ('2021-08-15 12:00:00', '2021-08-16 12:00:00', 'FO-2', 'active', 1, 'macarrones con tomate', 10); diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp index 1bef89a39..275ba308b 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp @@ -41,12 +41,20 @@
- +
- + +
+ +
+ +
@@ -67,6 +75,7 @@ + @@ -89,6 +98,9 @@ + + + From 3e9507e9a903319b337a86379d9a7e70f1905108 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Wed, 14 Apr 2021 20:57:50 +0200 Subject: [PATCH 2/8] Arreglo en travis Eliminado "apt-get update" al dar un error inesperado --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4957b38a3..3698c8809 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,6 @@ before_install: - wget -O ~/codacy-coverage-reporter-assembly-latest.jar $(curl https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r .assets[0].browser_download_url) - chmod +x mvnw - mysql -e 'CREATE DATABASE cheapy;' - - sudo apt-get update after_success: - ls - ls target From ec1aa037504b32222dfd1f0f7c21ea28f598d77d Mon Sep 17 00:00:00 2001 From: "gabgutpri@alum.us.es" Date: Thu, 15 Apr 2021 12:57:11 +0200 Subject: [PATCH 3/8] Filtro por municipio --- .../cheapy/repository/FoodOfferRepository.java | 5 +++-- .../cheapy/repository/NuOfferRepository.java | 10 ++++++++-- .../cheapy/repository/SpeedOfferRepository.java | 9 +++++++-- .../cheapy/repository/TimeOfferRepository.java | 9 +++++++-- .../cheapy/service/FoodOfferService.java | 3 ++- .../cheapy/service/NuOfferService.java | 17 +++++++++++------ .../cheapy/service/SpeedOfferService.java | 17 +++++++++++------ .../cheapy/service/TimeOfferService.java | 17 +++++++++++------ .../cheapy/web/OfertaController.java | 13 +++++++++++-- .../webapp/WEB-INF/jsp/offers/offersList.jsp | 13 +++++++------ 10 files changed, 78 insertions(+), 35 deletions(-) diff --git a/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java b/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java index 65682ac84..a2aec96ef 100644 --- a/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java +++ b/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java @@ -4,6 +4,7 @@ package org.springframework.cheapy.repository; import java.util.List; import org.springframework.cheapy.model.FoodOffer; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.StatusOffer; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Query; @@ -43,8 +44,8 @@ public interface FoodOfferRepository extends PagingAndSortingRepository findFoodOfferByClientFood(String name); - @Query("SELECT foodOffer FROM FoodOffer foodOffer WHERE foodOffer.client.municipio =:municip AND foodOffer.status= 'active'") + @Query("SELECT foodOffer FROM FoodOffer foodOffer WHERE foodOffer.client.municipio =:municipio AND foodOffer.status= 'active'") @Transactional(readOnly = true) - List findFoodOfferByClientPlace(String municip); + List findFoodOfferByClientPlace(Municipio municipio); } diff --git a/src/main/java/org/springframework/cheapy/repository/NuOfferRepository.java b/src/main/java/org/springframework/cheapy/repository/NuOfferRepository.java index d5631928e..e6ef658ff 100644 --- a/src/main/java/org/springframework/cheapy/repository/NuOfferRepository.java +++ b/src/main/java/org/springframework/cheapy/repository/NuOfferRepository.java @@ -2,6 +2,8 @@ package org.springframework.cheapy.repository; import java.util.List; + +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.NuOffer; import org.springframework.cheapy.model.StatusOffer; import org.springframework.data.domain.Pageable; @@ -31,12 +33,16 @@ public interface NuOfferRepository extends PagingAndSortingRepository findNuOfferActOclByUserId(@Param("id") Integer id); - + @Query("SELECT nuOffer FROM NuOffer nuOffer WHERE nuOffer.client.name LIKE :name AND nuOffer.status= 'active'") @Transactional(readOnly = true) List findNuOfferByClientName(String name); - + @Query("SELECT nuOffer FROM NuOffer nuOffer WHERE nuOffer.client.food LIKE :name AND nuOffer.status= 'active'") @Transactional(readOnly = true) List findNuOfferByClientFood(String name); + + @Query("SELECT nuOffer FROM NuOffer nuOffer WHERE nuOffer.client.municipio =:municipio AND nuOffer.status= 'active'") + @Transactional(readOnly = true) + List findNuOfferByClientPlace(Municipio municipio); } diff --git a/src/main/java/org/springframework/cheapy/repository/SpeedOfferRepository.java b/src/main/java/org/springframework/cheapy/repository/SpeedOfferRepository.java index b89ce1569..f49dd1469 100644 --- a/src/main/java/org/springframework/cheapy/repository/SpeedOfferRepository.java +++ b/src/main/java/org/springframework/cheapy/repository/SpeedOfferRepository.java @@ -3,6 +3,7 @@ package org.springframework.cheapy.repository; import java.util.List; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.SpeedOffer; import org.springframework.cheapy.model.StatusOffer; import org.springframework.data.domain.Pageable; @@ -34,12 +35,16 @@ public interface SpeedOfferRepository extends PagingAndSortingRepository findSpeedOfferActOclByUserId(@Param("id") Integer id); - + @Query("SELECT speedOffer FROM SpeedOffer speedOffer WHERE speedOffer.client.name LIKE :name AND speedOffer.status= 'active'") @Transactional(readOnly = true) List findSpeedOfferByClientName(String name); - + @Query("SELECT speedOffer FROM SpeedOffer speedOffer WHERE speedOffer.client.food LIKE :name AND speedOffer.status= 'active'") @Transactional(readOnly = true) List findSpeedOfferByClientFood(String name); + + @Query("SELECT speedOffer FROM SpeedOffer speedOffer WHERE speedOffer.client.municipio =:municipio AND speedOffer.status= 'active'") + @Transactional(readOnly = true) + List findSpeedOfferByClientPlace(Municipio municipio); } diff --git a/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java b/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java index b031d789c..e3cdd669d 100644 --- a/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java +++ b/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java @@ -4,6 +4,7 @@ package org.springframework.cheapy.repository; import java.util.List; import org.springframework.cheapy.model.FoodOffer; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.StatusOffer; import org.springframework.cheapy.model.TimeOffer; import org.springframework.data.domain.Pageable; @@ -33,12 +34,16 @@ public interface TimeOfferRepository extends PagingAndSortingRepository findTimeOfferActOclByUserId(@Param("id") Integer id); - + @Query("SELECT timeOffer FROM TimeOffer timeOffer WHERE timeOffer.client.name LIKE :name AND timeOffer.status= 'active'") @Transactional(readOnly = true) List findTimeOfferByClientName(String name); - + @Query("SELECT timeOffer FROM TimeOffer timeOffer WHERE timeOffer.client.food LIKE :name AND timeOffer.status= 'active'") @Transactional(readOnly = true) List findTimeOfferByClientFood(String name); + + @Query("SELECT timeOffer FROM TimeOffer timeOffer WHERE timeOffer.client.municipio =:municipio AND timeOffer.status= 'active'") + @Transactional(readOnly = true) + List findTimeOfferByClientPlace(Municipio municipio); } diff --git a/src/main/java/org/springframework/cheapy/service/FoodOfferService.java b/src/main/java/org/springframework/cheapy/service/FoodOfferService.java index fe6675191..0e4c12e50 100644 --- a/src/main/java/org/springframework/cheapy/service/FoodOfferService.java +++ b/src/main/java/org/springframework/cheapy/service/FoodOfferService.java @@ -5,6 +5,7 @@ import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cheapy.model.FoodOffer; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.StatusOffer; import org.springframework.cheapy.repository.FoodOfferRepository; import org.springframework.dao.DataAccessException; @@ -56,7 +57,7 @@ public class FoodOfferService { return this.foodOfferRepository.findFoodOfferByClientFood(nameEdit); } - public List findFoodOfferByClientPlace(final String municip) { + public List findFoodOfferByClientPlace(final Municipio municip) { return this.foodOfferRepository.findFoodOfferByClientPlace(municip); } } diff --git a/src/main/java/org/springframework/cheapy/service/NuOfferService.java b/src/main/java/org/springframework/cheapy/service/NuOfferService.java index be77144c1..7bf4913b3 100644 --- a/src/main/java/org/springframework/cheapy/service/NuOfferService.java +++ b/src/main/java/org/springframework/cheapy/service/NuOfferService.java @@ -4,6 +4,7 @@ package org.springframework.cheapy.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.NuOffer; import org.springframework.cheapy.model.StatusOffer; import org.springframework.cheapy.repository.NuOfferRepository; @@ -54,14 +55,18 @@ public class NuOfferService { public List findNuOfferActOclByUserId(final int id) { return this.nuOfferRepository.findNuOfferActOclByUserId(id); } - - public List findNuOfferByClientName(String name) { - String nameEdit = "%"+name+"%"; + + public List findNuOfferByClientName(final String name) { + String nameEdit = "%" + name + "%"; return this.nuOfferRepository.findNuOfferByClientName(nameEdit); } - - public List findNuOfferByClientFood(String name) { - String nameEdit = "%"+name+"%"; + + public List findNuOfferByClientFood(final String name) { + String nameEdit = "%" + name + "%"; return this.nuOfferRepository.findNuOfferByClientFood(nameEdit); } + + public List findNuOfferByClientPlace(final Municipio mun) { + return this.nuOfferRepository.findNuOfferByClientPlace(mun); + } } diff --git a/src/main/java/org/springframework/cheapy/service/SpeedOfferService.java b/src/main/java/org/springframework/cheapy/service/SpeedOfferService.java index b9e5ffc2a..aeb2f630d 100644 --- a/src/main/java/org/springframework/cheapy/service/SpeedOfferService.java +++ b/src/main/java/org/springframework/cheapy/service/SpeedOfferService.java @@ -4,6 +4,7 @@ package org.springframework.cheapy.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.SpeedOffer; import org.springframework.cheapy.model.StatusOffer; import org.springframework.cheapy.repository.SpeedOfferRepository; @@ -49,14 +50,18 @@ public class SpeedOfferService { public List findSpeedOfferActOclByUserId(final int id) { return this.speedOfferRepository.findSpeedOfferActOclByUserId(id); } - - public List findSpeedOfferByClientName(String name) { - String nameEdit = "%"+name+"%"; + + public List findSpeedOfferByClientName(final String name) { + String nameEdit = "%" + name + "%"; return this.speedOfferRepository.findSpeedOfferByClientName(nameEdit); } - - public List findSpeedOfferByClientFood(String name) { - String nameEdit = "%"+name+"%"; + + public List findSpeedOfferByClientFood(final String name) { + String nameEdit = "%" + name + "%"; return this.speedOfferRepository.findSpeedOfferByClientFood(nameEdit); } + + public List findSpeedOfferByClientPlace(final Municipio mun) { + return this.speedOfferRepository.findSpeedOfferByClientPlace(mun); + } } diff --git a/src/main/java/org/springframework/cheapy/service/TimeOfferService.java b/src/main/java/org/springframework/cheapy/service/TimeOfferService.java index 4859bca53..68881863b 100644 --- a/src/main/java/org/springframework/cheapy/service/TimeOfferService.java +++ b/src/main/java/org/springframework/cheapy/service/TimeOfferService.java @@ -4,6 +4,7 @@ package org.springframework.cheapy.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.StatusOffer; import org.springframework.cheapy.model.TimeOffer; import org.springframework.cheapy.repository.TimeOfferRepository; @@ -45,14 +46,18 @@ public class TimeOfferService { public List findTimeOfferActOclByUserId(final int id) { return this.timeOfferRepository.findTimeOfferActOclByUserId(id); } - - public List findTimeOfferByClientName(String name) { - String nameEdit = "%"+name+"%"; + + public List findTimeOfferByClientName(final String name) { + String nameEdit = "%" + name + "%"; return this.timeOfferRepository.findTimeOfferByClientName(nameEdit); } - - public List findTimeOfferByClientFood(String name) { - String nameEdit = "%"+name+"%"; + + public List findTimeOfferByClientFood(final String name) { + String nameEdit = "%" + name + "%"; return this.timeOfferRepository.findTimeOfferByClientFood(nameEdit); } + + public List findTimeOfferByClientPlace(final Municipio mun) { + return this.timeOfferRepository.findTimeOfferByClientPlace(mun); + } } diff --git a/src/main/java/org/springframework/cheapy/web/OfertaController.java b/src/main/java/org/springframework/cheapy/web/OfertaController.java index 89d4aa4c5..7a069f3ef 100644 --- a/src/main/java/org/springframework/cheapy/web/OfertaController.java +++ b/src/main/java/org/springframework/cheapy/web/OfertaController.java @@ -5,6 +5,8 @@ import java.time.format.DateTimeFormatter; import java.util.List; import java.util.Map; +import javax.servlet.http.HttpServletRequest; + import org.springframework.cheapy.model.FoodOffer; import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.NuOffer; @@ -108,10 +110,17 @@ public class OfertaController { } @GetMapping("/offersByPlace") - public String processFindFormByPlace(final Map model, final String municip) { + public String processFindFormByPlace(final Map model, final HttpServletRequest request) { + Municipio mun = Municipio.valueOf(request.getParameter("municipio")); - List foodOfferLs = this.foodOfferService.findFoodOfferByClientPlace(municip); + List foodOfferLs = this.foodOfferService.findFoodOfferByClientPlace(mun); + List nuOfferLs = this.nuOfferService.findNuOfferByClientPlace(mun); + List speedOfferLs = this.speedOfferService.findSpeedOfferByClientPlace(mun); + List timeOfferLs = this.timeOfferService.findTimeOfferByClientPlace(mun); model.put("foodOfferLs", foodOfferLs); + model.put("nuOfferLs", nuOfferLs); + model.put("speedOfferLs", speedOfferLs); + model.put("timeOfferLs", timeOfferLs); // Añade la lista de municipios al desplegable model.put("municipios", Municipio.values()); diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp index 275ba308b..56e7fcc83 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp @@ -50,13 +50,14 @@
- - + +
-

From 3f91497ee6df6096f585d286179313ace0890329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20Franco=20S=C3=A1nchez?= <56022165+pabfrasan@users.noreply.github.com> Date: Thu, 15 Apr 2021 21:50:02 +0200 Subject: [PATCH 4/8] =?UTF-8?q?A=C3=B1adido=20las=20estrellas=20a=20las=20?= =?UTF-8?q?rese=C3=B1as?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springframework/cheapy/model/Client.java | 7 ---- src/main/less/cheapy.less | 1 + src/main/less/starRating.less | 40 +++++++++++++++++++ .../jsp/reviews/createOrUpdateReviewForm.jsp | 3 +- .../WEB-INF/jsp/reviews/reviewsList.jsp | 8 +++- .../WEB-INF/jsp/reviews/reviewsShow.jsp | 9 +++-- src/main/webapp/WEB-INF/tags/ratingStar.tag | 37 +++++++++++++++++ src/main/webapp/WEB-INF/tags/showStars.tag | 18 +++++++++ 8 files changed, 111 insertions(+), 12 deletions(-) create mode 100644 src/main/less/starRating.less create mode 100644 src/main/webapp/WEB-INF/tags/ratingStar.tag create mode 100644 src/main/webapp/WEB-INF/tags/showStars.tag diff --git a/src/main/java/org/springframework/cheapy/model/Client.java b/src/main/java/org/springframework/cheapy/model/Client.java index e9f56687d..6f4533166 100644 --- a/src/main/java/org/springframework/cheapy/model/Client.java +++ b/src/main/java/org/springframework/cheapy/model/Client.java @@ -145,13 +145,6 @@ public class Client extends BaseEntity { this.description = description; } - public Municipio getMunicipio() { - return municipio; - } - - public void setMunicipio(Municipio municipio) { - this.municipio = municipio; - } public Code getCode() { return cod; diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less index a6a211767..6e05e3f98 100644 --- a/src/main/less/cheapy.less +++ b/src/main/less/cheapy.less @@ -642,3 +642,4 @@ hr { @import "typography.less"; @import "header.less"; @import "responsive.less"; +@import "starRating.less" diff --git a/src/main/less/starRating.less b/src/main/less/starRating.less new file mode 100644 index 000000000..0cf338fc6 --- /dev/null +++ b/src/main/less/starRating.less @@ -0,0 +1,40 @@ +.rating { + display: flex; + flex-direction: row-reverse; + justify-content: flex-end + } + + .rating>input { + display: none + } + + .rating>label { + position: relative; + width: 1em; + font-size: 200%; + color: #FFD600; + cursor: pointer + } + + .rating>label::before { + content: "\2605"; + position: absolute; + opacity: 0 + } + + .rating>label:hover:before, + .rating>label:hover~label:before { + opacity: 1 !important + } + + .rating>input:checked~label:before { + opacity: 1 + } + + .rating:hover>input:checked~label:before { + opacity: 0.4 + } + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp b/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp index 93f628af0..ac2b3af7a 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp @@ -14,7 +14,8 @@
- + +
diff --git a/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp b/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp index 394e6fbbe..da8323d41 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp @@ -4,6 +4,7 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> @@ -26,6 +27,7 @@ + <%-- --%> @@ -34,7 +36,10 @@ - + + + + @@ -51,6 +56,7 @@ + diff --git a/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp b/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp index b13c31115..bfbf2c3d1 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp @@ -6,25 +6,28 @@ <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>

+ - + + - +
- +
diff --git a/src/main/webapp/WEB-INF/tags/ratingStar.tag b/src/main/webapp/WEB-INF/tags/ratingStar.tag new file mode 100644 index 000000000..6d6bcb83d --- /dev/null +++ b/src/main/webapp/WEB-INF/tags/ratingStar.tag @@ -0,0 +1,37 @@ +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> +<%@ taglib uri = "http://java.sun.com/jsp/jstl/functions" prefix = "fn" %> +<%@ attribute name="name" required="true" rtexprvalue="true" + description="Name of corresponding property in bean object" %> +<%@ attribute name="disabled" required="false" rtexprvalue="true" + description="Disable the input" %> +<%@ attribute name="label" required="true" rtexprvalue="true" + description="Label appears in red color if input is considered as invalid after submission" %> +<%@ attribute name="placeholder" required="false" rtexprvalue="true" + description="Example for input field" %> + + + + +
+ + + +
+
+ + + + + + +
+ + + + ${status.errorMessage} + +
+
+
diff --git a/src/main/webapp/WEB-INF/tags/showStars.tag b/src/main/webapp/WEB-INF/tags/showStars.tag new file mode 100644 index 000000000..f68844d5c --- /dev/null +++ b/src/main/webapp/WEB-INF/tags/showStars.tag @@ -0,0 +1,18 @@ +<%@tag import="com.sun.org.apache.xalan.internal.xsltc.compiler.sym"%> +<%@ tag language="java" pageEncoding="ISO-8859-1"%> +<%@ attribute name="value" required="true" rtexprvalue="true" type="Integer" + description="Number of starts" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> +
+ + +
+ /> + /> + /> + /> + /> +
+ +
From b4bcec89d5c34569bde1523c20adaa5895c6e698 Mon Sep 17 00:00:00 2001 From: "gabgutpri@alum.us.es" Date: Fri, 16 Apr 2021 12:20:47 +0200 Subject: [PATCH 5/8] Solucionado buscar sin municipio --- .../cheapy/web/OfertaController.java | 38 ++++++++++++------- 1 file changed, 24 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/springframework/cheapy/web/OfertaController.java b/src/main/java/org/springframework/cheapy/web/OfertaController.java index 81fdae55e..e203cc1c3 100644 --- a/src/main/java/org/springframework/cheapy/web/OfertaController.java +++ b/src/main/java/org/springframework/cheapy/web/OfertaController.java @@ -2,7 +2,6 @@ package org.springframework.cheapy.web; import java.time.format.DateTimeFormatter; -import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -114,6 +113,17 @@ public class OfertaController { @GetMapping("/offersByPlace") public String processFindFormByPlace(final Map model, final HttpServletRequest request) { + + if (request.getParameter("municipio").equals("") || request.getParameter("municipio").equals(null)) { + // Añade la lista de municipios al desplegable + model.put("municipios", Municipio.values()); + + //Se añade formateador de fecha al modelo + model.put("localDateTimeFormat", DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm")); + + return "redirect:/offers/"; + } + Municipio mun = Municipio.valueOf(request.getParameter("municipio")); List foodOfferLs = this.foodOfferService.findFoodOfferByClientPlace(mun); @@ -161,30 +171,30 @@ public class OfertaController { return "offers/offersCreate"; } - + @GetMapping("/offersRecord") public String processOffersRecordForm(final Map model) { - + Pageable p = PageRequest.of(0, 3); - + Map datos = new HashMap(); - - for(Offer of:this.foodOfferService.findAllFoodOffer(p)) { + + for (Offer of : this.foodOfferService.findAllFoodOffer(p)) { datos.put(of, "food"); } - - for(Offer of:this.nuOfferService.findAllNuOffer(p)) { + + for (Offer of : this.nuOfferService.findAllNuOffer(p)) { datos.put(of, "nu"); } - - for(Offer of:this.speedOfferService.findAllSpeedOffer(p)) { + + for (Offer of : this.speedOfferService.findAllSpeedOffer(p)) { datos.put(of, "speed"); } - - for(Offer of:this.timeOfferService.findAllTimeOffer(p)) { + + for (Offer of : this.timeOfferService.findAllTimeOffer(p)) { datos.put(of, "time"); } - + model.put("datos", datos); //Se añade formateador de fecha al modelo @@ -192,7 +202,7 @@ public class OfertaController { return "offers/offersRecordList"; } - + // @GetMapping("/owners/{ownerId}/edit") // public String initUpdateOwnerForm(@PathVariable("ownerId") int ownerId, Model model) { // Owner owner = this.ownerService.findOwnerById(ownerId); From 0a4db394c2e1e2ddd09ed21ea5b638322bb545a6 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 16 Apr 2021 14:36:28 +0200 Subject: [PATCH 6/8] =?UTF-8?q?Intento=20de=20arreglo=20de=20la=20codifica?= =?UTF-8?q?ci=C3=B3n=20del=20proyecto=20y=20cambio=20en=20algunas=20vistas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../springframework/cheapy/model/Client.java | 13 +-- .../cheapy/model/Municipio.java | 27 +++++- .../cheapy/model/StatusOffer.java | 28 +++++- .../springframework/cheapy/model/Usuario.java | 8 +- .../repository/TimeOfferRepository.java | 4 +- src/main/less/cheapy.less | 62 ++++++++++++- src/main/resources/db/mysql/data.sql | 8 +- .../resources/messages/messages_es.properties | 2 +- .../WEB-INF/jsp/clients/clientActivate.jsp | 4 +- .../WEB-INF/jsp/clients/clientDisable.jsp | 4 +- .../webapp/WEB-INF/jsp/clients/clientShow.jsp | 3 +- .../WEB-INF/jsp/clients/clientsList.jsp | 3 +- .../jsp/clients/createOrUpdateClientForm.jsp | 29 +++--- .../WEB-INF/jsp/clients/restaurantShow.jsp | 3 +- src/main/webapp/WEB-INF/jsp/error.jsp | 2 +- src/main/webapp/WEB-INF/jsp/login.jsp | 9 +- .../food/createOrUpdateFoodOfferForm.jsp | 3 +- .../jsp/offers/food/foodOffersDisable.jsp | 4 +- .../jsp/offers/food/foodOffersList.jsp | 33 +++++-- .../jsp/offers/food/foodOffersShow.jsp | 12 ++- .../WEB-INF/jsp/offers/myOffersList.jsp | 32 +++++-- .../offers/nu/createOrUpdateNuOfferForm.jsp | 9 +- .../WEB-INF/jsp/offers/nu/nuOffersDisable.jsp | 5 +- .../WEB-INF/jsp/offers/nu/nuOffersList.jsp | 32 ++++--- .../WEB-INF/jsp/offers/nu/nuOffersShow.jsp | 13 ++- .../WEB-INF/jsp/offers/offersCreate.jsp | 1 + .../webapp/WEB-INF/jsp/offers/offersList.jsp | 89 ++++++++++++------- .../WEB-INF/jsp/offers/offersListSearch.jsp | 3 +- .../WEB-INF/jsp/offers/offersRecordList.jsp | 3 +- .../speed/createOrUpdateSpeedOfferForm.jsp | 4 +- .../jsp/offers/speed/speedOffersDisable.jsp | 5 +- .../jsp/offers/speed/speedOffersList.jsp | 29 +++--- .../jsp/offers/speed/speedOffersShow.jsp | 12 ++- .../time/createOrUpdateTimeOfferForm.jsp | 3 +- .../jsp/offers/time/timeOffersDisable.jsp | 4 +- .../jsp/offers/time/timeOffersList.jsp | 30 ++++--- .../jsp/offers/time/timeOffersShow.jsp | 12 ++- .../jsp/reviews/createOrUpdateReviewForm.jsp | 12 +-- .../WEB-INF/jsp/reviews/reviewsList.jsp | 28 +++--- .../WEB-INF/jsp/reviews/reviewsShow.jsp | 5 +- .../WEB-INF/jsp/singup/singUpClient.jsp | 39 ++++---- .../webapp/WEB-INF/jsp/singup/singUpUser.jsp | 37 +++++--- .../usuarios/createOrUpdateUsuarioForm.jsp | 3 +- .../WEB-INF/jsp/usuarios/usuariosDisable.jsp | 5 +- .../WEB-INF/jsp/usuarios/usuariosList.jsp | 6 +- .../WEB-INF/jsp/usuarios/usuariosShow.jsp | 4 +- src/main/webapp/WEB-INF/jsp/welcome.jsp | 1 + src/main/webapp/WEB-INF/tags/menu.tag | 2 +- .../webapp/WEB-INF/tags/passwordField.tag | 2 +- 49 files changed, 490 insertions(+), 201 deletions(-) diff --git a/src/main/java/org/springframework/cheapy/model/Client.java b/src/main/java/org/springframework/cheapy/model/Client.java index e9f56687d..2f1e69bc4 100644 --- a/src/main/java/org/springframework/cheapy/model/Client.java +++ b/src/main/java/org/springframework/cheapy/model/Client.java @@ -27,13 +27,13 @@ public class Client extends BaseEntity { // (id, name, email, address, init, finish, telephone, description, code, food, // usuar) - @NotEmpty + @NotEmpty(message="No debe estar vacío") private String name; - @NotEmpty + @NotEmpty(message="No debe estar vacío") private String email; - @NotEmpty + @NotEmpty(message="No debe estar vacío") private String address; @NotNull @@ -145,13 +145,6 @@ public class Client extends BaseEntity { this.description = description; } - public Municipio getMunicipio() { - return municipio; - } - - public void setMunicipio(Municipio municipio) { - this.municipio = municipio; - } public Code getCode() { return cod; diff --git a/src/main/java/org/springframework/cheapy/model/Municipio.java b/src/main/java/org/springframework/cheapy/model/Municipio.java index dd4beecd9..c001e9905 100644 --- a/src/main/java/org/springframework/cheapy/model/Municipio.java +++ b/src/main/java/org/springframework/cheapy/model/Municipio.java @@ -2,5 +2,30 @@ package org.springframework.cheapy.model; public enum Municipio { - Dos_Hermanas, Sevilla + Dos_Hermanas{ + @Override + public String toString() { + return "Dos Hermanas"; + } + + } + + , Sevilla{ + @Override + public String toString() { + return "Sevilla"; + + } + + } + + , Carmona{ + @Override + public String toString() { + return "Carmona"; + + } + + } + } diff --git a/src/main/java/org/springframework/cheapy/model/StatusOffer.java b/src/main/java/org/springframework/cheapy/model/StatusOffer.java index b1b0f874b..931635eb7 100644 --- a/src/main/java/org/springframework/cheapy/model/StatusOffer.java +++ b/src/main/java/org/springframework/cheapy/model/StatusOffer.java @@ -1,5 +1,31 @@ package org.springframework.cheapy.model; public enum StatusOffer { - active, inactive, hidden + active{ + @Override + public String toString() { + return "Activa"; + + } + + } + + , inactive{ + @Override + public String toString() { + return "Inactiva"; + + } + + } + + + , hidden{ + @Override + public String toString() { + return "Oculta"; + + } + + } } diff --git a/src/main/java/org/springframework/cheapy/model/Usuario.java b/src/main/java/org/springframework/cheapy/model/Usuario.java index 9adf0a9ec..359af5189 100644 --- a/src/main/java/org/springframework/cheapy/model/Usuario.java +++ b/src/main/java/org/springframework/cheapy/model/Usuario.java @@ -19,20 +19,20 @@ public class Usuario extends BaseEntity{ private static final long serialVersionUID = 1L; - @NotBlank + @NotBlank(message="No debe estar vacío") private String nombre; - @NotBlank + @NotBlank(message="No debe estar vacío") private String apellidos; - @NotBlank + @NotBlank(message="No debe estar vacío") private String direccion; @Enumerated(value = EnumType.STRING) private Municipio municipio; @Email - @NotBlank + @NotBlank(message="No debe estar vacío") private String email; @OneToOne(cascade = CascadeType.ALL) diff --git a/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java b/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java index e3cdd669d..9d96fe55c 100644 --- a/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java +++ b/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java @@ -13,7 +13,7 @@ import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.Param; import org.springframework.transaction.annotation.Transactional; -public interface TimeOfferRepository extends PagingAndSortingRepository { +public interface TimeOfferRepository extends PagingAndSortingRepository { TimeOffer findTimeOfferById(int timeOfferId); @@ -21,7 +21,7 @@ public interface TimeOfferRepository extends PagingAndSortingRepository findAllTimeOffer(Pageable p); - void save(TimeOffer timeOffer); + //void save(TimeOffer timeOffer); @Query("SELECT timeOffer FROM TimeOffer timeOffer WHERE timeOffer.status =:status") @Transactional(readOnly = true) diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less index a6a211767..da0e89be5 100644 --- a/src/main/less/cheapy.less +++ b/src/main/less/cheapy.less @@ -227,6 +227,7 @@ img.img-responsive{ .btn-filter{ background: rgb(40, 140, 215); color: white; + border: none; } .btn-filter:hover{ @@ -237,6 +238,14 @@ img.img-responsive{ .btn-filter-active{ background: rgb(0, 64, 128); color: white; + border: none; + +} + +.select-municipio{ + padding:10px; + border:solid; + border-color: rgb(0, 64, 128); } @@ -246,6 +255,47 @@ img.img-responsive{ } +.btn-mas{ + background: rgb(40, 140, 215); + color: white; + padding: 10px; + margin:10px; + border: none; +} + +.btn-mas:hover{ + background: rgb(0, 64, 128); + color: white; +} + +.btn-pag{ + background: rgb(40, 140, 215); + color: white; + padding: 10px; + margin:10px; + border: none; +} + +.btn-pag:hover{ + background: rgb(0, 64, 128); + color: white; +} + +.btn-search{ + background: rgb(40, 140, 215); + color: white; + padding: 5px; + margin:10px; + border: none; + border-radius: 30%; +} + +.btn-search:hover{ + background: rgb(0, 64, 128); + color: white; +} + + .btn-home { display: flex; justify-content: center; @@ -339,24 +389,28 @@ img.img-responsive{ } #foodOfferTable th { - width: 20%; + width: 15%; text-align: center; + } #nuOfferTable th { - width: 20%; + width: 15%; text-align: center; +vertical-align: middle; } #speedOfferTable th { - width: 20%; + width: 15%; text-align: center; +vertical-align: middle; } #timeOfferTable th { - width: 20%; + width: 15%; text-align: center; +vertical-align: middle; } .btn-detalles button { diff --git a/src/main/resources/db/mysql/data.sql b/src/main/resources/db/mysql/data.sql index 22b93de26..0c8238235 100644 --- a/src/main/resources/db/mysql/data.sql +++ b/src/main/resources/db/mysql/data.sql @@ -14,10 +14,10 @@ INSERT INTO users (username,password,enabled) VALUES ('pepe','pepe', TRUE ); INSERT INTO authorities (username,authority) VALUES ('pepe','usuario'); -INSERT INTO usuarios (id, nombre, apellidos, direccion, municipio, email, username) VALUES (1, 'admin', 'admin', 'C/admin', 'carmona', 'admin@gmail.com','admin'); -INSERT INTO usuarios (id, nombre, apellidos, direccion, municipio, email, username) VALUES (2, 'Paco', 'Naranjo', 'C/Esperanza', 'sevilla', 'Paco@gmail.com','paco'); -INSERT INTO usuarios (id, nombre, apellidos, direccion, municipio, email, username) VALUES (3, 'Lolo', 'Lopez', 'C/Macarena', 'dos_hermanas', 'Lolo@gmail.com','lolo'); -INSERT INTO usuarios (id, nombre, apellidos, direccion, municipio, email, username) VALUES (4, 'Pepe', 'Lopez', 'C/Macarena', 'carmona', 'Pepe@gmail.com','pepe'); +INSERT INTO usuarios (id, nombre, apellidos, direccion, municipio, email, username) VALUES (1, 'admin', 'admin', 'C/admin', 'Carmona', 'admin@gmail.com','admin'); +INSERT INTO usuarios (id, nombre, apellidos, direccion, municipio, email, username) VALUES (2, 'Paco', 'Naranjo', 'C/Esperanza', 'Sevilla', 'Paco@gmail.com','paco'); +INSERT INTO usuarios (id, nombre, apellidos, direccion, municipio, email, username) VALUES (3, 'Lolo', 'Lopez', 'C/Macarena', 'Dos_Hermanas', 'Lolo@gmail.com','lolo'); +INSERT INTO usuarios (id, nombre, apellidos, direccion, municipio, email, username) VALUES (4, 'Pepe', 'Lopez', 'C/Macarena', 'Carmona', 'Pepe@gmail.com','pepe'); INSERT INTO codes (id,code,activo) VALUES (1,'code1',FALSE); INSERT INTO codes (id,code,activo) VALUES (2,'code2',FALSE); diff --git a/src/main/resources/messages/messages_es.properties b/src/main/resources/messages/messages_es.properties index d93fb4800..68e2c4821 100644 --- a/src/main/resources/messages/messages_es.properties +++ b/src/main/resources/messages/messages_es.properties @@ -1,5 +1,5 @@ welcome=Bienvenido a -new=Nueva +new=Nuevo deleteOffer=Eliminar Oferta cancel=Cancelar deleteOfferMessage=Confirme que quiere eliminar su oferta diff --git a/src/main/webapp/WEB-INF/jsp/clients/clientActivate.jsp b/src/main/webapp/WEB-INF/jsp/clients/clientActivate.jsp index 43b68b4b3..df129da08 100644 --- a/src/main/webapp/WEB-INF/jsp/clients/clientActivate.jsp +++ b/src/main/webapp/WEB-INF/jsp/clients/clientActivate.jsp @@ -5,11 +5,13 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

¿Está seguro de que quiere activar esta cuenta?

+

¿Está seguro de que quiere activar esta cuenta?

diff --git a/src/main/webapp/WEB-INF/jsp/clients/clientDisable.jsp b/src/main/webapp/WEB-INF/jsp/clients/clientDisable.jsp index 2e824727e..d7009da1e 100644 --- a/src/main/webapp/WEB-INF/jsp/clients/clientDisable.jsp +++ b/src/main/webapp/WEB-INF/jsp/clients/clientDisable.jsp @@ -5,11 +5,13 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

¿Está seguro de que quiere eliminar su cuenta?

+

¿Está seguro de que quiere eliminar su cuenta?

diff --git a/src/main/webapp/WEB-INF/jsp/clients/clientShow.jsp b/src/main/webapp/WEB-INF/jsp/clients/clientShow.jsp index 9ccf3f800..44ddce8bc 100644 --- a/src/main/webapp/WEB-INF/jsp/clients/clientShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/clients/clientShow.jsp @@ -5,11 +5,12 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

diff --git a/src/main/webapp/WEB-INF/jsp/clients/clientsList.jsp b/src/main/webapp/WEB-INF/jsp/clients/clientsList.jsp index abb1bc295..de4927126 100644 --- a/src/main/webapp/WEB-INF/jsp/clients/clientsList.jsp +++ b/src/main/webapp/WEB-INF/jsp/clients/clientsList.jsp @@ -5,10 +5,11 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

No hay ningun Cliente.

diff --git a/src/main/webapp/WEB-INF/jsp/clients/createOrUpdateClientForm.jsp b/src/main/webapp/WEB-INF/jsp/clients/createOrUpdateClientForm.jsp index a42dd67c5..91ed84126 100644 --- a/src/main/webapp/WEB-INF/jsp/clients/createOrUpdateClientForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/clients/createOrUpdateClientForm.jsp @@ -5,33 +5,36 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

- + - -
- - -
- - + + + +
+ +
+ +
+
diff --git a/src/main/webapp/WEB-INF/jsp/clients/restaurantShow.jsp b/src/main/webapp/WEB-INF/jsp/clients/restaurantShow.jsp index 150a738bc..9de6c43ed 100644 --- a/src/main/webapp/WEB-INF/jsp/clients/restaurantShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/clients/restaurantShow.jsp @@ -5,11 +5,12 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

diff --git a/src/main/webapp/WEB-INF/jsp/error.jsp b/src/main/webapp/WEB-INF/jsp/error.jsp index 44cc60e51..bdf972f26 100644 --- a/src/main/webapp/WEB-INF/jsp/error.jsp +++ b/src/main/webapp/WEB-INF/jsp/error.jsp @@ -1,7 +1,7 @@ <%@ page session="false" trimDirectiveWhitespaces="true" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> - +<%@ page contentType="text/html; charset=UTF-8" %>

Algo malo ha pasado...

diff --git a/src/main/webapp/WEB-INF/jsp/login.jsp b/src/main/webapp/WEB-INF/jsp/login.jsp index 81bd7c811..5768e9992 100644 --- a/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/src/main/webapp/WEB-INF/jsp/login.jsp @@ -5,6 +5,7 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -284,7 +285,7 @@
-

El usuario y/o la contraseña son incorrectos

+

El usuario y/o la contraseña son incorrectos

@@ -292,16 +293,16 @@
diff --git a/src/main/webapp/WEB-INF/jsp/offers/food/createOrUpdateFoodOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/offers/food/createOrUpdateFoodOfferForm.jsp index 736f83797..6b2044e28 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/food/createOrUpdateFoodOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/food/createOrUpdateFoodOfferForm.jsp @@ -5,10 +5,11 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

diff --git a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersDisable.jsp b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersDisable.jsp index 15a051c8e..3b41f5dbf 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersDisable.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersDisable.jsp @@ -5,11 +5,13 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

¿Está seguro de que quiere eliminar su oferta?

+

¿Está seguro de que quiere eliminar su oferta?

diff --git a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersList.jsp index 1a6a725e8..60c8b1b10 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersList.jsp @@ -5,6 +5,7 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -42,10 +43,10 @@
-

+

:

-

No hay ninguna oferta por plato espec�fico activa.

+

No hay ninguna oferta por plato específico activa.

@@ -57,6 +58,7 @@ + @@ -79,6 +81,9 @@ +
+ + @@ -95,23 +100,33 @@
+
+ +
+
+
- + +
- + +
+ - + +
+
diff --git a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp index bfd854ea4..156da80ed 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/food/foodOffersShow.jsp @@ -5,16 +5,22 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

+

:

+ + + + @@ -31,6 +37,10 @@ + + + + diff --git a/src/main/webapp/WEB-INF/jsp/offers/myOffersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/myOffersList.jsp index 13abd2508..1010010b2 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/myOffersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/myOffersList.jsp @@ -4,12 +4,16 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+ + + +

:

-

No hay ninguna oferta por plato específico creada.

+

No hay ninguna oferta por plato específico creada.

@@ -21,6 +25,7 @@
+ +
@@ -41,6 +46,9 @@ + + @@ -58,9 +66,9 @@
-

+

:

-

No hay ninguna oferta por número de comensales creada.

+

No hay ninguna oferta por número de comensales creada.

@@ -71,6 +79,7 @@ + @@ -90,6 +99,9 @@ + + + @@ -107,7 +119,7 @@
-

+

:

No hay ninguna oferta por tiempo empleado en comer creada.

@@ -120,6 +132,7 @@ + @@ -139,6 +152,9 @@ + + + @@ -157,7 +173,7 @@
-

+

:

No hay ninguna oferta por franja horaria creada.

@@ -170,6 +186,7 @@ + @@ -188,6 +205,9 @@ + + + diff --git a/src/main/webapp/WEB-INF/jsp/offers/nu/createOrUpdateNuOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/offers/nu/createOrUpdateNuOfferForm.jsp index 0200bdc9a..fc9bc9923 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/nu/createOrUpdateNuOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/nu/createOrUpdateNuOfferForm.jsp @@ -5,6 +5,7 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -32,7 +33,7 @@ -

+

@@ -66,11 +67,11 @@ - + - + - + diff --git a/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersDisable.jsp b/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersDisable.jsp index 1071ec5bc..096694a02 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersDisable.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersDisable.jsp @@ -5,11 +5,14 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page contentType="text/html; charset=UTF-8" %> + + -

¿Está seguro de que quiere eliminar su oferta?

+

¿Está seguro de que quiere eliminar su oferta?

diff --git a/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersList.jsp index 1ea94e7c6..94bbaf41a 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersList.jsp @@ -5,6 +5,7 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -15,7 +16,7 @@
+ Ofertas de plato específico @@ -40,9 +41,9 @@ -

+

:

-

No hay ninguna oferta por n�mero de comensales activa.

+

No hay ninguna oferta por número de comensales activa.

@@ -90,22 +91,31 @@
- +
+ +
+ + +
- + +
- + + +
- + +
diff --git a/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersShow.jsp index dd4f68713..4ec023ffc 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/nu/nuOffersShow.jsp @@ -5,15 +5,20 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

+ + + + @@ -50,6 +55,12 @@ + + + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp index a9b2e5d7d..6ee4fda8e 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/offersCreate.jsp @@ -4,6 +4,7 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp index 3f421f8ff..5ba06db6f 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/offersList.jsp @@ -6,6 +6,7 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -46,36 +47,38 @@
-

Búsqueda por nombre del bar/restaurante:

+

Búsqueda por nombre del bar/restaurante:

- -
-

Búsqueda por comida:

+

Búsqueda por tipo de comida:

- -
- - +
+ + +
-

+

:

No hay ninguna oferta por plato específico activa.

@@ -134,19 +137,21 @@ - +
+ +
-

+

:

-

No hay ninguna oferta por n�mero de comensales activa.

+

No hay ninguna oferta por número de comensales activa.

-
+
@@ -156,6 +161,7 @@ + @@ -178,6 +184,9 @@ +
+ + @@ -192,14 +201,16 @@
- +
+ +
-

+

:

No hay ninguna oferta por tiempo empleado en comer activa.

@@ -215,6 +226,7 @@ + @@ -237,6 +249,9 @@ + + + @@ -252,15 +267,17 @@ - - +
+ + +
-

+

:

No hay ninguna oferta por franja horaria activa.

@@ -276,6 +293,7 @@ + @@ -297,6 +315,9 @@ + + + @@ -311,10 +332,12 @@ - - +
+ + +
diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersListSearch.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersListSearch.jsp index 65fc09f67..15f4545ce 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/offersListSearch.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/offersListSearch.jsp @@ -6,6 +6,7 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -13,7 +14,7 @@

-

No hay ninguna oferta por plato específico activa.

+

No hay ninguna oferta por plato específico activa.

diff --git a/src/main/webapp/WEB-INF/jsp/offers/offersRecordList.jsp b/src/main/webapp/WEB-INF/jsp/offers/offersRecordList.jsp index 7598a1ddc..471182217 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/offersRecordList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/offersRecordList.jsp @@ -4,10 +4,11 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

Registro de Ofertas

+

Historial de Ofertas

No hay ninguna oferta creada.

diff --git a/src/main/webapp/WEB-INF/jsp/offers/speed/createOrUpdateSpeedOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/offers/speed/createOrUpdateSpeedOfferForm.jsp index 906baa373..67e14ba71 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/speed/createOrUpdateSpeedOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/speed/createOrUpdateSpeedOfferForm.jsp @@ -5,10 +5,12 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

+

diff --git a/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersDisable.jsp b/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersDisable.jsp index f13e29766..4ebf0512e 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersDisable.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersDisable.jsp @@ -5,11 +5,14 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page contentType="text/html; charset=UTF-8" %> + + -

¿Está seguro de que quiere eliminar su oferta?

+

¿Está seguro de que quiere eliminar su oferta?

diff --git a/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersList.jsp index 76661379a..5f0a64c20 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersList.jsp @@ -5,6 +5,8 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + @@ -15,7 +17,7 @@
+ Ofertas de plato específico @@ -39,7 +41,7 @@ Ofertas de franja horaria -

+

:

No hay ninguna oferta por tiempo empleado en comer activa.

@@ -90,22 +92,29 @@ - +
+ +
+ +
- + +
- + +
- + +
diff --git a/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersShow.jsp index 829621d5e..61a4adb3e 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/speed/speedOffersShow.jsp @@ -5,15 +5,21 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

+

+ + + + @@ -50,6 +56,10 @@ + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/offers/time/createOrUpdateTimeOfferForm.jsp b/src/main/webapp/WEB-INF/jsp/offers/time/createOrUpdateTimeOfferForm.jsp index cc91be345..187c54e96 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/time/createOrUpdateTimeOfferForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/time/createOrUpdateTimeOfferForm.jsp @@ -5,10 +5,11 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

diff --git a/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersDisable.jsp b/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersDisable.jsp index facc40f1a..32721051c 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersDisable.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersDisable.jsp @@ -5,11 +5,13 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

¿Está seguro de que quiere eliminar su oferta?

+

¿Está seguro de que quiere eliminar su oferta?

diff --git a/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersList.jsp b/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersList.jsp index 984ad9ecd..a59648ade 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersList.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersList.jsp @@ -5,6 +5,7 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -15,7 +16,7 @@ + Ofertas de plato específico @@ -40,7 +41,7 @@
-

+

:

No hay ninguna oferta por franja horaria activa.

@@ -90,22 +91,29 @@ - +
+ +
+ +
- + +
- + - +
+ - + +
diff --git a/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersShow.jsp b/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersShow.jsp index 9fccf28f4..a1307692d 100644 --- a/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/offers/time/timeOffersShow.jsp @@ -5,15 +5,21 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

+

:

+ + + + @@ -38,6 +44,10 @@ + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp b/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp index 93f628af0..ae1b43151 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp @@ -5,15 +5,17 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

- Nueva Reseña +

+ Nueva Reseña

- +
@@ -23,10 +25,10 @@ + Crear reseña - +
diff --git a/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp b/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp index 394e6fbbe..c443cbd10 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp @@ -4,10 +4,11 @@ <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

@@ -22,7 +23,7 @@ - + @@ -56,21 +57,28 @@
- +
+ +
+ +
- + +
- + +
- + +
diff --git a/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp b/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp index b13c31115..a63ebe277 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp @@ -5,11 +5,12 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

@@ -35,7 +36,7 @@ + Editar opinión diff --git a/src/main/webapp/WEB-INF/jsp/singup/singUpClient.jsp b/src/main/webapp/WEB-INF/jsp/singup/singUpClient.jsp index 124ed5701..995214f4d 100644 --- a/src/main/webapp/WEB-INF/jsp/singup/singUpClient.jsp +++ b/src/main/webapp/WEB-INF/jsp/singup/singUpClient.jsp @@ -6,6 +6,7 @@ <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -273,31 +274,25 @@ -

+
+

+
- -
- - -
+ - - @@ -305,11 +300,23 @@ name="food" /> - - - +
+ +
+ +
+
+
+ +
diff --git a/src/main/webapp/WEB-INF/jsp/singup/singUpUser.jsp b/src/main/webapp/WEB-INF/jsp/singup/singUpUser.jsp index a2127d97f..7736671d2 100644 --- a/src/main/webapp/WEB-INF/jsp/singup/singUpUser.jsp +++ b/src/main/webapp/WEB-INF/jsp/singup/singUpUser.jsp @@ -6,6 +6,7 @@ <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> @@ -273,33 +274,41 @@ -

- +
+

+

+
+ id="add-user-form">
- -
- - -
+ - - +
+ +
+ +
+
+
+ +
diff --git a/src/main/webapp/WEB-INF/jsp/usuarios/createOrUpdateUsuarioForm.jsp b/src/main/webapp/WEB-INF/jsp/usuarios/createOrUpdateUsuarioForm.jsp index ecfc2e070..65bee26ca 100644 --- a/src/main/webapp/WEB-INF/jsp/usuarios/createOrUpdateUsuarioForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/usuarios/createOrUpdateUsuarioForm.jsp @@ -5,10 +5,11 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> -

+

diff --git a/src/main/webapp/WEB-INF/jsp/usuarios/usuariosDisable.jsp b/src/main/webapp/WEB-INF/jsp/usuarios/usuariosDisable.jsp index 6c04207c7..d1b108ec4 100644 --- a/src/main/webapp/WEB-INF/jsp/usuarios/usuariosDisable.jsp +++ b/src/main/webapp/WEB-INF/jsp/usuarios/usuariosDisable.jsp @@ -5,11 +5,14 @@ <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ page contentType="text/html; charset=UTF-8" %> + + -

¿Está seguro de que quiere eliminar su cuenta?

+

¿Está seguro de que quiere eliminar su cuenta?

diff --git a/src/main/webapp/WEB-INF/jsp/usuarios/usuariosList.jsp b/src/main/webapp/WEB-INF/jsp/usuarios/usuariosList.jsp index e1c56b62e..0c76a79da 100644 --- a/src/main/webapp/WEB-INF/jsp/usuarios/usuariosList.jsp +++ b/src/main/webapp/WEB-INF/jsp/usuarios/usuariosList.jsp @@ -5,13 +5,15 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

+

-

No hay ningún usuario.

+

No hay ningún usuario.

diff --git a/src/main/webapp/WEB-INF/jsp/usuarios/usuariosShow.jsp b/src/main/webapp/WEB-INF/jsp/usuarios/usuariosShow.jsp index ae1cb8d4c..18f53193f 100644 --- a/src/main/webapp/WEB-INF/jsp/usuarios/usuariosShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/usuarios/usuariosShow.jsp @@ -5,11 +5,13 @@ <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + -

+

diff --git a/src/main/webapp/WEB-INF/jsp/welcome.jsp b/src/main/webapp/WEB-INF/jsp/welcome.jsp index 18a6e579c..e35be5a75 100644 --- a/src/main/webapp/WEB-INF/jsp/welcome.jsp +++ b/src/main/webapp/WEB-INF/jsp/welcome.jsp @@ -7,6 +7,7 @@ <%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %>

diff --git a/src/main/webapp/WEB-INF/tags/menu.tag b/src/main/webapp/WEB-INF/tags/menu.tag index 4ed9e3984..fcb62075c 100644 --- a/src/main/webapp/WEB-INF/tags/menu.tag +++ b/src/main/webapp/WEB-INF/tags/menu.tag @@ -57,7 +57,7 @@ - Registro de ofertas + Historial de ofertas + + +
+
+
+ + + + + + + + +
+
+
+ + + + +
diff --git a/src/main/webapp/WEB-INF/jsp/reviewsClient/reviewsList.jsp b/src/main/webapp/WEB-INF/jsp/reviewsClient/reviewsList.jsp new file mode 100644 index 000000000..606ba90c9 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/reviewsClient/reviewsList.jsp @@ -0,0 +1,93 @@ +<%@ page session="false" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> +<%@ page contentType="text/html; charset=UTF-8" %> + + + + +

+ +
+ + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + + + + + + + + +
+ + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+ + + + + +
+
+ + +
+ + + + + +
+
+
diff --git a/src/main/webapp/WEB-INF/jsp/reviewsClient/reviewsShow.jsp b/src/main/webapp/WEB-INF/jsp/reviewsClient/reviewsShow.jsp new file mode 100644 index 000000000..094bab485 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/reviewsClient/reviewsShow.jsp @@ -0,0 +1,52 @@ +<%@ page session="false" trimDirectiveWhitespaces="true" %> +<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> +<%@ taglib prefix="cheapy" tagdir="/WEB-INF/tags" %> +<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %> +<%@ page contentType="text/html; charset=UTF-8" %> + +<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %> + + + + +

+ + + + + + + + + + + + + + + + +
+ +
+ + + +
+ + + + + + + + +
+
+ +
diff --git a/src/main/webapp/WEB-INF/tags/showStars.tag b/src/main/webapp/WEB-INF/tags/showStars.tag index f68844d5c..1fb11cb10 100644 --- a/src/main/webapp/WEB-INF/tags/showStars.tag +++ b/src/main/webapp/WEB-INF/tags/showStars.tag @@ -2,11 +2,14 @@ <%@ tag language="java" pageEncoding="ISO-8859-1"%> <%@ attribute name="value" required="true" rtexprvalue="true" type="Integer" description="Number of starts" %> +<%@ attribute name="label" required="false" rtexprvalue="true" + description="Label appears in red color if input is considered as invalid after submission" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
- - + + +
/> />