This commit is contained in:
2020-04-19 20:34:18 +00:00
parent d7a68faaf3
commit 26aecf60f3
3 changed files with 31 additions and 13 deletions

View File

@@ -218,6 +218,20 @@
</v-form>
</v-col>
</v-row>
<!-- <v-overlay :value="!formState.ready">
<v-progress-circular
color="secondary"
indeterminate
size="70"
></v-progress-circular>
</v-overlay> -->
<template v-if="!formState.ready">
<v-progress-circular
indeterminate
color="primary"
:size="60"
></v-progress-circular>
</template>
</v-container>
</template>
@@ -237,7 +251,7 @@ export default {
initForm(vm)
.then(() => {
vm.rights = window.$gz.role.getRights(window.$gz.type.Widget);
vm.formState.ready = true;
window.$gz.eventBus.$on("menu-click", clickHandler);
//id 0 means create a new record don't load one
if (vm.$route.params.recordid != 0) {
@@ -251,18 +265,23 @@ export default {
dirty: false,
valid: true,
loading: false,
readOnly: readOnly
readOnly: readOnly,
ready: true
});
// //bugbug WTF? This doesn't make sense, if it's an attempt to hide delete button then that's wrong
// //it's a new record so it can't be deleted so...
// vm.rights.delete = false;
generateMenu(vm);
vm.formState.ready = true;
}
})
.catch(err => {
vm.formState.ready = true;
window.$gz.errorHandler.handleFormError(err, vm);
vm.formState.ready = true;
})
.finally(function() {
// vm.formState.ready = true;
});
},
beforeRouteUpdate(to, from, next) {
@@ -398,6 +417,7 @@ export default {
window.$gz.api
.get(url)
.then(res => {
vm.formState.ready = true;
if (res.error) {
//Not found?
if (res.error.code == "2010") {