This commit is contained in:
@@ -56,7 +56,6 @@ const FORM_KEY = "customize";
|
|||||||
const API_BASE_URL = "FormCustom/";
|
const API_BASE_URL = "FormCustom/";
|
||||||
export default {
|
export default {
|
||||||
beforeRouteEnter(to, from, next) {
|
beforeRouteEnter(to, from, next) {
|
||||||
debugger;
|
|
||||||
var ltKeysRequired = [
|
var ltKeysRequired = [
|
||||||
"FormFieldEntryRequired",
|
"FormFieldEntryRequired",
|
||||||
"FormFieldVisible",
|
"FormFieldVisible",
|
||||||
@@ -73,23 +72,20 @@ export default {
|
|||||||
window.$gz.locale.fetch(ltKeysRequired).then(next());
|
window.$gz.locale.fetch(ltKeysRequired).then(next());
|
||||||
},
|
},
|
||||||
beforeCreate() {
|
beforeCreate() {
|
||||||
alert("HELLO");
|
|
||||||
debugger;
|
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
initForm(this)
|
initForm(this)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
debugger;
|
|
||||||
vm.formState.ready = true;
|
vm.formState.ready = true;
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
debugger;
|
|
||||||
vm.formState.ready = true;
|
vm.formState.ready = true;
|
||||||
window.$gz.errorHandler.handleFormError(err);
|
window.$gz.errorHandler.handleFormError(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// Fetch as needed
|
// Fetch as needed
|
||||||
debugger;
|
|
||||||
this.getDataFromApi();
|
this.getDataFromApi();
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -250,18 +246,15 @@ function generateMenu(vm) {
|
|||||||
|
|
||||||
function initForm(vm) {
|
function initForm(vm) {
|
||||||
//for now just stub this out, may need to hit another route or something in init later so keep for now
|
//for now just stub this out, may need to hit another route or something in init later so keep for now
|
||||||
debugger;
|
// return new Promise((resolve, reject) => {
|
||||||
return new Promise((resolve, reject) => {
|
// resolve(null);
|
||||||
debugger;
|
// // const xhr = new XMLHttpRequest();
|
||||||
resolve(null);
|
// // xhr.open("GET", url);
|
||||||
// const xhr = new XMLHttpRequest();
|
// // xhr.onload = () => resolve(xhr.responseText);
|
||||||
// xhr.open("GET", url);
|
// // xhr.onerror = () => reject(xhr.statusText);
|
||||||
// xhr.onload = () => resolve(xhr.responseText);
|
// // xhr.send();
|
||||||
// xhr.onerror = () => reject(xhr.statusText);
|
// });
|
||||||
// xhr.send();
|
return Promise.resolve(null);
|
||||||
});
|
|
||||||
|
|
||||||
//return Promise.resolve(null);
|
|
||||||
// return populatePickLists(vm);
|
// return populatePickLists(vm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user