@rh-support/troubleshoot 1.0.12 → 1.0.14
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/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +12 -6
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +6 -8
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AA2BA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,eAoS7C"}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { Button, Checkbox, Popover, PopoverPosition, Switch, Tooltip } from '@patternfly/react-core';
|
|
11
11
|
import AngleDoubleLeftIcon from '@patternfly/react-icons/dist/js/icons/angle-double-left-icon';
|
|
12
12
|
import AngleDoubleRightIcon from '@patternfly/react-icons/dist/js/icons/angle-double-right-icon';
|
|
13
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
13
14
|
import ListIcon from '@patternfly/react-icons/dist/js/icons/list-icon';
|
|
14
15
|
import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
|
|
15
16
|
import TrendUpIcon from '@patternfly/react-icons/dist/js/icons/trend-up-icon';
|
|
@@ -70,12 +71,17 @@ export function CaseDetailsAside(props) {
|
|
|
70
71
|
const userPreferredCaseView = () => __awaiter(this, void 0, void 0, function* () {
|
|
71
72
|
try {
|
|
72
73
|
const isRetrievedInternal = yield getOriginalCaseView(); // retrieving as string.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
74
|
+
if (isRetrievedInternal !== null) {
|
|
75
|
+
const finalIsRetrievedInternal = !!+isRetrievedInternal; // converting backend string -> num -> bool
|
|
76
|
+
if (finalIsRetrievedInternal != null) {
|
|
77
|
+
setViewAsInternalPref(finalIsRetrievedInternal);
|
|
78
|
+
}
|
|
79
|
+
if (finalIsRetrievedInternal === false) {
|
|
80
|
+
!preferredOrDefaultCaseView() && toggleViewAsCustomerFlag(globalMetadataDispatchContext);
|
|
81
|
+
}
|
|
76
82
|
}
|
|
77
|
-
if (
|
|
78
|
-
|
|
83
|
+
if (isRetrievedInternal === null) {
|
|
84
|
+
setViewAsInternalPref(true);
|
|
79
85
|
}
|
|
80
86
|
}
|
|
81
87
|
catch (_a) {
|
|
@@ -174,7 +180,7 @@ export function CaseDetailsAside(props) {
|
|
|
174
180
|
preferredOrDefaultCaseView() ? t('Customer view') : t('Internal view'),
|
|
175
181
|
React.createElement(Popover, { "aria-label": "Preferred-default-case-view-popover", position: PopoverPosition.top, bodyContent: React.createElement("p", { className: 'pref-case-popover-text' },
|
|
176
182
|
React.createElement(Trans, null, renderCasePrefPopoverText())), showClose: false },
|
|
177
|
-
React.createElement(
|
|
183
|
+
React.createElement(InfoCircleIcon, { "aria-label": "Preferred-case-view-info-icon", className: "pf-u-ml-sm" }))),
|
|
178
184
|
React.createElement(Switch, { title: preferredOrDefaultCaseView() ? t('Customer view') : t('Internal view'), "data-tracking-id": preferredOrDefaultCaseView()
|
|
179
185
|
? 'disable-view-as-customer'
|
|
180
186
|
: 'enable-view-as-customer', "aria-label": preferredOrDefaultCaseView()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAsCA,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,eA8YxD"}
|
|
@@ -22,7 +22,6 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
22
22
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
23
23
|
import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageContext';
|
|
24
24
|
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../context/CaseDiscussionTabContext';
|
|
25
|
-
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
26
25
|
import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
|
|
27
26
|
import { getIrtForSLAAndSeverity, getOrtForSLAAndSeverity, getSeverityDescription } from '../../reducers/CaseHelpers';
|
|
28
27
|
import { caseOverviewReducer, initialCaseViewState, setSeverityUpdating } from '../../reducers/CaseOverviewReducer';
|
|
@@ -30,7 +29,6 @@ import { checkForCaseStatusToggleOnAttachOrComment, setCaseDetails, updateCaseDe
|
|
|
30
29
|
export default function UpdateSeverityModal(props) {
|
|
31
30
|
const { show, onClose, isDisabled, isFetching } = props;
|
|
32
31
|
const { t } = useTranslation();
|
|
33
|
-
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
34
32
|
const [descriptionValue, setDescriptionValue] = useState('');
|
|
35
33
|
const [caseOverviewState, caseOverviewDispatch] = useReducer(caseOverviewReducer, initialCaseViewState);
|
|
36
34
|
const caseDispatch = useCaseDispatch();
|
|
@@ -172,34 +170,34 @@ export default function UpdateSeverityModal(props) {
|
|
|
172
170
|
commentBody: severityUpdateFailedComment === null || severityUpdateFailedComment === void 0 ? void 0 : severityUpdateFailedComment.trim(),
|
|
173
171
|
contentType: 'markdown',
|
|
174
172
|
});
|
|
173
|
+
onClose();
|
|
174
|
+
ToastNotification.addDangerMessage(t(`Failed to update case status. Please try again`));
|
|
175
175
|
yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
|
|
176
176
|
status: 'Waiting on Customer',
|
|
177
177
|
severity: currentSeverity,
|
|
178
178
|
});
|
|
179
179
|
setCaseDetails(caseDispatch, { status: 'Waiting on Customer' });
|
|
180
|
-
onSuccessfulSubmit();
|
|
181
|
-
caseUpdateError.showError(e, t(`Failed to update case status. Please try again`));
|
|
182
180
|
}
|
|
183
181
|
}
|
|
184
182
|
catch (e) {
|
|
183
|
+
onClose();
|
|
184
|
+
ToastNotification.addDangerMessage(t(`Couldn't post severity update comment. Please try again`));
|
|
185
185
|
yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
|
|
186
186
|
severity: caseDetails.caseSeverity,
|
|
187
187
|
});
|
|
188
188
|
setDescriptionValue(descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim());
|
|
189
189
|
reUpdateSeverity(caseDetails.caseSeverity);
|
|
190
|
-
onClose();
|
|
191
190
|
setSeverityUpdating(caseOverviewDispatch, false);
|
|
192
|
-
caseUpdateError.showError(e, t(`Couldn't post severity update comment. Please try again`));
|
|
193
191
|
}
|
|
194
192
|
}
|
|
195
193
|
catch (e) {
|
|
196
194
|
onClose();
|
|
195
|
+
ToastNotification.addDangerMessage(t('Severity failed to update'));
|
|
197
196
|
yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
|
|
198
197
|
severity: caseDetails.caseSeverity,
|
|
199
198
|
});
|
|
200
|
-
setDescriptionValue(descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim());
|
|
201
199
|
reUpdateSeverity(caseDetails.caseSeverity);
|
|
202
|
-
|
|
200
|
+
setDescriptionValue(descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim());
|
|
203
201
|
}
|
|
204
202
|
finally {
|
|
205
203
|
yield updateDiscussionStateComments(dispatchDiscussion, caseDetails.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"not ie <= 11",
|
|
143
143
|
"not op_mini all"
|
|
144
144
|
],
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "385be1a5087e7a199a974b22442a06f8ef61a06b"
|
|
146
146
|
}
|