This commit is contained in:
@@ -934,7 +934,7 @@ export default {
|
||||
vm.setSortIndicatorsFromDataListResponse(res.sortBy);
|
||||
|
||||
//Post process data here and then set vm.records
|
||||
vm.records = buildRecords(
|
||||
vm.records = await buildRecords(
|
||||
res.data,
|
||||
res.columns,
|
||||
vm.ridColumnOpenable
|
||||
@@ -1006,7 +1006,7 @@ function buildHeaders(columnData) {
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//Called by getDataFromApi on retrieval of list with columnData
|
||||
//
|
||||
function buildRecords(listData, columndefinitions, ridColumnOpenable) {
|
||||
async function buildRecords(listData, columndefinitions, ridColumnOpenable) {
|
||||
//iterate data, build each object keyed with index name and display set to correct translated filter and then return
|
||||
|
||||
let ret = [];
|
||||
@@ -1039,6 +1039,7 @@ function buildRecords(listData, columndefinitions, ridColumnOpenable) {
|
||||
if (column.rid) {
|
||||
o.id = column.i;
|
||||
}
|
||||
//console.log("build records column: ", column);
|
||||
|
||||
let dataType = columndefinitions[iColumn].dt;
|
||||
let display = column.v;
|
||||
@@ -1100,9 +1101,13 @@ function buildRecords(listData, columndefinitions, ridColumnOpenable) {
|
||||
);
|
||||
break;
|
||||
case 4: //text
|
||||
// if (display.length > MAX_TEXT_COLUMN_LENGTH) {
|
||||
// display = display.substring(0, MAX_TEXT_COLUMN_LENGTH) + "...";
|
||||
// }
|
||||
//is a translate column?
|
||||
if (columndefinitions[iColumn].tra) {
|
||||
console.log("COLUMN.TRA for: ", display);
|
||||
display = await window.$gz.translation.translateStringWithMultipleKeysAsync(
|
||||
display
|
||||
);
|
||||
}
|
||||
display = window.$gz.util.truncateString(
|
||||
display,
|
||||
MAX_TEXT_COLUMN_LENGTH
|
||||
|
||||
@@ -688,7 +688,7 @@ export default {
|
||||
sentDate: window.$gz.locale.nowUTC8601String(),
|
||||
etaDate: null,
|
||||
returnDate: null,
|
||||
taxCodeId: null, //Is it labor or parts tax code? wasn't in v7 leaving empty for now
|
||||
taxCodeId: null, //Is it labor or parts tax code? wasn't in v7 leaving empty for now
|
||||
isDirty: true,
|
||||
workOrderItemId: this.value.items[this.activeWoItemIndex].id,
|
||||
uid: Date.now(),
|
||||
|
||||
Reference in New Issue
Block a user