vm.roleSelectOptions = [];
vm.selectedRole = null;
vm.onRoleChange = onRoleChange;
function loadFilteringDictionaries() {
userRepository.getRoles()
.then(function(data) {
vm.roleSelectOptions = data || vm.roleSelectOptions;
vm.selectedRole = vm.roleSelectOptions[0] || null;
});
}
function onRoleChange(option) {
vm.filter.useRoleFilter = (option !== vm.roleSelectOptions[0]);
vm.filter.roleFilter = option.id;
search(true);
}