This commit is contained in:
@@ -88,7 +88,7 @@
|
||||
|
||||
<v-layout align-center justify-space-around row wrap mt-5>
|
||||
<v-flex xs1>
|
||||
<v-btn @click="validate">Force validate</v-btn>
|
||||
<v-btn>test 1</v-btn>
|
||||
</v-flex>
|
||||
<v-flex xs1>
|
||||
<v-btn>test2</v-btn>
|
||||
@@ -150,11 +150,11 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
obj: {},
|
||||
serverErrors: {},
|
||||
serverError: {},
|
||||
formReady: false
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
methods: {
|
||||
getDataFromApi() {
|
||||
var url = "Widget/" + this.$route.params.id;
|
||||
this.$gzapi.get(url).then(res => {
|
||||
@@ -175,13 +175,12 @@ export default {
|
||||
.then(res => {
|
||||
if (res.error) {
|
||||
//debugger;
|
||||
//Set errors so form can pick them up for controls in canHasServerErrors
|
||||
that.serverErrors = res.error;
|
||||
//Set errors so form can pick them up for controls in canHasServerErrors
|
||||
that.serverError = res.error;
|
||||
// that.$refs.form.resetValidation();
|
||||
// that.$refs.form.validate();
|
||||
//example error when submit when there are no roles set at all (blank)
|
||||
//{"error":{"code":"2200","details":[{"code":"2200","message":"","target":"roles","error":"VALIDATION_FAILED"}],"message":"Object did not pass validation"}}
|
||||
|
||||
} else {
|
||||
//Logic for detecting if a post or put: if id then it was a post, if no id then it was a put
|
||||
if (res.id) {
|
||||
|
||||
Reference in New Issue
Block a user