@rh-support/manage 2.5.210 → 2.5.220
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/ManageTabs.d.ts.map +1 -1
- package/lib/esm/ManageTabs.js +14 -6
- package/lib/esm/components/ManagePreferences/sections/PreferencesACL.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesACL.js +3 -4
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseCreate.js +4 -2
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.js +3 -4
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManageTabs.d.ts","sourceRoot":"","sources":["../../src/ManageTabs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAclE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ManageTabs.d.ts","sourceRoot":"","sources":["../../src/ManageTabs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAclE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,EAAE,CAAC,CAAC;IACpC,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,qBA2MvC"}
|
package/lib/esm/ManageTabs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Tab, TabContent, Tabs, TabsComponent, TabTitleText } from '@patternfly/react-core';
|
|
2
2
|
import { ErrorBoundary, useDocumentTitle } from '@rh-support/components';
|
|
3
|
-
import { ability,
|
|
3
|
+
import { ability, resourceActions, resources } from '@rh-support/user-permissions';
|
|
4
4
|
import map from 'lodash/map';
|
|
5
5
|
import React, { useState } from 'react';
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -12,7 +12,7 @@ import { ExpiredContentManagement } from './components/ManageExpiredContents/Exp
|
|
|
12
12
|
import { ManagePartnerships } from './components/ManagePartnerships/index';
|
|
13
13
|
import { ManagePreferences } from './components/ManagePreferences';
|
|
14
14
|
import { TagsManagement } from './components/ManageTags';
|
|
15
|
-
import { NotificationEmails } from './components/NotificationEmails/index';
|
|
15
|
+
// import { NotificationEmails } from './components/NotificationEmails/index';
|
|
16
16
|
import { TopContentManagement } from './components/TopContentManagement';
|
|
17
17
|
import { PageTitle } from './constants/pageTitle';
|
|
18
18
|
import { Routes } from './Routes';
|
|
@@ -21,15 +21,21 @@ export function ManageTabs(props) {
|
|
|
21
21
|
const [activeTabKey, setActiveTabKey] = useState(0);
|
|
22
22
|
const { activeTab } = useParams();
|
|
23
23
|
const { t } = useTranslation();
|
|
24
|
-
const { groupsRoute, bookmarkedAccountsRoute, topContentRoute,
|
|
24
|
+
const { groupsRoute, bookmarkedAccountsRoute, topContentRoute,
|
|
25
|
+
// notificationEmailsRoute,
|
|
26
|
+
preferencesRoute, configsRoute, partnershipsRoute, tagsManagerRoute, expiredContentRoute, } = Routes.getPaths();
|
|
25
27
|
useDocumentTitle(PageTitle.MANAGE);
|
|
26
28
|
const canViewManageTab = ability.can(resourceActions.READ, resources.MANAGE);
|
|
27
29
|
const canViewManageTopContent = ability.can(resourceActions.READ, resources.TOP_CONTENT) && canViewManageTab;
|
|
28
30
|
const canViewCaseGroups = ability.can(resourceActions.READ, resources.CASE_GROUPS) && canViewManageTab;
|
|
29
31
|
const canManageBookmarkAccounts = ability.can(resourceActions.CREATE, resources.BOOKMARK_ACCOUNTS) && canViewManageTab;
|
|
30
|
-
const canViewEmailNotificationTab = ability.can(resourceActions.READ, resources.NOTIFICATION_EMAIL);
|
|
32
|
+
// const canViewEmailNotificationTab = ability.can(resourceActions.READ, resources.NOTIFICATION_EMAIL);
|
|
31
33
|
const canViewPartnershipsTab = ability.can(resourceActions.READ, resources.PARTNERSHIPS);
|
|
32
|
-
const canAddCustomNotification = ability.can(
|
|
34
|
+
// const canAddCustomNotification = ability.can(
|
|
35
|
+
// resourceActions.PATCH,
|
|
36
|
+
// resources.CASE_DETAILS,
|
|
37
|
+
// CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS
|
|
38
|
+
// );
|
|
33
39
|
const canViewConfigsTab = ability.can(resourceActions.READ, resources.APP_INTERNAL_CONFIGS);
|
|
34
40
|
const tabsToRender = [];
|
|
35
41
|
canManageBookmarkAccounts &&
|
|
@@ -50,6 +56,7 @@ export function ManageTabs(props) {
|
|
|
50
56
|
component: React.createElement(ManageGroupUsers, null),
|
|
51
57
|
id: 'manage-groups',
|
|
52
58
|
});
|
|
59
|
+
/* TODO: Re-enable notification emails tab when ready
|
|
53
60
|
canViewEmailNotificationTab &&
|
|
54
61
|
canAddCustomNotification &&
|
|
55
62
|
tabsToRender.push({
|
|
@@ -57,9 +64,10 @@ export function ManageTabs(props) {
|
|
|
57
64
|
key: 'notification-emails-tab',
|
|
58
65
|
'data-tracking-id': 'notification-emails-tab',
|
|
59
66
|
routePath: notificationEmailsRoute,
|
|
60
|
-
component:
|
|
67
|
+
component: <NotificationEmails />,
|
|
61
68
|
id: 'notification-emails',
|
|
62
69
|
});
|
|
70
|
+
*/
|
|
63
71
|
canViewPartnershipsTab &&
|
|
64
72
|
tabsToRender.push({
|
|
65
73
|
title: 'Partnerships',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreferencesACL.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/sections/PreferencesACL.tsx"],"names":[],"mappings":"
|
|
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 {
|
|
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
|
|
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":"
|
|
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":"
|
|
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 {
|
|
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,
|
|
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.
|
|
3
|
+
"version": "2.5.220",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"@patternfly/react-table": "6.2.1",
|
|
78
78
|
"@rh-support/components": "2.5.165",
|
|
79
79
|
"@rh-support/configs": "2.0.75",
|
|
80
|
-
"@rh-support/react-context": "2.5.
|
|
80
|
+
"@rh-support/react-context": "2.5.268",
|
|
81
81
|
"@rh-support/types": "2.0.26",
|
|
82
|
-
"@rh-support/user-permissions": "2.5.
|
|
83
|
-
"@rh-support/utils": "2.5.
|
|
82
|
+
"@rh-support/user-permissions": "2.5.122",
|
|
83
|
+
"@rh-support/utils": "2.5.105",
|
|
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": "
|
|
102
|
+
"gitHead": "2b2c0e7650d4c5d94856ae246c3e5a6c7ae9e75d"
|
|
103
103
|
}
|