diff --git a/ayanova/src/api/form-custom-template.js b/ayanova/src/api/form-custom-template.js index 1ee26c31..cc86c740 100644 --- a/ayanova/src/api/form-custom-template.js +++ b/ayanova/src/api/form-custom-template.js @@ -1,4 +1,4 @@ -/* eslint-disable */ +/* XXXeslint-disable */ import store from "../store"; import gzapi from "./gzapi"; import _ from "../libs/lodash.min.js"; @@ -6,10 +6,9 @@ import _ from "../libs/lodash.min.js"; export default { get(formKey) { return new Promise(function getFormTemplate(resolve) { - if (!_.has(store.state.formCustom, formKey)) { + if (!_.has(store.state.formCustomTemplate, formKey)) { //fetch and populate the store gzapi.get("formcustom/" + formKey).then(res => { - debugger; if (res.error) { throw res.error; } diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index 304d5db2..715dd8f7 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -618,7 +618,9 @@ var JUST_DELETED = false; // function initForm(vm) { return fetchLocaleText(vm).then( - populatePickLists(vm).then(fetchFormCustomTemplate(vm)) + populatePickLists(vm).then( + vm.$gzformcustomtemplate.get(FORM_CUSTOM_TEMPLATE_KEY) + ) ); } @@ -634,12 +636,6 @@ function populatePickLists(vm) { }); } -////////////////////// -// -// -function fetchFormCustomTemplate(vm) { - return vm.$gzformcustomtemplate.get(FORM_CUSTOM_TEMPLATE_KEY); -} ////////////////////// //