@rh-support/cases 0.2.24 → 0.2.28
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.
- package/lib/esm/components/case-list/CaseList.d.ts.map +1 -1
- package/lib/esm/components/case-list/CaseList.js +47 -26
- package/lib/esm/components/case-list/CaseListFilterReducer.d.ts +1 -0
- package/lib/esm/components/case-list/CaseListFilterReducer.d.ts.map +1 -1
- package/lib/esm/components/case-list/CaseListFilterReducer.js +2 -0
- package/lib/esm/components/case-list/case-list-filters/CaseListFilters.d.ts +8 -2
- package/lib/esm/components/case-list/case-list-filters/CaseListFilters.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/CaseListFilters.js +10 -9
- package/lib/esm/components/case-list/case-list-filters/ProductsFilter.d.ts +2 -1
- package/lib/esm/components/case-list/case-list-filters/ProductsFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/ProductsFilter.js +8 -1
- package/lib/esm/components/case-list/case-list-filters/SeverityFilter.d.ts +2 -1
- package/lib/esm/components/case-list/case-list-filters/SeverityFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/SeverityFilter.js +6 -5
- package/lib/esm/components/case-list/case-list-filters/StatusFilter.d.ts +2 -0
- package/lib/esm/components/case-list/case-list-filters/StatusFilter.d.ts.map +1 -1
- package/lib/esm/components/case-list/case-list-filters/StatusFilter.js +17 -9
- package/lib/esm/components/case-list/case-list-filters/TypeFilter.d.ts +6 -0
- package/lib/esm/components/case-list/case-list-filters/TypeFilter.d.ts.map +1 -0
- package/lib/esm/components/case-list/case-list-filters/TypeFilter.js +18 -0
- package/lib/esm/enums/case.d.ts +14 -0
- package/lib/esm/enums/case.d.ts.map +1 -1
- package/lib/esm/enums/case.js +14 -0
- package/lib/esm/enums/caseSearch.d.ts +1 -0
- package/lib/esm/enums/caseSearch.d.ts.map +1 -1
- package/lib/esm/enums/caseSearch.js +1 -0
- package/lib/esm/enums/filters.d.ts +2 -1
- package/lib/esm/enums/filters.d.ts.map +1 -1
- package/lib/esm/enums/filters.js +1 -0
- package/lib/esm/i18n/template-de.d.ts +1 -1
- package/lib/esm/i18n/template-de.js +1 -1
- package/lib/esm/i18n/template-es.d.ts +1 -1
- package/lib/esm/i18n/template-es.js +1 -1
- package/lib/esm/i18n/template-fr.d.ts +1 -1
- package/lib/esm/i18n/template-fr.js +1 -1
- package/lib/esm/i18n/template-it.d.ts +1 -1
- package/lib/esm/i18n/template-it.js +1 -1
- package/lib/esm/i18n/template-jp.d.ts +1 -1
- package/lib/esm/i18n/template-jp.js +1 -1
- package/lib/esm/i18n/template-ko.d.ts +1 -1
- package/lib/esm/i18n/template-ko.js +1 -1
- package/lib/esm/i18n/template-pt.d.ts +1 -1
- package/lib/esm/i18n/template-pt.js +1 -1
- package/lib/esm/i18n/template-ru.d.ts +1 -1
- package/lib/esm/i18n/template-ru.js +1 -1
- package/lib/esm/i18n/template-zh.d.ts +1 -1
- package/lib/esm/i18n/template-zh.js +1 -1
- package/lib/esm/test-utils/mockData.d.ts +1 -0
- package/lib/esm/test-utils/mockData.d.ts.map +1 -1
- package/lib/esm/test-utils/mockData.js +1 -0
- package/lib/esm/utils/caseListUtils.d.ts +7 -1
- package/lib/esm/utils/caseListUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseListUtils.js +63 -37
- package/lib/esm/utils/caseSearchUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseSearchUtils.js +6 -3
- package/lib/esm/utils/constants.d.ts +1 -0
- package/lib/esm/utils/constants.d.ts.map +1 -1
- package/lib/esm/utils/constants.js +1 -0
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseList.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseList.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseList.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseList.tsx"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,0BAA0B,CAAC;AA4BlC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAKH,0BAA0B,EAI7B,MAAM,mBAAmB,CAAC;AAK3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,cAAc,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAK1C,OAAO,EAAgB,WAAW,EAA2B,MAAM,uBAAuB,CAAC;AA4B3F,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc;IAC3D,YAAY,EAAE,cAAc,EAAE,CAAC;CAClC;AAED,oBAAY,YAAY,GAAG,0BAA0B,CAAC,WAAW,EAAE,uBAAuB,CAAC,CAAC;AAM5F,MAAM,WAAW,gBAAgB;IAC7B,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAAC;CAChC;AAED,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CAC1B;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eAucrC"}
|
|
@@ -15,9 +15,8 @@ import AngleDoubleLeftIcon from '@patternfly/react-icons/dist/js/icons/angle-dou
|
|
|
15
15
|
import AngleDoubleRightIcon from '@patternfly/react-icons/dist/js/icons/angle-double-right-icon';
|
|
16
16
|
import AngleDoubleUpIcon from '@patternfly/react-icons/dist/js/icons/angle-double-up-icon';
|
|
17
17
|
import { ErrorBoundary, ToastNotification, useBreakpoint, useDocumentTitle, useForceUpdate, usePrevious, } from '@rh-support/components';
|
|
18
|
-
import { fetchCaseGroupsForSSO, fetchCaseTypes, GlobalMetadataDispatchContext, GlobalMetadataStateContext, setUserPreferences, updateUserPreferences, UserPreferencesKeys, } from '@rh-support/react-context';
|
|
19
|
-
import {
|
|
20
|
-
import every from 'lodash/every';
|
|
18
|
+
import { fetchAllStatuses, fetchCaseGroupsForSSO, fetchCaseSeverities, fetchCaseTypes, fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext, setUserPreferences, updateUserPreferences, UserPreferencesKeys, } from '@rh-support/react-context';
|
|
19
|
+
import { getStringifiedParams, getUrlParsedParams, haventLoadedMetadata, haventLoadedProductsMetadata, pendoTrackEvent, solrResponseToFacetFields, solrResponseToPivotFields, } from '@rh-support/utils';
|
|
21
20
|
import get from 'lodash/get';
|
|
22
21
|
import some from 'lodash/some';
|
|
23
22
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -48,7 +47,7 @@ export function CaseList(props) {
|
|
|
48
47
|
const { caseList, pivotValues, isFetching, filterValuesFromFacetResponse, currentQuery } = useCaseListStateContext();
|
|
49
48
|
const CaseListDispatch = useCaseListDispatchContext();
|
|
50
49
|
const breakPoint = useBreakpoint();
|
|
51
|
-
const { globalMetadataState, globalMetadataState: { caseGroups, loggedInUserJwtToken, loggedInUserRights, loggedInUsersAccount, userPreferences, managedAccounts, bookmarkedAccounts, bookmarkedGroupAccounts, allCaseTypes,
|
|
50
|
+
const { globalMetadataState, globalMetadataState: { caseGroups, loggedInUserJwtToken, loggedInUserRights, loggedInUsersAccount, userPreferences, managedAccounts, bookmarkedAccounts, bookmarkedGroupAccounts, allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts, }, } = useContext(GlobalMetadataStateContext);
|
|
52
51
|
const location = useLocation();
|
|
53
52
|
const searchParams = getUrlParsedParams(location.search);
|
|
54
53
|
const queryFromUrl = searchParams[FILTER_URL_QUERY_SEARCH_PARAM];
|
|
@@ -68,11 +67,10 @@ export function CaseList(props) {
|
|
|
68
67
|
const prevSearchType = usePrevious(filterState.filterQueryInfo.type);
|
|
69
68
|
let isSearchTypeChanged = filterState.filterQueryInfo.type !== prevSearchType;
|
|
70
69
|
const [hasError, setHasError] = useState(null);
|
|
71
|
-
const
|
|
72
|
-
// sfdc call should be called only when we don't have any filter applied
|
|
73
|
-
const forceSfdcSearch = () => every(filterState.filterInfo, (filter) => filter.length === 0);
|
|
70
|
+
const [isSolrSearchDown, setSolrSearchDown] = useState(false);
|
|
74
71
|
function getCases(currentFilterState) {
|
|
75
72
|
return __awaiter(this, void 0, void 0, function* () {
|
|
73
|
+
let showError;
|
|
76
74
|
try {
|
|
77
75
|
setIsFetching(CaseListDispatch, true);
|
|
78
76
|
setHasError(false);
|
|
@@ -83,10 +81,12 @@ export function CaseList(props) {
|
|
|
83
81
|
// recreate a new AbortController for each call
|
|
84
82
|
let controller = new AbortController();
|
|
85
83
|
abortControllerRef.current = controller;
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
84
|
+
const { caseListResponse, isSolrSearchDownSFDCUp, showErrorMessage } = yield getCaseList(currentFilterState, loggedInUserRights.data, loggedInUsersAccount.data, controller.signal);
|
|
85
|
+
showError = showErrorMessage;
|
|
86
|
+
setSolrSearchDown(isSolrSearchDownSFDCUp);
|
|
87
|
+
setFilterValuesFromFacetResponse(CaseListDispatch, solrResponseToFacetFields(caseListResponse));
|
|
88
|
+
setPivotValues(CaseListDispatch, solrResponseToPivotFields(caseListResponse));
|
|
89
|
+
setCaseList(CaseListDispatch, caseListResponse.response);
|
|
90
90
|
setIsFetching(CaseListDispatch, false);
|
|
91
91
|
}
|
|
92
92
|
catch (err) {
|
|
@@ -94,7 +94,7 @@ export function CaseList(props) {
|
|
|
94
94
|
if (!isAbortError) {
|
|
95
95
|
setIsFetching(CaseListDispatch, false);
|
|
96
96
|
setHasError(true);
|
|
97
|
-
ToastNotification.addXHRErrorMessage(err);
|
|
97
|
+
showError && ToastNotification.addXHRErrorMessage(err);
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
});
|
|
@@ -130,15 +130,16 @@ export function CaseList(props) {
|
|
|
130
130
|
};
|
|
131
131
|
const checkNewCases = () => __awaiter(this, void 0, void 0, function* () {
|
|
132
132
|
try {
|
|
133
|
-
const
|
|
133
|
+
const { caseListResponse, isSolrSearchDownSFDCUp } = yield getCaseList(filterState, loggedInUserRights.data, loggedInUsersAccount.data, null);
|
|
134
|
+
setSolrSearchDown(isSolrSearchDownSFDCUp);
|
|
134
135
|
let changed = false;
|
|
135
|
-
if (
|
|
136
|
-
|
|
136
|
+
if (caseListResponse.response.numFound <= filterState.paginationInfo.pageSize &&
|
|
137
|
+
caseListResponse.response.numFound !== caseList.numFound) {
|
|
137
138
|
changed = true;
|
|
138
139
|
}
|
|
139
140
|
else {
|
|
140
141
|
const caseIDModifiedDateObj = {};
|
|
141
|
-
|
|
142
|
+
caseListResponse.response.docs.forEach((res) => {
|
|
142
143
|
caseIDModifiedDateObj[res.case_number] = res.case_lastModifiedDate;
|
|
143
144
|
});
|
|
144
145
|
changed = some(caseList.docs, (doc) => {
|
|
@@ -151,7 +152,7 @@ export function CaseList(props) {
|
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
154
|
if (changed) {
|
|
154
|
-
setCaseList(CaseListDispatch,
|
|
155
|
+
setCaseList(CaseListDispatch, caseListResponse.response);
|
|
155
156
|
pendoTrackEvent(UpdatedCaseDataEvent);
|
|
156
157
|
ToastNotification.addSuccessMessage(t('Case data has been updated'));
|
|
157
158
|
}
|
|
@@ -169,7 +170,27 @@ export function CaseList(props) {
|
|
|
169
170
|
if (haventLoadedMetadata(allCaseTypes)) {
|
|
170
171
|
fetchCaseTypes(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport);
|
|
171
172
|
}
|
|
172
|
-
|
|
173
|
+
// when solr is down, we use hydra metadata api to populated filter dropdowns
|
|
174
|
+
if (isSolrSearchDown) {
|
|
175
|
+
if (haventLoadedMetadata(allCaseSeverities)) {
|
|
176
|
+
fetchCaseSeverities(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport);
|
|
177
|
+
}
|
|
178
|
+
if (haventLoadedMetadata(allCaseStatuses)) {
|
|
179
|
+
fetchAllStatuses(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport);
|
|
180
|
+
}
|
|
181
|
+
if (haventLoadedProductsMetadata(allProducts)) {
|
|
182
|
+
fetchProducts(dispatchToGlobalMetadataReducer);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}, [
|
|
186
|
+
allCaseTypes,
|
|
187
|
+
allCaseSeverities,
|
|
188
|
+
allCaseStatuses,
|
|
189
|
+
allProducts,
|
|
190
|
+
dispatchToGlobalMetadataReducer,
|
|
191
|
+
loggedInUsersAccount.data.secureSupport,
|
|
192
|
+
isSolrSearchDown,
|
|
193
|
+
]);
|
|
173
194
|
// effect to update url query and call get case api whenever filter state changes
|
|
174
195
|
useEffect(() => {
|
|
175
196
|
var _a;
|
|
@@ -279,14 +300,14 @@ export function CaseList(props) {
|
|
|
279
300
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
280
301
|
}, [breakPoint]);
|
|
281
302
|
return (React.createElement("article", { id: "rh-support-cases", className: "cases-main" },
|
|
303
|
+
isSolrSearchDown && (React.createElement("div", null,
|
|
304
|
+
React.createElement(Alert, { isInline: true, variant: AlertVariant.warning, title: React.createElement(Trans, null,
|
|
305
|
+
"Case search is working with limited functionality. Please check",
|
|
306
|
+
' ',
|
|
307
|
+
React.createElement("a", { href: "https://status.redhat.com", target: "_blank", rel: "noreferrer" }, "status page"),
|
|
308
|
+
' ',
|
|
309
|
+
"for details.") }))),
|
|
282
310
|
React.createElement("section", { className: "case-search-top" },
|
|
283
|
-
alwaysUseSFDC && (React.createElement("div", null,
|
|
284
|
-
React.createElement(Alert, { className: "pf-u-mb-md", isInline: true, variant: AlertVariant.warning, title: React.createElement(Trans, null,
|
|
285
|
-
"Case search is working with limited functionality. Please check",
|
|
286
|
-
' ',
|
|
287
|
-
React.createElement("a", { href: "https://status.redhat.com", target: "_blank", rel: "noreferrer" }, "status page"),
|
|
288
|
-
' ',
|
|
289
|
-
"for details.") }))),
|
|
290
311
|
React.createElement("div", { className: "search-wrapper" },
|
|
291
312
|
React.createElement("div", { className: "open-case" },
|
|
292
313
|
React.createElement(NewCaseButton, { routeProps: props.routeProps })),
|
|
@@ -304,7 +325,7 @@ export function CaseList(props) {
|
|
|
304
325
|
React.createElement("div", { className: "filter-wrapper" },
|
|
305
326
|
React.createElement("pfe-collapse-panel", { id: "case-filters-panel", "pfe-animation": "false", ref: filterSectionRef },
|
|
306
327
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading filters') } },
|
|
307
|
-
React.createElement(CaseListFilters, { filterValues: filterValuesFromFacetResponse })))))),
|
|
328
|
+
React.createElement(CaseListFilters, { filterValues: filterValuesFromFacetResponse, allCaseTypes: allCaseTypes, allCaseStatuses: allCaseStatuses, allCaseSeverities: allCaseSeverities, allProducts: allProducts, isSolrSearchDown: isSolrSearchDown })))))),
|
|
308
329
|
React.createElement("section", { className: "case-search-table" },
|
|
309
330
|
React.createElement(CaseListTable, { caseList: caseList, caseGroups: caseGroups.data || [], loggedInUserRights: loggedInUserRights.data, sortInfo: filterState.sortInfo, paginationInfo: filterState.paginationInfo, isCaseListPageLoading: isFetching, hasError: hasError })))));
|
|
310
331
|
}
|
|
@@ -39,6 +39,7 @@ export interface IFilterInfo {
|
|
|
39
39
|
[SolrKeys.escalation]: Array<IKeyValue<string>>;
|
|
40
40
|
[SolrKeys.createdBySsoUsername]: Array<string>;
|
|
41
41
|
[SolrKeys.caseContactSSO]: Array<string>;
|
|
42
|
+
[SolrKeys.type]: Array<string>;
|
|
42
43
|
}
|
|
43
44
|
export declare const emptyFilters: IFilterInfo;
|
|
44
45
|
export interface ICaseListFilterState {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseListFilterReducer.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseListFilterReducer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9D,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"CaseListFilterReducer.d.ts","sourceRoot":"","sources":["../../../../src/components/case-list/CaseListFilterReducer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9D,eAAO,MAAM,iBAAiB,EAAE,OAAO,CAAC,WAAW,CAWlD,CAAC;AAEF,aAAK,mBAAmB;IACpB,YAAY,kBAAkB;IAC9B,aAAa,mBAAmB;IAChC,UAAU,gBAAgB;IAC1B,gBAAgB,sBAAsB;IACtC,iBAAiB,wBAAwB;IACzC,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,qBAAqB,6BAA6B;IAClD,WAAW,iBAAiB;CAC/B;AAED,MAAM,WAAW,SAAS;IACtB,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAe;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,gBAAgB;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,WAAW;IACxB,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IAClD,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IACnD,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAC3C,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpC,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,YAAY,EAAE,WAW1B,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACjC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,cAAc,CAAC,EAAE,eAAe,CAAC;IACjC,eAAe,CAAC,EAAE,gBAAgB,CAAC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CACrC;AAED,oBAAY,WAAW,GAAG,MAAM,WAAW,CAAC;AAC5C,aAAK,WAAW,GAAG,OAAO,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;AACtE,oBAAY,0BAA0B,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAEtE,QAAA,MAAM,qBAAqB,WAAY,oBAAoB,kBAAW,oBAyCrE,CAAC;AAEF,iBAAS,UAAU,CAAC,QAAQ,EAAE,0BAA0B,EAAE,QAAQ,EAAE,SAAS,QAK5E;AAED,iBAAS,gBAAgB,CAAC,QAAQ,EAAE,0BAA0B,EAAE,cAAc,EAAE,eAAe,QAK9F;AAED,iBAAS,YAAY,CAAC,QAAQ,EAAE,0BAA0B,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;;;CAAA,QAKhF;AAED,iBAAS,aAAa,CAAC,QAAQ,EAAE,0BAA0B,EAAE,OAAO,KAAA,QAUnE;AAED,iBAAS,gBAAgB,CAAC,QAAQ,KAAA,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE;;;CAAA,QAKvD;AAED,QAAA,MAAM,YAAY,qCAAgC,OAAO,SAOxD,CAAC;AAEF,iBAAS,yBAAyB,CAAC,QAAQ,KAAA,QAI1C;AAED,iBAAS,iBAAiB,CAAC,QAAQ,EAAE,0BAA0B,EAAE,eAAe,EAAE,gBAAgB,QAKjG;AAED,iBAAS,iBAAiB,CAAC,QAAQ,EAAE,0BAA0B,EAAE,QAAQ,EAAE,OAAO,CAAC,oBAAoB,CAAC,QAKvG;AAED,OAAO,EACH,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,yBAAyB,GAC5B,CAAC"}
|
|
@@ -10,6 +10,7 @@ export const initialFilterInfo = {
|
|
|
10
10
|
[SolrKeys.escalation]: [],
|
|
11
11
|
[SolrKeys.createdBySsoUsername]: [],
|
|
12
12
|
[SolrKeys.caseContactSSO]: [],
|
|
13
|
+
[SolrKeys.type]: [],
|
|
13
14
|
};
|
|
14
15
|
var CaseListReducerEnum;
|
|
15
16
|
(function (CaseListReducerEnum) {
|
|
@@ -33,6 +34,7 @@ export const emptyFilters = {
|
|
|
33
34
|
[SolrKeys.escalation]: [],
|
|
34
35
|
[SolrKeys.createdBySsoUsername]: [],
|
|
35
36
|
[SolrKeys.caseContactSSO]: [],
|
|
37
|
+
[SolrKeys.type]: [],
|
|
36
38
|
};
|
|
37
39
|
const caseListFilterReducer = (pState, action) => {
|
|
38
40
|
switch (action.type) {
|
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IApiResponseDetails } from '@rh-support/types/shared';
|
|
2
|
+
import { ISolrResponseToFacetFields, ITroubleshootProductResponse } from '@rh-support/utils';
|
|
2
3
|
import { IFacetFields } from '../../../models/caseList';
|
|
3
4
|
interface IProps {
|
|
4
5
|
filterValues: ISolrResponseToFacetFields<IFacetFields>;
|
|
6
|
+
isSolrSearchDown: boolean;
|
|
7
|
+
allCaseTypes: IApiResponseDetails<string[]>;
|
|
8
|
+
allCaseStatuses: IApiResponseDetails<string[]>;
|
|
9
|
+
allCaseSeverities: IApiResponseDetails<string[]>;
|
|
10
|
+
allProducts: IApiResponseDetails<ITroubleshootProductResponse>;
|
|
5
11
|
}
|
|
6
|
-
export declare const CaseListFilters: ({ filterValues }: IProps) => JSX.Element;
|
|
12
|
+
export declare const CaseListFilters: ({ filterValues, allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts, isSolrSearchDown, }: IProps) => JSX.Element;
|
|
7
13
|
export {};
|
|
8
14
|
//# sourceMappingURL=CaseListFilters.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseListFilters.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilters.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseListFilters.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/CaseListFilters.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AAK7F,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAWxD,UAAU,MAAM;IACZ,YAAY,EAAE,0BAA0B,CAAC,YAAY,CAAC,CAAC;IACvD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IAC5C,eAAe,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IAC/C,iBAAiB,EAAE,mBAAmB,CAAC,MAAM,EAAE,CAAC,CAAC;IACjD,WAAW,EAAE,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;CAClE;AAID,eAAO,MAAM,eAAe,uGAOzB,MAAM,gBA0ER,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
2
1
|
import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
3
2
|
import get from 'lodash/get';
|
|
4
3
|
import React, { useContext } from 'react';
|
|
@@ -11,11 +10,12 @@ import { GroupsFilter } from './GroupsFilter';
|
|
|
11
10
|
import { ProductsFilter } from './ProductsFilter';
|
|
12
11
|
import { SeverityFilter } from './SeverityFilter';
|
|
13
12
|
import { StatusFilter } from './StatusFilter';
|
|
13
|
+
import { TypeFilter } from './TypeFilter';
|
|
14
14
|
// Adding a new filter here? Make sure you add in caseSearchUtils also so that
|
|
15
15
|
// it get included in the solr search query fq parameter
|
|
16
|
-
export const CaseListFilters = ({ filterValues }) => {
|
|
16
|
+
export const CaseListFilters = ({ filterValues, allCaseTypes, allCaseSeverities, allCaseStatuses, allProducts, isSolrSearchDown, }) => {
|
|
17
|
+
var _a;
|
|
17
18
|
const ability = useContext(AbilityContext);
|
|
18
|
-
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
19
19
|
const canReadBookmarkAccounts = ability.can(resourceActions.READ, resources.BOOKMARK_ACCOUNTS);
|
|
20
20
|
const canManageBookmarkAccounts = ability.can(resourceActions.CREATE, resources.BOOKMARK_ACCOUNTS);
|
|
21
21
|
const canAccessManagedAccounts = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.MANAGED_ACCOUNTS);
|
|
@@ -24,16 +24,17 @@ export const CaseListFilters = ({ filterValues }) => {
|
|
|
24
24
|
const canAccessSeverityFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.SEVERITY_FILTER);
|
|
25
25
|
const canAccessAdditionalFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.ADDITIONAL_FILTER);
|
|
26
26
|
const canAccessGroupsFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.GROUPS_FILTER);
|
|
27
|
-
const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
|
|
28
27
|
const canAccessCreatorFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.CREATOR_FILTER);
|
|
28
|
+
const canAccessTypeFilter = ability.can(resourceActions.PATCH, resources.CASE_LIST, CaseListFields.TYPE_FILTER);
|
|
29
29
|
return (React.createElement(React.Fragment, null,
|
|
30
30
|
React.createElement("div", { className: "filter-group" },
|
|
31
|
-
canReadBookmarkAccounts && React.createElement(AccountsFilter, { canReadBookmarkAccounts: canReadBookmarkAccounts }),
|
|
31
|
+
!isSolrSearchDown && canReadBookmarkAccounts && (React.createElement(AccountsFilter, { canReadBookmarkAccounts: canReadBookmarkAccounts })),
|
|
32
32
|
(canReadBookmarkAccounts || canAccessManagedAccounts) && (React.createElement(AccountsFilterWrapper, { canManageBookmarkAccounts: canManageBookmarkAccounts, canReadBookmarkAccounts: canReadBookmarkAccounts, canAccessManagedAccounts: canAccessManagedAccounts })),
|
|
33
33
|
canAccessGroupsFilter && React.createElement(GroupsFilter, null),
|
|
34
|
-
canAccessProductsFilter && (React.createElement(ProductsFilter, { filterValues: get(filterValues, SolrKeys.product, []),
|
|
35
|
-
canAccessSeverityFilter && (React.createElement(SeverityFilter, { filterValues: get(filterValues, SolrKeys.severity, []),
|
|
36
|
-
canAccessStatusFilter && React.createElement(StatusFilter, { filterValues: get(filterValues, SolrKeys.status, []) }),
|
|
34
|
+
canAccessProductsFilter && (React.createElement(ProductsFilter, { filterValues: get(filterValues, SolrKeys.product, []), isSolrSearchDown: isSolrSearchDown, allProducts: ((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult.map((p) => p.product)) || [] })),
|
|
35
|
+
canAccessSeverityFilter && (React.createElement(SeverityFilter, { filterValues: get(filterValues, SolrKeys.severity, []), isSolrSearchDown: isSolrSearchDown, allCaseSeverities: allCaseSeverities.data })),
|
|
36
|
+
canAccessStatusFilter && (React.createElement(StatusFilter, { filterValues: get(filterValues, SolrKeys.status, []), allCaseStatuses: allCaseStatuses.data, isSolrSearchDown: isSolrSearchDown })),
|
|
37
37
|
canAccessCreatorFilter && React.createElement(CreatorSsoNameFilter, null),
|
|
38
|
-
|
|
38
|
+
!isSolrSearchDown && canAccessTypeFilter && React.createElement(TypeFilter, { allCaseTypes: allCaseTypes.data }),
|
|
39
|
+
!isSolrSearchDown && canAccessAdditionalFilter && React.createElement(AdditionalFilters, null))));
|
|
39
40
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IFacetResponse } from '@rh-support/types/shared';
|
|
2
2
|
interface IProps {
|
|
3
3
|
filterValues: IFacetResponse[];
|
|
4
|
-
|
|
4
|
+
isSolrSearchDown: boolean;
|
|
5
|
+
allProducts: string[];
|
|
5
6
|
}
|
|
6
7
|
export declare function ProductsFilter(props: IProps): JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/ProductsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAe,MAAM,0BAA0B,CAAC;AAUvE,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,
|
|
1
|
+
{"version":3,"file":"ProductsFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/ProductsFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAe,MAAM,0BAA0B,CAAC;AAUvE,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,MAAM,EAAE,CAAC;CACzB;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eA+D3C"}
|
|
@@ -29,5 +29,12 @@ export function ProductsFilter(props) {
|
|
|
29
29
|
const list = toOptions(props.filterValues, {
|
|
30
30
|
labelKey: 'value',
|
|
31
31
|
});
|
|
32
|
-
|
|
32
|
+
// solr is down and solr filter values are not available
|
|
33
|
+
// we get filter values from hydra metadata api
|
|
34
|
+
const singleSelectSolrIsDown = () => {
|
|
35
|
+
var _a;
|
|
36
|
+
return (React.createElement(Dropdown, { placeholder: t('Select a product'), "data-tracking-id": "products-filter", id: "case-list-products-filter", title: t(filterNamesMap[SolrKeys.product]), label: t(filterNamesMap[SolrKeys.product]), onChange: onFilterChangeSingleSelect, selectedItem: toOption((_a = filterInfo[SolrPivotKeys.product_version][0]) === null || _a === void 0 ? void 0 : _a.value), list: toOptions(props.allProducts) }));
|
|
37
|
+
};
|
|
38
|
+
const multiSelect = () => (React.createElement(MultiSelectDropDownList, { placeholder: getDropdownBtnPlaceholder(t('Select a product'), filterInfo[SolrPivotKeys.product_version].map((i) => i.value), ' ', props.filterValues.length, t('All selected')), "data-tracking-id": "products-filter", id: "case-list-products-filter", title: t(filterNamesMap[SolrKeys.product]), label: t(filterNamesMap[SolrKeys.product]), onChange: onFilterChangeMultipleSelect, selectedItems: toOptions(filterInfo[SolrPivotKeys.product_version], { labelKey: 'value' }), list: list, searchable: true }));
|
|
39
|
+
return React.createElement(React.Fragment, null, props.isSolrSearchDown ? singleSelectSolrIsDown() : multiSelect());
|
|
33
40
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { IFacetResponse } from '@rh-support/types/shared';
|
|
2
2
|
interface IProps {
|
|
3
3
|
filterValues: IFacetResponse[];
|
|
4
|
-
|
|
4
|
+
allCaseSeverities: string[];
|
|
5
|
+
isSolrSearchDown: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare function SeverityFilter(props: IProps): JSX.Element;
|
|
7
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SeverityFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/SeverityFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAUrE,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SeverityFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/SeverityFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAUrE,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAC5B,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,eAiE3C"}
|
|
@@ -23,11 +23,12 @@ export function SeverityFilter(props) {
|
|
|
23
23
|
})), {
|
|
24
24
|
labelKey: 'value',
|
|
25
25
|
});
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
// solr is down and solr filter values are not available
|
|
27
|
+
// we get filter values from hydra metadata api
|
|
28
|
+
const singleSelectSolrIsDown = () => (React.createElement(Dropdown, { placeholder: t('Select a severity'), "data-tracking-id": "severity-filter", id: "case-list-severity-filter", title: t(filterNamesMap[SolrKeys.severity]), label: t(filterNamesMap[SolrKeys.severity]), onChange: onFilterChangeSingleSelect, selectedItem: toOption(filterInfo[SolrKeys.severity][0]), list: toOptions(props.allCaseSeverities) }));
|
|
29
|
+
const multiSelect = () => (React.createElement(MultiSelectDropDownList, { placeholder: getDropdownBtnPlaceholder(t('Select a severity'), filterInfo[SolrKeys.severity], ' ', props.filterValues.length, t('All selected')), "data-tracking-id": "severity-filter", id: "case-list-severity-filter", title: t(filterNamesMap[SolrKeys.severity]), label: t(filterNamesMap[SolrKeys.severity]), onChange: onFilterChangeMultipleSelect, selectedItems: toOptions(filterInfo[SolrKeys.severity].map((filterValue) => ({
|
|
30
30
|
key: filterValue,
|
|
31
31
|
value: filterValue,
|
|
32
|
-
})), { labelKey: 'value' }), list: list }))
|
|
32
|
+
})), { labelKey: 'value' }), list: list }));
|
|
33
|
+
return React.createElement(React.Fragment, null, props.isSolrSearchDown ? singleSelectSolrIsDown() : multiSelect());
|
|
33
34
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/StatusFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAUrE,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/StatusFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAa,MAAM,0BAA0B,CAAC;AAUrE,UAAU,MAAM;IACZ,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,eA+FzC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { MultiSelectDropDownList } from '@rh-support/components';
|
|
2
|
-
import { toOptions } from '@rh-support/utils';
|
|
1
|
+
import { Dropdown, MultiSelectDropDownList } from '@rh-support/components';
|
|
2
|
+
import { toOption, toOptions } from '@rh-support/utils';
|
|
3
3
|
import React, { useContext } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { SolrKeys } from '../../../enums/filters';
|
|
@@ -14,6 +14,9 @@ export function StatusFilter(props) {
|
|
|
14
14
|
selectedStatus = selectedStatus.map((i) => i.label);
|
|
15
15
|
updateFilter(dispatch, { filterKey: SolrKeys.status, values: selectedStatus });
|
|
16
16
|
};
|
|
17
|
+
const onFilterChangeSingleSelect = (selectedStatus) => {
|
|
18
|
+
updateFilter(dispatch, { filterKey: SolrKeys.status, values: [selectedStatus.label] });
|
|
19
|
+
};
|
|
17
20
|
const getBtnPlaceholder = (btnPlaceholder, selectedValues, type, totalLength, totalLengthString) => {
|
|
18
21
|
if (!selectedValues || (selectedValues && selectedValues.length === 0)) {
|
|
19
22
|
return btnPlaceholder;
|
|
@@ -38,13 +41,18 @@ export function StatusFilter(props) {
|
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
};
|
|
41
|
-
|
|
44
|
+
const list = toOptions(props.filterValues.map((filterValue) => ({
|
|
45
|
+
key: filterValue.value,
|
|
46
|
+
value: filterValue.value,
|
|
47
|
+
})), {
|
|
48
|
+
labelKey: 'value',
|
|
49
|
+
});
|
|
50
|
+
// solr is down and solr filter values are not available
|
|
51
|
+
// we get filter values from hydra metadata api
|
|
52
|
+
const singleSelectSolrIsDown = () => (React.createElement(Dropdown, { placeholder: t('Select a status'), "data-tracking-id": "status-filter", id: "case-list-status-filter", title: t(filterNamesMap[SolrKeys.status]), label: t(filterNamesMap[SolrKeys.status]), onChange: onFilterChangeSingleSelect, selectedItem: toOption(filterInfo[SolrKeys.status][0]), list: toOptions(props.allCaseStatuses) }));
|
|
53
|
+
const multiSelect = () => (React.createElement(MultiSelectDropDownList, { placeholder: getBtnPlaceholder(t('Select a status'), filterInfo[SolrKeys.status], ' ', props.filterValues.length, t('All selected')), "data-tracking-id": "status-filter", id: "case-list-status-filter", title: t(filterNamesMap[SolrKeys.status]), label: t(filterNamesMap[SolrKeys.status]), onChange: onFilterChange, selectedItems: toOptions(filterInfo[SolrKeys.status].map((filterValue) => ({
|
|
42
54
|
key: filterValue,
|
|
43
55
|
value: filterValue,
|
|
44
|
-
})), { labelKey: 'value' }), list:
|
|
45
|
-
|
|
46
|
-
value: filterValue.value,
|
|
47
|
-
})), {
|
|
48
|
-
labelKey: 'value',
|
|
49
|
-
}) }));
|
|
56
|
+
})), { labelKey: 'value' }), list: list }));
|
|
57
|
+
return React.createElement(React.Fragment, null, props.isSolrSearchDown ? singleSelectSolrIsDown() : multiSelect());
|
|
50
58
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TypeFilter.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-filters/TypeFilter.tsx"],"names":[],"mappings":"AAUA,UAAU,MAAM;IACZ,YAAY,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,eA6BvC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { MultiSelectDropDownList } from '@rh-support/components';
|
|
2
|
+
import { getDropdownBtnPlaceholder, toOptions } from '@rh-support/utils';
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import { useTranslation } from 'react-i18next';
|
|
5
|
+
import { SolrKeys } from '../../../enums/filters';
|
|
6
|
+
import { filterNamesMap } from '../../../utils/constants';
|
|
7
|
+
import { CaseListFilterDispatchContext, CaseListFilterStateContext } from '../CaseListFilterContext';
|
|
8
|
+
import { updateFilter } from '../CaseListFilterReducer';
|
|
9
|
+
export function TypeFilter(props) {
|
|
10
|
+
const { t } = useTranslation();
|
|
11
|
+
const dispatch = useContext(CaseListFilterDispatchContext);
|
|
12
|
+
const { filterInfo } = useContext(CaseListFilterStateContext);
|
|
13
|
+
const onFilterChangeMultipleSelect = (selectedTypes) => updateFilter(dispatch, {
|
|
14
|
+
filterKey: SolrKeys.type,
|
|
15
|
+
values: selectedTypes.map((selectedType) => selectedType.label),
|
|
16
|
+
});
|
|
17
|
+
return (React.createElement(MultiSelectDropDownList, { placeholder: getDropdownBtnPlaceholder(t('Select a type'), filterInfo[SolrKeys.type], ' ', props.allCaseTypes.length, t('All selected')), "data-tracking-id": "type-filter", id: "case-list-type-filter", title: t(filterNamesMap[SolrKeys.type]), label: t(filterNamesMap[SolrKeys.type]), onChange: onFilterChangeMultipleSelect, selectedItems: toOptions(filterInfo[SolrKeys.type]), list: toOptions(props.allCaseTypes) }));
|
|
18
|
+
}
|
package/lib/esm/enums/case.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SolrKeys } from './filters';
|
|
1
2
|
export declare enum CaseStatus {
|
|
2
3
|
WaitingOnCustomer = "Waiting on Customer",
|
|
3
4
|
WaitingOnRedHat = "Waiting on Red Hat",
|
|
@@ -26,4 +27,17 @@ export declare enum CaseListColumnIds {
|
|
|
26
27
|
alternateCaseId = "alternateCaseId",
|
|
27
28
|
type = "type"
|
|
28
29
|
}
|
|
30
|
+
export declare const caseListSortColumnIdsToSolrMap: {
|
|
31
|
+
number: SolrKeys;
|
|
32
|
+
summary: SolrKeys;
|
|
33
|
+
severity: SolrKeys;
|
|
34
|
+
contactName: SolrKeys;
|
|
35
|
+
createdDate: SolrKeys;
|
|
36
|
+
status: SolrKeys;
|
|
37
|
+
lastModifiedDate: SolrKeys;
|
|
38
|
+
accountNumber: SolrKeys;
|
|
39
|
+
folderName: SolrKeys;
|
|
40
|
+
alternateCaseId: SolrKeys;
|
|
41
|
+
type: SolrKeys;
|
|
42
|
+
};
|
|
29
43
|
//# sourceMappingURL=case.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../../src/enums/case.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IAClB,iBAAiB,wBAAwB;IACzC,eAAe,uBAAuB;IACtC,IAAI,mBAAmB;IACvB,MAAM,WAAW;IACjB,GAAG,cAAc;CACpB;AAED,oBAAY,YAAY;IACpB,MAAM,eAAe;IACrB,SAAS,kBAAkB;IAC3B,MAAM,eAAe;IACrB,GAAG,YAAY;CAClB;AAED,eAAO,MAAM,cAAc,0TACgS,CAAC;AAE5T,oBAAY,iBAAiB;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,gBAAgB;IACrB,OAAO,gBAAgB;IACvB,MAAM,WAAW;IACjB,QAAQ,qBAAqB;IAC7B,iBAAiB,YAAY;IAC7B,aAAa,kBAAkB;IAC/B,KAAK,eAAe;IACpB,eAAe,oBAAoB;IACnC,IAAI,SAAS;CAChB"}
|
|
1
|
+
{"version":3,"file":"case.d.ts","sourceRoot":"","sources":["../../../src/enums/case.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC,oBAAY,UAAU;IAClB,iBAAiB,wBAAwB;IACzC,eAAe,uBAAuB;IACtC,IAAI,mBAAmB;IACvB,MAAM,WAAW;IACjB,GAAG,cAAc;CACpB;AAED,oBAAY,YAAY;IACpB,MAAM,eAAe;IACrB,SAAS,kBAAkB;IAC3B,MAAM,eAAe;IACrB,GAAG,YAAY;CAClB;AAED,eAAO,MAAM,cAAc,0TACgS,CAAC;AAE5T,oBAAY,iBAAiB;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,KAAK,gBAAgB;IACrB,OAAO,gBAAgB;IACvB,MAAM,WAAW;IACjB,QAAQ,qBAAqB;IAC7B,iBAAiB,YAAY;IAC7B,aAAa,kBAAkB;IAC/B,KAAK,eAAe;IACpB,eAAe,oBAAoB;IACnC,IAAI,SAAS;CAChB;AAED,eAAO,MAAM,8BAA8B;;;;;;;;;;;;CAY1C,CAAC"}
|
package/lib/esm/enums/case.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SolrKeys } from './filters';
|
|
1
2
|
export var CaseStatus;
|
|
2
3
|
(function (CaseStatus) {
|
|
3
4
|
CaseStatus["WaitingOnCustomer"] = "Waiting on Customer";
|
|
@@ -29,3 +30,16 @@ export var CaseListColumnIds;
|
|
|
29
30
|
CaseListColumnIds["alternateCaseId"] = "alternateCaseId";
|
|
30
31
|
CaseListColumnIds["type"] = "type";
|
|
31
32
|
})(CaseListColumnIds || (CaseListColumnIds = {}));
|
|
33
|
+
export const caseListSortColumnIdsToSolrMap = {
|
|
34
|
+
[CaseListColumnIds.caseId]: SolrKeys.caseNumber,
|
|
35
|
+
[CaseListColumnIds.summary]: SolrKeys.caseSummary,
|
|
36
|
+
[CaseListColumnIds.severity]: SolrKeys.severity,
|
|
37
|
+
[CaseListColumnIds.owner]: SolrKeys.ownerName,
|
|
38
|
+
[CaseListColumnIds.created]: SolrKeys.createdDate,
|
|
39
|
+
[CaseListColumnIds.status]: SolrKeys.status,
|
|
40
|
+
[CaseListColumnIds.modified]: SolrKeys.modifiedDate,
|
|
41
|
+
[CaseListColumnIds.accountNumber]: SolrKeys.accountNumber,
|
|
42
|
+
[CaseListColumnIds.group]: SolrKeys.groupName,
|
|
43
|
+
[CaseListColumnIds.alternateCaseId]: SolrKeys.alternateId,
|
|
44
|
+
[CaseListColumnIds.type]: SolrKeys.type,
|
|
45
|
+
};
|
|
@@ -14,6 +14,7 @@ export declare const fieldNameToSolrFieldMapping: {
|
|
|
14
14
|
case_version: string;
|
|
15
15
|
case_contact_sso_username: string;
|
|
16
16
|
case_createdby_sso_username: string;
|
|
17
|
+
case_type: string;
|
|
17
18
|
};
|
|
18
19
|
export declare const advanceSearchFieldNameToSolrFieldMapping: {
|
|
19
20
|
case_24_7: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseSearch.d.ts","sourceRoot":"","sources":["../../../src/enums/caseSearch.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,oBAAY,mBAAmB;IAC3B,KAAK,UAAU;IACf,QAAQ,aAAa;CACxB;AAED,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"caseSearch.d.ts","sourceRoot":"","sources":["../../../src/enums/caseSearch.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,KAAK,CAAC;AAE/C,oBAAY,mBAAmB;IAC3B,KAAK,UAAU;IACf,QAAQ,aAAa;CACxB;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;CAYvC,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;CAiBpD,CAAC"}
|
|
@@ -16,5 +16,6 @@ export const fieldNameToSolrFieldMapping = {
|
|
|
16
16
|
[SolrKeys.version]: 'productVersion',
|
|
17
17
|
[SolrKeys.caseContactSSO]: 'ownedByMe',
|
|
18
18
|
[SolrKeys.createdBySsoUsername]: 'createdBySsoUsername',
|
|
19
|
+
[SolrKeys.type]: 'type',
|
|
19
20
|
};
|
|
20
21
|
export const advanceSearchFieldNameToSolrFieldMapping = Object.assign(Object.assign({}, fieldNameToSolrFieldMapping), { [SolrKeys.fts]: 'FTS', [SolrKeys.cep]: 'CEP', [SolrKeys.accountNumber]: 'accountNumber', [SolrKeys.type]: 'caseType', [SolrKeys.caseNumber]: 'caseNumber', [SolrKeys.caseOwner]: 'ownerSSO', [SolrKeys.modifiedBy]: 'lastModifiedByName', [SolrKeys.createdBySsoUsername]: 'createdBySSO', [SolrKeys.createdBy]: 'createdByName', [SolrKeys.contactName]: 'contactName', [SolrKeys.caseContactSSO]: 'contactSSO', [SolrKeys.modifiedDate]: 'lastModifiedDate', [SolrKeys.createdDate]: 'createdDate', [SolrKeys.description]: 'description', [SolrKeys.caseSummary]: 'summary' });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../src/enums/filters.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAChB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,UAAU,eAAe;
|
|
1
|
+
{"version":3,"file":"filters.d.ts","sourceRoot":"","sources":["../../../src/enums/filters.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAChB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,UAAU,eAAe;IACzB,MAAM,WAAW;CACpB;AAED,oBAAY,QAAQ;IAChB,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;IAC5B,OAAO,iBAAiB;IACxB,MAAM,gBAAgB;IACtB,aAAa,uBAAuB;IACpC,KAAK,sBAAsB;IAC3B,SAAS,oBAAoB;IAC7B,QAAQ,kBAAkB;IAC1B,SAAS,4BAA4B;IACrC,SAAS,eAAe;IACxB,WAAW,qBAAqB;IAChC,cAAc,8BAA8B;IAC5C,UAAU,6BAA6B;IACvC,OAAO,iBAAiB;IACxB,SAAS,uBAAuB;IAChC,oBAAoB,gCAAgC;IACpD,WAAW,qBAAqB;IAChC,UAAU,4BAA4B;IACtC,YAAY,0BAA0B;IACtC,oBAAoB,iCAAiC;IACrD,sBAAsB,+BAA+B;IACrD,WAAW,qBAAqB;IAChC,GAAG,QAAQ;IACX,GAAG,cAAc;IACjB,IAAI,cAAc;IAClB,GAAG,gBAAgB;IACnB,WAAW,qBAAqB;IAChC,WAAW,sBAAsB;CACpC;AAGD,oBAAY,aAAa;IACrB,eAAe,8BAA8B;CAChD;AAED,eAAO,MAAM,iBAAiB,QAA4C,CAAC;AAC3E,oBAAY,QAAQ;IAChB,UAAU,eAAe;IACzB,WAAW,YAAY;IACvB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,aAAa,qBAAqB;IAClC,QAAQ,aAAa;IACrB,SAAS,YAAY;IACrB,WAAW,gBAAgB;IAC3B,SAAS,mBAAmB;IAC5B,UAAU,uBAAuB;IACjC,OAAO,YAAY;IACnB,SAAS,gBAAgB;IACzB,oBAAoB,gCAAgC;IACpD,WAAW,gBAAgB;IAC3B,UAAU,qBAAqB;IAC/B,YAAY,qBAAqB;IACjC,oBAAoB,qBAAqB;IACzC,sBAAsB,qBAAqB;IAC3C,WAAW,gBAAgB;IAC3B,GAAG,QAAQ;IACX,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;CACxB;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAqB9B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;CAElC,CAAC"}
|
package/lib/esm/enums/filters.js
CHANGED
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have <strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
Owner: string;
|
|
@@ -51,7 +51,7 @@ export default {
|
|
|
51
51
|
'for more information about the ICE process.': 'für weitere Informationen über den ICE-Vorgang.',
|
|
52
52
|
'for more information.': 'für weitere Informationen.',
|
|
53
53
|
// Case 403
|
|
54
|
-
|
|
54
|
+
i18Case403: 'Wenn Sie der Meinung sind, eine Berechtigung für das Anzeigen dieser Ressource zu haben, wenden Sie sich bitte an den <1>Kundendienst</1>. Ihre Red Hat Anmeldeinformationen sind möglicherweise nicht mit dem richtigen Account für Ihre Organisation verknüpft, oder es gibt ein Problem mit Ihrem Abonnement. Der Kundendienst sollten Ihnen bei der Lösung des Problems helfen können.',
|
|
55
55
|
'Support subscription required': 'Support-Subskription erforderlich',
|
|
56
56
|
'The credentials you provided are valid, but you do not have <strong>direct support from Red Hat.</strong>': 'Die eingegebenen Anmeldeinformationen sind gültig, aber Sie haben keinen <strong>Direkt-Support von Red Hat.</strong>',
|
|
57
57
|
Owner: 'Besitzer',
|
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
i18nAccounts: string;
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
'click here': 'Haga clic aquí',
|
|
50
50
|
'for more information about the ICE process.': 'para más información sobre el proceso ICE.',
|
|
51
51
|
'for more information.': 'para más información.',
|
|
52
|
-
|
|
52
|
+
i18Case403: 'Si cree que debería tener permiso para ver este recurso,<1>comuníquese con el Servicio al Cliente</1>para obtener ayuda. Es posible que su inicio de sesión en Red Hat no esté vinculado a la cuenta correcta de su organización,\n o podría haber un problema con la suscripción. En ambos casos, el Servicio al Cliente debería poder ayudarlo\n a solucionar el problema.',
|
|
53
53
|
'Support subscription required': 'Se requiere una suscripción de soporte',
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': 'Las credenciales que proporcionó son válidas, pero no cuenta con<strong>soporte directo de Red Hat.</b>',
|
|
55
55
|
i18nAccounts: 'Cuentas',
|
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
i18nAccounts: string;
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
'click here': 'cliquez ici',
|
|
50
50
|
'for more information about the ICE process.': 'pour obtenir des informations supplémentaires sur le processus ICE.',
|
|
51
51
|
'for more information.': "pour davantage d'informations.",
|
|
52
|
-
|
|
52
|
+
i18Case403: "Si vous pensez être autorisé à consulter cette ressource, veuillez <1>contacter le service client</1> pour obtenir de l'aide. Il se peut que votre identifiant Red Hat ne soit pas associé à un compte approprié pour votre organisation ou que votre abonnement présente un dysfonctionnement. Quel que soit le problème rencontré, le service client devrait pouvoir vous aider à le résoudre.",
|
|
53
53
|
'Support subscription required': "Abonnement à l'assistance technique requis",
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': "Les certifications que vous avez fournies sont valides, mais vous ne bénéficiez pas de l' <strong>assistance technique directe de Red Hat</strong>.",
|
|
55
55
|
i18nAccounts: 'Comptes',
|
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
i18nAccounts: string;
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
'click here': 'Fai clic qui',
|
|
50
50
|
'for more information about the ICE process.': 'per maggiori informazioni sul processo ICE.',
|
|
51
51
|
'for more information.': 'per maggiori informazioni.',
|
|
52
|
-
|
|
52
|
+
i18Case403: "Se ritieni che dovresti disporre dell'autorizzazione per visualizzare questa risorsa, richiedi assistenza al<1>Servizio clienti</1>. Il tuo login Red Hat potrebbe non essere associato all'account corretto per la tua organizzazione o potrebbe esserci un problema con la tua sottoscrizione. In entrambi i casi, il Servizio clienti dovrebbe essere in grado di aiutarti a risolvere la questione.",
|
|
53
53
|
'Support subscription required': 'Sottoscrizione di supporto necessaria',
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': 'Le credenziali fornite sono valide, ma non disponi di un <strong>supporto diretto da Red Hat.</strong>',
|
|
55
55
|
i18nAccounts: 'Account',
|
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
'You need a Salesforce(SFDC) user to edit the action plan': string;
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
'click here': 'こちらをクリック',
|
|
50
50
|
'for more information about the ICE process.': 'ICE プロセスについての詳細情報',
|
|
51
51
|
'for more information.': '詳細情報。',
|
|
52
|
-
|
|
52
|
+
i18Case403: 'このリソースを閲覧する権限があると思われる場合は、<1>カスタマーサービス</1> にお問い合わせください。ご使用中の Red Hat ログインがお客様の組織のアカウントに関連付けられていないか、サブスクリプションに問題がある可能性があります。いずれの場合でも、カスタマーサービスが問題解決を支援します。',
|
|
53
53
|
'Support subscription required': 'サポートサブスクリプションが必要です。',
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': '提示の資格情報は有効ですが、<strong>Red Hat の直接サポート</strong>を受ける権限がありません。',
|
|
55
55
|
'You need a Salesforce(SFDC) user to edit the action plan': 'SFDC ユーザーでアクションプランを編集する必要があります。',
|
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
i18nAccounts: string;
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
'click here': '여기를 클릭',
|
|
50
50
|
'for more information about the ICE process.': 'ICE 프로세스에 대한 자세한 정보',
|
|
51
51
|
'for more information.': '상세 정보',
|
|
52
|
-
|
|
52
|
+
i18Case403: '이 리소스를 볼 수 있는 권한을 가지고 있는 경우 <1>고객 서비스에 문의</1>하십시오. Red Hat 로그인이 귀사의 올바른 계정에 연결되어 있지 않거나 \n서브스크립션에 문제가 있을 수 있습니다. 어떠한 경우에도 고객 서비스가 문제 해결을 위한 \n도움을 드릴 수 있습니다.',
|
|
53
53
|
'Support subscription required': '지원 서브스크립션 필요',
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': '입력한 자격 증명은 유효하지만 <strong>Red Hat의 직접적인 지원</strong>은 제공되지 않습니다.',
|
|
55
55
|
i18nAccounts: '계정',
|
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
i18nAccounts: string;
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
'click here': 'clique aqui',
|
|
50
50
|
'for more information about the ICE process.': 'para maiores informações sobre o processo ICE.',
|
|
51
51
|
'for more information.': 'para maiores informações.',
|
|
52
|
-
|
|
52
|
+
i18Case403: 'Caso você acredite que deveria ter permissão para ver este recurso, <1>entre em contato com o Atendimento ao Cliente</1>para obter ajuda. O seu login da Red Hat pode não estar associado à conta certa para sua organização\n ou pode haver um problema na sua inscrição. Nos dois casos, o Atendimento ao Cliente poderá ajudar\n você a resolver o problema.',
|
|
53
53
|
'Support subscription required': 'Assinatura de suporte necessária',
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': 'As credenciais fornecidas são válidas, mas não tem<strong>suporte direto da Red Hat.</strong>',
|
|
55
55
|
i18nAccounts: 'Contas',
|
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
i18nAccounts: string;
|
|
@@ -49,7 +49,7 @@ export default {
|
|
|
49
49
|
'click here': 'нажмите здесь',
|
|
50
50
|
'for more information about the ICE process.': 'для получения информации о процессе ICE.',
|
|
51
51
|
'for more information.': 'для получения дополнительной информации.',
|
|
52
|
-
|
|
52
|
+
i18Case403: 'Если вы считаете, что у вас должно быть разрешение на просмотр этого ресурса, <1>обратитесь в службу поддержки</1> за помощью. Возможно, ваше имя пользователя Red Hat не связано с нужной учетной записью\n для вашей организации или есть проблема с подпиской. Служба поддержки поможет вам\n решить эту проблему.',
|
|
53
53
|
'Support subscription required': 'Требуется действительная подписка',
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': 'Вы указали действительные учетные данные, но у вас нет <strong>прямой поддержки от Red Hat</strong>.',
|
|
55
55
|
i18nAccounts: 'Учетные записи',
|
|
@@ -49,7 +49,7 @@ declare const _default: {
|
|
|
49
49
|
'click here': string;
|
|
50
50
|
'for more information about the ICE process.': string;
|
|
51
51
|
'for more information.': string;
|
|
52
|
-
|
|
52
|
+
i18Case403: string;
|
|
53
53
|
'Support subscription required': string;
|
|
54
54
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': string;
|
|
55
55
|
Owner: string;
|
|
@@ -50,7 +50,7 @@ export default {
|
|
|
50
50
|
'for more information about the ICE process.': '查看 ICE 处理进程的详情。',
|
|
51
51
|
'for more information.': '详情。',
|
|
52
52
|
// Case 403
|
|
53
|
-
|
|
53
|
+
i18Case403: '如果您确定有查看此资源的权限,请 <1>联系客户服务</1>以获得帮助。您的红帽登录信息未能与您机构中的的正确帐户关联,\n 或者您的订阅出现问题。无论是哪种原因,客户服务都能\n 帮助您解决问题。',
|
|
54
54
|
'Support subscription required': '需要支持订阅',
|
|
55
55
|
'The credentials you provided are valid, but you do not have<strong>direct support from Red Hat.</strong>': '您提供的是有效凭证,但无法<strong>直接从红帽获得支持。</strong>',
|
|
56
56
|
Owner: '所有者',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../src/test-utils/mockData.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;GAI1B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;GAgBlC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;GA4BvC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;GAgBnC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;CAExC,CAAC;AAEF,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"mockData.d.ts","sourceRoot":"","sources":["../../../src/test-utils/mockData.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;GAI1B,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;GAgBlC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;;;GA4BvC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;GAgBnC,CAAC;AAEF,eAAO,MAAM,4BAA4B;;;;;;;;;;CAExC,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;CA0BxB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;;GAS/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,GAG9B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgC5B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;;;;GA6GpB,CAAC;AAEF,eAAO,MAAM,kBAAkB;;;;;;;;GA4B9B,CAAC;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;CA+d7C,CAAC"}
|
|
@@ -90,6 +90,7 @@ export const mockCaseList = {
|
|
|
90
90
|
case_last_public_update_date: '2019-10-25T05:30:54Z',
|
|
91
91
|
case_last_public_update_by: 'Bipin Kunal',
|
|
92
92
|
case_customer_escalation: false,
|
|
93
|
+
case_type: '',
|
|
93
94
|
uri: 'https://api.access.qa.redhat.com/rs/cases/02428475',
|
|
94
95
|
case_owner: 'New Case Queue',
|
|
95
96
|
},
|
|
@@ -8,6 +8,12 @@ export interface IPromiseReflection<T> {
|
|
|
8
8
|
status: 'fulfilled' | 'rejected';
|
|
9
9
|
e?: Error;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
interface ICaseListResponse {
|
|
12
|
+
caseListResponse: ISolrCaseSearchResponse;
|
|
13
|
+
isSolrSearchDownSFDCUp: boolean;
|
|
14
|
+
showErrorMessage: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare function getCaseList(filterState: ICaseListFilterState, loggedInUser: UserAuth, loggedInUserAccount: Partial<IAccount>, abortSignal: AbortSignal, forceSfdcSearch?: boolean): Promise<ICaseListResponse>;
|
|
12
17
|
export declare function getCaseListFromSolr(solrQuery: ISearchSolrQuery, partnerSearch: boolean, abortSignal: AbortSignal, isSecureSupport?: boolean): Promise<ISolrCaseSearchResponse>;
|
|
18
|
+
export {};
|
|
13
19
|
//# sourceMappingURL=caseListUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseListUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseListUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAuC,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"caseListUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseListUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAIxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AACrF,OAAO,EAAuC,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAOlG,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACjC,CAAC,CAAC,EAAE,CAAC,CAAC;IACN,MAAM,EAAE,WAAW,GAAG,UAAU,CAAC;IACjC,CAAC,CAAC,EAAE,KAAK,CAAC;CACb;AAED,UAAU,iBAAiB;IACvB,gBAAgB,EAAE,uBAAuB,CAAC;IAC1C,sBAAsB,EAAE,OAAO,CAAC;IAChC,gBAAgB,EAAE,OAAO,CAAC;CAC7B;AAiBD,wBAAsB,WAAW,CAC7B,WAAW,EAAE,oBAAoB,EACjC,YAAY,EAAE,QAAQ,EACtB,mBAAmB,EAAE,OAAO,CAAC,QAAQ,CAAC,EACtC,WAAW,EAAE,WAAW,EACxB,eAAe,CAAC,EAAE,OAAO,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CAmF5B;AAED,wBAAgB,mBAAmB,CAC/B,SAAS,EAAE,gBAAgB,EAC3B,aAAa,EAAE,OAAO,EACtB,WAAW,EAAE,WAAW,EACxB,eAAe,GAAE,OAAe,GACjC,OAAO,CAAC,uBAAuB,CAAC,CASlC"}
|
|
@@ -19,19 +19,14 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
21
|
import { publicApi, search } from '@cee-eng/hydrajs';
|
|
22
|
-
import
|
|
22
|
+
import { promiseReflection } from '@rh-support/utils';
|
|
23
23
|
import { isNoFilterApplied, isSearchSupportedBySFDC } from '../components/case-list/CaseListFilterHelpers';
|
|
24
24
|
import { createSFDCQueryFromFilterState, createSolrQueryFromFilterState, mapSFDCCaseListToSolrCaseList, } from './caseSearchUtils';
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
catch (e) {
|
|
32
|
-
return { e, status: 'rejected' };
|
|
33
|
-
}
|
|
34
|
-
});
|
|
25
|
+
const throwErrorOnAbort = (message) => {
|
|
26
|
+
const isAbortError = message && message.toLowerCase().indexOf('abort') > -1;
|
|
27
|
+
if (isAbortError)
|
|
28
|
+
throw new Error(message);
|
|
29
|
+
};
|
|
35
30
|
// currently while fetching case list we need to decide whether to call only solr or solr and sfdc both
|
|
36
31
|
// solr call will always be there because all the filters values are returned by the solr as facets.
|
|
37
32
|
// the problem with solr is that it takes 10 secs to index the latest data from SFDC and user might see some stale data in the meanwhile.
|
|
@@ -41,40 +36,71 @@ const reflect = (p) => __awaiter(void 0, void 0, void 0, function* () {
|
|
|
41
36
|
// and override the solr result with sfdc.
|
|
42
37
|
// Even though SFDC support most of the filters but another problem with SFDC is it doesnot support multiple values for a praticular filter.
|
|
43
38
|
// if user applies any filter apart from default filter we will always call solr and assume that(not safely) 10 sec scenario is not bound to happen.
|
|
44
|
-
export function getCaseList(filterState, loggedInUser, loggedInUserAccount, abortSignal, forceSfdcSearch
|
|
45
|
-
var _a, _b, _c, _d;
|
|
39
|
+
export function getCaseList(filterState, loggedInUser, loggedInUserAccount, abortSignal, forceSfdcSearch) {
|
|
40
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
46
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
let isSolrSearchDownSFDCUp = false;
|
|
43
|
+
let showErrorMessage = false;
|
|
44
|
+
let caseListResponse;
|
|
47
45
|
const solrFilter = createSolrQueryFromFilterState(filterState, loggedInUser);
|
|
48
|
-
const isSfdcSearchRequired = ((forceSfdcSearch || isSearchSupportedBySFDC(filterState)) && !filterState.filterQueryInfo.queryString) ||
|
|
49
|
-
loggedInUserAccount.secureSupport;
|
|
50
46
|
const partnerSearch = loggedInUser.hasManagedAccounts() && ((_b = (_a = filterState.filterInfo) === null || _a === void 0 ? void 0 : _a.case_accountNumber) !== null && _b !== void 0 ? _b : []).length > 0;
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
47
|
+
const isSfdcSearchRequired = (forceSfdcSearch || isSearchSupportedBySFDC(filterState)) && !filterState.filterQueryInfo.queryString;
|
|
48
|
+
let solrPromise = getCaseListFromSolr(solrFilter, partnerSearch, abortSignal, loggedInUserAccount === null || loggedInUserAccount === void 0 ? void 0 : loggedInUserAccount.secureSupport);
|
|
49
|
+
const sfdcAPICall = () => publicApi.caseList.getCaseListFromSFDC(createSFDCQueryFromFilterState(filterState, loggedInUser, loggedInUserAccount, isNoFilterApplied(filterState)), partnerSearch, loggedInUserAccount === null || loggedInUserAccount === void 0 ? void 0 : loggedInUserAccount.secureSupport, abortSignal);
|
|
50
|
+
const sfdcPromise = isSfdcSearchRequired ? sfdcAPICall() : Promise.resolve(undefined);
|
|
51
|
+
const [solrResponse, sfdcResponse] = yield Promise.all([solrPromise, sfdcPromise].filter((item) => !!item).map(promiseReflection));
|
|
52
|
+
// on abort we throw an error and don't proceed with the rest
|
|
53
|
+
if (solrResponse.e)
|
|
54
|
+
throwErrorOnAbort(solrResponse === null || solrResponse === void 0 ? void 0 : solrResponse.e.message);
|
|
55
|
+
if (sfdcResponse.e)
|
|
56
|
+
throwErrorOnAbort(sfdcResponse === null || sfdcResponse === void 0 ? void 0 : sfdcResponse.e.message);
|
|
57
|
+
const solrFullfilled = !!(solrResponse.status === 'fulfilled' && ((_c = solrResponse.v) === null || _c === void 0 ? void 0 : _c.response));
|
|
58
|
+
let sfdcFullfilled = !!(sfdcResponse.status === 'fulfilled' && ((_d = sfdcResponse.v) === null || _d === void 0 ? void 0 : _d.cases));
|
|
59
|
+
const sfdcCallIsMadeAndFailed = !sfdcFullfilled && isSfdcSearchRequired;
|
|
60
|
+
const sfdcCallNotMade = !sfdcFullfilled && !isSfdcSearchRequired;
|
|
61
|
+
if (!solrFullfilled && sfdcCallIsMadeAndFailed) {
|
|
62
|
+
showErrorMessage = true;
|
|
54
63
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
64
|
+
else if (!solrFullfilled && sfdcCallNotMade) {
|
|
65
|
+
const sfdcRes = yield promiseReflection(sfdcAPICall());
|
|
66
|
+
sfdcFullfilled = !!(sfdcRes.status === 'fulfilled' && ((_e = sfdcRes.v) === null || _e === void 0 ? void 0 : _e.cases));
|
|
67
|
+
if (sfdcFullfilled) {
|
|
68
|
+
isSolrSearchDownSFDCUp = true;
|
|
69
|
+
const mappedSfdcRes = mapSFDCCaseListToSolrCaseList((_g = (_f = sfdcRes === null || sfdcRes === void 0 ? void 0 : sfdcRes.v) === null || _f === void 0 ? void 0 : _f.cases) !== null && _g !== void 0 ? _g : []);
|
|
70
|
+
caseListResponse = {
|
|
71
|
+
response: {
|
|
72
|
+
docs: mappedSfdcRes,
|
|
73
|
+
numFound: sfdcRes.v.totalCount,
|
|
74
|
+
},
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
showErrorMessage = true;
|
|
79
|
+
}
|
|
60
80
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
81
|
+
else if (solrFullfilled && sfdcFullfilled) {
|
|
82
|
+
caseListResponse = Object.assign(Object.assign({}, solrResponse.v), { response: {
|
|
83
|
+
docs: mapSFDCCaseListToSolrCaseList((_j = (_h = sfdcResponse === null || sfdcResponse === void 0 ? void 0 : sfdcResponse.v) === null || _h === void 0 ? void 0 : _h.cases) !== null && _j !== void 0 ? _j : []),
|
|
84
|
+
numFound: sfdcResponse.v.totalCount,
|
|
85
|
+
} });
|
|
65
86
|
}
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
87
|
+
else if (!solrFullfilled && sfdcFullfilled) {
|
|
88
|
+
isSolrSearchDownSFDCUp = true;
|
|
89
|
+
caseListResponse = {
|
|
90
|
+
response: {
|
|
91
|
+
docs: mapSFDCCaseListToSolrCaseList((_l = (_k = sfdcResponse === null || sfdcResponse === void 0 ? void 0 : sfdcResponse.v) === null || _k === void 0 ? void 0 : _k.cases) !== null && _l !== void 0 ? _l : []),
|
|
92
|
+
numFound: sfdcResponse.v.totalCount,
|
|
93
|
+
},
|
|
94
|
+
};
|
|
69
95
|
}
|
|
70
|
-
if (
|
|
71
|
-
|
|
72
|
-
const mappedSfdcRes = sfdcResponse && mapSFDCCaseListToSolrCaseList((_d = (_c = sfdcResponse === null || sfdcResponse === void 0 ? void 0 : sfdcResponse.v) === null || _c === void 0 ? void 0 : _c.cases) !== null && _d !== void 0 ? _d : []);
|
|
73
|
-
solrResponse.v.response.docs = mappedSfdcRes;
|
|
74
|
-
solrResponse.v.response.numFound = sfdcResponse.v.totalCount;
|
|
75
|
-
}
|
|
96
|
+
else if (solrFullfilled && !sfdcFullfilled) {
|
|
97
|
+
caseListResponse = solrResponse.v;
|
|
76
98
|
}
|
|
77
|
-
return
|
|
99
|
+
return {
|
|
100
|
+
caseListResponse,
|
|
101
|
+
isSolrSearchDownSFDCUp,
|
|
102
|
+
showErrorMessage,
|
|
103
|
+
};
|
|
78
104
|
});
|
|
79
105
|
}
|
|
80
106
|
export function getCaseListFromSolr(solrQuery, partnerSearch, abortSignal, isSecureSupport = false) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseSearchUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseSearchUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAWxD,OAAO,EACH,oBAAoB,EACpB,WAAW,EAId,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAEH,mBAAmB,EAEtB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,eAAO,MAAM,6BAA6B,UAAU,CAAC;AACrD,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD,eAAO,MAAM,iCAAiC,SAAS,CAAC;AACxD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD,iBAAS,8BAA8B,CAAC,WAAW,EAAE,oBAAoB,EAAE,YAAY,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"caseSearchUtils.d.ts","sourceRoot":"","sources":["../../../src/utils/caseSearchUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACrG,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAWxD,OAAO,EACH,oBAAoB,EACpB,WAAW,EAId,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAEH,mBAAmB,EAEtB,MAAM,qBAAqB,CAAC;AAS7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,eAAO,MAAM,6BAA6B,UAAU,CAAC;AACrD,eAAO,MAAM,oCAAoC,MAAM,CAAC;AACxD,eAAO,MAAM,iCAAiC,SAAS,CAAC;AACxD,eAAO,MAAM,qBAAqB,eAAe,CAAC;AAElD,iBAAS,8BAA8B,CAAC,WAAW,EAAE,oBAAoB,EAAE,YAAY,EAAE,QAAQ,OAwEhG;AAED,iBAAS,sCAAsC,CAC3C,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,EAChC,WAAW,EAAE,MAAM,EACnB,eAAe,GAAE,OAAe,UAwBnC;AAeD,iBAAS,wCAAwC,CAC7C,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,EAChC,OAAO,EAAE,MAAM,EACf,eAAe,QAAK,UAoCvB;AAMD,iBAAS,yBAAyB,CAC9B,WAAW,EAAE,oBAAoB,EACjC,kBAAkB,EAAE,QAAQ,EAC5B,oBAAoB,KAAA,EACpB,UAAU,SAAI,EACd,UAAU,SAAO,OAmBpB;AAkBD,iBAAS,8BAA8B,CACnC,WAAW,EAAE,oBAAoB,EACjC,YAAY,EAAE,QAAQ,EACtB,mBAAmB,EAAE,OAAO,CAAC,QAAQ,CAAC,EACtC,kBAAkB,EAAE,OAAO,GAC5B,OAAO,CAAC,eAAe,CAAC,CAkE1B;AAED,iBAAS,6BAA6B,CAAC,QAAQ,GAAE,qBAAqB,EAAO,GAAG,qBAAqB,EAAE,CAEtG;AAcD,iBAAS,6BAA6B,CAAC,WAAW,EAAE,oBAAoB,UAUvE;AAED,iBAAS,6BAA6B,CAClC,QAAQ,EAAE,MAAM,EAChB,mBAAmB,EAAE,oBAAoB,EACzC,QAAQ,CAAC,EAAE,MAAM,EACjB,WAAW,CAAC,EAAE,MAAM,EACpB,UAAU,GAAE,mBAA+C,wBA4C9D;AAED,iBAAS,kCAAkC,CACvC,WAAW,EAAE,MAAM,EACnB,mBAAmB,EAAE,oBAAoB,EACzC,kBAAkB,EAAE,oBAAoB,wBAmC3C;AAgGD,OAAO,EACH,8BAA8B,EAC9B,sCAAsC,EACtC,yBAAyB,EACzB,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,6BAA6B,EAC7B,wCAAwC,EACxC,kCAAkC,GACrC,CAAC"}
|
|
@@ -18,7 +18,7 @@ import SolrQueryBuilder from 'solr-query-builder';
|
|
|
18
18
|
import { getLabel } from '../components/case-list/case-list-filters/AccountsBookmarkedGroupFilter';
|
|
19
19
|
import { initialCaseFilterState } from '../components/case-list/CaseListFilterContext';
|
|
20
20
|
import { isNoFilterApplied } from '../components/case-list/CaseListFilterHelpers';
|
|
21
|
-
import { CaseListColumnIds, CaseStatus } from '../enums/case';
|
|
21
|
+
import { CaseListColumnIds, caseListSortColumnIdsToSolrMap, CaseStatus } from '../enums/case';
|
|
22
22
|
import { advanceSearchFieldNameToSolrFieldMapping, CaseSearchQueryType, fieldNameToSolrFieldMapping, } from '../enums/caseSearch';
|
|
23
23
|
import { AdditionalFilterLabels, ProductVersionKey, sfdcFieldToSolrMap, SolrKeys, SolrPivotKeys, SolrTags, } from '../enums/filters';
|
|
24
24
|
export const FILTER_URL_QUERY_SEARCH_PARAM = 'query';
|
|
@@ -33,7 +33,7 @@ function createSolrQueryFromFilterState(filterState, loggedInUser) {
|
|
|
33
33
|
const isCaseNumberQuery = isValidCaseNumber(queryString);
|
|
34
34
|
const q = isCaseNumberQuery ? `${SolrKeys.caseNumber}:${queryString}` : queryString;
|
|
35
35
|
const isQuerySearch = q !== '*:*';
|
|
36
|
-
const sort =
|
|
36
|
+
const sort = `${caseListSortColumnIdsToSolrMap[column]} ${direction}`;
|
|
37
37
|
const productVersionQuery = buildSolrQuery({ [ProductVersionKey]: filterInfo[ProductVersionKey] });
|
|
38
38
|
const filteredGroups = filterInfo[SolrKeys.group].map((item) => item.key);
|
|
39
39
|
const start = (currentPage - 1) * pageSize;
|
|
@@ -66,6 +66,7 @@ function createSolrQueryFromFilterState(filterState, loggedInUser) {
|
|
|
66
66
|
.facetField(SolrKeys.product, [SolrTags.c_product])
|
|
67
67
|
.facetField(SolrKeys.severity, [SolrTags.c_severity])
|
|
68
68
|
.facetField(SolrKeys.status, [SolrTags.c_status])
|
|
69
|
+
.facetField(SolrKeys.type, [SolrTags.c_type])
|
|
69
70
|
.pivotField(SolrPivotKeys.product_version, [SolrTags.c_product])
|
|
70
71
|
.preBuiltfq(SolrKeys.product, productVersionQuery, [SolrTags.c_product])
|
|
71
72
|
.fq(SolrKeys.status, filterInfo[SolrKeys.status], [SolrTags.c_status])
|
|
@@ -73,6 +74,7 @@ function createSolrQueryFromFilterState(filterState, loggedInUser) {
|
|
|
73
74
|
.fq(SolrKeys.group, filteredGroups)
|
|
74
75
|
.fq(SolrKeys.accountNumber, filteredAccounts)
|
|
75
76
|
.fq(SolrKeys.escalation, escalationValue)
|
|
77
|
+
.fq(SolrKeys.type, filterInfo[SolrKeys.type], [SolrTags.c_type])
|
|
76
78
|
.beginOr()
|
|
77
79
|
.fq(SolrKeys.createdBySsoUsername, filterInfo[SolrKeys.createdBySsoUsername])
|
|
78
80
|
.fq(SolrKeys.caseContactSSO, filterInfo[SolrKeys.caseContactSSO])
|
|
@@ -198,11 +200,12 @@ function createSFDCQueryFromFilterState(filterState, loggedInUser, loggedInUserA
|
|
|
198
200
|
if ((filteredStatus || []).length > 1 && filteredStatus.includes(CaseStatus.Closed)) {
|
|
199
201
|
filteredStatus = filteredStatus.filter((status) => status !== CaseStatus.Closed);
|
|
200
202
|
}
|
|
203
|
+
const sortFieldSolr = caseListSortColumnIdsToSolrMap[column];
|
|
201
204
|
const sfdcFilter = {
|
|
202
205
|
maxResults,
|
|
203
206
|
offset,
|
|
204
207
|
includeClosed,
|
|
205
|
-
sortField: solrFieldToSfdcMap[
|
|
208
|
+
sortField: solrFieldToSfdcMap[sortFieldSolr],
|
|
206
209
|
sortOrder: direction.toUpperCase(),
|
|
207
210
|
};
|
|
208
211
|
const queryString = (filterQueryInfo.queryString || '').trim();
|
|
@@ -15,6 +15,7 @@ export declare const filterNamesMap: {
|
|
|
15
15
|
case_number: string;
|
|
16
16
|
case_createdby_sso_username: string;
|
|
17
17
|
case_contact_sso_username: string;
|
|
18
|
+
case_type: string;
|
|
18
19
|
usernameFilterTitle: string;
|
|
19
20
|
};
|
|
20
21
|
export declare const UpdatedCaseDataEvent = "PCM-Next > case-list-data-background-refresh";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/utils/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;CAmB1B,CAAC;AAEF,eAAO,MAAM,oBAAoB,iDAAiD,CAAC"}
|
|
@@ -17,6 +17,7 @@ export const filterNamesMap = {
|
|
|
17
17
|
[SolrKeys.caseNumber]: 'Case number',
|
|
18
18
|
[SolrKeys.createdBySsoUsername]: 'Created by me',
|
|
19
19
|
[SolrKeys.caseContactSSO]: 'Owned by me',
|
|
20
|
+
[SolrKeys.type]: 'Type',
|
|
20
21
|
usernameFilterTitle: 'Username',
|
|
21
22
|
};
|
|
22
23
|
export const UpdatedCaseDataEvent = 'PCM-Next > case-list-data-background-refresh';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/cases",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.28",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"@patternfly/react-core": "4.128.2",
|
|
54
54
|
"@patternfly/react-table": "4.26.7",
|
|
55
55
|
"@rh-support/api": "0.3.9",
|
|
56
|
-
"@rh-support/components": "1.1.
|
|
57
|
-
"@rh-support/react-context": "0.2.
|
|
56
|
+
"@rh-support/components": "1.1.21",
|
|
57
|
+
"@rh-support/react-context": "0.2.23",
|
|
58
58
|
"@rh-support/types": "0.2.0",
|
|
59
|
-
"@rh-support/user-permissions": "0.2.
|
|
60
|
-
"@rh-support/utils": "0.2.
|
|
59
|
+
"@rh-support/user-permissions": "0.2.16",
|
|
60
|
+
"@rh-support/utils": "0.2.14",
|
|
61
61
|
"i18next": "^19.0.1",
|
|
62
62
|
"localforage": "^1.7.3",
|
|
63
63
|
"lodash": "^4.17.15",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"not ie <= 11",
|
|
102
102
|
"not op_mini all"
|
|
103
103
|
],
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "f16c3e016d3cfc56fa94f1cb1a8f8ab2d3fe0a35"
|
|
105
105
|
}
|