This commit is contained in:
2019-07-12 19:26:36 +00:00
parent b5d5c25d59
commit 4f766ec156
2 changed files with 5 additions and 10 deletions

View File

@@ -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;
}

View File

@@ -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);
}
//////////////////////
//