@rh-support/cases 2.6.211 → 2.6.212

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;AAsClC,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAqC1C,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AAMD,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,qBAkpBrC"}
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;AAuClC,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,IAAI,CAAC;AAqC1C,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;CACzD;AAMD,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,qBAqpBrC"}
@@ -38,7 +38,7 @@ import { isNoFilterApplied, isOnlyDefaultFilterApplied } from './CaseListFilterH
38
38
  import { updateFilterState } from './CaseListFilterReducer';
39
39
  import { appendCaseList, setCaseList, setCurrentQuery, setCursorInfo, setIsFetching, setIsLoadingMore, setLoadMoreError, } from './CaseListReducer';
40
40
  export function CaseList(props) {
41
- var _a, _b, _c, _d, _e;
41
+ var _a, _b, _c, _d, _e, _f, _g;
42
42
  const { t } = useTranslation();
43
43
  useDocumentTitle(PageTitle.CASE_LIST);
44
44
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
@@ -273,16 +273,17 @@ export function CaseList(props) {
273
273
  const salesforceAccountId = (_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.salesforceAccountId;
274
274
  const loggedInContactId = (_b = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.data) === null || _b === void 0 ? void 0 : _b.id;
275
275
  const loggedInIsOrgAdmin = (_c = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.data) === null || _c === void 0 ? void 0 : _c.isOrgAdmin;
276
+ const defaultCaseGroupId = (_e = (_d = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.data) === null || _d === void 0 ? void 0 : _d.defaultCaseGroup) !== null && _e !== void 0 ? _e : null;
276
277
  useEffect(() => {
277
278
  var _a;
278
- if (!salesforceAccountId)
279
+ if (!salesforceAccountId || loggedInUser.isFetching)
279
280
  return;
280
281
  if (haventLoadedMetadata(caseGroups, (data) => data === undefined)) {
281
282
  if ((_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.isInternal) {
282
- fetchCaseGroupsForAccount(dispatchToGlobalMetadataReducer, apolloClient, salesforceAccountId, undefined, loggedInContactId, loggedInIsOrgAdmin);
283
+ fetchCaseGroupsForAccount(dispatchToGlobalMetadataReducer, apolloClient, salesforceAccountId, defaultCaseGroupId, loggedInContactId, loggedInIsOrgAdmin);
283
284
  }
284
285
  else {
285
- fetchCaseGroupsForSSO(dispatchToGlobalMetadataReducer, apolloClient, salesforceAccountId, undefined, loggedInContactId, loggedInIsOrgAdmin);
286
+ fetchCaseGroupsForSSO(dispatchToGlobalMetadataReducer, apolloClient, salesforceAccountId, defaultCaseGroupId, loggedInContactId, loggedInIsOrgAdmin);
286
287
  }
287
288
  }
288
289
  }, [
@@ -293,6 +294,8 @@ export function CaseList(props) {
293
294
  loggedInUsersAccount.data,
294
295
  loggedInContactId,
295
296
  loggedInIsOrgAdmin,
297
+ loggedInUser.isFetching,
298
+ defaultCaseGroupId,
296
299
  ]);
297
300
  useEffect(() => {
298
301
  const loadMetadata = () => __awaiter(this, void 0, void 0, function* () {
@@ -483,8 +486,8 @@ export function CaseList(props) {
483
486
  React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading filter chips') } },
484
487
  React.createElement(CaseListFilterChips, null))),
485
488
  React.createElement("section", { className: "case-search-bottom" },
486
- React.createElement("aside", { className: `case-search-filters ${((_d = filterSectionRef.current) === null || _d === void 0 ? void 0 : _d.expanded) ? '' : 'collapsed'}` },
487
- React.createElement("h2", { className: "filter-header pf-v6-u-display-flex" }, ((_e = filterSectionRef.current) === null || _e === void 0 ? void 0 : _e.expanded) ? (React.createElement(React.Fragment, null,
489
+ React.createElement("aside", { className: `case-search-filters ${((_f = filterSectionRef.current) === null || _f === void 0 ? void 0 : _f.expanded) ? '' : 'collapsed'}` },
490
+ React.createElement("h2", { className: "filter-header pf-v6-u-display-flex" }, ((_g = filterSectionRef.current) === null || _g === void 0 ? void 0 : _g.expanded) ? (React.createElement(React.Fragment, null,
488
491
  React.createElement(Button, { isInline: true, className: "pf-v6-u-flex-shrink-0 pf-v6-u-flex-none case-search-filter-text-button", variant: "link", title: t('Collapse filter section'), "data-tracking-id": "collapse-case-list-filter", onClick: onToggleFilterBtnClick, iconPosition: "right", icon: React.createElement(OpenDrawerRightIcon, { className: "mirrored" }) },
489
492
  React.createElement(Trans, null, "Filters")))) : (React.createElement(Button, { isInline: true, className: "pf-v6-c-button pf-m-link pf-m-inline pf-v6-u-flex-shrink-0 pf-v6-u-flex-none pf-v6-u-display-flex pf-v6-u-align-items-center pf-v6-u-justify-content-center pf-v6-u-px-lg", variant: "link", title: t('Expand filter section'), "data-tracking-id": "expand-case-list-filter", onClick: onToggleFilterBtnClick, iconPosition: "right", icon: React.createElement(OpenDrawerRightIcon, null) }, isXLScreen ? null : React.createElement(Trans, null, "Filters")))),
490
493
  React.createElement("div", { className: "filter-wrapper" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/cases",
3
- "version": "2.6.211",
3
+ "version": "2.6.212",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -38,11 +38,11 @@
38
38
  "@patternfly/patternfly": "6.2.1",
39
39
  "@patternfly/react-core": "6.2.1",
40
40
  "@patternfly/react-table": "6.2.1",
41
- "@rh-support/components": "2.5.206",
42
- "@rh-support/react-context": "2.5.301",
41
+ "@rh-support/components": "2.5.207",
42
+ "@rh-support/react-context": "2.5.302",
43
43
  "@rh-support/types": "2.0.26",
44
- "@rh-support/user-permissions": "2.5.153",
45
- "@rh-support/utils": "2.5.134",
44
+ "@rh-support/user-permissions": "2.5.154",
45
+ "@rh-support/utils": "2.5.135",
46
46
  "localforage": "^1.10.0",
47
47
  "lodash": "^4.17.21",
48
48
  "pegjs": "^0.10.0",
@@ -94,5 +94,5 @@
94
94
  "defaults and supports es6-module",
95
95
  "maintained node versions"
96
96
  ],
97
- "gitHead": "88d89bff33ac253421a7d05cb12f9d36212b2b4a"
97
+ "gitHead": "0ee7395e3f501d247910c0ac5f91a4f2e3195e07"
98
98
  }