@rh-support/manage 1.0.7 → 1.0.9
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/components/ManagePreferences/components/PreferenceSelect.d.ts +1 -1
- package/lib/esm/components/ManagePreferences/components/PreferenceSelect.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.d.ts.map +1 -1
- package/lib/esm/components/ManagePreferences/sections/PreferencesCaseView.js +12 -6
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PreferenceSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/components/PreferenceSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"PreferenceSelect.d.ts","sourceRoot":"","sources":["../../../../../src/components/ManagePreferences/components/PreferenceSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,GAAG,CAAC;IACX,UAAU,EAAE,GAAG,CAAC;IAChB,QAAQ,EAAE,CAAC,KAAK,KAAA,EAAE,SAAS,KAAA,EAAE,aAAa,KAAA,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5D,QAAQ,EAAE,KAAK,CAAC,YAAY,EAAE,CAAC;CAClC;AACD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,MAAM,eA6CrF"}
|
|
@@ -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":"AAyBA,UAAU,MAAM;CAAG;AAEnB,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA4QhD"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { accounts } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Card, CardBody, CardHeader, SelectOption, Spinner, TextArea, Tooltip } from '@patternfly/react-core';
|
|
11
|
+
import { Card, CardBody, CardHeader, Popover, PopoverPosition, SelectOption, Spinner, TextArea, Tooltip, } from '@patternfly/react-core';
|
|
12
12
|
import InfoIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
13
13
|
import { EditorMode, ToastNotification, useFetch } from '@rh-support/components';
|
|
14
14
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
@@ -23,6 +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, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
26
27
|
const [isSharingHostNames, setIsSharingHostNames] = useState(false);
|
|
27
28
|
const [localCommentSignature, setLocalCommentSignature] = useState('');
|
|
28
29
|
const [originalCommentType, setOriginalCommentType] = useState('');
|
|
@@ -34,7 +35,7 @@ export function PreferencesCaseView(props) {
|
|
|
34
35
|
const defaultCommentTitleID = 'default-comment-preference-select';
|
|
35
36
|
const defaultCaseViewID = 'default-case-view-select';
|
|
36
37
|
const canUseHostName = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.HOSTNAME);
|
|
37
|
-
const
|
|
38
|
+
const isInternalUserPermission = ability.can(resourceActions.READ, resources.ACCOUNTS_FILTER);
|
|
38
39
|
const { request: fetchHostnameDefault } = useFetch(accounts.getIsSharingHostname);
|
|
39
40
|
const accountNumber = loggedInUsersAccount.data.accountNumber;
|
|
40
41
|
const { request: updateShareHostnames } = useFetch(accounts.updateIsSharingHostname);
|
|
@@ -51,7 +52,7 @@ export function PreferencesCaseView(props) {
|
|
|
51
52
|
try {
|
|
52
53
|
const retrievedCaseView = yield getOriginalCaseView();
|
|
53
54
|
if (!isEmpty(retrievedCaseView)) {
|
|
54
|
-
setOriginalCaseView(retrievedCaseView);
|
|
55
|
+
setOriginalCaseView(+retrievedCaseView);
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
catch (_a) {
|
|
@@ -156,15 +157,20 @@ export function PreferencesCaseView(props) {
|
|
|
156
157
|
setIsHostnamesLoading(false);
|
|
157
158
|
});
|
|
158
159
|
const prefHostnameCopy = 'Red Hat Support cannot currently access hostnames that have been entered on a case. You can share this information at any time to improve your support experience.';
|
|
160
|
+
const caseViewPrefSelection = caseViewTypes[originalCaseView].value || caseViewTypes[+originalAccountPermission].value;
|
|
161
|
+
const prefCasePopover = (React.createElement(React.Fragment, null,
|
|
162
|
+
React.createElement(Trans, null, "Default Case View"),
|
|
163
|
+
React.createElement(Popover, { "aria-label": "Preferred-default-case-view-popover", position: PopoverPosition.top, bodyContent: React.createElement("p", { className: 'pref-case-popover-text' },
|
|
164
|
+
React.createElement(Trans, null, "Choose the default view you want to see when looking at a case")), showClose: false },
|
|
165
|
+
React.createElement("i", { "aria-label": "Preferred-default-case-view-info-icon", className: "fa fa-question-circle" }))));
|
|
159
166
|
return (React.createElement(Card, { className: "preference-card" },
|
|
160
167
|
React.createElement(CardHeader, null,
|
|
161
168
|
React.createElement("h3", null,
|
|
162
169
|
React.createElement(Trans, null, "Case view"))),
|
|
163
170
|
React.createElement(CardBody, null,
|
|
164
171
|
React.createElement("form", null,
|
|
165
|
-
React.createElement("div", { className: "form-group" },
|
|
166
|
-
React.createElement(PreferenceSelect, { onSelect: onPrefCaseViewSelect, selections: (
|
|
167
|
-
caseViewTypes[+originalAccountPermission].value, id: defaultCaseViewID, label: "Default case view" }, caseViewTypes.map((option, index) => (React.createElement(SelectOption, Object.assign({ "data-index": index, key: index, value: option.value }, (option.description && { description: option.description }))))))),
|
|
172
|
+
isInternalUserPermission && (React.createElement("div", { className: "form-group" },
|
|
173
|
+
React.createElement(PreferenceSelect, { onSelect: onPrefCaseViewSelect, selections: caseViewPrefSelection, id: defaultCaseViewID, label: prefCasePopover }, caseViewTypes.map((option, index) => (React.createElement(SelectOption, Object.assign({ "data-index": index, key: index, value: option.value }, (option.description && { description: option.description })))))))),
|
|
168
174
|
React.createElement("div", { className: "form-group" },
|
|
169
175
|
React.createElement(PreferenceSelect, { onSelect: onCommentSelect, selections: originalCommentType, id: defaultCommentTitleID, label: "Default comment type" }, commentTypes.map((option, index) => (React.createElement(SelectOption, { key: index, value: option }))))),
|
|
170
176
|
React.createElement("div", { className: "form-group" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/manage",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Customer Support Manage App",
|
|
5
5
|
"author": "Jordan Eudy <jeudy100@gmail.com>",
|
|
6
6
|
"homepage": "",
|
|
@@ -94,11 +94,11 @@
|
|
|
94
94
|
"@patternfly/pfe-tabs": "1.12.3",
|
|
95
95
|
"@patternfly/react-core": "4.202.16",
|
|
96
96
|
"@patternfly/react-table": "4.71.16",
|
|
97
|
-
"@rh-support/components": "1.2.
|
|
97
|
+
"@rh-support/components": "1.2.5",
|
|
98
98
|
"@rh-support/configs": "0.2.8",
|
|
99
|
-
"@rh-support/react-context": "1.0.
|
|
99
|
+
"@rh-support/react-context": "1.0.6",
|
|
100
100
|
"@rh-support/types": "0.2.0",
|
|
101
|
-
"@rh-support/user-permissions": "1.0.
|
|
101
|
+
"@rh-support/user-permissions": "1.0.5",
|
|
102
102
|
"@rh-support/utils": "1.0.3",
|
|
103
103
|
"@types/react-beautiful-dnd": "^13.0.0",
|
|
104
104
|
"i18next": ">=17.0.1",
|
|
@@ -109,5 +109,5 @@
|
|
|
109
109
|
"react-i18next": ">=10.11.0",
|
|
110
110
|
"react-router-dom": ">=5.1.2"
|
|
111
111
|
},
|
|
112
|
-
"gitHead": "
|
|
112
|
+
"gitHead": "99871945be699eeae0ed20023dd6708b2a0d422d"
|
|
113
113
|
}
|