eservices-back-core
Advanced tools
@@ -15,3 +15,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const Filter_1 = __importDefault(require("../model/Filter")); | ||
const account_service_1 = __importDefault(require("../services/account-service")); | ||
const data_service_1 = __importDefault(require("../services/data-service")); | ||
/** | ||
@@ -30,3 +32,3 @@ * @description Функция для получения необходимы значения для фильтра. В фильтре находятся поля, которые необходим | ||
case 'CCI': return customerRequestInfo.contextId; | ||
case 'MyGroups': { | ||
case 'MyOrganizations': { | ||
const accountService = new account_service_1.default(customerRequestInfo.token); | ||
@@ -36,2 +38,10 @@ const organizations = yield accountService.getOrganizationListForPerson(customerRequestInfo.personId); | ||
} | ||
case 'MyGroups': { | ||
const dataService = new data_service_1.default(customerRequestInfo.token); | ||
const groups = yield dataService.getList('AssignedUserGroupToUser', { | ||
filter: Filter_1.default.eq('UserId', customerRequestInfo.userId), | ||
fields: "GroupId" | ||
}); | ||
return groups.map(userGroup => userGroup.GroupId); | ||
} | ||
default: { | ||
@@ -38,0 +48,0 @@ if (preset.hasOwnProperty(basename)) |
{ | ||
"name": "eservices-back-core", | ||
"version": "2.0.41", | ||
"version": "2.0.42", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
673125
0.15%8925
0.11%