This commit is contained in:
2020-06-23 23:52:22 +00:00
parent aaa4f5ce28
commit 5078e80a20
3 changed files with 11 additions and 8 deletions

View File

@@ -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: 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
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

View File

@@ -162,12 +162,12 @@ export default {
computed: {
canSave: function() {
return this.formState.valid && this.formState.dirty;
},
canDuplicate: function() {
return this.formState.valid && !this.formState.dirty && vm.rights.change;
}
},
methods: {
canDuplicate: function() {
return this.formState.valid && !this.formState.dirty && vm.rights.change;
},
ayaTypes: function() {
return window.$gz.type;
},
@@ -238,7 +238,8 @@ export default {
//clear any errors vm might be around from previous submit
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) {
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);

View File

@@ -407,7 +407,8 @@ export default {
}, 2000);
}
vm.formState.serverError = res.error;
window.$gz.form.setErrorBoxErrors(vm);
window.$gz.form.setErrorBoxErrors(vm);
vm.formState.loading = false;
} else {
vm.obj = res.data;
//modify the menu as necessary
@@ -423,9 +424,8 @@ export default {
}
} catch (error) {
window.$gz.errorHandler.handleFormError(error, vm);
} finally {
vm.formState.loading = false;
}
}
},
async submit() {
let vm = this;