This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user