@rh-support/troubleshoot 2.6.355 → 2.6.358
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +60 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +79 -47
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +63 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +130 -55
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
- package/lib/esm/components/CaseInformation/CaseLabels.js +106 -0
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +31 -17
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +33 -24
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +141 -0
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +11 -9
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +20 -3
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +0 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +19 -32
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
- package/lib/esm/components/EditDescription/EditDescription.js +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +23 -17
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +4 -3
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +3 -9
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +25 -19
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +139 -91
- package/lib/esm/components/shared/Constants.d.ts +5 -0
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +5 -0
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
- package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +22 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +307 -59
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +119 -47
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +22 -57
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +16 -28
- package/lib/esm/components/shared/utils.d.ts +1 -0
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +9 -3
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +2 -1
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +5 -0
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/app.css +28 -0
- package/lib/esm/css/case.css +60 -209
- package/lib/esm/graphql/index.d.ts +4 -0
- package/lib/esm/graphql/index.d.ts.map +1 -0
- package/lib/esm/graphql/index.js +3 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
- package/lib/esm/graphql/mutations/index.d.ts +2 -0
- package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/index.js +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
- package/lib/esm/graphql/queries/index.d.ts +2 -0
- package/lib/esm/graphql/queries/index.d.ts.map +1 -0
- package/lib/esm/graphql/queries/index.js +1 -0
- package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
- package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/escalation.js +1 -0
- package/lib/esm/graphql/schemas/index.d.ts +2 -0
- package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/index.js +1 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +45 -23
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/index.js +5 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/types.js +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
- package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
- package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseHistory.js +98 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +23 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +84 -0
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +18 -11
- package/lib/esm/hooks/useS3Upload.d.ts +5 -4
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +28 -30
- package/lib/esm/i18n/template-de.d.ts +2 -2
- package/lib/esm/i18n/template-de.js +2 -2
- package/lib/esm/i18n/template-es.d.ts +2 -2
- package/lib/esm/i18n/template-es.js +2 -2
- package/lib/esm/i18n/template-fr.d.ts +2 -2
- package/lib/esm/i18n/template-fr.js +2 -2
- package/lib/esm/i18n/template-it.d.ts +2 -2
- package/lib/esm/i18n/template-it.js +2 -2
- package/lib/esm/i18n/template-jp.d.ts +2 -2
- package/lib/esm/i18n/template-jp.js +2 -2
- package/lib/esm/i18n/template-ko.d.ts +2 -2
- package/lib/esm/i18n/template-ko.js +2 -2
- package/lib/esm/i18n/template-pt.d.ts +2 -2
- package/lib/esm/i18n/template-pt.js +2 -2
- package/lib/esm/i18n/template-ru.d.ts +2 -2
- package/lib/esm/i18n/template-ru.js +2 -2
- package/lib/esm/i18n/template-zh.d.ts +2 -2
- package/lib/esm/i18n/template-zh.js +2 -2
- package/lib/esm/index.js +1 -0
- package/lib/esm/models/cache.d.ts +0 -2
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/models/caseHistory.d.ts +80 -0
- package/lib/esm/models/caseHistory.d.ts.map +1 -0
- package/lib/esm/models/caseHistory.js +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +31 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
- package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +119 -17
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
- package/lib/esm/reducers/CaseReducer.d.ts +56 -11
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +284 -100
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +15 -18
- package/lib/esm/scss/_main.scss +9 -0
- package/lib/esm/utils/TimelineUtils.d.ts +41 -0
- package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
- package/lib/esm/utils/TimelineUtils.js +135 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseHistoryUtils.js +165 -0
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
- package/package.json +9 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
|
@@ -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,9 +427,13 @@ 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;
|
|
381
|
-
|
|
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;
|
|
432
|
+
const loggedInAccountSalesforceId = loggedInUserAccount.salesforceAccountId;
|
|
433
|
+
if (isLoggedInUsersAccount &&
|
|
434
|
+
!isEmpty(loggedInUserAccount) &&
|
|
435
|
+
!isEmpty(accountNumber) &&
|
|
436
|
+
loggedInAccountSalesforceId) {
|
|
382
437
|
dispatch({
|
|
383
438
|
type: CaseReducerConstants.caseStateChanged,
|
|
384
439
|
payload: { selectedAccountDetails: getApiResourceObject(loggedInUserAccount) },
|
|
@@ -410,7 +465,12 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
410
465
|
payload: { selectedAccountDetails: getApiResourceObject({}, true) },
|
|
411
466
|
});
|
|
412
467
|
try {
|
|
413
|
-
const
|
|
468
|
+
const { data } = yield apolloClient.query({
|
|
469
|
+
query: GET_ACCOUNT,
|
|
470
|
+
variables: getAccountQueryVariables(accountNumber),
|
|
471
|
+
});
|
|
472
|
+
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 : [];
|
|
473
|
+
const selectedAccountDetails = handleGraphQLAccountResponse(edges);
|
|
414
474
|
dispatch({
|
|
415
475
|
type: CaseReducerConstants.caseStateChanged,
|
|
416
476
|
payload: { selectedAccountDetails: getApiResourceObject(selectedAccountDetails) },
|
|
@@ -434,7 +494,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
434
494
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
435
495
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
436
496
|
? caseGroupNumberToRestore
|
|
437
|
-
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b :
|
|
497
|
+
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b : null;
|
|
438
498
|
dispatch({
|
|
439
499
|
type: CaseReducerConstants.caseStateChanged,
|
|
440
500
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -446,7 +506,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
446
506
|
type: CaseReducerConstants.caseStateChanged,
|
|
447
507
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
448
508
|
});
|
|
449
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
509
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: null });
|
|
450
510
|
}
|
|
451
511
|
});
|
|
452
512
|
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 +522,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
462
522
|
},
|
|
463
523
|
},
|
|
464
524
|
});
|
|
465
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
525
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: null });
|
|
466
526
|
dispatch({
|
|
467
527
|
type: CaseReducerConstants.caseStateChanged,
|
|
468
528
|
payload: {
|
|
@@ -475,23 +535,29 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
475
535
|
}
|
|
476
536
|
dispatch({
|
|
477
537
|
type: CaseReducerConstants.caseStateChanged,
|
|
478
|
-
payload: {
|
|
538
|
+
payload: {
|
|
539
|
+
selectedOwner: getApiResourceObject(owner),
|
|
540
|
+
// Invert global/user isEntitled (from subscription GraphQL) into case entitlement flag
|
|
541
|
+
hasInvalidEntitlements: owner.isEntitled === false,
|
|
542
|
+
},
|
|
479
543
|
});
|
|
480
544
|
dispatch({
|
|
481
545
|
type: CaseReducerConstants.caseDetailChanged,
|
|
482
546
|
payload: { caseDetails: { contactSSOName: owner.ssoUsername } },
|
|
483
547
|
});
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
548
|
+
// delay(
|
|
549
|
+
// async () =>
|
|
550
|
+
// await fetchCaseEntitlements(
|
|
551
|
+
// dispatch,
|
|
552
|
+
// owner.ssoUsername!,
|
|
553
|
+
// product,
|
|
554
|
+
// abortSignalEntitlements,
|
|
555
|
+
// isUserUpdate,
|
|
556
|
+
// caseNumber
|
|
557
|
+
// ),
|
|
558
|
+
// 5000,
|
|
559
|
+
// 'later'
|
|
560
|
+
// );
|
|
495
561
|
});
|
|
496
562
|
//changing the item values to uppercase to match the backend values
|
|
497
563
|
const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
|
|
@@ -554,7 +620,7 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
554
620
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
555
621
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
556
622
|
? caseGroupNumberToRestore
|
|
557
|
-
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b :
|
|
623
|
+
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b : null;
|
|
558
624
|
dispatch({
|
|
559
625
|
type: CaseReducerConstants.caseStateChanged,
|
|
560
626
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -566,18 +632,79 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
566
632
|
type: CaseReducerConstants.caseStateChanged,
|
|
567
633
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
568
634
|
});
|
|
569
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
635
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: null });
|
|
636
|
+
}
|
|
637
|
+
});
|
|
638
|
+
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) {
|
|
639
|
+
var _a, _b, _c, _d;
|
|
640
|
+
dispatch({
|
|
641
|
+
type: CaseReducerConstants.caseStateChanged,
|
|
642
|
+
payload: { ownersCaseGroups: getApiResourceObject([], true) },
|
|
643
|
+
});
|
|
644
|
+
try {
|
|
645
|
+
const { data } = yield apolloClient.query({
|
|
646
|
+
query: GET_CASE_GROUP,
|
|
647
|
+
variables: { first: 2000 },
|
|
648
|
+
});
|
|
649
|
+
const response = data;
|
|
650
|
+
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 : [];
|
|
651
|
+
const matchedGroups = allGroups
|
|
652
|
+
.filter(({ node }) => isOrgAdmin ||
|
|
653
|
+
node.CaseGroupMembers__r.edges.some(({ node: member }) => member.Contact__c.value === contactId))
|
|
654
|
+
.map(({ node }) => ({
|
|
655
|
+
groupId: node.Id,
|
|
656
|
+
groupName: safeDecodeGroupName(node.Name.value),
|
|
657
|
+
}));
|
|
658
|
+
if (defaultCaseGroupId && !matchedGroups.some((g) => g.groupId === defaultCaseGroupId)) {
|
|
659
|
+
const currentGroupEdge = allGroups.find(({ node }) => node.Id === defaultCaseGroupId);
|
|
660
|
+
if (currentGroupEdge) {
|
|
661
|
+
matchedGroups.push({
|
|
662
|
+
groupId: currentGroupEdge.node.Id,
|
|
663
|
+
groupName: safeDecodeGroupName(currentGroupEdge.node.Name.value),
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
matchedGroups.sort((a, b) => a.groupName.localeCompare(b.groupName));
|
|
668
|
+
const ownersCaseGroups = matchedGroups.map((g) => ({
|
|
669
|
+
groupNum: g.groupId,
|
|
670
|
+
name: g.groupName,
|
|
671
|
+
isDefault: defaultCaseGroupId ? g.groupId === defaultCaseGroupId : false,
|
|
672
|
+
isPrivate: false,
|
|
673
|
+
defaultMembers: [],
|
|
674
|
+
members: [],
|
|
675
|
+
}));
|
|
676
|
+
dispatch({
|
|
677
|
+
type: CaseReducerConstants.caseStateChanged,
|
|
678
|
+
payload: { ownersCaseGroups: getApiResourceObject(ownersCaseGroups, false) },
|
|
679
|
+
});
|
|
680
|
+
const defaultGroup = defaultCaseGroupId ? matchedGroups.find((g) => g.groupId === defaultCaseGroupId) : null;
|
|
681
|
+
if (currentGroupNumber === '') {
|
|
682
|
+
// User explicitly cleared the group — don't auto-select
|
|
683
|
+
}
|
|
684
|
+
else if (currentGroupNumber === null || currentGroupNumber === undefined) {
|
|
685
|
+
if (defaultGroup) {
|
|
686
|
+
setCaseDetails(dispatch, { groupNumber: defaultGroup.groupId, groupName: defaultGroup.groupName });
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
return matchedGroups;
|
|
690
|
+
}
|
|
691
|
+
catch (e) {
|
|
692
|
+
dispatch({
|
|
693
|
+
type: CaseReducerConstants.caseStateChanged,
|
|
694
|
+
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
695
|
+
});
|
|
696
|
+
return [];
|
|
570
697
|
}
|
|
571
698
|
});
|
|
572
699
|
const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
|
|
573
700
|
return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
|
|
574
701
|
};
|
|
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 = {}) {
|
|
702
|
+
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
703
|
var _a, _b, _c, _d;
|
|
577
704
|
const caseDetails = getCaseFromSessionDetails(sessionItem, loggedInUserAccountNumber, loggedInUserContact.ssoUsername);
|
|
578
705
|
const { sessionDetails } = sessionItem;
|
|
579
706
|
setCaseDetails(dispatch, caseDetails);
|
|
580
|
-
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount);
|
|
707
|
+
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount, apolloClient);
|
|
581
708
|
// entitlementSla gets undefined when case group, owner or product is changed
|
|
582
709
|
// Please refer line 60
|
|
583
710
|
if (isUndefined(caseDetails.entitlementSla)) {
|
|
@@ -586,7 +713,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
586
713
|
// Set owner and Notified users
|
|
587
714
|
const notifiedUsersExternal = (_b = (_a = sessionDetails.notifiedUsersExternal) === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : [];
|
|
588
715
|
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);
|
|
716
|
+
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal, apolloClient);
|
|
590
717
|
const owner = find(allRelevantContacts, (c) => c.ssoUsername === caseDetails.contactSSOName);
|
|
591
718
|
const selectedNotificationContacts = getSelectedNotificationContactsFromSession(allRelevantContacts, [
|
|
592
719
|
...notifiedUsersExternal,
|
|
@@ -610,7 +737,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
610
737
|
});
|
|
611
738
|
}
|
|
612
739
|
});
|
|
613
|
-
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
740
|
+
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
|
|
614
741
|
if (loggedInUserContact.isInternal) {
|
|
615
742
|
// Internal users can use the internal API and be done with it
|
|
616
743
|
const userArray = uniq([contactSsoUsername, ...notifiedUsersExternal, ...notifiedUsersInternal]);
|
|
@@ -621,28 +748,23 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
|
|
|
621
748
|
return response.items;
|
|
622
749
|
}
|
|
623
750
|
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
751
|
const contactsToReturn = [];
|
|
634
|
-
|
|
635
|
-
|
|
752
|
+
const shouldFetchAccountContacts = loggedInUserContact.isOrgAdmin || loggedInUserContact.accountNumber !== caseAccountNumber;
|
|
753
|
+
if (shouldFetchAccountContacts && apolloClient) {
|
|
754
|
+
const accountContacts = yield fetchLoggedInUserAccountContactsFromGraphQL(apolloClient);
|
|
755
|
+
contactsToReturn.push(...accountContacts);
|
|
756
|
+
}
|
|
636
757
|
contactsToReturn.push(loggedInUserContact);
|
|
637
758
|
return uniqBy(contactsToReturn, 'ssoUsername');
|
|
638
759
|
}
|
|
639
760
|
});
|
|
640
|
-
export const
|
|
761
|
+
export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights, loggedInUser, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
|
|
641
762
|
var _a, _b;
|
|
642
763
|
dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
|
|
643
764
|
try {
|
|
644
765
|
const data = yield publicApi.kase.getCase(caseNumber);
|
|
645
766
|
const caseDetails = {
|
|
767
|
+
id: data.id,
|
|
646
768
|
product: data.product,
|
|
647
769
|
version: data.version,
|
|
648
770
|
summary: data.summary,
|
|
@@ -664,7 +786,7 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
664
786
|
createdDate: data.createdDate,
|
|
665
787
|
createdById: data.createdById,
|
|
666
788
|
alternateId: data.alternateId,
|
|
667
|
-
groupNumber: data.groupNumber ||
|
|
789
|
+
groupNumber: data.groupNumber || null,
|
|
668
790
|
caseNumber: data.caseNumber,
|
|
669
791
|
hostname: data.hostname,
|
|
670
792
|
contactInfo24x7: data.contactInfo24x7,
|
|
@@ -676,7 +798,7 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
676
798
|
sbrGroups: (data === null || data === void 0 ? void 0 : data.sbrGroups) || [],
|
|
677
799
|
firstCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.firstCaseInactivityWarningSentAt) || undefined,
|
|
678
800
|
secondCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.secondCaseInactivityWarningSentAt) || undefined,
|
|
679
|
-
groupName: data.groupName || '',
|
|
801
|
+
groupName: safeDecodeGroupName(data.groupName || ''),
|
|
680
802
|
remoteSessionTermsAcked: (_a = data.remoteSessionTermsAcked) !== null && _a !== void 0 ? _a : false,
|
|
681
803
|
noClusterIdReason: data.noClusterIdReason || '',
|
|
682
804
|
noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
|
|
@@ -707,12 +829,10 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
707
829
|
caseNoOfCreatedCase: caseNumber,
|
|
708
830
|
};
|
|
709
831
|
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);
|
|
832
|
+
setCaseAccountNumber(dispatch, data.accountNumberRef, false, {}, apolloClient);
|
|
833
|
+
// Owner is set by fetchCaseDetails (GraphQL) in Case.tsx via mapGraphQLCaseContactToOwnerState
|
|
834
|
+
// which already sets selectedOwner with id (contactId) from the case details query.
|
|
835
|
+
// The contact details are then enriched by CaseContactsSelectorExternal when the contacts list loads.
|
|
716
836
|
const notifiedListUsers = map(data.notifiedUsers, (o) => ({
|
|
717
837
|
ssoUsername: o.ssoUsername,
|
|
718
838
|
fullNameCustom: o.title,
|
|
@@ -721,15 +841,22 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
721
841
|
type: CaseReducerConstants.setLoadedNotificationContacts,
|
|
722
842
|
payload: { notifiedUsers: notifiedListUsers },
|
|
723
843
|
});
|
|
724
|
-
if (data.groupNumber
|
|
844
|
+
if (data.groupNumber) {
|
|
725
845
|
setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
|
|
726
846
|
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
else {
|
|
731
|
-
|
|
732
|
-
|
|
847
|
+
// TODO: Re-enable send notifications calls once GraphQL support is available
|
|
848
|
+
// if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
|
|
849
|
+
// getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
|
|
850
|
+
// } else {
|
|
851
|
+
// getNotificationContacts4ExternalUser(
|
|
852
|
+
// dispatch,
|
|
853
|
+
// notifiedListUsers,
|
|
854
|
+
// loggedInUserRights,
|
|
855
|
+
// data.accountNumberRef,
|
|
856
|
+
// data.contactSSOName,
|
|
857
|
+
// data.contactName
|
|
858
|
+
// );
|
|
859
|
+
// }
|
|
733
860
|
}
|
|
734
861
|
catch (error) {
|
|
735
862
|
dispatch({ type: CaseReducerConstants.receivedCaseDetailsError, payload: { caseDetailsError: error } });
|
|
@@ -753,9 +880,61 @@ export const updateCaseDetails = (dispatch, caseNumber, caseDetails, dontSetDeta
|
|
|
753
880
|
}
|
|
754
881
|
catch (error) {
|
|
755
882
|
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
756
|
-
|
|
883
|
+
throw error;
|
|
757
884
|
}
|
|
758
885
|
});
|
|
886
|
+
export const updateCaseDetailsGraphQL = (dispatch, apolloClient, caseNumber, caseUpdate, dontSetDetails, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
887
|
+
var _a, _b;
|
|
888
|
+
try {
|
|
889
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailUpdating });
|
|
890
|
+
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;
|
|
891
|
+
const graphqlDetails = yield updateCaseDetailsGraphQLRequest(apolloClient, caseNumber, caseUpdate, {
|
|
892
|
+
salesforceCaseId,
|
|
893
|
+
existingCaseDetails: (options === null || options === void 0 ? void 0 : options.existingCaseDetails)
|
|
894
|
+
? {
|
|
895
|
+
product: options.existingCaseDetails.product,
|
|
896
|
+
version: options.existingCaseDetails.version,
|
|
897
|
+
noClusterIdReason: options.existingCaseDetails.noClusterIdReason,
|
|
898
|
+
noClusterIdReasonExplanation: options.existingCaseDetails.noClusterIdReasonExplanation,
|
|
899
|
+
additionalCaseInformation: options.existingCaseDetails.additionalCaseInformation,
|
|
900
|
+
}
|
|
901
|
+
: undefined,
|
|
902
|
+
});
|
|
903
|
+
if (dontSetDetails) {
|
|
904
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailCompleted });
|
|
905
|
+
return;
|
|
906
|
+
}
|
|
907
|
+
// productId/entitlementId/entitlementSla are not sent in GraphQL case updates from case edit
|
|
908
|
+
const { productId: _productId, entitlementId: _entitlementId, entitlementSla: _entitlementSla } = caseUpdate, caseUpdateWithoutIds = __rest(caseUpdate, ["productId", "entitlementId", "entitlementSla"]);
|
|
909
|
+
let updatedCaseDetails = Object.assign({}, caseUpdateWithoutIds);
|
|
910
|
+
if (graphqlDetails) {
|
|
911
|
+
const mappedGraphQLDetails = mapGraphQLCaseDetailsToCasePayload(graphqlDetails);
|
|
912
|
+
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), Object.fromEntries(Object.entries(mappedGraphQLDetails).filter(([, value]) => value !== null && value !== undefined && value !== '')));
|
|
913
|
+
}
|
|
914
|
+
else {
|
|
915
|
+
const refreshedDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, options === null || options === void 0 ? void 0 : options.includeSecureSupport);
|
|
916
|
+
if (refreshedDetails) {
|
|
917
|
+
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), mapGraphQLCaseDetailsToCasePayload(refreshedDetails));
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
dispatch({
|
|
921
|
+
type: CaseReducerConstants.caseDetailChanged,
|
|
922
|
+
payload: { caseDetails: updatedCaseDetails, isCaseUpdating: false },
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
catch (error) {
|
|
926
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
927
|
+
throw error;
|
|
928
|
+
}
|
|
929
|
+
});
|
|
930
|
+
/** GraphQL CaseUpdate for severity/status and FTS (X24x7__c / X24x7ContactInformation__c). */
|
|
931
|
+
export const updateCaseSeverityAndFtsGraphQL = (dispatch, apolloClient, caseNumber, payload, currentSeverity, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
932
|
+
const graphqlUpdate = buildCaseSeverityFtsGraphQLUpdate(payload, currentSeverity);
|
|
933
|
+
if (Object.keys(graphqlUpdate).length === 0) {
|
|
934
|
+
return;
|
|
935
|
+
}
|
|
936
|
+
yield updateCaseDetailsGraphQL(dispatch, apolloClient, caseNumber, graphqlUpdate, false, options);
|
|
937
|
+
});
|
|
759
938
|
export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerSSO) => __awaiter(void 0, void 0, void 0, function* () {
|
|
760
939
|
const usersArr = (users || []).map((o) => o.ssoUsername).filter((s) => !!s);
|
|
761
940
|
caseOwnerSSO && usersArr.push(caseOwnerSSO);
|
|
@@ -793,7 +972,7 @@ export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerS
|
|
|
793
972
|
});
|
|
794
973
|
}
|
|
795
974
|
});
|
|
796
|
-
export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUserRights, accountNumber, caseOwnerSSO, fullNameCustom) => __awaiter(void 0, void 0, void 0, function* () {
|
|
975
|
+
export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUserRights, accountNumber, caseOwnerSSO, fullNameCustom, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
|
|
797
976
|
try {
|
|
798
977
|
const selectedNotificationContacts = [];
|
|
799
978
|
if (loggedInUserRights.isExternalNonOrgAdmin()) {
|
|
@@ -832,24 +1011,14 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
832
1011
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
833
1012
|
payload: { isFetchingSelectedNotificationContacts: true, hasErrorSelectedNotificationContacts: false },
|
|
834
1013
|
});
|
|
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);
|
|
1014
|
+
const shouldFetchAccountContacts = loggedInUserRights.isOrgAdmin() ||
|
|
1015
|
+
loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumber);
|
|
848
1016
|
let contactsToReturn = [];
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
1017
|
+
if (shouldFetchAccountContacts && apolloClient) {
|
|
1018
|
+
contactsToReturn = yield fetchLoggedInUserAccountContactsFromGraphQL(apolloClient);
|
|
1019
|
+
contactsToReturn = uniqBy(contactsToReturn, 'ssoUsername').filter((contact) => usersArr.indexOf(contact.ssoUsername) !== -1);
|
|
1020
|
+
selectedNotificationContacts.push(...contactsToReturn);
|
|
1021
|
+
}
|
|
853
1022
|
}
|
|
854
1023
|
dispatch({
|
|
855
1024
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
@@ -867,20 +1036,23 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
867
1036
|
});
|
|
868
1037
|
}
|
|
869
1038
|
});
|
|
870
|
-
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus) => {
|
|
871
|
-
if (isInternal)
|
|
1039
|
+
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1040
|
+
if (!shouldPersistInProgressOnCustomerActivity(isInternal, currentStatus))
|
|
872
1041
|
return;
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
}
|
|
1042
|
+
const { apolloClient, caseNumber, existingCaseDetails } = options !== null && options !== void 0 ? options : {};
|
|
1043
|
+
if (!apolloClient || !caseNumber)
|
|
1044
|
+
return;
|
|
1045
|
+
yield updateCaseDetailsGraphQL(dispatch, apolloClient, caseNumber, { status: 'In Progress' }, false, {
|
|
1046
|
+
existingCaseDetails,
|
|
1047
|
+
});
|
|
1048
|
+
});
|
|
877
1049
|
// to fetch all users for the selected case group after fetching case details so that we can
|
|
878
1050
|
// check which users have access to the selected case group and filter the owner dropdown list accordingly
|
|
879
1051
|
export const setSelectedCaseGroupUsers = (dispatch, accountNumber, groupNumber, loggedInUserRights) => __awaiter(void 0, void 0, void 0, function* () {
|
|
880
1052
|
const canUserChangeOwner = loggedInUserRights.isOrgAdmin() ||
|
|
881
1053
|
(loggedInUserRights.isExternalNonOrgAdmin() &&
|
|
882
1054
|
loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumber));
|
|
883
|
-
if (groupNumber
|
|
1055
|
+
if (!groupNumber || !canUserChangeOwner) {
|
|
884
1056
|
dispatch({
|
|
885
1057
|
type: CaseReducerConstants.caseStateChanged,
|
|
886
1058
|
payload: { selectedCaseGroupUsers: getApiResourceObject([]) },
|
|
@@ -935,14 +1107,26 @@ export function updateEmailListState(dispatch, email, customEmailsList, callback
|
|
|
935
1107
|
payload: { customEmailsList: Object.assign(Object.assign({}, customEmailsList), { data: newEmail }) },
|
|
936
1108
|
});
|
|
937
1109
|
}
|
|
938
|
-
export function getVersionsDetails(dispatch,
|
|
1110
|
+
export function getVersionsDetails(dispatch, apolloClient, parentProductId, parentProductName) {
|
|
939
1111
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1112
|
+
var _a, _b, _c, _d;
|
|
940
1113
|
try {
|
|
941
1114
|
dispatch({
|
|
942
1115
|
type: CaseReducerConstants.getVersionDetails,
|
|
943
1116
|
payload: { versionsDetails: getApiResourceObject([], true) },
|
|
944
1117
|
});
|
|
945
|
-
const
|
|
1118
|
+
const { data } = yield apolloClient.query({
|
|
1119
|
+
query: GET_PRODUCTS,
|
|
1120
|
+
variables: {
|
|
1121
|
+
where: {
|
|
1122
|
+
ParentProduct__c: { eq: parentProductId },
|
|
1123
|
+
IsActive: { eq: true },
|
|
1124
|
+
},
|
|
1125
|
+
first: 200,
|
|
1126
|
+
},
|
|
1127
|
+
});
|
|
1128
|
+
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 : [];
|
|
1129
|
+
const versionsDetails = handleGraphQLVersionsResponse(edges, parentProductName);
|
|
946
1130
|
dispatch({
|
|
947
1131
|
type: CaseReducerConstants.getVersionDetails,
|
|
948
1132
|
payload: { versionsDetails: getApiResourceObject(versionsDetails) },
|