@rh-support/troubleshoot 2.6.354 → 2.6.357
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 +76 -45
- 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 +23 -10
- 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 +132 -57
- 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 +103 -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 +21 -13
- 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 +110 -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 +22 -3
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +15 -22
- 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 +16 -18
- 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 +104 -62
- 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 +21 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +210 -34
- 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 +116 -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/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 +21 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +91 -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 +117 -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 +279 -99
- 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
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { Label, MenuToggle, Select, SelectList, SelectOption, Spinner, } from '@patternfly/react-core';
|
|
11
|
+
import { ToastNotification } from '@rh-support/components';
|
|
12
|
+
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
13
|
+
import isEqual from 'lodash/isEqual';
|
|
14
|
+
import React, { useContext, useState } from 'react';
|
|
15
|
+
import { Trans, useTranslation } from 'react-i18next';
|
|
16
|
+
import { Link } from 'react-router-dom';
|
|
17
|
+
import { useCaseSelector } from '../../context/CaseContext';
|
|
18
|
+
import { useCaseLabelLinks } from '../../hooks/useCaseLabelLinkMutations';
|
|
19
|
+
const NUM_VISIBLE_LABELS = 3;
|
|
20
|
+
export default function CaseLabels() {
|
|
21
|
+
const { t } = useTranslation();
|
|
22
|
+
const canEditCase = useCanEditCase();
|
|
23
|
+
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
24
|
+
const isOrgAdmin = loggedInUser.data.isOrgAdmin;
|
|
25
|
+
const { caseId, salesforceAccountId } = useCaseSelector((state) => {
|
|
26
|
+
var _a, _b;
|
|
27
|
+
return ({
|
|
28
|
+
caseId: state.caseDetails.id,
|
|
29
|
+
salesforceAccountId: (_b = (_a = state.selectedAccountDetails) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.salesforceAccountId,
|
|
30
|
+
});
|
|
31
|
+
}, isEqual);
|
|
32
|
+
const { availableLabels, assignedLinks, selectedLabelIds, loading, mutating, setAssignedLinks, createLink, deleteLink, } = useCaseLabelLinks(salesforceAccountId, caseId);
|
|
33
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
34
|
+
const handleSelect = (_event, labelId) => __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
if (!labelId || typeof labelId !== 'string')
|
|
36
|
+
return;
|
|
37
|
+
if (canEditCase.alert())
|
|
38
|
+
return;
|
|
39
|
+
const existingLink = assignedLinks.find((link) => link.labelId === labelId);
|
|
40
|
+
try {
|
|
41
|
+
if (existingLink) {
|
|
42
|
+
yield deleteLink(existingLink.linkId);
|
|
43
|
+
setAssignedLinks((prev) => prev.filter((link) => link.linkId !== existingLink.linkId));
|
|
44
|
+
ToastNotification.addSuccessMessage(t('Label has been removed'));
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
const newId = yield createLink(caseId, labelId);
|
|
48
|
+
if (newId) {
|
|
49
|
+
setAssignedLinks((prev) => [...prev, { linkId: newId, labelId }]);
|
|
50
|
+
}
|
|
51
|
+
ToastNotification.addSuccessMessage(t('Label has been added'));
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
catch (_a) {
|
|
55
|
+
ToastNotification.addDangerMessage(t('Failed to update labels'));
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
const handleChipRemove = (labelId) => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
if (canEditCase.alert())
|
|
60
|
+
return;
|
|
61
|
+
const link = assignedLinks.find((l) => l.labelId === labelId);
|
|
62
|
+
if (!link)
|
|
63
|
+
return;
|
|
64
|
+
try {
|
|
65
|
+
yield deleteLink(link.linkId);
|
|
66
|
+
setAssignedLinks((prev) => prev.filter((l) => l.linkId !== link.linkId));
|
|
67
|
+
ToastNotification.addSuccessMessage(t('Label has been removed'));
|
|
68
|
+
}
|
|
69
|
+
catch (_a) {
|
|
70
|
+
ToastNotification.addDangerMessage(t('Failed to remove label'));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
const selectedLabels = availableLabels.filter((l) => selectedLabelIds.includes(l.id));
|
|
74
|
+
const haltEvent = (e) => e.stopPropagation();
|
|
75
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: () => setIsOpen((prev) => !prev), isExpanded: isOpen, isDisabled: loading ||
|
|
76
|
+
mutating ||
|
|
77
|
+
!caseId ||
|
|
78
|
+
(!isOrgAdmin && availableLabels.length === 0) ||
|
|
79
|
+
canEditCase.isCaseNotEditable, isFullWidth: true, style: { height: '36px' } }, loading || mutating ? (React.createElement(Spinner, { size: "md" })) : selectedLabels.length > 0 ? (React.createElement("span", { style: { display: 'flex', gap: '8px', alignItems: 'center', flexWrap: 'nowrap' } },
|
|
80
|
+
selectedLabels.slice(0, NUM_VISIBLE_LABELS).map((label) => (React.createElement(Label, { key: label.id, variant: "outline", onClose: () => handleChipRemove(label.id), closeBtnAriaLabel: t('Remove label {{name}}', { name: label.name }), onClick: haltEvent }, label.name))),
|
|
81
|
+
selectedLabels.length > NUM_VISIBLE_LABELS && (React.createElement("span", { style: {
|
|
82
|
+
color: 'var(--pf-t--global--text--color--link--default)',
|
|
83
|
+
fontSize: '12px',
|
|
84
|
+
whiteSpace: 'nowrap',
|
|
85
|
+
cursor: 'pointer',
|
|
86
|
+
} }, t('{{count}} more', { count: selectedLabels.length - NUM_VISIBLE_LABELS }))))) : availableLabels.length === 0 ? (t('No label assigned')) : (t('Select labels'))));
|
|
87
|
+
if (!caseId)
|
|
88
|
+
return null;
|
|
89
|
+
return (React.createElement("div", { className: "form-group" },
|
|
90
|
+
React.createElement("label", { htmlFor: "case-labels" },
|
|
91
|
+
React.createElement(Trans, null, "Labels")),
|
|
92
|
+
React.createElement(Select, { id: "case-labels", "data-tracking-id": "case-labels", role: "menu", isOpen: isOpen, onSelect: handleSelect, onOpenChange: () => setIsOpen(false), toggle: toggle, shouldFocusFirstItemOnOpen: false, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
|
|
93
|
+
React.createElement(SelectList, { id: "case-labels-listbox" }, availableLabels.map((label) => (React.createElement(SelectOption, { key: label.id, value: label.id, hasCheckbox: true, isSelected: selectedLabelIds.includes(label.id) }, label.name))))),
|
|
94
|
+
!loading && availableLabels.length === 0 && (React.createElement("p", { className: "form-instructions" }, isOrgAdmin ? (React.createElement(Trans, null,
|
|
95
|
+
React.createElement("strong", null, "No labels available:"),
|
|
96
|
+
" You haven't created any labels yet.",
|
|
97
|
+
' ',
|
|
98
|
+
React.createElement(Link, { to: "/manage/case-labels", style: { textDecoration: 'none' }, onClick: () => window.scrollTo(0, 0) }, "Create a label"),
|
|
99
|
+
' ',
|
|
100
|
+
"to start organizing your cases.")) : (React.createElement(Trans, null,
|
|
101
|
+
React.createElement("strong", null, "No labels available:"),
|
|
102
|
+
" Your organization admin hasn't created any labels yet. Contact them to add labels before you can select one."))))));
|
|
103
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAsC/D,wBAAgB,kBAAkB,sBAwZjC"}
|
|
@@ -7,10 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
11
11
|
import { ValidatedOptions } from '@patternfly/react-core';
|
|
12
12
|
import { getPhoneObj, PhoneInput } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
14
|
+
import { GET_ACCOUNT_CONTACTS } from '@rh-support/utils';
|
|
14
15
|
import isEmpty from 'lodash/isEmpty';
|
|
15
16
|
import isEqual from 'lodash/isEqual';
|
|
16
17
|
import isUndefined from 'lodash/isUndefined';
|
|
@@ -24,13 +25,33 @@ import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
|
|
|
24
25
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
25
26
|
import { removeAllChars, trimAndReplacePlus } from '../shared/utils';
|
|
26
27
|
import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
|
|
28
|
+
function fetchContactBySSO(apolloClient, accountNumber, ssoUsername) {
|
|
29
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
31
|
+
const { data } = yield apolloClient.query({
|
|
32
|
+
query: GET_ACCOUNT_CONTACTS,
|
|
33
|
+
variables: {
|
|
34
|
+
accountNumber: { eq: accountNumber },
|
|
35
|
+
contactsWhere: { SSOUserName__c: { eq: ssoUsername } },
|
|
36
|
+
first: 1,
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
const response = data;
|
|
40
|
+
const contactNode = (_j = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Contacts) === null || _g === void 0 ? void 0 : _g.edges) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.node;
|
|
41
|
+
return {
|
|
42
|
+
phone: (_l = (_k = contactNode === null || contactNode === void 0 ? void 0 : contactNode.Phone) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : '',
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
}
|
|
27
46
|
export function ContactPhoneNumber() {
|
|
28
|
-
const
|
|
47
|
+
const apolloClient = useApolloClient();
|
|
48
|
+
const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', hasLoggedInUserConfirmedPhoneNumber, contactSSOName, accountNumberRef, shouldNotSetPhoneCountryCode, isCasePhoneUpdating, } = useCaseSelector((state) => ({
|
|
29
49
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
30
50
|
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
31
51
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
32
52
|
hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
|
|
33
53
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
54
|
+
accountNumberRef: state.caseDetails.accountNumberRef,
|
|
34
55
|
shouldNotSetPhoneCountryCode: state.shouldNotSetPhoneCountryCode,
|
|
35
56
|
isCasePhoneUpdating: state.isCasePhoneUpdating,
|
|
36
57
|
}), isEqual);
|
|
@@ -57,6 +78,7 @@ export function ContactPhoneNumber() {
|
|
|
57
78
|
};
|
|
58
79
|
const onPhoneChange = (fullPhone) => {
|
|
59
80
|
setLocalFullPhone(checkingPlusInLocalFullPhone(fullPhone));
|
|
81
|
+
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: true });
|
|
60
82
|
if (!shouldNotSetPhoneCountryCode) {
|
|
61
83
|
setCaseDetails(caseDispatch, {
|
|
62
84
|
phoneAreaCodePrefixLineNumber: getPhoneObj(fullPhone).phoneLine,
|
|
@@ -68,12 +90,17 @@ export function ContactPhoneNumber() {
|
|
|
68
90
|
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: false });
|
|
69
91
|
}
|
|
70
92
|
setCaseDetails(caseDispatch, {
|
|
93
|
+
// TODO: Temporary — do not prepend + for portal phone without country code.
|
|
94
|
+
phoneAreaCodePrefixLineNumber: fullPhone.trim().replace(/^\+/, ''),
|
|
95
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
71
96
|
phoneAreaCodePrefixLineNumber: checkingPlusInLocalFullPhone(fullPhone),
|
|
97
|
+
*/
|
|
72
98
|
phoneCountryCode: '',
|
|
73
99
|
});
|
|
74
100
|
}
|
|
75
101
|
};
|
|
76
102
|
const onCountryCodeChange = (phoneCountryCode) => {
|
|
103
|
+
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: true });
|
|
77
104
|
setCaseDetails(caseDispatch, { phoneCountryCode });
|
|
78
105
|
};
|
|
79
106
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
@@ -88,7 +115,7 @@ export function ContactPhoneNumber() {
|
|
|
88
115
|
!isNextBtnClickedToShowValidationError &&
|
|
89
116
|
!isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
90
117
|
(isEqual(suppliedPhoneNumberVerified, 'False') || isUndefined(suppliedPhoneNumberVerified))
|
|
91
|
-
? ValidatedOptions.
|
|
118
|
+
? ValidatedOptions.default
|
|
92
119
|
: getPhone.length > PHONE_LIMIT
|
|
93
120
|
? ValidatedOptions.error
|
|
94
121
|
: isNextBtnClickedToShowValidationError &&
|
|
@@ -114,6 +141,7 @@ export function ContactPhoneNumber() {
|
|
|
114
141
|
setLocalFullPhone('');
|
|
115
142
|
setCaseState(caseDispatch, { isCasePhoneUpdating: true });
|
|
116
143
|
const initContactPhoneNumber = () => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
var _a, _b;
|
|
117
145
|
let _phoneAreaCodePrefixLineNumber;
|
|
118
146
|
let _phoneCountryCode;
|
|
119
147
|
let _suppliedPhoneNumberVerified;
|
|
@@ -131,20 +159,41 @@ export function ContactPhoneNumber() {
|
|
|
131
159
|
}
|
|
132
160
|
else {
|
|
133
161
|
// User is openning a case for the first time
|
|
134
|
-
|
|
162
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
163
|
+
const phoneLength = trimAndReplacePlus(removeAllChars(loggedInUser.data.phone!)).length;
|
|
164
|
+
|
|
135
165
|
// For first time user whose phone is fetched from portal without country code
|
|
136
166
|
// For phone length less or equal to 10 country code shouldn't be fetched to avoid faulty phone population
|
|
137
167
|
if (phoneLength > 10) {
|
|
138
|
-
const phoneLine = getPhoneObj(loggedInUser.data.phone).phoneLine || '';
|
|
139
|
-
const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode;
|
|
168
|
+
const phoneLine = getPhoneObj(loggedInUser.data.phone!).phoneLine || '';
|
|
169
|
+
const countryCode = getPhoneObj(loggedInUser.data.phone!).countryCode;
|
|
170
|
+
|
|
140
171
|
_phoneAreaCodePrefixLineNumber = phoneLine;
|
|
141
172
|
_phoneCountryCode = countryCode;
|
|
173
|
+
} else {
|
|
174
|
+
setCaseState(caseDispatch, {
|
|
175
|
+
shouldNotSetPhoneCountryCode: true,
|
|
176
|
+
});
|
|
177
|
+
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone!;
|
|
178
|
+
_phoneCountryCode = '';
|
|
179
|
+
setPortalPhone(loggedInUser.data.phone!);
|
|
180
|
+
}
|
|
181
|
+
*/
|
|
182
|
+
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format
|
|
183
|
+
const explicitPhoneMatch = (_a = loggedInUser.data.phone) === null || _a === void 0 ? void 0 : _a.trim().match(/^\+(\d+)-(.+)$/);
|
|
184
|
+
if (explicitPhoneMatch) {
|
|
185
|
+
_phoneCountryCode = `+${explicitPhoneMatch[1]}`;
|
|
186
|
+
_phoneAreaCodePrefixLineNumber = explicitPhoneMatch[2];
|
|
142
187
|
}
|
|
143
188
|
else {
|
|
144
189
|
setCaseState(caseDispatch, {
|
|
145
190
|
shouldNotSetPhoneCountryCode: true,
|
|
146
191
|
});
|
|
147
|
-
|
|
192
|
+
// TODO: Temporary — strip leading + when phone is not in +{countryCode}-{phoneLine} format.
|
|
193
|
+
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone.replace(/^\+/, '');
|
|
194
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
195
|
+
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone!;
|
|
196
|
+
*/
|
|
148
197
|
_phoneCountryCode = '';
|
|
149
198
|
setPortalPhone(loggedInUser.data.phone);
|
|
150
199
|
}
|
|
@@ -156,32 +205,43 @@ export function ContactPhoneNumber() {
|
|
|
156
205
|
}
|
|
157
206
|
}
|
|
158
207
|
else {
|
|
159
|
-
// user is
|
|
208
|
+
// user is opening case for others (user is partner or red hatter)
|
|
160
209
|
try {
|
|
161
210
|
if (!contactSSOName)
|
|
162
211
|
return;
|
|
163
212
|
setIsFetchingSso(true);
|
|
164
|
-
const selectedContact = yield
|
|
213
|
+
const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
|
|
165
214
|
setIsFetchingSso(false);
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
215
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
216
|
+
const phoneLength = trimAndReplacePlus(removeAllChars(selectedContact.phone)).length;
|
|
217
|
+
|
|
218
|
+
if (phoneLength > 10) {
|
|
219
|
+
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
220
|
+
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
221
|
+
} else {
|
|
222
|
+
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
223
|
+
_phoneCountryCode = '';
|
|
224
|
+
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
225
|
+
setPortalPhone(selectedContact.phone);
|
|
226
|
+
}
|
|
227
|
+
*/
|
|
228
|
+
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format (e.g. +93-895674341).
|
|
229
|
+
const explicitPhoneMatch = (_b = selectedContact.phone) === null || _b === void 0 ? void 0 : _b.trim().match(/^\+(\d+)-(.+)$/);
|
|
230
|
+
if (explicitPhoneMatch) {
|
|
231
|
+
_phoneCountryCode = `+${explicitPhoneMatch[1]}`;
|
|
232
|
+
_phoneAreaCodePrefixLineNumber = explicitPhoneMatch[2];
|
|
170
233
|
}
|
|
171
234
|
else {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
181
|
-
setPortalPhone(selectedContact.phone);
|
|
182
|
-
}
|
|
183
|
-
_suppliedPhoneNumberVerified = 'Deferred';
|
|
235
|
+
// TODO: Temporary — strip leading + when phone is not in +{countryCode}-{phoneLine} format.
|
|
236
|
+
_phoneAreaCodePrefixLineNumber = selectedContact.phone.replace(/^\+/, '');
|
|
237
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
238
|
+
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
239
|
+
*/
|
|
240
|
+
_phoneCountryCode = '';
|
|
241
|
+
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
242
|
+
setPortalPhone(selectedContact.phone);
|
|
184
243
|
}
|
|
244
|
+
_suppliedPhoneNumberVerified = 'Deferred';
|
|
185
245
|
}
|
|
186
246
|
catch (e) {
|
|
187
247
|
_phoneAreaCodePrefixLineNumber = '';
|
|
@@ -196,9 +256,19 @@ export function ContactPhoneNumber() {
|
|
|
196
256
|
phoneCountryCode: _phoneCountryCode,
|
|
197
257
|
suppliedPhoneNumberVerified: _suppliedPhoneNumberVerified,
|
|
198
258
|
});
|
|
259
|
+
// TODO: Temporary — do not prepend + when country code is not set.
|
|
260
|
+
const _localFullPhone = isEmpty(_phoneCountryCode)
|
|
261
|
+
? (_phoneAreaCodePrefixLineNumber === null || _phoneAreaCodePrefixLineNumber === void 0 ? void 0 : _phoneAreaCodePrefixLineNumber.trim()) || ''
|
|
262
|
+
: checkingPlusInLocalFullPhone(`${_phoneCountryCode} ${_phoneAreaCodePrefixLineNumber}`);
|
|
263
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
199
264
|
let _localFullPhone = _phoneCountryCode + ' ' + _phoneAreaCodePrefixLineNumber;
|
|
200
265
|
setLocalFullPhone(checkingPlusInLocalFullPhone(_localFullPhone));
|
|
201
|
-
|
|
266
|
+
*/
|
|
267
|
+
setLocalFullPhone(_localFullPhone);
|
|
268
|
+
setCaseState(caseDispatch, {
|
|
269
|
+
isCasePhoneUpdating: false,
|
|
270
|
+
hasUserUpdatedSuppliedPhone: false,
|
|
271
|
+
});
|
|
202
272
|
});
|
|
203
273
|
// if phone not initialized with portal and user contact value, initialize it else populate phone inputbox
|
|
204
274
|
if (isEmpty(phoneAreaCodePrefixLineNumber) && isEmpty(phoneCountryCode)) {
|
|
@@ -213,12 +283,11 @@ export function ContactPhoneNumber() {
|
|
|
213
283
|
try {
|
|
214
284
|
if (!contactSSOName)
|
|
215
285
|
return;
|
|
216
|
-
const selectedContact = yield
|
|
217
|
-
if (isEmpty(selectedContact.
|
|
218
|
-
!isEmpty(selectedContact.phone)) {
|
|
286
|
+
const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
|
|
287
|
+
if (!isEmpty(selectedContact.phone)) {
|
|
219
288
|
portalPhone = selectedContact.phone;
|
|
220
289
|
phoneLength = trimAndReplacePlus(removeAllChars(portalPhone)).length;
|
|
221
|
-
supportPhone =
|
|
290
|
+
supportPhone = '';
|
|
222
291
|
}
|
|
223
292
|
}
|
|
224
293
|
catch (e) {
|
|
@@ -252,7 +321,15 @@ export function ContactPhoneNumber() {
|
|
|
252
321
|
phoneLength <= 10) {
|
|
253
322
|
setPortalPhone(portalPhone);
|
|
254
323
|
}
|
|
255
|
-
|
|
324
|
+
// TODO: Temporary — do not prepend + when country code is not set.
|
|
325
|
+
setLocalFullPhone(isEmpty(phoneCountryCode)
|
|
326
|
+
? (phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.trim()) || ''
|
|
327
|
+
: checkingPlusInLocalFullPhone((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim()));
|
|
328
|
+
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
329
|
+
setLocalFullPhone(
|
|
330
|
+
checkingPlusInLocalFullPhone((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim())
|
|
331
|
+
);
|
|
332
|
+
*/
|
|
256
333
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
257
334
|
}
|
|
258
335
|
});
|
|
@@ -3,7 +3,7 @@ import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-c
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Trans } from 'react-i18next';
|
|
5
5
|
export const ContactPhoneNumberPopOver = () => {
|
|
6
|
-
return (React.createElement(Popover, { "aria-label": "
|
|
7
|
-
React.createElement(Trans, null, "
|
|
6
|
+
return (React.createElement(Popover, { "aria-label": "Case owner phone number info", position: PopoverPosition.right, bodyContent: React.createElement("p", null,
|
|
7
|
+
React.createElement(Trans, null, "Changing the phone number here will only update the phone number for this case. It will not update the Case Owner's contact information in the Red Hat Support system.")), closeBtnAriaLabel: "Close" },
|
|
8
8
|
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-xs icon-size cursor-pointer", "aria-label": "Contact Phone Number Info", color: "#5e40be" })));
|
|
9
9
|
};
|
|
@@ -30,7 +30,7 @@ export default function Description(props) {
|
|
|
30
30
|
const caseDispatch = useCaseDispatch();
|
|
31
31
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
32
32
|
const breakPoint = useBreakpoint();
|
|
33
|
-
const isLgScreenHeight = breakPoint.lgh;
|
|
33
|
+
const isLgScreenHeight = breakPoint.lgh;
|
|
34
34
|
const [isOpen, setIsOpen] = useState(false);
|
|
35
35
|
const [hasShownPopover, setHasShownPopover] = useState(false);
|
|
36
36
|
const textAreaRef = useRef(null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDiag.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/FileDiag.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FileDiag.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/FileDiag.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,qBAoCrC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
2
|
-
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
3
2
|
import { PreviousCaseTypes } from '@rh-support/utils';
|
|
4
3
|
import isEqual from 'lodash/isEqual';
|
|
5
4
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -10,9 +9,9 @@ import FileEARule, { getValidAttachmentRules } from '../ImproveCase/FileEARule';
|
|
|
10
9
|
import { WidgetFileUploader } from '../shared/fileUpload/WidgetFileUploader';
|
|
11
10
|
export function FileDiag(props) {
|
|
12
11
|
const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
|
|
13
|
-
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
14
12
|
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
15
13
|
const { rulesState } = useContext(RulesStateContext);
|
|
14
|
+
const isSecureSupport = Boolean(loggedInUsersAccount.data.secureSupport);
|
|
16
15
|
const { caseType } = useCaseSelector((state) => ({
|
|
17
16
|
caseType: state.caseDetails.caseType,
|
|
18
17
|
}), isEqual);
|
|
@@ -20,7 +19,5 @@ export function FileDiag(props) {
|
|
|
20
19
|
useEffect(() => {
|
|
21
20
|
setIsIdea(caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT);
|
|
22
21
|
}, [caseType]);
|
|
23
|
-
|
|
24
|
-
return null;
|
|
25
|
-
return (React.createElement(WidgetFileUploader, { className: props.className, idToUploadTo: activeSessionId, isPrivate: false, needsAnalyzing: isIdea ? false : true, isSessionId: true, isSecureSupport: loggedInUsersAccount.data.secureSupport, autoUploadOnSelect: loggedInUsersAccount.data.secureSupport ? false : true, helperText: getValidAttachmentRules(rulesState.EARules.rules).length > 0 ? React.createElement(FileEARule, null) : null, isIdea: isIdea }));
|
|
22
|
+
return (React.createElement(WidgetFileUploader, { className: props.className, idToUploadTo: activeSessionId, isPrivate: false, needsAnalyzing: isIdea ? false : !isSecureSupport, isSessionId: true, isSecureSupport: isSecureSupport, autoUploadOnSelect: isSecureSupport ? false : true, helperText: getValidAttachmentRules(rulesState.EARules.rules).length > 0 ? React.createElement(FileEARule, null) : null, isIdea: isIdea }));
|
|
26
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBA+PzB;kBA/PQ,GAAG;;;AAkQZ,eAAe,GAAG,CAAC"}
|
|
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
10
11
|
import { InlineEdit, LoadingIndicator, TextAreaAutosize, ToastNotification, usePrevious } from '@rh-support/components';
|
|
11
12
|
import { useCanEditCase } from '@rh-support/react-context';
|
|
12
13
|
import { isFtsEditableOnEditPage, PreviousCaseTypes, showFtsOnCaseViewEditPage, showFtsOnCreateCasePage, } from '@rh-support/utils';
|
|
@@ -17,7 +18,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
17
18
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
18
19
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
19
20
|
import { CONTACT_INFO_24X7_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
20
|
-
import { setCaseDetails, setCaseState,
|
|
21
|
+
import { setCaseDetails, setCaseState, updateCaseSeverityAndFtsGraphQL } from '../../reducers/CaseReducer';
|
|
21
22
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
22
23
|
const defaultProps = {
|
|
23
24
|
inlineEditable: false,
|
|
@@ -27,17 +28,24 @@ const defaultProps = {
|
|
|
27
28
|
function Fts(props) {
|
|
28
29
|
const { t } = useTranslation();
|
|
29
30
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
const apolloClient = useApolloClient();
|
|
32
|
+
const { fts, contactInfo24x7, caseNumber, severity, entitlementSla, caseType, phoneCountryCode, phoneAreaCodePrefixLineNumber, ftsContactSameAsOwner, existingCaseDetails, accountHasPremiumSla, hasMultipleSlas, } = useCaseSelector((state) => {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
return ({
|
|
35
|
+
fts: state.caseDetails.fts,
|
|
36
|
+
caseNumber: state.caseDetails.caseNumber,
|
|
37
|
+
contactInfo24x7: state.caseDetails.contactInfo24x7,
|
|
38
|
+
severity: state.caseDetails.severity,
|
|
39
|
+
entitlementSla: state.caseDetails.entitlementSla,
|
|
40
|
+
caseType: state.caseDetails.caseType,
|
|
41
|
+
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
42
|
+
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
|
|
43
|
+
ftsContactSameAsOwner: state.ftsContactSameAsOwner,
|
|
44
|
+
existingCaseDetails: state.caseDetails,
|
|
45
|
+
accountHasPremiumSla: state.accountHasPremiumSla,
|
|
46
|
+
hasMultipleSlas: !!state.productServiceLevel && ((_b = (_a = state.otherServiceLevels) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0,
|
|
47
|
+
});
|
|
48
|
+
}, isEqual);
|
|
41
49
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
42
50
|
const { isExportingPDF } = useContext(PDFContext);
|
|
43
51
|
const caseDispatch = useCaseDispatch();
|
|
@@ -52,7 +60,9 @@ function Fts(props) {
|
|
|
52
60
|
const onCaseFtsContactUpdate = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
|
|
53
61
|
setFtsContactUpdating(true);
|
|
54
62
|
try {
|
|
55
|
-
yield
|
|
63
|
+
yield updateCaseSeverityAndFtsGraphQL(caseDispatch, apolloClient, caseNumber, caseDetails, severity, {
|
|
64
|
+
existingCaseDetails,
|
|
65
|
+
});
|
|
56
66
|
setFtsContactUpdating(false);
|
|
57
67
|
ToastNotification.addSuccessMessage(t(`Case has been successfully updated`));
|
|
58
68
|
}
|
|
@@ -64,7 +74,9 @@ function Fts(props) {
|
|
|
64
74
|
const onCaseFtsUpdate = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
|
|
65
75
|
setFtsUpdating(true);
|
|
66
76
|
try {
|
|
67
|
-
yield
|
|
77
|
+
yield updateCaseSeverityAndFtsGraphQL(caseDispatch, apolloClient, caseNumber, caseDetails, severity, {
|
|
78
|
+
existingCaseDetails,
|
|
79
|
+
});
|
|
68
80
|
setFtsUpdating(false);
|
|
69
81
|
ToastNotification.addSuccessMessage(t(`Case has been successfully updated`));
|
|
70
82
|
}
|
|
@@ -150,11 +162,13 @@ function Fts(props) {
|
|
|
150
162
|
}
|
|
151
163
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
152
164
|
}, [phoneAreaCodePrefixLineNumber, phoneCountryCode]);
|
|
153
|
-
const disableFtsNContact = !isEmpty(caseNumber) &&
|
|
165
|
+
const disableFtsNContact = !isEmpty(caseNumber) &&
|
|
166
|
+
(!isFtsEditableOnEditPage(entitlementSla, severity) || isFtsUpdating || canEditCase.isCaseNotEditable);
|
|
154
167
|
const maxLengthErrorMessage = t('Contact information cannot be more than {{limit}} characters.', {
|
|
155
168
|
limit: CONTACT_INFO_24X7_LIMIT,
|
|
156
169
|
});
|
|
157
|
-
|
|
170
|
+
const ftsCreateOptions = { accountHasPremiumSla, hasMultipleSlas };
|
|
171
|
+
if (isEmpty(caseNumber) && (!showFtsOnCreateCasePage(entitlementSla, severity, ftsCreateOptions) || isIdea))
|
|
158
172
|
return React.createElement(React.Fragment, null);
|
|
159
173
|
if (!isEmpty(caseNumber) && (isIdea || !showFtsOnCaseViewEditPage(entitlementSla, severity)))
|
|
160
174
|
return React.createElement(React.Fragment, null);
|
|
@@ -168,7 +182,7 @@ function Fts(props) {
|
|
|
168
182
|
React.createElement(LoadingIndicator, { size: "sm", isInline: true, show: isFtsUpdating, className: "pf-v6-u-ml-sm" })),
|
|
169
183
|
fts === true && (React.createElement(React.Fragment, null,
|
|
170
184
|
React.createElement(InlineEdit, { formClassName: "pf-v6-u-mb-md", labelProps: { htmlFor: 'get-support-24-7-contact' }, labelContent: React.createElement(Trans, null, "24x7 Contact"), allowInlineEdit: props.inlineEditable && !disableFtsNContact, hideSaveCancel: props.hideSaveCancel, initialIsEditing: props.initialIsEditing, content: contactInfo24x7, onSave: onSave, onCancel: onCancel, saveDisabled: isSaveDisabled, loadingIndicator: isFtsContactUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
171
|
-
React.createElement("input", { type: "checkbox", id: "same-as-case-owner-phone", name: "same-as-case-owner-phone", "data-tracking-id": "same-as-case-owner-phone", checked: ftsContactSameAsOwner, onChange: onSetContactSameAsOwner }),
|
|
185
|
+
React.createElement("input", { type: "checkbox", id: "same-as-case-owner-phone", name: "same-as-case-owner-phone", "data-tracking-id": "same-as-case-owner-phone", checked: ftsContactSameAsOwner, disabled: disableFtsNContact, onChange: onSetContactSameAsOwner }),
|
|
172
186
|
React.createElement("label", { htmlFor: "same-as-case-owner-phone", className: "pf-v6-u-font-weight-normal pf-v6-u-font-size-md" },
|
|
173
187
|
React.createElement(Trans, null, "Same as case owner's phone number")),
|
|
174
188
|
React.createElement(TextAreaAutosize, { id: "get-support-24-7-contact", className: `form-control`, name: "get-support-24-7-contact", value: contactInfo24X7State, onChange: (event) => onFtsContactChange(event.target.value), disabled: disableFtsNContact || ftsContactSameAsOwner, "data-tracking-id": "get-support-24-7-contact" }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAMvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAMvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAc5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,qBA0R9B;kBA1RQ,QAAQ;;;AA4RjB,eAAe,QAAQ,CAAC"}
|
|
@@ -27,16 +27,21 @@ const defaultProps = {
|
|
|
27
27
|
};
|
|
28
28
|
function Severity(props) {
|
|
29
29
|
const { t } = useTranslation();
|
|
30
|
-
const { product, version, caseNumber, severity, entitlementSla, ownersEntitlements, versionsDetails, caseType } = useCaseSelector((state) =>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
const { product, version, caseNumber, severity, entitlementSla, ownersEntitlements, versionsDetails, caseType, accountHasPremiumSla, hasMultipleSlas, } = useCaseSelector((state) => {
|
|
31
|
+
var _a, _b;
|
|
32
|
+
return ({
|
|
33
|
+
product: state.caseDetails.product,
|
|
34
|
+
version: state.caseDetails.version,
|
|
35
|
+
caseNumber: state.caseDetails.caseNumber,
|
|
36
|
+
severity: state.caseDetails.severity,
|
|
37
|
+
entitlementSla: state.caseDetails.entitlementSla,
|
|
38
|
+
ownersEntitlements: state.ownersEntitlements,
|
|
39
|
+
versionsDetails: state.versionsDetails,
|
|
40
|
+
caseType: state.caseDetails.caseType,
|
|
41
|
+
accountHasPremiumSla: state.accountHasPremiumSla,
|
|
42
|
+
hasMultipleSlas: !!state.productServiceLevel && ((_b = (_a = state.otherServiceLevels) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0,
|
|
43
|
+
});
|
|
44
|
+
}, isEqual);
|
|
40
45
|
const { globalMetadataState: { allCaseSeverities, allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
41
46
|
const { isExportingPDF } = useContext(PDFContext);
|
|
42
47
|
const [isSeverityInValid, setIsSeverityInValid] = useState(false);
|
|
@@ -46,13 +51,16 @@ function Severity(props) {
|
|
|
46
51
|
const caseDispatch = useCaseDispatch();
|
|
47
52
|
const isOnCaseDetailsPage = !isEmpty(caseNumber);
|
|
48
53
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
54
|
+
const ftsCreateOptions = { accountHasPremiumSla, hasMultipleSlas };
|
|
49
55
|
const updateState = (value) => {
|
|
50
56
|
const casePayload = {
|
|
51
57
|
severity: value,
|
|
52
58
|
};
|
|
53
|
-
//
|
|
54
|
-
!isOnCaseDetailsPage && (casePayload.fts = showFtsOnCreateCasePage(entitlementSla, value));
|
|
55
|
-
|
|
59
|
+
// Auto-enable 24x7 only for severity 1; uncheck it when leaving severity 1.
|
|
60
|
+
!isOnCaseDetailsPage && (casePayload.fts = showFtsOnCreateCasePage(entitlementSla, value, ftsCreateOptions));
|
|
61
|
+
if (isOnCaseDetailsPage) {
|
|
62
|
+
casePayload.fts = autoEnableFtsOnCaseViewEditPage(entitlementSla, value);
|
|
63
|
+
}
|
|
56
64
|
casePayload.fts = casePayload.fts && !isIdea;
|
|
57
65
|
if (isOnCaseDetailsPage) {
|
|
58
66
|
props.onSeverityChange && props.onSeverityChange(casePayload);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBA4HlC;kBA5HQ,YAAY;;;AA8HrB,eAAe,YAAY,CAAC"}
|