@rh-support/troubleshoot 0.2.53 → 0.2.54
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/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +8 -24
- package/lib/esm/components/Recommendations/EARules/EARule.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARule.js +2 -1
- package/lib/esm/components/Recommendations/RulesModal.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"AAiBA,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,eAiIlD"}
|
|
@@ -12,9 +12,8 @@ import { ToastNotification } from '@rh-support/components';
|
|
|
12
12
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
13
13
|
import { ability, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
14
|
import isEqual from 'lodash/isEqual';
|
|
15
|
-
import React, { useContext, useEffect, useReducer,
|
|
15
|
+
import React, { useContext, useEffect, useReducer, useState } from 'react';
|
|
16
16
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
-
import { CaseStatusEnum } from '../../../../../constants/caseDetailsConstants';
|
|
18
17
|
import { useCaseDispatch, useCaseSelector } from '../../../../../context/CaseContext';
|
|
19
18
|
import { caseOverviewReducer, fetchAllStatuses, initialCaseViewState, setStatusUpdating, } from '../../../../../reducers/CaseOverviewReducer';
|
|
20
19
|
import { updateCaseDetails } from '../../../../../reducers/CaseReducer';
|
|
@@ -51,15 +50,15 @@ export function VerifyCaseStatusModal(props) {
|
|
|
51
50
|
useEffect(() => {
|
|
52
51
|
fetchAllStatuses(caseOverviewDispatch, loggedInUsersAccount.data.secureSupport);
|
|
53
52
|
}, [caseOverviewDispatch, loggedInUsersAccount.data.secureSupport]);
|
|
54
|
-
console.log(caseOverviewState.allCaseStatuses.data);
|
|
55
53
|
const { isCaseUpdating } = caseState;
|
|
56
|
-
const reopenStatusRef = useRef(null);
|
|
57
54
|
const canEditCase = useCanEditCase();
|
|
58
55
|
const caseDispatch = useCaseDispatch();
|
|
59
56
|
const [statusChange, setStatusChange] = useState();
|
|
57
|
+
const [isVerifyCaseStatusLoading, setIsVerifyCaseStatusLoading] = useState(false);
|
|
60
58
|
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
61
|
-
props.onConfirm();
|
|
62
59
|
yield updateStatusState(statusChange);
|
|
60
|
+
setIsVerifyCaseStatusLoading(true);
|
|
61
|
+
props.onConfirm();
|
|
63
62
|
});
|
|
64
63
|
const updateStatusState = (statusVal, onStatusUpdate = null) => __awaiter(this, void 0, void 0, function* () {
|
|
65
64
|
setStatusUpdating(caseOverviewDispatch, true);
|
|
@@ -77,26 +76,11 @@ export function VerifyCaseStatusModal(props) {
|
|
|
77
76
|
const onStatusChange = (event, newStatus) => __awaiter(this, void 0, void 0, function* () {
|
|
78
77
|
if (canEditCase.alert())
|
|
79
78
|
return;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
else if (newStatus === CaseStatusEnum.CLOSED) {
|
|
84
|
-
onCaseClose();
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
setStatusChange(newStatus);
|
|
88
|
-
onDropdownToggle(false);
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
const onCaseClose = () => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
-
props.onClose();
|
|
93
|
-
});
|
|
94
|
-
const onCaseReopen = (selectedStatus = null) => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
reopenStatusRef.current = selectedStatus;
|
|
96
|
-
props.onClose();
|
|
79
|
+
setStatusChange(newStatus);
|
|
80
|
+
onDropdownToggle(false);
|
|
97
81
|
});
|
|
98
82
|
return (React.createElement(Modal, { id: "case-close-modal", title: t(`Please verify this case's status`), description: t(`Consider whether or not you're ready to nudge the customer`), "aria-describedby": "case-close-modal", isOpen: true, onClose: props.onClose, showClose: true, actions: [
|
|
99
|
-
React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading:
|
|
83
|
+
React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading: isVerifyCaseStatusLoading, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-submit" },
|
|
100
84
|
React.createElement(Trans, null, "Continue")),
|
|
101
85
|
React.createElement(Button, { key: "close-modal", variant: ButtonVariant.link, onClick: props.onClose, isDisabled: props.isUpdating, "data-tracking-id": "close-case-description-modal-cancel" },
|
|
102
86
|
React.createElement(Trans, null, "Cancel")),
|
|
@@ -104,7 +88,7 @@ export function VerifyCaseStatusModal(props) {
|
|
|
104
88
|
React.createElement("h3", { className: "subheading subheading-sm" },
|
|
105
89
|
React.createElement(Trans, null, "Status"),
|
|
106
90
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
107
|
-
React.createElement(Select, { "aria-label": t(status), id: "verify-case-status", selections:
|
|
91
|
+
React.createElement(Select, { "aria-label": t(status), id: "verify-case-status", selections: statusChange, onSelect: onStatusChange, isOpen: showDropdown, isDisabled: !canManageCase ||
|
|
108
92
|
caseOverviewState.allCaseStatuses.isFetching ||
|
|
109
93
|
(caseOverviewState.caseStatusUpdating && isCaseUpdating), menuAppendTo: document.body, validated: !status ? 'error' : 'default', placeholderText: t(status), onToggle: onDropdownToggle }, caseOverviewState.allCaseStatuses.data.map((option, index) => (React.createElement(SelectOption, { key: index, value: option },
|
|
110
94
|
React.createElement(Trans, null, option)))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EARule.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARule.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAK1C,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,UAAU,cAAc;IACpB,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;CAClG;AAGD,eAAO,MAAM,aAAa,+BAGxB,CAAC;AAEH,wBAAgB,gBAAgB,mBAM/B;AACD,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE;;;CAAA,eAyBxC;AAED,iBAAS,WAAW,gBAGnB;AAED,iBAAS,iBAAiB,gBAsBzB;AAED,iBAAS,aAAa,CAAC,EAAE,SAA6B,EAAE,SAAc,EAAE,EAAE;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,eAgBnH;AAED,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
1
2
|
import { pcm } from '@cee-eng/hydrajs';
|
|
2
3
|
import React, { useContext } from 'react';
|
|
3
4
|
import { Trans } from 'react-i18next';
|
|
@@ -49,7 +50,7 @@ function EARuleArticle({ linkTitle = 'Related Article', className = '' }) {
|
|
|
49
50
|
const { getTrackingULRWithQueryParams } = useParseRuleMarkdown();
|
|
50
51
|
if (!rule.cta)
|
|
51
52
|
return null;
|
|
52
|
-
return (React.createElement("a", { className: `se-recommended ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
|
|
53
|
+
return (React.createElement("a", { className: `se-recommended pf-c-button pf-m-link ts-known-vuln ${className}`, rel: "noopener noreferrer", target: "_blank", "data-tracking-id": "se-recommended-asa-rule", onClick: onCtaClick(rule.cta), href: getTrackingULRWithQueryParams(rule.cta, SessionResourceSource.EDMOUND_ABOTT) },
|
|
53
54
|
React.createElement(Trans, null, linkTitle)));
|
|
54
55
|
}
|
|
55
56
|
export { EARuleTitle, EARuleDescription, EARuleArticle };
|
|
@@ -84,7 +84,7 @@ export function InsightResultModal(props) {
|
|
|
84
84
|
React.createElement(Button, { isDisabled: isFetching, isLoading: isFetching, onClick: handleSolvedIssue, key: "solved-my-issue", variant: "primary", "data-tracking-id": "solved-my-issue-critical-solutions-modal" }, t('I solved my issue')),
|
|
85
85
|
React.createElement(Button, { onClick: props.onModalToggle, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-critical-solutions-modal" }, t('Cancel')),
|
|
86
86
|
] },
|
|
87
|
-
React.createElement(Accordion, { className: "push-top-narrow", headingLevel: "h2", asDefinitionList: false },
|
|
87
|
+
React.createElement(Accordion, { className: "push-top-narrow", headingLevel: "h2", asDefinitionList: false, isBordered: true },
|
|
88
88
|
props.insightResults.map((doc) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc }))),
|
|
89
89
|
props.EARule.length > 0 &&
|
|
90
90
|
props.EARule.map((rule, index) => (React.createElement(EARuleInfoAccordion, { showNewTag: canShowNewTag, key: `${index}_eaRule`, rule: rule })))))));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.54",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -143,5 +143,5 @@
|
|
|
143
143
|
"not ie <= 11",
|
|
144
144
|
"not op_mini all"
|
|
145
145
|
],
|
|
146
|
-
"gitHead": "
|
|
146
|
+
"gitHead": "32065538ece0d82c4e6e33dd63d6a0bf915e4a76"
|
|
147
147
|
}
|