@rh-support/cases 0.2.75-beta.0 → 0.2.83

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":"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;AAM3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,cAAc,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAM1C,OAAO,EAAgB,WAAW,EAA2B,MAAM,uBAAuB,CAAC;AAmC3F,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,eA4crC"}
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;AAM3B,OAAO,EAAE,mBAAmB,EAAe,MAAM,cAAc,CAAC;AAEhE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAM1C,OAAO,EAAgB,WAAW,EAA2B,MAAM,uBAAuB,CAAC;AAmC3F,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,eA6crC"}
@@ -70,7 +70,7 @@ export function CaseList(props) {
70
70
  const prevSearchType = usePrevious(filterState.filterQueryInfo.type);
71
71
  let isSearchTypeChanged = filterState.filterQueryInfo.type !== prevSearchType;
72
72
  const [hasError, setHasError] = useState(null);
73
- const [isSolrSearchDown, setSolrSearchDown] = useState(false);
73
+ const [isSolrSearchDown, setSolrSearchDown] = useState(true);
74
74
  const [defaultSavedSearchName, setDefaultSavedSearchName] = useState('');
75
75
  function getCases(currentFilterState) {
76
76
  return __awaiter(this, void 0, void 0, function* () {
@@ -87,7 +87,7 @@ export function CaseList(props) {
87
87
  abortControllerRef.current = controller;
88
88
  const { caseListResponse, isSolrSearchDownSFDCUp, showErrorMessage } = yield getCaseList(currentFilterState, loggedInUserRights.data, loggedInUsersAccount.data, controller.signal);
89
89
  showError = showErrorMessage;
90
- setSolrSearchDown(isSolrSearchDownSFDCUp);
90
+ setSolrSearchDown(!isSolrSearchDownSFDCUp);
91
91
  setFilterValuesFromFacetResponse(CaseListDispatch, solrResponseToFacetFields(caseListResponse));
92
92
  setPivotValues(CaseListDispatch, solrResponseToPivotFields(caseListResponse));
93
93
  setCaseList(CaseListDispatch, caseListResponse.response);
@@ -335,5 +335,5 @@ export function CaseList(props) {
335
335
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading filters') } },
336
336
  React.createElement(CaseListFilters, { filterValues: filterValuesFromFacetResponse, allCaseTypes: allCaseTypes, allCaseStatuses: allCaseStatuses, allCaseSeverities: allCaseSeverities, allProducts: allProducts, isSolrSearchDown: isSolrSearchDown })))))),
337
337
  React.createElement("section", { className: "case-search-table" },
338
- React.createElement(CaseListTable, { caseList: caseList, caseGroups: caseGroups.data || [], loggedInUserRights: loggedInUserRights.data, sortInfo: filterState.sortInfo, paginationInfo: filterState.paginationInfo, isCaseListPageLoading: isFetching, hasError: hasError })))));
338
+ React.createElement(CaseListTable, { caseList: caseList, caseGroups: caseGroups.data || [], loggedInUserRights: loggedInUserRights.data, sortInfo: filterState.sortInfo, paginationInfo: filterState.paginationInfo, isCaseListPageLoading: isFetching, hasError: hasError, isSolrDown: isSolrSearchDown })))));
339
339
  }
@@ -11,6 +11,7 @@ interface IProps {
11
11
  paginationInfo?: IPaginationInfo;
12
12
  isCaseListPageLoading: boolean;
13
13
  hasError: boolean;
14
+ isSolrDown?: boolean;
14
15
  }
15
16
  export declare function CaseListTable(props: IProps): JSX.Element;
16
17
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"CaseListTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/CaseListTable.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;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AAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,eAkX1C"}
@@ -295,7 +295,7 @@ export function CaseListTable(props) {
295
295
  React.createElement("div", { className: "case-list-table-toolbar pf-l-flex", ref: tableToolbarRef },
296
296
  React.createElement("div", { className: "toolbar-actions pf-l-flex pf-m-space-items-sm" },
297
297
  React.createElement(TableColumnSelector, { onColumnSelectorChange: onColumnSelectorChange }),
298
- React.createElement(ExportCaseListCSV, { currentFilteredCaseList: props.caseList }),
298
+ React.createElement(ExportCaseListCSV, { currentFilteredCaseList: props.caseList, isExportCsvDisabled: props.isSolrDown }),
299
299
  React.createElement(CloseCaseBtn, { selectedCases: selectedCases, caseList: caseListData, onCasesCloseSuccess: onCasesCloseSuccess })),
300
300
  React.createElement("span", { className: "toolbar-pagination" },
301
301
  React.createElement(TablePagination, { perPage: (_c = props.paginationInfo) === null || _c === void 0 ? void 0 : _c.pageSize, currentPage: (_d = props.paginationInfo) === null || _d === void 0 ? void 0 : _d.currentPage, onPerPageSelect: onPerPageSelect, onSetPage: onSetPage, variant: PaginationVariant.top, itemCount: getItemCount() }))),
@@ -2,6 +2,7 @@ import { ISolrResponse } from '@rh-support/types/shared';
2
2
  import { ICaseListResponse } from '../../../models/caseList';
3
3
  interface IProps {
4
4
  currentFilteredCaseList: ISolrResponse<ICaseListResponse>;
5
+ isExportCsvDisabled?: boolean;
5
6
  }
6
7
  export declare function ExportCaseListCSV(props: IProps): JSX.Element;
7
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ExportCaseListCSV.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/ExportCaseListCSV.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAMzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAgD7D,UAAU,MAAM;IACZ,uBAAuB,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;CAC7D;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAyE9C"}
1
+ {"version":3,"file":"ExportCaseListCSV.d.ts","sourceRoot":"","sources":["../../../../../src/components/case-list/case-list-table/ExportCaseListCSV.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAMzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAgD7D,UAAU,MAAM;IACZ,uBAAuB,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC1D,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAID,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAuF9C"}
@@ -69,7 +69,7 @@ export function ExportCaseListCSV(props) {
69
69
  const [isFetchingSFDC, setIsFetchingSFDC] = useState(false);
70
70
  const isFetchingCSVData = isFetching || isFetchingSFDC;
71
71
  const isBtnDisabled = isFetchingCSVData || currentFilteredCaseCount === 0;
72
- const btnTitle = currentFilteredCaseCount >= MAX_LIMIT ? maxLengthTooltip : btnToolTip;
72
+ let btnTitle = currentFilteredCaseCount >= MAX_LIMIT ? maxLengthTooltip : btnToolTip;
73
73
  const filterState = useContext(CaseListFilterStateContext);
74
74
  const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
75
75
  const isOrgAdmin = loggedInUserRights.data.isOrgAdmin();
@@ -87,9 +87,10 @@ export function ExportCaseListCSV(props) {
87
87
  ToastNotification.addDangerMessage(t('Could not export CSV'));
88
88
  }
89
89
  });
90
+ const partnerSearch = loggedInUserRights.data.hasManagedAccounts();
90
91
  const onExportCSVClick = () => __awaiter(this, void 0, void 0, function* () {
91
92
  try {
92
- const res = yield request(createQueryForCSVDownload(filterState, loggedInUserRights.data, loggedInUsersAccount.data), loggedInUserRights.data.hasManagedAccounts(), null, loggedInUsersAccount.data.secureSupport);
93
+ const res = yield request(createQueryForCSVDownload(filterState, loggedInUserRights.data, loggedInUsersAccount.data), partnerSearch, null, loggedInUsersAccount.data.secureSupport);
93
94
  const headers = isOrgAdmin ? [...csvHeadersSolr, groupHeaderSOLR] : csvHeadersSolr;
94
95
  downloadCSV(res.response.docs, headers, 'CaseList.csv');
95
96
  }
@@ -97,7 +98,16 @@ export function ExportCaseListCSV(props) {
97
98
  ToastNotification.addDangerMessage(t('Could not export CSV'));
98
99
  }
99
100
  });
100
- return (React.createElement(Button, { variant: "tertiary", isDisabled: isBtnDisabled, onClick: loggedInUsersAccount.data.secureSupport ? onExportCSVClickSecureSupport : onExportCSVClick, title: btnTitle, "data-tracking-id": "case-list-toolbar-export-csv" }, isFetchingCSVData ? (React.createElement(React.Fragment, null,
101
- React.createElement(Trans, null, "Exporting CSV"),
102
- React.createElement("i", { className: "fa fa-circle-o-notch fa-spin fa-fw", "aria-label": "loading" }))) : (React.createElement(Trans, null, "Export CSV"))));
101
+ // To show tooltip if export csv is disabled when SOLR is down
102
+ const getTooltipContent = () => {
103
+ let tooltipText = t('Export Cases');
104
+ if (props.isExportCsvDisabled) {
105
+ tooltipText = t('Unable to export while access to search is limited');
106
+ }
107
+ return tooltipText;
108
+ };
109
+ return (React.createElement("span", { title: props.isExportCsvDisabled && getTooltipContent() },
110
+ React.createElement(Button, { variant: "tertiary", isDisabled: isBtnDisabled || props.isExportCsvDisabled, onClick: loggedInUsersAccount.data.secureSupport ? onExportCSVClickSecureSupport : onExportCSVClick, title: btnTitle, "data-tracking-id": "case-list-toolbar-export-csv" }, isFetchingCSVData ? (React.createElement(React.Fragment, null,
111
+ React.createElement(Trans, null, "Exporting CSV"),
112
+ React.createElement("i", { className: "fa fa-circle-o-notch fa-spin fa-fw", "aria-label": "loading" }))) : (React.createElement(Trans, null, "Export CSV")))));
103
113
  }
@@ -37,14 +37,14 @@ const throwErrorOnAbort = (message) => {
37
37
  // Even though SFDC support most of the filters but another problem with SFDC is it doesnot support multiple values for a praticular filter.
38
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.
39
39
  export function getCaseList(filterState, loggedInUser, loggedInUserAccount, abortSignal) {
40
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
40
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41
41
  return __awaiter(this, void 0, void 0, function* () {
42
42
  let isSolrSearchDownSFDCUp = false;
43
43
  let showErrorMessage = false;
44
44
  let caseListResponse;
45
45
  const solrFilter = createSolrQueryFromFilterState(filterState, loggedInUser);
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;
47
- const isSfdcSearchRequired = canDoSfdcSearch(filterState) && !filterState.filterQueryInfo.queryString;
46
+ const partnerSearch = loggedInUser.hasManagedAccounts();
47
+ const isSfdcSearchRequired = canDoSfdcSearch(filterState) && !filterState.filterQueryInfo.queryString && !partnerSearch;
48
48
  let solrPromise = getCaseListFromSolr(solrFilter, partnerSearch, abortSignal, loggedInUserAccount === null || loggedInUserAccount === void 0 ? void 0 : loggedInUserAccount.secureSupport);
49
49
  const sfdcAPICall = () => publicApi.caseList.getCaseListFromSFDC(createSFDCQueryFromFilterState(filterState, loggedInUser, loggedInUserAccount, isNoFilterApplied(filterState)), partnerSearch, loggedInUserAccount === null || loggedInUserAccount === void 0 ? void 0 : loggedInUserAccount.secureSupport, abortSignal);
50
50
  const sfdcPromise = isSfdcSearchRequired ? sfdcAPICall() : Promise.resolve(undefined);
@@ -54,8 +54,8 @@ export function getCaseList(filterState, loggedInUser, loggedInUserAccount, abor
54
54
  throwErrorOnAbort(solrResponse === null || solrResponse === void 0 ? void 0 : solrResponse.e.message);
55
55
  if (sfdcResponse.e)
56
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));
57
+ const solrFullfilled = !!(solrResponse.status === 'fulfilled' && ((_a = solrResponse.v) === null || _a === void 0 ? void 0 : _a.response));
58
+ let sfdcFullfilled = !!(sfdcResponse.status === 'fulfilled' && ((_b = sfdcResponse.v) === null || _b === void 0 ? void 0 : _b.cases));
59
59
  const sfdcCallIsMadeAndFailed = !sfdcFullfilled && isSfdcSearchRequired;
60
60
  const sfdcCallNotMade = !sfdcFullfilled && !isSfdcSearchRequired;
61
61
  if (!solrFullfilled && sfdcCallIsMadeAndFailed) {
@@ -65,10 +65,10 @@ export function getCaseList(filterState, loggedInUser, loggedInUserAccount, abor
65
65
  // SFDC call didn't make because we had filters that SFDC doesn't support
66
66
  try {
67
67
  const sfdcRes = yield promiseReflection(sfdcAPICall());
68
- sfdcFullfilled = !!(sfdcRes.status === 'fulfilled' && ((_e = sfdcRes.v) === null || _e === void 0 ? void 0 : _e.cases));
68
+ sfdcFullfilled = !!(sfdcRes.status === 'fulfilled' && ((_c = sfdcRes.v) === null || _c === void 0 ? void 0 : _c.cases));
69
69
  if (sfdcFullfilled) {
70
70
  isSolrSearchDownSFDCUp = true;
71
- 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 : []);
71
+ const mappedSfdcRes = mapSFDCCaseListToSolrCaseList((_e = (_d = sfdcRes === null || sfdcRes === void 0 ? void 0 : sfdcRes.v) === null || _d === void 0 ? void 0 : _d.cases) !== null && _e !== void 0 ? _e : []);
72
72
  caseListResponse = {
73
73
  response: {
74
74
  docs: mappedSfdcRes,
@@ -85,7 +85,7 @@ export function getCaseList(filterState, loggedInUser, loggedInUserAccount, abor
85
85
  }
86
86
  else if (solrFullfilled && sfdcFullfilled) {
87
87
  caseListResponse = Object.assign(Object.assign({}, solrResponse.v), { response: {
88
- 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 : []),
88
+ docs: mapSFDCCaseListToSolrCaseList((_g = (_f = sfdcResponse === null || sfdcResponse === void 0 ? void 0 : sfdcResponse.v) === null || _f === void 0 ? void 0 : _f.cases) !== null && _g !== void 0 ? _g : []),
89
89
  numFound: sfdcResponse.v.totalCount,
90
90
  } });
91
91
  }
@@ -93,7 +93,7 @@ export function getCaseList(filterState, loggedInUser, loggedInUserAccount, abor
93
93
  isSolrSearchDownSFDCUp = true;
94
94
  caseListResponse = {
95
95
  response: {
96
- 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 : []),
96
+ 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 : []),
97
97
  numFound: sfdcResponse.v.totalCount,
98
98
  },
99
99
  };
@@ -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,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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"}
@@ -32,7 +32,6 @@ function createSolrQueryFromFilterState(filterState, loggedInUser) {
32
32
  const queryString = ((isAdvancedSearch ? filterQueryInfo.parsedQuery : filterQueryInfo.queryString) || '*:*').trim();
33
33
  const isCaseNumberQuery = isValidCaseNumber(queryString);
34
34
  const q = isCaseNumberQuery ? `${SolrKeys.caseNumber}:${queryString}` : queryString;
35
- const isQuerySearch = q !== '*:*';
36
35
  const sort = `${caseListSortColumnIdsToSolrMap[column]} ${direction}`;
37
36
  const productVersionQuery = buildSolrQuery({ [ProductVersionKey]: filterInfo[ProductVersionKey] });
38
37
  const filteredGroups = filterInfo[SolrKeys.group].map((item) => item.key);
@@ -43,12 +42,6 @@ function createSolrQueryFromFilterState(filterState, loggedInUser) {
43
42
  let filteredAccounts = filterInfo[SolrKeys.accountNumber].reduce((acc, item) => (Array.isArray(item.key) ? [...acc, ...item.key] : [...acc, item.key]), []);
44
43
  // dedupe - an account may be selected boths as an individual account also in a selected group
45
44
  filteredAccounts = [...new Set(filteredAccounts)];
46
- if (!isQuerySearch &&
47
- filteredAccounts.length < 1 &&
48
- loggedInUser.getAccountNumber() &&
49
- !filteredAccounts.includes(loggedInUser.getAccountNumber())) {
50
- filteredAccounts.push(loggedInUser.getAccountNumber());
51
- }
52
45
  const solrQuery = solr({
53
46
  start,
54
47
  rows,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/cases",
3
- "version": "0.2.75-beta.0",
3
+ "version": "0.2.83",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,7 +26,7 @@
26
26
  "lib/**/*"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@cee-eng/hydrajs": "4.9.1",
29
+ "@cee-eng/hydrajs": "4.10.2",
30
30
  "@patternfly/patternfly": "4.185.1",
31
31
  "@patternfly/pfe-collapse": "1.12.3",
32
32
  "@patternfly/react-core": "4.202.16",
@@ -47,17 +47,17 @@
47
47
  "solr-query-builder": "1.0.1"
48
48
  },
49
49
  "dependencies": {
50
- "@cee-eng/hydrajs": "4.9.1",
50
+ "@cee-eng/hydrajs": "4.10.2",
51
51
  "@patternfly/patternfly": "4.185.1",
52
52
  "@patternfly/pfe-collapse": "1.12.3",
53
53
  "@patternfly/react-core": "4.202.16",
54
54
  "@patternfly/react-table": "4.71.16",
55
- "@rh-support/api": "0.3.16-beta.0",
56
- "@rh-support/components": "1.1.61-beta.0",
57
- "@rh-support/react-context": "0.2.63-beta.0",
55
+ "@rh-support/api": "0.3.21",
56
+ "@rh-support/components": "1.1.67",
57
+ "@rh-support/react-context": "0.2.71",
58
58
  "@rh-support/types": "0.2.0",
59
- "@rh-support/user-permissions": "0.2.49-beta.0",
60
- "@rh-support/utils": "0.2.37-beta.0",
59
+ "@rh-support/user-permissions": "0.2.57",
60
+ "@rh-support/utils": "0.2.43",
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": "66b9e765df2035e24ee6ae3ee02289ca5a4eed09"
104
+ "gitHead": "072b28907d0e79329f03ba2779242fb5c9384cac"
105
105
  }