@rh-support/cases 2.6.194 → 2.6.195
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseListVariablesBuilder.d.ts","sourceRoot":"","sources":["../../../src/utils/caseListVariablesBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"caseListVariablesBuilder.d.ts","sourceRoot":"","sources":["../../../src/utils/caseListVariablesBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AASnD,OAAO,EAEH,oBAAoB,EAEvB,MAAM,+CAA+C,CAAC;AAOvD,wBAAgB,8BAA8B,CAAC,WAAW,EAAE,oBAAoB,GAAG,MAAM,EAAE,CAM1F;AAED,MAAM,WAAW,yBAAyB;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC7B,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AA0SD,wBAAsB,qCAAqC,CACvD,WAAW,EAAE,oBAAoB,EACjC,YAAY,EAAE,YAAY,EAC1B,eAAe,CAAC,EAAE,gBAAgB,GACnC,OAAO,CAAC,yBAAyB,CAAC,CA8HpC"}
|
|
@@ -7,8 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { GET_CONTACT_BY_SSO, GET_GROUP_IDS_BY_NAME, GET_USER_IDS_BY_FEDERATION, getTechnicalSupportRecordTypeId, } from '@rh-support/utils';
|
|
10
|
+
import { buildAccessRestrictionExclusionFilter, GET_CONTACT_BY_SSO, GET_GROUP_IDS_BY_NAME, GET_USER_IDS_BY_FEDERATION, getTechnicalSupportRecordTypeId, } from '@rh-support/utils';
|
|
11
11
|
import { CaseListColumnIds, caseListSortColumnIdsToGraphQLMap } from '../enums/case';
|
|
12
|
+
import { CaseSearchQueryType } from '../enums/caseSearch';
|
|
12
13
|
import { SolrKeys, SolrPivotKeys } from '../enums/filters';
|
|
13
14
|
import { parseAdvanceSearchDate } from './advanceSearchUtils';
|
|
14
15
|
import { expandStatusGroupsToApiValues } from './statusUtils';
|
|
@@ -17,10 +18,7 @@ export function getOwnerFederationIdsToResolve(filterState) {
|
|
|
17
18
|
if (!filterInfo)
|
|
18
19
|
return [];
|
|
19
20
|
const ownerSso = filterInfo[SolrKeys.caseOwner];
|
|
20
|
-
|
|
21
|
-
const contactSsoSet = new Set(contactSso || []);
|
|
22
|
-
const filteredOwnerSso = (ownerSso || []).filter((sso) => !contactSsoSet.has(sso));
|
|
23
|
-
return [...new Set(filteredOwnerSso)];
|
|
21
|
+
return [...new Set((ownerSso || []).filter(Boolean))];
|
|
24
22
|
}
|
|
25
23
|
function buildOrderByFromSortInfo(sortInfo) {
|
|
26
24
|
var _a;
|
|
@@ -294,6 +292,7 @@ export function createGraphQLVariablesFromFilterState(filterState, apolloClient,
|
|
|
294
292
|
const first = (paginationInfo === null || paginationInfo === void 0 ? void 0 : paginationInfo.pageSize) || 10;
|
|
295
293
|
const orderBy = buildOrderByFromSortInfo(sortInfo);
|
|
296
294
|
const andConditions = [];
|
|
295
|
+
andConditions.push(buildAccessRestrictionExclusionFilter());
|
|
297
296
|
if (filterInfo) {
|
|
298
297
|
const statusFilter = buildStatusFilter(filterInfo[SolrKeys.status]);
|
|
299
298
|
if (statusFilter)
|
|
@@ -336,16 +335,18 @@ export function createGraphQLVariablesFromFilterState(filterState, apolloClient,
|
|
|
336
335
|
const ownerUserIds = (resolvedUserIds === null || resolvedUserIds === void 0 ? void 0 : resolvedUserIds.ownerUserIds) ||
|
|
337
336
|
(assignedToValues.length ? yield resolveOwnerIdsBySearchTerms(assignedToValues, apolloClient) : []);
|
|
338
337
|
const contactIdFilter = buildIdFilter('ContactId', contactIds, Boolean(contactValues === null || contactValues === void 0 ? void 0 : contactValues.length));
|
|
339
|
-
if (contactIdFilter) {
|
|
340
|
-
andConditions.push(contactIdFilter);
|
|
341
|
-
}
|
|
342
338
|
const ownerIdFilter = buildIdFilter('OwnerId', ownerUserIds, assignedToValues.length > 0);
|
|
343
|
-
if (ownerIdFilter) {
|
|
344
|
-
andConditions.push(ownerIdFilter);
|
|
345
|
-
}
|
|
346
339
|
const createdByFilter = buildRedHatSupportUserReferenceFilter('CreatedBy', createdByValues);
|
|
347
|
-
|
|
348
|
-
|
|
340
|
+
const isAdvancedSearch = (filterQueryInfo === null || filterQueryInfo === void 0 ? void 0 : filterQueryInfo.type) === CaseSearchQueryType.ADVANCED;
|
|
341
|
+
const usernameFilters = [contactIdFilter, ownerIdFilter, createdByFilter].filter(Boolean);
|
|
342
|
+
if (isAdvancedSearch) {
|
|
343
|
+
usernameFilters.forEach((filter) => andConditions.push(filter));
|
|
344
|
+
}
|
|
345
|
+
else if (usernameFilters.length === 1) {
|
|
346
|
+
andConditions.push(usernameFilters[0]);
|
|
347
|
+
}
|
|
348
|
+
else if (usernameFilters.length > 1) {
|
|
349
|
+
andConditions.push({ or: usernameFilters });
|
|
349
350
|
}
|
|
350
351
|
const lastModifiedByFilter = buildRedHatSupportUserReferenceFilter('LastModifiedBy', modifiedByValues);
|
|
351
352
|
if (lastModifiedByFilter) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.195",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -38,11 +38,11 @@
|
|
|
38
38
|
"@patternfly/patternfly": "6.2.1",
|
|
39
39
|
"@patternfly/react-core": "6.2.1",
|
|
40
40
|
"@patternfly/react-table": "6.2.1",
|
|
41
|
-
"@rh-support/components": "2.5.
|
|
42
|
-
"@rh-support/react-context": "2.5.
|
|
41
|
+
"@rh-support/components": "2.5.191",
|
|
42
|
+
"@rh-support/react-context": "2.5.285",
|
|
43
43
|
"@rh-support/types": "2.0.26",
|
|
44
|
-
"@rh-support/user-permissions": "2.5.
|
|
45
|
-
"@rh-support/utils": "2.5.
|
|
44
|
+
"@rh-support/user-permissions": "2.5.137",
|
|
45
|
+
"@rh-support/utils": "2.5.119",
|
|
46
46
|
"localforage": "^1.10.0",
|
|
47
47
|
"lodash": "^4.17.21",
|
|
48
48
|
"pegjs": "^0.10.0",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"defaults and supports es6-module",
|
|
93
93
|
"maintained node versions"
|
|
94
94
|
],
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "e737fe04f1e771923e483cd65f7d6f6f87b53356"
|
|
96
96
|
}
|