@rh-support/troubleshoot 2.6.21 → 2.6.23
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 +1 -0
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +31 -5
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +33 -34
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +2 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +1 -0
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +16 -22
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +52 -95
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +15 -19
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +0 -8
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +6 -2
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +5 -8
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +7 -7
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +1 -1
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts +7 -0
- package/lib/esm/components/TroubleshootSection/AskRedHat.d.ts.map +1 -0
- package/lib/esm/components/TroubleshootSection/AskRedHat.js +73 -0
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts +5 -0
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +86 -13
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts +9 -0
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.d.ts.map +1 -0
- package/lib/esm/components/TroubleshootSection/icons/CollapseIcon.js +9 -0
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts +9 -0
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.d.ts.map +1 -0
- package/lib/esm/components/TroubleshootSection/icons/StarIcon.js +17 -0
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +0 -1
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
- package/lib/esm/components/shared/input/ContactSelectorInternal.js +1 -6
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +5 -4
- package/lib/esm/components/wizardLayout/WizardMain.d.ts +3 -1
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +116 -9
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +4 -3
- package/lib/esm/components/wizardLayout/index.d.ts +1 -0
- package/lib/esm/components/wizardLayout/index.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/index.js +1 -0
- package/lib/esm/context/AIResponseContext.d.ts +10 -0
- package/lib/esm/context/AIResponseContext.d.ts.map +1 -0
- package/lib/esm/context/AIResponseContext.js +26 -0
- package/lib/esm/context/RootTroubleshootProvider.d.ts.map +1 -1
- package/lib/esm/context/RootTroubleshootProvider.js +8 -6
- package/lib/esm/css/AskRedHat.css +333 -0
- package/lib/esm/css/case.css +0 -12
- package/lib/esm/hooks/useWizard.d.ts +4 -0
- package/lib/esm/hooks/useWizard.d.ts.map +1 -1
- package/lib/esm/hooks/useWizard.js +1 -1
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts +48 -0
- package/lib/esm/reducers/AIResponseConstNTypes.d.ts.map +1 -0
- package/lib/esm/reducers/AIResponseConstNTypes.js +16 -0
- package/lib/esm/reducers/AIResponseReducer.d.ts +9 -0
- package/lib/esm/reducers/AIResponseReducer.d.ts.map +1 -0
- package/lib/esm/reducers/AIResponseReducer.js +43 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +2 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +2 -0
- package/lib/esm/scss/_main.scss +0 -13
- package/lib/esm/scss/_pf-overrides.scss +0 -5
- package/package.json +7 -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":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,OAAO,CAAC;CAC9B;AAED,eAAO,MAAM,wBAAwB,+EAqLnC,CAAC"}
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Button, ButtonVariant, Card, CardBody, CardHeader, List, ListItem, Popover } from '@patternfly/react-core';
|
|
2
2
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
|
-
import
|
|
3
|
+
import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
|
|
4
|
+
import { useCanEditCase, useGlobalStateContext } from '@rh-support/react-context';
|
|
4
5
|
import { Can, resourceActions, resources } from '@rh-support/user-permissions';
|
|
5
6
|
import React, { forwardRef, useState } from 'react';
|
|
6
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -9,6 +10,9 @@ import { RequestEscalationModal } from './RequestEscalationModal';
|
|
|
9
10
|
export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
10
11
|
const { t } = useTranslation();
|
|
11
12
|
const { caseDetailsPageState: { caseEscalations }, } = useCaseDetailsPageStateContext();
|
|
13
|
+
const { globalMetadataState: { loggedInUserRights }, } = useGlobalStateContext();
|
|
14
|
+
const isExternal = loggedInUserRights.data.isExternal();
|
|
15
|
+
const isInternal = loggedInUserRights.data.isInternal();
|
|
12
16
|
const canEditCase = useCanEditCase();
|
|
13
17
|
const isCreateRMEVisible = (caseEscalations.data || []).length === 0 || caseEscalations.data.every((item) => item.status === 'Closed');
|
|
14
18
|
const commonElements = (React.createElement(React.Fragment, null,
|
|
@@ -22,7 +26,18 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
22
26
|
React.createElement("a", { href: "/support/escalation", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Learn more about Red Hat support case escalation') },
|
|
23
27
|
React.createElement(InfoCircleIcon, null)))),
|
|
24
28
|
React.createElement(CardBody, null,
|
|
25
|
-
React.createElement(React.Fragment, null,
|
|
29
|
+
isInternal && (React.createElement(React.Fragment, null,
|
|
30
|
+
React.createElement("p", null,
|
|
31
|
+
React.createElement(LockIcon, null),
|
|
32
|
+
" ",
|
|
33
|
+
React.createElement("strong", null, `${t('Available to customers only')}`)),
|
|
34
|
+
React.createElement("p", null,
|
|
35
|
+
React.createElement(Trans, null,
|
|
36
|
+
"Available to customers only. When a customer submits an escalation request, it is routed to a support manager for review. Support agents can refer to the",
|
|
37
|
+
' ',
|
|
38
|
+
React.createElement("a", { href: "https://access.redhat.com/support/escalation", target: "_blank", rel: "noreferrer" }, "Escalation guidelines"),
|
|
39
|
+
"for details.")))),
|
|
40
|
+
isExternal && props.canViewACESection && (React.createElement(React.Fragment, null,
|
|
26
41
|
React.createElement("p", null,
|
|
27
42
|
React.createElement("strong", null, t('Red Hat associates can open an ACE escalation when')),
|
|
28
43
|
":"),
|
|
@@ -31,7 +46,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
31
46
|
React.createElement(ListItem, null, t('The customer thinks the case is not moving appropriately')),
|
|
32
47
|
React.createElement(ListItem, null, t('The customer wants a new resource')),
|
|
33
48
|
React.createElement(ListItem, null, t('The issue is more severe than originally thought'))),
|
|
34
|
-
React.createElement("a", { href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, target: "_blank", rel: "noopener noreferrer", className: "pf-v6-c-button pf-m-tertiary", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation'))))));
|
|
49
|
+
React.createElement("a", { href: `/watchlist/internal/aces/new?caseNumber=${props.caseNumber}`, target: "_blank", rel: "noopener noreferrer", className: "pf-v6-c-button pf-m-tertiary", "data-tracking-id": "request-ace-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))))));
|
|
35
50
|
const [openRequestEscalationModal, setOpenRequestEscalationModal] = useState(false);
|
|
36
51
|
const toggleModal = () => {
|
|
37
52
|
if (canEditCase.alert())
|
|
@@ -47,7 +62,18 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
47
62
|
React.createElement(Trans, null, "Learn more about escalation cases."))) },
|
|
48
63
|
React.createElement(InfoCircleIcon, { title: t('Learn more about escalation cases popover') }))))),
|
|
49
64
|
React.createElement(CardBody, null,
|
|
50
|
-
React.createElement(React.Fragment, null,
|
|
65
|
+
isInternal && (React.createElement(React.Fragment, null,
|
|
66
|
+
React.createElement("p", null,
|
|
67
|
+
React.createElement(LockIcon, null),
|
|
68
|
+
" ",
|
|
69
|
+
React.createElement("strong", null, `${t('Available to customers only')}`)),
|
|
70
|
+
React.createElement("p", null,
|
|
71
|
+
React.createElement(Trans, null,
|
|
72
|
+
"Available to customers only. When a customer submits an escalation request, it is routed to a support manager for review. Support agents can refer to the",
|
|
73
|
+
' ',
|
|
74
|
+
React.createElement("a", { href: "https://access.redhat.com/support/escalation", target: "_blank", rel: "noreferrer" }, "Escalation guidelines"),
|
|
75
|
+
"for details.")))),
|
|
76
|
+
isExternal && (React.createElement(React.Fragment, null,
|
|
51
77
|
React.createElement("p", null,
|
|
52
78
|
React.createElement("strong", null, t('Request a management escalation if your issue')),
|
|
53
79
|
":"),
|
|
@@ -56,7 +82,7 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
56
82
|
React.createElement(ListItem, null, t('Needs a senior resource.')),
|
|
57
83
|
React.createElement(ListItem, null, t('Is more severe or should be a higher priority.'))),
|
|
58
84
|
commonElements,
|
|
59
|
-
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation'))))));
|
|
85
|
+
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation')))))));
|
|
60
86
|
return (React.createElement(React.Fragment, null,
|
|
61
87
|
React.createElement(RequestEscalationModal, { caseNumber: props.caseNumber, severity: props.caseSeverity, caseStatus: props.caseStatus, show: openRequestEscalationModal, onClose: toggleModal }),
|
|
62
88
|
React.createElement(Can, { do: resourceActions.CREATE, on: resources.ICE_ESCALATION, passThrough: true }, (canCreateICE) => canCreateICE ? isInternalElements : isCreateRMEVisible ? isNotInternalElements : React.createElement(React.Fragment, null))));
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAkBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBA2WnD"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { escalations, publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal,
|
|
11
|
+
import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalFooter, ModalHeader, Popover, TextArea, TextInput, Title, ValidatedOptions, } from '@patternfly/react-core';
|
|
12
12
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
13
13
|
import { AlertMessage, AlertType, LoadingIndicator, SingleSelectDropdown, ToastNotification, useFetch, } from '@rh-support/components';
|
|
14
14
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
@@ -157,39 +157,38 @@ export function RequestEscalationModal(props) {
|
|
|
157
157
|
};
|
|
158
158
|
return (React.createElement(Modal, { id: "request-mgmt-escalation-modal", className: "request-escalation-modal", isOpen: props.show, onClose: onCancel, "aria-label": t('Request an escalation') },
|
|
159
159
|
React.createElement(ModalHeader, null, header),
|
|
160
|
-
React.createElement(
|
|
161
|
-
React.createElement(
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
React.createElement(
|
|
165
|
-
React.createElement(
|
|
166
|
-
React.createElement(
|
|
167
|
-
React.createElement(
|
|
168
|
-
|
|
169
|
-
React.createElement(
|
|
170
|
-
React.createElement(
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
React.createElement(
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
React.createElement(
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
React.createElement(
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
React.createElement(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
: ValidatedOptions.default, placeholder: t('Does your business impact change with this escalation? Please describe how it changed.'), id: "business-impact-input", value: formState.businessImpactDescription, "aria-label": t('Business impact'), resizeOrientation: "vertical" }))))),
|
|
160
|
+
React.createElement("p", { className: "pf-v6-u-mb-md" },
|
|
161
|
+
React.createElement(Trans, { i18nKey: "i18RequestEscalationDescription" }, "Submit an escalation if an issue has become more severe or you feel the case needs a higher priority. A support manager will review your escalation request.")),
|
|
162
|
+
React.createElement(AlertMessage, { variant: AlertType.DANGER, title: t('Could not create case escalation'), show: creationError, onClose: onErrorClose, isInline: true, className: "pf-v6-u-mb-md", "aria-label": t('Could not create case escalation') }),
|
|
163
|
+
React.createElement(Form, { "aria-label": t('form'), className: "request-escalation-form" },
|
|
164
|
+
React.createElement(Grid, { hasGutter: true, md: 12 },
|
|
165
|
+
React.createElement(GridItem, { span: 6 },
|
|
166
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Category'), fieldId: "escalation-category" },
|
|
167
|
+
React.createElement(SingleSelectDropdown, { id: "customer-category-select", ariaLabel: t('Category'), selected: selectedCategory, options: categoryOptions, isDisabled: false, isLoading: isCategoriesFetching, isInvalid: submitButtonIsClicked && isEmpty(formState.rmeCategory), placeholder: t('Select an option that best fits'), onSelect: (option) => setCategoryState(option), isScrollable: true }))),
|
|
168
|
+
React.createElement(GridItem, { span: 6 },
|
|
169
|
+
React.createElement(FormGroup, { isRequired: true, label: t('My region'), fieldId: "escalation-region" },
|
|
170
|
+
React.createElement(SingleSelectDropdown, { ariaLabel: t('My region'), id: "customer-geo-select", selected: selectedGeo, options: geoOptions, isInvalid: submitButtonIsClicked && isEmpty(formState.geo), placeholder: t('Select a location'), onSelect: (option) => setGeoState(option) }))),
|
|
171
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Subject'), fieldId: "escalation-subject" },
|
|
172
|
+
submitButtonIsClicked && hasLargeSubject && (React.createElement(FormHelperText, null,
|
|
173
|
+
React.createElement(HelperText, null,
|
|
174
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Subject cannot be more than {{limit}} characters', {
|
|
175
|
+
limit: ESCALATION_SUBJECT_LENGTH_LIMIT,
|
|
176
|
+
}))))),
|
|
177
|
+
React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked && isEmpty(formState.subject)) || hasLargeSubject
|
|
178
|
+
? ValidatedOptions.error
|
|
179
|
+
: ValidatedOptions.default, type: "text", placeholder: t('Enter a subject for your request'), id: "subject-input", name: "subject-input", value: formState.subject, onChange: (_event, subject) => onSubjectChange(subject), "aria-label": t('Subject') })),
|
|
180
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Description'), fieldId: "escalation-description" },
|
|
181
|
+
React.createElement(TextArea, { value: formState.description, onChange: (e, value) => setFormStateValue('description', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.description)
|
|
182
|
+
? ValidatedOptions.error
|
|
183
|
+
: ValidatedOptions.default, "aria-label": t('Description'), id: "description-textarea", placeholder: t('Provide a detailed comment for us to best assist you'), resizeOrientation: "vertical" })),
|
|
184
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Expectations'), fieldId: "escalation-expectations" },
|
|
185
|
+
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.expectations)
|
|
186
|
+
? ValidatedOptions.error
|
|
187
|
+
: ValidatedOptions.default, placeholder: t('What do you expect to happen with this escalation?'), id: "expectations-input", value: formState.expectations, "aria-label": t('Expectations'), resizeOrientation: "vertical" })),
|
|
188
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Business impact'), fieldId: "escalation-business-impact" },
|
|
189
|
+
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.businessImpactDescription)
|
|
190
|
+
? ValidatedOptions.error
|
|
191
|
+
: ValidatedOptions.default, placeholder: t('Does your business impact change with this escalation? Please describe how it changed.'), id: "business-impact-input", value: formState.businessImpactDescription, "aria-label": t('Business impact'), resizeOrientation: "vertical" })))),
|
|
193
192
|
React.createElement(ModalFooter, null,
|
|
194
193
|
React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, "data-tracking-id": "request-rme-submit", isDisabled: submitButtonIsClicked &&
|
|
195
194
|
(isPostingComment || isUpdatingCase || createEscalationFetch.isFetching || !hasRequiredInfo()), "aria-label": t('Submit') },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,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":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA8Y7C"}
|
|
@@ -51,6 +51,7 @@ export function CaseDetailsAside(props) {
|
|
|
51
51
|
const canCreateRME = ability.can(resourceActions.CREATE, resources.RME_ESCALATION);
|
|
52
52
|
const canCreateICE = ability.can(resourceActions.CREATE, resources.ICE_ESCALATION);
|
|
53
53
|
const canSeeToggleCustomerView = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_TOGGLE_CUSTOMER_VIEW);
|
|
54
|
+
const canViewACESection = canCreateICE || canCreateRME;
|
|
54
55
|
const globalMetadataDispatchContext = useContext(GlobalMetadataDispatchContext);
|
|
55
56
|
const caseDetailsAsidePanelRef = useRef(null);
|
|
56
57
|
const forceUpdate = useForceUpdate();
|
|
@@ -232,5 +233,5 @@ export function CaseDetailsAside(props) {
|
|
|
232
233
|
!isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement section') } },
|
|
233
234
|
React.createElement(RemoteSessionAgreement, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, waitingOnCallback: waitingOnCallback, acceptedRemoteSessionTerms: acceptedRemoteSessionTerms && waitingOnCallback, readOnly: canReadCase }))),
|
|
234
235
|
!caseEscalations.isFetching && isWritePermissionforCase && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading customer escalation section') } },
|
|
235
|
-
React.createElement(ActiveCustomerEscalation, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef })))))));
|
|
236
|
+
React.createElement(ActiveCustomerEscalation, { canViewACESection: canViewACESection, caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef })))))));
|
|
236
237
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAmBA,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,
|
|
1
|
+
{"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAmBA,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,qBAqS5C"}
|
|
@@ -135,6 +135,7 @@ export function CaseDetailsTabs(props) {
|
|
|
135
135
|
component: React.createElement(CaseSummary, { caseNumber: caseNumber }),
|
|
136
136
|
});
|
|
137
137
|
const getActiveTabKey = () => {
|
|
138
|
+
console.warn(activeTab, activeTabKey);
|
|
138
139
|
if (!activeTab)
|
|
139
140
|
return activeTabKey;
|
|
140
141
|
const tabIndex = tabsToRender.findIndex((item) => item.routePath === activeTab);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBA0M5C"}
|
|
@@ -7,7 +7,7 @@ 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 { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal,
|
|
10
|
+
import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalVariant, TextArea, } from '@patternfly/react-core';
|
|
11
11
|
import { SingleSelectDropdown } from '@rh-support/components';
|
|
12
12
|
import { formatDateTime } from '@rh-support/utils';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -82,27 +82,21 @@ export function ReopenCaseModal(props) {
|
|
|
82
82
|
label: selectedStatus,
|
|
83
83
|
value: selectedStatus,
|
|
84
84
|
};
|
|
85
|
-
return (React.createElement(Modal, { className: "case-reopen-modal", id: "case-reopen-modal", "aria-describedby": "case-reopen-modal", isOpen: true, onClose: props.onClose, variant: ModalVariant.medium },
|
|
86
|
-
React.createElement(
|
|
87
|
-
React.createElement(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
? 'error'
|
|
101
|
-
: 'default', isRequired: true, id: "reopen-case-description", name: "reopen-case-description", "aria-describedby": "reopen-case-description", value: reopenDescription, onChange: (_event, text) => onDescriptionChange(text), isDisabled: props.isUpdating, resizeOrientation: "vertical" }),
|
|
102
|
-
React.createElement(FormHelperText, null,
|
|
103
|
-
React.createElement(HelperText, null,
|
|
104
|
-
React.createElement(HelperTextItem, null, t(`Your comment will be visible${props.isInternal ? ' to the customers' : ''} under discussions after reopening.`)))))))),
|
|
105
|
-
React.createElement(ModalFooter, null,
|
|
85
|
+
return (React.createElement(Modal, { className: "case-reopen-modal", id: "case-reopen-modal", title: t(`Reopening case ${props.caseNumber}`), "aria-describedby": "case-reopen-modal", isOpen: true, onClose: props.onClose, variant: ModalVariant.medium },
|
|
86
|
+
React.createElement(Form, { className: "case-reopen-modal-form" },
|
|
87
|
+
(!props.isInternal || !props.reopenStatus) && (React.createElement(FormGroup, { label: t(props.isInternal ? 'Status' : 'Reason'), isRequired: true, fieldId: "case-resolution" },
|
|
88
|
+
showValidationError && (props.isInternal ? !selectedStatus : !selectedReason) && (React.createElement(FormHelperText, null,
|
|
89
|
+
React.createElement(HelperText, null,
|
|
90
|
+
React.createElement(HelperTextItem, { variant: "error" },
|
|
91
|
+
React.createElement(Trans, null, "Required field"))))),
|
|
92
|
+
props.isInternal ? (React.createElement(SingleSelectDropdown, { placeholder: t('Select an option that best fits'), dataTrackingId: "reopen-case-status", options: getStatusDropdownOptions, selected: getSelectedStatusOption, isDisabled: props.isUpdating, isInvalid: showValidationError && !selectedStatus, onSelect: onStatusChange })) : (React.createElement(SingleSelectDropdown, { placeholder: t('Select an option that best fits'), dataTrackingId: "case-resolution", options: getReasonDropdownOptions, selected: getSelectedReasonOption, isDisabled: props.isUpdating, isInvalid: showValidationError && !selectedReason, onSelect: onReasonChange })))),
|
|
93
|
+
showTextArea && (React.createElement(FormGroup, { label: t('Please describe your reason'), type: "text", isRequired: true, fieldId: "reopen-case-description" },
|
|
94
|
+
React.createElement(TextArea, { placeholder: t(props.isInternal
|
|
95
|
+
? 'Describe the reason for reopening with the selected status'
|
|
96
|
+
: 'The better the description, the easier it will be for our support team to address your case.'), validated: showValidationError && isDescriptionEmpty && !reopenDescription ? 'error' : 'default', isRequired: true, id: "reopen-case-description", name: "reopen-case-description", "aria-describedby": "reopen-case-description", value: reopenDescription, onChange: (_event, text) => onDescriptionChange(text), isDisabled: props.isUpdating, resizeOrientation: "vertical" }),
|
|
97
|
+
React.createElement(FormHelperText, null,
|
|
98
|
+
React.createElement(HelperText, null,
|
|
99
|
+
React.createElement(HelperTextItem, null, t(`Your comment will be visible${props.isInternal ? ' to the customers' : ''} under discussions after reopening.`)))))),
|
|
106
100
|
React.createElement("div", { className: "pf-v6-u-pt-md" },
|
|
107
101
|
React.createElement(Button, { key: "submit-description", variant: ButtonVariant.primary, onClick: onSubmit, isLoading: props.isUpdating, isDisabled: isDescriptionEmpty || showValidationError || props.isUpdating, "data-tracking-id": "reopen-case-description-modal-submit" },
|
|
108
102
|
React.createElement(Trans, null, "Reopen case")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"
|
|
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;AACxD,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,qBA4P7C"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import {
|
|
11
|
+
import { Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader } from '@patternfly/react-core';
|
|
12
12
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
13
13
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
14
14
|
import { SingleSelectDropdown, ToastNotification, useFetch } from '@rh-support/components';
|
|
@@ -49,29 +49,28 @@ export function NewEssTermsModal(props) {
|
|
|
49
49
|
translatedInstructions: 'Please read and accept the remote session terms below to allow Red Hat to access your network or systems.',
|
|
50
50
|
translatedTermsName: 'Remote Access Agreement',
|
|
51
51
|
});
|
|
52
|
-
const [
|
|
52
|
+
const [languageOptions, setLanguageOptions] = useState([]);
|
|
53
53
|
const [agreeLoading, setAgreeLoading] = useState(false);
|
|
54
|
-
const [isRemoteSessionForm, setIsRemoteSessionForm] = useState(false);
|
|
55
|
-
const [sessionExpectations, setSessionExpectations] = useState('');
|
|
56
|
-
const [impact, setImpact] = useState('');
|
|
57
|
-
const [sessionLink, setSessionLink] = useState('');
|
|
58
54
|
useEffect(() => {
|
|
59
55
|
const fetchTerms = () => __awaiter(this, void 0, void 0, function* () {
|
|
60
56
|
try {
|
|
61
57
|
const { siteCode, eventCode, loggedInUser } = props;
|
|
62
58
|
const response = yield request(siteCode, eventCode, loggedInUser);
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
59
|
+
let defaultTranslation = response[0].translations[0];
|
|
60
|
+
// Transform translations into dropdown options
|
|
61
|
+
const options = response[0].translations.map((translation) => ({
|
|
62
|
+
value: translation,
|
|
63
|
+
label: getLocaleNameFromLocalCode(translation.localeCode),
|
|
64
|
+
disabled: false,
|
|
65
|
+
}));
|
|
66
|
+
// Find default translation
|
|
67
|
+
response[0].translations.forEach((translation) => {
|
|
68
|
+
if (translation.isDefault) {
|
|
69
|
+
defaultTranslation = translation;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
setSelectedTranslation(defaultTranslation);
|
|
73
|
+
setLanguageOptions(options);
|
|
75
74
|
}
|
|
76
75
|
catch (e) {
|
|
77
76
|
console.log(e);
|
|
@@ -86,39 +85,17 @@ export function NewEssTermsModal(props) {
|
|
|
86
85
|
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
87
86
|
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
88
87
|
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
89
|
-
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
90
|
-
const updateImpact = (event, value) => setImpact(value);
|
|
91
|
-
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
92
88
|
// To handle modal cancel and close
|
|
93
89
|
const onCancel = () => {
|
|
94
|
-
if (agreeLoading || isPostingComment)
|
|
95
|
-
return;
|
|
96
|
-
setIsTermsChecked(false);
|
|
97
|
-
setSessionExpectations('');
|
|
98
|
-
setImpact('');
|
|
99
|
-
setSessionLink('');
|
|
100
|
-
setIsRemoteSessionForm(false);
|
|
101
90
|
props.onClose && props.onClose();
|
|
102
91
|
};
|
|
103
|
-
const languageOptions = Object.keys(allTranslations).map((option) => ({
|
|
104
|
-
value: option,
|
|
105
|
-
label: getLocaleNameFromLocalCode(option),
|
|
106
|
-
}));
|
|
107
|
-
// Create selected option object based on current selection
|
|
108
|
-
const selectedLanguage = {
|
|
109
|
-
value: selectedTranslation.localeCode,
|
|
110
|
-
label: selectedTranslation.localeCode
|
|
111
|
-
? getLocaleNameFromLocalCode(selectedTranslation.localeCode)
|
|
112
|
-
: t('Select an option that best fits'),
|
|
113
|
-
};
|
|
114
92
|
// Function to ack remote session terms and post comment
|
|
115
93
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
116
|
-
const requestComment = t(
|
|
94
|
+
const requestComment = t('Submitted a remote session request.');
|
|
117
95
|
try {
|
|
118
96
|
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
119
97
|
remoteSessionTermsAcked: true,
|
|
120
98
|
screenSessionRequested: true,
|
|
121
|
-
waitingOnCallback: true,
|
|
122
99
|
});
|
|
123
100
|
try {
|
|
124
101
|
yield postCommentRequest({
|
|
@@ -157,7 +134,6 @@ export function NewEssTermsModal(props) {
|
|
|
157
134
|
}
|
|
158
135
|
}
|
|
159
136
|
});
|
|
160
|
-
const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
|
|
161
137
|
// To handle submit
|
|
162
138
|
const onSubmit = () => {
|
|
163
139
|
setAgreeLoading(true);
|
|
@@ -168,65 +144,46 @@ export function NewEssTermsModal(props) {
|
|
|
168
144
|
setIsTermsChecked(value);
|
|
169
145
|
};
|
|
170
146
|
// Handle language change
|
|
171
|
-
const
|
|
172
|
-
setSelectedTranslation(
|
|
147
|
+
const onLanguageSelect = (option) => {
|
|
148
|
+
setSelectedTranslation(option.value);
|
|
173
149
|
};
|
|
174
150
|
// To check and if I agree button is loading
|
|
175
151
|
const isAgreeLoading = agreeLoading || isPostingComment;
|
|
176
|
-
const modalActions = [
|
|
177
|
-
React.createElement(Button, { key: "submit", "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm ? onSubmit : toggleRemoteSessionForm, "data-tracking-id": "remote-session-agreement-check", isLoading: isAgreeLoading, isDisabled: !isTermsChecked || isAgreeLoading }, t('Submit')),
|
|
178
|
-
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel }, "Cancel"),
|
|
179
|
-
];
|
|
180
|
-
const renderRemoteSessionForm = (React.createElement("div", { id: "remoteSessionForm", className: "form-group" },
|
|
181
|
-
React.createElement(Alert, { variant: "info", isInline: true, title: React.createElement(React.Fragment, null,
|
|
182
|
-
"What is a Remote Support Session and how to acknowledge the Remote Access Rider?",
|
|
183
|
-
' ',
|
|
184
|
-
React.createElement("a", { href: "https://access.redhat.com/articles/3566571", target: "_blank", rel: "noopener noreferrer" }, "Read more.")) }),
|
|
185
|
-
React.createElement("div", null,
|
|
186
|
-
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
187
|
-
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
188
|
-
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
189
|
-
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })),
|
|
190
|
-
React.createElement("div", null,
|
|
191
|
-
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
192
|
-
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
193
|
-
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
194
|
-
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })),
|
|
195
|
-
React.createElement("div", null,
|
|
196
|
-
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
197
|
-
React.createElement(Trans, null, "Remote session link (optional)")),
|
|
198
|
-
React.createElement(TextInput, { value: sessionLink, onChange: updateSessionLink, type: "text", "aria-label": "Remote session link" }),
|
|
199
|
-
React.createElement("p", { className: "form-instructions" }, "If not provided, the Red Hat Support Associate will share a link with you."))));
|
|
200
|
-
const renderRemoteSessionAgreement = (React.createElement("div", { id: "remoteSessionAgreement" },
|
|
201
|
-
React.createElement("p", { className: "pf-v6-u-mt-xs" },
|
|
202
|
-
React.createElement(Trans, null,
|
|
203
|
-
"Your acceptance of this remote session agreement is required ",
|
|
204
|
-
React.createElement("strong", null, "for each case"),
|
|
205
|
-
" when you request Red Hat\u2019s support team to directly access your network or systems.")),
|
|
206
|
-
React.createElement("p", { className: "pf-v6-u-mt-md" },
|
|
207
|
-
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.")),
|
|
208
|
-
React.createElement("p", { className: "pf-v6-u-mt-md" },
|
|
209
|
-
React.createElement(Trans, null, "Please read and accept the remote session terms below to allow Red Hat to access your network or systems.")),
|
|
210
|
-
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-align-items-center pf-v6-u-flex-wrap" },
|
|
211
|
-
React.createElement(SingleSelectDropdown, { className: "pf-v6-u-mt-md", "aria-label": t('Select language'), id: "terms-language-selector", selected: selectedLanguage, onSelect: (option) => onLangChange(option), placeholder: t('Select an option that best fits'), toggleClassName: "pf-v6-u-w-50", options: languageOptions }),
|
|
212
|
-
React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-v6-u-ml-md pf-v6-u-display-inline-flex pf-v6-u-align-items-center", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
|
|
213
|
-
t('Download'),
|
|
214
|
-
" ",
|
|
215
|
-
React.createElement(DownloadIcon, { className: "pf-v6-u-ml-xs" }))),
|
|
216
|
-
React.createElement("div", null,
|
|
217
|
-
React.createElement(Checkbox, { className: "pf-v6-u-mt-md rsa-checkbox", id: "terms-accept-checkbox", label: React.createElement(React.Fragment, null,
|
|
218
|
-
React.createElement(Trans, null, "I have read and agree to the"),
|
|
219
|
-
' ',
|
|
220
|
-
React.createElement("a", { className: "pf-v6-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" },
|
|
221
|
-
React.createElement(Trans, null, "terms "),
|
|
222
|
-
React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))));
|
|
223
152
|
// Body of ESS RSA Modal
|
|
224
153
|
const EssRSAModalBody = () => {
|
|
225
|
-
|
|
154
|
+
const currentSelection = {
|
|
155
|
+
value: selectedTranslation,
|
|
156
|
+
label: getLocaleNameFromLocalCode(selectedTranslation.localeCode),
|
|
157
|
+
disabled: false,
|
|
158
|
+
};
|
|
159
|
+
return (React.createElement(React.Fragment, null,
|
|
160
|
+
React.createElement("p", { className: "pf-v6-u-mt-xs" },
|
|
161
|
+
React.createElement(Trans, null,
|
|
162
|
+
"Your acceptance of this remote session agreement is required ",
|
|
163
|
+
React.createElement("strong", null, "for each case"),
|
|
164
|
+
" when you request Red Hat\u2019s support team to directly access your network or systems.")),
|
|
165
|
+
React.createElement("p", { className: "pf-v6-u-mt-md" },
|
|
166
|
+
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.")),
|
|
167
|
+
React.createElement("p", { className: "pf-v6-u-mt-md" },
|
|
168
|
+
React.createElement(Trans, null, "Please read and accept the remote session terms below to allow Red Hat to access your network or systems.")),
|
|
169
|
+
React.createElement("div", null,
|
|
170
|
+
React.createElement(SingleSelectDropdown, { className: "terms-language-selector pf-v6-u-mt-md", id: "terms-language-selector", selected: currentSelection, options: languageOptions, placeholder: t('Select an option that best fits'), onSelect: onLanguageSelect, ariaLabel: t('Select language') }),
|
|
171
|
+
React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-v6-u-ml-md", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
|
|
172
|
+
t('Download'),
|
|
173
|
+
" ",
|
|
174
|
+
React.createElement(DownloadIcon, { className: "pf-v6-u-ml-xs" }))),
|
|
175
|
+
React.createElement("div", null,
|
|
176
|
+
React.createElement(Checkbox, { className: "pf-v6-u-mt-md rsa-checkbox", id: "terms-accept-checkbox", label: React.createElement(React.Fragment, null,
|
|
177
|
+
React.createElement(Trans, null, "I have read and agree to the"),
|
|
178
|
+
' ',
|
|
179
|
+
React.createElement("a", { className: "pf-v6-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" },
|
|
180
|
+
React.createElement(Trans, null, "terms "),
|
|
181
|
+
React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))));
|
|
226
182
|
};
|
|
227
|
-
return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label":
|
|
183
|
+
return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": t('Remote Session Agreement'), isOpen: props.show, onClose: onCancel },
|
|
228
184
|
React.createElement(ModalHeader, null,
|
|
229
|
-
React.createElement("h2", null,
|
|
185
|
+
React.createElement("h2", null, t('Remote Session Agreement'))),
|
|
230
186
|
React.createElement(ModalBody, null, EssRSAModalBody()),
|
|
231
|
-
React.createElement(ModalFooter, null,
|
|
187
|
+
React.createElement(ModalFooter, null,
|
|
188
|
+
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')))));
|
|
232
189
|
}
|
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":"
|
|
1
|
+
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAeA,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,qBAqWxD"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Alert, Button, ButtonVariant, Checkbox, Modal,
|
|
11
|
+
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalFooter, TextArea, TextInput, } from '@patternfly/react-core';
|
|
12
12
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
13
13
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
14
14
|
import { SingleSelectDropdown, ToastNotification, useFetch } from '@rh-support/components';
|
|
@@ -64,18 +64,16 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
64
64
|
try {
|
|
65
65
|
const { siteCode, eventCode, loggedInUser } = props;
|
|
66
66
|
const response = yield request(siteCode, eventCode, loggedInUser);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
setAllTranslations(translationLangInfoMap);
|
|
78
|
-
}
|
|
67
|
+
let defaultTranslation = response[0].translations[0];
|
|
68
|
+
const translationLangInfoMap = response[0].translations.reduce((allTranslationsmap, translation) => {
|
|
69
|
+
if (translation.isDefault) {
|
|
70
|
+
defaultTranslation = translation;
|
|
71
|
+
}
|
|
72
|
+
allTranslationsmap[translation['localeCode']] = translation;
|
|
73
|
+
return allTranslationsmap;
|
|
74
|
+
}, {});
|
|
75
|
+
setSelectedTranslation(defaultTranslation);
|
|
76
|
+
setAllTranslations(translationLangInfoMap);
|
|
79
77
|
}
|
|
80
78
|
catch (e) {
|
|
81
79
|
console.log(e);
|
|
@@ -201,7 +199,7 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
201
199
|
React.createElement("p", { className: "pf-v6-u-mt-md" },
|
|
202
200
|
React.createElement(Trans, null, "Please read and accept the remote session terms below to allow Red Hat to access your network or systems.")),
|
|
203
201
|
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-align-items-center pf-v6-u-flex-wrap" },
|
|
204
|
-
React.createElement(SingleSelectDropdown, { id: "terms-language-selector", ariaLabel: t('Select language'), selected: selectedLanguage, options: languageOptions, isDisabled: false, placeholder: t('Select an option that best fits'), onSelect: (option) => onLangChange(option), toggleClassName: "pf-v6-u-w-50" }),
|
|
202
|
+
React.createElement(SingleSelectDropdown, { id: "terms-language-selector", ariaLabel: t('Select language'), selected: selectedLanguage, options: languageOptions, isDisabled: false, placeholder: t('Select an option that best fits'), onSelect: (option) => onLangChange(option), className: "pf-v6-u-mt-md", toggleClassName: "pf-v6-u-w-50" }),
|
|
205
203
|
React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-v6-u-ml-md pf-v6-u-display-inline-flex pf-v6-u-align-items-center", href: selectedTranslation.pdfDownloadUrl, rel: "noopener noreferrer", target: "_blank" },
|
|
206
204
|
t('Download'),
|
|
207
205
|
" ",
|
|
@@ -218,13 +216,11 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
218
216
|
return isRemoteSessionForm || remoteSessionTermsAcked ? renderRemoteSessionForm : renderRemoteSessionAgreement;
|
|
219
217
|
};
|
|
220
218
|
return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": isRemoteSessionForm || remoteSessionTermsAcked
|
|
219
|
+
? t('Request remote session')
|
|
220
|
+
: t('Remote session agreement'), title: isRemoteSessionForm || remoteSessionTermsAcked
|
|
221
221
|
? t('Request remote session')
|
|
222
222
|
: t('Remote session agreement'), isOpen: props.show, onClose: onCancel },
|
|
223
|
-
|
|
224
|
-
React.createElement("h2", null, isRemoteSessionForm || remoteSessionTermsAcked
|
|
225
|
-
? t('Request remote session')
|
|
226
|
-
: t('Remote session agreement'))),
|
|
227
|
-
React.createElement(ModalBody, null, RemoteSessionAgreementModalBody()),
|
|
223
|
+
RemoteSessionAgreementModalBody(),
|
|
228
224
|
React.createElement(ModalFooter, null,
|
|
229
225
|
React.createElement(Button, { "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm || remoteSessionTermsAcked ? onSubmit : toggleRemoteSessionForm, "data-tracking-id": isRemoteSessionForm || remoteSessionTermsAcked
|
|
230
226
|
? 'remote-session-details-submission'
|