@rh-support/troubleshoot 2.7.1 → 2.32.2-prodBackup
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/AccountInfo/AccountSelector.js +4 -4
- package/lib/esm/components/AccountInfo/ManagedAccountsDropdown.js +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +38 -33
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +70 -58
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +50 -14
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +45 -30
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +7 -16
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/DateTime.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/DateTime.js +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +10 -9
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +28 -23
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
- package/lib/esm/components/CaseEditView/CaseSolutions/HandpicketItem.js +3 -3
- package/lib/esm/components/CaseEditView/CaseSubscriptionAbuseAlert.js +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +51 -35
- package/lib/esm/components/CaseEditView/PDFContainer.js +19 -15
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.js +33 -16
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +13 -16
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +50 -42
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.js +33 -16
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +53 -48
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +3 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +7 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftPopover.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenShiftV3Popover.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +5 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +3 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/SFDCUrl.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/SFDCUrl.js +3 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts +1 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +2 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseChat.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +19 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseExternalTrackerUpdate.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +2 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +6 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +26 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +27 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +5 -8
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +4 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummaryErrorMessage.js +4 -6
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RelatedTasks/RelatedTasks.js +2 -3
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +1 -2
- package/lib/esm/components/CaseInformation/CaseInformation.js +3 -3
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +1 -1
- package/lib/esm/components/CaseInformation/Description.js +4 -4
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +8 -8
- package/lib/esm/components/CaseInformation/OpenCaseIssue.js +2 -2
- package/lib/esm/components/CaseInformation/Severity.js +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +16 -10
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +14 -11
- package/lib/esm/components/CaseManagement/CaseManagement.js +4 -4
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +44 -41
- package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/ESSRemoteSessionCheckBox.js +50 -42
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +39 -63
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -3
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +80 -46
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +8 -6
- package/lib/esm/components/CaseManagement/SendNotifications/AddContactToGroupModal.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddContactToGroupModal.js +8 -8
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/AddCustomEmailToAccountModal.js +19 -21
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +11 -8
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +55 -21
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +12 -27
- package/lib/esm/components/ConfirmationModals/PreferredSecureSupportModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/PreferredSecureSupportModal.js +1 -1
- package/lib/esm/components/Cve/CveItem.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveItem.js +10 -11
- package/lib/esm/components/Cve/CveModal.d.ts.map +1 -1
- package/lib/esm/components/Cve/CveModal.js +11 -11
- package/lib/esm/components/Cve/CvePanel.d.ts.map +1 -1
- package/lib/esm/components/Cve/CvePanel.js +3 -3
- package/lib/esm/components/Cve/CveSidebar.js +2 -2
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +7 -7
- package/lib/esm/components/ImproveCase/KtQuestions.js +6 -6
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +6 -13
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +12 -8
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +83 -47
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +14 -10
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +4 -4
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +6 -4
- package/lib/esm/components/Recommendations/ClusterRecommendationItems.js +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationsModal.js +10 -11
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +6 -4
- package/lib/esm/components/Recommendations/EARules/EARuleInfoInline.js +7 -7
- package/lib/esm/components/Recommendations/InsightsResults.js +2 -2
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +23 -16
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RecommendationFeedbackModal.js +7 -7
- package/lib/esm/components/Recommendations/RecommendationInfoBox.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RecommendationInfoBox.js +7 -7
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +23 -20
- package/lib/esm/components/Recommendations/RecommendationsLoader.js +1 -1
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +10 -12
- package/lib/esm/components/Recommendations/WatsonxAiIcon.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/WatsonxAiIcon.js +9 -10
- package/lib/esm/components/RemoteRider/RemoteRiderBanner.js +1 -1
- package/lib/esm/components/Review/Review.js +4 -4
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/RestoreLastSessionModal.js +7 -5
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
- package/lib/esm/components/SessionRestore/SessionRestoreCard.js +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +21 -21
- package/lib/esm/components/Suggestions/Suggestions.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/Suggestions.js +19 -14
- package/lib/esm/components/Suggestions/TopContent.d.ts.map +1 -1
- package/lib/esm/components/Suggestions/TopContent.js +16 -16
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +13 -14
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +20 -16
- package/lib/esm/components/shared/Rule.js +6 -6
- package/lib/esm/components/shared/fileUpload/FileLister.js +6 -6
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +7 -6
- package/lib/esm/components/shared/fileUpload/common/FileUploaderInfoIcon.js +1 -1
- package/lib/esm/components/shared/fileUpload/css/fileSelector.css +2 -0
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.js +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelector.js +4 -4
- package/lib/esm/components/shared/fileUpload/fileSelectors/WidgetFileSelectorImage.js +2 -2
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts +16 -6
- package/lib/esm/components/shared/input/ContactSelectorInternal.d.ts.map +1 -1
- package/lib/esm/components/shared/input/ContactSelectorInternal.js +133 -23
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +60 -4
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +8 -2
- package/lib/esm/components/wizardLayout/MainSection.js +2 -2
- package/lib/esm/components/wizardLayout/NewFeatureModal.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/NewFeatureModal.js +6 -6
- package/lib/esm/components/wizardLayout/WizardAside.js +3 -3
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +62 -19
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts +2 -2
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +21 -22
- package/lib/esm/css/app.css +18 -17
- package/lib/esm/css/case.css +62 -22
- package/lib/esm/css/results.css +2 -2
- package/lib/esm/hooks/useWizard.d.ts.map +1 -1
- package/lib/esm/hooks/useWizard.js +1 -3
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +2 -2
- package/lib/esm/reducers/RouteConstNTypes.d.ts +1 -2
- package/lib/esm/reducers/RouteConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/RouteConstNTypes.js +2 -0
- package/lib/esm/reducers/RulesReducer.d.ts.map +1 -1
- package/lib/esm/scss/_main.scss +251 -94
- package/lib/esm/scss/_pf-overrides.scss +186 -149
- package/package.json +11 -11
|
@@ -7,10 +7,11 @@ 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, ModalVariant, TextArea, } from '@patternfly/react-core';
|
|
11
|
-
import {
|
|
10
|
+
import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, TextArea, } from '@patternfly/react-core';
|
|
11
|
+
import { SingleSelectDropdown } from '@rh-support/components';
|
|
12
12
|
import { formatDateTime } from '@rh-support/utils';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
14
|
+
import map from 'lodash/map';
|
|
14
15
|
import React, { useState } from 'react';
|
|
15
16
|
import { Trans, useTranslation } from 'react-i18next';
|
|
16
17
|
import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
|
|
@@ -21,11 +22,9 @@ export function ReopenCaseModal(props) {
|
|
|
21
22
|
const { t } = useTranslation();
|
|
22
23
|
const [reopenDescription, setReopenDescription] = useState('');
|
|
23
24
|
const [selectedReason, setSelectedReason] = useState('');
|
|
24
|
-
const [showDropdown, setShowDropdown] = useState(false);
|
|
25
25
|
const [showTextArea, setShowTextArea] = useState(props.isInternal);
|
|
26
26
|
const [showValidationError, setShowValidationError] = useState(false);
|
|
27
27
|
const [selectedStatus, setSelectedStatus] = useState('');
|
|
28
|
-
const onDropdownToggle = (toggle) => setShowDropdown(toggle);
|
|
29
28
|
const onDescriptionChange = (text) => {
|
|
30
29
|
setShowValidationError(false);
|
|
31
30
|
setReopenDescription(text);
|
|
@@ -57,40 +56,57 @@ export function ReopenCaseModal(props) {
|
|
|
57
56
|
let submissionDate = new Date();
|
|
58
57
|
props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || CaseStatusEnum.WAITING_ON_REDHAT, submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
|
|
59
58
|
});
|
|
60
|
-
const onReasonChange = (
|
|
61
|
-
setSelectedReason(
|
|
59
|
+
const onReasonChange = (option) => {
|
|
60
|
+
setSelectedReason(option.value);
|
|
62
61
|
setShowValidationError(false);
|
|
63
|
-
reasonWithDescription.includes(
|
|
64
|
-
onDropdownToggle(false);
|
|
62
|
+
reasonWithDescription.includes(option.value) ? setShowTextArea(true) : setShowTextArea(false);
|
|
65
63
|
};
|
|
66
|
-
const onStatusChange = (
|
|
64
|
+
const onStatusChange = (option) => {
|
|
67
65
|
setShowValidationError(false);
|
|
68
|
-
setSelectedStatus(
|
|
69
|
-
onDropdownToggle(false);
|
|
66
|
+
setSelectedStatus(option.value);
|
|
70
67
|
};
|
|
71
68
|
const isDescriptionEmpty = showTextArea ? isEmpty(reopenDescription === null || reopenDescription === void 0 ? void 0 : reopenDescription.trim()) : false;
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
React.createElement(
|
|
94
|
-
React.createElement(
|
|
95
|
-
React.createElement(
|
|
69
|
+
const getReasonDropdownOptions = map(reasonsList, (option) => ({
|
|
70
|
+
label: option,
|
|
71
|
+
value: option,
|
|
72
|
+
}));
|
|
73
|
+
const getStatusDropdownOptions = map(props.allStatuses.filter((status) => status !== CaseStatusEnum.CLOSED), (option) => ({
|
|
74
|
+
label: option,
|
|
75
|
+
value: option,
|
|
76
|
+
}));
|
|
77
|
+
const getSelectedReasonOption = {
|
|
78
|
+
label: selectedReason,
|
|
79
|
+
value: selectedReason,
|
|
80
|
+
};
|
|
81
|
+
const getSelectedStatusOption = {
|
|
82
|
+
label: selectedStatus,
|
|
83
|
+
value: selectedStatus,
|
|
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(ModalHeader, null,
|
|
87
|
+
React.createElement("h2", null, t(`Reopening case ${props.caseNumber}`))),
|
|
88
|
+
React.createElement(ModalBody, null,
|
|
89
|
+
React.createElement(Form, { className: "case-reopen-modal-form" },
|
|
90
|
+
(!props.isInternal || !props.reopenStatus) && (React.createElement(FormGroup, { label: t(props.isInternal ? 'Status' : 'Reason'), isRequired: true, fieldId: "case-resolution" },
|
|
91
|
+
showValidationError && (props.isInternal ? !selectedStatus : !selectedReason) && (React.createElement(FormHelperText, null,
|
|
92
|
+
React.createElement(HelperText, null,
|
|
93
|
+
React.createElement(HelperTextItem, { variant: "error" },
|
|
94
|
+
React.createElement(Trans, null, "Required field"))))),
|
|
95
|
+
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 })))),
|
|
96
|
+
showTextArea && (React.createElement(FormGroup, { label: t('Please describe your reason'), type: "text", isRequired: true, fieldId: "reopen-case-description" },
|
|
97
|
+
React.createElement(TextArea, { placeholder: t(props.isInternal
|
|
98
|
+
? 'Describe the reason for reopening with the selected status'
|
|
99
|
+
: 'The better the description, the easier it will be for our support team to address your case.'), validated: showValidationError && isDescriptionEmpty && !reopenDescription
|
|
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,
|
|
106
|
+
React.createElement("div", { className: "pf-v6-u-pt-md" },
|
|
107
|
+
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
|
+
React.createElement(Trans, null, "Reopen case")),
|
|
109
|
+
' ',
|
|
110
|
+
React.createElement(Button, { key: "close-modal", variant: ButtonVariant.secondary, onClick: props.onClose, isDisabled: props.isUpdating, "data-tracking-id": "reopen-case-description-modal-cancel" },
|
|
111
|
+
React.createElement(Trans, null, "Cancel"))))));
|
|
96
112
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, Modal, ModalVariant } from '@patternfly/react-core';
|
|
1
|
+
import { Button, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
|
|
2
2
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
3
3
|
import { savePDF } from '@progress/kendo-react-pdf';
|
|
4
4
|
import React, { useRef, useState } from 'react';
|
|
@@ -46,7 +46,7 @@ export function PDFContainer(props) {
|
|
|
46
46
|
setValues(Object.assign(Object.assign({}, values), { [event.target.name]: event.target.value }));
|
|
47
47
|
}
|
|
48
48
|
function exportPDFButton(caseNumber) {
|
|
49
|
-
return (React.createElement(Button, { title:
|
|
49
|
+
return (React.createElement(Button, { title: t('Export as PDF'), variant: "link", isInline: true, className: isExportingPDF ? 'hide-in-pdf' : '', "data-tracking-id": "export-case-as-pdf", onClick: openModal(caseNumber), disabled: isExportingPDF, icon: React.createElement(DownloadIcon, null), iconPosition: "right" },
|
|
50
50
|
React.createElement(Trans, null, "Export")));
|
|
51
51
|
}
|
|
52
52
|
const exportToPDF = () => {
|
|
@@ -73,20 +73,24 @@ export function PDFContainer(props) {
|
|
|
73
73
|
}, 500);
|
|
74
74
|
};
|
|
75
75
|
return (React.createElement(React.Fragment, null,
|
|
76
|
-
React.createElement(Modal, { variant: ModalVariant.small, title: t('Export PDF'),
|
|
76
|
+
React.createElement(Modal, { variant: ModalVariant.small, title: t('Export PDF'), isOpen: showModal, onClose: handleModalToggle },
|
|
77
|
+
React.createElement(ModalHeader, null,
|
|
78
|
+
React.createElement("h2", { className: "pf-v6-u-m-0" }, t('Export PDF'))),
|
|
79
|
+
React.createElement(ModalBody, null,
|
|
80
|
+
React.createElement("p", { className: "pf-v6-u-mb-md pf-v6-u-text-color-subtle" }, t('Select a version to download.')),
|
|
81
|
+
React.createElement("form", { action: "", onSubmit: handleFormConfirmAction },
|
|
82
|
+
React.createElement("fieldset", { className: "form-group radios", role: "radiogroup", "aria-labelledby": "", "data-role": "controlgroup" },
|
|
83
|
+
React.createElement("legend", { id: "group_label_1" },
|
|
84
|
+
React.createElement(Trans, null, "Case discussions:")),
|
|
85
|
+
React.createElement("label", { className: "radio-inline", htmlFor: "reduced" },
|
|
86
|
+
React.createElement("input", { type: "radio", id: "reduced", name: "pdfOption", value: "Reduced", "data-tracking-id": "export-case-as-pdf-no-discussion", checked: values.pdfOption === 'Reduced', required: true, onChange: handleChange }),
|
|
87
|
+
React.createElement(Trans, null, "No discussions")),
|
|
88
|
+
React.createElement("label", { className: "radio-inline", htmlFor: "original" },
|
|
89
|
+
React.createElement("input", { type: "radio", id: "original", name: "pdfOption", value: "Original", "data-tracking-id": "export-case-as-pdf-all-discussion", checked: values.pdfOption === 'Original', required: true, onChange: handleChange }),
|
|
90
|
+
React.createElement(Trans, null, "All"))))),
|
|
91
|
+
React.createElement(ModalFooter, null,
|
|
77
92
|
React.createElement(Button, { key: "confirm", "data-tracking-id": "export-case-as-pdf-confirm", variant: "primary", onClick: handleButtonConfirmAction }, "Confirm"),
|
|
78
|
-
React.createElement(Button, { key: "cancel", "data-tracking-id": "export-case-as-pdf-cancel", variant: "link", onClick: handleModalToggle }, "Cancel"),
|
|
79
|
-
] },
|
|
80
|
-
React.createElement("form", { action: "", onSubmit: handleFormConfirmAction },
|
|
81
|
-
React.createElement("fieldset", { className: "form-group radios", role: "radiogroup", "aria-labelledby": "", "data-role": "controlgroup" },
|
|
82
|
-
React.createElement("legend", { id: "group_label_1" },
|
|
83
|
-
React.createElement(Trans, null, "Case discussions:")),
|
|
84
|
-
React.createElement("label", { className: "radio-inline", htmlFor: "reduced" },
|
|
85
|
-
React.createElement("input", { type: "radio", id: "reduced", name: "pdfOption", value: "Reduced", "data-tracking-id": "export-case-as-pdf-no-discussion", checked: values.pdfOption === 'Reduced', required: true, onChange: handleChange }),
|
|
86
|
-
React.createElement(Trans, null, "No discussions")),
|
|
87
|
-
React.createElement("label", { className: "radio-inline", htmlFor: "original" },
|
|
88
|
-
React.createElement("input", { type: "radio", id: "original", name: "pdfOption", value: "Original", "data-tracking-id": "export-case-as-pdf-all-discussion", checked: values.pdfOption === 'Original', required: true, onChange: handleChange }),
|
|
89
|
-
React.createElement(Trans, null, "All"))))),
|
|
93
|
+
React.createElement(Button, { key: "cancel", "data-tracking-id": "export-case-as-pdf-cancel", variant: "link", onClick: handleModalToggle }, "Cancel"))),
|
|
90
94
|
React.createElement(PDFContext.Provider, { value: { isExportingPDF, exportPDFButton, pdfOption: values.pdfOption } },
|
|
91
95
|
React.createElement("section", { ref: pdfRef }, props.children))));
|
|
92
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ESSRemoteSession.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSession.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,eAAO,MAAM,gBAAgB,+EAyH3B,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Button, List, ListItem, Popover, Tooltip } from '@patternfly/react-core';
|
|
1
|
+
import { Button, Card, CardBody, CardHeader, List, ListItem, Popover, Tooltip } from '@patternfly/react-core';
|
|
2
2
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
3
|
+
import LockIcon from '@patternfly/react-icons/dist/js/icons/lock-icon';
|
|
3
4
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
4
5
|
import { TncConstants } from '@rh-support/utils';
|
|
5
6
|
import React, { forwardRef, useContext, useRef, useState } from 'react';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
7
8
|
import { NewEssTermsModal } from './NewEssTermsModal';
|
|
8
9
|
export const ESSRemoteSession = forwardRef((props, ref) => {
|
|
9
10
|
const tooltipRef = useRef();
|
|
@@ -11,6 +12,8 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
|
|
|
11
12
|
const canEditCase = useCanEditCase();
|
|
12
13
|
const { caseNumber, caseStatus, readOnly, waitingOnCallback } = props;
|
|
13
14
|
const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
15
|
+
const isExternal = loggedInUserRights.data.isExternal();
|
|
16
|
+
const isInternal = loggedInUserRights.data.isInternal();
|
|
14
17
|
const [openNewESSRemoteSessionModal, setOpenNewESSRemoteSessionModal] = useState(false);
|
|
15
18
|
// To toggle New ESS RS Modal
|
|
16
19
|
const toggleNewESSRemoteSessionModal = () => {
|
|
@@ -19,20 +22,34 @@ export const ESSRemoteSession = forwardRef((props, ref) => {
|
|
|
19
22
|
setOpenNewESSRemoteSessionModal((openNewESSRemoteSessionModal) => !openNewESSRemoteSessionModal);
|
|
20
23
|
};
|
|
21
24
|
// ESS RS Aside Section Body
|
|
22
|
-
const ESSRemoteSessionSectionBody = (React.createElement(
|
|
23
|
-
React.createElement(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
React.createElement(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
const ESSRemoteSessionSectionBody = (React.createElement(Card, { className: "card-support escalations", ref: ref },
|
|
26
|
+
React.createElement(CardHeader, null,
|
|
27
|
+
React.createElement("h3", { className: "card-heading case-detail-panel-card-heading pf-v6-u-display-flex pf-v6-u-justify-content-space-between" },
|
|
28
|
+
t('Remote session request'),
|
|
29
|
+
React.createElement(Popover, { "aria-label": t('Remote Session Helper Info'), bodyContent: t('Before Red Hat logs into your systems to analyze your support issue during a remote session, Red Hat needs your approval and authorization for such remote access'), footerContent: React.createElement("a", { href: "/articles/3566571", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Read more about remote sessions') }, t('Read more about remote sessions')) },
|
|
30
|
+
React.createElement(InfoCircleIcon, null)))),
|
|
31
|
+
React.createElement(CardBody, null,
|
|
32
|
+
isInternal && (React.createElement(React.Fragment, null,
|
|
33
|
+
React.createElement("p", null,
|
|
34
|
+
React.createElement(LockIcon, null),
|
|
35
|
+
" ",
|
|
36
|
+
React.createElement("strong", null, `${t('Available to customers only')}`)),
|
|
37
|
+
React.createElement("p", null,
|
|
38
|
+
React.createElement(Trans, null,
|
|
39
|
+
"Available to customers only. If requested and agreed upon, a remote session will be scheduled and confirmed in a case comment. Refer to the",
|
|
40
|
+
' ',
|
|
41
|
+
React.createElement("a", { href: "https://access.redhat.com/articles/3566571", target: "_blank", rel: "noreferrer" }, "Remote session guide"),
|
|
42
|
+
' ',
|
|
43
|
+
"for details.")))),
|
|
44
|
+
isExternal && (React.createElement(React.Fragment, null,
|
|
45
|
+
React.createElement("p", null,
|
|
46
|
+
React.createElement("strong", null, `${t('Red Hat may agree to remotely access your systems if:')}`)),
|
|
47
|
+
React.createElement(List, { className: "pf-v6-u-pl-xl" },
|
|
48
|
+
React.createElement(ListItem, null, t('Such access will help diagnose and have greater understanding into the issue.')),
|
|
49
|
+
React.createElement(ListItem, null, t('Agreed upon by both Red Hat and you, the end user'))),
|
|
50
|
+
React.createElement("p", { className: "rrs-light-grey-text" }, t('Red Hat will add a comment to your case to schedule your remote session.')),
|
|
51
|
+
waitingOnCallback && (React.createElement(Tooltip, { content: t('Remote session has already been requested.'), triggerRef: tooltipRef, "aria-live": 'polite' })),
|
|
52
|
+
React.createElement(Button, { "aria-label": waitingOnCallback ? t('Remote session requested') : t('Request remote session'), variant: waitingOnCallback ? 'primary' : 'secondary', onClick: toggleNewESSRemoteSessionModal, "data-tracking-id": "accept-remote-session-agreement-trigger", isAriaDisabled: waitingOnCallback, ref: tooltipRef, className: "remote-session-button" }, waitingOnCallback ? t('Remote session requested') : t('Request remote session')))))));
|
|
36
53
|
return (React.createElement(React.Fragment, null,
|
|
37
54
|
ESSRemoteSessionSectionBody,
|
|
38
55
|
React.createElement(NewEssTermsModal, { caseNumber: caseNumber, caseStatus: caseStatus, show: openNewESSRemoteSessionModal, onClose: toggleNewESSRemoteSessionModal, siteCode: TncConstants.REMOTE_RIDER_SITE_CODE, eventCode: TncConstants.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername === undefined ? '' : loggedInUser.data.ssoUsername, loggedInUserRights: loggedInUserRights, readOnly: readOnly })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ESSRemoteSessionModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ESSRemoteSessionModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgBxC,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,qBAsKlD"}
|
|
@@ -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 { Button, ButtonVariant, Icon, Modal, ModalVariant, Title, TitleSizes } from '@patternfly/react-core';
|
|
11
|
+
import { Button, ButtonVariant, Icon, Modal, ModalFooter, ModalHeader, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
|
|
12
12
|
import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
|
|
13
13
|
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
14
14
|
import React, { useState } from 'react';
|
|
@@ -79,31 +79,28 @@ export function ESSRemoteSessionModal(props) {
|
|
|
79
79
|
};
|
|
80
80
|
// To check and if Request remote session button is loading
|
|
81
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
82
|
// Body of ESS Modal
|
|
92
83
|
const ESSRemoteSessionModalBody = () => {
|
|
93
84
|
return (React.createElement(React.Fragment, null,
|
|
94
|
-
React.createElement("p", { className: "pf-
|
|
85
|
+
React.createElement("p", { className: "pf-v6-u-mt-xs" },
|
|
95
86
|
React.createElement(Trans, null, "To troubleshoot your problem, Red Hat support accesses your network or systems remotely."))));
|
|
96
87
|
};
|
|
97
88
|
const RequestedESSRemoteSessionModalBody = () => {
|
|
98
89
|
return (React.createElement(React.Fragment, null,
|
|
99
|
-
React.createElement("p", { className: "pf-
|
|
90
|
+
React.createElement("p", { className: "pf-v6-u-mt-xs" },
|
|
100
91
|
React.createElement(Trans, null, "Red Hat will add a comment to your case to schedule your remote session."))));
|
|
101
92
|
};
|
|
102
93
|
const essModalHeader = props.screenSessionRequested ? (React.createElement(React.Fragment, null,
|
|
103
|
-
React.createElement(Title, { className: "pf-
|
|
94
|
+
React.createElement(Title, { className: "pf-v6-u-mb-xs", id: "modal-custom-header-label", headingLevel: "h1", size: TitleSizes['2xl'] },
|
|
104
95
|
React.createElement(Icon, { size: "lg" },
|
|
105
|
-
React.createElement(CheckCircleIcon, { color: "#3E8635", className: "pf-
|
|
96
|
+
React.createElement(CheckCircleIcon, { color: "#3E8635", className: "pf-v6-u-mr-md" })),
|
|
106
97
|
t('Remote session has been requested')))) : (React.createElement(React.Fragment, null,
|
|
107
|
-
React.createElement(Title, { className: "pf-
|
|
108
|
-
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?'),
|
|
98
|
+
React.createElement(Title, { className: "pf-v6-u-mb-xs", id: "modal-custom-header-label", headingLevel: "h1", size: TitleSizes['2xl'] }, t('Request a remote session?'))));
|
|
99
|
+
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?'), isOpen: props.show, onClose: onCancel },
|
|
100
|
+
React.createElement(ModalHeader, null, essModalHeader),
|
|
101
|
+
props.screenSessionRequested ? RequestedESSRemoteSessionModalBody() : ESSRemoteSessionModalBody(),
|
|
102
|
+
React.createElement(ModalFooter, null, props.screenSessionRequested ? (React.createElement(Button, { key: "cancel", variant: ButtonVariant.primary, onClick: props.onClose },
|
|
103
|
+
React.createElement(Trans, null, "Close"))) : (React.createElement(React.Fragment, null,
|
|
104
|
+
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')),
|
|
105
|
+
React.createElement(Button, { key: "cancel", variant: "link", onClick: props.onClose }, t('Cancel')))))));
|
|
109
106
|
}
|
|
@@ -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":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AAiBD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAyW7C"}
|
|
@@ -8,11 +8,10 @@ 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, TextArea, TextInput } from '@patternfly/react-core';
|
|
12
|
-
import { Select, SelectOption } from '@patternfly/react-core/deprecated';
|
|
11
|
+
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
|
|
13
12
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
14
13
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
15
|
-
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
14
|
+
import { SingleSelectDropdown, ToastNotification, useFetch } from '@rh-support/components';
|
|
16
15
|
import isEqual from 'lodash/isEqual';
|
|
17
16
|
import React, { useEffect, useState } from 'react';
|
|
18
17
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -43,7 +42,6 @@ export function NewEssTermsModal(props) {
|
|
|
43
42
|
}), isEqual);
|
|
44
43
|
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
45
44
|
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
46
|
-
const [isLangSelectorDropdownOpen, setisLangSelectorDropdownOpen] = useState(false);
|
|
47
45
|
const caseDispatch = useCaseDispatch();
|
|
48
46
|
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
49
47
|
id: '5001',
|
|
@@ -66,16 +64,18 @@ export function NewEssTermsModal(props) {
|
|
|
66
64
|
try {
|
|
67
65
|
const { siteCode, eventCode, loggedInUser } = props;
|
|
68
66
|
const response = yield request(siteCode, eventCode, loggedInUser);
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
if (response) {
|
|
68
|
+
let defaultTranslation = response[0].translations[0];
|
|
69
|
+
const translationLangInfoMap = response[0].translations.reduce((allTranslationsmap, translation) => {
|
|
70
|
+
if (translation.isDefault) {
|
|
71
|
+
defaultTranslation = translation;
|
|
72
|
+
}
|
|
73
|
+
allTranslationsmap[translation['localeCode']] = translation;
|
|
74
|
+
return allTranslationsmap;
|
|
75
|
+
}, {});
|
|
76
|
+
setSelectedTranslation(defaultTranslation);
|
|
77
|
+
setAllTranslations(translationLangInfoMap);
|
|
78
|
+
}
|
|
79
79
|
}
|
|
80
80
|
catch (e) {
|
|
81
81
|
console.log(e);
|
|
@@ -95,16 +95,29 @@ export function NewEssTermsModal(props) {
|
|
|
95
95
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
96
96
|
// To handle modal cancel and close
|
|
97
97
|
const onCancel = () => {
|
|
98
|
+
if (agreeLoading || isPostingComment)
|
|
99
|
+
return;
|
|
98
100
|
setIsTermsChecked(false);
|
|
99
101
|
setSessionExpectations('');
|
|
100
102
|
setImpact('');
|
|
101
103
|
setSessionLink('');
|
|
102
|
-
setIsRemoteSessionForm(
|
|
104
|
+
setIsRemoteSessionForm(remoteSessionTermsAcked);
|
|
103
105
|
props.onClose && props.onClose();
|
|
104
106
|
};
|
|
107
|
+
const languageOptions = Object.keys(allTranslations).map((option) => ({
|
|
108
|
+
value: option,
|
|
109
|
+
label: getLocaleNameFromLocalCode(option),
|
|
110
|
+
}));
|
|
111
|
+
// Create selected option object based on current selection
|
|
112
|
+
const selectedLanguage = {
|
|
113
|
+
value: selectedTranslation.localeCode,
|
|
114
|
+
label: selectedTranslation.localeCode
|
|
115
|
+
? getLocaleNameFromLocalCode(selectedTranslation.localeCode)
|
|
116
|
+
: t('Select an option that best fits'),
|
|
117
|
+
};
|
|
105
118
|
// Function to ack remote session terms and post comment
|
|
106
119
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
const requestComment = t(
|
|
120
|
+
const requestComment = t(`**[What is a Remote Support Session and how to acknowledge the Remote Access Rider? Read more.](https://access.redhat.com/articles/3566571)**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations for Remote Session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n[${sessionLink}](${sessionLink})\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
|
|
108
121
|
try {
|
|
109
122
|
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
110
123
|
remoteSessionTermsAcked: true,
|
|
@@ -159,18 +172,13 @@ export function NewEssTermsModal(props) {
|
|
|
159
172
|
setIsTermsChecked(value);
|
|
160
173
|
};
|
|
161
174
|
// Handle language change
|
|
162
|
-
const onLangChange = (
|
|
163
|
-
setSelectedTranslation(allTranslations[lang]);
|
|
164
|
-
setisLangSelectorDropdownOpen(false);
|
|
175
|
+
const onLangChange = (lang) => {
|
|
176
|
+
setSelectedTranslation(allTranslations[lang.value]);
|
|
165
177
|
};
|
|
166
|
-
// To handle dropdown toggle
|
|
167
|
-
const onDropdownToggle = (toggle) => setisLangSelectorDropdownOpen(toggle);
|
|
168
178
|
// To check and if I agree button is loading
|
|
169
179
|
const isAgreeLoading = agreeLoading || isPostingComment;
|
|
170
180
|
const modalActions = [
|
|
171
|
-
React.createElement(Button, { "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm || remoteSessionTermsAcked ? onSubmit : toggleRemoteSessionForm, "data-tracking-id": isRemoteSessionForm || remoteSessionTermsAcked
|
|
172
|
-
? 'remote-session-details-submission'
|
|
173
|
-
: 'remote-session-agreement-check', isLoading: isAgreeLoading, isDisabled: (isRemoteSessionForm || remoteSessionTermsAcked
|
|
181
|
+
React.createElement(Button, { "aria-label": t('I agree'), variant: ButtonVariant.primary, onClick: isRemoteSessionForm || remoteSessionTermsAcked ? onSubmit : toggleRemoteSessionForm, "data-tracking-id": "remote-session-agreement-check", isLoading: isAgreeLoading, isDisabled: (isRemoteSessionForm || remoteSessionTermsAcked
|
|
174
182
|
? !sessionExpectations.trim() || !impact.trim()
|
|
175
183
|
: !isTermsChecked) || isAgreeLoading }, t(isRemoteSessionForm || remoteSessionTermsAcked ? 'Submit' : 'I agree')),
|
|
176
184
|
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, isDisabled: isAgreeLoading }, "Cancel"),
|
|
@@ -181,50 +189,50 @@ export function NewEssTermsModal(props) {
|
|
|
181
189
|
' ',
|
|
182
190
|
React.createElement("a", { href: "https://access.redhat.com/articles/3566571", target: "_blank", rel: "noopener noreferrer" }, "Read more.")) }),
|
|
183
191
|
React.createElement("div", null,
|
|
184
|
-
React.createElement("label", { className: "pf-
|
|
192
|
+
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
185
193
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
186
194
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
187
195
|
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" })),
|
|
188
196
|
React.createElement("div", null,
|
|
189
|
-
React.createElement("label", { className: "pf-
|
|
197
|
+
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
190
198
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
191
199
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
192
200
|
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" })),
|
|
193
201
|
React.createElement("div", null,
|
|
194
|
-
React.createElement("label", { className: "pf-
|
|
202
|
+
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
195
203
|
React.createElement(Trans, null, "Remote session link (optional)")),
|
|
196
204
|
React.createElement(TextInput, { value: sessionLink, onChange: updateSessionLink, type: "text", "aria-label": "Remote session link" }),
|
|
197
205
|
React.createElement("p", { className: "form-instructions" }, "If not provided, the Red Hat Support Associate will share a link with you."))));
|
|
198
206
|
const renderRemoteSessionAgreement = (React.createElement("div", { id: "remoteSessionAgreement" },
|
|
199
|
-
React.createElement("p", { className: "pf-
|
|
207
|
+
React.createElement("p", { className: "pf-v6-u-mt-xs" },
|
|
200
208
|
React.createElement(Trans, null,
|
|
201
209
|
"Your acceptance of this remote session agreement is required ",
|
|
202
210
|
React.createElement("strong", null, "for each case"),
|
|
203
211
|
" when you request Red Hat\u2019s support team to directly access your network or systems.")),
|
|
204
|
-
React.createElement("p", { className: "pf-
|
|
212
|
+
React.createElement("p", { className: "pf-v6-u-mt-md" },
|
|
205
213
|
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.")),
|
|
206
|
-
React.createElement("p", { className: "pf-
|
|
214
|
+
React.createElement("p", { className: "pf-v6-u-mt-md" },
|
|
207
215
|
React.createElement(Trans, null, "Please read and accept the remote session terms below to allow Red Hat to access your network or systems.")),
|
|
208
|
-
React.createElement("div",
|
|
209
|
-
React.createElement(
|
|
210
|
-
React.createElement("a", { "aria-label": t('Download'), "data-tracking-id": "rsa-modal-terms-download", className: "pf-
|
|
216
|
+
React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-align-items-center pf-v6-u-flex-wrap" },
|
|
217
|
+
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 }),
|
|
218
|
+
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" },
|
|
211
219
|
t('Download'),
|
|
212
220
|
" ",
|
|
213
|
-
React.createElement(DownloadIcon, { className: "pf-
|
|
221
|
+
React.createElement(DownloadIcon, { className: "pf-v6-u-ml-xs" }))),
|
|
214
222
|
React.createElement("div", null,
|
|
215
|
-
React.createElement(Checkbox, { className: "pf-
|
|
223
|
+
React.createElement(Checkbox, { className: "pf-v6-u-mt-md rsa-checkbox", id: "terms-accept-checkbox", label: React.createElement(React.Fragment, null,
|
|
216
224
|
React.createElement(Trans, null, "I have read and agree to the"),
|
|
217
225
|
' ',
|
|
218
|
-
React.createElement("a", { className: "pf-
|
|
226
|
+
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" },
|
|
219
227
|
React.createElement(Trans, null, "terms "),
|
|
220
228
|
React.createElement(ExternalLinkAltIcon, null))), isChecked: isTermsChecked, "aria-label": t('I have read and agree to the terms'), onChange: onCheckBoxChange }))));
|
|
221
229
|
// Body of ESS RSA Modal
|
|
222
230
|
const EssRSAModalBody = () => {
|
|
223
|
-
return isRemoteSessionForm
|
|
231
|
+
return isRemoteSessionForm ? renderRemoteSessionForm : renderRemoteSessionAgreement;
|
|
224
232
|
};
|
|
225
|
-
return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": isRemoteSessionForm
|
|
226
|
-
|
|
227
|
-
: t('Remote session agreement'),
|
|
228
|
-
|
|
229
|
-
|
|
233
|
+
return (React.createElement(Modal, { id: "remote-session-agreement-modal", "aria-label": isRemoteSessionForm ? t('Request remote session') : t('Remote session agreement'), title: isRemoteSessionForm ? t('Request remote session') : t('Remote session agreement'), isOpen: props.show, onClose: onCancel },
|
|
234
|
+
React.createElement(ModalHeader, null,
|
|
235
|
+
React.createElement("h2", null, isRemoteSessionForm ? t('Request remote session') : t('Remote session agreement'))),
|
|
236
|
+
React.createElement(ModalBody, null, EssRSAModalBody()),
|
|
237
|
+
React.createElement(ModalFooter, null, modalActions)));
|
|
230
238
|
}
|
package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RemoteSessionAgreement.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreement.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,0BAA0B,EAAE,OAAO,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,+EAwHjC,CAAC"}
|