@rh-support/troubleshoot 2.2.57 → 2.2.59
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/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +8 -1
- package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.js +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +4 -4
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
- package/lib/esm/scss/_pf-overrides.scss +12 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,eAihBxC"}
|
|
@@ -34,6 +34,7 @@ import { PDFContext } from '../../PDFContainer';
|
|
|
34
34
|
import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
|
|
35
35
|
import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
|
|
36
36
|
export function PostComment(props) {
|
|
37
|
+
var _a;
|
|
37
38
|
const { t } = useTranslation();
|
|
38
39
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
39
40
|
let { caseNumber } = props;
|
|
@@ -77,8 +78,10 @@ export function PostComment(props) {
|
|
|
77
78
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
79
|
}, []);
|
|
79
80
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
81
|
+
const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
|
|
80
82
|
const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
|
|
81
83
|
const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
84
|
+
const isConfirmedStateSideSupport = (_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport;
|
|
82
85
|
const { onFileSelect, onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload, } = useMarkdownFileUploader({
|
|
83
86
|
caseNumber,
|
|
84
87
|
secureSupport: loggedInUsersAccount.data.secureSupport,
|
|
@@ -312,7 +315,10 @@ export function PostComment(props) {
|
|
|
312
315
|
let parsedPassedReply = getReplyText(passedReply, props.commentCreator);
|
|
313
316
|
return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
|
|
314
317
|
};
|
|
315
|
-
const isSubmitDisabled = isReplyDisabled() ||
|
|
318
|
+
const isSubmitDisabled = isReplyDisabled() ||
|
|
319
|
+
isCommentEmpty ||
|
|
320
|
+
isPostCommentDisabled ||
|
|
321
|
+
(isConfirmedStateSideSupport && !cssCommentAgreed);
|
|
316
322
|
return (React.createElement("div", { className: `pf-v5-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
|
|
317
323
|
React.createElement(MarkdownEditor, { className: `${!isPublic && canPostPrivateComments ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", showMarkdownPlainTextToggle: true, editorMode: commentType, onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, rows: isTextAreaFocused ? 12 : 4, bindTextArea: textAreaRef, onCommentExceedCharsLimit: onCommentExceedCharsLimit, mdPlaceholder: isPublic || !canPostPrivateComments
|
|
318
324
|
? 'Add a comment using markdown'
|
|
@@ -328,6 +334,7 @@ export function PostComment(props) {
|
|
|
328
334
|
isUploadingFile: isMarkdownFileUploadInProgress,
|
|
329
335
|
onClipboardPaste,
|
|
330
336
|
} }),
|
|
337
|
+
isConfirmedStateSideSupport && (React.createElement(Checkbox, { id: "css-case-comment-agreement", name: "css-case-comment-agreement", className: "pf-v5-u-mt-md pf-v5-u-mb-xl", isRequired: true, label: t('I will not transmit controlled, unclassified information to or export it from the Red Hat Customer Portal.'), isChecked: cssCommentAgreed, onChange: (_, c) => setCssCommentAgreed(c) })),
|
|
331
338
|
isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-v5-l-flex post-comment-btn-group push-top-narrow" },
|
|
332
339
|
isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
|
|
333
340
|
React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isSubmitDisabled, className: "postcomment-submit" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RelatedTasks.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.tsx"],"names":[],"mappings":"AAmCA,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"RelatedTasks.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.tsx"],"names":[],"mappings":"AAmCA,QAAA,MAAM,YAAY,mBA+KjB,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -105,7 +105,7 @@ const RelatedTasks = () => {
|
|
|
105
105
|
React.createElement(Th, null, columnNames.status),
|
|
106
106
|
React.createElement(Th, null, columnNames.title))),
|
|
107
107
|
React.createElement(Tbody, null, displayData.map((item) => (React.createElement(Tr, { key: item.id },
|
|
108
|
-
React.createElement(Td, { dataLabel: columnNames.id }, item.link ? (React.createElement("a", { href: item.link, target: "_blank", rel: "noopener noreferrer" }, item.id)) : (item.id)),
|
|
108
|
+
React.createElement(Td, { dataLabel: columnNames.id }, item.link ? (React.createElement("a", { href: item.link, target: "_blank", rel: "noopener noreferrer", "data-tracking-id": "related-tasks-issue-link" }, item.id)) : (item.id)),
|
|
109
109
|
React.createElement(Td, { dataLabel: columnNames.type }, item.type),
|
|
110
110
|
React.createElement(Td, { dataLabel: columnNames.status },
|
|
111
111
|
React.createElement(Badge, { isRead: true }, item.status)),
|
|
@@ -14,7 +14,7 @@ import { useCaseSelector } from '../../context/CaseContext';
|
|
|
14
14
|
import { ClusterRecommendationsContext } from '../../context/ClusterRecommendationsContext';
|
|
15
15
|
import { RulesStateContext } from '../../context/RulesContext';
|
|
16
16
|
import { TCStateContext } from '../../context/TopContentContext';
|
|
17
|
-
import { getIrtForSLAAndSeverity
|
|
17
|
+
import { getIrtForSLAAndSeverity } from '../../reducers/CaseHelpers';
|
|
18
18
|
import RouteUtils from '../../utils/routeUtils';
|
|
19
19
|
import { AsideResults } from '../Recommendations/AsideResults';
|
|
20
20
|
import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
|
|
@@ -59,13 +59,13 @@ export default function SubmitCase(props) {
|
|
|
59
59
|
};
|
|
60
60
|
const getResponseTimeMessage = (sla, severity) => {
|
|
61
61
|
const irt = getIrtForSLAAndSeverity(sla, severity);
|
|
62
|
-
const ort = getOrtForSLAAndSeverity(sla, severity);
|
|
63
|
-
const finalORT = ort.replace(' or as agreed', '');
|
|
62
|
+
//const ort = getOrtForSLAAndSeverity(sla, severity);
|
|
63
|
+
//const finalORT = ort.replace(' or as agreed', '');
|
|
64
64
|
// when on product version detail doNotShowIRT is true, we don't show Initial Response Time info
|
|
65
65
|
const versionDetail = (versionsDetails === null || versionsDetails === void 0 ? void 0 : versionsDetails.data) && find(versionsDetails.data, (vDetail) => vDetail.name === version);
|
|
66
66
|
return isEmpty(irt || (versionDetail === null || versionDetail === void 0 ? void 0 : versionDetail.doNotShowIRT)) ? (React.createElement(React.Fragment, null)) : (React.createElement(Trans, null,
|
|
67
67
|
"Our initial response time is ",
|
|
68
|
-
React.createElement("strong", null,
|
|
68
|
+
React.createElement("strong", null, irt),
|
|
69
69
|
", or the time specified in your"));
|
|
70
70
|
};
|
|
71
71
|
useEffect(() => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardMain.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardMain.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAS,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAK9D,OAAO,EAAoB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAOpF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,qBAAqB,EAAE,CAAC,cAAc,EAAE,OAAO,KAAK,IAAI,CAAC;IACzD,mBAAmB,EAAE,CAAC,2BAA2B,EAAE,OAAO,EAAE,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;CAClH;AAED,iBAAS,UAAU,CAAC,KAAK,EAAE,MAAM,eAgHhC;AACD,eAAe,UAAU,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Wizard, WizardContextConsumer, WizardFooter } from '@patternfly/react-core/deprecated';
|
|
2
2
|
import { LoadingIndicator } from '@rh-support/components';
|
|
3
|
+
import { CSSUserModal, GlobalMetadataStateContext, updateTroubleshootTraditionalSupportAgreed, useGlobalDispatchContext, } from '@rh-support/react-context';
|
|
3
4
|
import isEqual from 'lodash/isEqual';
|
|
4
5
|
import React, { Suspense, useContext, useState } from 'react';
|
|
5
6
|
import { useTranslation } from 'react-i18next';
|
|
@@ -18,6 +19,8 @@ function WizardMain(props) {
|
|
|
18
19
|
const { isCreatingCase } = useCaseSelector((state) => ({
|
|
19
20
|
isCreatingCase: state.isCreatingCase,
|
|
20
21
|
}), isEqual);
|
|
22
|
+
const { globalMetadataState: { troubleshootTraditionalSupportAgreed }, } = useContext(GlobalMetadataStateContext);
|
|
23
|
+
const globalDispatchContext = useGlobalDispatchContext();
|
|
21
24
|
const { getStepsSequece } = useWizard(props.routeProps);
|
|
22
25
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
23
26
|
const { t } = useTranslation();
|
|
@@ -40,6 +43,9 @@ function WizardMain(props) {
|
|
|
40
43
|
setActiveSectionChanged(dispatchToRouteReducer, step.id);
|
|
41
44
|
updateisNextBtnClickedToShowValidationError(dispatchToRouteReducer, false);
|
|
42
45
|
};
|
|
46
|
+
const onConfirmTraditionalSupportAgreement = () => {
|
|
47
|
+
updateTroubleshootTraditionalSupportAgreed(globalDispatchContext, true);
|
|
48
|
+
};
|
|
43
49
|
const CustomFooter = (React.createElement(WizardFooter, null,
|
|
44
50
|
React.createElement(WizardContextConsumer, null, ({ activeStep, onNext, onBack }) => {
|
|
45
51
|
return (React.createElement(WizardNavigation, { routeProps: props.routeProps, onNext: onNext, onBack: onBack, activeStep: activeStep, onSubmit: onSubmit, confirmSupportModal: props.confirmSupportModal, onShowRestUpdate: (flag) => setShowRestFlag(flag) }));
|
|
@@ -48,6 +54,7 @@ function WizardMain(props) {
|
|
|
48
54
|
// in useWizard file then add it to step squences in RouteConstNTypes
|
|
49
55
|
const steps = getStepsSequece(showRestFlag);
|
|
50
56
|
return (React.createElement(React.Fragment, null,
|
|
57
|
+
React.createElement(CSSUserModal, { onConfirmTraditionalSupportAgreement: onConfirmTraditionalSupportAgreement, display: !troubleshootTraditionalSupportAgreed }),
|
|
51
58
|
steps.length !== 0 && (React.createElement(Route, { path: `${RouteUtils.seBasePath}/(${steps[0].id}|describe-issue|open-case)`, render: () => (React.createElement(Wizard, { navAriaLabel: ` navAriaLabel steps `, mainAriaLabel: ` mainAriaLabel content `, steps: steps, footer: CustomFooter, onNext: onNext, onBack: onBack, hideClose: true, backButtonText: t('Go back'), onCurrentStepChanged: onCurrentStepChanged })) })),
|
|
52
59
|
React.createElement(Route, { exact: true, path: `${RouteUtils.seBasePath}/${AppRouteSections.SUBMIT_CASE}`, render: () => renderSubmitCasePage() })));
|
|
53
60
|
}
|
|
@@ -280,6 +280,9 @@
|
|
|
280
280
|
|
|
281
281
|
.popular-solutions {
|
|
282
282
|
background-color: #286869 !important;
|
|
283
|
+
padding-top: 10px !important;
|
|
284
|
+
padding-bottom: 10px !important;
|
|
285
|
+
|
|
283
286
|
.card-title {
|
|
284
287
|
color: #fff !important;
|
|
285
288
|
font-weight: 900;
|
|
@@ -625,6 +628,14 @@ button.pf-v5-c-toggle-group__button {
|
|
|
625
628
|
|
|
626
629
|
.top-content-suggestion-accordion {
|
|
627
630
|
.pf-v5-c-accordion__toggle {
|
|
628
|
-
padding: 10px !important;
|
|
631
|
+
padding-top: 10px !important;
|
|
632
|
+
padding-bottom: 10px !important;
|
|
633
|
+
}
|
|
634
|
+
.pf-v5-c-accordion__expandable-content-body {
|
|
635
|
+
padding-top: 4px;
|
|
636
|
+
padding-bottom: 4px;
|
|
637
|
+
}
|
|
638
|
+
h3 {
|
|
639
|
+
color: black;
|
|
629
640
|
}
|
|
630
641
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.59",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"@patternfly/react-table": "^5.1.1",
|
|
60
60
|
"@progress/kendo-drawing": "^1.6.0",
|
|
61
61
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
62
|
-
"@rh-support/components": "2.1.
|
|
63
|
-
"@rh-support/react-context": "2.1.
|
|
62
|
+
"@rh-support/components": "2.1.32",
|
|
63
|
+
"@rh-support/react-context": "2.1.35",
|
|
64
64
|
"@rh-support/types": "2.0.2",
|
|
65
65
|
"@rh-support/user-permissions": "2.1.22",
|
|
66
66
|
"@rh-support/utils": "2.1.15",
|
|
@@ -124,5 +124,5 @@
|
|
|
124
124
|
"defaults and supports es6-module",
|
|
125
125
|
"maintained node versions"
|
|
126
126
|
],
|
|
127
|
-
"gitHead": "
|
|
127
|
+
"gitHead": "d52b9ccf062855933cbb1da3dac7f4c6a2694671"
|
|
128
128
|
}
|