This commit is contained in:
@@ -303,14 +303,8 @@ function generateMenu(vm) {
|
|||||||
//
|
//
|
||||||
//
|
//
|
||||||
function initForm(vm) {
|
function initForm(vm) {
|
||||||
//fieldDefinitions
|
|
||||||
//return Promise.resolve();
|
//return Promise.resolve();
|
||||||
return populateFieldDefinitions(vm);
|
return populateFieldDefinitions(vm).then(fetchLocalizedFieldNames(vm));
|
||||||
//If need to call more then...:
|
|
||||||
// .then(() => {
|
|
||||||
// //Must use return here
|
|
||||||
// return initDataObject(vm);
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
@@ -321,7 +315,7 @@ function populateFieldDefinitions(vm) {
|
|||||||
.get("DataList/ListFields?DataListKey=" + vm.dataListKey)
|
.get("DataList/ListFields?DataListKey=" + vm.dataListKey)
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.error != undefined) {
|
if (res.error != undefined) {
|
||||||
window.$gz.errorHandler.handleFormError(res.error, vm);
|
throw res.error;
|
||||||
} else {
|
} else {
|
||||||
vm.fieldDefinitions = res.data;
|
vm.fieldDefinitions = res.data;
|
||||||
}
|
}
|
||||||
@@ -339,14 +333,9 @@ function fetchLocalizedFieldNames(vm) {
|
|||||||
columnKeys.push(cm.ltKey);
|
columnKeys.push(cm.ltKey);
|
||||||
}
|
}
|
||||||
//Now fetch all the keys and await the response before returning
|
//Now fetch all the keys and await the response before returning
|
||||||
return window.$gz.locale
|
return window.$gz.locale.fetch(columnKeys).then(() => {
|
||||||
.fetch(columnKeys)
|
return;
|
||||||
.then(() => {
|
});
|
||||||
return;
|
|
||||||
})
|
|
||||||
.catch(err => {
|
|
||||||
window.$gz.errorHandler.handleFormError(err);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user