This commit is contained in:
@@ -24,6 +24,8 @@ export default {
|
||||
}
|
||||
|
||||
if (needIt.length == 0) {
|
||||
//eslint-disable-next-line
|
||||
debugger;
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
@@ -36,6 +38,8 @@ export default {
|
||||
_.forEach(response.data, function commitFetchedLTItemToStore(item) {
|
||||
store.commit("addLocaleText", item);
|
||||
});
|
||||
//eslint-disable-next-line
|
||||
debugger;
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -266,51 +266,124 @@ function generateMenu(vm) {
|
||||
|
||||
var JUST_DELETED = false;
|
||||
|
||||
//////////////////////
|
||||
//
|
||||
//
|
||||
function initForm(vm) {
|
||||
return populatePickLists(vm).then(() => {
|
||||
return fetchLocaleText(vm);
|
||||
//eslint-disable-next-line
|
||||
debugger;
|
||||
});
|
||||
//return fetchLocaleText().then(populatePickLists(vm));
|
||||
}
|
||||
|
||||
function populatePickLists(vm) {
|
||||
return vm.$gzapi
|
||||
.get("AyaEnumPickList/list/authorizationroles") //roles
|
||||
.then(res => {
|
||||
if (res.error) {
|
||||
throw res.error;
|
||||
}
|
||||
//populate here but for now show it
|
||||
//eslint-disable-next-line
|
||||
debugger;
|
||||
});
|
||||
}
|
||||
|
||||
function fetchLocaleText(vm) {
|
||||
//Cache all required lt keys
|
||||
var ltKeysRequired = [
|
||||
"Widget",
|
||||
"WidgetName",
|
||||
"WidgetSerial",
|
||||
"WidgetDollarAmount",
|
||||
"WidgetCount",
|
||||
"WidgetRoles",
|
||||
"WidgetStartDate",
|
||||
"WidgetEndDate",
|
||||
"WidgetNotes",
|
||||
"WidgetCustom1",
|
||||
"WidgetCustom2",
|
||||
"WidgetCustom3",
|
||||
"WidgetCustom4",
|
||||
"WidgetCustom5",
|
||||
"WidgetCustom6",
|
||||
"WidgetCustom7",
|
||||
"WidgetCustom8",
|
||||
"WidgetCustom9",
|
||||
"WidgetCustom10",
|
||||
"WidgetCustom11",
|
||||
"WidgetCustom12",
|
||||
"WidgetCustom13",
|
||||
"WidgetCustom14",
|
||||
"WidgetCustom15",
|
||||
"WidgetCustom16"
|
||||
];
|
||||
|
||||
return vm.$gzlocale.fetch(ltKeysRequired).then(() => {
|
||||
//eslint-disable-next-line
|
||||
debugger;
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
beforeCreate() {
|
||||
//console.log("BEFORECREATE: TOP");
|
||||
|
||||
//Cache all required lt keys
|
||||
var ltKeysRequired = [
|
||||
"Widget",
|
||||
"WidgetName",
|
||||
"WidgetSerial",
|
||||
"WidgetDollarAmount",
|
||||
"WidgetCount",
|
||||
"WidgetRoles",
|
||||
"WidgetStartDate",
|
||||
"WidgetEndDate",
|
||||
"WidgetNotes",
|
||||
"WidgetCustom1",
|
||||
"WidgetCustom2",
|
||||
"WidgetCustom3",
|
||||
"WidgetCustom4",
|
||||
"WidgetCustom5",
|
||||
"WidgetCustom6",
|
||||
"WidgetCustom7",
|
||||
"WidgetCustom8",
|
||||
"WidgetCustom9",
|
||||
"WidgetCustom10",
|
||||
"WidgetCustom11",
|
||||
"WidgetCustom12",
|
||||
"WidgetCustom13",
|
||||
"WidgetCustom14",
|
||||
"WidgetCustom15",
|
||||
"WidgetCustom16"
|
||||
];
|
||||
var vm = this;
|
||||
this.$gzlocale
|
||||
.fetch(ltKeysRequired)
|
||||
initForm(this)
|
||||
.then(() => {
|
||||
//populate all form pick list data
|
||||
|
||||
//don't have access to local data object until here
|
||||
//eslint-disable-next-line
|
||||
debugger;
|
||||
vm.formState.ready = true;
|
||||
})
|
||||
.catch(err => {
|
||||
vm.formState.ready = true;
|
||||
vm.$gzHandleFormError(err);
|
||||
});
|
||||
|
||||
// //Cache all required lt keys
|
||||
// var ltKeysRequired = [
|
||||
// "Widget",
|
||||
// "WidgetName",
|
||||
// "WidgetSerial",
|
||||
// "WidgetDollarAmount",
|
||||
// "WidgetCount",
|
||||
// "WidgetRoles",
|
||||
// "WidgetStartDate",
|
||||
// "WidgetEndDate",
|
||||
// "WidgetNotes",
|
||||
// "WidgetCustom1",
|
||||
// "WidgetCustom2",
|
||||
// "WidgetCustom3",
|
||||
// "WidgetCustom4",
|
||||
// "WidgetCustom5",
|
||||
// "WidgetCustom6",
|
||||
// "WidgetCustom7",
|
||||
// "WidgetCustom8",
|
||||
// "WidgetCustom9",
|
||||
// "WidgetCustom10",
|
||||
// "WidgetCustom11",
|
||||
// "WidgetCustom12",
|
||||
// "WidgetCustom13",
|
||||
// "WidgetCustom14",
|
||||
// "WidgetCustom15",
|
||||
// "WidgetCustom16"
|
||||
// ];
|
||||
|
||||
// this.$gzlocale
|
||||
// .fetch(ltKeysRequired)
|
||||
// .then(() => {
|
||||
// //populate all form pick list data
|
||||
// populatePickLists().then(() => {
|
||||
// //don't have access to local data object until here
|
||||
// vm.formState.ready = true;
|
||||
// });
|
||||
// })
|
||||
// .catch(err => {
|
||||
// vm.formState.ready = true;
|
||||
// vm.$gzHandleFormError(err);
|
||||
// });
|
||||
},
|
||||
created() {
|
||||
// console.log("CREATED: TOP");
|
||||
|
||||
Reference in New Issue
Block a user