@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
|
@@ -7,21 +7,35 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
|
|
10
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
+
var t = {};
|
|
12
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
+
t[p] = s[p];
|
|
14
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
+
t[p[i]] = s[p[i]];
|
|
18
|
+
}
|
|
19
|
+
return t;
|
|
20
|
+
};
|
|
21
|
+
import { contacts, kase, pcm, publicApi } from '@cee-eng/hydrajs';
|
|
11
22
|
import { formattedApiErrorMessage } from '@rh-support/components';
|
|
12
|
-
import { dtmTrackEventCaseCreationStepEncountered, getApiResourceObject, PreviousToNewCaseTypeMap, } from '@rh-support/utils';
|
|
13
|
-
import delay from 'lodash/delay';
|
|
23
|
+
import { CREATE_CASE_LABEL_LINK, CREATE_SUPPORT_CASE, dtmTrackEventCaseCreationStepEncountered, fetchCaseDetailsByCaseNumber, fetchLoggedInUserAccountContactsFromGraphQL, GET_ACCOUNT, GET_CASE_GROUP, GET_PRODUCTS, getAccountQueryVariables, getApiResourceObject, handleGraphQLAccountResponse, handleGraphQLVersionsResponse, mapGraphQLCaseDetailsToCasePayload, PreviousToNewCaseTypeMap, shouldPersistInProgressOnCustomerActivity, updateCaseDetailsGraphQLRequest, } from '@rh-support/utils';
|
|
24
|
+
// import delay from 'lodash/delay';
|
|
14
25
|
import filter from 'lodash/filter';
|
|
15
26
|
import find from 'lodash/find';
|
|
16
27
|
import isEmpty from 'lodash/isEmpty';
|
|
17
28
|
import isUndefined from 'lodash/isUndefined';
|
|
18
29
|
import map from 'lodash/map';
|
|
30
|
+
import unescape from 'lodash/unescape';
|
|
19
31
|
import uniq from 'lodash/uniq';
|
|
20
32
|
import uniqBy from 'lodash/uniqBy';
|
|
21
33
|
import { trimAndReplacePlus } from '../components/shared/utils';
|
|
34
|
+
import { buildCaseSeverityFtsGraphQLUpdate } from '../utils/caseSeverityFtsGraphQLUtils';
|
|
22
35
|
import { CaseReducerConstants, DESCRIPTION_LENGTH_LIMIT, initialCaseState, SupportLevelDisplay, } from './CaseConstNTypes';
|
|
23
|
-
import { createCasePayload, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
36
|
+
import { createCasePayload, createCasePayloadGraphQL, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
24
37
|
import { updateSession } from './SessionRestoreReducer';
|
|
38
|
+
const safeDecodeGroupName = (value) => unescape(value);
|
|
25
39
|
export const caseReducer = (pState, action) => {
|
|
26
40
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
27
41
|
switch (action.type) {
|
|
@@ -29,17 +43,18 @@ export const caseReducer = (pState, action) => {
|
|
|
29
43
|
const hasLargeCaseDescription = action.payload.caseDetails.hasOwnProperty('description')
|
|
30
44
|
? (action.payload.caseDetails.description || '').length > DESCRIPTION_LENGTH_LIMIT
|
|
31
45
|
: pState.hasLargeCaseDescription;
|
|
46
|
+
let resetEntitlementId = false;
|
|
32
47
|
if (((_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseDetails) === null || _b === void 0 ? void 0 : _b.contactSSOName) &&
|
|
33
48
|
pState.caseDetails.contactSSOName !== ((_d = (_c = action.payload) === null || _c === void 0 ? void 0 : _c.caseDetails) === null || _d === void 0 ? void 0 : _d.contactSSOName)) {
|
|
34
49
|
// Need to reset casegroup and sla as they are dependent on selected owner
|
|
35
50
|
action.payload.caseDetails.entitlementSla = undefined;
|
|
51
|
+
resetEntitlementId = true;
|
|
36
52
|
}
|
|
37
|
-
if (((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.caseDetails)
|
|
53
|
+
if (Object.prototype.hasOwnProperty.call((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.caseDetails) !== null && _f !== void 0 ? _f : {}, 'product') &&
|
|
38
54
|
pState.caseDetails.product !== ((_h = (_g = action.payload) === null || _g === void 0 ? void 0 : _g.caseDetails) === null || _h === void 0 ? void 0 : _h.product)) {
|
|
39
|
-
|
|
40
|
-
action.payload.caseDetails.entitlementSla = undefined;
|
|
55
|
+
resetEntitlementId = true;
|
|
41
56
|
}
|
|
42
|
-
return Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false });
|
|
57
|
+
return Object.assign(Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false }), (resetEntitlementId ? { selectedEntitlementId: undefined } : {}));
|
|
43
58
|
}
|
|
44
59
|
case CaseReducerConstants.caseStateChanged: {
|
|
45
60
|
return Object.assign(Object.assign({}, pState), action.payload);
|
|
@@ -89,10 +104,8 @@ export const caseReducer = (pState, action) => {
|
|
|
89
104
|
return Object.assign(Object.assign(Object.assign({}, pState), initialCaseState), { isFetchingCaseDetails: true, isFetchingCaseDetailsError: false, caseDetails: Object.assign(Object.assign({}, initialCaseState.caseDetails), { caseNumber: (_l = (_k = (_j = action.payload) === null || _j === void 0 ? void 0 : _j.caseDetails) === null || _k === void 0 ? void 0 : _k.caseNumber) !== null && _l !== void 0 ? _l : '' }) });
|
|
90
105
|
}
|
|
91
106
|
case CaseReducerConstants.receivedCaseDetails: {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
case CaseReducerConstants.updateComments: {
|
|
95
|
-
return Object.assign(Object.assign({}, pState), { caseDetails: Object.assign(Object.assign({}, pState.caseDetails), { comments: action.payload.caseDetails.comments }) });
|
|
107
|
+
const _m = action.payload, { caseDetails, selectedOwner } = _m, rest = __rest(_m, ["caseDetails", "selectedOwner"]);
|
|
108
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({}, pState), rest), (selectedOwner ? { selectedOwner } : {})), { caseDetails: Object.assign(Object.assign({}, pState.caseDetails), caseDetails), isFetchingCaseDetails: false, isFetchingCaseDetailsError: false });
|
|
96
109
|
}
|
|
97
110
|
case CaseReducerConstants.receivedCaseDetailsError: {
|
|
98
111
|
return Object.assign(Object.assign({}, pState), { isFetchingCaseDetails: false, isFetchingCaseDetailsError: true, caseDetailsError: action.payload.caseDetailsError });
|
|
@@ -167,24 +180,42 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
167
180
|
payload: { selectedNotificationContacts },
|
|
168
181
|
});
|
|
169
182
|
};
|
|
170
|
-
export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1], void 0, function* (dispatch, sessionRestoreDispatch, caseDetails, isCaseCreate, errorMessage500, loggedInUserSsoUsername, isSecureSupport = false, isResubmit, isCreatingCaseFlow, sessionItem) {
|
|
171
|
-
var _a, _b;
|
|
183
|
+
export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1], void 0, function* (dispatch, sessionRestoreDispatch, caseDetails, isCaseCreate, errorMessage500, loggedInUserSsoUsername, isSecureSupport = false, isResubmit, isCreatingCaseFlow, sessionItem, apolloClient, traditionalSupportAgreed = false) {
|
|
184
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
172
185
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
173
186
|
try {
|
|
174
187
|
const casePayload = createCasePayload(caseDetails, sessionItem, isCaseCreate);
|
|
188
|
+
const graphQLPayload = createCasePayloadGraphQL(caseDetails, sessionItem, isCaseCreate, traditionalSupportAgreed);
|
|
175
189
|
dispatch({ type: CaseReducerConstants.resetCaseNoOfCreatedCase, payload: { caseNoOfCreatedCase: '' } });
|
|
176
|
-
const
|
|
190
|
+
const { data } = yield apolloClient.mutate({
|
|
191
|
+
mutation: CREATE_SUPPORT_CASE,
|
|
192
|
+
variables: {
|
|
193
|
+
caseInput: graphQLPayload,
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
const caseRecord = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.CaseCreate) === null || _b === void 0 ? void 0 : _b.RedHatSupportRecord;
|
|
197
|
+
const caseNumber = (_c = caseRecord === null || caseRecord === void 0 ? void 0 : caseRecord.CaseNumber__c) === null || _c === void 0 ? void 0 : _c.value;
|
|
198
|
+
let caseSfId = caseRecord === null || caseRecord === void 0 ? void 0 : caseRecord.Id;
|
|
199
|
+
if (!caseSfId && caseNumber && apolloClient && ((_d = caseDetails.selectedLabelIds) === null || _d === void 0 ? void 0 : _d.length)) {
|
|
200
|
+
try {
|
|
201
|
+
const createdCase = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, isSecureSupport);
|
|
202
|
+
caseSfId = createdCase === null || createdCase === void 0 ? void 0 : createdCase.id;
|
|
203
|
+
}
|
|
204
|
+
catch (_h) {
|
|
205
|
+
// Non-blocking: label linking will be skipped if Id cannot be resolved
|
|
206
|
+
}
|
|
207
|
+
}
|
|
177
208
|
if (casePayload.contactSSOName === loggedInUserSsoUsername &&
|
|
178
|
-
!isEmpty((
|
|
209
|
+
!isEmpty((_e = casePayload.phoneAreaCodePrefixLineNumber) === null || _e === void 0 ? void 0 : _e.trim()) &&
|
|
179
210
|
!isEmpty(trimAndReplacePlus((casePayload === null || casePayload === void 0 ? void 0 : casePayload.phoneCountryCode) || ''))) {
|
|
180
211
|
contacts.updateContactBySSO(casePayload.contactSSOName, {
|
|
181
212
|
supportPhoneCountryCode: casePayload.phoneCountryCode,
|
|
182
213
|
supportPhoneAreaCodePrefixLineNumber: casePayload.phoneAreaCodePrefixLineNumber,
|
|
183
214
|
});
|
|
184
215
|
}
|
|
185
|
-
// For updating the sessions and posting cep details after case creation
|
|
186
|
-
postCaseCreationProcessing(isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem);
|
|
187
|
-
dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(
|
|
216
|
+
// For updating the sessions and posting cep details / label links after case creation
|
|
217
|
+
postCaseCreationProcessing(isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem, apolloClient, caseSfId);
|
|
218
|
+
dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(_f = caseDetails.caseDetails) === null || _f === void 0 ? void 0 : _f.caseType], (_g = caseDetails.caseDetails.summary) !== null && _g !== void 0 ? _g : undefined, caseDetails.caseDetails.product, caseDetails.caseDetails.version);
|
|
188
219
|
dispatch({ type: CaseReducerConstants.caseCreated, payload: { caseNoOfCreatedCase: caseNumber } });
|
|
189
220
|
}
|
|
190
221
|
catch (error) {
|
|
@@ -255,10 +286,30 @@ export const postRemoteSessionRequest = (dispatch, caseNumber) => __awaiter(void
|
|
|
255
286
|
}
|
|
256
287
|
});
|
|
257
288
|
// For all post case creation processing contexts
|
|
258
|
-
export const postCaseCreationProcessing = (isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem) => __awaiter(void 0, void 0, void 0, function* () {
|
|
289
|
+
export const postCaseCreationProcessing = (isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem, apolloClient, caseSfId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
290
|
+
var _a;
|
|
259
291
|
isSecureSupport === false && !!sessionItem && resolveSession(sessionRestoreDispatch, sessionItem, caseNumber);
|
|
260
292
|
caseDetails.caseDetails.cep === true && postCepDetails(dispatch, caseNumber, caseDetails.cepDetails);
|
|
261
293
|
caseDetails.caseDetails.screenSessionRequested === true && postRemoteSessionRequest(dispatch, caseNumber);
|
|
294
|
+
if (apolloClient && caseSfId && ((_a = caseDetails.selectedLabelIds) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
295
|
+
postCaseLabelLinks(apolloClient, caseSfId, caseDetails.selectedLabelIds);
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
/** Links selected labels to a newly created case. Failures are non-blocking. */
|
|
299
|
+
export const postCaseLabelLinks = (apolloClient, caseSfId, labelIds) => __awaiter(void 0, void 0, void 0, function* () {
|
|
300
|
+
if (!caseSfId || !labelIds.length)
|
|
301
|
+
return;
|
|
302
|
+
yield Promise.allSettled(labelIds.map((labelId) => apolloClient.mutate({
|
|
303
|
+
mutation: CREATE_CASE_LABEL_LINK,
|
|
304
|
+
variables: {
|
|
305
|
+
input: {
|
|
306
|
+
RedHatSupportCaseLabelLink__c: {
|
|
307
|
+
Case__c: caseSfId,
|
|
308
|
+
Label__c: labelId,
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
})));
|
|
262
313
|
});
|
|
263
314
|
// To resolve or update session API
|
|
264
315
|
export const resolveSession = (sessionRestoreDispatch, sessionItem, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -376,8 +427,8 @@ export const clearSelectedAccount = (dispatch) => {
|
|
|
376
427
|
payload: { caseDetails: { accountNumberRef: '' } },
|
|
377
428
|
});
|
|
378
429
|
};
|
|
379
|
-
export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, accountNumber_1, ...args_1], void 0, function* (dispatch, accountNumber, isLoggedInUsersAccount = false, loggedInUserAccount = {}) {
|
|
380
|
-
var _a;
|
|
430
|
+
export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, accountNumber_1, ...args_1], void 0, function* (dispatch, accountNumber, isLoggedInUsersAccount = false, loggedInUserAccount = {}, apolloClient) {
|
|
431
|
+
var _a, _b, _c, _d, _e;
|
|
381
432
|
if (isLoggedInUsersAccount && !isEmpty(loggedInUserAccount) && !isEmpty(accountNumber)) {
|
|
382
433
|
dispatch({
|
|
383
434
|
type: CaseReducerConstants.caseStateChanged,
|
|
@@ -410,7 +461,12 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
410
461
|
payload: { selectedAccountDetails: getApiResourceObject({}, true) },
|
|
411
462
|
});
|
|
412
463
|
try {
|
|
413
|
-
const
|
|
464
|
+
const { data } = yield apolloClient.query({
|
|
465
|
+
query: GET_ACCOUNT,
|
|
466
|
+
variables: getAccountQueryVariables(accountNumber),
|
|
467
|
+
});
|
|
468
|
+
const edges = (_e = (_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _b === void 0 ? void 0 : _b.query) === null || _c === void 0 ? void 0 : _c.RedHatSupportAccount) === null || _d === void 0 ? void 0 : _d.edges) !== null && _e !== void 0 ? _e : [];
|
|
469
|
+
const selectedAccountDetails = handleGraphQLAccountResponse(edges);
|
|
414
470
|
dispatch({
|
|
415
471
|
type: CaseReducerConstants.caseStateChanged,
|
|
416
472
|
payload: { selectedAccountDetails: getApiResourceObject(selectedAccountDetails) },
|
|
@@ -434,7 +490,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
434
490
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
435
491
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
436
492
|
? caseGroupNumberToRestore
|
|
437
|
-
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b :
|
|
493
|
+
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b : null;
|
|
438
494
|
dispatch({
|
|
439
495
|
type: CaseReducerConstants.caseStateChanged,
|
|
440
496
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -446,7 +502,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
446
502
|
type: CaseReducerConstants.caseStateChanged,
|
|
447
503
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
448
504
|
});
|
|
449
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
505
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: null });
|
|
450
506
|
}
|
|
451
507
|
});
|
|
452
508
|
export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGroup_1, abortSignalEntitlements_1, ...args_1) => __awaiter(void 0, [dispatch_1, owner_1, product_1, abortSignalCaseGroup_1, abortSignalEntitlements_1, ...args_1], void 0, function* (dispatch, owner, product, abortSignalCaseGroup, abortSignalEntitlements, setCaseGroupToUngroupedOrDefault = false, caseGroupNumberToRestore, canChangeGroup = true, isUserUpdate, caseNumber, caseAccountNumber) {
|
|
@@ -462,7 +518,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
462
518
|
},
|
|
463
519
|
},
|
|
464
520
|
});
|
|
465
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
521
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: null });
|
|
466
522
|
dispatch({
|
|
467
523
|
type: CaseReducerConstants.caseStateChanged,
|
|
468
524
|
payload: {
|
|
@@ -475,23 +531,29 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
475
531
|
}
|
|
476
532
|
dispatch({
|
|
477
533
|
type: CaseReducerConstants.caseStateChanged,
|
|
478
|
-
payload: {
|
|
534
|
+
payload: {
|
|
535
|
+
selectedOwner: getApiResourceObject(owner),
|
|
536
|
+
// Invert global/user isEntitled (from subscription GraphQL) into case entitlement flag
|
|
537
|
+
hasInvalidEntitlements: owner.isEntitled === false,
|
|
538
|
+
},
|
|
479
539
|
});
|
|
480
540
|
dispatch({
|
|
481
541
|
type: CaseReducerConstants.caseDetailChanged,
|
|
482
542
|
payload: { caseDetails: { contactSSOName: owner.ssoUsername } },
|
|
483
543
|
});
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
544
|
+
// delay(
|
|
545
|
+
// async () =>
|
|
546
|
+
// await fetchCaseEntitlements(
|
|
547
|
+
// dispatch,
|
|
548
|
+
// owner.ssoUsername!,
|
|
549
|
+
// product,
|
|
550
|
+
// abortSignalEntitlements,
|
|
551
|
+
// isUserUpdate,
|
|
552
|
+
// caseNumber
|
|
553
|
+
// ),
|
|
554
|
+
// 5000,
|
|
555
|
+
// 'later'
|
|
556
|
+
// );
|
|
495
557
|
});
|
|
496
558
|
//changing the item values to uppercase to match the backend values
|
|
497
559
|
const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
|
|
@@ -554,7 +616,7 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
554
616
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
555
617
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
556
618
|
? caseGroupNumberToRestore
|
|
557
|
-
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b :
|
|
619
|
+
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b : null;
|
|
558
620
|
dispatch({
|
|
559
621
|
type: CaseReducerConstants.caseStateChanged,
|
|
560
622
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -566,18 +628,79 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
566
628
|
type: CaseReducerConstants.caseStateChanged,
|
|
567
629
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
568
630
|
});
|
|
569
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
631
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: null });
|
|
632
|
+
}
|
|
633
|
+
});
|
|
634
|
+
export const fetchCaseGroupsForContactGraphQL = (dispatch_1, apolloClient_1, contactId_1, accountNumber_1, defaultCaseGroupId_1, ...args_1) => __awaiter(void 0, [dispatch_1, apolloClient_1, contactId_1, accountNumber_1, defaultCaseGroupId_1, ...args_1], void 0, function* (dispatch, apolloClient, contactId, accountNumber, defaultCaseGroupId, isOrgAdmin = false, currentGroupNumber) {
|
|
635
|
+
var _a, _b, _c, _d;
|
|
636
|
+
dispatch({
|
|
637
|
+
type: CaseReducerConstants.caseStateChanged,
|
|
638
|
+
payload: { ownersCaseGroups: getApiResourceObject([], true) },
|
|
639
|
+
});
|
|
640
|
+
try {
|
|
641
|
+
const { data } = yield apolloClient.query({
|
|
642
|
+
query: GET_CASE_GROUP,
|
|
643
|
+
variables: { first: 2000 },
|
|
644
|
+
});
|
|
645
|
+
const response = data;
|
|
646
|
+
const allGroups = (_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.RedHatSupportCaseGroup__c) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
|
|
647
|
+
const matchedGroups = allGroups
|
|
648
|
+
.filter(({ node }) => isOrgAdmin ||
|
|
649
|
+
node.CaseGroupMembers__r.edges.some(({ node: member }) => member.Contact__c.value === contactId))
|
|
650
|
+
.map(({ node }) => ({
|
|
651
|
+
groupId: node.Id,
|
|
652
|
+
groupName: safeDecodeGroupName(node.Name.value),
|
|
653
|
+
}));
|
|
654
|
+
if (defaultCaseGroupId && !matchedGroups.some((g) => g.groupId === defaultCaseGroupId)) {
|
|
655
|
+
const currentGroupEdge = allGroups.find(({ node }) => node.Id === defaultCaseGroupId);
|
|
656
|
+
if (currentGroupEdge) {
|
|
657
|
+
matchedGroups.push({
|
|
658
|
+
groupId: currentGroupEdge.node.Id,
|
|
659
|
+
groupName: safeDecodeGroupName(currentGroupEdge.node.Name.value),
|
|
660
|
+
});
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
matchedGroups.sort((a, b) => a.groupName.localeCompare(b.groupName));
|
|
664
|
+
const ownersCaseGroups = matchedGroups.map((g) => ({
|
|
665
|
+
groupNum: g.groupId,
|
|
666
|
+
name: g.groupName,
|
|
667
|
+
isDefault: defaultCaseGroupId ? g.groupId === defaultCaseGroupId : false,
|
|
668
|
+
isPrivate: false,
|
|
669
|
+
defaultMembers: [],
|
|
670
|
+
members: [],
|
|
671
|
+
}));
|
|
672
|
+
dispatch({
|
|
673
|
+
type: CaseReducerConstants.caseStateChanged,
|
|
674
|
+
payload: { ownersCaseGroups: getApiResourceObject(ownersCaseGroups, false) },
|
|
675
|
+
});
|
|
676
|
+
const defaultGroup = defaultCaseGroupId ? matchedGroups.find((g) => g.groupId === defaultCaseGroupId) : null;
|
|
677
|
+
if (currentGroupNumber === '') {
|
|
678
|
+
// User explicitly cleared the group — don't auto-select
|
|
679
|
+
}
|
|
680
|
+
else if (!currentGroupNumber) {
|
|
681
|
+
if (defaultGroup) {
|
|
682
|
+
setCaseDetails(dispatch, { groupNumber: defaultGroup.groupId, groupName: defaultGroup.groupName });
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
return matchedGroups;
|
|
686
|
+
}
|
|
687
|
+
catch (e) {
|
|
688
|
+
dispatch({
|
|
689
|
+
type: CaseReducerConstants.caseStateChanged,
|
|
690
|
+
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
691
|
+
});
|
|
692
|
+
return [];
|
|
570
693
|
}
|
|
571
694
|
});
|
|
572
695
|
const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
|
|
573
696
|
return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
|
|
574
697
|
};
|
|
575
|
-
export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1], void 0, function* (dispatch, sessionItem, loggedInUserAccountNumber, loggedInUserContact, loggedInUserAccount = {}) {
|
|
698
|
+
export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1], void 0, function* (dispatch, sessionItem, loggedInUserAccountNumber, loggedInUserContact, loggedInUserAccount = {}, apolloClient) {
|
|
576
699
|
var _a, _b, _c, _d;
|
|
577
700
|
const caseDetails = getCaseFromSessionDetails(sessionItem, loggedInUserAccountNumber, loggedInUserContact.ssoUsername);
|
|
578
701
|
const { sessionDetails } = sessionItem;
|
|
579
702
|
setCaseDetails(dispatch, caseDetails);
|
|
580
|
-
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount);
|
|
703
|
+
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount, apolloClient);
|
|
581
704
|
// entitlementSla gets undefined when case group, owner or product is changed
|
|
582
705
|
// Please refer line 60
|
|
583
706
|
if (isUndefined(caseDetails.entitlementSla)) {
|
|
@@ -586,7 +709,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
586
709
|
// Set owner and Notified users
|
|
587
710
|
const notifiedUsersExternal = (_b = (_a = sessionDetails.notifiedUsersExternal) === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : [];
|
|
588
711
|
const notifiedUsersInternal = (_d = (_c = sessionDetails.notifiedUsersInternal) === null || _c === void 0 ? void 0 : _c.split(',')) !== null && _d !== void 0 ? _d : [];
|
|
589
|
-
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal);
|
|
712
|
+
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal, apolloClient);
|
|
590
713
|
const owner = find(allRelevantContacts, (c) => c.ssoUsername === caseDetails.contactSSOName);
|
|
591
714
|
const selectedNotificationContacts = getSelectedNotificationContactsFromSession(allRelevantContacts, [
|
|
592
715
|
...notifiedUsersExternal,
|
|
@@ -610,7 +733,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
610
733
|
});
|
|
611
734
|
}
|
|
612
735
|
});
|
|
613
|
-
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
736
|
+
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
|
|
614
737
|
if (loggedInUserContact.isInternal) {
|
|
615
738
|
// Internal users can use the internal API and be done with it
|
|
616
739
|
const userArray = uniq([contactSsoUsername, ...notifiedUsersExternal, ...notifiedUsersInternal]);
|
|
@@ -621,28 +744,23 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
|
|
|
621
744
|
return response.items;
|
|
622
745
|
}
|
|
623
746
|
else {
|
|
624
|
-
const promiseArray = [];
|
|
625
|
-
// Only Org admins have access to there own org accounts
|
|
626
|
-
loggedInUserContact.isOrgAdmin &&
|
|
627
|
-
promiseArray.push(accounts.getAccountContacts(loggedInUserContact.accountNumber));
|
|
628
|
-
// However, all external users (org + non-org) can get list of the managed customer contacts
|
|
629
|
-
// This is specifically relevant for partners accessing their customer cases
|
|
630
|
-
loggedInUserContact.accountNumber !== caseAccountNumber &&
|
|
631
|
-
promiseArray.push(accounts.getAccountContacts(caseAccountNumber));
|
|
632
|
-
const response = yield Promise.all(promiseArray);
|
|
633
747
|
const contactsToReturn = [];
|
|
634
|
-
|
|
635
|
-
|
|
748
|
+
const shouldFetchAccountContacts = loggedInUserContact.isOrgAdmin || loggedInUserContact.accountNumber !== caseAccountNumber;
|
|
749
|
+
if (shouldFetchAccountContacts && apolloClient) {
|
|
750
|
+
const accountContacts = yield fetchLoggedInUserAccountContactsFromGraphQL(apolloClient);
|
|
751
|
+
contactsToReturn.push(...accountContacts);
|
|
752
|
+
}
|
|
636
753
|
contactsToReturn.push(loggedInUserContact);
|
|
637
754
|
return uniqBy(contactsToReturn, 'ssoUsername');
|
|
638
755
|
}
|
|
639
756
|
});
|
|
640
|
-
export const
|
|
757
|
+
export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights, loggedInUser, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
|
|
641
758
|
var _a, _b;
|
|
642
759
|
dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
|
|
643
760
|
try {
|
|
644
761
|
const data = yield publicApi.kase.getCase(caseNumber);
|
|
645
762
|
const caseDetails = {
|
|
763
|
+
id: data.id,
|
|
646
764
|
product: data.product,
|
|
647
765
|
version: data.version,
|
|
648
766
|
summary: data.summary,
|
|
@@ -664,7 +782,7 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
664
782
|
createdDate: data.createdDate,
|
|
665
783
|
createdById: data.createdById,
|
|
666
784
|
alternateId: data.alternateId,
|
|
667
|
-
groupNumber: data.groupNumber ||
|
|
785
|
+
groupNumber: data.groupNumber || null,
|
|
668
786
|
caseNumber: data.caseNumber,
|
|
669
787
|
hostname: data.hostname,
|
|
670
788
|
contactInfo24x7: data.contactInfo24x7,
|
|
@@ -676,7 +794,7 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
676
794
|
sbrGroups: (data === null || data === void 0 ? void 0 : data.sbrGroups) || [],
|
|
677
795
|
firstCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.firstCaseInactivityWarningSentAt) || undefined,
|
|
678
796
|
secondCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.secondCaseInactivityWarningSentAt) || undefined,
|
|
679
|
-
groupName: data.groupName || '',
|
|
797
|
+
groupName: safeDecodeGroupName(data.groupName || ''),
|
|
680
798
|
remoteSessionTermsAcked: (_a = data.remoteSessionTermsAcked) !== null && _a !== void 0 ? _a : false,
|
|
681
799
|
noClusterIdReason: data.noClusterIdReason || '',
|
|
682
800
|
noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
|
|
@@ -707,12 +825,10 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
707
825
|
caseNoOfCreatedCase: caseNumber,
|
|
708
826
|
};
|
|
709
827
|
dispatch({ type: CaseReducerConstants.receivedCaseDetails, payload: Object.assign(Object.assign({}, caseState), { caseDetails }) });
|
|
710
|
-
setCaseAccountNumber(dispatch, data.accountNumberRef);
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
loggedInUserRights.isPartnerOrgAdmin();
|
|
715
|
-
setCaseOwner(dispatch, { ssoUsername: data.contactSSOName, fullNameCustom: data.contactName }, '', undefined, undefined, false, undefined, canChangeGroup, undefined, undefined, loggedInUserRights.isInternal() ? data.accountNumberRef : undefined);
|
|
828
|
+
setCaseAccountNumber(dispatch, data.accountNumberRef, false, {}, apolloClient);
|
|
829
|
+
// Owner is set by fetchCaseDetails (GraphQL) in Case.tsx via mapGraphQLCaseContactToOwnerState
|
|
830
|
+
// which already sets selectedOwner with id (contactId) from the case details query.
|
|
831
|
+
// The contact details are then enriched by CaseContactsSelectorExternal when the contacts list loads.
|
|
716
832
|
const notifiedListUsers = map(data.notifiedUsers, (o) => ({
|
|
717
833
|
ssoUsername: o.ssoUsername,
|
|
718
834
|
fullNameCustom: o.title,
|
|
@@ -721,15 +837,22 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
721
837
|
type: CaseReducerConstants.setLoadedNotificationContacts,
|
|
722
838
|
payload: { notifiedUsers: notifiedListUsers },
|
|
723
839
|
});
|
|
724
|
-
if (data.groupNumber
|
|
840
|
+
if (data.groupNumber) {
|
|
725
841
|
setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
|
|
726
842
|
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
else {
|
|
731
|
-
|
|
732
|
-
|
|
843
|
+
// TODO: Re-enable send notifications calls once GraphQL support is available
|
|
844
|
+
// if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
|
|
845
|
+
// getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
|
|
846
|
+
// } else {
|
|
847
|
+
// getNotificationContacts4ExternalUser(
|
|
848
|
+
// dispatch,
|
|
849
|
+
// notifiedListUsers,
|
|
850
|
+
// loggedInUserRights,
|
|
851
|
+
// data.accountNumberRef,
|
|
852
|
+
// data.contactSSOName,
|
|
853
|
+
// data.contactName
|
|
854
|
+
// );
|
|
855
|
+
// }
|
|
733
856
|
}
|
|
734
857
|
catch (error) {
|
|
735
858
|
dispatch({ type: CaseReducerConstants.receivedCaseDetailsError, payload: { caseDetailsError: error } });
|
|
@@ -753,9 +876,61 @@ export const updateCaseDetails = (dispatch, caseNumber, caseDetails, dontSetDeta
|
|
|
753
876
|
}
|
|
754
877
|
catch (error) {
|
|
755
878
|
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
756
|
-
|
|
879
|
+
throw error;
|
|
757
880
|
}
|
|
758
881
|
});
|
|
882
|
+
export const updateCaseDetailsGraphQL = (dispatch, apolloClient, caseNumber, caseUpdate, dontSetDetails, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
883
|
+
var _a, _b;
|
|
884
|
+
try {
|
|
885
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailUpdating });
|
|
886
|
+
const salesforceCaseId = (_a = options === null || options === void 0 ? void 0 : options.salesforceCaseId) !== null && _a !== void 0 ? _a : (_b = options === null || options === void 0 ? void 0 : options.existingCaseDetails) === null || _b === void 0 ? void 0 : _b.id;
|
|
887
|
+
const graphqlDetails = yield updateCaseDetailsGraphQLRequest(apolloClient, caseNumber, caseUpdate, {
|
|
888
|
+
salesforceCaseId,
|
|
889
|
+
existingCaseDetails: (options === null || options === void 0 ? void 0 : options.existingCaseDetails)
|
|
890
|
+
? {
|
|
891
|
+
product: options.existingCaseDetails.product,
|
|
892
|
+
version: options.existingCaseDetails.version,
|
|
893
|
+
noClusterIdReason: options.existingCaseDetails.noClusterIdReason,
|
|
894
|
+
noClusterIdReasonExplanation: options.existingCaseDetails.noClusterIdReasonExplanation,
|
|
895
|
+
additionalCaseInformation: options.existingCaseDetails.additionalCaseInformation,
|
|
896
|
+
}
|
|
897
|
+
: undefined,
|
|
898
|
+
});
|
|
899
|
+
if (dontSetDetails) {
|
|
900
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailCompleted });
|
|
901
|
+
return;
|
|
902
|
+
}
|
|
903
|
+
// productId/entitlementId/entitlementSla are not sent in GraphQL case updates from case edit
|
|
904
|
+
const { productId: _productId, entitlementId: _entitlementId, entitlementSla: _entitlementSla } = caseUpdate, caseUpdateWithoutIds = __rest(caseUpdate, ["productId", "entitlementId", "entitlementSla"]);
|
|
905
|
+
let updatedCaseDetails = Object.assign({}, caseUpdateWithoutIds);
|
|
906
|
+
if (graphqlDetails) {
|
|
907
|
+
const mappedGraphQLDetails = mapGraphQLCaseDetailsToCasePayload(graphqlDetails);
|
|
908
|
+
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), Object.fromEntries(Object.entries(mappedGraphQLDetails).filter(([, value]) => value !== null && value !== undefined && value !== '')));
|
|
909
|
+
}
|
|
910
|
+
else {
|
|
911
|
+
const refreshedDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, options === null || options === void 0 ? void 0 : options.includeSecureSupport);
|
|
912
|
+
if (refreshedDetails) {
|
|
913
|
+
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), mapGraphQLCaseDetailsToCasePayload(refreshedDetails));
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
dispatch({
|
|
917
|
+
type: CaseReducerConstants.caseDetailChanged,
|
|
918
|
+
payload: { caseDetails: updatedCaseDetails, isCaseUpdating: false },
|
|
919
|
+
});
|
|
920
|
+
}
|
|
921
|
+
catch (error) {
|
|
922
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
923
|
+
throw error;
|
|
924
|
+
}
|
|
925
|
+
});
|
|
926
|
+
/** GraphQL CaseUpdate for severity/status and FTS (X24x7__c / X24x7ContactInformation__c). */
|
|
927
|
+
export const updateCaseSeverityAndFtsGraphQL = (dispatch, apolloClient, caseNumber, payload, currentSeverity, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
928
|
+
const graphqlUpdate = buildCaseSeverityFtsGraphQLUpdate(payload, currentSeverity);
|
|
929
|
+
if (Object.keys(graphqlUpdate).length === 0) {
|
|
930
|
+
return;
|
|
931
|
+
}
|
|
932
|
+
yield updateCaseDetailsGraphQL(dispatch, apolloClient, caseNumber, graphqlUpdate, false, options);
|
|
933
|
+
});
|
|
759
934
|
export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerSSO) => __awaiter(void 0, void 0, void 0, function* () {
|
|
760
935
|
const usersArr = (users || []).map((o) => o.ssoUsername).filter((s) => !!s);
|
|
761
936
|
caseOwnerSSO && usersArr.push(caseOwnerSSO);
|
|
@@ -793,7 +968,7 @@ export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerS
|
|
|
793
968
|
});
|
|
794
969
|
}
|
|
795
970
|
});
|
|
796
|
-
export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUserRights, accountNumber, caseOwnerSSO, fullNameCustom) => __awaiter(void 0, void 0, void 0, function* () {
|
|
971
|
+
export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUserRights, accountNumber, caseOwnerSSO, fullNameCustom, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
|
|
797
972
|
try {
|
|
798
973
|
const selectedNotificationContacts = [];
|
|
799
974
|
if (loggedInUserRights.isExternalNonOrgAdmin()) {
|
|
@@ -832,24 +1007,14 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
832
1007
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
833
1008
|
payload: { isFetchingSelectedNotificationContacts: true, hasErrorSelectedNotificationContacts: false },
|
|
834
1009
|
});
|
|
835
|
-
const
|
|
836
|
-
|
|
837
|
-
loggedInUserRights.isOrgAdmin() &&
|
|
838
|
-
promiseArray.push(accounts.getAccountContacts(loggedInUserRights.user.accountNumber));
|
|
839
|
-
// However, all external users (org + non-org) can get list of the managed customer contacts
|
|
840
|
-
// This is specifically relevant for partners accessing their customer cases
|
|
841
|
-
loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumber) &&
|
|
842
|
-
promiseArray.push(accounts.getAccountContacts(accountNumber));
|
|
843
|
-
dispatch({
|
|
844
|
-
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
845
|
-
payload: { isFetchingSelectedNotificationContacts: true, hasErrorSelectedNotificationContacts: false },
|
|
846
|
-
});
|
|
847
|
-
const response = yield Promise.all(promiseArray);
|
|
1010
|
+
const shouldFetchAccountContacts = loggedInUserRights.isOrgAdmin() ||
|
|
1011
|
+
loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumber);
|
|
848
1012
|
let contactsToReturn = [];
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1013
|
+
if (shouldFetchAccountContacts && apolloClient) {
|
|
1014
|
+
contactsToReturn = yield fetchLoggedInUserAccountContactsFromGraphQL(apolloClient);
|
|
1015
|
+
contactsToReturn = uniqBy(contactsToReturn, 'ssoUsername').filter((contact) => usersArr.indexOf(contact.ssoUsername) !== -1);
|
|
1016
|
+
selectedNotificationContacts.push(...contactsToReturn);
|
|
1017
|
+
}
|
|
853
1018
|
}
|
|
854
1019
|
dispatch({
|
|
855
1020
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
@@ -867,20 +1032,23 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
867
1032
|
});
|
|
868
1033
|
}
|
|
869
1034
|
});
|
|
870
|
-
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus) => {
|
|
871
|
-
if (isInternal)
|
|
1035
|
+
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1036
|
+
if (!shouldPersistInProgressOnCustomerActivity(isInternal, currentStatus))
|
|
872
1037
|
return;
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
}
|
|
1038
|
+
const { apolloClient, caseNumber, existingCaseDetails } = options !== null && options !== void 0 ? options : {};
|
|
1039
|
+
if (!apolloClient || !caseNumber)
|
|
1040
|
+
return;
|
|
1041
|
+
yield updateCaseDetailsGraphQL(dispatch, apolloClient, caseNumber, { status: 'In Progress' }, false, {
|
|
1042
|
+
existingCaseDetails,
|
|
1043
|
+
});
|
|
1044
|
+
});
|
|
877
1045
|
// to fetch all users for the selected case group after fetching case details so that we can
|
|
878
1046
|
// check which users have access to the selected case group and filter the owner dropdown list accordingly
|
|
879
1047
|
export const setSelectedCaseGroupUsers = (dispatch, accountNumber, groupNumber, loggedInUserRights) => __awaiter(void 0, void 0, void 0, function* () {
|
|
880
1048
|
const canUserChangeOwner = loggedInUserRights.isOrgAdmin() ||
|
|
881
1049
|
(loggedInUserRights.isExternalNonOrgAdmin() &&
|
|
882
1050
|
loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumber));
|
|
883
|
-
if (groupNumber
|
|
1051
|
+
if (!groupNumber || !canUserChangeOwner) {
|
|
884
1052
|
dispatch({
|
|
885
1053
|
type: CaseReducerConstants.caseStateChanged,
|
|
886
1054
|
payload: { selectedCaseGroupUsers: getApiResourceObject([]) },
|
|
@@ -935,14 +1103,26 @@ export function updateEmailListState(dispatch, email, customEmailsList, callback
|
|
|
935
1103
|
payload: { customEmailsList: Object.assign(Object.assign({}, customEmailsList), { data: newEmail }) },
|
|
936
1104
|
});
|
|
937
1105
|
}
|
|
938
|
-
export function getVersionsDetails(dispatch,
|
|
1106
|
+
export function getVersionsDetails(dispatch, apolloClient, parentProductId, parentProductName) {
|
|
939
1107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1108
|
+
var _a, _b, _c, _d;
|
|
940
1109
|
try {
|
|
941
1110
|
dispatch({
|
|
942
1111
|
type: CaseReducerConstants.getVersionDetails,
|
|
943
1112
|
payload: { versionsDetails: getApiResourceObject([], true) },
|
|
944
1113
|
});
|
|
945
|
-
const
|
|
1114
|
+
const { data } = yield apolloClient.query({
|
|
1115
|
+
query: GET_PRODUCTS,
|
|
1116
|
+
variables: {
|
|
1117
|
+
where: {
|
|
1118
|
+
ParentProduct__c: { eq: parentProductId },
|
|
1119
|
+
IsActive: { eq: true },
|
|
1120
|
+
},
|
|
1121
|
+
first: 200,
|
|
1122
|
+
},
|
|
1123
|
+
});
|
|
1124
|
+
const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportProduct2) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
|
|
1125
|
+
const versionsDetails = handleGraphQLVersionsResponse(edges, parentProductName);
|
|
946
1126
|
dispatch({
|
|
947
1127
|
type: CaseReducerConstants.getVersionDetails,
|
|
948
1128
|
payload: { versionsDetails: getApiResourceObject(versionsDetails) },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAoB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAiB,MAAM,0CAA0C,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAIH,gCAAgC,EAGnC,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"RecommendationsReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/RecommendationsReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAoB,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAiB,MAAM,0CAA0C,CAAC;AAC5G,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAIH,gCAAgC,EAGnC,MAAM,mBAAmB,CAAC;AAI3B,KAAK,WAAW,GAAG,OAAO,CAAC,wBAAwB,EAAE,qBAAqB,CAAC,CAAC;AAC5E,MAAM,MAAM,kCAAkC,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE9E,MAAM,WAAW,qBAAqB;IAClC,wBAAwB,EAAE,OAAO,CAAC;IAClC,6BAA6B,EAAE,OAAO,CAAC;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,WAAW,EAAE,mBAAmB,EAAE,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,kBAAkB,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC3C,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,eAAO,MAAM,2BAA2B,EAAE,qBAazC,CAAC;AAEF,oBAAY,wBAAwB;IAChC,sBAAsB,2BAA2B;IACjD,uBAAuB,4BAA4B;IACnD,4BAA4B,iCAAiC;IAC7D,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,4BAA4B,iCAAiC;IAC7D,4BAA4B,iCAAiC;IAC7D,sBAAsB,2BAA2B;IACjD,2BAA2B,gCAAgC;IAC3D,oBAAoB,yBAAyB;IAC7C,cAAc,mBAAmB;CACpC;AAGD,eAAO,MAAM,sBAAsB,GAAI,OAAO,qBAAqB,EAAE,QAAQ,WAAW,KAAG,qBAmD1F,CAAC;AAoBF,eAAO,MAAM,oBAAoB,GAC7B,UAAU,kCAAkC,EAC5C,MAAM,uBAAuB,EAC7B,UAAU,MAAM,EAChB,WAAW,MAAM,EACjB,2BAA2B,MAAM,EACjC,sBAAqB,EACrB,YAAY,MAAM,EAClB,wBAAwB,OAAO,EAC/B,oBAAoB,gCAAgC,EACpD,cAAc,WAAW,kBA8B5B,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACpC,UAAU,kCAAkC,EAC5C,OAAO,mBAAmB,EAC1B,UAAU,MAAM,EAChB,WAAW,MAAM,EACjB,2BAA2B,MAAM,EACjC,uBAAqB,EACrB,oBAAoB,gCAAgC,EACpD,cAAc,WAAW,kBA6B5B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,kCAAkC,EAAE,SAAS,mBAAmB,EAAE,SAE1G,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,UAAU,kCAAkC,EAAE,SAAS,MAAM,SAE3F,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,UAAU,kCAAkC,EAAE,gBAAgB,MAAM,EAAE,SAE5G,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,UAAU,kCAAkC,SAEhF,CAAC"}
|