This commit is contained in:
2019-04-08 21:15:14 +00:00
parent fda9dcddda
commit b758cdad9a
4 changed files with 37 additions and 14 deletions

View File

@@ -176,7 +176,7 @@ export default {
obj: {},
serverError: {},
errorBoxMessage: null,
appError:null,
appError: null,
formReady: false
};
},
@@ -187,14 +187,19 @@ export default {
getDataFromApi() {
var url = "Widget/" + this.$route.params.id;
var that = this;
this.$gzv.DeleteAllErrorBoxErrors(this);
this.$gzv.DeleteAllErrorBoxErrors(this);
this.$gzapi
.get(url)
.then(res => {
this.obj = res.data;
if (res.error) {
that.serverError = res.error;
that.$gzv.SetErrorBoxErrors(that);
} else {
that.obj = res.data;
}
})
.catch(function(error) {
that.$gzHandleFormError(error, true);
that.$gzHandleFormError(error, that);
});
},
submit() {
@@ -225,7 +230,7 @@ export default {
}
})
.catch(function(error) {
that.$gzHandleFormError(error, true);
that.$gzHandleFormError(error, that);
});
}
} //end of submit()