@rh-support/troubleshoot 2.7.16 → 2.7.17
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/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +82 -27
- package/lib/esm/constants/askRedHatMessages.d.ts.map +1 -1
- package/package.json +7 -7
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+
|
|
1
|
+
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EA0JnC,CAAC"}
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js
CHANGED
|
@@ -12,7 +12,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
12
12
|
const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
|
|
13
13
|
const { globalMetadataState: { loggedInUserRights }, } = useGlobalStateContext();
|
|
14
14
|
const isInternal = (_a = loggedInUserRights.data) === null || _a === void 0 ? void 0 : _a.isInternal();
|
|
15
|
-
const canEditCase = useCanEditCase();
|
|
15
|
+
const canEditCase = useCanEditCase(props.caseStatus);
|
|
16
16
|
const isCreateRMEVisible = (caseEscalations.data || []).length === 0 || caseEscalations.data.every((item) => item.status === 'Closed');
|
|
17
17
|
const commonElements = (React.createElement(React.Fragment, null,
|
|
18
18
|
React.createElement("p", null,
|
|
@@ -34,7 +34,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
34
34
|
React.createElement(ListItem, null, t('The customer thinks the case is not moving appropriately')),
|
|
35
35
|
React.createElement(ListItem, null, t('The customer wants a new resource')),
|
|
36
36
|
React.createElement(ListItem, null, t('The issue is more severe than originally thought'))),
|
|
37
|
-
React.createElement("a",
|
|
37
|
+
React.createElement(Button, { variant: ButtonVariant.tertiary, component: "a", href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, target: "_blank", rel: "noopener noreferrer", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation'), isDisabled: canEditCase.isCaseNotEditable }, t('Request an escalation'))))));
|
|
38
38
|
const [openRequestEscalationModal, setOpenRequestEscalationModal] = useState(false);
|
|
39
39
|
const toggleModal = () => {
|
|
40
40
|
if (canEditCase.alert())
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA0BvE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAUvE,eAAO,MAAM,2BAA2B,yCAAyC,CAAC;AAElF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAClF,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACxE,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAqdhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -9,16 +9,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
11
|
import { EventTypes, linkifyBZIDs, linkifyWithCaseIDs, processRME } from '@cee-eng/ui-toolkit';
|
|
12
|
-
import { Alert, Button, ButtonVariant, Icon
|
|
13
|
-
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
12
|
+
import { Alert, Button, ButtonVariant, Icon } from '@patternfly/react-core';
|
|
13
|
+
// TODO: Re-enable after GraphQL migration of comment feedback
|
|
14
|
+
// import { Tooltip, TooltipPosition } from '@patternfly/react-core';
|
|
15
|
+
// import FrownIcon from '@patternfly/react-icons/dist/js/icons/frown-icon';
|
|
16
|
+
// import MehIcon from '@patternfly/react-icons/dist/js/icons/meh-icon';
|
|
17
|
+
// import OutlinedFrownIcon from '@patternfly/react-icons/dist/js/icons/outlined-frown-icon';
|
|
18
|
+
// import OutlinedMehIcon from '@patternfly/react-icons/dist/js/icons/outlined-meh-icon';
|
|
19
|
+
// import OutlinedSmileIcon from '@patternfly/react-icons/dist/js/icons/outlined-smile-icon';
|
|
20
|
+
// import SmileIcon from '@patternfly/react-icons/dist/js/icons/smile-icon';
|
|
19
21
|
import UserCircleIcon from '@patternfly/react-icons/dist/js/icons/user-circle-icon';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
+
import { ToastNotification } from '@rh-support/components';
|
|
23
|
+
// import { LoadingIndicator } from '@rh-support/components';
|
|
24
|
+
import { AbilityContext,
|
|
25
|
+
// CaseDetailsFields,
|
|
26
|
+
CaseDiscussionFields, resourceActions, resources, } from '@rh-support/user-permissions';
|
|
22
27
|
import { formatDateTime, linkifyLinks } from '@rh-support/utils';
|
|
23
28
|
import DOMPurify from 'dompurify';
|
|
24
29
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -40,8 +45,6 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
40
45
|
const ability = useContext(AbilityContext);
|
|
41
46
|
const canSeePrivateComments = ability.can(resourceActions.PATCH, resources.CASE_COMMENTS, CaseDiscussionFields.VIEW_PRIVATE_COMMENT);
|
|
42
47
|
const isAsaComment = props.comment.createdBy === AUTOMATED_SUPPORT_ASSISTANT;
|
|
43
|
-
const canGiveCommentFeedback = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_FEEDBACK_BUTTONS);
|
|
44
|
-
const canSeeFeedbackButtons = canGiveCommentFeedback && props.comment.isPublic && !isAsaComment;
|
|
45
48
|
const [isFeedbackUpdating, setIsFeedbackUpdating] = useState(false);
|
|
46
49
|
const [isAsaFeedbackModalOpen, setIsAsaFeedbackModalOpen] = useState(false);
|
|
47
50
|
const [savedFeedbackValue, setSavedFeedbackValue] = useState(props.feedback);
|
|
@@ -55,13 +58,6 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
55
58
|
setSavedFeedbackReason((_a = props.feedbackReason) !== null && _a !== void 0 ? _a : '');
|
|
56
59
|
}, [props.feedbackReason]);
|
|
57
60
|
const onJumpToComment = (commentId) => () => props.showJumpToComment && props.onJumpToComment && props.onJumpToComment(commentId);
|
|
58
|
-
const applyCommentFeedback = (comment, feedback) => (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
59
|
-
e.preventDefault();
|
|
60
|
-
if (props.feedback === feedback) {
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
yield submitCommentFeedback(comment, feedback);
|
|
64
|
-
});
|
|
65
61
|
const submitCommentFeedback = (comment, feedback, feedbackReason) => __awaiter(void 0, void 0, void 0, function* () {
|
|
66
62
|
var _a;
|
|
67
63
|
const commJson = Object.assign({ feedback, accountNumber: props.accountNumber, commentId: comment.id, commentCreatedBy: comment.createdBy }, (feedbackReason !== undefined ? { feedbackReason } : {}));
|
|
@@ -105,14 +101,74 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
105
101
|
}
|
|
106
102
|
return didSubmit;
|
|
107
103
|
});
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
// TODO: Re-enable after GraphQL migration of comment feedback
|
|
105
|
+
// const canGiveCommentFeedback = ability.can(
|
|
106
|
+
// resourceActions.PATCH,
|
|
107
|
+
// resources.CASE_DETAILS,
|
|
108
|
+
// CaseDetailsFields.CASE_DETAILS_FEEDBACK_BUTTONS
|
|
109
|
+
// );
|
|
110
|
+
// const canSeeFeedbackButtons = canGiveCommentFeedback && props.comment.isPublic && !isAsaComment;
|
|
111
|
+
//
|
|
112
|
+
// const applyCommentFeedback = (comment: ICaseComment, feedback: number) => async (e: React.MouseEvent) => {
|
|
113
|
+
// e.preventDefault();
|
|
114
|
+
//
|
|
115
|
+
// if (props.feedback === feedback) {
|
|
116
|
+
// return;
|
|
117
|
+
// }
|
|
118
|
+
//
|
|
119
|
+
// await submitCommentFeedback(comment, feedback);
|
|
120
|
+
// };
|
|
121
|
+
//
|
|
122
|
+
// const commentFeedbackButtons = (comment: ICaseComment, feedback: number) => (
|
|
123
|
+
// <span className="comment-feedback-buttons">
|
|
124
|
+
// <LoadingIndicator isInline={true} show={isFeedbackUpdating} />
|
|
125
|
+
// <Tooltip position={TooltipPosition.top} content={t('Positive feedback')}>
|
|
126
|
+
// <button
|
|
127
|
+
// className="btn btn-app btn-link"
|
|
128
|
+
// onClick={applyCommentFeedback(comment, 1)}
|
|
129
|
+
// data-tracking-id="case-comment-feedback-up"
|
|
130
|
+
// type="button"
|
|
131
|
+
// >
|
|
132
|
+
// {feedback === 1 ? (
|
|
133
|
+
// <SmileIcon title={t('Remove positive feedback')} />
|
|
134
|
+
// ) : (
|
|
135
|
+
// <OutlinedSmileIcon title={t('Leave positive feedback')} />
|
|
136
|
+
// )}
|
|
137
|
+
// </button>
|
|
138
|
+
// </Tooltip>
|
|
139
|
+
// <Tooltip position={TooltipPosition.top} content={t('Neutral feedback')}>
|
|
140
|
+
// <button
|
|
141
|
+
// className="btn btn-app btn-link"
|
|
142
|
+
// onClick={applyCommentFeedback(comment, 0)}
|
|
143
|
+
// data-tracking-id="case-comment-feedback-neutral"
|
|
144
|
+
// type="button"
|
|
145
|
+
// >
|
|
146
|
+
// {feedback === 0 ? (
|
|
147
|
+
// <MehIcon title={t('Remove neutral feedback')} />
|
|
148
|
+
// ) : (
|
|
149
|
+
// <OutlinedMehIcon title={t('Leave neutral feedback')} />
|
|
150
|
+
// )}
|
|
151
|
+
// </button>
|
|
152
|
+
// </Tooltip>
|
|
153
|
+
// <Tooltip position={TooltipPosition.top} content={t('Negative feedback')}>
|
|
154
|
+
// <button
|
|
155
|
+
// className="btn btn-app btn-link"
|
|
156
|
+
// onClick={applyCommentFeedback(comment, -1)}
|
|
157
|
+
// data-tracking-id="case-comment-feedback-down"
|
|
158
|
+
// type="button"
|
|
159
|
+
// >
|
|
160
|
+
// {feedback === -1 ? (
|
|
161
|
+
// <FrownIcon title={t('Remove negative feedback')} aria-label={t('Remove negative feedback')} />
|
|
162
|
+
// ) : (
|
|
163
|
+
// <OutlinedFrownIcon
|
|
164
|
+
// title={t('Leave negative feedback')}
|
|
165
|
+
// aria-label={t('Leave negative feedback')}
|
|
166
|
+
// />
|
|
167
|
+
// )}
|
|
168
|
+
// </button>
|
|
169
|
+
// </Tooltip>
|
|
170
|
+
// </span>
|
|
171
|
+
// );
|
|
116
172
|
const computeDiscussionCardCalss = (comment) => {
|
|
117
173
|
if (comment.createdBy === AUTOMATED_SUPPORT_ASSISTANT) {
|
|
118
174
|
return 'comment-automated';
|
|
@@ -282,7 +338,6 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
282
338
|
React.createElement("div", { className: "comment-body", onClick: onCommentAreaClick, ref: markdownRef }, computeCommentText(props.comment)),
|
|
283
339
|
React.createElement("footer", null,
|
|
284
340
|
React.createElement("span", { className: "comment-note" }, computeCommentFooter(props.comment)),
|
|
285
|
-
canSeeFeedbackButtons && commentFeedbackButtons(props.comment, props.feedback),
|
|
286
341
|
React.createElement("span", { className: "pull-right pf-v6-l-flex pf-m-align-items-center" },
|
|
287
342
|
props.showJumpToComment && (React.createElement(DiscussionItemLink, { onClick: onJumpToComment(props.comment.id), discussionType: DiscussionType.COMMENT, itemId: props.comment.id, caseNumber: caseNumber, isCopyLink: false },
|
|
288
343
|
React.createElement(Trans, null, "Jump to comment"))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"askRedHatMessages.d.ts","sourceRoot":"","sources":["../../../src/constants/askRedHatMessages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;CAe3B,CAAC;
|
|
1
|
+
{"version":3,"file":"askRedHatMessages.d.ts","sourceRoot":"","sources":["../../../src/constants/askRedHatMessages.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;CAe3B,CAAC;AACF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAyBnB,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;CAiBjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.17",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@progress/kendo-licensing": "1.3.5",
|
|
53
53
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
54
54
|
"@redux-devtools/extension": "^3.3.0",
|
|
55
|
-
"@rh-support/components": "2.6.
|
|
56
|
-
"@rh-support/react-context": "2.6.
|
|
57
|
-
"@rh-support/types": "2.0.
|
|
58
|
-
"@rh-support/user-permissions": "2.6.
|
|
59
|
-
"@rh-support/utils": "2.6.
|
|
55
|
+
"@rh-support/components": "2.6.17",
|
|
56
|
+
"@rh-support/react-context": "2.6.17",
|
|
57
|
+
"@rh-support/types": "2.0.30",
|
|
58
|
+
"@rh-support/user-permissions": "2.6.15",
|
|
59
|
+
"@rh-support/utils": "2.6.15",
|
|
60
60
|
"@types/react-redux": "^7.1.33",
|
|
61
61
|
"@types/redux": "^3.6.0",
|
|
62
62
|
"date-fns": "3.6.0",
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"defaults and supports es6-module",
|
|
130
130
|
"maintained node versions"
|
|
131
131
|
],
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "aee1882939b9547fcb315b159a6e0b03e8008ca0"
|
|
133
133
|
}
|