This commit is contained in:
@@ -229,6 +229,29 @@
|
||||
><v-icon large>$ayiPlus</v-icon></v-btn
|
||||
>
|
||||
</div>
|
||||
<!-- ROLE BUILDER -->
|
||||
<div v-if="editItem.uiFieldDataType === 17">
|
||||
<v-select
|
||||
v-model="editItem.tempFilterOperator"
|
||||
:items="selectLists.roleFilterOperators"
|
||||
item-text="name"
|
||||
item-value="id"
|
||||
:label="$ay.t('Filter')"
|
||||
prepend-icon="$ayiFilter"
|
||||
></v-select>
|
||||
<gz-role-picker
|
||||
v-if="editItem.tempFilterOperator != null"
|
||||
v-model="editItem.tempFilterValue"
|
||||
></gz-role-picker>
|
||||
|
||||
<v-btn
|
||||
large
|
||||
block
|
||||
v-if="editItem.tempFilterOperator != null"
|
||||
@click="addFilterCondition(editItem)"
|
||||
><v-icon large>$ayiPlus</v-icon></v-btn
|
||||
>
|
||||
</div>
|
||||
<!-- ENUM BUILDER -->
|
||||
<div v-if="editItem.uiFieldDataType === 10">
|
||||
<v-select
|
||||
@@ -369,6 +392,7 @@ export default {
|
||||
boolFilterOperators: [],
|
||||
decimalFilterOperators: [],
|
||||
tagFilterOperators: [],
|
||||
roleFilterOperators: [],
|
||||
enumFilterOperators: [],
|
||||
intervalFilterOperators: []
|
||||
},
|
||||
@@ -856,6 +880,15 @@ function populateSelectionLists(vm) {
|
||||
]
|
||||
);
|
||||
|
||||
vm.selectLists.roleFilterOperators.push(
|
||||
...[
|
||||
{ name: vm.$ay.t("GridRowFilterDropDownEquals"), id: "=" },
|
||||
{ name: vm.$ay.t("GridRowFilterDropDownNotEquals"), id: "!=" },
|
||||
{ name: vm.$ay.t("GridRowFilterDropDownDoesNotContain"), id: "!-%-" },
|
||||
{ name: vm.$ay.t("GridRowFilterDropDownContains"), id: "-%-" }
|
||||
]
|
||||
);
|
||||
|
||||
vm.selectLists.enumFilterOperators.push(
|
||||
...[
|
||||
{ name: vm.$ay.t("GridRowFilterDropDownBlanksItem"), id: "*NOVALUE*" },
|
||||
@@ -1006,6 +1039,22 @@ function getDisplayForFilter(
|
||||
case 15: //INTERVAL / DURATION translate
|
||||
valueDisplay = window.$gz.locale.durationLocalized(filterValue);
|
||||
break;
|
||||
case 17: //Authorization Roles
|
||||
const availableRoles = window.$gz.enums.getSelectionList(
|
||||
"AuthorizationRoles"
|
||||
); //will already be cached from viewing datatable before we get to here
|
||||
const roles = filterValue;
|
||||
const roleNames = [];
|
||||
if (roles != null && roles != 0) {
|
||||
for (let i = 0; i < availableRoles.length; i++) {
|
||||
const role = availableRoles[i];
|
||||
if (!!(roles & role.id)) {
|
||||
roleNames.push(role.name);
|
||||
}
|
||||
}
|
||||
}
|
||||
valueDisplay = roleNames.join(", ");
|
||||
break;
|
||||
default:
|
||||
valueDisplay = filterValue;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user