Merge branch 'develop' into 005-iniciosesion
|
@ -90,5 +90,4 @@ public class Client extends User {
|
||||||
public void setFood(String food) {
|
public void setFood(String food) {
|
||||||
this.food = food;
|
this.food = food;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
|
@ -0,0 +1,59 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2012-2019 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.springframework.cheapy.model;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "food_offers")
|
||||||
|
public class FoodOffer extends Offer {
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private String food;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private String discount;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private Integer units; // revisar
|
||||||
|
|
||||||
|
public String getFood() {
|
||||||
|
return food;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFood(String food) {
|
||||||
|
this.food = food;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscount() {
|
||||||
|
return discount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscount(String discount) {
|
||||||
|
this.discount = discount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getUnits() {
|
||||||
|
return units;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUnits(Integer units) {
|
||||||
|
this.units = units;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
96
src/main/java/org/springframework/cheapy/model/NuOffer.java
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2012-2019 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.springframework.cheapy.model;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "nu_offers")
|
||||||
|
public class NuOffer extends Offer {
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private Integer gold;
|
||||||
|
|
||||||
|
@Column(name = "discount_gold")
|
||||||
|
@NotBlank
|
||||||
|
private String discountGold;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private Integer silver;
|
||||||
|
|
||||||
|
@Column(name = "discount_silver")
|
||||||
|
@NotBlank
|
||||||
|
private String discountSilver;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private Integer bronze;
|
||||||
|
|
||||||
|
@Column(name = "discount_bronze")
|
||||||
|
@NotBlank
|
||||||
|
private String discountBronze;
|
||||||
|
|
||||||
|
public Integer getGold() {
|
||||||
|
return gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGold(Integer gold) {
|
||||||
|
this.gold = gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscountGold() {
|
||||||
|
return discountGold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscountGold(String discountGold) {
|
||||||
|
this.discountGold = discountGold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSilver() {
|
||||||
|
return silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSilver(Integer silver) {
|
||||||
|
this.silver = silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscountSilver() {
|
||||||
|
return discountSilver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscountSilver(String discountSilver) {
|
||||||
|
this.discountSilver = discountSilver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBronze() {
|
||||||
|
return bronze;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBronze(Integer bronze) {
|
||||||
|
this.bronze = bronze;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscountBronze() {
|
||||||
|
return discountBronze;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscountBronze(String discountBronze) {
|
||||||
|
this.discountBronze = discountBronze;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
87
src/main/java/org/springframework/cheapy/model/Offer.java
Normal file
|
@ -0,0 +1,87 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2012-2019 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.springframework.cheapy.model;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.EnumType;
|
||||||
|
import javax.persistence.Enumerated;
|
||||||
|
import javax.persistence.JoinColumn;
|
||||||
|
import javax.persistence.ManyToOne;
|
||||||
|
import javax.persistence.MappedSuperclass;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.validation.constraints.Future;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
@MappedSuperclass
|
||||||
|
public class Offer extends BaseEntity {
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "dd/MM/yyyy HH:mm")
|
||||||
|
@NotBlank
|
||||||
|
@Future
|
||||||
|
private LocalDateTime start;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "dd/MM/yyyy HH:mm")
|
||||||
|
@NotBlank
|
||||||
|
@Future
|
||||||
|
private LocalDateTime end;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@Enumerated(value = EnumType.STRING)
|
||||||
|
private StatusOffer type;
|
||||||
|
|
||||||
|
@ManyToOne
|
||||||
|
@JoinColumn(name="client_id")
|
||||||
|
private Client client;
|
||||||
|
|
||||||
|
public LocalDateTime getStart() {
|
||||||
|
return start;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStart(LocalDateTime start) {
|
||||||
|
this.start = start;
|
||||||
|
}
|
||||||
|
|
||||||
|
public LocalDateTime getEnd() {
|
||||||
|
return end;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnd(LocalDateTime end) {
|
||||||
|
this.end = end;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(String code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public StatusOffer getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(StatusOffer type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,96 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2012-2019 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.springframework.cheapy.model;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "speed_offers")
|
||||||
|
public class SpeedOffer extends Offer {
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private Integer gold; // x minutos
|
||||||
|
|
||||||
|
@Column(name = "discount_gold")
|
||||||
|
@NotBlank
|
||||||
|
private String discountGold;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private Integer silver;
|
||||||
|
|
||||||
|
@Column(name = "discount_silver")
|
||||||
|
@NotBlank
|
||||||
|
private String discountSilver;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private Integer bronze;
|
||||||
|
|
||||||
|
@Column(name = "discount_bronze")
|
||||||
|
@NotBlank
|
||||||
|
private String discountBronze;
|
||||||
|
|
||||||
|
public Integer getGold() {
|
||||||
|
return gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGold(Integer gold) {
|
||||||
|
this.gold = gold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscountGold() {
|
||||||
|
return discountGold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscountGold(String discountGold) {
|
||||||
|
this.discountGold = discountGold;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getSilver() {
|
||||||
|
return silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSilver(Integer silver) {
|
||||||
|
this.silver = silver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscountSilver() {
|
||||||
|
return discountSilver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscountSilver(String discountSilver) {
|
||||||
|
this.discountSilver = discountSilver;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getBronze() {
|
||||||
|
return bronze;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBronze(Integer bronze) {
|
||||||
|
this.bronze = bronze;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDiscountBronze() {
|
||||||
|
return discountBronze;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscountBronze(String discountBronze) {
|
||||||
|
this.discountBronze = discountBronze;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package org.springframework.cheapy.model;
|
||||||
|
|
||||||
|
public enum StatusOffer {
|
||||||
|
active, inactive, hidden
|
||||||
|
}
|
|
@ -0,0 +1,53 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2012-2019 the original author or authors.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
package org.springframework.cheapy.model;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.LocalTime;
|
||||||
|
|
||||||
|
import javax.persistence.Entity;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import javax.validation.constraints.Future;
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
@Entity
|
||||||
|
@Table(name = "time_offers")
|
||||||
|
public class TimeOffer extends Offer {
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "HH:mm")
|
||||||
|
@NotBlank
|
||||||
|
private LocalTime init;
|
||||||
|
|
||||||
|
@DateTimeFormat(pattern = "HH:mm")
|
||||||
|
@NotBlank
|
||||||
|
private LocalTime finish;
|
||||||
|
|
||||||
|
@NotBlank
|
||||||
|
private String discount;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getDiscount() {
|
||||||
|
return discount;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDiscount(String discount) {
|
||||||
|
this.discount = discount;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,58 +1,57 @@
|
||||||
package org.springframework.cheapy.model;
|
package org.springframework.cheapy.model;
|
||||||
|
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.MappedSuperclass;
|
import javax.persistence.MappedSuperclass;
|
||||||
import javax.persistence.OneToOne;
|
import javax.persistence.OneToOne;
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
|
|
||||||
@MappedSuperclass
|
@MappedSuperclass
|
||||||
public class User extends BaseEntity {
|
public class User extends BaseEntity {
|
||||||
|
|
||||||
@NotBlank
|
@NotBlank
|
||||||
String username;
|
String username;
|
||||||
|
|
||||||
@NotBlank
|
@NotBlank
|
||||||
String password;
|
String password;
|
||||||
|
|
||||||
@Email
|
@Email
|
||||||
@NotBlank
|
@NotBlank
|
||||||
String email;
|
String email;
|
||||||
|
|
||||||
@OneToOne
|
@OneToOne
|
||||||
Authorities authority;
|
Authorities authority;
|
||||||
|
|
||||||
public String getUsername() {
|
public String getUsername() {
|
||||||
return username;
|
return username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsername(String username) {
|
public void setUsername(String username) {
|
||||||
this.username = username;
|
this.username = username;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getPassword() {
|
public String getPassword() {
|
||||||
return password;
|
return password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPassword(String password) {
|
public void setPassword(String password) {
|
||||||
this.password = password;
|
this.password = password;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getEmail() {
|
public String getEmail() {
|
||||||
return email;
|
return email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEmail(String email) {
|
public void setEmail(String email) {
|
||||||
this.email = email;
|
this.email = email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Authorities getAuthority() {
|
public Authorities getAuthority() {
|
||||||
return authority;
|
return authority;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAuthority(Authorities authority) {
|
public void setAuthority(Authorities authority) {
|
||||||
this.authority = authority;
|
this.authority = authority;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
.navbar {
|
.navbar {
|
||||||
border-top: 4px solid #6db33f;
|
border-top: 4px solid rgb(0, 64, 128);
|
||||||
background-color: #34302d;
|
background-color: rgb(40, 140, 215);
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
border-left: 0;
|
border-left: 0;
|
||||||
|
@ -8,20 +8,20 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar a.navbar-brand {
|
.navbar a.navbar-brand {
|
||||||
background: url("../images/spring-logo-dataflow.png") -1px -1px no-repeat;
|
background: url("../images/Logo Cheapy2.png") -1px -1px no-repeat;
|
||||||
margin: 12px 0 6px;
|
margin: 12px 0 6px;
|
||||||
width: 229px;
|
width: 70px;
|
||||||
height: 46px;
|
height: 55px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar a.navbar-brand span {
|
.navbar a.navbar-brand span {
|
||||||
display: block;
|
display: inline-block;
|
||||||
width: 229px;
|
width: 55px;
|
||||||
height: 46px;
|
height: 55px;
|
||||||
background: url("../images/spring-logo-dataflow.png") -1px -48px no-repeat;
|
background: url("../images/Logo Cheapy2Negro.png") -1px -1px no-repeat;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
-moz-transition: opacity 0.12s ease-in-out;
|
-moz-transition: opacity 0.12s ease-in-out;
|
||||||
-webkit-transition: opacity 0.12s ease-in-out;
|
-webkit-transition: opacity 0.12s ease-in-out;
|
||||||
|
|
|
@ -13,24 +13,24 @@
|
||||||
*/
|
*/
|
||||||
@icon-font-path: "../../webjars/bootstrap/fonts/";
|
@icon-font-path: "../../webjars/bootstrap/fonts/";
|
||||||
|
|
||||||
@spring-green: #6db33f;
|
@spring-blue: rgb(0, 64, 128);
|
||||||
@spring-dark-green: #5fa134;
|
@spring-dark-blue: rgb(0, 0, 128);
|
||||||
@spring-brown: #34302D;
|
@spring-brown: #34302D;
|
||||||
@spring-grey: #838789;
|
@spring-grey: #838789;
|
||||||
@spring-light-grey: #f1f1f1;
|
@spring-light-grey: #f1f1f1;
|
||||||
|
|
||||||
@body-bg: @spring-light-grey;
|
@body-bg: @spring-light-grey;
|
||||||
@text-color: @spring-brown;
|
@text-color: @spring-brown;
|
||||||
@link-color: @spring-dark-green;
|
@link-color: @spring-dark-blue;
|
||||||
@link-hover-color: @spring-dark-green;
|
@link-hover-color: @spring-dark-blue;
|
||||||
|
|
||||||
@navbar-default-link-color: @spring-light-grey;
|
@navbar-default-link-color: @spring-light-grey;
|
||||||
@navbar-default-link-active-color: @spring-light-grey;
|
@navbar-default-link-active-color: @spring-light-grey;
|
||||||
@navbar-default-link-hover-color: @spring-light-grey;
|
@navbar-default-link-hover-color: @spring-light-grey;
|
||||||
@navbar-default-link-hover-bg: @spring-green;
|
@navbar-default-link-hover-bg: @spring-blue;
|
||||||
@navbar-default-toggle-icon-bar-bg: @spring-light-grey;
|
@navbar-default-toggle-icon-bar-bg: @spring-light-grey;
|
||||||
@navbar-default-toggle-hover-bg: transparent;
|
@navbar-default-toggle-hover-bg: transparent;
|
||||||
@navbar-default-link-active-bg: @spring-green;
|
@navbar-default-link-active-bg: @spring-blue;
|
||||||
|
|
||||||
@border-radius-base: 0;
|
@border-radius-base: 0;
|
||||||
@border-radius-large: 0;
|
@border-radius-large: 0;
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
@btn-default-color: @spring-light-grey;
|
@btn-default-color: @spring-light-grey;
|
||||||
@btn-default-bg: @spring-brown;
|
@btn-default-bg: @spring-brown;
|
||||||
@btn-default-border: @spring-green;
|
@btn-default-border: @spring-blue;
|
||||||
|
|
||||||
@nav-tabs-active-link-hover-color: @spring-light-grey;
|
@nav-tabs-active-link-hover-color: @spring-light-grey;
|
||||||
@nav-tabs-active-link-hover-bg: @spring-brown;
|
@nav-tabs-active-link-hover-bg: @spring-brown;
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
@nav-tabs-border-color: @spring-brown;
|
@nav-tabs-border-color: @spring-brown;
|
||||||
|
|
||||||
@pagination-active-bg: @spring-brown;
|
@pagination-active-bg: @spring-brown;
|
||||||
@pagination-active-border: @spring-green;
|
@pagination-active-border: @spring-blue;
|
||||||
@table-border-color: @spring-brown;
|
@table-border-color: @spring-brown;
|
||||||
|
|
||||||
.table > thead > tr > th {
|
.table > thead > tr > th {
|
||||||
|
@ -125,7 +125,7 @@ h1 {
|
||||||
}
|
}
|
||||||
|
|
||||||
.splash {
|
.splash {
|
||||||
background: @spring-green;
|
background: @spring-blue;
|
||||||
color: @spring-brown;
|
color: @spring-brown;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -204,6 +204,42 @@ table td.action-column {
|
||||||
color: @spring-brown;
|
color: @spring-brown;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.img-responsive{
|
||||||
|
display: block;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto
|
||||||
|
}
|
||||||
|
|
||||||
|
.img-home{
|
||||||
|
display: table;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-home{
|
||||||
|
display: table;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-home button {
|
||||||
|
background-color: rgb(0, 64, 128);
|
||||||
|
border: 1px solid rgb(0, 0, 160);
|
||||||
|
color: white;
|
||||||
|
padding: 10px 24px;
|
||||||
|
cursor: pointer;
|
||||||
|
width: 100%;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-home button:not(:last-child) {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.btn-home button:hover {
|
||||||
|
background-color: rgb(0, 64, 128);
|
||||||
|
}
|
||||||
|
|
||||||
.alert-success {
|
.alert-success {
|
||||||
.alert-variant(fade(@alert-success-bg, 70%); @alert-success-border; @alert-success-text);
|
.alert-variant(fade(@alert-success-bg, 70%); @alert-success-border; @alert-success-text);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
.navbar a.navbar-brand {
|
.navbar a.navbar-brand {
|
||||||
display: block;
|
display: block;
|
||||||
margin: 0 auto 0 auto;
|
margin: 0 auto 0 auto;
|
||||||
width: 148px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
float: none;
|
float: none;
|
||||||
background: url("../images/spring-logo-dataflow-mobile.png") 0 center no-repeat;
|
background: url("../images/Logo Cheapy2.png") 0 center no-repeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
.homepage-billboard .homepage-subtitle {
|
.homepage-billboard .homepage-subtitle {
|
||||||
|
|
|
@ -5,3 +5,10 @@ spring.datasource.username=${MYSQL_USER:cheapy}
|
||||||
spring.datasource.password=${MYSQL_PASS:cheapy}
|
spring.datasource.password=${MYSQL_PASS:cheapy}
|
||||||
# SQL is written to be idempotent so this is safe
|
# SQL is written to be idempotent so this is safe
|
||||||
spring.datasource.initialization-mode=always
|
spring.datasource.initialization-mode=always
|
||||||
|
|
||||||
|
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
|
||||||
|
spring.jpa.properties.javax.persistence.schema-generation.drop-source=metadata
|
||||||
|
# Naming strategy
|
||||||
|
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
|
||||||
|
# Allows Hibernate to generate SQL optimized for a particular DBMS
|
||||||
|
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5InnoDBDialect
|
||||||
|
|
|
@ -1,23 +1,30 @@
|
||||||
# database init, supports mysql too
|
# database init, supports mysql too
|
||||||
database=h2
|
database=mysql
|
||||||
spring.datasource.schema=classpath*:db/${database}/schema.sql
|
#spring.datasource.schema=classpath*:db/${database}/schema.sql
|
||||||
spring.datasource.data=classpath*:db/${database}/data.sql
|
spring.datasource.data=classpath*:db/${database}/data.sql
|
||||||
|
spring.h2.console.enabled=true
|
||||||
|
spring.profiles.active=mysql
|
||||||
# Web
|
# Web
|
||||||
spring.thymeleaf.mode=HTML
|
spring.thymeleaf.mode=HTML
|
||||||
|
|
||||||
# JPA
|
# JPA
|
||||||
spring.jpa.hibernate.ddl-auto=none
|
spring.jpa.hibernate.ddl-auto=create-drop
|
||||||
spring.jpa.open-in-view=false
|
spring.jpa.show-sql=true
|
||||||
|
spring.jpa.properties.hibernate.format_sql=true
|
||||||
|
spring.jpa.properties.javax.persistence.schema-generation.drop-source=script
|
||||||
|
spring.jpa.properties.javax.persistence.schema-generation.drop-script-source=drop-tables.sql
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
spring.messages.basename=messages/messages
|
spring.messages.basename=messages/messages
|
||||||
|
|
||||||
|
|
||||||
# Views
|
# Views
|
||||||
spring.mvc.view.prefix: /WEB-INF/jsp/
|
spring.mvc.view.prefix: /WEB-INF/jsp/
|
||||||
spring.mvc.view.suffix: .jsp
|
spring.mvc.view.suffix: .jsp
|
||||||
|
|
||||||
# Actuator
|
|
||||||
|
# Actuator / Management
|
||||||
|
management.endpoints.web.base-path=/manage
|
||||||
management.endpoints.web.exposure.include=*
|
management.endpoints.web.exposure.include=*
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
@ -26,6 +33,4 @@ logging.level.org.springframework=INFO
|
||||||
# logging.level.org.springframework.context.annotation=TRACE
|
# logging.level.org.springframework.context.annotation=TRACE
|
||||||
|
|
||||||
# Maximum time static resources should be cached
|
# Maximum time static resources should be cached
|
||||||
spring.resources.cache.cachecontrol.max-age=12h
|
spring.resources.cache.cachecontrol.max-age=12h
|
||||||
|
|
||||||
spring.profiles.active=mysql
|
|
|
@ -1,10 +1,15 @@
|
||||||
INSERT IGNORE INTO owners VALUES (1, 'George', 'Franklin', '110 W. Liberty St.', 'Madison', '6085551023');
|
INSERT INTO owners VALUES (1, 'Javi', 'Franklin', '110 W. Liberty St.', 'Madison', '6085551023');
|
||||||
INSERT IGNORE INTO owners VALUES (2, 'Betty', 'Davis', '638 Cardinal Ave.', 'Sun Prairie', '6085551749');
|
INSERT INTO owners VALUES (2, 'Betty', 'Davis', '638 Cardinal Ave.', 'Sun Prairie', '6085551749');
|
||||||
INSERT IGNORE INTO owners VALUES (3, 'Eduardo', 'Rodriquez', '2693 Commerce St.', 'McFarland', '6085558763');
|
INSERT INTO owners VALUES (3, 'Eduardo', 'Rodriquez', '2693 Commerce St.', 'McFarland', '6085558763');
|
||||||
INSERT IGNORE INTO owners VALUES (4, 'Harold', 'Davis', '563 Friendly St.', 'Windsor', '6085553198');
|
INSERT INTO owners VALUES (4, 'Harold', 'Davis', '563 Friendly St.', 'Windsor', '6085553198');
|
||||||
INSERT IGNORE INTO owners VALUES (5, 'Peter', 'McTavish', '2387 S. Fair Way', 'Madison', '6085552765');
|
INSERT INTO owners VALUES (5, 'Peter', 'McTavish', '2387 S. Fair Way', 'Madison', '6085552765');
|
||||||
INSERT IGNORE INTO owners VALUES (6, 'Jean', 'Coleman', '105 N. Lake St.', 'Monona', '6085552654');
|
INSERT INTO owners VALUES (6, 'Jean', 'Coleman', '105 N. Lake St.', 'Monona', '6085552654');
|
||||||
INSERT IGNORE INTO owners VALUES (7, 'Jeff', 'Black', '1450 Oak Blvd.', 'Monona', '6085555387');
|
INSERT INTO owners VALUES (7, 'Jeff', 'Black', '1450 Oak Blvd.', 'Monona', '6085555387');
|
||||||
INSERT IGNORE INTO owners VALUES (8, 'Maria', 'Escobito', '345 Maple St.', 'Madison', '6085557683');
|
INSERT INTO owners VALUES (8, 'Maria', 'Escobito', '345 Maple St.', 'Madison', '6085557683');
|
||||||
INSERT IGNORE INTO owners VALUES (9, 'David', 'Schroeder', '2749 Blackhawk Trail', 'Madison', '6085559435');
|
INSERT INTO owners VALUES (9, 'David', 'Schroeder', '2749 Blackhawk Trail', 'Madison', '6085559435');
|
||||||
INSERT IGNORE INTO owners VALUES (10, 'Carlos', 'Estaban', '2335 Independence La.', 'Waunakee', '6085555487');
|
INSERT INTO owners VALUES (10, 'Carlos', 'Estaban', '2335 Independence La.', 'Waunakee', '6085555487');
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO food_offers(start, end, code, type, client_id, food, discount, units) VALUES ('2021-06-15 12:00:00', '2021-06-16 12:00:00', 'jkhlljk', 'active', null, 'macarrones', '15%', 10);
|
||||||
|
|
||||||
|
INSERT INTO time_offers(start, end, code, type, client_id, init, finish, discount) VALUES ('2021-06-15 12:00:00', '2021-06-16 12:00:00', 'jkhlljk', 'active', null, '12:00:00', '13:00:00', '10%');
|
|
@ -1,4 +1,4 @@
|
||||||
welcome=Bienvenido
|
welcome=Bienvenido a
|
||||||
required=Es requerido
|
required=Es requerido
|
||||||
notFound=No ha sido encontrado
|
notFound=No ha sido encontrado
|
||||||
duplicate=Ya se encuentra en uso
|
duplicate=Ya se encuentra en uso
|
||||||
|
|
BIN
src/main/resources/static/resources/images/Logo Cheapy.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
src/main/resources/static/resources/images/Logo Cheapy2.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
src/main/resources/static/resources/images/Logo Cheapy2Negro.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
src/main/resources/static/resources/images/eslogan.png
Normal file
After Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 528 B After Width: | Height: | Size: 16 KiB |
BIN
src/main/resources/static/resources/images/faviconChikito.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
|
@ -2,14 +2,21 @@
|
||||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
||||||
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %>
|
<%@ taglib prefix="petclinic" tagdir="/WEB-INF/tags" %>
|
||||||
|
<link href='https://fonts.googleapis.com/css?family=Lobster' rel='stylesheet'>
|
||||||
<!-- %@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %-->
|
<!-- %@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %-->
|
||||||
|
|
||||||
<petclinic:layout pageName="home">
|
<petclinic:layout pageName="home">
|
||||||
<h2><fmt:message key="welcome"/></h2>
|
<h2 class="text-center" style="font-family: 'Lobster'; font-size: 50px; color: rgb(0, 64, 128); padding:20px"><fmt:message key="welcome"/></h2>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<spring:url value="/resources/images/pets.png" htmlEscape="true" var="petsImage"/>
|
<div class="img-home">
|
||||||
<img class="img-responsive" src="${petsImage}"/>
|
<spring:url value="/resources/images/Logo Cheapy.png" htmlEscape="true" var="cheapyImage"/>
|
||||||
|
<img class="img-responsive" src="${cheapyImage}"/>
|
||||||
|
</div>
|
||||||
|
<div class="btn-home">
|
||||||
|
<button type="button"><span class="glyphicon glyphicon-cutlery" aria-hidden="true" style="padding: 5px"></span> Ver Ofertas</button>
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</petclinic:layout>
|
</petclinic:layout>
|
||||||
|
|
|
@ -11,10 +11,10 @@ PetClinic :: a Spring Framework demonstration
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<%-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags --%>
|
<%-- The above 4 meta tags *must* come first in the head; any other head content must come *after* these tags --%>
|
||||||
|
|
||||||
<spring:url value="/resources/images/favicon.png" var="favicon"/>
|
<spring:url value="/resources/images/faviconChikito.png" var="favicon"/>
|
||||||
<link rel="shortcut icon" type="image/x-icon" href="${favicon}">
|
<link rel="shortcut icon" type="image/x-icon" href="${favicon}">
|
||||||
|
|
||||||
<title>PetClinic :: a Spring Framework demonstration</title>
|
<title>Cheapy : eat fast, eat cheapy</title>
|
||||||
|
|
||||||
<%-- CSS generated from LESS --%>
|
<%-- CSS generated from LESS --%>
|
||||||
<spring:url value="/resources/css/petclinic.css" var="petclinicCss"/>
|
<spring:url value="/resources/css/petclinic.css" var="petclinicCss"/>
|
||||||
|
|
|
@ -27,23 +27,24 @@
|
||||||
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-home" aria-hidden="true"></span>
|
||||||
<span>Home</span>
|
<span>Home</span>
|
||||||
</petclinic:menuItem>
|
</petclinic:menuItem>
|
||||||
|
|
||||||
<petclinic:menuItem active="${name eq 'owners'}" url="/owners/find"
|
<petclinic:menuItem active="${name eq 'ofertas'}" url="/ofertas"
|
||||||
title="find owners">
|
title="ofertas">
|
||||||
<span class="glyphicon glyphicon-search" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-cutlery" aria-hidden="true"></span>
|
||||||
<span>Find owners</span>
|
<span>Ver ofertas</span>
|
||||||
|
</petclinic:menuItem>
|
||||||
|
|
||||||
|
<petclinic:menuItem active="${name eq 'contactanos'}" url="/contactanos"
|
||||||
|
title="contactanos">
|
||||||
|
<span class="glyphicon glyphicon-earphone" aria-hidden="true"></span>
|
||||||
|
<span>Contáctanos</span>
|
||||||
</petclinic:menuItem>
|
</petclinic:menuItem>
|
||||||
|
|
||||||
<petclinic:menuItem active="${name eq 'vets'}" url="/vets"
|
|
||||||
title="veterinarians">
|
<petclinic:menuItem active="${name eq 'login'}" url="/login"
|
||||||
|
title="login">
|
||||||
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-th-list" aria-hidden="true"></span>
|
||||||
<span>Veterinarians</span>
|
<span>Login</span>
|
||||||
</petclinic:menuItem>
|
|
||||||
|
|
||||||
<petclinic:menuItem active="${name eq 'error'}" url="/oups"
|
|
||||||
title="trigger a RuntimeException to see how it is handled">
|
|
||||||
<span class="glyphicon glyphicon-warning-sign" aria-hidden="true"></span>
|
|
||||||
<span>Error</span>
|
|
||||||
</petclinic:menuItem>
|
</petclinic:menuItem>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<br/>
|
<br/>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 text-center"><img src="<spring:url value="/resources/images/spring-pivotal-logo.png" htmlEscape="true" />"
|
<div class="col-12 text-center"><img src="<spring:url value="/resources/images/eslogan.png" htmlEscape="true" />"
|
||||||
alt="Sponsored by Pivotal"/></div>
|
alt="Sponsored by Pivotal"/></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|