@rh-support/manage 2.5.194 → 2.5.196

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":"PreferencesACL.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesACL.tsx"],"names":[],"mappings":"AASA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAKpD,wBAAgB,cAAc,sBAwF7B"}
1
+ {"version":3,"file":"PreferencesACL.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesACL.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAKpD,wBAAgB,cAAc,sBAuF7B"}
@@ -11,15 +11,14 @@ import { accounts } from '@cee-eng/hydrajs';
11
11
  import { Card, CardBody, CardHeader, Spinner, Tooltip } from '@patternfly/react-core';
12
12
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
13
13
  import { useFetch } from '@rh-support/components';
14
- import { fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
14
+ import { GlobalMetadataStateContext } from '@rh-support/react-context';
15
15
  import React, { useContext, useState } from 'react';
16
16
  import { Trans, useTranslation } from 'react-i18next';
17
17
  import { PreferenceSwitch } from '../components/PreferenceSwitch';
18
18
  export function PreferencesACL() {
19
19
  var _a;
20
20
  const { t } = useTranslation();
21
- const { globalMetadataState: { loggedInUsersAccount, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
22
- const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
21
+ const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
23
22
  const [isAclActivated, setIsAclActivated] = useState((_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasGroupACLs);
24
23
  const [isAclLoading, setIsAclLoading] = useState(false);
25
24
  const { request: updateAcl } = useFetch(accounts.updateAcl);
@@ -27,7 +26,7 @@ export function PreferencesACL() {
27
26
  try {
28
27
  setIsAclLoading(true);
29
28
  yield updateAcl(!isAclActivated, loggedInUsersAccount.data.accountNumber);
30
- fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true);
29
+ // TODO: migrate to GraphQL - fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true, apolloClient);
31
30
  setIsAclActivated(!isAclActivated);
32
31
  }
33
32
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"PreferencesCaseCreate.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseCreate.tsx"],"names":[],"mappings":"AAcA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;CAAG;AACnB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA0MlD"}
1
+ {"version":3,"file":"PreferencesCaseCreate.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseCreate.tsx"],"names":[],"mappings":"AAeA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;CAAG;AACnB,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA2MlD"}
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { useApolloClient } from '@apollo/client/react';
10
11
  import { publicApi } from '@cee-eng/hydrajs';
11
12
  import { Card, CardBody, CardHeader, SelectOption } from '@patternfly/react-core';
12
13
  import { ToastNotification, useFetch } from '@rh-support/components';
@@ -22,6 +23,7 @@ import { PreferenceSelect } from '../components/PreferenceSelect';
22
23
  export function PreferencesCaseCreate(props) {
23
24
  const { t } = useTranslation();
24
25
  const location = useLocation();
26
+ const apolloClient = useApolloClient();
25
27
  const { globalMetadataState: { caseGroups, caseLanguages, loggedInUserJwtToken, loggedInUserRights, loggedInUsersAccount, }, } = useContext(GlobalMetadataStateContext);
26
28
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
27
29
  const languageConst = caseLanguages.data;
@@ -136,10 +138,10 @@ export function PreferencesCaseCreate(props) {
136
138
  }, [location.pathname]);
137
139
  useEffect(() => {
138
140
  if (haventLoadedMetadata(caseLanguages)) {
139
- fetchLanguageMetadata(dispatchToGlobalMetadataReducer);
141
+ fetchLanguageMetadata(dispatchToGlobalMetadataReducer, apolloClient);
140
142
  }
141
143
  // eslint-disable-next-line react-hooks/exhaustive-deps
142
- }, [caseLanguages]);
144
+ }, [caseLanguages, apolloClient]);
143
145
  return (React.createElement(Card, { variant: "secondary", className: "preference-card" },
144
146
  React.createElement(CardHeader, null,
145
147
  React.createElement("h3", null,
@@ -1 +1 @@
1
- {"version":3,"file":"PreferencesCaseView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseView.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;CAAG;AAEnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAqShD"}
1
+ {"version":3,"file":"PreferencesCaseView.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesCaseView.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAO/D,UAAU,MAAM;CAAG;AAEnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAmShD"}
@@ -11,7 +11,7 @@ import { accounts } from '@cee-eng/hydrajs';
11
11
  import { Card, CardBody, CardHeader, Popover, PopoverPosition, SelectOption, Spinner, TextArea, Tooltip, } from '@patternfly/react-core';
12
12
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
13
13
  import { EditorMode, ToastNotification, useFetch } from '@rh-support/components';
14
- import { fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
14
+ import { GlobalMetadataStateContext } from '@rh-support/react-context';
15
15
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
16
16
  import debounce from 'lodash/debounce';
17
17
  import isEmpty from 'lodash/isEmpty';
@@ -23,8 +23,7 @@ import { PreferenceSwitch } from '../components/PreferenceSwitch';
23
23
  export function PreferencesCaseView(props) {
24
24
  const { t } = useTranslation();
25
25
  const { updateCommentType, getCommentTypeFromPreference, getCommentSignature, updateCommentSignature, getOriginalCaseView, updateOriginalCaseView, } = useUserPreferences();
26
- const { globalMetadataState: { loggedInUsersAccount, loggedInUserJwtToken, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
27
- const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
26
+ const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
28
27
  const [isSharingHostNames, setIsSharingHostNames] = useState(false);
29
28
  const [localCommentSignature, setLocalCommentSignature] = useState('');
30
29
  const [originalCommentType, setOriginalCommentType] = useState('');
@@ -170,7 +169,7 @@ export function PreferencesCaseView(props) {
170
169
  try {
171
170
  setIsHostnamesLoading(true);
172
171
  yield updateShareHostnames(!isSharingHostNames, accountNumber);
173
- fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true);
172
+ // TODO: migrate to GraphQL - fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true, apolloClient);
174
173
  setIsSharingHostNames(!isSharingHostNames);
175
174
  }
176
175
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "2.5.194",
3
+ "version": "2.5.196",
4
4
  "description": "Customer Support Manage App",
5
5
  "author": "Jordan Eudy <jeudy100@gmail.com>",
6
6
  "license": "ISC",
@@ -75,12 +75,12 @@
75
75
  "@patternfly/patternfly": "6.2.1",
76
76
  "@patternfly/react-core": "6.2.1",
77
77
  "@patternfly/react-table": "6.2.1",
78
- "@rh-support/components": "2.5.165",
79
- "@rh-support/configs": "2.0.58",
80
- "@rh-support/react-context": "2.5.255",
78
+ "@rh-support/components": "2.5.167",
79
+ "@rh-support/configs": "2.0.60",
80
+ "@rh-support/react-context": "2.5.257",
81
81
  "@rh-support/types": "2.0.26",
82
- "@rh-support/user-permissions": "2.5.111",
83
- "@rh-support/utils": "2.5.92",
82
+ "@rh-support/user-permissions": "2.5.113",
83
+ "@rh-support/utils": "2.5.94",
84
84
  "@types/react-beautiful-dnd": "^13.0.0",
85
85
  "i18next": "^23.15.0",
86
86
  "lodash": ">=4.17.15",
@@ -99,5 +99,5 @@
99
99
  "defaults and supports es6-module",
100
100
  "maintained node versions"
101
101
  ],
102
- "gitHead": "5e50f5af21aedb36186be7ec8704ecec4459d83d"
102
+ "gitHead": "d90bcae55659cc70cbdb3669350dece45850d568"
103
103
  }