This commit is contained in:
2019-07-19 18:35:57 +00:00
parent 18f9f4e870
commit a9704c497d
4 changed files with 10 additions and 18 deletions

View File

@@ -72,7 +72,7 @@ export default {
var ret = this.defaultRightsObject();
//Get the type name from the type enum value
var typeName = _.findKey(vm.$gztype, function(o) {
var typeName = _.findKey(window.$gz.type, function(o) {
return o == oType;
});

View File

@@ -56,7 +56,7 @@
</template>
<script>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* eslint-disable */
/* xeslint-disable */
////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* v-if="item.hide == false"
@@ -168,7 +168,7 @@ export default {
}
},
beforeCreate() {
console.log("custom-fields-control::BEFORECREATE: TOP");
// console.log("custom-fields-control::BEFORECREATE: TOP");
//check pre-requisites exist just in case
if (this.$gzdevmode()) {
if (!this.$_) {
@@ -184,7 +184,7 @@ export default {
//var v=this.$store.state.formCustomTemplate[this.formKey];
},
created() {
console.log("custom-fields-control::BEFORECREATE: TOP");
// console.log("custom-fields-control::BEFORECREATE: TOP");
if (this.$gzdevmode()) {
//debugger;
if (!this.formKey) {

View File

@@ -114,7 +114,7 @@ export default {
})
.then(() => {
//don't have access to local data object until here
that.rights = this.$gzrole.getRights(this, this.$gztype.Widget);
that.rights = this.$gzrole.getRights(this, window.$gz.type.Widget);
var formSettings = that.$gzform.getFormSettings(FORM_KEY);
/**
* {

View File

@@ -198,7 +198,7 @@
<script>
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
/* eslint-disable */
/* Xeslint-disable */
////////////////////////////////////////////////////////////////////////////////////////////////////////////
const FORM_KEY = "inventory-widget-edit";
@@ -207,9 +207,6 @@ const FORM_CUSTOM_TEMPLATE_KEY = "widget";
export default {
beforeRouteEnter(to, from, next) {
//debugger;
console.log("beforeRouteEnter: TOP");
var ltKeysRequired = [
"Widget",
"WidgetName",
@@ -238,13 +235,12 @@ export default {
"WidgetCustom16"
];
$gzlocale
window.$gz.locale
.fetch(ltKeysRequired)
.then(
$gzformcustomtemplate.get(FORM_CUSTOM_TEMPLATE_KEY).then(next())
window.$gz.formCustomTemplate.get(FORM_CUSTOM_TEMPLATE_KEY).then(next())
);
console.log("beforeRouteEnter: BOTTOM");
// //very important as this in conjunction with the menu options means
// //navigation guards work properly by just sending people here
// next(() => {
@@ -253,22 +249,18 @@ export default {
// });
},
beforeCreate() {
console.log("BEFORECREATE: TOP");
var vm = this;
initForm(this)
.then(() => {
vm.formState.ready = true;
console.log("BEFORECREATE: INITFORM THEN");
})
.catch(err => {
vm.formState.ready = true;
vm.$gzHandleFormError(err);
});
console.log("BEFORECREATE: BOTTOM");
},
created() {
console.log("CREATED: TOP");
this.rights = this.$gzrole.getRights(this, this.$gztype.Widget);
this.rights = this.$gzrole.getRights(this, window.$gz.type.Widget);
this.$gzevent.$on("menu-click", clickHandler);
//id 0 means create a new record don't load one
@@ -616,7 +608,7 @@ function generateMenu(vm) {
icon: "fa-splotch",
title: vm.$gzlocale.get("Widget"),
helpUrl: "intro/#searching",
formData: { formKey: FORM_KEY, ayaType: vm.$gztype.Widget },
formData: { formKey: FORM_KEY, ayaType: window.$gz.type.Widget },
menuItems: []
};