From 4f766ec156487c98ab0f40599624ded83216eddf Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Fri, 12 Jul 2019 19:26:36 +0000 Subject: [PATCH] --- ayanova/src/api/form-custom-template.js | 5 ++--- ayanova/src/views/inventory-widget-edit.vue | 10 +++------- 2 files changed, 5 insertions(+), 10 deletions(-) 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); -} ////////////////////// //