@rh-support/troubleshoot 2.2.26 → 2.2.27
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/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +15 -6
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts +12 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +48 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts +15 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +108 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts +17 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +182 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/index.d.ts +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/index.js +1 -0
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +15 -2
- package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts +3 -0
- package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts.map +1 -0
- package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.js +167 -0
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +13 -3
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +1 -0
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +5 -2
- package/lib/esm/reducers/CaseReducer.d.ts +1 -0
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +23 -5
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AA8BA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AA8BA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,eAiW7C"}
|
|
@@ -17,7 +17,7 @@ import TrendUpIcon from '@patternfly/react-icons/dist/js/icons/trend-up-icon';
|
|
|
17
17
|
import { ErrorBoundary, ToastNotification, useBreakpoint, useForceUpdate } from '@rh-support/components';
|
|
18
18
|
import { GlobalMetadataDispatchContext, toggleViewAsCustomerFlag, useGlobalStateContext, useUserPreferences, } from '@rh-support/react-context';
|
|
19
19
|
import { ability, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
20
|
-
import { scrollIntoView } from '@rh-support/utils';
|
|
20
|
+
import { isSpecialSupportOfferingEnabled, scrollIntoView } from '@rh-support/utils';
|
|
21
21
|
import isEmpty from 'lodash/isEmpty';
|
|
22
22
|
import isEqual from 'lodash/isEqual';
|
|
23
23
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
@@ -29,17 +29,20 @@ import { useRecommendationStateContext } from '../../context/RecommendationConte
|
|
|
29
29
|
import { ActiveCustomerEscalation } from './ActiveCustomerEscalation';
|
|
30
30
|
import { CaseSolutions } from './CaseSolutions';
|
|
31
31
|
import { PDFContext } from './PDFContainer';
|
|
32
|
-
import { RemoteSessionAgreement } from './RequestRemoteSession';
|
|
32
|
+
import { ESSRemoteSession, RemoteSessionAgreement } from './RequestRemoteSession';
|
|
33
33
|
export function CaseDetailsAside(props) {
|
|
34
|
-
var _a;
|
|
34
|
+
var _a, _b;
|
|
35
35
|
const { t } = useTranslation();
|
|
36
|
-
const { severity, status, isFetchingCaseDetails, isFetchingCaseDetailsError, acceptedRemoteSessionTerms } = useCaseSelector((state) => ({
|
|
36
|
+
const { severity, status, isFetchingCaseDetails, isFetchingCaseDetailsError, acceptedRemoteSessionTerms, screenSessionRequested, product, } = useCaseSelector((state) => ({
|
|
37
37
|
severity: state.caseDetails.severity,
|
|
38
38
|
status: state.caseDetails.status,
|
|
39
39
|
isFetchingCaseDetails: state.isFetchingCaseDetails,
|
|
40
40
|
isFetchingCaseDetailsError: state.isFetchingCaseDetailsError,
|
|
41
41
|
acceptedRemoteSessionTerms: state.caseDetails.remoteSessionTermsAcked,
|
|
42
|
+
screenSessionRequested: state.caseDetails.screenSessionRequested,
|
|
43
|
+
product: state.caseDetails.product,
|
|
42
44
|
}), isEqual);
|
|
45
|
+
const selectedProduct = product;
|
|
43
46
|
const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
|
|
44
47
|
const isCreateRMEVisible = (caseEscalations.data || []).length === 0 || caseEscalations.data.every((item) => item.status === 'Closed');
|
|
45
48
|
const { recommendationState: { isLoadingRecommendations, allDocs }, } = useRecommendationStateContext();
|
|
@@ -58,7 +61,7 @@ export function CaseDetailsAside(props) {
|
|
|
58
61
|
const isXLScreen = breakPoint.xl;
|
|
59
62
|
const toggleCustomerViewRef = useRef(null);
|
|
60
63
|
const isFirstMountRef = useRef(true);
|
|
61
|
-
const { globalMetadataState: { navBarRef, viewAsCustomer, loggedInUsersAccount, loggedInUserRights }, } = useGlobalStateContext();
|
|
64
|
+
const { globalMetadataState: { navBarRef, viewAsCustomer, loggedInUsersAccount, loggedInUserRights, allProducts }, } = useGlobalStateContext();
|
|
62
65
|
const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
|
|
63
66
|
// To enable RSA Section for external users
|
|
64
67
|
const isExternal = loggedInUserRights.data.isExternal();
|
|
@@ -163,6 +166,8 @@ export function CaseDetailsAside(props) {
|
|
|
163
166
|
return t('View internal information available to Red Hat associates only.');
|
|
164
167
|
}
|
|
165
168
|
};
|
|
169
|
+
// To check if the user is ESS Customer and Product has ESS Support
|
|
170
|
+
const isESSCustomer = isSpecialSupportOfferingEnabled((_b = allProducts.data) === null || _b === void 0 ? void 0 : _b.productsResult, selectedProduct);
|
|
166
171
|
return (React.createElement("aside", { className: `grid-aside ${isSideBarExpanded ? '' : 'sidebar-collapsed'} ` },
|
|
167
172
|
React.createElement("pfe-collapse-toggle", { "aria-controls": "case-details-aside-content", onClick: onToggleAside }, isSideBarExpanded ? (React.createElement("div", { className: `sidebar-header ${isExportingPDF ? 'hide-in-pdf' : ''}` },
|
|
168
173
|
React.createElement(Button, { variant: "link", isInline: true, title: t('Collapse sidebar') },
|
|
@@ -201,6 +206,10 @@ export function CaseDetailsAside(props) {
|
|
|
201
206
|
React.createElement(CaseSolutions, { caseNumber: caseNumber, ref: topSolutionsRef, isSecureSupportAccount: isSecureSupportAccount })),
|
|
202
207
|
!caseEscalations.isFetching && canViewACESection && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading customer escalation section') } },
|
|
203
208
|
React.createElement(ActiveCustomerEscalation, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef }))),
|
|
204
|
-
isExternal && (React.createElement(ErrorBoundary, { errorMsgInfo: {
|
|
209
|
+
isExternal && isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: {
|
|
210
|
+
message: t('There was an error loading requesting remote session section'),
|
|
211
|
+
} },
|
|
212
|
+
React.createElement(ESSRemoteSession, { screenSessionRequested: screenSessionRequested, remoteSessionTermsAcked: acceptedRemoteSessionTerms, caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, readOnly: canReadCase }))),
|
|
213
|
+
isExternal && !isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement section') } },
|
|
205
214
|
React.createElement(RemoteSessionAgreement, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, acceptedRemoteSessionTerms: acceptedRemoteSessionTerms, readOnly: canReadCase })))))));
|
|
206
215
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
caseNumber: string;
|
|
4
|
+
caseSeverity: string;
|
|
5
|
+
caseStatus: string;
|
|
6
|
+
readOnly: boolean;
|
|
7
|
+
screenSessionRequested: boolean;
|
|
8
|
+
remoteSessionTermsAcked?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ESSRemoteSession: React.ForwardRefExoticComponent<IProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=ESSRemoteSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAOxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;IAChC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACrC;AAED,eAAO,MAAM,gBAAgB,+EAmH3B,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Button, Popover, Tooltip } from '@patternfly/react-core';
|
|
2
|
+
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
|
+
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
4
|
+
import React, { forwardRef, useContext, useRef, useState } from 'react';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
|
+
import { TnC } from '../../../constants/tncConstants';
|
|
7
|
+
import { ESSRemoteSessionModal } from './ESSRemoteSessionModal';
|
|
8
|
+
import { NewEssTermsModal } from './NewEssTermsModal';
|
|
9
|
+
export const ESSRemoteSession = forwardRef((props, ref) => {
|
|
10
|
+
const tooltipRef = useRef();
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
const canEditCase = useCanEditCase();
|
|
13
|
+
const { caseNumber, caseStatus, screenSessionRequested, readOnly, remoteSessionTermsAcked } = props;
|
|
14
|
+
const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
15
|
+
const [openESSRemoteSessionModal, setOpenESSRemoteSessionModal] = useState(false);
|
|
16
|
+
const [openNewESSRemoteSessionModal, setOpenNewESSRemoteSessionModal] = useState(false);
|
|
17
|
+
// To toggle ESS RS Modal
|
|
18
|
+
const toggleESSRemoteSessionModal = () => {
|
|
19
|
+
if (canEditCase.alert())
|
|
20
|
+
return;
|
|
21
|
+
setOpenESSRemoteSessionModal((openESSRemoteSessionModal) => !openESSRemoteSessionModal);
|
|
22
|
+
};
|
|
23
|
+
// To toggle New ESS RS Modal
|
|
24
|
+
const toggleNewESSRemoteSessionModal = () => {
|
|
25
|
+
if (canEditCase.alert())
|
|
26
|
+
return;
|
|
27
|
+
setOpenNewESSRemoteSessionModal((openNewESSRemoteSessionModal) => !openNewESSRemoteSessionModal);
|
|
28
|
+
};
|
|
29
|
+
const termsAcked = remoteSessionTermsAcked && !screenSessionRequested;
|
|
30
|
+
// ESS RS Aside Section Body
|
|
31
|
+
const ESSRemoteSessionSectionBody = (React.createElement("div", { className: "card card-white card-support escalations", ref: ref },
|
|
32
|
+
React.createElement("h3", { className: "card-heading pf-u-display-flex pf-u-justify-content-space-between" },
|
|
33
|
+
t('Remote session'),
|
|
34
|
+
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')) },
|
|
35
|
+
React.createElement(InfoCircleIcon, null))),
|
|
36
|
+
React.createElement("div", { className: "card-body" },
|
|
37
|
+
React.createElement("p", null,
|
|
38
|
+
React.createElement("strong", null, `${t('Red Hat may agree to remotely access your systems if:')}`)),
|
|
39
|
+
React.createElement("ul", null,
|
|
40
|
+
React.createElement("li", null, t(`Such access will help diagnose, debug or lead to the resolution of a software defect`)),
|
|
41
|
+
React.createElement("li", null, t('Agreed upon by both Red Hat and you, the end user'))),
|
|
42
|
+
React.createElement("p", { className: "rrs-light-grey-text" }, t('Red Hat will add a comment to your case to schedule your remote session.')),
|
|
43
|
+
screenSessionRequested && (React.createElement(Tooltip, { content: t('Remote session agreement has already been accepted.'), reference: tooltipRef, "aria-live": 'polite' })),
|
|
44
|
+
React.createElement(Button, { "aria-label": screenSessionRequested ? t('Remote session requested') : t('Request remote session'), variant: screenSessionRequested ? 'primary' : 'secondary', onClick: termsAcked ? toggleESSRemoteSessionModal : toggleNewESSRemoteSessionModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: screenSessionRequested, ref: tooltipRef, isDisabled: screenSessionRequested }, screenSessionRequested ? t('Remote session requested') : t('Request remote session')))));
|
|
45
|
+
return (React.createElement(React.Fragment, null,
|
|
46
|
+
ESSRemoteSessionSectionBody,
|
|
47
|
+
remoteSessionTermsAcked && !screenSessionRequested ? (React.createElement(ESSRemoteSessionModal, { caseNumber: caseNumber, caseStatus: caseStatus, screenSessionRequested: screenSessionRequested, show: openESSRemoteSessionModal, onClose: toggleESSRemoteSessionModal, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })) : (React.createElement(NewEssTermsModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openNewESSRemoteSessionModal, onClose: toggleNewESSRemoteSessionModal, siteCode: TnC.REMOTE_RIDER_SITE_CODE, eventCode: TnC.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly }))));
|
|
48
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IApiResponseDetails } from '@rh-support/types/shared';
|
|
2
|
+
import { UserAuth } from '@rh-support/user-permissions';
|
|
3
|
+
interface IProps {
|
|
4
|
+
caseNumber: string;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
loggedInUser: string;
|
|
7
|
+
caseStatus: string;
|
|
8
|
+
show: boolean;
|
|
9
|
+
loggedInUserRights: IApiResponseDetails<UserAuth>;
|
|
10
|
+
readOnly: boolean;
|
|
11
|
+
screenSessionRequested: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function ESSRemoteSessionModal(props: IProps): JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=ESSRemoteSessionModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ESSRemoteSessionModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAiBxD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,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;IAClB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,eAoKlD"}
|
|
@@ -0,0 +1,108 @@
|
|
|
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 { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
+
import { Button, ButtonVariant, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
|
|
12
|
+
import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
|
|
13
|
+
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
14
|
+
import React, { useState } from 'react';
|
|
15
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
16
|
+
import { useCaseDispatch } from '../../../context/CaseContext';
|
|
17
|
+
import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
|
|
18
|
+
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
|
|
19
|
+
import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
|
|
20
|
+
import { checkForCaseStatusToggleOnAttachOrComment, setCaseDetails, updateCaseDetails, } from '../../../reducers/CaseReducer';
|
|
21
|
+
export function ESSRemoteSessionModal(props) {
|
|
22
|
+
const { t } = useTranslation();
|
|
23
|
+
const caseDispatch = useCaseDispatch();
|
|
24
|
+
const [agreeLoading, setAgreeLoading] = useState(false);
|
|
25
|
+
const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
26
|
+
propgateErrors: true,
|
|
27
|
+
});
|
|
28
|
+
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
29
|
+
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
30
|
+
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
31
|
+
// To handle modal cancel and close
|
|
32
|
+
const onCancel = () => {
|
|
33
|
+
props.onClose && props.onClose();
|
|
34
|
+
};
|
|
35
|
+
// Function to ack remote session terms and post comment
|
|
36
|
+
const submitESSRemoteSessionRequest = () => __awaiter(this, void 0, void 0, function* () {
|
|
37
|
+
const requestComment = t('Submitted a remote session request.');
|
|
38
|
+
try {
|
|
39
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, { screenSessionRequested: true });
|
|
40
|
+
setCaseDetails(caseDispatch, {
|
|
41
|
+
screenSessionRequested: true,
|
|
42
|
+
});
|
|
43
|
+
try {
|
|
44
|
+
yield postCommentRequest({
|
|
45
|
+
caseNumber: props.caseNumber,
|
|
46
|
+
commentBody: requestComment,
|
|
47
|
+
contentType: 'markdown',
|
|
48
|
+
});
|
|
49
|
+
updateDiscussionStateComments(dispatchDiscussion, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
50
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
51
|
+
onCancel();
|
|
52
|
+
setAgreeLoading(false);
|
|
53
|
+
ToastNotification.addSuccessMessage(t('Remote session has been requested successfully'), t('Red Hat will add a comment to your case to schedule your remote session.'));
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
onCancel();
|
|
57
|
+
setAgreeLoading(false);
|
|
58
|
+
setCaseDetails(caseDispatch, {
|
|
59
|
+
screenSessionRequested: false,
|
|
60
|
+
});
|
|
61
|
+
ToastNotification.addWarningMessage(t('Could not submit a comment'), t('Rest assured, we have noted you have accepted the agreement'));
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
catch (e) {
|
|
65
|
+
onCancel();
|
|
66
|
+
setAgreeLoading(false);
|
|
67
|
+
if (props.readOnly) {
|
|
68
|
+
ToastNotification.addDangerMessage(t('You are not authorized to update this case.'));
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
ToastNotification.addDangerMessage(t('Could not submit a request for remote session'), t('Please try again.'));
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
// To handle submit
|
|
76
|
+
const onSubmit = () => {
|
|
77
|
+
setAgreeLoading(true);
|
|
78
|
+
submitESSRemoteSessionRequest();
|
|
79
|
+
};
|
|
80
|
+
// To check and if Request remote session button is loading
|
|
81
|
+
const isAgreeLoading = agreeLoading || isPostingComment;
|
|
82
|
+
// ESS RS Modal Actions
|
|
83
|
+
const modalActions = [
|
|
84
|
+
React.createElement(Button, { key: "submit", "aria-label": t('Request remote session'), variant: ButtonVariant.primary, onClick: onSubmit, "data-tracking-id": "ess-request-remote-session", isLoading: isAgreeLoading }, t('Request remote session')),
|
|
85
|
+
React.createElement(Button, { key: "cancel", variant: "link", onClick: props.onClose }, t('Cancel')),
|
|
86
|
+
];
|
|
87
|
+
const acceptedModalActions = [
|
|
88
|
+
React.createElement(Button, { key: "cancel", variant: ButtonVariant.primary, onClick: props.onClose },
|
|
89
|
+
React.createElement(Trans, null, "Close")),
|
|
90
|
+
];
|
|
91
|
+
// Body of ESS Modal
|
|
92
|
+
const ESSRemoteSessionModalBody = () => {
|
|
93
|
+
return (React.createElement(React.Fragment, null,
|
|
94
|
+
React.createElement("p", { className: "pf-u-mt-xs" },
|
|
95
|
+
React.createElement(Trans, null, "To troubleshoot your problem, Red Hat support accesses your network or systems remotely."))));
|
|
96
|
+
};
|
|
97
|
+
const RequestedESSRemoteSessionModalBody = () => {
|
|
98
|
+
return (React.createElement(React.Fragment, null,
|
|
99
|
+
React.createElement("p", { className: "pf-u-mt-xs" },
|
|
100
|
+
React.createElement(Trans, null, "Red Hat will add a comment to your case to schedule your remote session."))));
|
|
101
|
+
};
|
|
102
|
+
const essModalHeader = props.screenSessionRequested ? (React.createElement(React.Fragment, null,
|
|
103
|
+
React.createElement(Title, { className: "pf-u-mb-xs", id: "modal-custom-header-label", headingLevel: "h1", size: TitleSizes['2xl'] },
|
|
104
|
+
React.createElement(CheckCircleIcon, { color: "#3E8635", size: "lg", className: "pf-u-mr-md" }),
|
|
105
|
+
t('Remote session has been requested')))) : (React.createElement(React.Fragment, null,
|
|
106
|
+
React.createElement(Title, { className: "pf-u-mb-xs", id: "modal-custom-header-label", headingLevel: "h1", size: TitleSizes['2xl'] }, t('Request a remote session?'))));
|
|
107
|
+
return (React.createElement(Modal, { variant: ModalVariant.small, id: "remote-session-agreement-modal", "aria-label": props.screenSessionRequested ? t('Remote session has been requested') : t('Request a remote session?'), header: essModalHeader, isOpen: props.show, onClose: onCancel, actions: props.screenSessionRequested ? acceptedModalActions : modalActions }, props.screenSessionRequested ? RequestedESSRemoteSessionModalBody() : ESSRemoteSessionModalBody()));
|
|
108
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IApiResponseDetails } from '@rh-support/types/shared';
|
|
2
|
+
import { UserAuth } from '@rh-support/user-permissions';
|
|
3
|
+
interface IProps {
|
|
4
|
+
caseNumber: string;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
termsAcked?: boolean;
|
|
7
|
+
siteCode: string;
|
|
8
|
+
eventCode: string;
|
|
9
|
+
loggedInUser: string;
|
|
10
|
+
caseStatus: string;
|
|
11
|
+
show: boolean;
|
|
12
|
+
loggedInUserRights: IApiResponseDetails<UserAuth>;
|
|
13
|
+
readOnly: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare function NewEssTermsModal(props: IProps): JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=NewEssTermsModal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAaxD,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,eA6P7C"}
|
|
@@ -0,0 +1,182 @@
|
|
|
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 { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
+
import { Button, ButtonVariant, Checkbox, Modal, Select, SelectOption } from '@patternfly/react-core';
|
|
12
|
+
import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
|
|
13
|
+
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
14
|
+
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
15
|
+
import React, { useEffect, useState } from 'react';
|
|
16
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
+
import { useCaseDispatch } from '../../../context/CaseContext';
|
|
18
|
+
import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
|
|
19
|
+
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
|
|
20
|
+
import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
|
|
21
|
+
import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetails } from '../../../reducers/CaseReducer';
|
|
22
|
+
const getLocaleNameFromLocalCode = (localeCode) => {
|
|
23
|
+
if ('Intl' in window && 'DisplayNames' in Intl) {
|
|
24
|
+
try {
|
|
25
|
+
const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
|
|
26
|
+
// https://github.com/microsoft/TypeScript/issues/41338
|
|
27
|
+
const langName = new Intl.DisplayNames([lang], { type: 'language' });
|
|
28
|
+
const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
|
|
29
|
+
return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
return localeCode;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return localeCode;
|
|
36
|
+
};
|
|
37
|
+
export function NewEssTermsModal(props) {
|
|
38
|
+
const { t } = useTranslation();
|
|
39
|
+
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
40
|
+
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
41
|
+
const [isLangSelectorDropdownOpen, setisLangSelectorDropdownOpen] = useState(false);
|
|
42
|
+
const caseDispatch = useCaseDispatch();
|
|
43
|
+
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
44
|
+
id: '5001',
|
|
45
|
+
isDefault: false,
|
|
46
|
+
localeCode: 'en_US',
|
|
47
|
+
pdfDownloadUrl: '/wapps/tnc/viewterms/7275e6f5-5f32-4d9c-aeaf-c796b56817fd',
|
|
48
|
+
termsPdfId: '7275e6f5-5f32-4d9c-aeaf-c796b56817fd',
|
|
49
|
+
translatedDescription: 'Your acceptance of this remote session agreement is required when you request Red Hat’s support team to remotely access your network or systems. Remote access to your network or systems is not a standard Red Hat problem resolution process. Before Red Hat logs onto your systems to analyze your support issue, Red Hat needs your approval and authorization for such remote access.',
|
|
50
|
+
translatedInstructions: 'Please read and accept the remote session terms below to allow Red Hat to access your network or systems.',
|
|
51
|
+
translatedTermsName: 'Remote Access Agreement',
|
|
52
|
+
});
|
|
53
|
+
const [allTranslations, setAllTranslations] = useState({});
|
|
54
|
+
const [agreeLoading, setAgreeLoading] = useState(false);
|
|
55
|
+
useEffect(() => {
|
|
56
|
+
const fetchTerms = () => __awaiter(this, void 0, void 0, function* () {
|
|
57
|
+
try {
|
|
58
|
+
const { siteCode, eventCode, loggedInUser } = props;
|
|
59
|
+
const response = yield request(siteCode, eventCode, loggedInUser);
|
|
60
|
+
let defaultTranslation = response[0].translations[0];
|
|
61
|
+
const translationLangInfoMap = response[0].translations.reduce((allTranslationsmap, translation) => {
|
|
62
|
+
if (translation.isDefault) {
|
|
63
|
+
defaultTranslation = translation;
|
|
64
|
+
}
|
|
65
|
+
allTranslationsmap[translation['localeCode']] = translation;
|
|
66
|
+
return allTranslationsmap;
|
|
67
|
+
}, {});
|
|
68
|
+
setSelectedTranslation(defaultTranslation);
|
|
69
|
+
setAllTranslations(translationLangInfoMap);
|
|
70
|
+
}
|
|
71
|
+
catch (e) {
|
|
72
|
+
console.log(e);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
fetchTerms();
|
|
76
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
77
|
+
}, []);
|
|
78
|
+
const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
79
|
+
propgateErrors: true,
|
|
80
|
+
});
|
|
81
|
+
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
82
|
+
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
83
|
+
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
84
|
+
// To handle modal cancel and close
|
|
85
|
+
const onCancel = () => {
|
|
86
|
+
props.onClose && props.onClose();
|
|
87
|
+
};
|
|
88
|
+
// Function to ack remote session terms and post comment
|
|
89
|
+
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const requestComment = t('Submitted a remote session request.');
|
|
91
|
+
try {
|
|
92
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
93
|
+
remoteSessionTermsAcked: true,
|
|
94
|
+
screenSessionRequested: true,
|
|
95
|
+
});
|
|
96
|
+
try {
|
|
97
|
+
yield postCommentRequest({
|
|
98
|
+
caseNumber: props.caseNumber,
|
|
99
|
+
commentBody: requestComment,
|
|
100
|
+
contentType: 'markdown',
|
|
101
|
+
});
|
|
102
|
+
updateDiscussionStateComments(dispatchDiscussion, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
103
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
104
|
+
onCancel();
|
|
105
|
+
setAgreeLoading(false);
|
|
106
|
+
ToastNotification.addSuccessMessage(t('Remote session has been requested successfully'), t('Red Hat will add a comment to your case to schedule your remote session.'));
|
|
107
|
+
}
|
|
108
|
+
catch (e) {
|
|
109
|
+
onCancel();
|
|
110
|
+
setAgreeLoading(false);
|
|
111
|
+
setIsTermsChecked(false);
|
|
112
|
+
ToastNotification.addWarningMessage(t('Could not submit a comment'), t('Rest assured, we have noted you have accepted the agreement'));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
catch (e) {
|
|
116
|
+
if (props.readOnly) {
|
|
117
|
+
onCancel();
|
|
118
|
+
setAgreeLoading(false);
|
|
119
|
+
setIsTermsChecked(false);
|
|
120
|
+
ToastNotification.addDangerMessage(t('You are not authorized to update this case.'));
|
|
121
|
+
}
|
|
122
|
+
else {
|
|
123
|
+
onCancel();
|
|
124
|
+
setAgreeLoading(false);
|
|
125
|
+
setIsTermsChecked(false);
|
|
126
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
127
|
+
screenSessionRequested: false,
|
|
128
|
+
});
|
|
129
|
+
ToastNotification.addDangerMessage(t('Could not submit a request for remote session'), t('Please try again.'));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
// To handle submit
|
|
134
|
+
const onSubmit = () => {
|
|
135
|
+
setAgreeLoading(true);
|
|
136
|
+
submitRemoteSessionAgreement(selectedTranslation.termsPdfId);
|
|
137
|
+
};
|
|
138
|
+
// Handle terms checkbox
|
|
139
|
+
const onCheckBoxChange = (value) => {
|
|
140
|
+
setIsTermsChecked(value);
|
|
141
|
+
};
|
|
142
|
+
// Handle language change
|
|
143
|
+
const onLangChange = (event, lang) => {
|
|
144
|
+
setSelectedTranslation(allTranslations[lang]);
|
|
145
|
+
setisLangSelectorDropdownOpen(false);
|
|
146
|
+
};
|
|
147
|
+
// To handle dropdown toggle
|
|
148
|
+
const onDropdownToggle = (toggle) => setisLangSelectorDropdownOpen(toggle);
|
|
149
|
+
// To check and if I agree button is loading
|
|
150
|
+
const isAgreeLoading = agreeLoading || isPostingComment;
|
|
151
|
+
// ESS RSA Modal Actions
|
|
152
|
+
const modalActions = [
|
|
153
|
+
React.createElement(Button, { key: "submit", "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: onSubmit, "data-tracking-id": "remote-session-agreement-check", isLoading: isAgreeLoading, isDisabled: !isTermsChecked || isAgreeLoading }, t('I agree')),
|
|
154
|
+
];
|
|
155
|
+
// Body of ESS RSA Modal
|
|
156
|
+
const EssRSAModalBody = () => {
|
|
157
|
+
return (React.createElement(React.Fragment, null,
|
|
158
|
+
React.createElement("p", { className: "pf-u-mt-xs" },
|
|
159
|
+
React.createElement(Trans, null,
|
|
160
|
+
"Your acceptance of this remote session agreement is required ",
|
|
161
|
+
React.createElement("strong", null, "for each case"),
|
|
162
|
+
" when you request Red Hat\u2019s support team to directly access your network or systems.")),
|
|
163
|
+
React.createElement("p", { className: "pf-u-mt-md" },
|
|
164
|
+
React.createElement(Trans, null, "Remote access to your network or systems is not a standard Red Hat problem resolution process. 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.")),
|
|
165
|
+
React.createElement("p", { className: "pf-u-mt-md" },
|
|
166
|
+
React.createElement(Trans, null, "Please read and accept the remote session terms below to allow Red Hat to access your network or systems.")),
|
|
167
|
+
React.createElement("div", null,
|
|
168
|
+
React.createElement(Select, { className: "pf-u-mt-md", "aria-label": t('Select language'), id: "terms-language-selector", selections: selectedTranslation.localeCode, onSelect: onLangChange, isOpen: isLangSelectorDropdownOpen, menuAppendTo: document.body, placeholderText: t('Select an option that best fits'), onToggle: onDropdownToggle, width: 350 }, Object.keys(allTranslations).map((option, index) => (React.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option))))),
|
|
169
|
+
React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-u-ml-md", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
|
|
170
|
+
t('Download'),
|
|
171
|
+
" ",
|
|
172
|
+
React.createElement(DownloadIcon, { className: "pf-u-ml-xs" }))),
|
|
173
|
+
React.createElement("div", null,
|
|
174
|
+
React.createElement(Checkbox, { className: "pf-u-mt-md rsa-checkbox", id: "terms-accept-checkbox", label: React.createElement(React.Fragment, null,
|
|
175
|
+
React.createElement(Trans, null, "I have read and agree to the"),
|
|
176
|
+
' ',
|
|
177
|
+
React.createElement("a", { className: "pf-c-button pf-m-link pf-m-inline align-link-items", rel: "noopener noreferrer", target: "_blank", href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": "case-details-request-remote-session-terms" },
|
|
178
|
+
React.createElement(Trans, null, "terms "),
|
|
179
|
+
React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))));
|
|
180
|
+
};
|
|
181
|
+
return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": t('Remote Session Agreement'), title: t('Remote Session Agreement'), isOpen: props.show, onClose: onCancel, actions: modalActions }, EssRSAModalBody()));
|
|
182
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AAqBA,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,eA6CnD"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { Flex, FlexItem } from '@patternfly/react-core';
|
|
2
|
+
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
3
|
+
import { isSpecialSupportOfferingEnabled } from '@rh-support/utils';
|
|
4
|
+
import { isEqual } from 'lodash';
|
|
2
5
|
import React from 'react';
|
|
3
|
-
import { useCaseDispatch } from '../../context/CaseContext';
|
|
6
|
+
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
4
7
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
5
8
|
import CaseGroup from '../CaseInformation/CaseGroup';
|
|
6
9
|
import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
|
|
@@ -10,14 +13,23 @@ import Severity from '../CaseInformation/Severity';
|
|
|
10
13
|
import SupportLevel from '../CaseInformation/SupportLevel';
|
|
11
14
|
import CaseLanguageSelector from './CaseLanguageSelector';
|
|
12
15
|
import { Cep } from './Cep';
|
|
16
|
+
import ESSRemoteSessionCheckBox from './ESSRemoteSessionCheckBox';
|
|
13
17
|
import OpenReferenceNumber from './OpenReferenceNumber';
|
|
14
18
|
import { RHAssociatesSelector } from './RHAssociatesSelector';
|
|
15
19
|
import CaseContactSelector from './SendNotifications/CaseContactSelector';
|
|
16
20
|
export default function CaseManagement(props) {
|
|
21
|
+
var _a;
|
|
17
22
|
const caseDispatch = useCaseDispatch();
|
|
18
23
|
const onSeverityChange = (payload) => {
|
|
19
24
|
setCaseDetails(caseDispatch, payload);
|
|
20
25
|
};
|
|
26
|
+
const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
|
|
27
|
+
const { product } = useCaseSelector((state) => ({
|
|
28
|
+
product: state.caseDetails.product,
|
|
29
|
+
}), isEqual);
|
|
30
|
+
const selectedProduct = product;
|
|
31
|
+
// To check if the user is ESS Customer and Product has ESS Support
|
|
32
|
+
const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, selectedProduct);
|
|
21
33
|
return (React.createElement("form", null,
|
|
22
34
|
React.createElement(SupportLevel, null),
|
|
23
35
|
React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
|
|
@@ -32,5 +44,6 @@ export default function CaseManagement(props) {
|
|
|
32
44
|
React.createElement(CaseContactSelector, null),
|
|
33
45
|
React.createElement(RHAssociatesSelector, null),
|
|
34
46
|
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
|
|
35
|
-
React.createElement(Cep, null)
|
|
47
|
+
React.createElement(Cep, null),
|
|
48
|
+
isESSCustomer && React.createElement(ESSRemoteSessionCheckBox, null)));
|
|
36
49
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ESSRemoteSessionCheckBox.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/ESSRemoteSessionCheckBox.tsx"],"names":[],"mappings":"AA8BA,QAAA,MAAM,qBAAqB,mBAyO1B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,167 @@
|
|
|
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 { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
+
import { Button, ButtonVariant, Checkbox, Modal, Select, SelectOption } from '@patternfly/react-core';
|
|
12
|
+
import DownloadIcon from '@patternfly/react-icons/dist/esm/icons/download-icon';
|
|
13
|
+
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
14
|
+
import { useFetch } from '@rh-support/components';
|
|
15
|
+
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
16
|
+
import isEqual from 'lodash/isEmpty';
|
|
17
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
18
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
19
|
+
import { TnC } from '../../constants/tncConstants';
|
|
20
|
+
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
21
|
+
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
22
|
+
const getLocaleNameFromLocalCode = (localeCode) => {
|
|
23
|
+
if ('Intl' in window && 'DisplayNames' in Intl) {
|
|
24
|
+
try {
|
|
25
|
+
const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
|
|
26
|
+
// https://github.com/microsoft/TypeScript/issues/41338
|
|
27
|
+
const langName = new Intl.DisplayNames([lang], { type: 'language' });
|
|
28
|
+
const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
|
|
29
|
+
return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
return localeCode;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return localeCode;
|
|
36
|
+
};
|
|
37
|
+
const ESSRemoteSessionCheck = () => {
|
|
38
|
+
const { t } = useTranslation();
|
|
39
|
+
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
40
|
+
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
41
|
+
id: '5001',
|
|
42
|
+
isDefault: false,
|
|
43
|
+
localeCode: 'en_US',
|
|
44
|
+
pdfDownloadUrl: '/wapps/tnc/viewterms/7275e6f5-5f32-4d9c-aeaf-c796b56817fd',
|
|
45
|
+
termsPdfId: '7275e6f5-5f32-4d9c-aeaf-c796b56817fd',
|
|
46
|
+
translatedDescription: 'Your acceptance of this remote session agreement is required when you request Red Hat’s support team to remotely access your network or systems. Remote access to your network or systems is not a standard Red Hat problem resolution process. Before Red Hat logs onto your systems to analyze your support issue, Red Hat needs your approval and authorization for such remote access.',
|
|
47
|
+
translatedInstructions: 'Please read and accept the remote session terms below to allow Red Hat to access your network or systems.',
|
|
48
|
+
translatedTermsName: 'Remote Access Agreement',
|
|
49
|
+
});
|
|
50
|
+
const [allTranslations, setAllTranslations] = useState({});
|
|
51
|
+
const [agreeLoading, setAgreeLoading] = useState(false);
|
|
52
|
+
const [isLangSelectorDropdownOpen, setisLangSelectorDropdownOpen] = useState(false);
|
|
53
|
+
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
54
|
+
const [isRSAModalOpen, setIsRSAModalOpen] = useState(false);
|
|
55
|
+
const { isCaseUpdating, screenSessionRequested } = useCaseSelector((state) => ({
|
|
56
|
+
caseNumber: state.caseDetails.caseNumber,
|
|
57
|
+
isCaseUpdating: state.isCaseUpdating,
|
|
58
|
+
screenSessionRequested: state.caseDetails.screenSessionRequested,
|
|
59
|
+
}), isEqual);
|
|
60
|
+
const caseDispatch = useCaseDispatch();
|
|
61
|
+
const [remoteSessionChecked, setRemoteSessionChecked] = useState(screenSessionRequested);
|
|
62
|
+
const { globalMetadataState: { loggedInUser, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
63
|
+
const siteCode = TnC.REMOTE_RIDER_SITE_CODE;
|
|
64
|
+
const eventCode = TnC.REMOTER_RIDER_EVENT_CODE;
|
|
65
|
+
const user = loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername;
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
const fetchTerms = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
68
|
+
try {
|
|
69
|
+
const response = yield request(siteCode, eventCode, user);
|
|
70
|
+
let defaultTranslation = response[0].translations[0];
|
|
71
|
+
const translationLangInfoMap = response[0].translations.reduce((allTranslationsmap, translation) => {
|
|
72
|
+
if (translation.isDefault) {
|
|
73
|
+
defaultTranslation = translation;
|
|
74
|
+
}
|
|
75
|
+
allTranslationsmap[translation['localeCode']] = translation;
|
|
76
|
+
return allTranslationsmap;
|
|
77
|
+
}, {});
|
|
78
|
+
setSelectedTranslation(defaultTranslation);
|
|
79
|
+
setAllTranslations(translationLangInfoMap);
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
console.log(e);
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
fetchTerms();
|
|
86
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
87
|
+
}, []);
|
|
88
|
+
const handleCheckBoxChange = (checked) => {
|
|
89
|
+
setRemoteSessionChecked(checked);
|
|
90
|
+
setCaseDetails(caseDispatch, {
|
|
91
|
+
screenSessionRequested: checked,
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
const handleTermsCheckBoxChange = (checked) => {
|
|
95
|
+
setRemoteSessionChecked(checked);
|
|
96
|
+
setIsRSAModalOpen(checked);
|
|
97
|
+
};
|
|
98
|
+
// To handle RSA submit
|
|
99
|
+
const submitRemoteSessionAgreement = () => {
|
|
100
|
+
setAgreeLoading(true);
|
|
101
|
+
setRemoteSessionChecked(isTermsChecked);
|
|
102
|
+
setCaseDetails(caseDispatch, {
|
|
103
|
+
remoteSessionTermsAcked: isTermsChecked,
|
|
104
|
+
screenSessionRequested: isTermsChecked,
|
|
105
|
+
});
|
|
106
|
+
setAgreeLoading(false);
|
|
107
|
+
setIsRSAModalOpen(false);
|
|
108
|
+
};
|
|
109
|
+
// Handle terms checkbox
|
|
110
|
+
const onCheckBoxChange = (value) => {
|
|
111
|
+
setIsTermsChecked(value);
|
|
112
|
+
};
|
|
113
|
+
// Handle language change
|
|
114
|
+
const onLangChange = (event, lang) => {
|
|
115
|
+
setSelectedTranslation(allTranslations[lang]);
|
|
116
|
+
setisLangSelectorDropdownOpen(false);
|
|
117
|
+
};
|
|
118
|
+
// To handle dropdown toggle
|
|
119
|
+
const onDropdownToggle = (toggle) => setisLangSelectorDropdownOpen(toggle);
|
|
120
|
+
// To handle modal cancel and close
|
|
121
|
+
const onCancel = () => {
|
|
122
|
+
setIsRSAModalOpen(false);
|
|
123
|
+
setCaseDetails(caseDispatch, {
|
|
124
|
+
remoteSessionTermsAcked: false,
|
|
125
|
+
screenSessionRequested: false,
|
|
126
|
+
});
|
|
127
|
+
setRemoteSessionChecked(false);
|
|
128
|
+
setAgreeLoading(false);
|
|
129
|
+
};
|
|
130
|
+
const modalActions = [
|
|
131
|
+
React.createElement(Button, { key: "submit", "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: submitRemoteSessionAgreement, "data-tracking-id": "ess-remote-session-agreement-check", isLoading: agreeLoading, isDisabled: !isTermsChecked || agreeLoading }, t('I agree')),
|
|
132
|
+
];
|
|
133
|
+
// To check if terms have been accepted on account level
|
|
134
|
+
const termsAcceptedOnAccountLevel = loggedInUsersAccount.data.remoteSessionTermsAcked;
|
|
135
|
+
return (React.createElement(React.Fragment, null,
|
|
136
|
+
React.createElement(Checkbox, { id: "case-management-remote-session", label: React.createElement(React.Fragment, null,
|
|
137
|
+
React.createElement(Trans, null, "I want a"),
|
|
138
|
+
' ',
|
|
139
|
+
React.createElement("a", { href: "https://access.redhat.com/articles/3566571", target: "_blank", rel: "noopener noreferrer" },
|
|
140
|
+
React.createElement(Trans, null, "remote session"))), description: t('Red Hat will add a comment to your case to schedule your remote session.'), "data-tracking-id": "case-management-remote-session-check", isChecked: remoteSessionChecked, onChange: termsAcceptedOnAccountLevel ? handleCheckBoxChange : handleTermsCheckBoxChange, isDisabled: isCaseUpdating, className: "rsa-checkbox" }),
|
|
141
|
+
React.createElement(Modal, { id: "remote-session-check-modal", "aria-label": t('Remote Session Agreement'), title: t('Remote Session Agreement'), isOpen: isRSAModalOpen, onClose: onCancel, actions: modalActions },
|
|
142
|
+
React.createElement(React.Fragment, null,
|
|
143
|
+
React.createElement("p", { className: "pf-u-mt-xs" },
|
|
144
|
+
React.createElement(Trans, null,
|
|
145
|
+
"Your acceptance of this remote session agreement is required ",
|
|
146
|
+
React.createElement("strong", null, "for each case"),
|
|
147
|
+
' ',
|
|
148
|
+
"when you request Red Hat\u2019s support team to directly access your network or systems.")),
|
|
149
|
+
React.createElement("p", { className: "pf-u-mt-md" },
|
|
150
|
+
React.createElement(Trans, null, "Remote access to your network or systems is not a standard Red Hat problem resolution process. 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.")),
|
|
151
|
+
React.createElement("p", { className: "pf-u-mt-md" },
|
|
152
|
+
React.createElement(Trans, null, "Please read and accept the remote session terms below to allow Red Hat to access your network or systems.")),
|
|
153
|
+
React.createElement("div", null,
|
|
154
|
+
React.createElement(Select, { className: "pf-u-mt-md", "aria-label": t('Select language'), id: "terms-language-selector", selections: selectedTranslation.localeCode, onSelect: onLangChange, isOpen: isLangSelectorDropdownOpen, menuAppendTo: document.body, placeholderText: t('Select an option that best fits'), onToggle: onDropdownToggle, width: 350 }, Object.keys(allTranslations).map((option, index) => (React.createElement(SelectOption, { key: index, value: option }, getLocaleNameFromLocalCode(option))))),
|
|
155
|
+
React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "ess-rsa-modal-terms-download", className: "pf-u-ml-md", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
|
|
156
|
+
t('Download'),
|
|
157
|
+
" ",
|
|
158
|
+
React.createElement(DownloadIcon, { className: "pf-u-ml-xs" }))),
|
|
159
|
+
React.createElement("div", null,
|
|
160
|
+
React.createElement(Checkbox, { className: "pf-u-mt-md rsa-checkbox", id: "terms-accept-checkbox", label: React.createElement(React.Fragment, null,
|
|
161
|
+
React.createElement(Trans, null, "I have read and agree to the"),
|
|
162
|
+
' ',
|
|
163
|
+
React.createElement("a", { className: "pf-c-button pf-m-link pf-m-inline align-link-items", rel: "noopener noreferrer", target: "_blank", href: selectedTranslation.pdfDownloadUrl, "data-tracking-id": "ccase-management-ess-request-rsa" },
|
|
164
|
+
React.createElement(Trans, null, "terms "),
|
|
165
|
+
React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))))));
|
|
166
|
+
};
|
|
167
|
+
export default ESSRemoteSessionCheck;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAuBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,eAuE3C"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Flex, FlexItem } from '@patternfly/react-core';
|
|
2
|
+
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
2
3
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
4
|
+
import { isSpecialSupportOfferingEnabled } from '@rh-support/utils';
|
|
3
5
|
import isEmpty from 'lodash/isEmpty';
|
|
4
6
|
import isEqual from 'lodash/isEqual';
|
|
5
7
|
import React, { useContext } from 'react';
|
|
@@ -17,6 +19,7 @@ import Severity from '../CaseInformation/Severity';
|
|
|
17
19
|
import SupportLevel from '../CaseInformation/SupportLevel';
|
|
18
20
|
import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
|
|
19
21
|
import { Cep } from '../CaseManagement/Cep';
|
|
22
|
+
import ESSRemoteSessionCheck from '../CaseManagement/ESSRemoteSessionCheckBox';
|
|
20
23
|
import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
|
|
21
24
|
import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
|
|
22
25
|
import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
|
|
@@ -26,15 +29,21 @@ import KtQuestions from '../ImproveCase/KtQuestions';
|
|
|
26
29
|
import { AllProductsSelector } from '../ProductSelector/AllProductsSelector';
|
|
27
30
|
import { EARuleWidget } from '../Recommendations/EARules/EARuleWidget';
|
|
28
31
|
export default function Review(props) {
|
|
32
|
+
var _a;
|
|
29
33
|
const caseDispatch = useCaseDispatch();
|
|
30
|
-
const { contactInfo24x7 } = useCaseSelector((state) => ({
|
|
34
|
+
const { contactInfo24x7, product } = useCaseSelector((state) => ({
|
|
31
35
|
contactInfo24x7: state.caseDetails.contactInfo24x7,
|
|
36
|
+
product: state.caseDetails.product,
|
|
32
37
|
}), isEqual);
|
|
33
38
|
const ability = useContext(AbilityContext);
|
|
34
39
|
const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
|
|
40
|
+
const selectedProduct = product;
|
|
41
|
+
const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
|
|
35
42
|
const onSeverityChange = (payload) => {
|
|
36
43
|
setCaseDetails(caseDispatch, payload);
|
|
37
44
|
};
|
|
45
|
+
// To check if the user is ESS Customer and Product has ESS Support
|
|
46
|
+
const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, selectedProduct);
|
|
38
47
|
return (React.createElement(React.Fragment, null,
|
|
39
48
|
React.createElement(EARuleWidget, null),
|
|
40
49
|
React.createElement("form", { className: "review-form card card-light push-bottom" },
|
|
@@ -54,10 +63,11 @@ export default function Review(props) {
|
|
|
54
63
|
React.createElement(ContactPhoneNumber, null))),
|
|
55
64
|
React.createElement(ContactPhoneNumberAlert, null),
|
|
56
65
|
React.createElement(Fts, { inlineEditable: true, initialIsEditing: isEmpty(contactInfo24x7), hideSaveCancel: true }),
|
|
57
|
-
React.createElement(CaseLanguageSelector,
|
|
66
|
+
React.createElement(CaseLanguageSelector, null),
|
|
58
67
|
React.createElement(CaseGroup, null),
|
|
59
68
|
canSeeEmailNotifications && React.createElement(CaseContactSelector, null),
|
|
60
69
|
React.createElement(RHAssociatesSelector, null),
|
|
61
70
|
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
|
|
62
|
-
React.createElement(Cep, null)
|
|
71
|
+
React.createElement(Cep, null),
|
|
72
|
+
isESSCustomer && React.createElement(ESSRemoteSessionCheck, null))));
|
|
63
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,eAAO,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BAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,uBAAuB,iBAAkB,MAAM,YAAY,MAAM,KAAG,MAQhF,CAAC;AAEF,eAAO,MAAM,sBAAsB,aAAc,MAAM,KAAG,MAKzD,CAAC;AAEF,eAAO,MAAM,gBAAgB,+CAqC5B,CAAC;AAIF,eAAO,MAAM,gBAAgB,cAAe,UAAU,wBAAwB,QAAQ,eAAe,CAAC,KAAG,OA6BxG,CAAC;AAEF,eAAO,MAAM,oBAAoB,cAClB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAyBF,CAAC;AAEF,eAAO,MAAM,0BAA0B,cACxB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAmBF,CAAC;AAIF,eAAO,MAAM,6BAA6B,cAC3B,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAuBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CA6EtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAsB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,qBAAsB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,gBACrB,YAAY,6BACE,MAAM,mBAChB,MAAM,KACxB,QAAQ,YAAY,CAiCtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eAiDF,CAAC"}
|
|
@@ -243,6 +243,7 @@ export const createCasePayload = (caseState, sessionItem, isCaseCreate = false)
|
|
|
243
243
|
(casePayload.phoneAreaCodePrefixLineNumber = (_d = case_details.phoneAreaCodePrefixLineNumber) === null || _d === void 0 ? void 0 : _d.trim());
|
|
244
244
|
case_details.remoteSessionTermsAcked &&
|
|
245
245
|
(casePayload.remoteSessionTermsAcked = !!case_details.remoteSessionTermsAcked);
|
|
246
|
+
case_details.screenSessionRequested && (casePayload.screenSessionRequested = !!case_details.screenSessionRequested);
|
|
246
247
|
casePayload.suppliedPhoneNumberVerified = !isEmpty(case_details.suppliedPhoneNumberVerified)
|
|
247
248
|
? case_details.suppliedPhoneNumberVerified
|
|
248
249
|
: 'False';
|
|
@@ -293,7 +294,7 @@ export const getHasInvalidEntitlements = (caseEntitlements) => {
|
|
|
293
294
|
return filter(unionBy(caseEntitlements, 'slaProcessId'), (e) => !!e.slaProcessId).length === 0;
|
|
294
295
|
};
|
|
295
296
|
export const getCaseFromSessionDetails = (sessionItem, loggedInUserAccountNumber, loggedInUserSSO) => {
|
|
296
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
297
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
297
298
|
const { sessionDetails, session } = sessionItem;
|
|
298
299
|
return {
|
|
299
300
|
product: sessionDetails.product,
|
|
@@ -324,10 +325,11 @@ export const getCaseFromSessionDetails = (sessionItem, loggedInUserAccountNumber
|
|
|
324
325
|
suppliedPhoneNumberVerified: (_o = sessionDetails.suppliedPhoneNumberVerified) !== null && _o !== void 0 ? _o : undefined,
|
|
325
326
|
userAgent: session.userAgent,
|
|
326
327
|
originatingSystem: session.originatingSystem,
|
|
328
|
+
screenSessionRequested: (_p = sessionDetails.screenSessionRequested) !== null && _p !== void 0 ? _p : false,
|
|
327
329
|
};
|
|
328
330
|
};
|
|
329
331
|
export const getSessionDetailsFromCase = (caseDetails, selectedNotificationContacts) => {
|
|
330
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v;
|
|
332
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
|
|
331
333
|
const notifiedUsersInternal = [];
|
|
332
334
|
const notifiedUsersExternal = [];
|
|
333
335
|
forEach(selectedNotificationContacts, (contact) => {
|
|
@@ -369,5 +371,6 @@ export const getSessionDetailsFromCase = (caseDetails, selectedNotificationConta
|
|
|
369
371
|
? caseDetails.phoneCountryCode
|
|
370
372
|
: '',
|
|
371
373
|
suppliedPhoneNumberVerified: caseDetails.suppliedPhoneNumberVerified,
|
|
374
|
+
screenSessionRequested: (_w = caseDetails.screenSessionRequested) !== null && _w !== void 0 ? _w : false,
|
|
372
375
|
};
|
|
373
376
|
};
|
|
@@ -25,6 +25,7 @@ export declare const updateCaseCreationErrorStatusOnError: (dispatch: CaseReduce
|
|
|
25
25
|
* @param errorStatus Boolean
|
|
26
26
|
*/
|
|
27
27
|
export declare const updateCaseCreationErrorStatus: (dispatch: CaseReducerDispatchType, errorStatus: boolean) => void;
|
|
28
|
+
export declare const postRemoteSessionRequest: (dispatch: CaseReducerDispatchType, caseNumber: string) => Promise<void>;
|
|
28
29
|
export declare const postCaseCreationProcessing: (isSecureSupport: boolean, dispatch: CaseReducerDispatchType, sessionRestoreDispatch: SessionReducerDispatchType, sessionItem: ISessionItem, caseNumber: string, caseDetails: ICaseState) => Promise<void>;
|
|
29
30
|
export declare const resolveSession: (sessionRestoreDispatch: SessionReducerDispatchType, sessionItem: ISessionItem, caseNumber: string) => Promise<void>;
|
|
30
31
|
export declare const postCepDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, cepDetails: ICepDetails) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,C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AAC;AAEF,eAAO,MAAM,iBAAiB,aAChB,uBAAuB,cACrB,MAAM,eACL,QAAQ,YAAY,CAAC,mBACjB,OAAO,mBAiB3B,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,SAC1B,aAAa,EAAE,gBACR,MAAM,kBAmCvB,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,yEAInB,MAAM,kBACJ,MAAM,kBAgFzB,CAAC;AAEF,eAAO,MAAM,yCAAyC,aACxC,uBAAuB,cACrB,OAAO,iBACJ,MAAM,SAMxB,CAAC;AAIF,eAAO,MAAM,yBAAyB,aACxB,uBAAuB,iBAClB,MAAM,eACR,MAAM,sBACC,QAAQ,kBA6B/B,CAAC;AAEF,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAmBtG;AAGD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,0BAA0B,EAAE,QAO5D;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAiB1F;AAED,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,QAAQ,OAAO,SAKlF,CAAC"}
|
|
@@ -207,10 +207,29 @@ export const updateCaseCreationErrorStatus = (dispatch, errorStatus) => {
|
|
|
207
207
|
},
|
|
208
208
|
});
|
|
209
209
|
};
|
|
210
|
+
export const postRemoteSessionRequest = (dispatch, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
211
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetails, payload: { isCaseUpdating: true } });
|
|
212
|
+
try {
|
|
213
|
+
yield publicApi.kase.postComment({
|
|
214
|
+
caseNumber,
|
|
215
|
+
commentBody: 'Submitted a remote session request.',
|
|
216
|
+
isPublic: true,
|
|
217
|
+
contentType: 'markdown',
|
|
218
|
+
});
|
|
219
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetails, payload: { isCaseUpdating: false } });
|
|
220
|
+
}
|
|
221
|
+
catch (error) {
|
|
222
|
+
dispatch({
|
|
223
|
+
type: CaseReducerConstants.isCreatingCase,
|
|
224
|
+
payload: { caseCreationErrorMessage: error.message },
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
});
|
|
210
228
|
// For all post case creation processing contexts
|
|
211
229
|
export const postCaseCreationProcessing = (isSecureSupport, dispatch, sessionRestoreDispatch, sessionItem, caseNumber, caseDetails) => __awaiter(void 0, void 0, void 0, function* () {
|
|
212
230
|
isSecureSupport === false && resolveSession(sessionRestoreDispatch, sessionItem, caseNumber);
|
|
213
231
|
caseDetails.caseDetails.cep === true && postCepDetails(dispatch, caseNumber, caseDetails.cepDetails);
|
|
232
|
+
caseDetails.caseDetails.screenSessionRequested === true && postRemoteSessionRequest(dispatch, caseNumber);
|
|
214
233
|
});
|
|
215
234
|
// To resolve or update session API
|
|
216
235
|
export const resolveSession = (sessionRestoreDispatch, sessionItem, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -450,8 +469,8 @@ export const fetchCaseGroupsForSSO = (dispatch, contactSsoUsername, canUpdateCas
|
|
|
450
469
|
canUpdateCaseGroup && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
451
470
|
}
|
|
452
471
|
});
|
|
453
|
-
const getSelectedNotificationContactsFromSession = (contacts,
|
|
454
|
-
return filter(contacts, (c) =>
|
|
472
|
+
const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
|
|
473
|
+
return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
|
|
455
474
|
};
|
|
456
475
|
export const updateCaseWithSession = (dispatch, sessionItem, loggedInUserAccountNumber, loggedInUserContact, loggedInUserAccount = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
457
476
|
var _e, _f, _g, _h;
|
|
@@ -514,7 +533,7 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
|
|
|
514
533
|
}
|
|
515
534
|
});
|
|
516
535
|
export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, refresh = false, previousState = {}) => __awaiter(void 0, void 0, void 0, function* () {
|
|
517
|
-
var _j;
|
|
536
|
+
var _j, _k;
|
|
518
537
|
dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
|
|
519
538
|
try {
|
|
520
539
|
const data = yield publicApi.kase.getCase(caseNumber);
|
|
@@ -557,9 +576,8 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, refre
|
|
|
557
576
|
noClusterIdReason: data.noClusterIdReason || '',
|
|
558
577
|
noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
|
|
559
578
|
phone: data.phone || '',
|
|
560
|
-
phoneAreaCodePrefixLineNumber: data.phoneAreaCodePrefixLineNumber || '',
|
|
561
|
-
phoneCountryCode: data.phoneCountryCode || '',
|
|
562
579
|
suppliedPhoneNumberVerified: data.suppliedPhoneNumberVerified || undefined,
|
|
580
|
+
screenSessionRequested: (_k = data.screenSessionRequested) !== null && _k !== void 0 ? _k : false,
|
|
563
581
|
};
|
|
564
582
|
caseDetails.chats = data === null || data === void 0 ? void 0 : data.chats;
|
|
565
583
|
caseDetails.comments = data === null || data === void 0 ? void 0 : data.comments;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.27",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lib/**/*"
|
|
27
27
|
],
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@cee-eng/hydrajs": "4.16.
|
|
29
|
+
"@cee-eng/hydrajs": "4.16.15",
|
|
30
30
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
31
31
|
"@patternfly/patternfly": "4.196.7",
|
|
32
32
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react-virtualized": "^9.21.2"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@cee-eng/hydrajs": "4.16.
|
|
59
|
+
"@cee-eng/hydrajs": "4.16.15",
|
|
60
60
|
"@cee-eng/ui-toolkit": "1.1.6",
|
|
61
61
|
"@patternfly/patternfly": "4.196.7",
|
|
62
62
|
"@patternfly/pfe-accordion": "1.12.3",
|
|
@@ -66,11 +66,11 @@
|
|
|
66
66
|
"@patternfly/react-core": "4.264.0",
|
|
67
67
|
"@progress/kendo-drawing": "^1.6.0",
|
|
68
68
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
69
|
-
"@rh-support/components": "2.1.
|
|
70
|
-
"@rh-support/react-context": "2.1.
|
|
69
|
+
"@rh-support/components": "2.1.14",
|
|
70
|
+
"@rh-support/react-context": "2.1.14",
|
|
71
71
|
"@rh-support/types": "2.0.2",
|
|
72
|
-
"@rh-support/user-permissions": "2.1.
|
|
73
|
-
"@rh-support/utils": "2.1.
|
|
72
|
+
"@rh-support/user-permissions": "2.1.8",
|
|
73
|
+
"@rh-support/utils": "2.1.5",
|
|
74
74
|
"@types/react-redux": "^7.1.12",
|
|
75
75
|
"@types/redux": "^3.6.0",
|
|
76
76
|
"dompurify": "^2.4.1",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"defaults and supports es6-module",
|
|
134
134
|
"maintained node versions"
|
|
135
135
|
],
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "bfb34bcd3654c4842810f4e62b940ccf6f0b0dc4"
|
|
137
137
|
}
|