@rh-support/troubleshoot 0.2.93 → 0.2.94
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/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);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.94",
|
|
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": "3fad11884fd2c38ae9c2171cc51099fb09cd5d40"
|
|
147
147
|
}
|