@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
|
@@ -11,24 +11,26 @@ import { publicApi } from '@cee-eng/hydrajs';
|
|
|
11
11
|
import { AcceptTermsModal, ToastNotification, useFetch } from '@rh-support/components';
|
|
12
12
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
13
13
|
import { TncConstants } from '@rh-support/utils';
|
|
14
|
+
import isEqual from 'lodash/isEqual';
|
|
14
15
|
import React, { useContext } from 'react';
|
|
15
16
|
import { useTranslation } from 'react-i18next';
|
|
17
|
+
import { useCaseSelector } from '../../context/CaseContext';
|
|
18
|
+
import { useCreateCaseComment } from '../../hooks/useCaseComments';
|
|
16
19
|
export default function RemoteRiderAcceptanceModal(props) {
|
|
17
20
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
18
21
|
const { t } = useTranslation();
|
|
19
22
|
const { request, isFetching } = useFetch(publicApi.kase.acknowledgeRemoteSessionTerms, { propgateErrors: true });
|
|
20
|
-
const {
|
|
21
|
-
|
|
22
|
-
});
|
|
23
|
+
const { createComment, loading: isPostingComment } = useCreateCaseComment();
|
|
24
|
+
const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
|
|
23
25
|
const onConfirm = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
24
26
|
try {
|
|
25
27
|
yield request(props.caseNumber, pdfId);
|
|
26
28
|
try {
|
|
27
|
-
const requestComment = t('
|
|
28
|
-
yield
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const requestComment = t('<h4>Remote Access Rider agreement has been accepted.</h4><p>This action does not initiate a remote session. Please make a case comment if you would like to submit a request.</p>');
|
|
30
|
+
yield createComment({
|
|
31
|
+
caseId: caseSalesforceId,
|
|
32
|
+
body: requestComment,
|
|
33
|
+
isPublic: true,
|
|
32
34
|
});
|
|
33
35
|
ToastNotification.addSuccessMessage(t('Remote Access Rider agreement has been accepted'), t('This action does not initiate a remote session. Please make a case comment if you would like to submit a request.'));
|
|
34
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA4B,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAKvD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAsBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,qBAmG3C"}
|
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
import { Grid, GridItem } from '@patternfly/react-core';
|
|
2
|
-
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
2
|
+
// import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
3
3
|
import { PreviousCaseTypes } from '@rh-support/utils';
|
|
4
4
|
import isEmpty from 'lodash/isEmpty';
|
|
5
5
|
import isEqual from 'lodash/isEqual';
|
|
6
|
-
import React, {
|
|
6
|
+
import React, { useEffect, useRef } from 'react';
|
|
7
7
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
8
|
+
import { useShowCaseGroupField } from '../../hooks/useCaseGroupUiState';
|
|
8
9
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
9
10
|
import { AccountSelector } from '../AccountInfo/AccountSelector';
|
|
10
11
|
import { OwnerSelector } from '../AccountInfo/OwnerSelector';
|
|
11
12
|
import CaseGroup from '../CaseInformation/CaseGroup';
|
|
12
13
|
import CaseType from '../CaseInformation/CaseType';
|
|
13
14
|
import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
|
|
14
|
-
|
|
15
|
+
// TODO: Re-enable once phone number verification flow is fully supported with GraphQL
|
|
16
|
+
// import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
|
|
15
17
|
import Fts from '../CaseInformation/Fts';
|
|
16
18
|
import Severity from '../CaseInformation/Severity';
|
|
17
19
|
import SupportLevel from '../CaseInformation/SupportLevel';
|
|
20
|
+
import CaseLabelsCreate from '../CaseManagement/CaseLabelsCreate';
|
|
18
21
|
import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
|
|
19
|
-
import { Cep } from '../CaseManagement/Cep';
|
|
22
|
+
// import { Cep } from '../CaseManagement/Cep';
|
|
20
23
|
import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
|
|
21
24
|
import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
|
|
22
|
-
import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
|
|
23
|
-
import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
|
|
24
|
-
import { Hostname } from '../ImproveCase/Hostname';
|
|
25
|
+
// import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
|
|
26
|
+
// import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
|
|
27
|
+
// import { Hostname } from '../ImproveCase/Hostname';
|
|
25
28
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
26
29
|
import { AllProductsSelector } from '../ProductSelector/AllProductsSelector';
|
|
27
30
|
export default function Review(props) {
|
|
28
31
|
const caseDispatch = useCaseDispatch();
|
|
32
|
+
const showCaseGroupField = useShowCaseGroupField();
|
|
29
33
|
const { contactInfo24x7, caseType } = useCaseSelector((state) => ({
|
|
30
34
|
contactInfo24x7: state.caseDetails.contactInfo24x7,
|
|
31
35
|
caseType: state.caseDetails.caseType,
|
|
@@ -41,8 +45,12 @@ export default function Review(props) {
|
|
|
41
45
|
}
|
|
42
46
|
previousCaseTypeRef.current = caseType;
|
|
43
47
|
}, [caseType, caseDispatch]);
|
|
44
|
-
const ability = useContext(AbilityContext);
|
|
45
|
-
const canSeeEmailNotifications = ability.can(
|
|
48
|
+
// const ability = useContext(AbilityContext);
|
|
49
|
+
// const canSeeEmailNotifications = ability.can(
|
|
50
|
+
// resourceActions.PATCH,
|
|
51
|
+
// resources.CASE_DETAILS,
|
|
52
|
+
// CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS
|
|
53
|
+
// );
|
|
46
54
|
const onSeverityChange = (payload) => {
|
|
47
55
|
setCaseDetails(caseDispatch, payload);
|
|
48
56
|
};
|
|
@@ -50,9 +58,8 @@ export default function Review(props) {
|
|
|
50
58
|
React.createElement("form", { className: "review-form card card-light push-bottom" },
|
|
51
59
|
React.createElement(AccountSelector, null),
|
|
52
60
|
React.createElement(OwnerSelector, null),
|
|
53
|
-
React.createElement(AllProductsSelector, { routeProps: props.routeProps, loadTCOnChange: true, showTCAfterButtonClicked: true,
|
|
61
|
+
React.createElement(AllProductsSelector, { routeProps: props.routeProps, loadTCOnChange: true, showTCAfterButtonClicked: true, isOnReviewPage: true }),
|
|
54
62
|
React.createElement(OpenShiftClusterId, null),
|
|
55
|
-
caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT && React.createElement(Hostname, null),
|
|
56
63
|
React.createElement(KtQuestions, { inlineEditable: true, hideSaveCancel: true, onlyShowKT4: caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT }),
|
|
57
64
|
React.createElement(CaseType, null),
|
|
58
65
|
React.createElement(SupportLevel, null),
|
|
@@ -61,15 +68,14 @@ export default function Review(props) {
|
|
|
61
68
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
62
69
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xl" },
|
|
63
70
|
React.createElement(ContactPhoneNumber, null))),
|
|
64
|
-
React.createElement(ContactPhoneNumberAlert, null),
|
|
65
71
|
React.createElement(Fts, { inlineEditable: true, initialIsEditing: isEmpty(contactInfo24x7), hideSaveCancel: true }),
|
|
66
72
|
React.createElement(Grid, { hasGutter: true },
|
|
67
|
-
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
73
|
+
React.createElement(GridItem, { span: 12, xl2: showCaseGroupField ? 6 : 12, className: "pf-v6-u-mb-xs" },
|
|
68
74
|
React.createElement(CaseLanguageSelector, null)),
|
|
69
|
-
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
70
|
-
React.createElement(CaseGroup, null))),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
React.createElement(
|
|
75
|
+
showCaseGroupField && (React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
76
|
+
React.createElement(CaseGroup, null)))),
|
|
77
|
+
React.createElement(Grid, { hasGutter: true },
|
|
78
|
+
React.createElement(GridItem, { span: 12, xl2: 12, className: "pf-v6-u-mb-xs" },
|
|
79
|
+
React.createElement(CaseLabelsCreate, null))),
|
|
80
|
+
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }))));
|
|
75
81
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAgC,YAAY,EAAE,MAAM,qDAAqD,CAAC;AAQjH,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAmBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,eAAO,MAAM,6BAA6B,GAAI,aAAa,YAAY,GAAG,SAAS,EAAE,uBAAuB,MAAM,YAKjH,CAAC;AAEF,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBAwX3C"}
|
|
@@ -8,6 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
11
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
11
12
|
import { pcm } from '@cee-eng/hydrajs';
|
|
12
13
|
import { useDebounce, useDeepCompareDebounce, usePrevious } from '@rh-support/components';
|
|
13
14
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
@@ -43,6 +44,7 @@ export const isSessionFromCurrentAuthCycle = (sessionItem, currentLoginStartTime
|
|
|
43
44
|
};
|
|
44
45
|
export function SessionRestore(props) {
|
|
45
46
|
var _a;
|
|
47
|
+
const apolloClient = useApolloClient();
|
|
46
48
|
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
47
49
|
const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
|
|
48
50
|
const { sessionRestore } = useContext(SessionRestoreStateContext);
|
|
@@ -239,7 +241,7 @@ export function SessionRestore(props) {
|
|
|
239
241
|
const reg = new RegExp('Cluster Name: (.*) ');
|
|
240
242
|
const v3ClusterName = reg.exec(sessionDetails.description) ? reg.exec(sessionDetails.description)[1] : '';
|
|
241
243
|
setCaseState(caseDispatch, { v3ClusterName });
|
|
242
|
-
yield updateCaseWithSession(caseDispatch, sessionItem, loggedInUserRights.data.getAccountNumber(), loggedInUserRights.data.getHydraContactFromLoggedInUser(), loggedInUsersAccount.data);
|
|
244
|
+
yield updateCaseWithSession(caseDispatch, sessionItem, loggedInUserRights.data.getAccountNumber(), loggedInUserRights.data.getHydraContactFromLoggedInUser(), loggedInUsersAccount.data, apolloClient);
|
|
243
245
|
if (!isAISureSession(sessionItem)) {
|
|
244
246
|
restoreFilesFromSession(dispatchToAttachmentReducer, sessionItem.session.id);
|
|
245
247
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAQ,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAQ1E,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAQ,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAQ1E,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAWrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,KAAK,EAAE,MAAM,qBA8Y/C"}
|
|
@@ -214,7 +214,7 @@ export default function SubmitCase(props) {
|
|
|
214
214
|
React.createElement(Button, { className: "pf-v6-u-ml-md view-case-button", component: "a", href: getCaseURL(), variant: "primary", "data-tracking-id": "get-support-view-case", "aria-label": t('View case'), isAriaDisabled: isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles) },
|
|
215
215
|
React.createElement(Trans, null, "View case"))))) : (React.createElement(Button, { component: (props) => (React.createElement(Link, Object.assign({}, props, { to: `/case/${caseNoOfCreatedCase}` }))), variant: "primary", "data-tracking-id": "get-support-view-case", "aria-label": t('View case'), className: "view-case-button" },
|
|
216
216
|
React.createElement(Trans, null, "View case"))))))),
|
|
217
|
-
!isEmpty(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(FileUploader, { idToUploadTo: caseNoOfCreatedCase, isSessionId: false
|
|
217
|
+
!isEmpty(attachmentState.caseFiles.selectedLocalFiles) && (React.createElement(FileUploader, { idToUploadTo: caseNoOfCreatedCase, isSessionId: false })),
|
|
218
218
|
React.createElement("div", null,
|
|
219
219
|
(!isEmpty(topContent.data) || !rulesState.EARules.rules || !clusterRecommendations) &&
|
|
220
220
|
!isIdea && (React.createElement(Content, { className: "pf-v6-u-mt-2xl pf-v6-u-font-weight-light", component: ContentVariants.h2 },
|
|
@@ -143,7 +143,7 @@ function TroubleshootSection(props) {
|
|
|
143
143
|
updateSession(sessionRestoreDispatch, activeSessionId, sessionDetails, newSession);
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
|
-
// Enable
|
|
146
|
+
// Enable "See more resources" button when first chunk is received
|
|
147
147
|
if (eventData.eventName === ARHEventName.FirstMessageReceived) {
|
|
148
148
|
aiResponseDispatch(setHasChunkReceived(true));
|
|
149
149
|
}
|
|
@@ -355,7 +355,7 @@ function TroubleshootSection(props) {
|
|
|
355
355
|
React.createElement("button", { onClick: props.onSeeMoreResources, className: "btn btn-app btn-primary main-nav-button", type: "button", disabled: isFunctionalCookieAccepted() &&
|
|
356
356
|
props.aiServicesAvailable &&
|
|
357
357
|
!aiResponseState.hasChunkReceived &&
|
|
358
|
-
!aiResponseState.error }, t('Continue')))) : isCaseCreate ? (React.createElement("span", null,
|
|
358
|
+
!aiResponseState.error }, isFunctionalCookieAccepted() ? t('See more resources') : t('Continue')))) : isCaseCreate ? (React.createElement("span", null,
|
|
359
359
|
React.createElement(Trans, { i18nKey: "<span>Return to</span> <button>case creation</button>", components: {
|
|
360
360
|
span: React.createElement("span", { className: "return-to-case-text" }),
|
|
361
361
|
button: (React.createElement(Button, { className: "return-to-case-btn", variant: "link", component: "a", onClick: () => props.setIsAIChatMode(false) })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAexF,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA+oBxD"}
|
|
@@ -7,11 +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 { useApolloClient } from '@apollo/client/react';
|
|
11
11
|
import { Button, Dropdown, DropdownItem, DropdownList, Flex, FlexItem, MenuToggle, Modal, ModalBody, ModalFooter, ModalHeader, Spinner, TextArea, } from '@patternfly/react-core';
|
|
12
|
-
import { ToastNotification
|
|
12
|
+
import { ToastNotification } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
14
|
-
import {
|
|
14
|
+
import { getFtsForSeverityChange, isPremiumEntitlement, isSev1, PreviousCaseTypes, severitySort, } from '@rh-support/utils';
|
|
15
15
|
import { isUndefined } from 'lodash';
|
|
16
16
|
import find from 'lodash/find';
|
|
17
17
|
import includes from 'lodash/includes';
|
|
@@ -21,13 +21,11 @@ import map from 'lodash/map';
|
|
|
21
21
|
import React, { useContext, useEffect, useReducer, useRef, useState } from 'react';
|
|
22
22
|
import { Trans, useTranslation } from 'react-i18next';
|
|
23
23
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
24
|
-
import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageContext';
|
|
25
|
-
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../context/CaseDiscussionTabContext';
|
|
26
24
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
27
|
-
import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
|
|
28
25
|
import { getNewSeverityStringDef, getSeverityDescription } from '../../reducers/CaseHelpers';
|
|
29
26
|
import { caseOverviewReducer, initialCaseViewState, setSeverityUpdating } from '../../reducers/CaseOverviewReducer';
|
|
30
|
-
import { checkForCaseStatusToggleOnAttachOrComment, setCaseState,
|
|
27
|
+
import { checkForCaseStatusToggleOnAttachOrComment, setCaseState, updateCaseSeverityAndFtsGraphQL, } from '../../reducers/CaseReducer';
|
|
28
|
+
import { usePostComment } from '../shared/usePostComment';
|
|
31
29
|
export default function UpdateSeverityModal(props) {
|
|
32
30
|
const { show, onClose, isDisabled, isFetching } = props;
|
|
33
31
|
const { t } = useTranslation();
|
|
@@ -40,12 +38,7 @@ export default function UpdateSeverityModal(props) {
|
|
|
40
38
|
const [isUpdateClickedToShowError, setIsUpdateClickedToShowError] = useState(false);
|
|
41
39
|
const [isSeverityInValid, setIsSeverityInValid] = useState(false);
|
|
42
40
|
const [seviritiesOptions, setSeveritiesOptions] = useState([]);
|
|
43
|
-
const
|
|
44
|
-
propgateErrors: true,
|
|
45
|
-
});
|
|
46
|
-
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
47
|
-
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
48
|
-
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
41
|
+
const client = useApolloClient();
|
|
49
42
|
const { globalMetadataState: { allCaseSeverities, allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
50
43
|
const caseState = useCaseSelector((state) => ({
|
|
51
44
|
caseDetails: {
|
|
@@ -61,19 +54,30 @@ export default function UpdateSeverityModal(props) {
|
|
|
61
54
|
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
62
55
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
|
|
63
56
|
},
|
|
57
|
+
existingCaseDetails: state.caseDetails,
|
|
64
58
|
isCaseUpdating: state.isCaseUpdating,
|
|
65
59
|
versionsDetails: state.versionsDetails,
|
|
66
60
|
ownersEntitlements: state.ownersEntitlements,
|
|
67
61
|
ftsContactSameAsOwner: state.ftsContactSameAsOwner,
|
|
68
62
|
}), isEqual);
|
|
69
|
-
const {
|
|
63
|
+
const { postComment, isPostingComment } = usePostComment({
|
|
64
|
+
caseNumber: caseState.caseDetails.caseNumber,
|
|
65
|
+
});
|
|
66
|
+
const { caseDetails, existingCaseDetails, isCaseUpdating, ownersEntitlements, versionsDetails, ftsContactSameAsOwner, } = caseState;
|
|
70
67
|
const { entitlementSla, fts, contactInfo24x7, caseType, phoneAreaCodePrefixLineNumber, phoneCountryCode } = caseDetails;
|
|
71
68
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
72
69
|
const [currentSeverity, setCurrentSeverity] = useState(caseDetails.caseSeverity);
|
|
70
|
+
const updateSeverityViaGraphQL = (payload) => __awaiter(this, void 0, void 0, function* () {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
yield updateCaseSeverityAndFtsGraphQL(caseDispatch, client, caseDetails.caseNumber, payload, (_b = (_a = payload.severity) !== null && _a !== void 0 ? _a : currentSeverity) !== null && _b !== void 0 ? _b : caseDetails.caseSeverity, { existingCaseDetails });
|
|
73
|
+
});
|
|
73
74
|
const [localFtsContact, setLocalFtsContact] = useState(contactInfo24x7 || '');
|
|
74
75
|
const [localFts, setLocalFts] = useState(isUndefined(fts) ? true : fts);
|
|
75
76
|
const initialContactSameAsOwnerRef = useRef(ftsContactSameAsOwner !== null && ftsContactSameAsOwner !== void 0 ? ftsContactSameAsOwner : false);
|
|
76
|
-
const
|
|
77
|
+
const hasPremiumSla = isPremiumEntitlement(entitlementSla || '');
|
|
78
|
+
const severityForFts = String(currentSeverity !== null && currentSeverity !== void 0 ? currentSeverity : '').trim();
|
|
79
|
+
const shouldShowFts = isSev1(severityForFts) && hasPremiumSla;
|
|
80
|
+
const isPreviousSeveritySelected = isEqual(caseDetails.caseSeverity, currentSeverity);
|
|
77
81
|
const [isOpen, setIsOpen] = useState(false);
|
|
78
82
|
const onToggleClick = () => {
|
|
79
83
|
setIsOpen(!isOpen);
|
|
@@ -114,12 +118,9 @@ export default function UpdateSeverityModal(props) {
|
|
|
114
118
|
// To update the state when severity changes
|
|
115
119
|
const updateState = (value) => {
|
|
116
120
|
const casePayload = { severity: value };
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
!isEmpty(caseDetails.caseNumber) &&
|
|
121
|
-
autoEnableFtsOnCaseViewEditPage(caseDetails.entitlementSla, value) &&
|
|
122
|
-
(casePayload.fts = true);
|
|
121
|
+
casePayload.fts = getFtsForSeverityChange(caseDetails.entitlementSla, value, {
|
|
122
|
+
isCaseEdit: !isEmpty(caseDetails.caseNumber),
|
|
123
|
+
});
|
|
123
124
|
};
|
|
124
125
|
// Modal cancel function which resets the field
|
|
125
126
|
const onCancel = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -148,27 +149,38 @@ export default function UpdateSeverityModal(props) {
|
|
|
148
149
|
const getFtsUpdateComment = () => {
|
|
149
150
|
if (isIdea)
|
|
150
151
|
return '';
|
|
151
|
-
|
|
152
|
+
// 24x7 fields are only shown for severity 1; do not report contact changes the user could not make.
|
|
153
|
+
if (!shouldShowFts)
|
|
154
|
+
return '';
|
|
155
|
+
const normalize24x7Contact = (value) => (value !== null && value !== void 0 ? value : '').trim();
|
|
156
|
+
const savedContact = normalize24x7Contact(caseDetails.contactInfo24x7);
|
|
157
|
+
const localContact = normalize24x7Contact(localFtsContact);
|
|
158
|
+
if (isEqual(caseDetails.fts, localFts) && isEqual(savedContact, localContact))
|
|
152
159
|
return '';
|
|
153
|
-
if (caseDetails.fts && !localFts)
|
|
154
|
-
return '
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
160
|
+
if (caseDetails.fts && !localFts) {
|
|
161
|
+
return '<h4>Contact Support Update</h4><p>User disabled 24x7 contact support</p>';
|
|
162
|
+
}
|
|
163
|
+
if (!caseDetails.fts && localFts) {
|
|
164
|
+
return '<h4>Contact Support Update</h4><p>User enabled 24x7 contact support</p>';
|
|
165
|
+
}
|
|
166
|
+
return '<h4>Contact Support Update</h4><p>User updated 24x7 contact information</p>';
|
|
158
167
|
};
|
|
159
168
|
const updateCaseFtsInfo = () => __awaiter(this, void 0, void 0, function* () {
|
|
169
|
+
const ftsUpdateComment = `${getFtsUpdateComment()}<h4>Description</h4><p>${descriptionValue.trim()}</p>`;
|
|
160
170
|
try {
|
|
161
|
-
|
|
162
|
-
|
|
171
|
+
yield updateSeverityViaGraphQL({
|
|
172
|
+
severity: currentSeverity || caseDetails.caseSeverity,
|
|
163
173
|
fts: localFts,
|
|
164
174
|
contactInfo24x7: localFtsContact,
|
|
165
175
|
});
|
|
166
|
-
|
|
167
|
-
|
|
176
|
+
ToastNotification.addSuccessMessage(t(`Case has been successfully updated`));
|
|
177
|
+
void postComment({
|
|
168
178
|
commentBody: ftsUpdateComment === null || ftsUpdateComment === void 0 ? void 0 : ftsUpdateComment.trim(),
|
|
169
179
|
contentType: 'markdown',
|
|
180
|
+
updateDiscussionState: true,
|
|
181
|
+
}).catch((err) => {
|
|
182
|
+
caseUpdateError.showError(err, t(`Couldn't post severity update comment. Please try again`));
|
|
170
183
|
});
|
|
171
|
-
ToastNotification.addSuccessMessage(t(`Case has been successfully updated`));
|
|
172
184
|
}
|
|
173
185
|
catch (err) {
|
|
174
186
|
caseUpdateError.showError(err, t(`Failed to update the case`));
|
|
@@ -177,6 +189,7 @@ export default function UpdateSeverityModal(props) {
|
|
|
177
189
|
onClose();
|
|
178
190
|
setDescriptionValue('');
|
|
179
191
|
setIsUpdateClickedToShowError(false);
|
|
192
|
+
setSeverityUpdating(caseOverviewDispatch, false);
|
|
180
193
|
}
|
|
181
194
|
});
|
|
182
195
|
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -190,64 +203,73 @@ export default function UpdateSeverityModal(props) {
|
|
|
190
203
|
}
|
|
191
204
|
const ftsUpdateComment = getFtsUpdateComment();
|
|
192
205
|
// Severity update successful comment body
|
|
193
|
-
const severityUpdateComment = t(
|
|
206
|
+
const severityUpdateComment = t(`<h4>Severity update</h4><p>Severity changed from {{oldSeverity}} to {{newSeverity}}</p>${isEmpty(ftsUpdateComment) ? '' : ftsUpdateComment}<h4>Description</h4><p>{{description}}</p>`, {
|
|
194
207
|
oldSeverity: caseDetails.caseSeverity,
|
|
195
208
|
newSeverity: updatedCaseDetails['severity'],
|
|
196
209
|
description: descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim(),
|
|
197
210
|
});
|
|
198
211
|
// Severity update failed comment body
|
|
199
|
-
const severityUpdateFailedComment = t('
|
|
212
|
+
const severityUpdateFailedComment = t('<h4>Severity update</h4><p>Failed to change severity from {{oldSeverity}} to {{newSeverity}}. Please try again</p>', {
|
|
200
213
|
oldSeverity: caseDetails.caseSeverity,
|
|
201
|
-
|
|
214
|
+
newSeverity: updatedCaseDetails['severity'],
|
|
202
215
|
});
|
|
203
216
|
try {
|
|
204
217
|
setSeverityUpdating(caseOverviewDispatch, true);
|
|
205
|
-
yield
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
218
|
+
yield updateSeverityViaGraphQL(updatedCaseDetails);
|
|
219
|
+
setSeverityUpdating(caseOverviewDispatch, false);
|
|
220
|
+
const newSeverity = updatedCaseDetails['severity'];
|
|
221
|
+
setCurrentSeverity(newSeverity);
|
|
222
|
+
onSuccessfulSubmit();
|
|
223
|
+
ToastNotification.addSuccessMessage(t('Severity has been successfully updated'));
|
|
224
|
+
void (() => __awaiter(this, void 0, void 0, function* () {
|
|
212
225
|
try {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
226
|
+
yield postComment({
|
|
227
|
+
commentBody: severityUpdateComment === null || severityUpdateComment === void 0 ? void 0 : severityUpdateComment.trim(),
|
|
228
|
+
contentType: 'markdown',
|
|
229
|
+
updateDiscussionState: true,
|
|
230
|
+
});
|
|
231
|
+
try {
|
|
232
|
+
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), caseDetails.caseStatus, {
|
|
233
|
+
apolloClient: client,
|
|
234
|
+
caseNumber: caseDetails.caseNumber,
|
|
235
|
+
existingCaseDetails,
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
catch (e) {
|
|
239
|
+
yield postComment({
|
|
240
|
+
commentBody: severityUpdateFailedComment === null || severityUpdateFailedComment === void 0 ? void 0 : severityUpdateFailedComment.trim(),
|
|
241
|
+
contentType: 'markdown',
|
|
242
|
+
updateDiscussionState: true,
|
|
243
|
+
});
|
|
244
|
+
caseUpdateError.showError(e, t(`Failed to update case status. Please try again`));
|
|
245
|
+
yield updateSeverityViaGraphQL({
|
|
246
|
+
status: 'Waiting on Customer Action Required',
|
|
247
|
+
severity: updatedCaseDetails['severity'],
|
|
248
|
+
});
|
|
249
|
+
}
|
|
217
250
|
}
|
|
218
251
|
catch (e) {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
contentType: 'markdown',
|
|
252
|
+
caseUpdateError.showError(e, t(`Couldn't post severity update comment. Please try again`));
|
|
253
|
+
yield updateSeverityViaGraphQL({
|
|
254
|
+
severity: caseDetails.caseSeverity,
|
|
223
255
|
});
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
256
|
+
setCurrentSeverity(caseDetails.caseSeverity);
|
|
257
|
+
reUpdateSeverity(caseDetails.caseSeverity);
|
|
258
|
+
setSeverityUpdating(caseOverviewDispatch, false);
|
|
227
259
|
}
|
|
228
|
-
}
|
|
229
|
-
catch (e) {
|
|
230
|
-
onClose();
|
|
231
|
-
caseUpdateError.showError(e, t(`Couldn't post severity update comment. Please try again`));
|
|
232
|
-
yield updateCaseDetails(caseDispatch, caseDetails.caseNumber, {
|
|
233
|
-
severity: caseDetails.caseSeverity,
|
|
234
|
-
});
|
|
235
|
-
setDescriptionValue(descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim());
|
|
236
|
-
reUpdateSeverity(caseDetails.caseSeverity);
|
|
237
|
-
setSeverityUpdating(caseOverviewDispatch, false);
|
|
238
|
-
}
|
|
260
|
+
}))();
|
|
239
261
|
}
|
|
240
262
|
catch (e) {
|
|
263
|
+
setSeverityUpdating(caseOverviewDispatch, false);
|
|
241
264
|
onClose();
|
|
242
265
|
caseUpdateError.showError(e, t('Severity failed to update'));
|
|
243
|
-
yield
|
|
266
|
+
yield updateSeverityViaGraphQL({
|
|
244
267
|
severity: caseDetails.caseSeverity,
|
|
245
268
|
});
|
|
246
269
|
reUpdateSeverity(caseDetails.caseSeverity);
|
|
247
270
|
setDescriptionValue(descriptionValue === null || descriptionValue === void 0 ? void 0 : descriptionValue.trim());
|
|
248
271
|
}
|
|
249
272
|
finally {
|
|
250
|
-
yield updateDiscussionStateComments(dispatchDiscussion, caseDispatch, caseDetails.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
251
273
|
setIsUpdateClickedToShowError(false);
|
|
252
274
|
setDescriptionValue('');
|
|
253
275
|
}
|
|
@@ -265,14 +287,12 @@ export default function UpdateSeverityModal(props) {
|
|
|
265
287
|
if (isEmpty(updatedCaseDetails)) {
|
|
266
288
|
return false;
|
|
267
289
|
}
|
|
268
|
-
|
|
290
|
+
if (isEqual(caseDetails.caseSeverity, currentSeverity) &&
|
|
269
291
|
isEqual(caseDetails.fts, localFts) &&
|
|
270
292
|
isEqual(caseDetails.contactInfo24x7, localFtsContact)) {
|
|
271
293
|
return false;
|
|
272
294
|
}
|
|
273
|
-
|
|
274
|
-
return true;
|
|
275
|
-
}
|
|
295
|
+
return true;
|
|
276
296
|
};
|
|
277
297
|
const onFtsChange = (e) => {
|
|
278
298
|
if (canEditCase.alert())
|
|
@@ -287,8 +307,9 @@ export default function UpdateSeverityModal(props) {
|
|
|
287
307
|
if (!e.target.checked) {
|
|
288
308
|
return;
|
|
289
309
|
}
|
|
290
|
-
|
|
291
|
-
|
|
310
|
+
const ownerPhone = `${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`;
|
|
311
|
+
setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { contactInfo24x7: ownerPhone })));
|
|
312
|
+
setLocalFtsContact(ownerPhone);
|
|
292
313
|
};
|
|
293
314
|
const onFtsContactChange = (e) => {
|
|
294
315
|
if (canEditCase.alert())
|
|
@@ -296,22 +317,50 @@ export default function UpdateSeverityModal(props) {
|
|
|
296
317
|
setLocalFtsContact(e.target.value);
|
|
297
318
|
setUpdatedCaseDetails((pre) => (Object.assign(Object.assign({}, pre), { contactInfo24x7: e.target.value.trim() })));
|
|
298
319
|
};
|
|
299
|
-
|
|
300
|
-
const
|
|
320
|
+
const isUpdateValid = checkIsUpdateValid();
|
|
321
|
+
const isDescriptionDisabled = (caseOverviewState.caseSeverityUpdating && isCaseUpdating) || isPostingComment || !isUpdateValid;
|
|
322
|
+
const isSubmitButtonDisabled = !(isUpdateValid && isTextAreaValid());
|
|
301
323
|
// To handle the severity change
|
|
302
|
-
const onSeverityChange = (
|
|
324
|
+
const onSeverityChange = (_event, value) => {
|
|
303
325
|
if (canEditCase.alert())
|
|
304
326
|
return;
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
327
|
+
const option = typeof value === 'object' && value !== null && 'name' in value
|
|
328
|
+
? value
|
|
329
|
+
: filteredSeverities.find((s) => s.name === value) || {
|
|
330
|
+
name: String(value),
|
|
331
|
+
disabled: false,
|
|
332
|
+
label: String(value),
|
|
333
|
+
additionalInfo: '',
|
|
334
|
+
};
|
|
335
|
+
// Re-selecting the previously saved severity: reset and keep description/Update disabled
|
|
336
|
+
if (isEqual(caseDetails.caseSeverity, option.name)) {
|
|
337
|
+
setCurrentSeverity(option.name);
|
|
338
|
+
setUpdatedCaseDetails({});
|
|
339
|
+
setLocalFts(isUndefined(fts) ? true : !!fts);
|
|
340
|
+
setLocalFtsContact(contactInfo24x7 || '');
|
|
341
|
+
setCaseState(caseDispatch, { ftsContactSameAsOwner: initialContactSameAsOwnerRef.current });
|
|
342
|
+
setDescriptionValue('');
|
|
343
|
+
setIsUpdateClickedToShowError(false);
|
|
344
|
+
setIsSeverityInValidLocal(option);
|
|
345
|
+
setIsOpen(false);
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
if (isSev1(option.name) && (hasPremiumSla || isEmpty(entitlementSla))) {
|
|
308
349
|
setLocalFts(true);
|
|
309
350
|
setLocalFtsContact('');
|
|
310
351
|
setCaseState(caseDispatch, { ftsContactSameAsOwner: false });
|
|
311
|
-
setUpdatedCaseDetails(
|
|
352
|
+
setUpdatedCaseDetails({
|
|
353
|
+
severity: option.name,
|
|
354
|
+
fts: !isIdea,
|
|
355
|
+
contactInfo24x7: '',
|
|
356
|
+
});
|
|
312
357
|
}
|
|
313
358
|
else {
|
|
314
|
-
|
|
359
|
+
const ftsForSeverity = isIdea
|
|
360
|
+
? false
|
|
361
|
+
: getFtsForSeverityChange(caseDetails.entitlementSla, option.name, { isCaseEdit: true });
|
|
362
|
+
setLocalFts(ftsForSeverity);
|
|
363
|
+
setUpdatedCaseDetails({ severity: option.name, fts: ftsForSeverity });
|
|
315
364
|
}
|
|
316
365
|
setCurrentSeverity(option.name);
|
|
317
366
|
updateState(option.name);
|
|
@@ -360,8 +409,8 @@ export default function UpdateSeverityModal(props) {
|
|
|
360
409
|
]);
|
|
361
410
|
useEffect(() => {
|
|
362
411
|
const phone = `${phoneCountryCode}-${phoneAreaCodePrefixLineNumber}`;
|
|
363
|
-
setLocalFts(fts);
|
|
364
|
-
setLocalFtsContact(contactInfo24x7);
|
|
412
|
+
setLocalFts(isUndefined(fts) ? true : fts);
|
|
413
|
+
setLocalFtsContact(contactInfo24x7 || '');
|
|
365
414
|
if (contactInfo24x7 === phone) {
|
|
366
415
|
setCaseState(caseDispatch, { ftsContactSameAsOwner: true });
|
|
367
416
|
}
|
|
@@ -383,23 +432,21 @@ export default function UpdateSeverityModal(props) {
|
|
|
383
432
|
React.createElement(FlexItem, null, selectedSeverity.label || t(`Select a severity`)),
|
|
384
433
|
React.createElement(FlexItem, null, isFetching || versionsDetails.isFetching ? React.createElement(Spinner, { size: "md" }) : '')))), shouldFocusToggleOnSelect: true, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
|
|
385
434
|
React.createElement(DropdownList, null, allCaseSeverities.data
|
|
386
|
-
? filteredSeverities.map((option) => (React.createElement(DropdownItem, { value: option, key: option.name, description: option.additionalInfo }, option.label)))
|
|
435
|
+
? filteredSeverities.map((option) => (React.createElement(DropdownItem, { value: option.name, key: option.name, description: option.additionalInfo }, option.label)))
|
|
387
436
|
: []))),
|
|
388
437
|
React.createElement("div", null,
|
|
389
438
|
React.createElement("label", { htmlFor: "date-input", className: "pf-v6-u-mt-md" },
|
|
390
439
|
React.createElement(Trans, null, "Describe update"),
|
|
391
440
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
392
|
-
React.createElement(TextArea, { placeholder: t('How has the business impact changed? If you have increased severity, please explain why.'), isDisabled: (
|
|
393
|
-
isPostingComment ||
|
|
394
|
-
!checkIsUpdateValid(), value: descriptionValue, onChange: (_event, value) => handleTextAreaChange(value), resizeOrientation: "vertical", "aria-label": "severity-update-descritpion", validated: isEmpty(descriptionValue) && isUpdateClickedToShowError ? 'error' : 'default', isRequired: true }),
|
|
441
|
+
React.createElement(TextArea, { placeholder: t('How has the business impact changed? If you have increased severity, please explain why.'), isDisabled: isDescriptionDisabled, value: descriptionValue, onChange: (_event, value) => handleTextAreaChange(value), resizeOrientation: "vertical", "aria-label": "severity-update-descritpion", validated: isEmpty(descriptionValue) && isUpdateClickedToShowError ? 'error' : 'default', isRequired: true }),
|
|
395
442
|
React.createElement("div", { className: "pf-v6-u-mt-xs" },
|
|
396
443
|
React.createElement(Trans, null, "To view your comment, go to the Discussion tab."))),
|
|
397
|
-
|
|
444
|
+
shouldShowFts && (React.createElement("div", { className: "pf-v6-u-mt-md pf-v6-u-mb-sm" },
|
|
398
445
|
React.createElement("div", null,
|
|
399
446
|
React.createElement("input", { type: "checkbox", id: "update-severity-fts", "data-tracking-id": "update-severity-fts", name: "update-severity-fts", checked: localFts, onChange: onFtsChange }),
|
|
400
447
|
React.createElement("label", { htmlFor: "update-severity-fts" },
|
|
401
448
|
React.createElement(Trans, null, "24x7 Support"))),
|
|
402
|
-
localFts && (React.createElement("div", null,
|
|
449
|
+
(localFts || isSev1(currentSeverity)) && (React.createElement("div", null,
|
|
403
450
|
React.createElement("label", { htmlFor: "update-severity-24-7-contact", className: "pf-v6-u-mt-xs" },
|
|
404
451
|
React.createElement(Trans, null, "Contact for 24x7 support")),
|
|
405
452
|
React.createElement("div", null,
|
|
@@ -419,8 +466,9 @@ export default function UpdateSeverityModal(props) {
|
|
|
419
466
|
React.createElement("p", { className: "pf-v6-u-text-color-subtle pf-v6-u-font-size-sm pf-v6-u-mb-md" }, t('Describing your update helps us better assist you.')),
|
|
420
467
|
modalBody()),
|
|
421
468
|
React.createElement(ModalFooter, null,
|
|
422
|
-
React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, isLoading: isCaseUpdating || isPostingComment, "data-tracking-id": "update-severity-submit", isDisabled:
|
|
423
|
-
|
|
424
|
-
|
|
469
|
+
React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, isLoading: isCaseUpdating || isPostingComment, "data-tracking-id": "update-severity-submit", isDisabled: (isPreviousSeveritySelected && !onlyFtsInfoChanged) ||
|
|
470
|
+
(!isUpdateClickedToShowError && isUpdateValid
|
|
471
|
+
? false
|
|
472
|
+
: isSubmitButtonDisabled || isCaseUpdating || isPostingComment) }, t('Update')),
|
|
425
473
|
React.createElement(Button, { key: "back", variant: "link", onClick: onCancel, "data-tracking-id": "update-severity-cancel", isDisabled: isCaseUpdating || isPostingComment }, t('Cancel')))));
|
|
426
474
|
}
|