@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
|
@@ -109,17 +109,17 @@ function AccountSelector(props) {
|
|
|
109
109
|
if (isEmpty(loggedInUserRights.data))
|
|
110
110
|
return React.createElement(React.Fragment, null);
|
|
111
111
|
return (React.createElement("div", { id: props.id, className: `form-group ${props.className}` },
|
|
112
|
-
React.createElement(AlertMessage, { show: showNotEntitledMessage, variant: AlertType.DANGER, isInline: true, title: t("The selected account doesn't have entitlement"), className: "pf-
|
|
113
|
-
React.createElement("div", { className: "account-selector-label-wrapper pf-
|
|
112
|
+
React.createElement(AlertMessage, { show: showNotEntitledMessage, variant: AlertType.DANGER, isInline: true, title: t("The selected account doesn't have entitlement"), className: "pf-v6-u-mb-lg" }),
|
|
113
|
+
React.createElement("div", { className: "account-selector-label-wrapper pf-v6-u-display-flex" },
|
|
114
114
|
React.createElement("label", { htmlFor: "account-selector" },
|
|
115
115
|
React.createElement(Trans, null, "Account"),
|
|
116
116
|
' ',
|
|
117
117
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
118
|
-
canUseFindMyAccount && (React.createElement("button", { role: "link", className: "btn btn-link btn-app find-my-account pf-
|
|
118
|
+
canUseFindMyAccount && (React.createElement("button", { role: "link", className: "btn btn-link btn-app find-my-account pf-v6-u-ml-auto", onClick: onFindMyAccountClick, disabled: selectedAccountDetails.isFetching, "data-tracking-id": "get-support-find-my-account", type: "button" },
|
|
119
119
|
React.createElement(Trans, null, "Find my account")))),
|
|
120
120
|
React.createElement("div", { className: "account-selector-wrapper" },
|
|
121
121
|
React.createElement(AccountSelectorInternal, { selectedAccounts: [selectedAccount], canBookmarkAccount: canBookmarkAccounts, bookmarkedAccounts: bookmarkedGroupAccounts.data, id: "account-or-bookmark-selector", className: "account-selector", name: "account-or-bookmark-selector", placeholder: t(`Search for an account ${loggedInUserRights.data.isExternal() ? 'or select a bookmark' : ''} `), onSelect: onInternalAccountSelect, disabled: loggedInUserRights.data.isExternal() || selectedAccountDetails.isFetching, isInValid: isSelectedAccountSubscriptionAbused, restrictedOnSubscriptionAbuse: true })),
|
|
122
|
-
canAccessManagedAccounts && !isEmpty(managedAccounts.data) && (React.createElement(ManagedAccountsDropdown, { className: "managed-account-selector pf-
|
|
122
|
+
canAccessManagedAccounts && !isEmpty(managedAccounts.data) && (React.createElement(ManagedAccountsDropdown, { className: "managed-account-selector pf-v6-u-mt-xl", onManagedAccountChange: onManagedAccountChange, managedAccounts: managedAccounts, selectedAccountNumber: accountNumber, disabled: selectedAccountDetails.isFetching })),
|
|
123
123
|
isSelectedAccountSubscriptionAbused && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
124
124
|
React.createElement(InfoCircleIcon, null),
|
|
125
125
|
' ',
|
|
@@ -35,7 +35,7 @@ function ManagedAccountsDropdown(props) {
|
|
|
35
35
|
}, [props.managedAccounts.data, props.selectedAccountNumber]);
|
|
36
36
|
// Only accounts that have granted access permission to partner should be listed
|
|
37
37
|
const managedAccountsWithPermission = () => props.managedAccounts.data.filter((account) => account.partnerCaseAccess === 'All') || [];
|
|
38
|
-
const managedAccountsOptions = managedAccountsWithPermission().map((account) => (Object.assign({ actionItem: (React.createElement(React.Fragment, null, account.subscriptionAbuse && (React.createElement("span", { className: "form-instructions form-invalid pf-
|
|
38
|
+
const managedAccountsOptions = managedAccountsWithPermission().map((account) => (Object.assign({ actionItem: (React.createElement(React.Fragment, null, account.subscriptionAbuse && (React.createElement("span", { className: "form-instructions form-invalid pf-v6-u-text-nowrap pf-v6-u-pr-sm" },
|
|
39
39
|
React.createElement(InfoCircleIcon, null),
|
|
40
40
|
" ",
|
|
41
41
|
React.createElement(Trans, null, "Subscription abuse"))))), children: (React.createElement(React.Fragment, null, account.subscriptionAbuse ? (React.createElement("span", { className: "form-instructions form-invalid" }, getLabelForAccountOption(account))) : (getLabelForAccountOption(account)))) }, account))) || [];
|
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":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+
|
|
1
|
+
{"version":3,"file":"ActiveCustomerEscalation.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.tsx"],"names":[],"mappings":"AAIA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,wBAAwB,+EAwInC,CAAC"}
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, ButtonVariant, List, ListItem, Popover } from '@patternfly/react-core';
|
|
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
3
|
import { useCanEditCase } from '@rh-support/react-context';
|
|
4
4
|
import { Can, resourceActions, resources } from '@rh-support/user-permissions';
|
|
@@ -14,44 +14,49 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
14
14
|
const commonElements = (React.createElement(React.Fragment, null,
|
|
15
15
|
React.createElement("p", null,
|
|
16
16
|
React.createElement(Trans, null, "After submitting, your case will be reviewed by a support manager."))));
|
|
17
|
-
const isInternalElements = (React.createElement(
|
|
18
|
-
React.createElement(
|
|
19
|
-
React.createElement(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
React.createElement(
|
|
30
|
-
|
|
31
|
-
|
|
17
|
+
const isInternalElements = (React.createElement(Card, { className: "card-support escalations", ref: ref },
|
|
18
|
+
React.createElement(CardHeader, null,
|
|
19
|
+
React.createElement("div", { className: "escalation-header" },
|
|
20
|
+
React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" },
|
|
21
|
+
React.createElement(Trans, null, "Active Customer Escalation (ACE)")),
|
|
22
|
+
React.createElement("a", { href: "/support/escalation", target: "_blank", rel: "noopener noreferrer", "aria-label": t('Learn more about Red Hat support case escalation') },
|
|
23
|
+
React.createElement(InfoCircleIcon, null)))),
|
|
24
|
+
React.createElement(CardBody, null,
|
|
25
|
+
React.createElement(React.Fragment, null,
|
|
26
|
+
React.createElement("p", null,
|
|
27
|
+
React.createElement("strong", null, t('Red Hat associates can open an ACE escalation when')),
|
|
28
|
+
":"),
|
|
29
|
+
React.createElement(List, { className: "pf-v6-u-pl-lg" },
|
|
30
|
+
React.createElement(ListItem, null, t('The customer wants an update')),
|
|
31
|
+
React.createElement(ListItem, null, t('The customer thinks the case is not moving appropriately')),
|
|
32
|
+
React.createElement(ListItem, null, t('The customer wants a new resource')),
|
|
33
|
+
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'))))));
|
|
32
35
|
const [openRequestEscalationModal, setOpenRequestEscalationModal] = useState(false);
|
|
33
36
|
const toggleModal = () => {
|
|
34
37
|
if (canEditCase.alert())
|
|
35
38
|
return;
|
|
36
39
|
setOpenRequestEscalationModal((openRequestEscalationModal) => !openRequestEscalationModal);
|
|
37
40
|
};
|
|
38
|
-
const isNotInternalElements = (React.createElement(
|
|
39
|
-
React.createElement(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
React.createElement(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
React.createElement(
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
41
|
+
const isNotInternalElements = (React.createElement(Card, { className: "card-support escalations", ref: ref },
|
|
42
|
+
React.createElement(CardHeader, null,
|
|
43
|
+
React.createElement("div", { className: "escalation-header" },
|
|
44
|
+
React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" }, t('Request an escalation')),
|
|
45
|
+
React.createElement("div", { style: { marginLeft: 'auto' } },
|
|
46
|
+
React.createElement(Popover, { showClose: false, position: 'left', hasAutoWidth: true, bodyContent: (hide) => (React.createElement("a", { href: "/support/escalation", target: "_blank", "aria-label": t('Learn more about escalation cases.') },
|
|
47
|
+
React.createElement(Trans, null, "Learn more about escalation cases."))) },
|
|
48
|
+
React.createElement(InfoCircleIcon, { title: t('Learn more about escalation cases popover') }))))),
|
|
49
|
+
React.createElement(CardBody, null,
|
|
50
|
+
React.createElement(React.Fragment, null,
|
|
51
|
+
React.createElement("p", null,
|
|
52
|
+
React.createElement("strong", null, t('Request a management escalation if your issue')),
|
|
53
|
+
":"),
|
|
54
|
+
React.createElement(List, { className: "pf-v6-u-pl-lg" },
|
|
55
|
+
React.createElement(ListItem, null, t(`Isn't being resolved appropriately.`)),
|
|
56
|
+
React.createElement(ListItem, null, t('Needs a senior resource.')),
|
|
57
|
+
React.createElement(ListItem, null, t('Is more severe or should be a higher priority.'))),
|
|
58
|
+
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'))))));
|
|
55
60
|
return (React.createElement(React.Fragment, null,
|
|
56
61
|
React.createElement(RequestEscalationModal, { caseNumber: props.caseNumber, severity: props.caseSeverity, caseStatus: props.caseStatus, show: openRequestEscalationModal, onClose: toggleModal }),
|
|
57
62
|
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":"AAiCA,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,qBA6WnD"}
|
|
@@ -8,10 +8,9 @@ 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, Popover, TextArea, TextInput, Title, ValidatedOptions, } from '@patternfly/react-core';
|
|
12
|
-
import { Select, SelectOption } from '@patternfly/react-core/deprecated';
|
|
11
|
+
import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, Popover, TextArea, TextInput, Title, ValidatedOptions, } from '@patternfly/react-core';
|
|
13
12
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
14
|
-
import { AlertMessage, AlertType, LoadingIndicator, ToastNotification, useFetch } from '@rh-support/components';
|
|
13
|
+
import { AlertMessage, AlertType, LoadingIndicator, SingleSelectDropdown, ToastNotification, useFetch, } from '@rh-support/components';
|
|
15
14
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
16
15
|
import isEmpty from 'lodash/isEmpty';
|
|
17
16
|
import React, { useEffect, useState } from 'react';
|
|
@@ -28,10 +27,6 @@ const customerGEOKeys = Object.keys(CustomerGEOs);
|
|
|
28
27
|
export function RequestEscalationModal(props) {
|
|
29
28
|
const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useGlobalStateContext();
|
|
30
29
|
const { t } = useTranslation();
|
|
31
|
-
const [showGeoDropdown, setGeoShowDropdown] = useState(false);
|
|
32
|
-
const onGeoDropdownToggle = (toggle) => setGeoShowDropdown(toggle);
|
|
33
|
-
const [showCategoryDropdown, setCategoryShowDropdown] = useState(false);
|
|
34
|
-
const onCategoryDropdownToggle = (toggle) => setCategoryShowDropdown(toggle);
|
|
35
30
|
const [categories, setCategories] = useState([]);
|
|
36
31
|
const initialState = {
|
|
37
32
|
subject: '',
|
|
@@ -60,13 +55,11 @@ export function RequestEscalationModal(props) {
|
|
|
60
55
|
const caseDispatch = useCaseDispatch();
|
|
61
56
|
const [creationError, setCreationError] = useState(false);
|
|
62
57
|
const onErrorClose = () => setCreationError(false);
|
|
63
|
-
const setGeoState = (
|
|
64
|
-
setFormState(Object.assign(Object.assign({}, formState), { geo: selection }));
|
|
65
|
-
onGeoDropdownToggle(false);
|
|
58
|
+
const setGeoState = (selection) => {
|
|
59
|
+
setFormState(Object.assign(Object.assign({}, formState), { geo: selection.value }));
|
|
66
60
|
};
|
|
67
|
-
const setCategoryState = (
|
|
68
|
-
setFormState(Object.assign(Object.assign({}, formState), { rmeCategory: selection }));
|
|
69
|
-
onCategoryDropdownToggle(false);
|
|
61
|
+
const setCategoryState = (selection) => {
|
|
62
|
+
setFormState(Object.assign(Object.assign({}, formState), { rmeCategory: selection.value }));
|
|
70
63
|
};
|
|
71
64
|
const submitEscalationComment = (escalationNum, comment) => __awaiter(this, void 0, void 0, function* () {
|
|
72
65
|
escalationNum &&
|
|
@@ -119,19 +112,11 @@ export function RequestEscalationModal(props) {
|
|
|
119
112
|
setCreationError(true);
|
|
120
113
|
}
|
|
121
114
|
});
|
|
122
|
-
const
|
|
123
|
-
React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, "data-tracking-id": "request-rme-submit", isDisabled: submitButtonIsClicked &&
|
|
124
|
-
(isPostingComment || isUpdatingCase || createEscalationFetch.isFetching || !hasRequiredInfo()), "aria-label": t('Submit') },
|
|
125
|
-
(isPostingComment || isUpdatingCase || createEscalationFetch.isFetching) && (React.createElement(LoadingIndicator, { key: "loading", isInline: true })),
|
|
126
|
-
' ',
|
|
127
|
-
t('Submit')),
|
|
128
|
-
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, "data-tracking-id": "request-rme-cancel", isDisabled: createEscalationFetch.isFetching || isPostingComment || isUpdatingCase, "aria-label": t('Cancel') }, t('Cancel')),
|
|
129
|
-
];
|
|
130
|
-
const header = (React.createElement(Title, { className: "pf-v5-u-mb-0", id: "custom-header-label", headingLevel: "h1" },
|
|
115
|
+
const header = (React.createElement(Title, { className: "pf-v6-u-mb-0", id: "custom-header-label", headingLevel: "h1" },
|
|
131
116
|
React.createElement(Trans, null, "Request an escalation"),
|
|
132
117
|
React.createElement(Popover, { showClose: false, position: 'top', hasAutoWidth: true, bodyContent: () => (React.createElement("a", { href: "/support/escalation", target: "_blank", "aria-label": t('Learn more about escalation cases.') },
|
|
133
118
|
React.createElement(Trans, null, "Learn more about escalation cases."))) },
|
|
134
|
-
React.createElement(InfoCircleIcon, { className: "pf-
|
|
119
|
+
React.createElement(InfoCircleIcon, { className: "pf-v6-u-ml-sm" }))));
|
|
135
120
|
// load rme categories as soon as user opens the modal
|
|
136
121
|
useEffect(() => {
|
|
137
122
|
if (!props.show || categories.length !== 0)
|
|
@@ -148,41 +133,68 @@ export function RequestEscalationModal(props) {
|
|
|
148
133
|
fetchCategories();
|
|
149
134
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
150
135
|
}, [props.show]);
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
136
|
+
const categoryOptions = categories.map((value) => ({
|
|
137
|
+
value: value,
|
|
138
|
+
label: value,
|
|
139
|
+
}));
|
|
140
|
+
// Create selected option object based on current selection
|
|
141
|
+
const selectedCategory = {
|
|
142
|
+
value: formState.rmeCategory,
|
|
143
|
+
label: formState.rmeCategory || t('Select an option that best fits'),
|
|
144
|
+
};
|
|
145
|
+
const geoOptions = customerGEOKeys.map((key) => ({
|
|
146
|
+
value: CustomerGEOs[key].value,
|
|
147
|
+
label: t(CustomerGEOs[key].label),
|
|
148
|
+
}));
|
|
149
|
+
// Create selected option object based on current selection
|
|
150
|
+
const findSelectedGeoLabel = () => {
|
|
151
|
+
const selectedKey = customerGEOKeys.find((key) => CustomerGEOs[key].value === formState.geo);
|
|
152
|
+
return selectedKey ? t(CustomerGEOs[selectedKey].label) : '';
|
|
153
|
+
};
|
|
154
|
+
const selectedGeo = {
|
|
155
|
+
value: formState.geo,
|
|
156
|
+
label: findSelectedGeoLabel() || t('Select a location'),
|
|
157
|
+
};
|
|
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
|
+
React.createElement(ModalHeader, null, header),
|
|
160
|
+
React.createElement(ModalBody, null,
|
|
161
|
+
React.createElement("p", { className: "pf-v6-u-mb-md" },
|
|
162
|
+
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.")),
|
|
163
|
+
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') }),
|
|
164
|
+
React.createElement(Form, { "aria-label": t('form'), className: "request-escalation-form" },
|
|
165
|
+
React.createElement(Grid, { hasGutter: true, md: 12 },
|
|
166
|
+
React.createElement(GridItem, { span: 6 },
|
|
167
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Category'), fieldId: "escalation-category" },
|
|
168
|
+
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 }))),
|
|
169
|
+
React.createElement(GridItem, { span: 6 },
|
|
170
|
+
React.createElement(FormGroup, { isRequired: true, label: t('My region'), fieldId: "escalation-region" },
|
|
171
|
+
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) }))),
|
|
172
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Subject'), fieldId: "escalation-subject" },
|
|
173
|
+
submitButtonIsClicked && hasLargeSubject && (React.createElement(FormHelperText, null,
|
|
174
|
+
React.createElement(HelperText, null,
|
|
175
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error }, t('Subject cannot be more than {{limit}} characters', {
|
|
176
|
+
limit: ESCALATION_SUBJECT_LENGTH_LIMIT,
|
|
177
|
+
}))))),
|
|
178
|
+
React.createElement(TextInput, { isRequired: true, validated: (submitButtonIsClicked && isEmpty(formState.subject)) || hasLargeSubject
|
|
179
|
+
? ValidatedOptions.error
|
|
180
|
+
: 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') })),
|
|
181
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Description'), fieldId: "escalation-description" },
|
|
182
|
+
React.createElement(TextArea, { value: formState.description, onChange: (e, value) => setFormStateValue('description', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.description)
|
|
183
|
+
? ValidatedOptions.error
|
|
184
|
+
: ValidatedOptions.default, "aria-label": t('Description'), id: "description-textarea", placeholder: t('Provide a detailed comment for us to best assist you'), resizeOrientation: "vertical" })),
|
|
185
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Expectations'), fieldId: "escalation-expectations" },
|
|
186
|
+
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.expectations)
|
|
160
187
|
? ValidatedOptions.error
|
|
161
|
-
: ValidatedOptions.default,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
React.createElement(Select, { "aria-label": t('My region'), id: "customer-geo-select", selections: formState.geo, onSelect: setGeoState, isOpen: showGeoDropdown, validated: submitButtonIsClicked && isEmpty(formState.geo)
|
|
188
|
+
: 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" })),
|
|
189
|
+
React.createElement(FormGroup, { isRequired: true, label: t('Business impact'), fieldId: "escalation-business-impact" },
|
|
190
|
+
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.businessImpactDescription)
|
|
165
191
|
? ValidatedOptions.error
|
|
166
|
-
: ValidatedOptions.default,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
? ValidatedOptions.error
|
|
175
|
-
: 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') })),
|
|
176
|
-
React.createElement(FormGroup, { isRequired: true, label: t('Description'), fieldId: "escalation-description" },
|
|
177
|
-
React.createElement(TextArea, { value: formState.description, onChange: (e, value) => setFormStateValue('description', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.description)
|
|
178
|
-
? ValidatedOptions.error
|
|
179
|
-
: ValidatedOptions.default, "aria-label": t('Description'), id: "description-textarea", placeholder: t('Provide a detailed comment for us to best assist you'), resizeOrientation: "vertical" })),
|
|
180
|
-
React.createElement(FormGroup, { isRequired: true, label: t('Expectations'), fieldId: "escalation-expectations" },
|
|
181
|
-
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('expectations', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.expectations)
|
|
182
|
-
? ValidatedOptions.error
|
|
183
|
-
: 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" })),
|
|
184
|
-
React.createElement(FormGroup, { isRequired: true, label: t('Business impact'), fieldId: "escalation-business-impact" },
|
|
185
|
-
React.createElement(TextArea, { onChange: (e, value) => setFormStateValue('businessImpactDescription', value), isRequired: true, validated: submitButtonIsClicked && isEmpty(formState.businessImpactDescription)
|
|
186
|
-
? ValidatedOptions.error
|
|
187
|
-
: 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" }))))));
|
|
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" }))))),
|
|
193
|
+
React.createElement(ModalFooter, null,
|
|
194
|
+
React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, "data-tracking-id": "request-rme-submit", isDisabled: submitButtonIsClicked &&
|
|
195
|
+
(isPostingComment || isUpdatingCase || createEscalationFetch.isFetching || !hasRequiredInfo()), "aria-label": t('Submit') },
|
|
196
|
+
(isPostingComment || isUpdatingCase || createEscalationFetch.isFetching) && (React.createElement(LoadingIndicator, { key: "loading", isInline: true })),
|
|
197
|
+
' ',
|
|
198
|
+
t('Submit')),
|
|
199
|
+
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, "data-tracking-id": "request-rme-cancel", isDisabled: createEscalationFetch.isFetching || isPostingComment || isUpdatingCase, "aria-label": t('Cancel') }, t('Cancel')))));
|
|
188
200
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,qBA4OzC"}
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
1
10
|
import { CoverSpinner, ErrorBoundary, OverviewContentLoader, ToastNotification, useDocumentTitle, usePrevious, } from '@rh-support/components';
|
|
2
11
|
import { GlobalMetadataStateContext, HostnameAwarenessModal } from '@rh-support/react-context';
|
|
3
12
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
@@ -9,6 +18,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
9
18
|
import { Route, Switch, useLocation, useParams, useRouteMatch } from 'react-router-dom';
|
|
10
19
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
11
20
|
import { useCaseDetailsPageDispatchContext } from '../../context/CaseDetailsPageContext';
|
|
21
|
+
import { CaseReducerConstants } from '../../reducers/CaseConstNTypes';
|
|
12
22
|
import { fetchAttachments, fetchCaseEscalations, fetchExternalTrackers, fetchFeedbacks, } from '../../reducers/CaseDetailsPageReducer';
|
|
13
23
|
import { fetchCaseDetails, setCaseAccountNumber } from '../../reducers/CaseReducer';
|
|
14
24
|
import { CaseDetailsAside } from './CaseDetailsAside';
|
|
@@ -29,6 +39,7 @@ export default function Case(props) {
|
|
|
29
39
|
const queryParams = getUrlParsedParams(useLocation().search);
|
|
30
40
|
const ability = useContext(AbilityContext);
|
|
31
41
|
const caseDetailsTabsRef = useRef(null);
|
|
42
|
+
const currentCaseRef = useRef();
|
|
32
43
|
const canSeeFeedbackButtons = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_FEEDBACK_BUTTONS);
|
|
33
44
|
const canReadCase = ability.can(resourceActions.READ, resources.CASE_DETAILS);
|
|
34
45
|
const canSeeExternalTracker = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_EXTERNAL_TRACKER);
|
|
@@ -80,20 +91,45 @@ export default function Case(props) {
|
|
|
80
91
|
props.routeProps.history.replace('/case/list');
|
|
81
92
|
return;
|
|
82
93
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
const targetCaseNumber = caseNumber;
|
|
95
|
+
caseDispatch({ type: CaseReducerConstants.resetCaseState });
|
|
96
|
+
// Update reference after reset
|
|
97
|
+
currentCaseRef.current = targetCaseNumber;
|
|
98
|
+
const safeFetchCaseDetails = () => __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
try {
|
|
100
|
+
// Check that we're still on the intended case before fetching
|
|
101
|
+
if (currentCaseRef.current !== targetCaseNumber)
|
|
102
|
+
return;
|
|
103
|
+
const safeDispatch = (action) => {
|
|
104
|
+
// Only dispatch if we're still working with the target case number
|
|
105
|
+
if (currentCaseRef.current === targetCaseNumber) {
|
|
106
|
+
caseDispatch(action);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
yield fetchCaseDetails(safeDispatch, targetCaseNumber, loggedInUserRights.data, loggedInUser.data);
|
|
110
|
+
if (currentCaseRef.current !== targetCaseNumber)
|
|
111
|
+
return;
|
|
112
|
+
if (canSeeRMEs) {
|
|
113
|
+
fetchCaseEscalations((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber, loggedInUserRights.data.getAccountNumber());
|
|
114
|
+
}
|
|
115
|
+
if (canSeeAttachments) {
|
|
116
|
+
fetchAttachments((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber, loggedInUsersAccount.data.secureSupport);
|
|
117
|
+
}
|
|
118
|
+
if (canSeeExternalTracker) {
|
|
119
|
+
fetchExternalTrackers((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber);
|
|
120
|
+
}
|
|
121
|
+
if (canSeeFeedbackButtons) {
|
|
122
|
+
fetchFeedbacks((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber);
|
|
123
|
+
}
|
|
124
|
+
if (currentCaseRef.current === targetCaseNumber) {
|
|
125
|
+
checkRemoteSessionFlag();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch (error) {
|
|
129
|
+
console.error('Error fetching case details:', error);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
safeFetchCaseDetails();
|
|
97
133
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
98
134
|
}, [
|
|
99
135
|
caseNumber,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,
|
|
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,qBA6Y7C"}
|