mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 15:55:49 +00:00
Corregido los controladores de las ofertas para aplicar las validaciones
This commit is contained in:
parent
1c89f07d0e
commit
b65f329f31
3 changed files with 8 additions and 8 deletions
|
@ -174,15 +174,15 @@ public class NuOfferController {
|
|||
return NuOfferController.VIEWS_NU_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
|
||||
} else {
|
||||
if(!this.checkDates(nuOffer)) {
|
||||
if(!this.checkDates(nuOfferEdit)) {
|
||||
//Poner aqui mensaje de error
|
||||
return VIEWS_NU_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
if(!this.checkConditions(nuOffer)) {
|
||||
if(!this.checkConditions(nuOfferEdit)) {
|
||||
//Poner aqui mensaje de error
|
||||
return VIEWS_NU_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
if(!this.checkDiscounts(nuOffer)) {
|
||||
if(!this.checkDiscounts(nuOfferEdit)) {
|
||||
//Poner aqui mensaje de error
|
||||
return VIEWS_NU_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
|
|
|
@ -167,15 +167,15 @@ public class SpeedOfferController {
|
|||
return SpeedOfferController.VIEWS_SPEED_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
|
||||
} else {
|
||||
if(!this.checkDates(speedOffer)) {
|
||||
if(!this.checkDates(speedOfferEdit)) {
|
||||
//Poner aqui mensaje de error
|
||||
return VIEWS_SPEED_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
if(!this.checkConditions(speedOffer)) {
|
||||
if(!this.checkConditions(speedOfferEdit)) {
|
||||
//Poner aqui mensaje de error
|
||||
return VIEWS_SPEED_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
if(!this.checkDiscounts(speedOffer)) {
|
||||
if(!this.checkDiscounts(speedOfferEdit)) {
|
||||
//Poner aqui mensaje de error
|
||||
return VIEWS_SPEED_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
|
|
|
@ -165,11 +165,11 @@ public class TimeOfferController {
|
|||
return TimeOfferController.VIEWS_TIME_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
|
||||
} else {
|
||||
if(!this.checkDates(timeOffer)) {
|
||||
if(!this.checkDates(timeOfferEdit)) {
|
||||
//Poner aqui mensaje de error
|
||||
return VIEWS_TIME_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
if(!this.checkTimes(timeOffer)) {
|
||||
if(!this.checkTimes(timeOfferEdit)) {
|
||||
//Poner aqui mensaje de error
|
||||
return VIEWS_TIME_OFFER_CREATE_OR_UPDATE_FORM;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue