This commit is contained in:
2020-12-08 16:06:11 +00:00
parent 883c02ca73
commit b4491a8a31
2 changed files with 38 additions and 1 deletions

View File

@@ -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)