@rh-support/troubleshoot 2.6.13 → 2.7.0
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/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts +0 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +19 -47
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +14 -50
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -32
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +8 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +9 -25
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +1 -3
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +9 -25
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +1 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts +2 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +1 -18
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +1 -1
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +4 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +3 -53
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +0 -2
- package/package.json +6 -6
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EA6HnC,CAAC"}
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Button, ButtonVariant, List, ListItem, Popover } from '@patternfly/react-core';
|
|
2
2
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
|
-
import
|
|
4
|
-
import { useCanEditCase, useGlobalStateContext } from '@rh-support/react-context';
|
|
3
|
+
import { useCanEditCase } from '@rh-support/react-context';
|
|
5
4
|
import { Can, resourceActions, resources } from '@rh-support/user-permissions';
|
|
6
5
|
import React, { forwardRef, useState } from 'react';
|
|
7
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -10,9 +9,6 @@ import { RequestEscalationModal } from './RequestEscalationModal';
|
|
|
10
9
|
export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
11
10
|
const { t } = useTranslation();
|
|
12
11
|
const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
|
|
13
|
-
const { globalMetadataState: { loggedInUserRights }, } = useGlobalStateContext();
|
|
14
|
-
const isExternal = loggedInUserRights.data.isExternal();
|
|
15
|
-
const isInternal = loggedInUserRights.data.isInternal();
|
|
16
12
|
const canEditCase = useCanEditCase();
|
|
17
13
|
const isCreateRMEVisible = (caseEscalations.data || []).length === 0 || caseEscalations.data.every((item) => item.status === 'Closed');
|
|
18
14
|
const commonElements = (React.createElement(React.Fragment, null,
|
|
@@ -24,27 +20,15 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
24
20
|
React.createElement("a", { href: "/support/escalation", target: "_blank", "aria-label": t('Learn more about Red Hat support case escalation') },
|
|
25
21
|
React.createElement(InfoCircleIcon, null))),
|
|
26
22
|
React.createElement("div", { className: "card-body" },
|
|
27
|
-
|
|
28
|
-
React.createElement("
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
React.createElement(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
React.createElement("a", { href: "https://access.redhat.com/support/escalation", target: "_blank", rel: "noreferrer" }, "Escalation guidelines"),
|
|
37
|
-
"for details.")))),
|
|
38
|
-
isExternal && props.canViewACESection && (React.createElement(React.Fragment, null,
|
|
39
|
-
React.createElement("p", null,
|
|
40
|
-
React.createElement("strong", null, t('Red Hat associates can open an ACE escalation when')),
|
|
41
|
-
":"),
|
|
42
|
-
React.createElement(List, { className: "pf-v5-u-pl-lg" },
|
|
43
|
-
React.createElement(ListItem, null, t('The customer wants an update')),
|
|
44
|
-
React.createElement(ListItem, null, t('The customer thinks the case is not moving appropriately')),
|
|
45
|
-
React.createElement(ListItem, null, t('The customer wants a new resource')),
|
|
46
|
-
React.createElement(ListItem, null, t('The issue is more severe than originally thought'))),
|
|
47
|
-
React.createElement("a", { href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, target: "_blank", rel: "noopener noreferrer", className: "pf-v5-c-button pf-m-tertiary", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))))));
|
|
23
|
+
React.createElement("p", null,
|
|
24
|
+
React.createElement("strong", null, t('Red Hat associates can open an ACE escalation when')),
|
|
25
|
+
":"),
|
|
26
|
+
React.createElement(List, { className: "pf-v5-u-pl-lg" },
|
|
27
|
+
React.createElement(ListItem, null, t('The customer wants an update')),
|
|
28
|
+
React.createElement(ListItem, null, t('The customer thinks the case is not moving appropriately')),
|
|
29
|
+
React.createElement(ListItem, null, t('The customer wants a new resource')),
|
|
30
|
+
React.createElement(ListItem, null, t('The issue is more severe than originally thought'))),
|
|
31
|
+
React.createElement("a", { href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, target: "_blank", rel: "noopener noreferrer", className: "pf-v5-c-button pf-m-tertiary", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))));
|
|
48
32
|
const [openRequestEscalationModal, setOpenRequestEscalationModal] = useState(false);
|
|
49
33
|
const toggleModal = () => {
|
|
50
34
|
if (canEditCase.alert())
|
|
@@ -59,27 +43,15 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
59
43
|
React.createElement(Trans, null, "Learn more about escalation cases."))) },
|
|
60
44
|
React.createElement(InfoCircleIcon, { title: t('Learn more about escalation cases popover') })))),
|
|
61
45
|
React.createElement("div", { className: "card-body" },
|
|
62
|
-
|
|
63
|
-
React.createElement("
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
React.createElement(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
React.createElement("a", { href: "https://access.redhat.com/support/escalation", target: "_blank", rel: "noreferrer" }, "Escalation guidelines"),
|
|
72
|
-
"for details.")))),
|
|
73
|
-
isExternal && (React.createElement(React.Fragment, null,
|
|
74
|
-
React.createElement("p", null,
|
|
75
|
-
React.createElement("strong", null, t('Request a management escalation if your issue')),
|
|
76
|
-
":"),
|
|
77
|
-
React.createElement(List, { className: "pf-v5-u-pl-lg" },
|
|
78
|
-
React.createElement(ListItem, null, t(`Isn't being resolved appropriately.`)),
|
|
79
|
-
React.createElement(ListItem, null, t('Needs a senior resource.')),
|
|
80
|
-
React.createElement(ListItem, null, t('Is more severe or should be a higher priority.'))),
|
|
81
|
-
commonElements,
|
|
82
|
-
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))))));
|
|
46
|
+
React.createElement("p", null,
|
|
47
|
+
React.createElement("strong", null, t('Request a management escalation if your issue')),
|
|
48
|
+
":"),
|
|
49
|
+
React.createElement(List, { className: "pf-v5-u-pl-lg" },
|
|
50
|
+
React.createElement(ListItem, null, t(`Isn't being resolved appropriately.`)),
|
|
51
|
+
React.createElement(ListItem, null, t('Needs a senior resource.')),
|
|
52
|
+
React.createElement(ListItem, null, t('Is more severe or should be a higher priority.'))),
|
|
53
|
+
commonElements,
|
|
54
|
+
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))));
|
|
83
55
|
return (React.createElement(React.Fragment, null,
|
|
84
56
|
React.createElement(RequestEscalationModal, { caseNumber: props.caseNumber, severity: props.caseSeverity, caseStatus: props.caseStatus, show: openRequestEscalationModal, onClose: toggleModal }),
|
|
85
57
|
React.createElement(Can, { do: resourceActions.CREATE, on: resources.ICE_ESCALATION, passThrough: true }, (canCreateICE) => canCreateICE ? isInternalElements : isCreateRMEVisible ? isNotInternalElements : React.createElement(React.Fragment, null))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAkB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,qBA6LzC"}
|
|
@@ -1,12 +1,3 @@
|
|
|
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
1
|
import { CoverSpinner, ErrorBoundary, OverviewContentLoader, ToastNotification, useDocumentTitle, usePrevious, } from '@rh-support/components';
|
|
11
2
|
import { GlobalMetadataStateContext, HostnameAwarenessModal } from '@rh-support/react-context';
|
|
12
3
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
@@ -18,7 +9,6 @@ import { useTranslation } from 'react-i18next';
|
|
|
18
9
|
import { Route, Switch, useLocation, useParams, useRouteMatch } from 'react-router-dom';
|
|
19
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
20
11
|
import { useCaseDetailsPageDispatchContext } from '../../context/CaseDetailsPageContext';
|
|
21
|
-
import { CaseReducerConstants } from '../../reducers/CaseConstNTypes';
|
|
22
12
|
import { fetchAttachments, fetchCaseEscalations, fetchExternalTrackers, fetchFeedbacks, } from '../../reducers/CaseDetailsPageReducer';
|
|
23
13
|
import { fetchCaseDetails, setCaseAccountNumber } from '../../reducers/CaseReducer';
|
|
24
14
|
import { CaseDetailsAside } from './CaseDetailsAside';
|
|
@@ -39,7 +29,6 @@ export default function Case(props) {
|
|
|
39
29
|
const queryParams = getUrlParsedParams(useLocation().search);
|
|
40
30
|
const ability = useContext(AbilityContext);
|
|
41
31
|
const caseDetailsTabsRef = useRef(null);
|
|
42
|
-
const currentCaseRef = useRef();
|
|
43
32
|
const canSeeFeedbackButtons = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_FEEDBACK_BUTTONS);
|
|
44
33
|
const canReadCase = ability.can(resourceActions.READ, resources.CASE_DETAILS);
|
|
45
34
|
const canSeeExternalTracker = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_EXTERNAL_TRACKER);
|
|
@@ -91,45 +80,20 @@ export default function Case(props) {
|
|
|
91
80
|
props.routeProps.history.replace('/case/list');
|
|
92
81
|
return;
|
|
93
82
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
};
|
|
109
|
-
yield fetchCaseDetails(safeDispatch, targetCaseNumber, loggedInUserRights.data, loggedInUser.data);
|
|
110
|
-
if (currentCaseRef.current !== targetCaseNumber)
|
|
111
|
-
return;
|
|
112
|
-
if (canSeeRMEs) {
|
|
113
|
-
fetchCaseEscalations((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber, loggedInUserRights.data.getAccountNumber());
|
|
114
|
-
}
|
|
115
|
-
if (canSeeAttachments) {
|
|
116
|
-
fetchAttachments((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber, loggedInUsersAccount.data.secureSupport);
|
|
117
|
-
}
|
|
118
|
-
if (canSeeExternalTracker) {
|
|
119
|
-
fetchExternalTrackers((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber);
|
|
120
|
-
}
|
|
121
|
-
if (canSeeFeedbackButtons) {
|
|
122
|
-
fetchFeedbacks((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber);
|
|
123
|
-
}
|
|
124
|
-
if (currentCaseRef.current === targetCaseNumber) {
|
|
125
|
-
checkRemoteSessionFlag();
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
catch (error) {
|
|
129
|
-
console.error('Error fetching case details:', error);
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
safeFetchCaseDetails();
|
|
83
|
+
if (caseNumber) {
|
|
84
|
+
fetchCaseDetails(caseDispatch, caseNumber, loggedInUserRights.data, loggedInUser.data);
|
|
85
|
+
canSeeRMEs &&
|
|
86
|
+
fetchCaseEscalations(caseDetailsPageDispatch, caseNumber, loggedInUserRights.data.getAccountNumber());
|
|
87
|
+
// fetch data in advance
|
|
88
|
+
canSeeAttachments &&
|
|
89
|
+
fetchAttachments(caseDetailsPageDispatch, caseNumber, loggedInUsersAccount.data.secureSupport);
|
|
90
|
+
canSeeExternalTracker && fetchExternalTrackers(caseDetailsPageDispatch, caseNumber);
|
|
91
|
+
checkRemoteSessionFlag();
|
|
92
|
+
}
|
|
93
|
+
if (canSeeFeedbackButtons && caseNumber) {
|
|
94
|
+
// fetch data in advance
|
|
95
|
+
fetchFeedbacks(caseDetailsPageDispatch, caseNumber);
|
|
96
|
+
}
|
|
133
97
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
134
98
|
}, [
|
|
135
99
|
caseNumber,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"
|
|
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,qBAqX7C"}
|
|
@@ -7,7 +7,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
10
|
import { Button, Checkbox, Icon, Popover, PopoverPosition, Switch, Tooltip } from '@patternfly/react-core';
|
|
12
11
|
import AngleDoubleLeftIcon from '@patternfly/react-icons/dist/js/icons/angle-double-left-icon';
|
|
13
12
|
import AngleDoubleRightIcon from '@patternfly/react-icons/dist/js/icons/angle-double-right-icon';
|
|
@@ -15,13 +14,13 @@ import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-ic
|
|
|
15
14
|
import ListIcon from '@patternfly/react-icons/dist/js/icons/list-icon';
|
|
16
15
|
import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
|
|
17
16
|
import TrendUpIcon from '@patternfly/react-icons/dist/js/icons/trend-up-icon';
|
|
18
|
-
import { ErrorBoundary, ToastNotification, useBreakpoint,
|
|
17
|
+
import { ErrorBoundary, ToastNotification, useBreakpoint, useForceUpdate } from '@rh-support/components';
|
|
19
18
|
import { GlobalMetadataDispatchContext, toggleViewAsCustomerFlag, useGlobalStateContext, useUserPreferences, } from '@rh-support/react-context';
|
|
20
19
|
import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
21
20
|
import { isSpecialSupportOfferingEnabled, scrollIntoView } from '@rh-support/utils';
|
|
22
21
|
import isEmpty from 'lodash/isEmpty';
|
|
23
22
|
import isEqual from 'lodash/isEqual';
|
|
24
|
-
import React, { useContext, useEffect,
|
|
23
|
+
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
25
24
|
import { Trans, useTranslation } from 'react-i18next';
|
|
26
25
|
import { Link } from 'react-router-dom';
|
|
27
26
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
@@ -34,7 +33,7 @@ import { ESSRemoteSession, RemoteSessionAgreement } from './RequestRemoteSession
|
|
|
34
33
|
export function CaseDetailsAside(props) {
|
|
35
34
|
var _a, _b;
|
|
36
35
|
const { t } = useTranslation();
|
|
37
|
-
const { severity, status, isFetchingCaseDetails, isFetchingCaseDetailsError, acceptedRemoteSessionTerms, product, waitingOnCallback,
|
|
36
|
+
const { severity, status, isFetchingCaseDetails, isFetchingCaseDetailsError, acceptedRemoteSessionTerms, product, waitingOnCallback, } = useCaseSelector((state) => ({
|
|
38
37
|
severity: state.caseDetails.severity,
|
|
39
38
|
status: state.caseDetails.status,
|
|
40
39
|
isFetchingCaseDetails: state.isFetchingCaseDetails,
|
|
@@ -42,7 +41,6 @@ export function CaseDetailsAside(props) {
|
|
|
42
41
|
acceptedRemoteSessionTerms: state.caseDetails.remoteSessionTermsAcked,
|
|
43
42
|
waitingOnCallback: state.caseDetails.waitingOnCallback,
|
|
44
43
|
product: state.caseDetails.product,
|
|
45
|
-
groupNumber: state.caseDetails.groupNumber,
|
|
46
44
|
}), isEqual);
|
|
47
45
|
const selectedProduct = product;
|
|
48
46
|
const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
|
|
@@ -63,8 +61,10 @@ export function CaseDetailsAside(props) {
|
|
|
63
61
|
const isXLScreen = breakPoint.xl;
|
|
64
62
|
const toggleCustomerViewRef = useRef(null);
|
|
65
63
|
const isFirstMountRef = useRef(true);
|
|
66
|
-
const { globalMetadataState: { navBarRef, viewAsCustomer, loggedInUsersAccount, allProducts }, } = useGlobalStateContext();
|
|
64
|
+
const { globalMetadataState: { navBarRef, viewAsCustomer, loggedInUsersAccount, loggedInUserRights, allProducts }, } = useGlobalStateContext();
|
|
67
65
|
const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
|
|
66
|
+
// To enable RSA Section for external users
|
|
67
|
+
const isExternal = loggedInUserRights.data.isExternal();
|
|
68
68
|
// To check if user has read only access
|
|
69
69
|
const canReadCase = ability.can(resourceActions.READ, resources.CASE_DETAILS);
|
|
70
70
|
const onToggleAside = (ev) => {
|
|
@@ -78,28 +78,7 @@ export function CaseDetailsAside(props) {
|
|
|
78
78
|
const { getOriginalCaseView, updateOriginalCaseView } = useUserPreferences();
|
|
79
79
|
const [viewAsInternalPref, setViewAsInternalPref] = useState();
|
|
80
80
|
const [isDefaultBoxChecked, setIsDefaultBoxChecked] = useState(true);
|
|
81
|
-
const [groups, setGroups] = useState([]);
|
|
82
81
|
const { isExportingPDF } = useContext(PDFContext);
|
|
83
|
-
//getCaseGroupsForInternalUser returns casegroups with write permission for both internal and external users
|
|
84
|
-
const getCasegroupsWithWritePermissionFetch = useFetch(publicApi.caseGroups.getCaseGroupsForInternalUser, {
|
|
85
|
-
propgateErrors: true,
|
|
86
|
-
});
|
|
87
|
-
const fetchGroupsWithWritePermission = () => __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
try {
|
|
89
|
-
const userAccountNumber = loggedInUsersAccount.data.accountNumber;
|
|
90
|
-
const fetchedGroups = yield getCasegroupsWithWritePermissionFetch.request(userAccountNumber);
|
|
91
|
-
setGroups(fetchedGroups);
|
|
92
|
-
}
|
|
93
|
-
catch (error) {
|
|
94
|
-
console.error('Failed to fetch case groups with write permission:', error);
|
|
95
|
-
ToastNotification.addDangerMessage(t('Failed to fetch case groups'));
|
|
96
|
-
setGroups([]);
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
// Memoized permission check that updates when groupNumber or groups change
|
|
100
|
-
const isWritePermissionforCase = useMemo(() => {
|
|
101
|
-
return groups.some((group) => group.groupNum === groupNumber) || groupNumber === '-1';
|
|
102
|
-
}, [groupNumber, groups]);
|
|
103
82
|
useEffect(() => {
|
|
104
83
|
const userPreferredCaseView = () => __awaiter(this, void 0, void 0, function* () {
|
|
105
84
|
try {
|
|
@@ -123,7 +102,6 @@ export function CaseDetailsAside(props) {
|
|
|
123
102
|
}
|
|
124
103
|
});
|
|
125
104
|
userPreferredCaseView();
|
|
126
|
-
fetchGroupsWithWritePermission();
|
|
127
105
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
128
106
|
}, []);
|
|
129
107
|
const setSectionToScollRef = (sectionRef) => {
|
|
@@ -232,12 +210,12 @@ export function CaseDetailsAside(props) {
|
|
|
232
210
|
React.createElement(Checkbox, { label: t('Set to default'), isChecked: isDefaultBoxChecked, onChange: onDefaultCheckboxChange, id: "set-default-view-checkbox", name: "default-view-checkbox", isDisabled: isDefaultBoxChecked, className: 'defaultViewCheckbox' })))),
|
|
233
211
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading top solutions') } },
|
|
234
212
|
React.createElement(CaseSolutions, { caseNumber: caseNumber, ref: topSolutionsRef, isSecureSupportAccount: isSecureSupportAccount })),
|
|
235
|
-
isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: {
|
|
213
|
+
isExternal && isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: {
|
|
236
214
|
message: t('There was an error loading requesting remote session section'),
|
|
237
215
|
} },
|
|
238
216
|
React.createElement(ESSRemoteSession, { waitingOnCallback: waitingOnCallback, remoteSessionTermsAcked: acceptedRemoteSessionTerms, caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, readOnly: canReadCase }))),
|
|
239
|
-
!isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement section') } },
|
|
217
|
+
isExternal && !isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement section') } },
|
|
240
218
|
React.createElement(RemoteSessionAgreement, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, waitingOnCallback: waitingOnCallback, acceptedRemoteSessionTerms: acceptedRemoteSessionTerms && waitingOnCallback, readOnly: canReadCase }))),
|
|
241
|
-
!caseEscalations.isFetching &&
|
|
242
|
-
React.createElement(ActiveCustomerEscalation, {
|
|
219
|
+
!caseEscalations.isFetching && canViewACESection && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading customer escalation section') } },
|
|
220
|
+
React.createElement(ActiveCustomerEscalation, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef })))))));
|
|
243
221
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAqBA,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,qBAgT5C"}
|
|
@@ -5,6 +5,7 @@ import { ErrorBoundary, LoadingIndicator } from '@rh-support/components';
|
|
|
5
5
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
6
6
|
import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
7
7
|
import { getConfigField, PCM_CONFIG_FIELD_TYPE } from '@rh-support/utils';
|
|
8
|
+
import { includes } from 'lodash';
|
|
8
9
|
import isEqual from 'lodash/isEqual';
|
|
9
10
|
import React, { Suspense, useContext, useRef, useState } from 'react';
|
|
10
11
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -42,6 +43,12 @@ export function CaseDetailsTabs(props) {
|
|
|
42
43
|
// );
|
|
43
44
|
const caseSummaryViewConfig = getConfigField(pcmConfig.data, 'is_case_summary_view_active', PCM_CONFIG_FIELD_TYPE.STRING);
|
|
44
45
|
const isCaseSummaryViewActive = caseSummaryViewConfig === '1';
|
|
46
|
+
/**
|
|
47
|
+
* Checks a list of account numbers for which the case summarization feature should be hidden.
|
|
48
|
+
*/
|
|
49
|
+
const caseSummarizationBlockedAccountsConfig = getConfigField(pcmConfig.data, 'caseSummarizationBlockedAccounts', PCM_CONFIG_FIELD_TYPE.STRING);
|
|
50
|
+
const blockedAccounts = JSON.parse(caseSummarizationBlockedAccountsConfig || []);
|
|
51
|
+
const isAccountBlocked = includes(blockedAccounts, accountNumber);
|
|
45
52
|
const { isExportingPDF, pdfOption } = useContext(PDFContext);
|
|
46
53
|
const canSeeRMEs = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_RMES);
|
|
47
54
|
const [selectedTab, setSelectedTab] = useState(CaseDetailsTabsEnum.DISCUSSION);
|
|
@@ -126,6 +133,7 @@ export function CaseDetailsTabs(props) {
|
|
|
126
133
|
!loggedInUsersAccount.data.secureSupport &&
|
|
127
134
|
!loggedInUsersAccount.data.hasConfirmedStatesideSupport &&
|
|
128
135
|
isCaseSummaryViewActive &&
|
|
136
|
+
!isAccountBlocked &&
|
|
129
137
|
tabsToRender.push({
|
|
130
138
|
'data-tracking-id': 'generate-ai-case-summary-tab',
|
|
131
139
|
title: CaseDetailsTabsEnum.GENERATE_AI_CASE_SUMMARY,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB,+EA+F3B,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Button, List, ListItem, Popover, Tooltip } from '@patternfly/react-core';
|
|
2
2
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
|
-
import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
|
|
4
3
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
5
4
|
import { TncConstants } from '@rh-support/utils';
|
|
6
5
|
import React, { forwardRef, useContext, useRef, useState } from 'react';
|
|
7
|
-
import {
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
8
7
|
import { NewEssTermsModal } from './NewEssTermsModal';
|
|
9
8
|
export const ESSRemoteSession = forwardRef((props, ref) => {
|
|
10
9
|
const tooltipRef = useRef();
|
|
@@ -12,8 +11,6 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
|
|
|
12
11
|
const canEditCase = useCanEditCase();
|
|
13
12
|
const { caseNumber, caseStatus, readOnly, waitingOnCallback } = props;
|
|
14
13
|
const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
15
|
-
const isExternal = loggedInUserRights.data.isExternal();
|
|
16
|
-
const isInternal = loggedInUserRights.data.isInternal();
|
|
17
14
|
const [openNewESSRemoteSessionModal, setOpenNewESSRemoteSessionModal] = useState(false);
|
|
18
15
|
// To toggle New ESS RS Modal
|
|
19
16
|
const toggleNewESSRemoteSessionModal = () => {
|
|
@@ -28,27 +25,14 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
|
|
|
28
25
|
React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('A remote session allows support engineers to view or access your computer to simplify collaboration and troubleshooting.'), footerContent: React.createElement("a", { href: "/articles/3566571", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Read more about remote sessions') }, t('Read more about remote sessions')) },
|
|
29
26
|
React.createElement(InfoCircleIcon, null))),
|
|
30
27
|
React.createElement("div", { className: "card-body" },
|
|
31
|
-
|
|
32
|
-
React.createElement("
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
' ',
|
|
40
|
-
React.createElement("a", { href: "https://access.redhat.com/articles/3566571", target: "_blank", rel: "noreferrer" }, "Remote session guide"),
|
|
41
|
-
' ',
|
|
42
|
-
"for details.")))),
|
|
43
|
-
isExternal && (React.createElement(React.Fragment, null,
|
|
44
|
-
React.createElement("p", null,
|
|
45
|
-
React.createElement("strong", null, `${t('Red Hat may agree to remotely access your systems if:')}`)),
|
|
46
|
-
React.createElement(List, { className: "pf-v5-u-pl-xl" },
|
|
47
|
-
React.createElement(ListItem, null, t('Such access will help diagnose and have greater understanding into the issue.')),
|
|
48
|
-
React.createElement(ListItem, null, t('Agreed upon by both Red Hat and you, the end user'))),
|
|
49
|
-
React.createElement("p", { className: "rrs-light-grey-text" }, t('Red Hat will add a comment to your case to schedule your remote session.')),
|
|
50
|
-
waitingOnCallback && (React.createElement(Tooltip, { content: t('Remote session has already been requested.'), triggerRef: tooltipRef, "aria-live": 'polite' })),
|
|
51
|
-
React.createElement(Button, { "aria-label": waitingOnCallback ? t('Remote session requested') : t('Request remote session'), variant: waitingOnCallback ? 'primary' : 'secondary', onClick: toggleNewESSRemoteSessionModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: waitingOnCallback, ref: tooltipRef }, waitingOnCallback ? t('Remote session requested') : t('Request remote session')))))));
|
|
28
|
+
React.createElement("p", null,
|
|
29
|
+
React.createElement("strong", null, `${t('Red Hat may agree to remotely access your systems if:')}`)),
|
|
30
|
+
React.createElement(List, { className: "pf-v5-u-pl-xl" },
|
|
31
|
+
React.createElement(ListItem, null, t('Such access will help diagnose and have greater understanding into the issue.')),
|
|
32
|
+
React.createElement(ListItem, null, t('Agreed upon by both Red Hat and you, the end user'))),
|
|
33
|
+
React.createElement("p", { className: "rrs-light-grey-text" }, t('Red Hat will add a comment to your case to schedule your remote session.')),
|
|
34
|
+
waitingOnCallback && (React.createElement(Tooltip, { content: t('Remote session has already been requested.'), triggerRef: tooltipRef, "aria-live": 'polite' })),
|
|
35
|
+
React.createElement(Button, { "aria-label": waitingOnCallback ? t('Remote session requested') : t('Request remote session'), variant: waitingOnCallback ? 'primary' : 'secondary', onClick: toggleNewESSRemoteSessionModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: waitingOnCallback, ref: tooltipRef }, waitingOnCallback ? t('Remote session requested') : t('Request remote session')))));
|
|
52
36
|
return (React.createElement(React.Fragment, null,
|
|
53
37
|
ESSRemoteSessionSectionBody,
|
|
54
38
|
React.createElement(NewEssTermsModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openNewESSRemoteSessionModal, onClose: toggleNewESSRemoteSessionModal, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA4W7C"}
|
|
@@ -95,8 +95,6 @@ export function NewEssTermsModal(props) {
|
|
|
95
95
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
96
96
|
// To handle modal cancel and close
|
|
97
97
|
const onCancel = () => {
|
|
98
|
-
if (agreeLoading || isPostingComment)
|
|
99
|
-
return;
|
|
100
98
|
setIsTermsChecked(false);
|
|
101
99
|
setSessionExpectations('');
|
|
102
100
|
setImpact('');
|
|
@@ -106,7 +104,7 @@ export function NewEssTermsModal(props) {
|
|
|
106
104
|
};
|
|
107
105
|
// Function to ack remote session terms and post comment
|
|
108
106
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
109
|
-
const requestComment = t(
|
|
107
|
+
const requestComment = t(`Submitted a remote session request with following details:\n\n**Preferred Time and Expectations for Remote Session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n[${sessionLink}](${sessionLink})\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
|
|
110
108
|
try {
|
|
111
109
|
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
112
110
|
remoteSessionTermsAcked: true,
|
package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,+EA6FjC,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { Button, List, ListItem, Popover, Tooltip } from '@patternfly/react-core';
|
|
2
2
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
|
-
import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
|
|
4
3
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
5
4
|
import { TncConstants } from '@rh-support/utils';
|
|
6
5
|
import React, { forwardRef, useContext, useRef, useState } from 'react';
|
|
7
|
-
import {
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
8
7
|
import { RemoteSessionAgreementModal } from './RemoteSessionAgreementModal';
|
|
9
8
|
export const RemoteSessionAgreement = forwardRef((props, ref) => {
|
|
10
9
|
const tooltipRef = useRef();
|
|
@@ -12,8 +11,6 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
|
|
|
12
11
|
const canEditCase = useCanEditCase();
|
|
13
12
|
const { caseNumber, caseStatus, acceptedRemoteSessionTerms, readOnly, waitingOnCallback } = props;
|
|
14
13
|
const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
15
|
-
const isExternal = loggedInUserRights.data.isExternal();
|
|
16
|
-
const isInternal = loggedInUserRights.data.isInternal();
|
|
17
14
|
const [openRequestRemoteSessionModal, setOpenRequestRemoteSessionModal] = useState(false);
|
|
18
15
|
// To toggle RSA Modal
|
|
19
16
|
const toggleRemoteSessionAgreementModal = () => {
|
|
@@ -28,27 +25,14 @@ export const RemoteSessionAgreement = forwardRef((props, ref) => {
|
|
|
28
25
|
React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access'), footerContent: React.createElement("a", { href: "/articles/3566571", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Read more about remote sessions') }, t('Read more about remote sessions')) },
|
|
29
26
|
React.createElement(InfoCircleIcon, null))),
|
|
30
27
|
React.createElement("div", { className: "card-body" },
|
|
31
|
-
|
|
32
|
-
React.createElement("
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
' ',
|
|
40
|
-
React.createElement("a", { href: "https://access.redhat.com/articles/3566571", target: "_blank", rel: "noreferrer" }, "Remote session guide"),
|
|
41
|
-
' ',
|
|
42
|
-
"for details.")))),
|
|
43
|
-
isExternal && (React.createElement(React.Fragment, null,
|
|
44
|
-
React.createElement("p", null,
|
|
45
|
-
React.createElement("strong", null, `${t('Red Hat may agree to remotely access your systems if:')}`)),
|
|
46
|
-
React.createElement(List, { className: "pf-v5-u-pl-lg" },
|
|
47
|
-
React.createElement(ListItem, null, t('Such access will help diagnose and have greater understanding into the issue')),
|
|
48
|
-
React.createElement(ListItem, null, t('Agreed upon by both Red Hat and you, the end user'))),
|
|
49
|
-
React.createElement("p", { className: "rrs-light-grey-text" }, t('Red Hat will add a comment to your case to schedule your remote session.')),
|
|
50
|
-
acceptedRemoteSessionTerms && (React.createElement(Tooltip, { content: t('Remote session has already been requested.'), triggerRef: tooltipRef, "aria-live": 'polite' })),
|
|
51
|
-
React.createElement(Button, { "aria-label": waitingOnCallback ? t('Remote session requested') : t('Request remote session'), variant: waitingOnCallback ? 'primary' : 'secondary', onClick: toggleRemoteSessionAgreementModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: waitingOnCallback, ref: tooltipRef }, waitingOnCallback ? t('Remote session requested') : t('Request remote session')))))));
|
|
28
|
+
React.createElement("p", null,
|
|
29
|
+
React.createElement("strong", null, `${t('Red Hat may agree to remotely access your systems if:')}`)),
|
|
30
|
+
React.createElement(List, { className: "pf-v5-u-pl-lg" },
|
|
31
|
+
React.createElement(ListItem, null, t('Such access will help diagnose and have greater understanding into the issue')),
|
|
32
|
+
React.createElement(ListItem, null, t('Agreed upon by both Red Hat and you, the end user'))),
|
|
33
|
+
React.createElement("p", { className: "rrs-light-grey-text" }, t('Red Hat will add a comment to your case to schedule your remote session.')),
|
|
34
|
+
acceptedRemoteSessionTerms && (React.createElement(Tooltip, { content: t('Remote session has already been requested.'), triggerRef: tooltipRef, "aria-live": 'polite' })),
|
|
35
|
+
React.createElement(Button, { "aria-label": waitingOnCallback ? t('Remote session requested') : t('Request remote session'), variant: waitingOnCallback ? 'primary' : 'secondary', onClick: toggleRemoteSessionAgreementModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: waitingOnCallback, ref: tooltipRef }, waitingOnCallback ? t('Remote session requested') : t('Request remote session')))));
|
|
52
36
|
return (React.createElement(React.Fragment, null,
|
|
53
37
|
RemoteSessionAgreementSectionBody,
|
|
54
38
|
React.createElement(RemoteSessionAgreementModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openRequestRemoteSessionModal, onClose: toggleRemoteSessionAgreementModal, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
|
package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAsWxD"}
|
|
@@ -95,8 +95,6 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
95
95
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
96
96
|
// To handle modal cancel and close
|
|
97
97
|
const onCancel = () => {
|
|
98
|
-
if (agreeLoading || isPostingComment)
|
|
99
|
-
return;
|
|
100
98
|
setIsTermsChecked(false);
|
|
101
99
|
setSessionExpectations('');
|
|
102
100
|
setImpact('');
|
|
@@ -107,7 +105,7 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
107
105
|
const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
|
|
108
106
|
// Function to ack remote session terms and post comment
|
|
109
107
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
110
|
-
const requestComment = t(
|
|
108
|
+
const requestComment = t(`Submitted a remote session request with following details:\n\n**Preferred Time and Expectations for Remote Session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n[${sessionLink}](${sessionLink})\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
|
|
111
109
|
try {
|
|
112
110
|
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
113
111
|
remoteSessionTermsAcked: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isEmailValid } from '@rh-support/utils';
|
|
1
|
+
import { isEmailValid, isEmailValidForCaseContactSelector } from '@rh-support/utils';
|
|
2
2
|
interface IProps {
|
|
3
3
|
caseNumber: string;
|
|
4
4
|
accountNumber: string;
|
|
@@ -9,6 +9,7 @@ export declare function useCustomEmails(props: IProps): {
|
|
|
9
9
|
canAddCustomEmail: boolean;
|
|
10
10
|
hideCustomEmails: boolean;
|
|
11
11
|
isEmailValid: typeof isEmailValid;
|
|
12
|
+
isEmailValidForCaseContactSelector: typeof isEmailValidForCaseContactSelector;
|
|
12
13
|
isUpdatingCustomEmails: boolean;
|
|
13
14
|
showAddEmailToAccountModal: (emailString: string) => Promise<boolean>;
|
|
14
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCustomEmails.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAwB,YAAY,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"useCustomEmails.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAwB,YAAY,EAAE,kCAAkC,EAAE,MAAM,mBAAmB,CAAC;AAY3G,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM;+BAyED,MAAM;+BAnCN,MAAM,UAAU,MAAM,IAAI;;;;;;8CAbX,MAAM;EAkGhE"}
|
|
@@ -11,7 +11,7 @@ import { kase } from '@cee-eng/hydrajs';
|
|
|
11
11
|
import { PromisifyModal, ToastNotification, useFetch } from '@rh-support/components';
|
|
12
12
|
import { fetchAccountCustomEmails, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
13
13
|
import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
-
import { haventLoadedMetadata, isEmailValid } from '@rh-support/utils';
|
|
14
|
+
import { haventLoadedMetadata, isEmailValid, isEmailValidForCaseContactSelector } from '@rh-support/utils';
|
|
15
15
|
import findIndex from 'lodash/findIndex';
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import isEqual from 'lodash/isEqual';
|
|
@@ -44,7 +44,7 @@ export function useCustomEmails(props) {
|
|
|
44
44
|
});
|
|
45
45
|
const addCustomEmail = (emailVal_1, onAdd_1, ...args_1) => __awaiter(this, [emailVal_1, onAdd_1, ...args_1], void 0, function* (emailVal, onAdd, skipAccountCheck = false) {
|
|
46
46
|
try {
|
|
47
|
-
if (isEmpty(emailVal) || !
|
|
47
|
+
if (isEmpty(emailVal) || !isEmailValidForCaseContactSelector(emailVal)) {
|
|
48
48
|
return;
|
|
49
49
|
}
|
|
50
50
|
// lower case the email vals to avoid sfdc error
|
|
@@ -112,6 +112,7 @@ export function useCustomEmails(props) {
|
|
|
112
112
|
canAddCustomEmail,
|
|
113
113
|
hideCustomEmails,
|
|
114
114
|
isEmailValid,
|
|
115
|
+
isEmailValidForCaseContactSelector,
|
|
115
116
|
isUpdatingCustomEmails: deleteEmail.isFetching || addNewEmail.isFetching,
|
|
116
117
|
showAddEmailToAccountModal,
|
|
117
118
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA+BvE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"CaseComments.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AA+BvE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAQvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACzD,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAClF,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9C,kBAAkB,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAChH;AAED,QAAA,MAAM,YAAY,4EAkVhB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -137,27 +137,10 @@ const CaseComments = React.forwardRef((props, ref) => {
|
|
|
137
137
|
const commentText = (text) => {
|
|
138
138
|
return { __html: DOMPurify.sanitize(text) };
|
|
139
139
|
};
|
|
140
|
-
// Transforms <strong> and <em> tags in HTML string to styled <span> tags to fix incorrect bold/italic rendering in exported PDF
|
|
141
|
-
function formatMarkdownHtmlForPDF(htmlString) {
|
|
142
|
-
return (htmlString
|
|
143
|
-
// Handle nested <strong><em>...</em></strong> or <em><strong>...</strong></em> and apply both bold and italic (skew) styles
|
|
144
|
-
.replace(/<(strong|em)>\s*<(em|strong)>(.*?)<\/\2>\s*<\/\1>/gi, '<span style="font-weight: bold; font-size: 0.95em; font-style: italic;">$3</span>')
|
|
145
|
-
// Handle standalone <strong>
|
|
146
|
-
.replace(/<strong>(.*?)<\/strong>/gi, '<span style="font-weight: bold; font-size: 0.95em; margin-right: -10px;">$1</span>')
|
|
147
|
-
// Handle standalone <em>
|
|
148
|
-
.replace(/<em>(.*?)<\/em>/gi, '<span style="font-style: italic;font-size: 0.95em; opacity: 0.70;margin-right: 7px;">$1</span>')
|
|
149
|
-
// Replace list items with dash bullets
|
|
150
|
-
.replace(/<li>(.*?)<\/li>/gi, '<div style="margin-left: 1.2em;">- $1</div>')
|
|
151
|
-
// Remove <ul> and </ul> tags completely
|
|
152
|
-
.replace(/<\/?ul>/gi, ''));
|
|
153
|
-
}
|
|
154
140
|
const commentMarkdown = (markdown) => {
|
|
155
|
-
|
|
141
|
+
const htmlString = parseCommentMarkdown(markdown, { showButtonForAttachmentLink: true, disableImagePreview: isExportingPDF },
|
|
156
142
|
// @ts-ignore
|
|
157
143
|
{ openLinksInNewTab: true, gfm: true, breaks: true });
|
|
158
|
-
if (isExportingPDF) {
|
|
159
|
-
htmlString = formatMarkdownHtmlForPDF(htmlString);
|
|
160
|
-
}
|
|
161
144
|
return { __html: DOMPurify.sanitize(htmlString) };
|
|
162
145
|
};
|
|
163
146
|
const onCommentAreaClick = (e) => {
|
|
@@ -114,7 +114,7 @@ function RHAssociatesSelector(props) {
|
|
|
114
114
|
return React.createElement(React.Fragment, null);
|
|
115
115
|
return (React.createElement(React.Fragment, null, canNotifyRHAssociates && (React.createElement("div", { className: "form-group" },
|
|
116
116
|
React.createElement("label", { className: "react-typeahead-label-wrapper", htmlFor: "get-support-notifications" },
|
|
117
|
-
React.createElement(Trans, null, "
|
|
117
|
+
React.createElement(Trans, null, "Red Hat associates"),
|
|
118
118
|
React.createElement(ContactSelectorInternal, { className: "push-bottom-narrow", selectedContacts: filter(selectedNotificationContacts, (c) => c.isInternal), showSelectedContacts: true, contactsToExclude: !isEmpty(selectedOwner.data) ? [{ ssoUsername: selectedOwner.data.ssoUsername }] : [], id: "open-case-rh-notifications", name: "open-case-rh-notifications", multiple: true, contactListParams: {
|
|
119
119
|
internal: false, // to get non-ldap contacts only
|
|
120
120
|
isInternalContact: true,
|
|
@@ -198,7 +198,7 @@ function CaseContactSelector(props) {
|
|
|
198
198
|
...customEmailsList.data,
|
|
199
199
|
...filter(selectedNotificationContacts, (c) => !c.isInternal),
|
|
200
200
|
];
|
|
201
|
-
if (
|
|
201
|
+
if (xor(alreadySelected, selectedContacts).length === 0)
|
|
202
202
|
return;
|
|
203
203
|
if (canEditCase.alert())
|
|
204
204
|
return;
|
|
@@ -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 }
|
|
139
|
+
const _c = getSolrParams(200, 256, { id: kcsIds }), { 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":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBA2M/C"}
|
|
@@ -114,5 +114,8 @@ export function InsightResultModal(props) {
|
|
|
114
114
|
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')),
|
|
115
115
|
React.createElement(Button, { onClick: props.onModalToggle, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-critical-solutions-modal" }, t('Cancel')),
|
|
116
116
|
] },
|
|
117
|
-
React.createElement(Accordion, { className: "push-top-narrow rules-modal-items", headingLevel: "h2", asDefinitionList: false, isBordered: true },
|
|
117
|
+
React.createElement(Accordion, { className: "push-top-narrow rules-modal-items", headingLevel: "h2", asDefinitionList: false, isBordered: true },
|
|
118
|
+
props.insightResults.map((doc, index) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc, rank: index + 1 }))),
|
|
119
|
+
props.EARule.length > 0 &&
|
|
120
|
+
props.EARule.map((rule, index) => (React.createElement(EARuleInfoAccordion, { showNewTag: canShowNewTag, key: `${index}_eaRule`, rule: rule, rank: index + props.insightResults.length + 1 })))))));
|
|
118
121
|
}
|
|
@@ -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":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAuB1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAKnE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAgR9D"}
|
|
@@ -1,18 +1,8 @@
|
|
|
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';
|
|
11
1
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
12
2
|
import find from 'lodash/find';
|
|
13
3
|
import isEmpty from 'lodash/isEmpty';
|
|
14
4
|
import isEqual from 'lodash/isEqual';
|
|
15
|
-
import React, { useContext
|
|
5
|
+
import React, { useContext } from 'react';
|
|
16
6
|
import { Trans } from 'react-i18next';
|
|
17
7
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
18
8
|
import { RecommendationStateContext } from '../../context/RecommendationContext';
|
|
@@ -24,7 +14,7 @@ import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
|
24
14
|
import { AttachmentStateContext } from './fileUpload/reducer/AttachmentReducerContext';
|
|
25
15
|
export function useIsSectionValid(sectionName) {
|
|
26
16
|
var _a, _b;
|
|
27
|
-
const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, ABTestVariation,
|
|
17
|
+
const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, hostname, contactInfo24x7, alternateId, selectedAccountDetails, issue, environment, timeFramesAndUrgency, periodicityOfIssue, ABTestVariation, } = useCaseSelector((state) => ({
|
|
28
18
|
caseState: state,
|
|
29
19
|
caseType: state.caseDetails.caseType,
|
|
30
20
|
product: state.caseDetails.product,
|
|
@@ -41,26 +31,7 @@ export function useIsSectionValid(sectionName) {
|
|
|
41
31
|
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
42
32
|
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
43
33
|
ABTestVariation: state.ABTestVariation,
|
|
44
|
-
ssoUsername: state.selectedOwner.data.ssoUsername,
|
|
45
|
-
manageSupportCases: state.selectedOwner.data.manageSupportCases,
|
|
46
34
|
}), 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]);
|
|
64
35
|
//&seSessionId=8e8960ac-680b-443e-bf67-9e13f2acd64e
|
|
65
36
|
const isATestvariation = ABTestVariation === 'A';
|
|
66
37
|
const isBTestvariation = ABTestVariation === 'B' || isEmpty(ABTestVariation);
|
|
@@ -86,9 +57,7 @@ export function useIsSectionValid(sectionName) {
|
|
|
86
57
|
let isValid = !isEmpty(caseType) &&
|
|
87
58
|
!isEmpty(accountNumber) &&
|
|
88
59
|
!isEmpty(contactSSOName) &&
|
|
89
|
-
!selectedAccountDetails.data.subscriptionAbuse
|
|
90
|
-
(manageSupportCases !== null && manageSupportCases !== void 0 ? manageSupportCases : true) &&
|
|
91
|
-
(isEntitlement !== null && isEntitlement !== void 0 ? isEntitlement : true);
|
|
60
|
+
!selectedAccountDetails.data.subscriptionAbuse;
|
|
92
61
|
if (isATestvariation) {
|
|
93
62
|
isValid = isValid && !isEmpty(product) && !isEmpty(version);
|
|
94
63
|
}
|
|
@@ -230,31 +199,12 @@ export function useIsSectionValid(sectionName) {
|
|
|
230
199
|
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
231
200
|
" for assistance.")) : ('');
|
|
232
201
|
};
|
|
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
|
-
};
|
|
250
202
|
const activeSectionError = (sectionNameLocal) => {
|
|
251
203
|
if (!sectionNameLocal)
|
|
252
204
|
return '';
|
|
253
205
|
switch (sectionNameLocal) {
|
|
254
206
|
case AppRouteSections.RESOURCES:
|
|
255
207
|
return recommendationSectionError();
|
|
256
|
-
case AppRouteSections.GET_SUPPORT:
|
|
257
|
-
return getSupportSectionError();
|
|
258
208
|
default:
|
|
259
209
|
return '';
|
|
260
210
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,WAAW,iBAAiB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAIxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACrD,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,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,
|
|
1
|
+
{"version":3,"file":"RouteConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/RouteConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,WAAW,iBAAiB;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,qBAAqB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAIxC,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAsB,SAAQ,UAAU;IACrD,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IAGjB,eAAe,EAAE,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,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,oBAM3C,CAAC;AAEF,eAAO,MAAM,0CAA0C,oBAQtD,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,7 +69,6 @@ export const showSideBarEARuleWidgetSections = [
|
|
|
69
69
|
AppRouteSections.RESOURCES,
|
|
70
70
|
AppRouteSections.CONFIGURATION,
|
|
71
71
|
AppRouteSections.GET_SUPPORT,
|
|
72
|
-
AppRouteSections.TROUBLESHOOT,
|
|
73
72
|
];
|
|
74
73
|
export const showSideBarEARuleWidgetSectionsExperienceA = [
|
|
75
74
|
AppRouteSections.SUMMARIZE,
|
|
@@ -79,7 +78,6 @@ export const showSideBarEARuleWidgetSectionsExperienceA = [
|
|
|
79
78
|
AppRouteSections.CONFIGURATION,
|
|
80
79
|
AppRouteSections.GET_SUPPORT,
|
|
81
80
|
AppRouteSections.REVIEW,
|
|
82
|
-
AppRouteSections.TROUBLESHOOT,
|
|
83
81
|
];
|
|
84
82
|
export const showSideBarClusterIdRuleWidgetSections = [AppRouteSections.CONFIGURATION, AppRouteSections.REVIEW];
|
|
85
83
|
export const showSideBarFileRecommendationSections = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
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.20",
|
|
62
|
+
"@rh-support/react-context": "2.5.22",
|
|
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.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": "
|
|
137
|
+
"gitHead": "4ad1d6051ac9eb048cc4893c9b00c263ccbcfc8e"
|
|
138
138
|
}
|