@rh-support/troubleshoot 2.2.92 → 2.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.
Files changed (26) hide show
  1. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +1 -1
  3. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +2 -2
  5. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +1 -1
  6. package/lib/esm/components/CaseInformation/Fts.js +1 -1
  7. package/lib/esm/components/CaseInformation/OpenCaseIssue.d.ts.map +1 -1
  8. package/lib/esm/components/CaseInformation/OpenCaseIssue.js +1 -1
  9. package/lib/esm/components/ImproveCase/Hostname.d.ts.map +1 -1
  10. package/lib/esm/components/ImproveCase/Hostname.js +3 -3
  11. package/lib/esm/components/Recommendations/AsideResults.d.ts +1 -0
  12. package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
  13. package/lib/esm/components/Recommendations/AsideResults.js +1 -1
  14. package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
  15. package/lib/esm/components/Recommendations/InsightsRuleInfo.js +1 -1
  16. package/lib/esm/components/Recommendations/RecommendationInfoBox.js +1 -1
  17. package/lib/esm/components/SessionRestore/SessionItem.d.ts.map +1 -1
  18. package/lib/esm/components/SessionRestore/SessionItem.js +2 -2
  19. package/lib/esm/components/SessionRestore/SessionRestoreCard.js +1 -1
  20. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
  21. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +80 -20
  22. package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
  23. package/lib/esm/components/wizardLayout/WizardAside.js +4 -4
  24. package/lib/esm/scss/_main.scss +17 -0
  25. package/lib/esm/scss/_pf-overrides.scss +0 -1
  26. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAiX7C"}
1
+ {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAYvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAkX7C"}
@@ -188,7 +188,7 @@ export function CaseDetailsAside(props) {
188
188
  React.createElement(Icon, { size: "md" },
189
189
  React.createElement(ListIcon, null))))),
190
190
  !caseEscalations.isFetching && (canCreateICE || (canCreateRME && isCreateRMEVisible)) && (React.createElement(Tooltip, { content: t('Request an escalation'), position: "left" },
191
- React.createElement(Button, { variant: "link", className: "sidebar-section-toggle-btn", onClick: () => setSectionToScollRef(createEscalationRef) },
191
+ React.createElement(Button, { variant: "link", className: "sidebar-section-toggle-btn", onClick: () => setSectionToScollRef(createEscalationRef), "aria-label": t('Request an escalation') },
192
192
  React.createElement(Icon, { size: "md" },
193
193
  React.createElement(TrendUpIcon, null)))))))),
194
194
  React.createElement("pfe-collapse-panel", { className: "sidebar-content", "pfe-animation": "false", id: "case-details-aside-content", ref: caseDetailsAsidePanelRef },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAwBlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAsN5C"}
1
+ {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAwBlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAqN5C"}
@@ -121,9 +121,9 @@ export function CaseDetailsTabs(props) {
121
121
  React.createElement(TextContent, { className: "show-in-pdf pf-v5-u-mt-md" },
122
122
  React.createElement(Text, { component: TextVariants.h2 },
123
123
  React.createElement(Trans, null, tab.title))),
124
- tab.component)))) : isExportingPDF ? (React.createElement(React.Fragment, null,
124
+ tab.component)))) : isExportingPDF && isTabVisibleInPdfExport(tab) ? (React.createElement(React.Fragment, null,
125
125
  React.createElement("div", { className: "page-break" }),
126
- React.createElement(TabContent, { eventKey: index, key: tab.key, id: `pf-tab-${index}-${tab.title.split(' ')[0]}-tabpanel`, ref: tab.ref, "aria-label": tab.title, hidden: isExportingPDF ? !isTabVisibleInPdfExport(tab) : index !== getActiveTabKey() },
126
+ React.createElement(TabContent, { eventKey: index, key: tab.key, id: `pf-tab-${index}-${tab.title.split(' ')[0]}-tabpanel`, ref: tab.ref, "aria-label": tab.title },
127
127
  React.createElement(ErrorBoundary, { errorMsgInfo: {
128
128
  message: t(`There was an error loading case ${tab.key}`),
129
129
  } },
@@ -133,7 +133,7 @@ const CaseComments = React.forwardRef((props, ref) => {
133
133
  return { __html: DOMPurify.sanitize(text) };
134
134
  };
135
135
  const commentMarkdown = (markdown) => {
136
- const htmlString = parseCommentMarkdown(markdown, { showButtonForAttachmentLink: true }, { openLinksInNewTab: true, gfm: true, breaks: true });
136
+ const htmlString = parseCommentMarkdown(markdown, { showButtonForAttachmentLink: true, disableImagePreview: isExportingPDF }, { openLinksInNewTab: true, gfm: true, breaks: true });
137
137
  return { __html: DOMPurify.sanitize(htmlString) };
138
138
  };
139
139
  const onCommentAreaClick = (e) => {
@@ -134,7 +134,7 @@ function Fts(props) {
134
134
  // To disable save button if field is empty or is updating
135
135
  const isSaveDisabled = contactInfo24X7State === contactInfo24x7 || isFtsContactUpdating;
136
136
  return (React.createElement(React.Fragment, null,
137
- React.createElement("div", { className: "form-group pf-v5-u-mb-md" },
137
+ React.createElement("div", { className: "form-group pf-v5-u-mb-xs" },
138
138
  React.createElement("input", { type: "checkbox", id: "get-support-fts", "data-tracking-id": "get-support-fts", disabled: disableFtsNContact, name: "get-support-fts", checked: fts, onChange: onFtsChange }),
139
139
  React.createElement("label", { htmlFor: "get-support-fts" },
140
140
  React.createElement(Trans, null, "24x7 Support")),
@@ -1 +1 @@
1
- {"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAqGnC;kBArGQ,aAAa;;;AAwGtB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAsGnC;kBAtGQ,aAAa;;;AAyGtB,eAAe,aAAa,CAAC"}
@@ -57,7 +57,7 @@ function OpenCaseIssue(props) {
57
57
  : 'get-support-summary', placeholder: t('i18nkeySummarizeExperience', "Please describe the problem you are facing, including any specific steps you've taken or error messages."), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
58
58
  ? 'get-support-title'
59
59
  : 'get-support-summary', rows: 6 }),
60
- React.createElement(Progress, { value: summary === null || summary === void 0 ? void 0 : summary.length, min: 0, max: SUMMARY_LENGTH_LIMIT, size: ProgressSize.sm, label: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, valueText: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.outside }))));
60
+ React.createElement(Progress, { value: summary === null || summary === void 0 ? void 0 : summary.length, min: 0, max: SUMMARY_LENGTH_LIMIT, size: ProgressSize.sm, label: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, valueText: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.outside, "aria-label": `Progress - ${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}` }))));
61
61
  }
62
62
  OpenCaseIssue.defaultProps = defaultProps;
63
63
  export default OpenCaseIssue;
@@ -1 +1 @@
1
- {"version":3,"file":"Hostname.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/Hostname.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,UAAU,MAAM;CAAG;AAEnB,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAkDrC"}
1
+ {"version":3,"file":"Hostname.d.ts","sourceRoot":"","sources":["../../../../src/components/ImproveCase/Hostname.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,UAAU,MAAM;CAAG;AAEnB,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAyDrC"}
@@ -1,3 +1,4 @@
1
+ import { Button } from '@patternfly/react-core';
1
2
  import { AbilityContext, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
2
3
  import React, { useContext } from 'react';
3
4
  import { Trans, useTranslation } from 'react-i18next';
@@ -33,8 +34,7 @@ export function Hostname(props) {
33
34
  React.createElement("p", { className: "form-instructions" },
34
35
  React.createElement(Trans, { i18nKey: 'ChangeHostnamePrefLink' },
35
36
  "Hostname is ",
36
- React.createElement("strong", null, "private"),
37
+ React.createElement("span", { className: "form-instructions-bold" }, "private"),
37
38
  ". Red Hat does not have access to view hostnames unless you",
38
- ' ',
39
- React.createElement(Link, { to: '/manage/preferences' }, "choose to share")))));
39
+ React.createElement(Button, { className: "btn-choose-to-share", variant: "link", component: (props) => React.createElement(Link, Object.assign({}, props, { to: '/manage/preferences' })) }, "choose to share")))));
40
40
  }
@@ -3,6 +3,7 @@ import { RouteComponentProps } from 'react-router-dom';
3
3
  import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
4
4
  interface IProps {
5
5
  routeProps: RouteComponentProps<IRouteUrlParams>;
6
+ className?: string;
6
7
  }
7
8
  export declare function AsideResults(props: IProps): React.JSX.Element;
8
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAUtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA0MzC"}
1
+ {"version":3,"file":"AsideResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/AsideResults.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AASvD,OAAO,EAAE,eAAe,EAAsC,MAAM,iCAAiC,CAAC;AAUtG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBA0MzC"}
@@ -130,7 +130,7 @@ export function AsideResults(props) {
130
130
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
131
131
  if (!canShowSideRecommendations())
132
132
  return React.createElement(React.Fragment, null);
133
- return (React.createElement("div", { className: "card card-white card-support top-recommendations" },
133
+ return (React.createElement("div", { className: `card card-white card-support top-recommendations ${props.className ? props.className : ''}` },
134
134
  React.createElement("h3", { className: "card-heading popular-solutions green-card-heading" }, isIdea ? (React.createElement(Trans, null, "Search recommendations")) : (React.createElement(Trans, null, "Live troubleshooting powered by OpenShift AI"))),
135
135
  React.createElement("div", { className: "card-body" },
136
136
  React.createElement("ul", { className: "list-flat" }, recommendationState.sideRecommendation.map((doc, index) => {
@@ -240,7 +240,7 @@ function InsightsResults(props) {
240
240
  }
241
241
  return (React.createElement(React.Fragment, null,
242
242
  !rulesState.triggerRuleNotification && caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && (React.createElement(Alert, { isInline: true, variant: "custom", title: t('File recommendations are ready to view'), "data-tracking-id": "inline-view-critical-solution-alert", children: React.createElement("p", null,
243
- React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), className: "file-recommendations-file-upload-alert" })),
243
+ React.createElement(Trans, null, "Troubleshooting specific for your uploaded files.")), className: "pf-v5-u-mb-md" })),
244
244
  React.createElement(InsightResultModal, { EARule: validEARules, onModalToggle: insightsModalToggle, isOpen: isRuleModalVisible, insightResults: allResults })));
245
245
  }
246
246
  InsightsResults.defaultProps = defaultProps;
@@ -27,7 +27,7 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
27
27
  if (!isEmpty(selectedLocalFiles)) {
28
28
  const { analysisMetadata, name } = selectedLocalFiles.find((file) => file.attachmentId === doc.attachmentId);
29
29
  const { kcsIdRuleMap = {}, rules = {} } = analysisMetadata === null || analysisMetadata === void 0 ? void 0 : analysisMetadata.analysisResults;
30
- if (!kcsIdRuleMap[doc.id]) {
30
+ if (!doc.id || !kcsIdRuleMap[doc.id]) {
31
31
  return;
32
32
  }
33
33
  const { report, ruleId, isNew } = kcsIdRuleMap[doc.id];
@@ -4,7 +4,7 @@ import { Trans } from 'react-i18next';
4
4
  export const RecommendationInfoBox = () => {
5
5
  const [isExpanded, setIsExpanded] = useState(true);
6
6
  return (React.createElement(React.Fragment, null,
7
- React.createElement(Accordion, { isBordered: true, asDefinitionList: false, className: "card card-white pf-v5-u-mt-md" },
7
+ React.createElement(Accordion, { isBordered: true, asDefinitionList: false, className: "pf-v5-u-mb-md" },
8
8
  React.createElement(AccordionItem, null,
9
9
  React.createElement(AccordionToggle, { id: "recommendation-tips", isExpanded: isExpanded, onClick: () => setIsExpanded(!isExpanded) },
10
10
  React.createElement(Trans, null, "Tips for problem description field")),
@@ -1 +1 @@
1
- {"version":3,"file":"SessionItem.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAMnF,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,WAAW,EAAE,YAAY,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAwHxC"}
1
+ {"version":3,"file":"SessionItem.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAMnF,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,WAAW,EAAE,YAAY,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBA0HxC"}
@@ -80,8 +80,8 @@ export function SessionItem(props) {
80
80
  askIfResolved && (React.createElement(React.Fragment, null,
81
81
  React.createElement("label", null,
82
82
  React.createElement(Trans, null, "Did you find a solution?")),
83
- React.createElement("button", { className: "btn btn-link btn-app", onClick: onResolve, disabled: isResolving, "data-tracking-id": "session-resolved-yes" }, isResolving ? React.createElement(LoadingIndicator, { isInline: true }) : React.createElement(OutlinedThumbsUpIcon, null)),
84
- React.createElement("button", { className: "btn btn-link btn-app", onClick: onUnResolve, "data-tracking-id": "session-resolved-no" },
83
+ React.createElement("button", { className: "btn btn-link btn-app", onClick: onResolve, disabled: isResolving, "data-tracking-id": "session-resolved-yes", "aria-label": "Thumbs up" }, isResolving ? React.createElement(LoadingIndicator, { isInline: true }) : React.createElement(OutlinedThumbsUpIcon, null)),
84
+ React.createElement("button", { className: "btn btn-link btn-app", onClick: onUnResolve, "data-tracking-id": "session-resolved-no", "aria-label": "Thumbs down" },
85
85
  React.createElement(OutlinedThumbsDownIcon, null)))),
86
86
  askToRestore && (React.createElement(React.Fragment, null,
87
87
  React.createElement("label", null,
@@ -13,7 +13,7 @@ export function SessionRestoreCard(props) {
13
13
  };
14
14
  if (dismissed || isEmpty(props.previousSessions))
15
15
  return React.createElement(React.Fragment, null);
16
- return (React.createElement(Alert, { variant: "custom", isInline: true, title: t('Restore a previous session'), actionClose: React.createElement(AlertActionCloseButton, { onClose: onCardDismiss }), component: "h3", className: "restore-session-alert" },
16
+ return (React.createElement(Alert, { variant: "custom", isInline: true, title: t('Restore a previous session'), actionClose: React.createElement(AlertActionCloseButton, { onClose: onCardDismiss }), component: "p", className: "restore-session-alert" },
17
17
  React.createElement("div", { className: "pf-v5-c-alert__description" },
18
18
  React.createElement("ul", { className: "restore-session-list" }, map(props.previousSessions, (sessionItem) => (React.createElement("li", { key: sessionItem.session.id },
19
19
  React.createElement(SessionItem, { onRestore: props.onRestore, sessionItem: sessionItem }))))))));
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAoB3E,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,qBAgZxD"}
1
+ {"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAoB3E,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,qBAifxD"}
@@ -11,7 +11,8 @@ import { publicApi } from '@cee-eng/hydrajs';
11
11
  import { Button, Modal, TextArea } from '@patternfly/react-core';
12
12
  import { Dropdown, ToastNotification, useFetch } from '@rh-support/components';
13
13
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
14
- import { autoEnableFtsOnCaseViewEditPage, severitySort, showFtsOnCreateCasePage, toOption, toOptions, } from '@rh-support/utils';
14
+ import { autoEnableFtsOnCaseViewEditPage, isFtsEditableOnEditPage, isSev1, severitySort, showFtsOnCreateCasePage, toOption, toOptions, } from '@rh-support/utils';
15
+ import { isUndefined } from 'lodash';
15
16
  import find from 'lodash/find';
16
17
  import includes from 'lodash/includes';
17
18
  import isEmpty from 'lodash/isEmpty';
@@ -35,7 +36,7 @@ export default function UpdateSeverityModal(props) {
35
36
  const [caseOverviewState, caseOverviewDispatch] = useReducer(caseOverviewReducer, initialCaseViewState);
36
37
  const caseDispatch = useCaseDispatch();
37
38
  const canEditCase = useCanEditCase();
38
- const [updatedSeverity, setUpdatedSeverity] = useState({});
39
+ const [updatedCaseDetails, setUpdatedCaseDetails] = useState({});
39
40
  const [isSeverityInValid, setIsSeverityInValid] = useState(false);
40
41
  const [seviritiesOptions, setSeveritiesOptions] = useState([]);
41
42
  const [doNotShowIRT, setDoNotShowIRT] = useState(false);
@@ -54,13 +55,19 @@ export default function UpdateSeverityModal(props) {
54
55
  product: state.caseDetails.product,
55
56
  version: state.caseDetails.version,
56
57
  entitlementSla: state.caseDetails.entitlementSla,
58
+ fts: state.caseDetails.fts,
59
+ contactInfo24x7: state.caseDetails.contactInfo24x7,
57
60
  },
58
61
  isCaseUpdating: state.isCaseUpdating,
59
62
  versionsDetails: state.versionsDetails,
60
63
  ownersEntitlements: state.ownersEntitlements,
61
64
  }), isEqual);
62
65
  const { caseDetails, isCaseUpdating, ownersEntitlements, versionsDetails } = caseState;
66
+ const { entitlementSla, fts, contactInfo24x7 } = caseDetails;
63
67
  const [currentSeverity, setCurrentSeverity] = useState(caseDetails.caseSeverity);
68
+ const [localFtsContact, setLocalFtsContact] = useState(contactInfo24x7 || '');
69
+ const [localFts, setLocalFts] = useState(isUndefined(fts) ? true : fts);
70
+ const isFtsEditable = isFtsEditableOnEditPage(entitlementSla, currentSeverity);
64
71
  const getAdditionalInfo = (sla, severity) => {
65
72
  if (doNotShowIRT)
66
73
  return React.createElement(React.Fragment, null);
@@ -89,6 +96,8 @@ export default function UpdateSeverityModal(props) {
89
96
  };
90
97
  return sevItem;
91
98
  });
99
+ const onlyFtsInfoChanged = isEqual(caseDetails.caseSeverity, currentSeverity) &&
100
+ (!isEqual(caseDetails.fts, localFts) || !isEqual(caseDetails.contactInfo24x7, localFtsContact));
92
101
  // To set the current selected severity
93
102
  let selectedSeverity = {
94
103
  name: currentSeverity,
@@ -139,21 +148,40 @@ export default function UpdateSeverityModal(props) {
139
148
  const handleTextAreaChange = (value) => {
140
149
  setDescriptionValue(value);
141
150
  };
151
+ const updateCaseFtsInfo = () => __awaiter(this, void 0, void 0, function* () {
152
+ try {
153
+ yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
154
+ fts: localFts,
155
+ contactInfo24x7: localFtsContact,
156
+ });
157
+ ToastNotification.addSuccessMessage(t(`Case has been successfully updated`));
158
+ }
159
+ catch (err) {
160
+ caseUpdateError.showError(err, t(`Failed to update the case`));
161
+ }
162
+ finally {
163
+ onClose();
164
+ }
165
+ });
142
166
  const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
167
+ if (onlyFtsInfoChanged) {
168
+ updateCaseFtsInfo();
169
+ return;
170
+ }
143
171
  // Severity update successful comment body
144
172
  const severityUpdateComment = t('#### Severity update \n Severity changed from {{oldSeverity}} to {{newSeverity}}\n\n #### Description \n{{description}}', {
145
173
  oldSeverity: caseDetails.caseSeverity,
146
- newSeverity: updatedSeverity['severity'],
174
+ newSeverity: updatedCaseDetails['severity'],
147
175
  description: descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim(),
148
176
  });
149
177
  // Severity update failed comment body
150
178
  const severityUpdateFailedComment = t('#### Severity update \n Failed to change severity from {{oldSeverity}} to {{newSeverity}}. Please try again\n', {
151
179
  oldSeverity: caseDetails.caseSeverity,
152
- newSeveritay: updatedSeverity['severity'],
180
+ newSeveritay: updatedCaseDetails['severity'],
153
181
  });
154
182
  try {
155
183
  setSeverityUpdating(caseOverviewDispatch, true);
156
- yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, updatedSeverity);
184
+ yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, updatedCaseDetails);
157
185
  try {
158
186
  yield postCommentRequest({
159
187
  caseNumber: caseDetails.caseNumber,
@@ -162,7 +190,7 @@ export default function UpdateSeverityModal(props) {
162
190
  });
163
191
  try {
164
192
  checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), caseDetails.caseStatus);
165
- setCurrentSeverity(updatedSeverity['severity']);
193
+ setCurrentSeverity(updatedCaseDetails['severity']);
166
194
  onSuccessfulSubmit();
167
195
  ToastNotification.addSuccessMessage(t('Severity has been successfully updated'));
168
196
  }
@@ -174,10 +202,7 @@ export default function UpdateSeverityModal(props) {
174
202
  });
175
203
  onClose();
176
204
  caseUpdateError.showError(e, t(`Failed to update case status. Please try again`));
177
- yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
178
- status: 'Waiting on Customer',
179
- severity: currentSeverity,
180
- });
205
+ yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, Object.assign({ status: 'Waiting on Customer' }, updateCaseDetails));
181
206
  setCaseDetails(caseDispatch, { status: 'Waiting on Customer' });
182
207
  }
183
208
  }
@@ -213,30 +238,50 @@ export default function UpdateSeverityModal(props) {
213
238
  else
214
239
  return true;
215
240
  };
216
- // To compare previous and current severity values
217
- const checkSeverityValid = () => {
218
- if (isEqual(caseDetails.caseSeverity, updatedSeverity['severity'])) {
241
+ // Check if user has updated case information - severity or fts
242
+ const checkIsUpdateValid = () => {
243
+ if (isEmpty(updatedCaseDetails)) {
219
244
  return false;
220
245
  }
221
- else if (isEmpty(updatedSeverity)) {
246
+ else if (isEqual(caseDetails.caseSeverity, currentSeverity) &&
247
+ isEqual(caseDetails.fts, localFts) &&
248
+ isEqual(caseDetails.contactInfo24x7, localFtsContact)) {
222
249
  return false;
223
250
  }
224
251
  else {
225
252
  return true;
226
253
  }
227
254
  };
255
+ const onFtsChange = (e) => {
256
+ if (canEditCase.alert())
257
+ return;
258
+ setLocalFts(e.target.checked);
259
+ setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { fts: e.target.checked })));
260
+ };
261
+ const onFtsContactChange = (e) => {
262
+ if (canEditCase.alert())
263
+ return;
264
+ setLocalFtsContact(e.target.value);
265
+ setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { contactInfo24x7: e.target.value.trim() })));
266
+ };
228
267
  // To disable submit button wrt above conditions
229
- const isSubmitButtonDisabled = checkSeverityValid() && isTextAreaValid() ? false : true;
268
+ const isSubmitButtonDisabled = checkIsUpdateValid() && (onlyFtsInfoChanged || isTextAreaValid()) ? false : true;
230
269
  // Update severity modal buttons
231
270
  const modalActions = [
232
- React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, isLoading: isCaseUpdating || isPostingComment, "data-tracking-id": "update-severity-submit", isDisabled: isSubmitButtonDisabled || isCaseUpdating || isPostingComment }, t('Submit')),
271
+ React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, isLoading: isCaseUpdating || isPostingComment, "data-tracking-id": "update-severity-submit", isDisabled: isSubmitButtonDisabled || isCaseUpdating || isPostingComment }, t('Update')),
233
272
  React.createElement(Button, { key: "back", variant: "link", onClick: onCancel, "data-tracking-id": "update-severity-cancel", isDisabled: isCaseUpdating || isPostingComment }, t('Cancel')),
234
273
  ];
235
274
  // To handle the severity change
236
275
  const onSeverityChange = (option) => {
237
276
  if (canEditCase.alert())
238
277
  return;
239
- setUpdatedSeverity({ severity: option.value.name });
278
+ if (isSev1(option.value.name) && isFtsEditableOnEditPage(entitlementSla, option.value.name)) {
279
+ setLocalFts(true);
280
+ setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { severity: option.value.name, fts: true })));
281
+ }
282
+ else {
283
+ setUpdatedCaseDetails({ severity: option.value.name });
284
+ }
240
285
  setCurrentSeverity(option.value.name);
241
286
  updateState(option.value.name);
242
287
  setIsSeverityInValidLocal(option);
@@ -282,6 +327,10 @@ export default function UpdateSeverityModal(props) {
282
327
  seviritiesOptions,
283
328
  caseDetails.caseSeverity,
284
329
  ]);
330
+ useEffect(() => {
331
+ setLocalFts(fts);
332
+ setLocalFtsContact(contactInfo24x7);
333
+ }, [fts, contactInfo24x7]);
285
334
  // Returns the modal body with its contents
286
335
  const modalBody = () => {
287
336
  return (React.createElement(React.Fragment, null,
@@ -307,10 +356,21 @@ export default function UpdateSeverityModal(props) {
307
356
  React.createElement("label", { htmlFor: "date-input", className: "pf-v5-u-mt-md" },
308
357
  React.createElement(Trans, null, "Describe update"),
309
358
  React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
310
- React.createElement(TextArea, { placeholder: "Please identify any changes in the case's business impact", isDisabled: (caseOverviewState.caseSeverityUpdating && isCaseUpdating) || isPostingComment, value: descriptionValue, onChange: (_event, value) => handleTextAreaChange(value), resizeOrientation: "vertical", "aria-label": "summary", isRequired: true }),
359
+ React.createElement(TextArea, { placeholder: t('How has the business impact changed? If you have increased severity, please explain why.'), isDisabled: (caseOverviewState.caseSeverityUpdating && isCaseUpdating) || isPostingComment, value: descriptionValue, onChange: (_event, value) => handleTextAreaChange(value), resizeOrientation: "vertical", "aria-label": "summary", isRequired: true }),
311
360
  React.createElement("div", { className: "pf-v5-u-mt-xs" },
312
- React.createElement(Trans, null, "Your comment will be visible under discussions")))))));
361
+ React.createElement(Trans, null, "To view your comment, go to the Discussion tab."))),
362
+ isFtsEditable && (React.createElement("div", { className: "pf-v5-u-mt-md pf-v5-u-mb-sm" },
363
+ React.createElement("div", null,
364
+ React.createElement("input", { type: "checkbox", id: "update-severity-fts", "data-tracking-id": "update-severity-fts", name: "update-severity-fts", checked: localFts, onChange: onFtsChange }),
365
+ React.createElement("label", { htmlFor: "update-severity-fts" },
366
+ React.createElement(Trans, null, "24x7 Support"))),
367
+ localFts && (React.createElement("div", null,
368
+ React.createElement("label", { htmlFor: "update-severity-24-7-contact", className: "pf-v5-u-mt-xs" },
369
+ React.createElement(Trans, null, "Contact for 24x7 support")),
370
+ React.createElement(TextArea, { isDisabled: !localFts, value: localFtsContact, onChange: onFtsContactChange, resizeOrientation: "vertical", "aria-label": "update-severity-24-7-contact", id: "update-severity-24-7-contact", rows: 1 }),
371
+ React.createElement("p", { className: "pf-v5-u-mt-xs" },
372
+ React.createElement(Trans, null, "Please provide contact information where we can reach you at any time"))))))))));
313
373
  };
314
374
  // Main modal and its headings
315
- return (React.createElement(Modal, { title: t('Update severity'), description: t('Describing your update helps us better assist you.'), isOpen: show, onClose: onCancel, actions: modalActions, style: { overflow: 'visible' } }, modalBody()));
375
+ return (React.createElement(Modal, { title: t('Update severity'), description: t('Describing your update helps us better assist you.'), isOpen: show, onClose: onCancel, actions: modalActions, style: { overflow: 'visible' }, tabIndex: 0 }, modalBody()));
316
376
  }
@@ -1 +1 @@
1
- {"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAGH,eAAe,EAKlB,MAAM,iCAAiC,CAAC;AASzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,2BAA2B,EAAE,OAAO,CAAC;CACxC;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,qBA6CjC;kBA7CQ,WAAW;;;AA+CpB,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"WizardAside.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardAside.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAGH,eAAe,EAKlB,MAAM,iCAAiC,CAAC;AASzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,2BAA2B,EAAE,OAAO,CAAC;CACxC;AAGD,iBAAS,WAAW,CAAC,KAAK,EAAE,MAAM,qBAkDjC;kBAlDQ,WAAW;;;AAoDpB,eAAe,WAAW,CAAC"}
@@ -33,13 +33,13 @@ function WizardAside(props) {
33
33
  const canShowRecommendationTips = showRecommendationTipsSections.includes(activeSection);
34
34
  return (React.createElement("aside", null,
35
35
  React.createElement("section", { className: "grid-aside-content" },
36
- canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v5-u-mt-md" }),
37
- canshowEARuleWidget && React.createElement(EARuleWidget, null),
38
36
  React.createElement(InsightsResults, null),
39
37
  " ",
40
- !(isIdea && activeSection === 'submit-case') && React.createElement(AsideResults, { routeProps: props.routeProps }),
38
+ canShowFileUploadWidget() && React.createElement(FileDiag, { className: "pf-v5-u-mb-md" }),
39
+ canshowEARuleWidget && React.createElement(EARuleWidget, null),
40
+ !(isIdea && activeSection === 'submit-case') && (React.createElement(AsideResults, { routeProps: props.routeProps, className: "pf-v5-u-mb-md pf-v5-u-mt-0" })),
41
41
  canShowFileRecommendationSectionsWidget && React.createElement(InsightsResults, { isDisplayOnMain: true }),
42
- React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget }),
42
+ React.createElement(ClusterRecommendations, { showClusterRecommendationsList: canShowClusterIdReportWidget, className: "pf-v5-u-mb-md pf-v5-u-mt-0" }),
43
43
  canUseSessionManagement && !isCreatingCase && activeSection !== AppRouteSections.SUBMIT_CASE && (React.createElement(SessionRestore, { routeProps: props.routeProps })),
44
44
  canShowRecommendationTips && React.createElement(RecommendationInfoBox, null))));
45
45
  }
@@ -951,3 +951,20 @@ svg.pf-v5-u-ml-xs.icon-size {
951
951
  justify-content: space-between;
952
952
  padding: 0.2rem;
953
953
  }
954
+
955
+ #rh-support #rh-support-main .card.card-support .card-heading.case-detail-panel-card-heading {
956
+ background-color: var(--pf-v5-global--palette--black-600);
957
+ border: 1px solid var(--pf-v5-global--palette--black-600);
958
+ }
959
+
960
+ .form-group {
961
+ span.form-instructions-bold {
962
+ font-weight: 600;
963
+ }
964
+ a.pf-v5-c-button.pf-m-link.btn-choose-to-share {
965
+ --pf-v5-c-button--PaddingTop: var(--pf-v5-global--spacer--xs);
966
+ --pf-v5-c-button--PaddingRight: var(--pf-v5-global--spacer--xs);
967
+ --pf-v5-c-button--PaddingBottom: var(--pf-v5-global--spacer--xs);
968
+ --pf-v5-c-button--PaddingLeft: var(--pf-v5-global--spacer--xs);
969
+ }
970
+ }
@@ -587,7 +587,6 @@ span.pf-v5-c-input-group__text {
587
587
  .pf-v5-c-alert__icon {
588
588
  margin-top: 5px;
589
589
  }
590
- margin-bottom: 20px;
591
590
  }
592
591
 
593
592
  .critical-solutions-file-upload-alert {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.92",
3
+ "version": "2.2.94",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -27,7 +27,7 @@
27
27
  ],
28
28
  "peerDependencies": {
29
29
  "@cee-eng/hydrajs": "4.17.7",
30
- "@cee-eng/ui-toolkit": "1.1.6",
30
+ "@cee-eng/ui-toolkit": "1.1.8",
31
31
  "@patternfly/patternfly": "5.1.0",
32
32
  "@patternfly/react-core": "5.1.1",
33
33
  "dompurify": "^2.2.6",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@cee-eng/hydrajs": "4.17.7",
56
- "@cee-eng/ui-toolkit": "1.1.6",
56
+ "@cee-eng/ui-toolkit": "1.1.8",
57
57
  "@patternfly/patternfly": "5.1.0",
58
58
  "@patternfly/react-core": "5.1.1",
59
59
  "@patternfly/react-table": "^5.1.1",
@@ -61,11 +61,11 @@
61
61
  "@progress/kendo-licensing": "1.3.5",
62
62
  "@progress/kendo-react-pdf": "^5.16.0",
63
63
  "@redux-devtools/extension": "^3.3.0",
64
- "@rh-support/components": "2.1.48",
65
- "@rh-support/react-context": "2.1.54",
64
+ "@rh-support/components": "2.1.49",
65
+ "@rh-support/react-context": "2.1.55",
66
66
  "@rh-support/types": "2.0.3",
67
- "@rh-support/user-permissions": "2.1.35",
68
- "@rh-support/utils": "2.1.25",
67
+ "@rh-support/user-permissions": "2.1.36",
68
+ "@rh-support/utils": "2.1.26",
69
69
  "@types/react-redux": "^7.1.33",
70
70
  "@types/redux": "^3.6.0",
71
71
  "dompurify": "^2.2.6",
@@ -132,5 +132,5 @@
132
132
  "defaults and supports es6-module",
133
133
  "maintained node versions"
134
134
  ],
135
- "gitHead": "e26b6df63ea1cab3872f1679464f4caf5e5a1056"
135
+ "gitHead": "2b9a94184155a1387fa8b5f6c1a97259e7f00378"
136
136
  }