diff --git a/ayanova/src/components/gz-data-table.vue b/ayanova/src/components/gz-data-table.vue index c53c791e..f43e87a9 100644 --- a/ayanova/src/components/gz-data-table.vue +++ b/ayanova/src/components/gz-data-table.vue @@ -70,24 +70,6 @@ export default { getDataFromApi() { //debugger; var that = this; - // var listOptions = { - // offset: 0, - // limit: 5, - // sort: "name", - // asc: true - // }; - - // if ( - // this.localFormSettings.pagination.itemsPerPage && - // this.localFormSettings.pagination.itemsPerPage > 0 - // ) { - // listOptions.offset = - // (this.localFormSettings.pagination.page - 1) * - // this.localFormSettings.pagination.itemsPerPage; - // listOptions.limit = this.localFormSettings.pagination.itemsPerPage; - // } - // listOptions.sort = this.localFormSettings.pagination.sortBy; - // listOptions.asc = !this.localFormSettings.pagination.descending; // //set the list settings in the store since we were successful at retrieval // if ( @@ -104,7 +86,7 @@ export default { // } // }); // } - // var listUrl = "Widget/ListWidgets?" + window.$gz.api.buildQuery(listOptions); + //DataList/list?DataListKey=TestWidgetDataList&Offset=0&Limit=999&DataFilterId=1&mini=true //start with defaults @@ -147,8 +129,33 @@ export default { //Called by getDataFromApi on retrieval of list with columnData function buildHeaders(columnData) { //iterate columns, build headers and return + if (!columnData) { + return []; + } + var ret = []; + //iterate the columns, skip over the first one as it's the df column and not for display + for (var i = 1; i < columnData.length; i++) { + var cm = columnData[i]; + var h = {}; + h["text"] = window.$gz.locale.get(cm.cm); + h["value"] = i; + } +} +/* +{ + text: string + value: string + align?: 'start' | 'center' | 'end' + sortable?: boolean + filterable?: boolean + divider?: boolean + class?: string | string[] + width?: string | number + filter?: (value: any, search: string, item: any) => boolean + sort?: (a: any, b: any) => number } +*/ //Called by getDataFromApi on retrieval of list with columnData function buildRecords(listData) { //iterate columns, build headers and return