This commit is contained in:
@@ -28,7 +28,9 @@ todo: help links for User, Users, Translations, Translation
|
|||||||
|
|
||||||
todo: set network speed in dev console of firefox to regular 2g then go through all forms and confirm all still works as this will expose any await issues
|
todo: set network speed in dev console of firefox to regular 2g then go through all forms and confirm all still works as this will expose any await issues
|
||||||
todo: Administration - Attached files manager
|
todo: Administration - Attached files manager
|
||||||
|
todo: consider moving canDuplicate etc from a "computed" property into methods (just drag and drop)
|
||||||
|
in fact, look for all computed and consider them carefully because computed seems to be bullshit
|
||||||
|
|
||||||
todo: Administration - History
|
todo: Administration - History
|
||||||
What is this for?
|
What is this for?
|
||||||
Check if something noted in specs or cases or todo's or comments or help file or something from v7 being expanded / broken out
|
Check if something noted in specs or cases or todo's or comments or help file or something from v7 being expanded / broken out
|
||||||
|
|||||||
@@ -162,12 +162,12 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
canSave: function() {
|
canSave: function() {
|
||||||
return this.formState.valid && this.formState.dirty;
|
return this.formState.valid && this.formState.dirty;
|
||||||
},
|
|
||||||
canDuplicate: function() {
|
|
||||||
return this.formState.valid && !this.formState.dirty && vm.rights.change;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
canDuplicate: function() {
|
||||||
|
return this.formState.valid && !this.formState.dirty && vm.rights.change;
|
||||||
|
},
|
||||||
ayaTypes: function() {
|
ayaTypes: function() {
|
||||||
return window.$gz.type;
|
return window.$gz.type;
|
||||||
},
|
},
|
||||||
@@ -238,7 +238,8 @@ export default {
|
|||||||
//clear any errors vm might be around from previous submit
|
//clear any errors vm might be around from previous submit
|
||||||
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
window.$gz.form.deleteAllErrorBoxErrors(vm);
|
||||||
|
|
||||||
let res = await window.$gz.api.upsert(url, submitObject);
|
let res = await window.$gz.api.upsert(url, vm.obj);
|
||||||
|
console.log(res)
|
||||||
if (res.error) {
|
if (res.error) {
|
||||||
vm.formState.serverError = res.error;
|
vm.formState.serverError = res.error;
|
||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
|
|||||||
@@ -407,7 +407,8 @@ export default {
|
|||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
vm.formState.serverError = res.error;
|
vm.formState.serverError = res.error;
|
||||||
window.$gz.form.setErrorBoxErrors(vm);
|
window.$gz.form.setErrorBoxErrors(vm);
|
||||||
|
vm.formState.loading = false;
|
||||||
} else {
|
} else {
|
||||||
vm.obj = res.data;
|
vm.obj = res.data;
|
||||||
//modify the menu as necessary
|
//modify the menu as necessary
|
||||||
@@ -423,9 +424,8 @@ export default {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
window.$gz.errorHandler.handleFormError(error, vm);
|
window.$gz.errorHandler.handleFormError(error, vm);
|
||||||
} finally {
|
|
||||||
vm.formState.loading = false;
|
vm.formState.loading = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async submit() {
|
async submit() {
|
||||||
let vm = this;
|
let vm = this;
|
||||||
|
|||||||
Reference in New Issue
Block a user