@rh-support/troubleshoot 2.6.355 → 2.6.358
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.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +60 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +79 -47
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
- 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/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +63 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +130 -55
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
- package/lib/esm/components/CaseInformation/CaseLabels.js +106 -0
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +31 -17
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +33 -24
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +141 -0
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +11 -9
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +20 -3
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +19 -32
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
- package/lib/esm/components/EditDescription/EditDescription.js +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +23 -17
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +4 -3
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +3 -9
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +25 -19
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +139 -91
- package/lib/esm/components/shared/Constants.d.ts +5 -0
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +5 -0
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
- package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +22 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +307 -59
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +119 -47
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +22 -57
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +16 -28
- package/lib/esm/components/shared/utils.d.ts +1 -0
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +9 -3
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +2 -1
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +5 -0
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/app.css +28 -0
- package/lib/esm/css/case.css +60 -209
- package/lib/esm/graphql/index.d.ts +4 -0
- package/lib/esm/graphql/index.d.ts.map +1 -0
- package/lib/esm/graphql/index.js +3 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
- package/lib/esm/graphql/mutations/index.d.ts +2 -0
- package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/index.js +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
- package/lib/esm/graphql/queries/index.d.ts +2 -0
- package/lib/esm/graphql/queries/index.d.ts.map +1 -0
- package/lib/esm/graphql/queries/index.js +1 -0
- package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
- package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/escalation.js +1 -0
- package/lib/esm/graphql/schemas/index.d.ts +2 -0
- package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/index.js +1 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +45 -23
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/index.js +5 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/types.js +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
- package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
- package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseHistory.js +98 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +23 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +84 -0
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +18 -11
- package/lib/esm/hooks/useS3Upload.d.ts +5 -4
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +28 -30
- package/lib/esm/i18n/template-de.d.ts +2 -2
- package/lib/esm/i18n/template-de.js +2 -2
- package/lib/esm/i18n/template-es.d.ts +2 -2
- package/lib/esm/i18n/template-es.js +2 -2
- package/lib/esm/i18n/template-fr.d.ts +2 -2
- package/lib/esm/i18n/template-fr.js +2 -2
- package/lib/esm/i18n/template-it.d.ts +2 -2
- package/lib/esm/i18n/template-it.js +2 -2
- package/lib/esm/i18n/template-jp.d.ts +2 -2
- package/lib/esm/i18n/template-jp.js +2 -2
- package/lib/esm/i18n/template-ko.d.ts +2 -2
- package/lib/esm/i18n/template-ko.js +2 -2
- package/lib/esm/i18n/template-pt.d.ts +2 -2
- package/lib/esm/i18n/template-pt.js +2 -2
- package/lib/esm/i18n/template-ru.d.ts +2 -2
- package/lib/esm/i18n/template-ru.js +2 -2
- package/lib/esm/i18n/template-zh.d.ts +2 -2
- package/lib/esm/i18n/template-zh.js +2 -2
- package/lib/esm/index.js +1 -0
- package/lib/esm/models/cache.d.ts +0 -2
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/models/caseHistory.d.ts +80 -0
- package/lib/esm/models/caseHistory.d.ts.map +1 -0
- package/lib/esm/models/caseHistory.js +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +31 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
- package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +119 -17
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
- package/lib/esm/reducers/CaseReducer.d.ts +56 -11
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +284 -100
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +15 -18
- package/lib/esm/scss/_main.scss +9 -0
- package/lib/esm/utils/TimelineUtils.d.ts +41 -0
- package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
- package/lib/esm/utils/TimelineUtils.js +135 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseHistoryUtils.js +165 -0
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
- package/package.json +9 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/AccountSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAOnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAK5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,eAAO,MAAM,YAAY,EAAE,MAG1B,CAAC;AAEF,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/AccountSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAOnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAK5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,eAAO,MAAM,YAAY,EAAE,MAG1B,CAAC;AAEF,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkKrC;kBAlKQ,eAAe;;;AAsKxB,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import './css/accountSelector.css';
|
|
11
|
-
import {
|
|
11
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
12
12
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
13
13
|
import { AlertMessage, AlertType } from '@rh-support/components';
|
|
14
14
|
import { AccountSelectorInternal, GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
@@ -30,12 +30,14 @@ export const defaultProps = {
|
|
|
30
30
|
function AccountSelector(props) {
|
|
31
31
|
var _a;
|
|
32
32
|
const [showNotEntitledMessage, setShowNotEntitledMessage] = useState(false);
|
|
33
|
-
const { accountNumber, selectedAccountDetails } = useCaseSelector((state) => ({
|
|
33
|
+
const { accountNumber, selectedAccountDetails, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
34
34
|
accountNumber: state.caseDetails.accountNumberRef,
|
|
35
35
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
36
|
+
hasInvalidEntitlements: state.hasInvalidEntitlements,
|
|
36
37
|
}), isEqual);
|
|
37
38
|
const isSelectedAccountSubscriptionAbused = ((_a = selectedAccountDetails === null || selectedAccountDetails === void 0 ? void 0 : selectedAccountDetails.data) === null || _a === void 0 ? void 0 : _a.subscriptionAbuse) || false;
|
|
38
39
|
const caseDispatch = useCaseDispatch();
|
|
40
|
+
const apolloClient = useApolloClient();
|
|
39
41
|
const routeDispatch = useRouteDispatchContext();
|
|
40
42
|
const { globalMetadataState: { bookmarkedGroupAccounts, loggedInUserRights, managedAccounts, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
41
43
|
const { t } = useTranslation();
|
|
@@ -52,7 +54,7 @@ function AccountSelector(props) {
|
|
|
52
54
|
clearSelectedAccount(caseDispatch);
|
|
53
55
|
return;
|
|
54
56
|
}
|
|
55
|
-
setCaseAccountNumber(caseDispatch, account.accountNumber, loggedInUserRights.data.isAccountSameAsLoggedInAccount(account.accountNumber), loggedInUsersAccount.data);
|
|
57
|
+
setCaseAccountNumber(caseDispatch, account.accountNumber, loggedInUserRights.data.isAccountSameAsLoggedInAccount(account.accountNumber), loggedInUsersAccount.data, apolloClient);
|
|
56
58
|
});
|
|
57
59
|
const onInternalAccountSelect = (accounts) => {
|
|
58
60
|
if (!isArray(accounts))
|
|
@@ -76,36 +78,24 @@ function AccountSelector(props) {
|
|
|
76
78
|
accountNumber: selectedAccountDetails.data.accountNumber,
|
|
77
79
|
subscriptionAbuse: selectedAccountDetails.data.subscriptionAbuse,
|
|
78
80
|
};
|
|
79
|
-
// When internal user wants to open a case for a customer but customer account doesn't have entitlement, we show an error
|
|
80
81
|
useEffect(() => {
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
82
|
+
if (!loggedInUserRights.data.isInternal() || !selectedAccountDetails.data.accountNumber) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (selectedAccountDetails.data.accountNumber === loggedInUsersAccount.data.accountNumber) {
|
|
86
|
+
setNoValidEntitlement(routeDispatch, false);
|
|
88
87
|
setShowNotEntitledMessage(false);
|
|
89
|
-
|
|
90
|
-
const res = yield accounts.getAccountEntitlementByInternalUser(selectedAccountDetails.data.accountNumber);
|
|
91
|
-
if (isEmpty(res)) {
|
|
92
|
-
setShowNotEntitledMessage(true);
|
|
93
|
-
setNoValidEntitlement(routeDispatch, true);
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
setShowNotEntitledMessage(false);
|
|
97
|
-
setNoValidEntitlement(routeDispatch, false);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
catch (e) {
|
|
101
|
-
console.log(e);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
if (loggedInUserRights.data.isInternal() && selectedAccountDetails.data.accountNumber) {
|
|
105
|
-
getAccountEntitlement();
|
|
88
|
+
return;
|
|
106
89
|
}
|
|
90
|
+
setShowNotEntitledMessage(hasInvalidEntitlements);
|
|
91
|
+
setNoValidEntitlement(routeDispatch, hasInvalidEntitlements);
|
|
107
92
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
108
|
-
}, [
|
|
93
|
+
}, [
|
|
94
|
+
selectedAccountDetails.data.accountNumber,
|
|
95
|
+
loggedInUserRights.data,
|
|
96
|
+
loggedInUsersAccount.data,
|
|
97
|
+
hasInvalidEntitlements,
|
|
98
|
+
]);
|
|
109
99
|
if (isEmpty(loggedInUserRights.data))
|
|
110
100
|
return React.createElement(React.Fragment, null);
|
|
111
101
|
return (React.createElement("div", { id: props.id, className: `form-group ${props.className}` },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAoBxE,UAAU,MAAM;CAAG;AAMnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAmanC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -7,9 +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 {
|
|
10
|
+
// import { ICasePayload } from '@cee-eng/hydrajs/@types/api/public/case';
|
|
11
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
12
|
+
import { CaseContactsSelectorExternal, getHydraContactLabel, getPhoneObj, OwnerTypeaheadDropdown, ToastNotification, usePrevious, ValueChangedIcon, } from '@rh-support/components';
|
|
11
13
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
12
|
-
import { sortHydraContacts } from '@rh-support/utils';
|
|
14
|
+
import { mapGraphQLContactPhoneToCasePhoneFields, sortHydraContacts } from '@rh-support/utils';
|
|
13
15
|
import filter from 'lodash/filter';
|
|
14
16
|
import isEmpty from 'lodash/isEmpty';
|
|
15
17
|
import isEqual from 'lodash/isEqual';
|
|
@@ -20,7 +22,9 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
20
22
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
21
23
|
import { RouteContext } from '../../context/RouteContext';
|
|
22
24
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
23
|
-
import { setCaseDetails, setCaseOwner, setCaseState, setNotifiedUser,
|
|
25
|
+
import { fetchCaseGroupsForContactGraphQL, setCaseDetails, setCaseOwner, setCaseState, setNotifiedUser, setSelectedCaseGroupUsers,
|
|
26
|
+
// updateCaseDetails,
|
|
27
|
+
updateCaseDetailsGraphQL, } from '../../reducers/CaseReducer';
|
|
24
28
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
25
29
|
import { CaseValuesToWatch } from '../shared/Constants';
|
|
26
30
|
import { getChangedValueTooltip } from '../shared/utils';
|
|
@@ -30,18 +34,21 @@ function getOwnerDropdownOptions(contacts) {
|
|
|
30
34
|
function OwnerSelector(props) {
|
|
31
35
|
const { t } = useTranslation();
|
|
32
36
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
33
|
-
const { accountNumber, caseNumber, contactSsoUsername, selectedNotificationContacts, selectedOwner, selectedCaseGroupUsers, isCaseOwnerUpdating, isCasePhoneUpdating, } = useCaseSelector((state) => ({
|
|
37
|
+
const { accountNumber, caseNumber, contactSsoUsername, existingCaseDetails, selectedNotificationContacts, selectedOwner, selectedCaseGroupUsers, selectedAccountDetails, isCaseOwnerUpdating, isCasePhoneUpdating, } = useCaseSelector((state) => ({
|
|
34
38
|
accountNumber: state.caseDetails.accountNumberRef,
|
|
35
39
|
caseNumber: state.caseDetails.caseNumber,
|
|
40
|
+
existingCaseDetails: state.caseDetails,
|
|
36
41
|
selectedNotificationContacts: state.selectedNotificationContacts,
|
|
37
42
|
selectedOwner: state.selectedOwner,
|
|
38
43
|
selectedCaseGroupUsers: state.selectedCaseGroupUsers,
|
|
44
|
+
selectedAccountDetails: state.selectedAccountDetails,
|
|
39
45
|
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
40
46
|
isCasePhoneUpdating: state.isCasePhoneUpdating,
|
|
41
47
|
contactSsoUsername: state.caseDetails.contactSSOName,
|
|
42
48
|
}), isEqual);
|
|
43
49
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
44
50
|
const caseDispatch = useCaseDispatch();
|
|
51
|
+
const apolloClient = useApolloClient();
|
|
45
52
|
const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
46
53
|
const previousAccountNumber = usePrevious(accountNumber);
|
|
47
54
|
const { isExportingPDF } = useContext(PDFContext);
|
|
@@ -64,6 +71,7 @@ function OwnerSelector(props) {
|
|
|
64
71
|
const onOwnerChange = (selectedContact, prevCaseOwner, notificationContacts, dispatch, abortSignalCaseGroup, abortSignalEntitlements) => __awaiter(this, void 0, void 0, function* () {
|
|
65
72
|
if (prevCaseOwner === selectedContact.ssoUsername || isEmpty(selectedContact.ssoUsername))
|
|
66
73
|
return;
|
|
74
|
+
setCaseDetails(caseDispatch, { groupNumber: null, groupName: '' });
|
|
67
75
|
yield setCaseOwner(dispatch, selectedContact, '', abortSignalCaseGroup, abortSignalEntitlements, true, undefined, true, undefined, undefined, loggedInUserRights.data.isInternal() ? accountNumber : undefined);
|
|
68
76
|
setLocalOwnerChange(true);
|
|
69
77
|
!isEmpty(selectedContact) &&
|
|
@@ -102,18 +110,22 @@ function OwnerSelector(props) {
|
|
|
102
110
|
}
|
|
103
111
|
setNotifiedUser(caseDispatch, newNotifiedUsers);
|
|
104
112
|
};
|
|
113
|
+
const getOwnerPhoneCaseUpdate = (owner) => {
|
|
114
|
+
var _a;
|
|
115
|
+
if (!((_a = owner.phone) === null || _a === void 0 ? void 0 : _a.trim())) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
return mapGraphQLContactPhoneToCasePhoneFields(owner.phone, (phone) => {
|
|
119
|
+
const { countryCode, phoneLine } = getPhoneObj(phone);
|
|
120
|
+
return { countryCode, phoneLine: phoneLine || '' };
|
|
121
|
+
});
|
|
122
|
+
};
|
|
105
123
|
const onCaseOwnerUpdate = (newOwner) => __awaiter(this, void 0, void 0, function* () {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
// phone number for new owner
|
|
112
|
-
setCaseDetails(caseDispatch, {
|
|
113
|
-
contactSSOName: newOwner.ssoUsername,
|
|
114
|
-
phoneCountryCode: '',
|
|
115
|
-
phoneAreaCodePrefixLineNumber: '',
|
|
116
|
-
});
|
|
124
|
+
var _a;
|
|
125
|
+
const ownerPhoneCaseUpdate = getOwnerPhoneCaseUpdate(newOwner);
|
|
126
|
+
const defaultCaseGroup = newOwner.defaultCaseGroup || null;
|
|
127
|
+
const shouldDeferOwnerUpdate = selectedAccountDetails.data.requireCGroupOnCreate && isEmpty(defaultCaseGroup);
|
|
128
|
+
const syncLocalCaseOwner = () => __awaiter(this, void 0, void 0, function* () {
|
|
117
129
|
const abortSignal = new AbortController().signal;
|
|
118
130
|
yield setCaseOwner(caseDispatch, {
|
|
119
131
|
ssoUsername: newOwner.ssoUsername,
|
|
@@ -121,11 +133,61 @@ function OwnerSelector(props) {
|
|
|
121
133
|
lastName: newOwner.lastName,
|
|
122
134
|
fullNameCustom: newOwner.fullNameCustom,
|
|
123
135
|
manageSupportCases: newOwner.manageSupportCases,
|
|
136
|
+
id: newOwner.id,
|
|
124
137
|
}, '', abortSignal, abortSignal, false, '', true, true, caseNumber, loggedInUserRights.data.isInternal() ? accountNumber : undefined);
|
|
138
|
+
});
|
|
139
|
+
const applyOwnerPhoneToCaseDetails = () => {
|
|
140
|
+
if (!ownerPhoneCaseUpdate) {
|
|
141
|
+
setCaseDetails(caseDispatch, {
|
|
142
|
+
contactSSOName: newOwner.ssoUsername,
|
|
143
|
+
phoneCountryCode: '',
|
|
144
|
+
phoneAreaCodePrefixLineNumber: '',
|
|
145
|
+
phone: '',
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
setCaseDetails(caseDispatch, Object.assign({ contactSSOName: newOwner.ssoUsername }, ownerPhoneCaseUpdate));
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
const reloadOwnerCaseGroups = (defaultGroup) => {
|
|
153
|
+
var _a;
|
|
154
|
+
if (!newOwner.id || !accountNumber)
|
|
155
|
+
return;
|
|
156
|
+
fetchCaseGroupsForContactGraphQL(caseDispatch, apolloClient, newOwner.id, accountNumber, defaultGroup, (_a = newOwner.isOrgAdmin) !== null && _a !== void 0 ? _a : false, defaultGroup ? null : '');
|
|
157
|
+
};
|
|
158
|
+
if (shouldDeferOwnerUpdate) {
|
|
159
|
+
setCaseDetails(caseDispatch, { groupNumber: '', groupName: '' });
|
|
160
|
+
applyOwnerPhoneToCaseDetails();
|
|
161
|
+
yield syncLocalCaseOwner();
|
|
162
|
+
setCaseState(caseDispatch, {
|
|
163
|
+
pendingCaseOwnerUpdate: {
|
|
164
|
+
contactId: newOwner.id,
|
|
165
|
+
contactSSOName: (_a = newOwner.ssoUsername) !== null && _a !== void 0 ? _a : '',
|
|
166
|
+
phoneCaseUpdate: ownerPhoneCaseUpdate,
|
|
167
|
+
},
|
|
168
|
+
});
|
|
169
|
+
setSelectedCaseGroupUsers(caseDispatch, accountNumber, '', loggedInUserRights.data);
|
|
170
|
+
setLocalOwnerChange(true);
|
|
171
|
+
updateNotifyUsersList(newOwner);
|
|
172
|
+
reloadOwnerCaseGroups(null);
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
setCaseState(caseDispatch, { isCaseOwnerUpdating: true, pendingCaseOwnerUpdate: null });
|
|
176
|
+
if (!defaultCaseGroup) {
|
|
177
|
+
setCaseDetails(caseDispatch, { groupNumber: '', groupName: '' });
|
|
178
|
+
}
|
|
179
|
+
try {
|
|
180
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, Object.assign({ contactId: newOwner.id, contactSSOName: newOwner.ssoUsername, groupNumber: defaultCaseGroup !== null && defaultCaseGroup !== void 0 ? defaultCaseGroup : '' }, (ownerPhoneCaseUpdate !== null && ownerPhoneCaseUpdate !== void 0 ? ownerPhoneCaseUpdate : {})), false, { existingCaseDetails });
|
|
181
|
+
setSelectedCaseGroupUsers(caseDispatch, accountNumber, defaultCaseGroup !== null && defaultCaseGroup !== void 0 ? defaultCaseGroup : '', loggedInUserRights.data);
|
|
182
|
+
if (!ownerPhoneCaseUpdate) {
|
|
183
|
+
applyOwnerPhoneToCaseDetails();
|
|
184
|
+
}
|
|
185
|
+
yield syncLocalCaseOwner();
|
|
125
186
|
setLocalOwnerChange(true);
|
|
126
187
|
updateNotifyUsersList(newOwner);
|
|
127
188
|
ToastNotification.addSuccessMessage(t(`Owner has been successfully updated`));
|
|
128
189
|
setCaseState(caseDispatch, { isCaseOwnerUpdating: false });
|
|
190
|
+
reloadOwnerCaseGroups(defaultCaseGroup);
|
|
129
191
|
}
|
|
130
192
|
catch (e) {
|
|
131
193
|
setCaseState(caseDispatch, { isCaseOwnerUpdating: false });
|
|
@@ -168,6 +230,7 @@ function OwnerSelector(props) {
|
|
|
168
230
|
phoneAreaCodePrefixLineNumber: '',
|
|
169
231
|
phoneCountryCode: '',
|
|
170
232
|
});
|
|
233
|
+
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: false });
|
|
171
234
|
onOwnerChange(customerContacts[0], previousCaseOwner, selectedNotificationContacts, caseDispatch);
|
|
172
235
|
}
|
|
173
236
|
});
|
|
@@ -209,6 +272,18 @@ function OwnerSelector(props) {
|
|
|
209
272
|
React.createElement(Trans, null, "Owner"),
|
|
210
273
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, comparator: ownerComparator, isLocalChange: localOwnerChange, value: selectedOwner.data, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.owner, (v) => v.fullNameCustom) }),
|
|
211
274
|
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*")),
|
|
212
|
-
showUsersWithSelectedGroupAccess && loggedInUsersAccount.data.hasGroupACLs ? (React.createElement(OwnerTypeaheadDropdown, { id: "get-support-owner", hasClearButton: true, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], isDisabled: selectedCaseGroupUsers.isFetching ||
|
|
275
|
+
showUsersWithSelectedGroupAccess && loggedInUsersAccount.data.hasGroupACLs ? (React.createElement(OwnerTypeaheadDropdown, { id: "get-support-owner", hasClearButton: true, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], isDisabled: selectedCaseGroupUsers.isFetching ||
|
|
276
|
+
isCaseOwnerUpdating ||
|
|
277
|
+
isCasePhoneUpdating ||
|
|
278
|
+
canEditCase.isCaseNotEditable, onSelect: onCustomerContactSelect, onClearQuery: onClearQuery, onQueryUpdated: onQueryUpdated, options: ownerDropdownOptions, status: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data) ? 'danger' : undefined })) : (React.createElement(CaseContactsSelectorExternal, { loggedInUserRights: loggedInUserRights.data, selectedAccountNumber: accountNumber, contactSsoUsername: contactSsoUsername !== null && contactSsoUsername !== void 0 ? contactSsoUsername : '', selected: !isEmpty(selectedOwner.data) ? [selectedOwner.data] : [], onChange: onCustomerContactSelect, onContactEnriched: (contact) => {
|
|
279
|
+
var _a, _b;
|
|
280
|
+
setCaseState(caseDispatch, {
|
|
281
|
+
selectedOwner: { data: contact, isFetching: false, isError: false, errorMessage: '' },
|
|
282
|
+
});
|
|
283
|
+
if (!contact.id || !accountNumber || caseNumber) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
fetchCaseGroupsForContactGraphQL(caseDispatch, apolloClient, contact.id, accountNumber, (_a = contact.defaultCaseGroup) !== null && _a !== void 0 ? _a : null, (_b = contact.isOrgAdmin) !== null && _b !== void 0 ? _b : false, null);
|
|
287
|
+
}, placeholder: t(`Search by name or username`), clearButton: true, id: "get-support-owner", name: "get-support-owner", className: "react-select-custom", isUpdating: isCaseOwnerUpdating, isInvalid: isNextBtnClickedToShowValidationError && isEmpty(selectedOwner.data), isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating || canEditCase.isCaseNotEditable }))));
|
|
213
288
|
}
|
|
214
289
|
export { OwnerSelector };
|
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,+EAwJnC,CAAC"}
|
package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js
CHANGED
|
@@ -59,8 +59,12 @@ export const ActiveCustomerEscalation = forwardRef((props, ref) => {
|
|
|
59
59
|
React.createElement(ListItem, null, t('Needs a senior resource.')),
|
|
60
60
|
React.createElement(ListItem, null, t('Is more severe or should be a higher priority.'))),
|
|
61
61
|
commonElements,
|
|
62
|
-
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation') }, t('Request an escalation'))))));
|
|
62
|
+
React.createElement(Button, { variant: ButtonVariant.secondary, onClick: toggleModal, "data-tracking-id": "request-rme-trigger", "aria-label": t('Request an escalation'), isDisabled: canEditCase.isCaseNotEditable }, t('Request an escalation'))))));
|
|
63
63
|
return (React.createElement(React.Fragment, null,
|
|
64
64
|
React.createElement(RequestEscalationModal, { caseNumber: props.caseNumber, severity: props.caseSeverity, caseStatus: props.caseStatus, show: openRequestEscalationModal, onClose: toggleModal }),
|
|
65
|
-
React.createElement(Can, { do: resourceActions.CREATE, on: resources.ICE_ESCALATION, passThrough: true }, (canCreateICE) =>
|
|
65
|
+
React.createElement(Can, { do: resourceActions.CREATE, on: resources.ICE_ESCALATION, passThrough: true }, (canCreateICE) => (React.createElement(Can, { do: resourceActions.CREATE, on: resources.RME_ESCALATION, passThrough: true }, (canCreateRME) => canCreateICE || isInternal
|
|
66
|
+
? isInternalElements
|
|
67
|
+
: canCreateRME && isCreateRMEVisible
|
|
68
|
+
? isNotInternalElements
|
|
69
|
+
: null)))));
|
|
66
70
|
});
|
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":"AAmCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,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,qBAiYnD"}
|
|
@@ -7,26 +7,29 @@ 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 {
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
11
|
+
import { escalations } from '@cee-eng/hydrajs';
|
|
11
12
|
import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, Popover, TextArea, TextInput, Title, ValidatedOptions, } from '@patternfly/react-core';
|
|
12
13
|
import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
|
|
13
14
|
import { AlertMessage, AlertType, LoadingIndicator, SingleSelectDropdown, ToastNotification, useFetch, } from '@rh-support/components';
|
|
14
|
-
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
15
|
+
import { fetchCaseDetails, useGlobalStateContext } from '@rh-support/react-context';
|
|
15
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
|
+
import isEqual from 'lodash/isEqual';
|
|
16
18
|
import React, { useEffect, useState } from 'react';
|
|
17
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
18
|
-
import { useCaseDispatch } from '../../../context/CaseContext';
|
|
19
|
-
import { useCaseDetailsPageDispatchContext
|
|
20
|
-
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
|
|
20
|
+
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
21
|
+
import { useCaseDetailsPageDispatchContext } from '../../../context/CaseDetailsPageContext';
|
|
21
22
|
import { CustomerGEOs } from '../../../enums/customerGEOs';
|
|
23
|
+
import { CREATE_RME_CASE_ESCALATION, } from '../../../graphql';
|
|
24
|
+
import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
|
|
22
25
|
import { ESCALATION_SUBJECT_LENGTH_LIMIT } from '../../../reducers/CaseConstNTypes';
|
|
23
26
|
import { fetchCaseEscalations } from '../../../reducers/CaseDetailsPageReducer';
|
|
24
|
-
import {
|
|
25
|
-
import { checkForCaseStatusToggleOnAttachOrComment, fetchCaseDetails } from '../../../reducers/CaseReducer';
|
|
27
|
+
import { checkForCaseStatusToggleOnAttachOrComment, setCaseAccountNumber } from '../../../reducers/CaseReducer';
|
|
26
28
|
const customerGEOKeys = Object.keys(CustomerGEOs);
|
|
27
29
|
export function RequestEscalationModal(props) {
|
|
28
|
-
const { globalMetadataState: {
|
|
30
|
+
const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount }, } = useGlobalStateContext();
|
|
29
31
|
const { t } = useTranslation();
|
|
32
|
+
const apolloClient = useApolloClient();
|
|
30
33
|
const [categories, setCategories] = useState([]);
|
|
31
34
|
const initialState = {
|
|
32
35
|
subject: '',
|
|
@@ -42,17 +45,14 @@ export function RequestEscalationModal(props) {
|
|
|
42
45
|
// checks if all the fields have values.
|
|
43
46
|
const hasRequiredInfo = () => Object.keys(formState).reduce((accumulator, currentValue) => { var _a; return !accumulator ? accumulator : formState[currentValue].length > 0 && ((_a = formState[currentValue]) === null || _a === void 0 ? void 0 : _a.trim()); }, true);
|
|
44
47
|
const setFormStateValue = (key, value) => setFormState((pre) => (Object.assign(Object.assign({}, pre), { [key]: value })));
|
|
45
|
-
const
|
|
46
|
-
const {
|
|
47
|
-
propgateErrors: true,
|
|
48
|
-
});
|
|
49
|
-
const { request: updateCaseRequest, isFetching: isUpdatingCase } = useFetch(publicApi.kase.updateCase);
|
|
48
|
+
const [isCreatingEscalation, setIsCreatingEscalation] = useState(false);
|
|
49
|
+
const { createComment, loading: isPostingComment } = useCreateCaseComment();
|
|
50
50
|
const { request: getRmeCategories, isFetching: isCategoriesFetching } = useFetch(escalations.getEscalationCategories, { propgateErrors: true });
|
|
51
|
-
const
|
|
52
|
-
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
53
|
-
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
51
|
+
const client = useApolloClient();
|
|
54
52
|
const caseDetailsPageDispatch = useCaseDetailsPageDispatchContext();
|
|
55
53
|
const caseDispatch = useCaseDispatch();
|
|
54
|
+
const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
|
|
55
|
+
const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
|
|
56
56
|
const [creationError, setCreationError] = useState(false);
|
|
57
57
|
const onErrorClose = () => setCreationError(false);
|
|
58
58
|
const setGeoState = (selection) => {
|
|
@@ -61,14 +61,19 @@ export function RequestEscalationModal(props) {
|
|
|
61
61
|
const setCategoryState = (selection) => {
|
|
62
62
|
setFormState(Object.assign(Object.assign({}, formState), { rmeCategory: selection.value }));
|
|
63
63
|
};
|
|
64
|
-
const submitEscalationComment = (escalationNum, comment) => __awaiter(this, void 0, void 0, function* () {
|
|
64
|
+
const submitEscalationComment = (escalationNum, comment, caseId) => __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
var _a, _b;
|
|
65
66
|
escalationNum &&
|
|
66
|
-
fetchCaseEscalations(caseDetailsPageDispatch,
|
|
67
|
-
yield
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), props.caseStatus
|
|
71
|
-
|
|
67
|
+
fetchCaseEscalations(caseDetailsPageDispatch, caseSalesforceId, apolloClient, false, Boolean((_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport));
|
|
68
|
+
yield createComment({ caseId, body: comment, isPublic: true });
|
|
69
|
+
client.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
70
|
+
// await updateCaseRequest(props.caseNumber, { customerEscalation: true });
|
|
71
|
+
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), props.caseStatus, {
|
|
72
|
+
apolloClient,
|
|
73
|
+
caseNumber: props.caseNumber,
|
|
74
|
+
existingCaseDetails,
|
|
75
|
+
});
|
|
76
|
+
yield fetchCaseDetails((action) => caseDispatch(action), apolloClient, props.caseNumber, setCaseAccountNumber, Boolean((_b = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _b === void 0 ? void 0 : _b.secureSupport));
|
|
72
77
|
escalationNum &&
|
|
73
78
|
ToastNotification.addSuccessMessage(t('Your escalation request has been successfully submitted.'));
|
|
74
79
|
});
|
|
@@ -78,7 +83,7 @@ export function RequestEscalationModal(props) {
|
|
|
78
83
|
setFormState(Object.assign(Object.assign({}, formState), { subject }));
|
|
79
84
|
};
|
|
80
85
|
const onCancel = () => {
|
|
81
|
-
if (isPostingComment ||
|
|
86
|
+
if (isPostingComment || isCreatingEscalation)
|
|
82
87
|
return;
|
|
83
88
|
setSubmitSaveButtonIsClicked(false);
|
|
84
89
|
setFormState(initialState);
|
|
@@ -86,12 +91,35 @@ export function RequestEscalationModal(props) {
|
|
|
86
91
|
props.onClose();
|
|
87
92
|
};
|
|
88
93
|
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
94
|
+
var _a, _b, _c, _d;
|
|
89
95
|
setSubmitSaveButtonIsClicked(true);
|
|
90
96
|
if (!hasRequiredInfo() || hasLargeSubject)
|
|
91
97
|
return;
|
|
92
98
|
try {
|
|
93
|
-
|
|
94
|
-
|
|
99
|
+
setIsCreatingEscalation(true);
|
|
100
|
+
if (!caseSalesforceId)
|
|
101
|
+
throw new Error('Could not find parent case ID');
|
|
102
|
+
// GraphQL CaseCreate has no Expectations field; serialize into Description for the payload.
|
|
103
|
+
const serializedDescription = `${formState.description}\n\nExpectations:\n${formState.expectations}`;
|
|
104
|
+
const { data: escalationData } = yield apolloClient.mutate({
|
|
105
|
+
mutation: CREATE_RME_CASE_ESCALATION,
|
|
106
|
+
variables: {
|
|
107
|
+
caseInput: {
|
|
108
|
+
Subject: formState.subject,
|
|
109
|
+
Description: serializedDescription,
|
|
110
|
+
Status: 'In Progress',
|
|
111
|
+
Origin: 'Portal RME',
|
|
112
|
+
Priority: props.severity || '3 (Medium)',
|
|
113
|
+
Type: 'RME',
|
|
114
|
+
RecordTypeId: '012Ek00000JUtx5IAD',
|
|
115
|
+
ParentId: caseSalesforceId,
|
|
116
|
+
EscalationCategory__c: formState.rmeCategory,
|
|
117
|
+
ImpactOnUserOrBusiness__c: formState.businessImpactDescription,
|
|
118
|
+
},
|
|
119
|
+
},
|
|
120
|
+
});
|
|
121
|
+
const createdCaseNumber = (_d = (_c = (_b = (_a = escalationData === null || escalationData === void 0 ? void 0 : escalationData.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.CaseCreate) === null || _b === void 0 ? void 0 : _b.RedHatSupportRecord) === null || _c === void 0 ? void 0 : _c.CaseNumber__c) === null || _d === void 0 ? void 0 : _d.value;
|
|
122
|
+
const fullComment = t('<h3>Request Management Escalation:</h3><p><strong>Subject</strong></p><p>{{subject}}</p><p><strong>Category</strong></p><p>{{rmeCategory}}</p><p><strong>Description</strong></p><p>{{description}}</p><p><strong>Expectations</strong></p><p>{{expectations}}</p><p><strong>Business Impact</strong></p><p>{{businessImpactDescription}}</p>', {
|
|
95
123
|
category: formState.rmeCategory,
|
|
96
124
|
subject: formState.subject,
|
|
97
125
|
description: formState.description,
|
|
@@ -100,7 +128,7 @@ export function RequestEscalationModal(props) {
|
|
|
100
128
|
rmeCategory: formState.rmeCategory,
|
|
101
129
|
});
|
|
102
130
|
try {
|
|
103
|
-
yield submitEscalationComment(
|
|
131
|
+
yield submitEscalationComment(createdCaseNumber, fullComment, caseSalesforceId);
|
|
104
132
|
}
|
|
105
133
|
catch (e) {
|
|
106
134
|
// silently fails, escalation is created but adding comment fails
|
|
@@ -108,9 +136,11 @@ export function RequestEscalationModal(props) {
|
|
|
108
136
|
props.onClose();
|
|
109
137
|
}
|
|
110
138
|
catch (error) {
|
|
111
|
-
//=> handle error
|
|
112
139
|
setCreationError(true);
|
|
113
140
|
}
|
|
141
|
+
finally {
|
|
142
|
+
setIsCreatingEscalation(false);
|
|
143
|
+
}
|
|
114
144
|
});
|
|
115
145
|
const header = (React.createElement(Title, { className: "pf-v6-u-mb-0", id: "custom-header-label", headingLevel: "h1" },
|
|
116
146
|
React.createElement(Trans, null, "Request an escalation"),
|
|
@@ -191,10 +221,9 @@ export function RequestEscalationModal(props) {
|
|
|
191
221
|
? ValidatedOptions.error
|
|
192
222
|
: 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
223
|
React.createElement(ModalFooter, null,
|
|
194
|
-
React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, "data-tracking-id": "request-rme-submit", isDisabled: submitButtonIsClicked &&
|
|
195
|
-
|
|
196
|
-
(isPostingComment || isUpdatingCase || createEscalationFetch.isFetching) && (React.createElement(LoadingIndicator, { key: "loading", isInline: true })),
|
|
224
|
+
React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, "data-tracking-id": "request-rme-submit", isDisabled: submitButtonIsClicked && (isPostingComment || isCreatingEscalation || !hasRequiredInfo()), "aria-label": t('Submit') },
|
|
225
|
+
(isPostingComment || isCreatingEscalation) && React.createElement(LoadingIndicator, { key: "loading", isInline: true }),
|
|
197
226
|
' ',
|
|
198
227
|
t('Submit')),
|
|
199
|
-
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, "data-tracking-id": "request-rme-cancel", isDisabled:
|
|
228
|
+
React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, "data-tracking-id": "request-rme-cancel", isDisabled: isCreatingEscalation || isPostingComment, "aria-label": t('Cancel') }, t('Cancel')))));
|
|
200
229
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ArchivedCaseBannerProps {
|
|
3
|
+
caseStatus?: string;
|
|
4
|
+
caseNumber?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function ArchivedCaseBanner({ caseStatus, caseNumber }: ArchivedCaseBannerProps): React.JSX.Element;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=ArchivedCaseBanner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ArchivedCaseBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/ArchivedCaseBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,uBAAuB;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAKD,wBAAgB,kBAAkB,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,uBAAuB,qBA+BrF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Alert, AlertActionLink, AlertVariant } from '@patternfly/react-core';
|
|
2
|
+
import { getStringifiedParams, isCaseArchivedStatus } from '@rh-support/utils';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { Trans } from 'react-i18next';
|
|
5
|
+
const ARCHIVED_CASE_BODY = 'This case is archived and locked for editing. If you need further assistance with this issue, start a new linked case to automatically reference this record.';
|
|
6
|
+
export function ArchivedCaseBanner({ caseStatus, caseNumber }) {
|
|
7
|
+
if (!isCaseArchivedStatus(caseStatus)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
const linkedCaseSearch = getStringifiedParams(Object.assign({ caseCreate: true }, (caseNumber ? { linkedCaseNumber: caseNumber } : {})));
|
|
11
|
+
const linkedCaseUrl = `/support/cases/#/case/new${linkedCaseSearch}`;
|
|
12
|
+
return (React.createElement(Alert, { className: "pf-v6-u-mb-md", isInline: true, variant: AlertVariant.info, title: React.createElement(Trans, null, "Archived case"), actionLinks: React.createElement(React.Fragment, null,
|
|
13
|
+
React.createElement(AlertActionLink, { href: linkedCaseUrl, "data-tracking-id": "archived-case-create-linked-case" },
|
|
14
|
+
React.createElement(Trans, null, "Create a linked case")),
|
|
15
|
+
React.createElement(AlertActionLink, { href: "/support/contact/", "data-tracking-id": "archived-case-contact-us" },
|
|
16
|
+
React.createElement(Trans, null, "Contact us"))) },
|
|
17
|
+
React.createElement(Trans, null, ARCHIVED_CASE_BODY)));
|
|
18
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAoB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,qBAgRzC"}
|