Skip to content

Commit

Permalink
Merge pull request #1479 from hypersign-protocol/issues#1406
Browse files Browse the repository at this point in the history
double validation message on save button fixed
  • Loading branch information
Vishwas1 authored Jul 21, 2022
2 parents bd49925 + 73d2d04 commit 60dabf4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/views/admin/Events.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@ export default {
const namePage = this.project.projectName;
this.isLoading = true;
const resp= await this.apiCallToSaveEvent()
const resp= await this.apiCallToSaveEvent()
this.$root.$emit("closePreview");
if (!this.isProjectEditing) {
//// not using this for the time being just to test
Expand Down Expand Up @@ -1249,30 +1249,30 @@ export default {
async apiCallToSaveEvent() {
if (this.checkIfEverythingIsFilled() !== true) {
return this.notifyErr(this.checkIfEverythingIsFilled());
throw new Error(this.checkIfEverythingIsFilled());
}
if (this.isProjectNameValid() !== true) {
return this.notifyErr(this.isProjectNameValid());
throw new Error(this.isProjectNameValid());
}
if (this.isValidSlug() !== true) {
return this.notifyErr(this.isValidSlug());
throw new Error(this.isValidSlug());
}
if (this.isLogoUrlValid() !== true) {
return this.notifyErr(this.isLogoUrlValid());
throw new Error(this.isLogoUrlValid());
}
if (
isNaN(parseInt(this.project.refereePoint)) ||
isNaN(parseInt(this.project.referralPoint))
) {
return this.notifyErr(Messages.EVENTS.REF_POINT.NOT_VALID_INP);
throw new Error(Messages.EVENTS.REF_POINT.NOT_VALID_INP);
}
if (
parseInt(this.project.refereePoint) < 0 ||
parseInt(this.project.referralPoint) < 0
) {
return this.notifyErr(Messages.EVENTS.REF_POINT.NOT_POS_INP);
throw new Error(Messages.EVENTS.REF_POINT.NOT_POS_INP);
}
//this.isLoading = true;
Expand Down

0 comments on commit 60dabf4

Please sign in to comment.