diff --git a/ayanova/src/views/ay-data-list-view.vue b/ayanova/src/views/ay-data-list-view.vue index 85f3c100..bd927170 100644 --- a/ayanova/src/views/ay-data-list-view.vue +++ b/ayanova/src/views/ay-data-list-view.vue @@ -303,14 +303,8 @@ function generateMenu(vm) { // // function initForm(vm) { - //fieldDefinitions //return Promise.resolve(); - return populateFieldDefinitions(vm); - //If need to call more then...: - // .then(() => { - // //Must use return here - // return initDataObject(vm); - // }); + return populateFieldDefinitions(vm).then(fetchLocalizedFieldNames(vm)); } //////////////////// @@ -321,7 +315,7 @@ function populateFieldDefinitions(vm) { .get("DataList/ListFields?DataListKey=" + vm.dataListKey) .then(res => { if (res.error != undefined) { - window.$gz.errorHandler.handleFormError(res.error, vm); + throw res.error; } else { vm.fieldDefinitions = res.data; } @@ -339,14 +333,9 @@ function fetchLocalizedFieldNames(vm) { columnKeys.push(cm.ltKey); } //Now fetch all the keys and await the response before returning - return window.$gz.locale - .fetch(columnKeys) - .then(() => { - return; - }) - .catch(err => { - window.$gz.errorHandler.handleFormError(err); - }); + return window.$gz.locale.fetch(columnKeys).then(() => { + return; + }); } ////////////////////