@rh-support/manage 2.5.199 → 2.5.210

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":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAKpD,wBAAgB,cAAc,sBAuF7B"}
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"}
@@ -11,14 +11,15 @@ 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 { GlobalMetadataStateContext } from '@rh-support/react-context';
14
+ import { fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, 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 }, } = useContext(GlobalMetadataStateContext);
21
+ const { globalMetadataState: { loggedInUsersAccount, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
22
+ const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
22
23
  const [isAclActivated, setIsAclActivated] = useState((_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasGroupACLs);
23
24
  const [isAclLoading, setIsAclLoading] = useState(false);
24
25
  const { request: updateAcl } = useFetch(accounts.updateAcl);
@@ -26,7 +27,7 @@ export function PreferencesACL() {
26
27
  try {
27
28
  setIsAclLoading(true);
28
29
  yield updateAcl(!isAclActivated, loggedInUsersAccount.data.accountNumber);
29
- // TODO: migrate to GraphQL - fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true, apolloClient);
30
+ fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true);
30
31
  setIsAclActivated(!isAclActivated);
31
32
  }
32
33
  catch (error) {
@@ -1 +1 @@
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"}
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"}
@@ -7,7 +7,6 @@ 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';
11
10
  import { publicApi } from '@cee-eng/hydrajs';
12
11
  import { Card, CardBody, CardHeader, SelectOption } from '@patternfly/react-core';
13
12
  import { ToastNotification, useFetch } from '@rh-support/components';
@@ -23,7 +22,6 @@ import { PreferenceSelect } from '../components/PreferenceSelect';
23
22
  export function PreferencesCaseCreate(props) {
24
23
  const { t } = useTranslation();
25
24
  const location = useLocation();
26
- const apolloClient = useApolloClient();
27
25
  const { globalMetadataState: { caseGroups, caseLanguages, loggedInUserJwtToken, loggedInUserRights, loggedInUsersAccount, }, } = useContext(GlobalMetadataStateContext);
28
26
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
29
27
  const languageConst = caseLanguages.data;
@@ -138,10 +136,10 @@ export function PreferencesCaseCreate(props) {
138
136
  }, [location.pathname]);
139
137
  useEffect(() => {
140
138
  if (haventLoadedMetadata(caseLanguages)) {
141
- fetchLanguageMetadata(dispatchToGlobalMetadataReducer, apolloClient);
139
+ fetchLanguageMetadata(dispatchToGlobalMetadataReducer);
142
140
  }
143
141
  // eslint-disable-next-line react-hooks/exhaustive-deps
144
- }, [caseLanguages, apolloClient]);
142
+ }, [caseLanguages]);
145
143
  return (React.createElement(Card, { variant: "secondary", className: "preference-card" },
146
144
  React.createElement(CardHeader, null,
147
145
  React.createElement("h3", null,
@@ -1 +1 @@
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"}
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"}
@@ -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 { GlobalMetadataStateContext } from '@rh-support/react-context';
14
+ import { fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, 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,7 +23,8 @@ 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, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
26
+ const { globalMetadataState: { loggedInUsersAccount, loggedInUserJwtToken, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
27
+ const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
27
28
  const [isSharingHostNames, setIsSharingHostNames] = useState(false);
28
29
  const [localCommentSignature, setLocalCommentSignature] = useState('');
29
30
  const [originalCommentType, setOriginalCommentType] = useState('');
@@ -169,7 +170,7 @@ export function PreferencesCaseView(props) {
169
170
  try {
170
171
  setIsHostnamesLoading(true);
171
172
  yield updateShareHostnames(!isSharingHostNames, accountNumber);
172
- // TODO: migrate to GraphQL - fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true, apolloClient);
173
+ fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true);
173
174
  setIsSharingHostNames(!isSharingHostNames);
174
175
  }
175
176
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/manage",
3
- "version": "2.5.199",
3
+ "version": "2.5.210",
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.170",
79
- "@rh-support/configs": "2.0.63",
80
- "@rh-support/react-context": "2.5.260",
78
+ "@rh-support/components": "2.5.165",
79
+ "@rh-support/configs": "2.0.75",
80
+ "@rh-support/react-context": "2.5.255",
81
81
  "@rh-support/types": "2.0.26",
82
- "@rh-support/user-permissions": "2.5.116",
83
- "@rh-support/utils": "2.5.97",
82
+ "@rh-support/user-permissions": "2.5.111",
83
+ "@rh-support/utils": "2.5.92",
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": "ce30b93ad7f17f61ba12a2cc643805a7d4043a71"
102
+ "gitHead": "28113f30ab7e7217490e119fc8f4f59a0861b467"
103
103
  }