Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double validation message on save button fixed #1479

Merged
merged 2 commits into from
Jul 21, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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