This commit is contained in:
@@ -690,6 +690,9 @@ function buildRecords(listData, columndefinitions) {
|
||||
let hour12 = window.$gz.store.state.userOptions.hour12;
|
||||
let currencyName = window.$gz.store.state.userOptions.currencyName;
|
||||
|
||||
//this will cache the first time it's required (if required)
|
||||
let availableRoles = null;
|
||||
|
||||
//comes as an array of arrays, needs to leave as an array of objects representing each row
|
||||
for (let iRow = 0; iRow < listData.length; iRow++) {
|
||||
let row = listData[iRow];
|
||||
@@ -821,7 +824,24 @@ function buildRecords(listData, columndefinitions) {
|
||||
);
|
||||
break;
|
||||
case 17: //Authorization Roles
|
||||
//do nothing yet
|
||||
if (availableRoles == null) {
|
||||
availableRoles = window.$gz.enums.getSelectionList(
|
||||
"AuthorizationRoles"
|
||||
);
|
||||
}
|
||||
let roles = display;
|
||||
let roleNames = [];
|
||||
|
||||
if (roles != null && roles != 0) {
|
||||
for (let i = 0; i < availableRoles.length; i++) {
|
||||
let role = availableRoles[i];
|
||||
if (!!(roles & role.id)) {
|
||||
roleNames.push(role.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
display = roleNames.join(", ");
|
||||
|
||||
break;
|
||||
default:
|
||||
//do nothing, allow it to stay as is (checkbox, plain text etc)
|
||||
|
||||
Reference in New Issue
Block a user