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 diff --git a/src/main/java/org/springframework/cheapy/model/Client.java b/src/main/java/org/springframework/cheapy/model/Client.java index f55f91214..2f1e69bc4 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; @@ -21,131 +22,129 @@ 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; + @NotEmpty(message="No debe estar vacío") + private String name; - @NotEmpty - private String email; + @NotEmpty(message="No debe estar vacío") + private String email; + + @NotEmpty(message="No debe estar vacío") + private String address; - @NotEmpty - private String address; - - @Enumerated(value = EnumType.STRING) @NotNull - private Municipio municipio; + @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; - - // Codigo de activacion de cuenta -// @NotEmpty -// private String code; + private String description; @NotEmpty - private String food; + private String food; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "username", referencedColumnName = "username") - private User usuar; + private User usuar; @OneToOne(cascade = CascadeType.ALL) @JoinColumn(name = "code", referencedColumnName = "code") private Code cod; @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 Municipio getMunicipio() { - return municipio; - } - - public void setMunicipio(Municipio municipio) { - this.municipio = municipio; - } public Code getCode() { return cod; @@ -156,51 +155,51 @@ public class Client extends BaseEntity { } 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 index 95d1230d1..c001e9905 100644 --- a/src/main/java/org/springframework/cheapy/model/Municipio.java +++ b/src/main/java/org/springframework/cheapy/model/Municipio.java @@ -1,5 +1,31 @@ + package org.springframework.cheapy.model; public enum Municipio { -sevilla,dos_hermanas,carmona,bollullos,pilas,montellano,mairena_aljarafe,mairena_alcor + 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/ReviewClient.java b/src/main/java/org/springframework/cheapy/model/ReviewClient.java new file mode 100644 index 000000000..8fe0176f6 --- /dev/null +++ b/src/main/java/org/springframework/cheapy/model/ReviewClient.java @@ -0,0 +1,67 @@ +package org.springframework.cheapy.model; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; +import javax.persistence.Table; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +import org.hibernate.validator.constraints.Range; + +@Entity +@Table(name = "review_client") +public class ReviewClient extends BaseEntity{ + +private static final long serialVersionUID = 1L; + + @NotBlank(message = "Debe rellenar la valoración sobre el bar") + @Column(length=16777215) + private String opinion; + + @NotNull(message= "Por favor rellene este campo") + @Range(min = 1, max = 5,message="Las estrellas deben ir entre 1 y 5") + private Integer stars; + + @ManyToOne + @JoinColumn(name = "username", referencedColumnName = "username") + private User escritor; + + @ManyToOne + @JoinColumn(name = "client", referencedColumnName = "id") + private Client bar; + + public User getEscritor() { + return escritor; + } + + public Client getBar() { + return bar; + } + + public void setBar(Client bar) { + this.bar = bar; + } + + public void setEscritor(User escritor) { + this.escritor = escritor; + } + + public String getOpinion() { + return opinion; + } + + public void setOpinion(String opinion) { + this.opinion = opinion; + } + + public Integer getStars() { + return stars; + } + + public void setStars(Integer stars) { + this.stars = stars; + } + +} 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/FoodOfferRepository.java b/src/main/java/org/springframework/cheapy/repository/FoodOfferRepository.java index 9a277197d..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; @@ -34,13 +35,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 =:municipio AND foodOffer.status= 'active'") + @Transactional(readOnly = true) + 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/ReviewClientRepository.java b/src/main/java/org/springframework/cheapy/repository/ReviewClientRepository.java new file mode 100644 index 000000000..443bbf839 --- /dev/null +++ b/src/main/java/org/springframework/cheapy/repository/ReviewClientRepository.java @@ -0,0 +1,19 @@ +package org.springframework.cheapy.repository; + +import java.util.List; + +import org.springframework.cheapy.model.Client; +import org.springframework.cheapy.model.ReviewClient; +import org.springframework.data.domain.Pageable; +import org.springframework.data.repository.PagingAndSortingRepository; + +public interface ReviewClientRepository extends PagingAndSortingRepository { + + List findByBar(String bar); + + List findAllReviewClientByBar(Pageable p, Client client); + + List findAllReviewClientByBar(Client client); + + ReviewClient findReviewClientById(int id); +} 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 f8ebcfc52..02c222f72 100644 --- a/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java +++ b/src/main/java/org/springframework/cheapy/repository/TimeOfferRepository.java @@ -3,6 +3,9 @@ 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; @@ -12,11 +15,12 @@ import org.springframework.data.repository.query.Param; import org.springframework.transaction.annotation.Transactional; public interface TimeOfferRepository extends PagingAndSortingRepository { - + @Query("SELECT timeOffer FROM TimeOffer timeOffer WHERE timeOffer.id =:id") @Transactional(readOnly = true) TimeOffer findTimeOfferById(int id); + @Query("SELECT timeOffer FROM TimeOffer timeOffer") @Transactional(readOnly = true) List findAllTimeOffer(Pageable p); @@ -34,12 +38,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/ClientService.java b/src/main/java/org/springframework/cheapy/service/ClientService.java index e65eec3a7..05b84400a 100644 --- a/src/main/java/org/springframework/cheapy/service/ClientService.java +++ b/src/main/java/org/springframework/cheapy/service/ClientService.java @@ -7,9 +7,11 @@ import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cheapy.model.Client; import org.springframework.cheapy.model.Code; +import org.springframework.cheapy.model.ReviewClient; import org.springframework.cheapy.model.Usuario; import org.springframework.cheapy.repository.ClientRepository; import org.springframework.cheapy.repository.CodeRepository; +import org.springframework.cheapy.repository.ReviewClientRepository; import org.springframework.dao.DataAccessException; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; @@ -21,11 +23,13 @@ public class ClientService { private ClientRepository clientRepository; private CodeRepository codeRepository; + private ReviewClientRepository reviewRepositoy; @Autowired - public ClientService(final ClientRepository clientRepository, CodeRepository codeRepository) { + public ClientService(final ClientRepository clientRepository, CodeRepository codeRepository, ReviewClientRepository reviewRepositoy) { this.clientRepository = clientRepository; this.codeRepository = codeRepository; + this.reviewRepositoy = reviewRepositoy; } @Transactional @@ -57,4 +61,13 @@ public class ClientService { public List findAllClient() throws DataAccessException { return this.clientRepository.findAllClient(); } + + public Integer mediaValoraciones(Client client) { + List valoraciones =this.reviewRepositoy.findAllReviewClientByBar(client); + if(valoraciones.size()!=0) { + return Integer.valueOf( (int) valoraciones.stream().mapToInt(x->x.getStars()).average().getAsDouble()); + }else { + return 0; + } + } } diff --git a/src/main/java/org/springframework/cheapy/service/FoodOfferService.java b/src/main/java/org/springframework/cheapy/service/FoodOfferService.java index 06c249351..861d237ff 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; @@ -45,14 +46,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 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/ReviewClientService.java b/src/main/java/org/springframework/cheapy/service/ReviewClientService.java new file mode 100644 index 000000000..9bcf2e0f8 --- /dev/null +++ b/src/main/java/org/springframework/cheapy/service/ReviewClientService.java @@ -0,0 +1,41 @@ +package org.springframework.cheapy.service; + +import java.util.List; + +import javax.transaction.Transactional; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cheapy.model.Client; +import org.springframework.cheapy.model.Review; +import org.springframework.cheapy.model.ReviewClient; +import org.springframework.cheapy.repository.ReviewClientRepository; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Service; + +@Service +public class ReviewClientService { + + private ReviewClientRepository repo; + + @Autowired + public ReviewClientService(ReviewClientRepository repo) { + super(); + this.repo = repo; + } + @Transactional + public void saveReview(final ReviewClient entity) { + this.repo.save(entity); + } + @Transactional + public List findByClient(String idClient){ + return this.repo.findByBar(idClient); + } + + public ReviewClient findReviewById(int reviewId) { + return this.repo.findReviewClientById(reviewId); + } + public List findAllReviewsByBar(Pageable p, Client client) { + + return this.repo.findAllReviewClientByBar(p, client); + } +} 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/ClientController.java b/src/main/java/org/springframework/cheapy/web/ClientController.java index 7bc63dbc7..a195802ac 100644 --- a/src/main/java/org/springframework/cheapy/web/ClientController.java +++ b/src/main/java/org/springframework/cheapy/web/ClientController.java @@ -161,9 +161,11 @@ public class ClientController { } @GetMapping(value = "/restaurant/{clientId}") public String showRestaurant(final ModelMap model, @PathVariable("clientId") Integer id) { - + Client client = this.clientRepo.findById(id).get(); + Integer valoraciones=this.clientService.mediaValoraciones(client); model.put("client", client); + model.put("reviews", valoraciones); return "clients/restaurantShow"; } } diff --git a/src/main/java/org/springframework/cheapy/web/OfertaController.java b/src/main/java/org/springframework/cheapy/web/OfertaController.java index 39ec7c0d8..48b3572f1 100644 --- a/src/main/java/org/springframework/cheapy/web/OfertaController.java +++ b/src/main/java/org/springframework/cheapy/web/OfertaController.java @@ -2,12 +2,14 @@ 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; +import javax.servlet.http.HttpServletRequest; + import org.springframework.cheapy.model.FoodOffer; +import org.springframework.cheapy.model.Municipio; import org.springframework.cheapy.model.NuOffer; import org.springframework.cheapy.model.Offer; import org.springframework.cheapy.model.SpeedOffer; @@ -55,15 +57,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); @@ -74,15 +79,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); @@ -93,6 +101,43 @@ 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 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); + 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()); + //Se añade formateador de fecha al modelo model.put("localDateTimeFormat", DateTimeFormatter.ofPattern("dd/MM/yyyy HH:mm")); @@ -126,7 +171,7 @@ public class OfertaController { return "offers/offersCreate"; } - + // @GetMapping("/owners/{ownerId}/edit") // public String initUpdateOwnerForm(@PathVariable("ownerId") int ownerId, Model model) { // Owner owner = this.ownerService.findOwnerById(ownerId); diff --git a/src/main/java/org/springframework/cheapy/web/ReviewClientController.java b/src/main/java/org/springframework/cheapy/web/ReviewClientController.java new file mode 100644 index 000000000..7e8a925fc --- /dev/null +++ b/src/main/java/org/springframework/cheapy/web/ReviewClientController.java @@ -0,0 +1,139 @@ +package org.springframework.cheapy.web; + +import java.util.List; +import java.util.Map; + +import javax.validation.Valid; + +import org.springframework.cheapy.model.Client; +import org.springframework.cheapy.model.Review; +import org.springframework.cheapy.model.ReviewClient; +import org.springframework.cheapy.model.User; +import org.springframework.cheapy.service.ClientService; +import org.springframework.cheapy.service.ReviewClientService; +import org.springframework.cheapy.service.UserService; +import org.springframework.data.domain.PageRequest; +import org.springframework.data.domain.Pageable; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +import net.bytebuddy.asm.Advice.This; + +@Controller +public class ReviewClientController { + + private static final String VIEWS_REVIEWS_CREATE_OR_UPDATE_FORM = "reviewsClient/createOrUpdateReviewForm"; + private final ReviewClientService reviewService; + private final UserService userService; + private final ClientService clientService; + + public ReviewClientController(ReviewClientService reviewService, UserService userService, ClientService clientService) { + super(); + this.clientService = clientService; + this.reviewService = reviewService; + this.userService = userService; + } + + private boolean checkIdentity(final int reviewId) { + boolean res = false; + User user = this.userService.getCurrentUser(); + ReviewClient review = this.reviewService.findReviewById(reviewId); + User reviewsAuthor = review.getEscritor(); + if (user.equals(reviewsAuthor)) { + res = true; + } + return res; + } + + private boolean checkClient(final String client) { + User user = this.userService.getCurrentUser(); + Client bar = this.clientService.findByUsername(client); + return (bar == null||user==null)? false: true; + } + @GetMapping("/reviewsClient/new/{idClient}") + public String initCreationForm(final Map model, @PathVariable("idClient") final String idClient) { + if(!checkClient(idClient)) { + return "error"; + } + + ReviewClient review = new ReviewClient(); + + model.put("review", review); + return ReviewClientController.VIEWS_REVIEWS_CREATE_OR_UPDATE_FORM; + } + + @PostMapping("/reviewsClient/new/{idClient}") + public String processCreationForm(@Valid final ReviewClient review, @PathVariable("idClient") final String idClient,final BindingResult result) { + if (result.hasErrors()) { + return ReviewClientController.VIEWS_REVIEWS_CREATE_OR_UPDATE_FORM; + } else { + User escritor = this.userService.getCurrentUser(); + review.setEscritor(escritor); + Client bar = this.clientService.findByUsername(idClient); + review.setBar(bar); + + this.reviewService.saveReview(review); + return "redirect:/reviewsClient/" + review.getId(); + } + } + + @GetMapping("/reviewsClient/{reviewId}") + public String processShowForm(@PathVariable("reviewId") final int reviewId, final Map model) { + ReviewClient review = this.reviewService.findReviewById(reviewId); + + model.put("review", review); + + return "reviewsClient/reviewsShow"; + + } + @GetMapping("/reviewsClientList/{idClient}/{page}") + public String processFindForm(@PathVariable("page") final int page, @PathVariable("idClient") final String idClient, final Map model) { + Pageable elements = PageRequest.of(page, 6); + Client client = this.clientService.findByUsername(idClient); + + List reviewsLs = this.reviewService.findAllReviewsByBar(elements,client); + model.put("reviewsLs", reviewsLs); + model.put("client", idClient); + + return "reviewsClient/reviewsList"; + + } + + @GetMapping("/reviewsClient/{reviewId}/edit") + public String updateReviewInit(@PathVariable("reviewId") final int reviewId, final ModelMap model) { + if (!this.checkIdentity(reviewId)) { + return "error"; + } + ReviewClient review = this.reviewService.findReviewById(reviewId); + + model.addAttribute("review", review); + return ReviewClientController.VIEWS_REVIEWS_CREATE_OR_UPDATE_FORM; + } + + @PostMapping("/reviewsClient/{reviewId}/edit") + public String updateReviewPost(@Valid final ReviewClient reviewEdit, final BindingResult result, final ModelMap model) { + if (!this.checkIdentity(reviewEdit.getId())) { + return "error"; + } + if (result.hasErrors()) { + model.addAttribute("review", reviewEdit); + return ReviewClientController.VIEWS_REVIEWS_CREATE_OR_UPDATE_FORM; + + } else { + Client bar = this.reviewService.findReviewById(reviewEdit.getId()).getBar(); + User escritor = this.userService.getCurrentUser(); + reviewEdit.setEscritor(escritor); + reviewEdit.setBar(bar); + + this.reviewService.saveReview(reviewEdit); + return "redirect:/reviewsClient/" + reviewEdit.getId(); + } + + } + + +} diff --git a/src/main/less/cheapy.less b/src/main/less/cheapy.less index a6a211767..a2324b005 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 { @@ -642,3 +696,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/resources/db/mysql/data.sql b/src/main/resources/db/mysql/data.sql index 39ba10cab..995fd0cb6 100644 --- a/src/main/resources/db/mysql/data.sql +++ b/src/main/resources/db/mysql/data.sql @@ -14,18 +14,18 @@ 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); INSERT INTO codes (id,code,activo) VALUES (3,'code3',TRUE); INSERT INTO codes (id,code,activo) VALUES (4,'code4',TRUE); -INSERT INTO clients (id, name, email, address, municipio, init, finish, telephone, description, food, username, code) VALUES (1,'bar manoli','manoli@gmail.com','C/Betis', 'sevilla','10:00','22:00','608726190', 'description 1', 'ESPAÑOLA','manoli', 'code1'); -INSERT INTO clients (id, name, email, address, municipio, init, finish, telephone, description, food, username, code) VALUES (2,'bar david','david@gmail.com','C/Sevilla', 'dos_hermanas','09:30','22:00','608726190', 'description 2', 'americana','david', 'code2'); +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); @@ -63,3 +63,14 @@ INSERT INTO nu_offers(start, end, code, status, client_id, gold, discount_gold, INSERT INTO nu_offers(start, end, code, status, client_id, gold, discount_gold, silver, discount_silver, bronze, discount_bronze) VALUES ('2021-08-15 12:00:00', '2021-08-16 12:00:00', 'NU-6', 'active',2,20,30,15,10,10,5); INSERT INTO nu_offers(start, end, code, status, client_id, gold, discount_gold, silver, discount_silver, bronze, discount_bronze) VALUES ('2021-08-15 12:00:00', '2021-08-16 12:00:00', 'NU-7', 'active',2,20,35,15,15,10,5); INSERT INTO nu_offers(start, end, code, status, client_id, gold, discount_gold, silver, discount_silver, bronze, discount_bronze) VALUES ('2021-08-16 12:00:00', '2021-08-17 12:00:00', null, 'hidden',1,15,25,10,15,5,10); + +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('Es un bar muy bueno para ir a comer',5,'paco',1); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('Las ofertas eran buenas pero el servicio mejorable',2,'lolo',1); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('Nos trataron genial a mi y a mi amigo',4,'pepe',1); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('Abren a todas horas!!!',5,'paco',1); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('La comida de hoy estaba muy rica',4,'lolo',1); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('Recomiendo ir por la noche, tiene muy buenas vistas',4,'pepe',1); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('No retrasmiten futbol',1,'pepe',1); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('Un sitio perfecto para llevar a tu pareja',5,'paco',2); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('En hora punta nunca hay sitio',2,'lolo',2); +INSERT INTO review_client(opinion, stars, username, client ) VALUES ('Fui una vez por probar y ahora voy todas las tardes',4,'pepe',2); \ No newline at end of file diff --git a/src/main/resources/messages/messages.properties b/src/main/resources/messages/messages.properties index 1947d786c..68e2c4821 100644 --- a/src/main/resources/messages/messages.properties +++ b/src/main/resources/messages/messages.properties @@ -1,10 +1,73 @@ -welcome=Welcome to -listOffers=List Offers - -required=is required -notFound=has not been found -duplicate=is already in use -nonNumeric=must be all numeric -duplicateFormSubmission=Duplicate form submission is not allowed -typeMismatch.date=invalid date -typeMismatch.birthDate=invalid date +welcome=Bienvenido a +new=Nuevo +deleteOffer=Eliminar Oferta +cancel=Cancelar +deleteOfferMessage=Confirme que quiere eliminar su oferta +listOffers=Ver Ofertas +createOffers=Crear Ofertas +foodOffers=Ofertas por plato específico +foodOffer=Oferta por plato específico +nuOffers=Ofertas por número de comensales +nuOffer=Oferta por número de comensales +speedOffers=Ofertas por tiempo empleado en comer +speedOffer=Oferta por tiempo empleado en comer +timeOffers=Ofertas por franja horaria +timeOffer=Oferta por franja horaria +food=Plato +foodInOffer=Plato en oferta +cuantity=Cantidad +discount=Descuento +goldGoal=Meta oro +goldDiscount=Descuento oro +silverGoal=Meta plata +silverDiscount=Descuento plata +bronzeGoal=Meta bronce +bronzeDiscount=Descuento bronce +startDate=Fecha de inicio +offerBeginning=Inicio de la oferta +endDate=Fecha de fin +offerEnding=Fin de la oferta +details=Detalles +offerCode=Código de la oferta +return=Volver +required=Es requerido +notFound=No ha sido encontrado +duplicate=Ya se encuentra en uso +nonNumeric=Solo debe contener números +duplicateFormSubmission=No se permite el envío de formularios duplicados +typeMismatch.date=Fecha inválida +typeMismatch.birthDate=Fecha inválida +review= Reseña +reviews= Reseñas +stars= Estrellas +opinion= Opinión +user = Nombre de usuario +createFoodOffers= Crear ofertas por plato específico +createNuOffers= Crear ofertas por número de comensales +createSpeedOffers= Crear ofertas por rapidez comiendo +createTimeOffers= Crear ofertas por franja horaria +init= Inicio del intervalo +finishOffer= Fin del intervalo +name= Nombre del bar/restaurante +status= Estado de oferta +myOffers= Ver mis Ofertas +typeMismatch=Debe ser del formato correcto +typeMismatch.java.lang.Integer=Debe ser un número +typeMismatch.java.time.LocalDateTime=Debe ser una fecha válida +typeMismatch.java.time.LocalTime=Debe ser una hora válida +clientShow= Información del bar/restaurante +client= Cliente +clients= Clientes +email=Dirección de correo electrónico +addressClient= Dirección del bar/restaurante +addressUser= Dirección del usuario +telephone= Número de teléfono +descriptionClient= Descripción del bar/restaurante +foodClient= Tipo de comida +enabled= ¿Está activo el usuario? +users=Usuarios +nameUser=Nombre +surname= Apellidos +dni= DNI +usuario=Usuario +municipio=Municipio \ No newline at end of file diff --git a/src/main/resources/messages/messages_es.properties b/src/main/resources/messages/messages_es.properties index d93fb4800..e69de29bb 100644 --- a/src/main/resources/messages/messages_es.properties +++ b/src/main/resources/messages/messages_es.properties @@ -1,73 +0,0 @@ -welcome=Bienvenido a -new=Nueva -deleteOffer=Eliminar Oferta -cancel=Cancelar -deleteOfferMessage=Confirme que quiere eliminar su oferta -listOffers=Ver Ofertas -createOffers=Crear Ofertas -foodOffers=Ofertas por plato específico -foodOffer=Oferta por plato específico -nuOffers=Ofertas por número de comensales -nuOffer=Oferta por número de comensales -speedOffers=Ofertas por tiempo empleado en comer -speedOffer=Oferta por tiempo empleado en comer -timeOffers=Ofertas por franja horaria -timeOffer=Oferta por franja horaria -food=Plato -foodInOffer=Plato en oferta -cuantity=Cantidad -discount=Descuento -goldGoal=Meta oro -goldDiscount=Descuento oro -silverGoal=Meta plata -silverDiscount=Descuento plata -bronzeGoal=Meta bronce -bronzeDiscount=Descuento bronce -startDate=Fecha de inicio -offerBeginning=Inicio de la oferta -endDate=Fecha de fin -offerEnding=Fin de la oferta -details=Detalles -offerCode=Código de la oferta -return=Volver -required=Es requerido -notFound=No ha sido encontrado -duplicate=Ya se encuentra en uso -nonNumeric=Solo debe contener números -duplicateFormSubmission=No se permite el envío de formularios duplicados -typeMismatch.date=Fecha inválida -typeMismatch.birthDate=Fecha inválida -review= Reseña -reviews= Reseñas -stars= Estrellas -opinion= Opinión -user = Nombre de usuario -createFoodOffers= Crear ofertas por plato específico -createNuOffers= Crear ofertas por número de comensales -createSpeedOffers= Crear ofertas por rapidez comiendo -createTimeOffers= Crear ofertas por franja horaria -init= Inicio del intervalo -finishOffer= Fin del intervalo -name= Nombre del bar/restaurante -status= Estado de oferta -myOffers= Ver mis Ofertas -typeMismatch=Debe ser del formato correcto -typeMismatch.java.lang.Integer=Debe ser un número -typeMismatch.java.time.LocalDateTime=Debe ser una fecha válida -typeMismatch.java.time.LocalTime=Debe ser una hora válida -clientShow= Información del bar/restaurante -client= Cliente -clients= Clientes -email=Dirección de correo electrónico -addressClient= Dirección del bar/restaurante -addressUser= Dirección del usuario -telephone= Número de teléfono -descriptionClient= Descripción del bar/restaurante -foodClient= Tipo de comida -enabled= ¿Está activo el usuario? -users=Usuarios -nameUser=Nombre -surname= Apellidos -dni= DNI -usuario=Usuario -municipio=Municipio \ No newline at end of file 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..59cfe490f 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" %> -

+

@@ -44,15 +45,36 @@ - + - +
+ + +
-
- + + +
+ + + + + + + + + + + + + +
+
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 650d5876f..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,27 +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.

@@ -83,6 +95,7 @@ + @@ -105,6 +118,9 @@ + + + @@ -121,19 +137,21 @@ - +
+ +
-

+

:

-

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

+

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

-
+
@@ -143,6 +161,7 @@ + @@ -165,6 +184,9 @@ +
+ + @@ -179,14 +201,16 @@
- +
+ +
-

+

:

No hay ninguna oferta por tiempo empleado en comer activa.

@@ -202,6 +226,7 @@ + @@ -224,6 +249,9 @@ + + + @@ -239,15 +267,17 @@ - - +
+ + +
-

+

:

No hay ninguna oferta por franja horaria activa.

@@ -263,6 +293,7 @@ + @@ -284,6 +315,9 @@ + + + @@ -298,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 4e0d4e251..6db7e6929 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..db9d3f89e 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/createOrUpdateReviewForm.jsp @@ -5,16 +5,19 @@ <%@ 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 +26,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..c521a350a 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/reviewsList.jsp @@ -4,10 +4,13 @@ <%@ 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" %> + -

+

@@ -22,10 +25,11 @@ - + + <%-- --%> @@ -34,7 +38,10 @@ +
- + + + + @@ -51,26 +58,34 @@
- +
+ +
+ +
- + +
- + +
- + +
diff --git a/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp b/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp index b13c31115..0a4c9207b 100644 --- a/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp +++ b/src/main/webapp/WEB-INF/jsp/reviews/reviewsShow.jsp @@ -5,26 +5,33 @@ <%@ 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" %> -

+ +

+ + + - + + - +
- +
@@ -35,7 +42,7 @@ + Editar opinión
diff --git a/src/main/webapp/WEB-INF/jsp/reviewsClient/createOrUpdateReviewForm.jsp b/src/main/webapp/WEB-INF/jsp/reviewsClient/createOrUpdateReviewForm.jsp new file mode 100644 index 000000000..b124b0e26 --- /dev/null +++ b/src/main/webapp/WEB-INF/jsp/reviewsClient/createOrUpdateReviewForm.jsp @@ -0,0 +1,42 @@ +<%@ 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="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 +

+ +
+ + + + +
+
+
+
+ + + + + + + + +
+
+
+ + + +
+
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/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 abfe1cd9b..72504671c 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