@rh-support/troubleshoot 2.6.5 → 2.6.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA0BlE,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,qBAsQ5C"}
1
+ {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA0BlE,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,qBA4Q5C"}
@@ -22,7 +22,7 @@ const RMEEscalationList = React.lazy(() => import(/* webpackChunkName: 'RMEEscal
22
22
  export function CaseDetailsTabs(props) {
23
23
  const { caseNumber } = props;
24
24
  const { activeTab } = useParams();
25
- const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount, viewAsCustomer }, } = useContext(GlobalMetadataStateContext);
25
+ const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount, pcmConfig, viewAsCustomer }, } = useContext(GlobalMetadataStateContext);
26
26
  const { accountNumber, chats, comments, status } = useCaseSelector((state) => ({
27
27
  accountNumber: state.caseDetails.accountNumberRef,
28
28
  chats: state.caseDetails.chats,
@@ -38,7 +38,6 @@ export function CaseDetailsTabs(props) {
38
38
  // resources.CASE_DETAILS,
39
39
  // CaseDetailsFields.CASE_DETAILS_BUGZILLAS
40
40
  // );
41
- const { globalMetadataState: { pcmConfig }, } = useContext(GlobalMetadataStateContext);
42
41
  const caseSummaryViewConfig = getConfigField(pcmConfig.data, 'is_case_summary_view_active', PCM_CONFIG_FIELD_TYPE.STRING);
43
42
  const isCaseSummaryViewActive = caseSummaryViewConfig === '1';
44
43
  const { isExportingPDF, pdfOption } = useContext(PDFContext);
@@ -58,6 +57,7 @@ export function CaseDetailsTabs(props) {
58
57
  setActiveTabKey(tabIndex);
59
58
  setSelectedTab(tabsToRender[tabIndex].title);
60
59
  };
60
+ const isCaseHistoryEnabled = getConfigField(pcmConfig.data, 'isCaseHistoryEnabled', PCM_CONFIG_FIELD_TYPE.FEATURE_FLAG);
61
61
  tabsToRender.push({
62
62
  'data-tracking-id': 'case-details-discussion-tab',
63
63
  key: 'discussions',
@@ -111,7 +111,7 @@ export function CaseDetailsTabs(props) {
111
111
  routePath: 'escalation',
112
112
  component: (React.createElement(RMEEscalationList, { escalations: caseEscalations.data, caseNumber: caseNumber, caseStatus: status, accountNumber: loggedInUserRights.data.getAccountNumber(), isInternal: loggedInUserRights.data.isInternal() })),
113
113
  });
114
- false &&
114
+ isCaseHistoryEnabled &&
115
115
  !loggedInUsersAccount.data.secureSupport &&
116
116
  tabsToRender.push({
117
117
  'data-tracking-id': 'case-history-tab',
@@ -138,7 +138,10 @@ export function CaseDetailsTabs(props) {
138
138
  const tabIndex = tabsToRender.findIndex((item) => item.routePath === activeTab);
139
139
  return tabIndex > -1 ? tabIndex : activeTabKey;
140
140
  };
141
- const isTabVisibleInPdfExport = (tab) => tab.title === CaseDetailsTabsEnum.DISCUSSION && pdfOption === 'Reduced' ? false : true;
141
+ const isTabVisibleInPdfExport = (tab) => (tab.title === CaseDetailsTabsEnum.DISCUSSION && pdfOption === 'Reduced') ||
142
+ tab.title === CaseDetailsTabsEnum.HISTORY
143
+ ? false
144
+ : true;
142
145
  return (React.createElement("div", { className: "case-details-tabs", role: "region", ref: props.tabdRef },
143
146
  React.createElement(Tabs, { className: isExportingPDF ? 'hide-in-pdf' : '', activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick, "aria-label": t('Case details tabs') }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: `pf-tab-${index}-${tab.title.split(' ')[0]}-tabpanel`, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, { className: tab.title === CaseDetailsTabsEnum.GENERATE_AI_CASE_SUMMARY
144
147
  ? 'tab-title-with-badge'
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAwB3B,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,UAAW,MAAM,sBAyKxC,CAAC"}
1
+ {"version":3,"file":"CaseSummary.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseSummary/CaseSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,mBAAmB,CAAC;AAwB3B,OAAO,KAA8B,MAAM,OAAO,CAAC;AAOnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,WAAW,UAAW,MAAM,sBA6KxC,CAAC"}
@@ -83,7 +83,7 @@ export const CaseSummary = (props) => {
83
83
  React.createElement("div", { dangerouslySetInnerHTML: { __html: sanitizedHtml } })));
84
84
  };
85
85
  return (React.createElement("section", { className: "card card-white" },
86
- React.createElement(Alert, { variant: AlertVariant.info, title: "Case summary uses AI. Check for mistakes.", isInline: true, actionLinks: React.createElement(AlertActionLink, { onClick: (e) => triggerAppFeedbackItem(e), href: "#" },
86
+ React.createElement(Alert, { variant: AlertVariant.info, title: "Case summary uses AI. Check for mistakes.", isInline: true, actionLinks: React.createElement(AlertActionLink, { onClick: (e) => triggerAppFeedbackItem(e), href: "#", "data-tracking-id": "send-feedback-button" },
87
87
  React.createElement(Trans, null, "Send Feedback")) },
88
88
  React.createElement("p", null, "By using this feature, your support case information will be used to create an AI-generated summary of your cases. Information may not be up-to-date or without error. Always review AI generated content prior to use. We encourage you to send feedback to improve the case summary feature")),
89
89
  caseSummaryState === CaseSummaryStates.NEW_CASE ? (React.createElement(EmptyState, { variant: EmptyStateVariant.lg },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.6.5",
3
+ "version": "2.6.6",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -58,11 +58,11 @@
58
58
  "@progress/kendo-licensing": "1.3.5",
59
59
  "@progress/kendo-react-pdf": "^5.16.0",
60
60
  "@redux-devtools/extension": "^3.3.0",
61
- "@rh-support/components": "2.5.19",
62
- "@rh-support/react-context": "2.5.21",
61
+ "@rh-support/components": "2.5.20",
62
+ "@rh-support/react-context": "2.5.22",
63
63
  "@rh-support/types": "2.0.5",
64
- "@rh-support/user-permissions": "2.5.12",
65
- "@rh-support/utils": "2.5.11",
64
+ "@rh-support/user-permissions": "2.5.13",
65
+ "@rh-support/utils": "2.5.12",
66
66
  "@types/react-redux": "^7.1.33",
67
67
  "@types/redux": "^3.6.0",
68
68
  "date-fns": "3.6.0",
@@ -134,5 +134,5 @@
134
134
  "defaults and supports es6-module",
135
135
  "maintained node versions"
136
136
  ],
137
- "gitHead": "3ef51f921b5d5b256a9fd9b0525c27c1cf4ee2ae"
137
+ "gitHead": "1b833d4c1dfeea406f617d1b448972d280954a28"
138
138
  }