@rh-support/troubleshoot 0.2.93 → 0.2.96
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/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +13 -5
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +2 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +7 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.js +4 -3
- package/lib/esm/components/shared/fileUpload/FileLister.js +4 -3
- package/lib/esm/css/app.css +2 -2
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAyCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAyCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,eAgfjD"}
|
|
@@ -72,6 +72,7 @@ export default function CaseOverview(props) {
|
|
|
72
72
|
const { isCaseUpdating, contactIsPartner, hotfixRequested, hotfixDelivered, selectedAccountDetails, caseDetails: { firstCaseInactivityWarningSentAt, secondCaseInactivityWarningSentAt }, } = caseState;
|
|
73
73
|
const globalMetadataDispatchContext = useContext(GlobalMetadataDispatchContext);
|
|
74
74
|
const { globalMetadataState: { allCaseTypes, allCaseSeverities, viewAsCustomer, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
|
|
75
|
+
const updatingUser = loggedInUsersAccount.data.name;
|
|
75
76
|
const canSeeManagedByPartnerFlag = contactIsPartner &&
|
|
76
77
|
ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_MANAGED_BY_PARTNER_FLAG);
|
|
77
78
|
const canSeeInternalFlags = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_INTERNAL_FLAGS);
|
|
@@ -136,10 +137,17 @@ export default function CaseOverview(props) {
|
|
|
136
137
|
ToastNotification.addDangerMessage(t('Severity failed to update'));
|
|
137
138
|
}
|
|
138
139
|
});
|
|
139
|
-
const updateStatusState = (statusVal, onStatusUpdate = null) => __awaiter(this, void 0, void 0, function* () {
|
|
140
|
+
const updateStatusState = (statusVal, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther, onStatusUpdate = null) => __awaiter(this, void 0, void 0, function* () {
|
|
140
141
|
setStatusUpdating(caseOverviewDispatch, true);
|
|
142
|
+
let updateStatusObj = {
|
|
143
|
+
status: statusVal,
|
|
144
|
+
reopenedAt: reopenedAt,
|
|
145
|
+
reopenedBySSOName: reopenedBySSOName,
|
|
146
|
+
reopenedReason: reopenedReason,
|
|
147
|
+
reopenedReasonOther: reopenedReasonOther,
|
|
148
|
+
};
|
|
141
149
|
try {
|
|
142
|
-
yield updateCaseDetails(caseDispatch, props.caseNumber,
|
|
150
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, updateStatusObj);
|
|
143
151
|
setStatusUpdating(caseOverviewDispatch, false);
|
|
144
152
|
onStatusUpdate && (yield onStatusUpdate());
|
|
145
153
|
ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
|
|
@@ -284,12 +292,12 @@ export default function CaseOverview(props) {
|
|
|
284
292
|
}), isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, onClose: () => {
|
|
285
293
|
setShowCaseCloseModal(false);
|
|
286
294
|
}, caseNumber: caseNumber })),
|
|
287
|
-
showReOpenCaseModal && (React.createElement(ReopenCaseModal, { isInternal: loggedInUserRights.data.isInternal(), onConfirm: (newStatus,
|
|
288
|
-
yield updateStatusState(newStatus, () => __awaiter(this, void 0, void 0, function* () {
|
|
295
|
+
showReOpenCaseModal && (React.createElement(ReopenCaseModal, { isInternal: loggedInUserRights.data.isInternal(), onConfirm: (commentBody, newStatus, reopenedAt, reopenedBySSOName, reopenedReason, reopenedReasonOther) => __awaiter(this, void 0, void 0, function* () {
|
|
296
|
+
yield updateStatusState(newStatus, reopenedAt || null, reopenedBySSOName || null, reopenedReason || null, reopenedReasonOther || null, () => __awaiter(this, void 0, void 0, function* () {
|
|
289
297
|
postCommentAfterStatusUpdate(commentBody);
|
|
290
298
|
}));
|
|
291
299
|
setShowReopenCaseModal(false);
|
|
292
300
|
}), onClose: () => {
|
|
293
301
|
setShowReopenCaseModal(false);
|
|
294
|
-
}, caseNumber: caseNumber, reopenStatus: reopenStatusRef.current, allStatuses: caseOverviewState.allCaseStatuses.data, isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment }))));
|
|
302
|
+
}, caseNumber: caseNumber, reopenStatus: reopenStatusRef.current, allStatuses: caseOverviewState.allCaseStatuses.data, isUpdating: (caseOverviewState.caseStatusUpdating && isCaseUpdating) || isPostingComment, whoIsUpdating: updatingUser }))));
|
|
295
303
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
|
|
2
2
|
interface IProps {
|
|
3
|
-
onConfirm: (
|
|
3
|
+
onConfirm: (commentBody: any, newStatus: any, reopenedAt?: any, reopenedBySSOName?: any, reopenedReason?: any, reopenedReasonOther?: any) => void;
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
caseNumber: string;
|
|
6
6
|
isInternal: boolean;
|
|
7
7
|
allStatuses: string[];
|
|
8
8
|
isUpdating: boolean;
|
|
9
9
|
reopenStatus: CaseStatusEnum;
|
|
10
|
+
whoIsUpdating: string;
|
|
10
11
|
}
|
|
11
12
|
export declare function ReopenCaseModal(props: IProps): JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,eA6L5C"}
|
|
@@ -9,6 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Button, ButtonVariant, Form, FormGroup, Modal, ModalVariant, Select, SelectOption, TextArea, } from '@patternfly/react-core';
|
|
11
11
|
import ExclamationCircleIcon from '@patternfly/react-icons/dist/js/icons/exclamation-circle-icon';
|
|
12
|
+
import { formatDateTime } from '@rh-support/utils';
|
|
12
13
|
import { isEmpty } from 'lodash';
|
|
13
14
|
import React, { useState } from 'react';
|
|
14
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -45,12 +46,16 @@ export function ReopenCaseModal(props) {
|
|
|
45
46
|
const getCommentBody = () => {
|
|
46
47
|
return `**Reason for reopening case:** \n${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
|
|
47
48
|
? `${props.isInternal ? '' : '. '}${reopenDescription}`
|
|
48
|
-
: ''}
|
|
49
|
+
: ''}
|
|
50
|
+
\n **Reopened date:** \n${formatDateTime(Date())}
|
|
51
|
+
\n**Reopened by:** \n${props.whoIsUpdating}
|
|
52
|
+
\n**Reopened reason other description:**\n${reopenDescription}`;
|
|
49
53
|
};
|
|
50
54
|
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
51
55
|
if (!checkForRequiredFields())
|
|
52
56
|
return;
|
|
53
|
-
|
|
57
|
+
let submissionDate = new Date();
|
|
58
|
+
props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || CaseStatusEnum.WAITING_ON_REDHAT, submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
|
|
54
59
|
});
|
|
55
60
|
const onReasonChange = (event, resolution) => {
|
|
56
61
|
setSelectedReason(resolution);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseAlternateId.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseAlternateId.tsx"],"names":[],"mappings":"AAgBA,UAAU,MAAM;IACZ,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAOD,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA4HrC;kBA5HQ,eAAe;;;AA+HxB,eAAe,eAAe,CAAC"}
|
|
@@ -43,11 +43,12 @@ function CaseAlternateId(props) {
|
|
|
43
43
|
}
|
|
44
44
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
45
45
|
}, [alternateId]);
|
|
46
|
-
const
|
|
46
|
+
const onAlternateIdChange = (e) => {
|
|
47
|
+
var _a;
|
|
47
48
|
if (canEditCase.alert())
|
|
48
49
|
return;
|
|
49
50
|
setAlternateIdState(e.target.value);
|
|
50
|
-
!caseNumber && setCaseDetails(caseDispatch, { alternateId: e.target.value });
|
|
51
|
+
!caseNumber && setCaseDetails(caseDispatch, { alternateId: (_a = e.target.value) === null || _a === void 0 ? void 0 : _a.trim() });
|
|
51
52
|
};
|
|
52
53
|
const updateAlternateId = () => __awaiter(this, void 0, void 0, function* () {
|
|
53
54
|
try {
|
|
@@ -87,7 +88,7 @@ function CaseAlternateId(props) {
|
|
|
87
88
|
alternateIdState === alternateId ||
|
|
88
89
|
isUpdating ||
|
|
89
90
|
(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT, loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : null },
|
|
90
|
-
React.createElement("input", { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange:
|
|
91
|
+
React.createElement("input", { value: alternateIdState, type: "text", className: "form-control", id: "case-details-alternate-id", placeholder: t(`Enter your case tracking number or internal incident ID`), onChange: onAlternateIdChange, disabled: isUpdating, "data-tracking-id": "case-details-alternate-id" })),
|
|
91
92
|
(alternateIdState === null || alternateIdState === void 0 ? void 0 : alternateIdState.length) > ALTERNATE_CASE_ID_LIMIT && (React.createElement("div", { className: "pull-top" },
|
|
92
93
|
React.createElement("p", { className: "form-instructions form-invalid" },
|
|
93
94
|
React.createElement(Trans, null, maxLengthErrorMessage))))));
|
|
@@ -2,7 +2,7 @@ import { pcm } from '@cee-eng/hydrajs';
|
|
|
2
2
|
import { Button, ButtonVariant, Label, Progress, ProgressMeasureLocation } from '@patternfly/react-core';
|
|
3
3
|
import { CircularProgressbar } from '@rh-support/components';
|
|
4
4
|
import { humanizeSize } from '@rh-support/utils';
|
|
5
|
-
import { capitalize } from 'lodash';
|
|
5
|
+
import { capitalize, isEmpty } from 'lodash';
|
|
6
6
|
import map from 'lodash/map';
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -26,10 +26,11 @@ const analysisStepMap = {
|
|
|
26
26
|
export default function FileLister(props) {
|
|
27
27
|
const { t } = useTranslation();
|
|
28
28
|
const onDescriptionChange = (localFile, indexToEdit) => (event) => {
|
|
29
|
+
var _a;
|
|
29
30
|
const editedLocalFile = Object.assign({}, localFile);
|
|
30
|
-
editedLocalFile.description = event.target.value;
|
|
31
|
+
editedLocalFile.description = isEmpty((_a = event.target.value) === null || _a === void 0 ? void 0 : _a.trim()) ? '' : event.target.value;
|
|
31
32
|
props.onFileEdit &&
|
|
32
|
-
props.onFileEdit(editedLocalFile, indexToEdit, { description: editedLocalFile.description });
|
|
33
|
+
props.onFileEdit(editedLocalFile, indexToEdit, { description: editedLocalFile.description.trim() });
|
|
33
34
|
};
|
|
34
35
|
const onRetry = (index) => () => {
|
|
35
36
|
props.onRetry && props.onRetry(index);
|
package/lib/esm/css/app.css
CHANGED
|
@@ -336,7 +336,7 @@
|
|
|
336
336
|
|
|
337
337
|
.wizard-aside-content header button .fa {
|
|
338
338
|
font-size: 20px;
|
|
339
|
-
}
|
|
339
|
+
}
|
|
340
340
|
|
|
341
341
|
@font-face {
|
|
342
342
|
font-family: 'Red Hat Text';
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
font-weight: 900;
|
|
417
417
|
font-style: 'normal';
|
|
418
418
|
text-rendering: optimizeLegibility;
|
|
419
|
-
}
|
|
419
|
+
}*/
|
|
420
420
|
|
|
421
421
|
/* Open Case section */
|
|
422
422
|
.open-case-product-wrapper {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.96",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lib/**/*"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@cee-eng/hydrajs": "4.
|
|
29
|
+
"@cee-eng/hydrajs": "4.8.34",
|
|
30
30
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
31
31
|
"@patternfly/patternfly": "4.185.1",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"react-virtualized": "^9.21.2"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@cee-eng/hydrajs": "4.
|
|
66
|
+
"@cee-eng/hydrajs": "4.8.34",
|
|
67
67
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
68
68
|
"@patternfly/patternfly": "4.185.1",
|
|
69
69
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -73,12 +73,12 @@
|
|
|
73
73
|
"@patternfly/react-core": "4.202.16",
|
|
74
74
|
"@progress/kendo-drawing": "^1.6.0",
|
|
75
75
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
76
|
-
"@rh-support/api": "0.3.
|
|
77
|
-
"@rh-support/components": "1.1.
|
|
78
|
-
"@rh-support/react-context": "0.2.
|
|
76
|
+
"@rh-support/api": "0.3.14",
|
|
77
|
+
"@rh-support/components": "1.1.58",
|
|
78
|
+
"@rh-support/react-context": "0.2.58",
|
|
79
79
|
"@rh-support/types": "0.2.0",
|
|
80
|
-
"@rh-support/user-permissions": "0.2.
|
|
81
|
-
"@rh-support/utils": "0.2.
|
|
80
|
+
"@rh-support/user-permissions": "0.2.46",
|
|
81
|
+
"@rh-support/utils": "0.2.35",
|
|
82
82
|
"@types/react-redux": "^7.1.12",
|
|
83
83
|
"@types/redux": "^3.6.0",
|
|
84
84
|
"@webcomponents/webcomponentsjs": "^2.2.10",
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"not ie <= 11",
|
|
144
144
|
"not op_mini all"
|
|
145
145
|
],
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "f0c7d083eb6f8cce7089d9b5806e8537df3cafc1"
|
|
147
147
|
}
|