@rh-support/troubleshoot 2.6.9 → 2.6.10
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/Recommendations/InsightsResults.js +1 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +53 -3
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +2 -0
- package/package.json +6 -6
|
@@ -136,7 +136,7 @@ function InsightsResults(props) {
|
|
|
136
136
|
return __awaiter(this, void 0, void 0, function* () {
|
|
137
137
|
var _a, _b;
|
|
138
138
|
try {
|
|
139
|
-
const _c = getSolrParams(200, 256, { id: kcsIds }), { start, rows, q } = _c, expression = __rest(_c, ["start", "rows", "q"]);
|
|
139
|
+
const _c = getSolrParams(200, 256, { id: kcsIds }, false, true), { start, rows, q } = _c, expression = __rest(_c, ["start", "rows", "q"]);
|
|
140
140
|
const res = yield search.solrSearchV2({ start, rows, q }, 'kcs', expression);
|
|
141
141
|
const docs = (_b = (_a = res === null || res === void 0 ? void 0 : res.response) === null || _a === void 0 ? void 0 : _a.docs) !== null && _b !== void 0 ? _b : [];
|
|
142
142
|
const attachmentId = localFile.attachmentId;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EA8T9D"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { contacts } from '@cee-eng/hydrajs';
|
|
1
11
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
2
12
|
import find from 'lodash/find';
|
|
3
13
|
import isEmpty from 'lodash/isEmpty';
|
|
4
14
|
import isEqual from 'lodash/isEqual';
|
|
5
|
-
import React, { useContext } from 'react';
|
|
15
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
6
16
|
import { Trans } from 'react-i18next';
|
|
7
17
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
8
18
|
import { RecommendationStateContext } from '../../context/RecommendationContext';
|
|
@@ -14,7 +24,7 @@ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
|
14
24
|
import { AttachmentStateContext } from './fileUpload/reducer/AttachmentReducerContext';
|
|
15
25
|
export function useIsSectionValid(sectionName) {
|
|
16
26
|
var _a, _b;
|
|
17
|
-
const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, ABTestVariation, } = useCaseSelector((state) => ({
|
|
27
|
+
const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, ABTestVariation, ssoUsername, manageSupportCases, } = useCaseSelector((state) => ({
|
|
18
28
|
caseState: state,
|
|
19
29
|
caseType: state.caseDetails.caseType,
|
|
20
30
|
product: state.caseDetails.product,
|
|
@@ -31,7 +41,26 @@ export function useIsSectionValid(sectionName) {
|
|
|
31
41
|
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
32
42
|
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
33
43
|
ABTestVariation: state.ABTestVariation,
|
|
44
|
+
ssoUsername: state.selectedOwner.data.ssoUsername,
|
|
45
|
+
manageSupportCases: state.selectedOwner.data.manageSupportCases,
|
|
34
46
|
}), isEqual);
|
|
47
|
+
const [isEntitlement, setIsEntitlement] = useState(null);
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
const fetchContactDetails = () => __awaiter(this, void 0, void 0, function* () {
|
|
50
|
+
var _a;
|
|
51
|
+
if (ssoUsername) {
|
|
52
|
+
try {
|
|
53
|
+
const response = yield contacts.getSFDCContactBySso(ssoUsername);
|
|
54
|
+
setIsEntitlement((_a = response === null || response === void 0 ? void 0 : response.isEntitled) !== null && _a !== void 0 ? _a : null);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
console.error('Error fetching contact details:', error);
|
|
58
|
+
setIsEntitlement(null);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
fetchContactDetails();
|
|
63
|
+
}, [ssoUsername]);
|
|
35
64
|
//&seSessionId=8e8960ac-680b-443e-bf67-9e13f2acd64e
|
|
36
65
|
const isATestvariation = ABTestVariation === 'A';
|
|
37
66
|
const isBTestvariation = ABTestVariation === 'B' || isEmpty(ABTestVariation);
|
|
@@ -57,7 +86,9 @@ export function useIsSectionValid(sectionName) {
|
|
|
57
86
|
let isValid = !isEmpty(caseType) &&
|
|
58
87
|
!isEmpty(accountNumber) &&
|
|
59
88
|
!isEmpty(contactSSOName) &&
|
|
60
|
-
!selectedAccountDetails.data.subscriptionAbuse
|
|
89
|
+
!selectedAccountDetails.data.subscriptionAbuse &&
|
|
90
|
+
(manageSupportCases !== null && manageSupportCases !== void 0 ? manageSupportCases : true) &&
|
|
91
|
+
(isEntitlement !== null && isEntitlement !== void 0 ? isEntitlement : true);
|
|
61
92
|
if (isATestvariation) {
|
|
62
93
|
isValid = isValid && !isEmpty(product) && !isEmpty(version);
|
|
63
94
|
}
|
|
@@ -199,12 +230,31 @@ export function useIsSectionValid(sectionName) {
|
|
|
199
230
|
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
200
231
|
" for assistance.")) : ('');
|
|
201
232
|
};
|
|
233
|
+
const getSupportSectionError = () => {
|
|
234
|
+
if (manageSupportCases === false) {
|
|
235
|
+
return (React.createElement(Trans, { i18nKey: "i18ManageCaseContactCustomerService" },
|
|
236
|
+
"You need additional access to manage cases.\u00A0 Please contact",
|
|
237
|
+
' ',
|
|
238
|
+
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
239
|
+
" for assistance."));
|
|
240
|
+
}
|
|
241
|
+
if (isEntitlement === false) {
|
|
242
|
+
return (React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
|
|
243
|
+
"You need a valid entitlement to create a case.\u00A0 Please contact",
|
|
244
|
+
' ',
|
|
245
|
+
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
246
|
+
" for assistance."));
|
|
247
|
+
}
|
|
248
|
+
return '';
|
|
249
|
+
};
|
|
202
250
|
const activeSectionError = (sectionNameLocal) => {
|
|
203
251
|
if (!sectionNameLocal)
|
|
204
252
|
return '';
|
|
205
253
|
switch (sectionNameLocal) {
|
|
206
254
|
case AppRouteSections.RESOURCES:
|
|
207
255
|
return recommendationSectionError();
|
|
256
|
+
case AppRouteSections.GET_SUPPORT:
|
|
257
|
+
return getSupportSectionError();
|
|
208
258
|
default:
|
|
209
259
|
return '';
|
|
210
260
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":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,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,sBAAsB;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;CACjD;AAED,MAAM,WAAW,eAAe;CAAG;AACnC,oBAAY,gBAAgB;IACxB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,SAAS,cAAc;IACvB,sBAAsB,2BAA2B;IACjD,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,KAAK,UAAU;CAClB;AAKD,eAAO,MAAM,4BAA4B,EAAE,gBAAgB,EAI1D,CAAC;AAEF,eAAO,MAAM,gCAAgC,EAAE,gBAAgB,EAK9D,CAAC;AAEF,eAAO,MAAM,iCAAiC,oBAQ7C,CAAC;AAEF,eAAO,MAAM,gCAAgC,oBAQ5C,CAAC;AAEF,eAAO,MAAM,4BAA4B,oBAQxC,CAAC;AAGF,eAAO,MAAM,0BAA0B,oBAAiC,CAAC;AAEzE,eAAO,MAAM,mCAAmC,oBAA+D,CAAC;AAEhH,eAAO,MAAM,kCAAkC,oBAO9C,CAAC;AAEF,eAAO,MAAM,+BAA+B,oBAO3C,CAAC;AAEF,eAAO,MAAM,0CAA0C,oBAStD,CAAC;AAEF,eAAO,MAAM,sCAAsC,oBAA4D,CAAC;AAEhH,eAAO,MAAM,qCAAqC,oBAGjD,CAAC;AAEF,eAAO,MAAM,6BAA6B,oBAAiC,CAAC;AAE5E,eAAO,MAAM,wBAAwB,EAAE,gBAAgB,EAKtD,CAAC"}
|
|
@@ -69,6 +69,7 @@ export const showSideBarEARuleWidgetSections = [
|
|
|
69
69
|
AppRouteSections.RESOURCES,
|
|
70
70
|
AppRouteSections.CONFIGURATION,
|
|
71
71
|
AppRouteSections.GET_SUPPORT,
|
|
72
|
+
AppRouteSections.TROUBLESHOOT,
|
|
72
73
|
];
|
|
73
74
|
export const showSideBarEARuleWidgetSectionsExperienceA = [
|
|
74
75
|
AppRouteSections.SUMMARIZE,
|
|
@@ -78,6 +79,7 @@ export const showSideBarEARuleWidgetSectionsExperienceA = [
|
|
|
78
79
|
AppRouteSections.CONFIGURATION,
|
|
79
80
|
AppRouteSections.GET_SUPPORT,
|
|
80
81
|
AppRouteSections.REVIEW,
|
|
82
|
+
AppRouteSections.TROUBLESHOOT,
|
|
81
83
|
];
|
|
82
84
|
export const showSideBarClusterIdRuleWidgetSections = [AppRouteSections.CONFIGURATION, AppRouteSections.REVIEW];
|
|
83
85
|
export const showSideBarFileRecommendationSections = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.10",
|
|
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.
|
|
62
|
-
"@rh-support/react-context": "2.5.
|
|
61
|
+
"@rh-support/components": "2.5.22",
|
|
62
|
+
"@rh-support/react-context": "2.5.24",
|
|
63
63
|
"@rh-support/types": "2.0.5",
|
|
64
|
-
"@rh-support/user-permissions": "2.5.
|
|
65
|
-
"@rh-support/utils": "2.5.
|
|
64
|
+
"@rh-support/user-permissions": "2.5.15",
|
|
65
|
+
"@rh-support/utils": "2.5.14",
|
|
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": "
|
|
137
|
+
"gitHead": "6fa938f2c6c485266faf01f61490e158b0c03631"
|
|
138
138
|
}
|