This commit is contained in:
@@ -72,7 +72,7 @@ export default {
|
|||||||
var ret = this.defaultRightsObject();
|
var ret = this.defaultRightsObject();
|
||||||
|
|
||||||
//Get the type name from the type enum value
|
//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;
|
return o == oType;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/* eslint-disable */
|
/* xeslint-disable */
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/**
|
/**
|
||||||
* v-if="item.hide == false"
|
* v-if="item.hide == false"
|
||||||
@@ -168,7 +168,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
console.log("custom-fields-control::BEFORECREATE: TOP");
|
// console.log("custom-fields-control::BEFORECREATE: TOP");
|
||||||
//check pre-requisites exist just in case
|
//check pre-requisites exist just in case
|
||||||
if (this.$gzdevmode()) {
|
if (this.$gzdevmode()) {
|
||||||
if (!this.$_) {
|
if (!this.$_) {
|
||||||
@@ -184,7 +184,7 @@ export default {
|
|||||||
//var v=this.$store.state.formCustomTemplate[this.formKey];
|
//var v=this.$store.state.formCustomTemplate[this.formKey];
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log("custom-fields-control::BEFORECREATE: TOP");
|
// console.log("custom-fields-control::BEFORECREATE: TOP");
|
||||||
if (this.$gzdevmode()) {
|
if (this.$gzdevmode()) {
|
||||||
//debugger;
|
//debugger;
|
||||||
if (!this.formKey) {
|
if (!this.formKey) {
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ export default {
|
|||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
//don't have access to local data object until here
|
//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);
|
var formSettings = that.$gzform.getFormSettings(FORM_KEY);
|
||||||
/**
|
/**
|
||||||
* {
|
* {
|
||||||
|
|||||||
@@ -198,7 +198,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
/* eslint-disable */
|
/* Xeslint-disable */
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
const FORM_KEY = "inventory-widget-edit";
|
const FORM_KEY = "inventory-widget-edit";
|
||||||
@@ -207,9 +207,6 @@ const FORM_CUSTOM_TEMPLATE_KEY = "widget";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
//debugger;
|
|
||||||
console.log("beforeRouteEnter: TOP");
|
|
||||||
|
|
||||||
var ltKeysRequired = [
|
var ltKeysRequired = [
|
||||||
"Widget",
|
"Widget",
|
||||||
"WidgetName",
|
"WidgetName",
|
||||||
@@ -238,13 +235,12 @@ export default {
|
|||||||
"WidgetCustom16"
|
"WidgetCustom16"
|
||||||
];
|
];
|
||||||
|
|
||||||
$gzlocale
|
window.$gz.locale
|
||||||
.fetch(ltKeysRequired)
|
.fetch(ltKeysRequired)
|
||||||
.then(
|
.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
|
// //very important as this in conjunction with the menu options means
|
||||||
// //navigation guards work properly by just sending people here
|
// //navigation guards work properly by just sending people here
|
||||||
// next(() => {
|
// next(() => {
|
||||||
@@ -253,22 +249,18 @@ export default {
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
console.log("BEFORECREATE: TOP");
|
|
||||||
var vm = this;
|
var vm = this;
|
||||||
initForm(this)
|
initForm(this)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
vm.formState.ready = true;
|
vm.formState.ready = true;
|
||||||
console.log("BEFORECREATE: INITFORM THEN");
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
vm.formState.ready = true;
|
vm.formState.ready = true;
|
||||||
vm.$gzHandleFormError(err);
|
vm.$gzHandleFormError(err);
|
||||||
});
|
});
|
||||||
console.log("BEFORECREATE: BOTTOM");
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log("CREATED: TOP");
|
this.rights = this.$gzrole.getRights(this, window.$gz.type.Widget);
|
||||||
this.rights = this.$gzrole.getRights(this, this.$gztype.Widget);
|
|
||||||
|
|
||||||
this.$gzevent.$on("menu-click", clickHandler);
|
this.$gzevent.$on("menu-click", clickHandler);
|
||||||
//id 0 means create a new record don't load one
|
//id 0 means create a new record don't load one
|
||||||
@@ -616,7 +608,7 @@ function generateMenu(vm) {
|
|||||||
icon: "fa-splotch",
|
icon: "fa-splotch",
|
||||||
title: vm.$gzlocale.get("Widget"),
|
title: vm.$gzlocale.get("Widget"),
|
||||||
helpUrl: "intro/#searching",
|
helpUrl: "intro/#searching",
|
||||||
formData: { formKey: FORM_KEY, ayaType: vm.$gztype.Widget },
|
formData: { formKey: FORM_KEY, ayaType: window.$gz.type.Widget },
|
||||||
menuItems: []
|
menuItems: []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user