@rh-support/troubleshoot 2.6.341 → 2.6.349
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 +29 -19
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +16 -91
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +2 -6
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +32 -61
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +33 -60
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -39
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +4 -15
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +55 -82
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +0 -2
- 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 +2 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +45 -76
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +109 -203
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
- 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 +3 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +9 -5
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +17 -18
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +47 -51
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +44 -49
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +45 -51
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +10 -21
- 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 +2 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +57 -132
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +4 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +58 -93
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +91 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +33 -78
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +153 -122
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +137 -74
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
- 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 +7 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +263 -211
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +57 -123
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +30 -107
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +7 -10
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +16 -30
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +11 -17
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +8 -2
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +9 -11
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
- 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 +22 -15
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
- 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 +18 -16
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +3 -4
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.js +2 -2
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +16 -20
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
- 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 +62 -109
- package/lib/esm/components/shared/Constants.d.ts +0 -5
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +0 -5
- 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 +3 -2
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
- 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 +5 -21
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
- 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 +47 -116
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +57 -22
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +28 -16
- package/lib/esm/components/shared/utils.d.ts +0 -1
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +3 -9
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -170
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +0 -5
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/case.css +202 -60
- 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 +11 -21
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +11 -18
- package/lib/esm/hooks/useS3Upload.d.ts +4 -5
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +30 -28
- 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 +0 -1
- package/lib/esm/models/cache.d.ts +2 -0
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -123
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +7 -31
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
- package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +17 -92
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
- package/lib/esm/reducers/CaseReducer.d.ts +11 -56
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +99 -279
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +18 -15
- package/lib/esm/scss/_main.scss +0 -9
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/package.json +8 -9
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
- package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
- package/lib/esm/graphql/index.d.ts +0 -4
- package/lib/esm/graphql/index.d.ts.map +0 -1
- package/lib/esm/graphql/index.js +0 -3
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
- package/lib/esm/graphql/mutations/index.d.ts +0 -2
- package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/index.js +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
- package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
- package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getParentId.js +0 -16
- package/lib/esm/graphql/queries/index.d.ts +0 -3
- package/lib/esm/graphql/queries/index.d.ts.map +0 -1
- package/lib/esm/graphql/queries/index.js +0 -2
- package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
- package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/escalation.js +0 -1
- package/lib/esm/graphql/schemas/index.d.ts +0 -2
- package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/index.js +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
- package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/index.js +0 -5
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
- package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/types.js +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
- package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
- package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseHistory.js +0 -98
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
- package/lib/esm/models/caseHistory.d.ts +0 -80
- package/lib/esm/models/caseHistory.d.ts.map +0 -1
- package/lib/esm/models/caseHistory.js +0 -1
- package/lib/esm/utils/TimelineUtils.d.ts +0 -41
- package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
- package/lib/esm/utils/TimelineUtils.js +0 -135
- package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseHistoryUtils.js +0 -165
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +0 -6
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +0 -26
|
@@ -7,35 +7,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
|
|
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';
|
|
10
|
+
import { accounts, contacts, kase, pcm, publicApi } from '@cee-eng/hydrajs';
|
|
22
11
|
import { formattedApiErrorMessage } from '@rh-support/components';
|
|
23
|
-
import {
|
|
24
|
-
|
|
12
|
+
import { dtmTrackEventCaseCreationStepEncountered, getApiResourceObject, PreviousToNewCaseTypeMap, } from '@rh-support/utils';
|
|
13
|
+
import delay from 'lodash/delay';
|
|
25
14
|
import filter from 'lodash/filter';
|
|
26
15
|
import find from 'lodash/find';
|
|
27
16
|
import isEmpty from 'lodash/isEmpty';
|
|
28
17
|
import isUndefined from 'lodash/isUndefined';
|
|
29
18
|
import map from 'lodash/map';
|
|
30
|
-
import unescape from 'lodash/unescape';
|
|
31
19
|
import uniq from 'lodash/uniq';
|
|
32
20
|
import uniqBy from 'lodash/uniqBy';
|
|
33
21
|
import { trimAndReplacePlus } from '../components/shared/utils';
|
|
34
|
-
import { buildCaseSeverityFtsGraphQLUpdate } from '../utils/caseSeverityFtsGraphQLUtils';
|
|
35
22
|
import { CaseReducerConstants, DESCRIPTION_LENGTH_LIMIT, initialCaseState, SupportLevelDisplay, } from './CaseConstNTypes';
|
|
36
|
-
import { createCasePayload,
|
|
23
|
+
import { createCasePayload, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
37
24
|
import { updateSession } from './SessionRestoreReducer';
|
|
38
|
-
const safeDecodeGroupName = (value) => unescape(value);
|
|
39
25
|
export const caseReducer = (pState, action) => {
|
|
40
26
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
41
27
|
switch (action.type) {
|
|
@@ -43,18 +29,17 @@ export const caseReducer = (pState, action) => {
|
|
|
43
29
|
const hasLargeCaseDescription = action.payload.caseDetails.hasOwnProperty('description')
|
|
44
30
|
? (action.payload.caseDetails.description || '').length > DESCRIPTION_LENGTH_LIMIT
|
|
45
31
|
: pState.hasLargeCaseDescription;
|
|
46
|
-
let resetEntitlementId = false;
|
|
47
32
|
if (((_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseDetails) === null || _b === void 0 ? void 0 : _b.contactSSOName) &&
|
|
48
33
|
pState.caseDetails.contactSSOName !== ((_d = (_c = action.payload) === null || _c === void 0 ? void 0 : _c.caseDetails) === null || _d === void 0 ? void 0 : _d.contactSSOName)) {
|
|
49
34
|
// Need to reset casegroup and sla as they are dependent on selected owner
|
|
50
35
|
action.payload.caseDetails.entitlementSla = undefined;
|
|
51
|
-
resetEntitlementId = true;
|
|
52
36
|
}
|
|
53
|
-
if (
|
|
37
|
+
if (((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.caseDetails) === null || _f === void 0 ? void 0 : _f.product) &&
|
|
54
38
|
pState.caseDetails.product !== ((_h = (_g = action.payload) === null || _g === void 0 ? void 0 : _g.caseDetails) === null || _h === void 0 ? void 0 : _h.product)) {
|
|
55
|
-
|
|
39
|
+
// need to reset sla on product change as individiual products can have independent sla
|
|
40
|
+
action.payload.caseDetails.entitlementSla = undefined;
|
|
56
41
|
}
|
|
57
|
-
return Object.assign(Object.assign(
|
|
42
|
+
return Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false });
|
|
58
43
|
}
|
|
59
44
|
case CaseReducerConstants.caseStateChanged: {
|
|
60
45
|
return Object.assign(Object.assign({}, pState), action.payload);
|
|
@@ -104,8 +89,10 @@ export const caseReducer = (pState, action) => {
|
|
|
104
89
|
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 : '' }) });
|
|
105
90
|
}
|
|
106
91
|
case CaseReducerConstants.receivedCaseDetails: {
|
|
107
|
-
|
|
108
|
-
|
|
92
|
+
return Object.assign(Object.assign(Object.assign({}, pState), action.payload), { isFetchingCaseDetails: false, isFetchingCaseDetailsError: false });
|
|
93
|
+
}
|
|
94
|
+
case CaseReducerConstants.updateComments: {
|
|
95
|
+
return Object.assign(Object.assign({}, pState), { caseDetails: Object.assign(Object.assign({}, pState.caseDetails), { comments: action.payload.caseDetails.comments }) });
|
|
109
96
|
}
|
|
110
97
|
case CaseReducerConstants.receivedCaseDetailsError: {
|
|
111
98
|
return Object.assign(Object.assign({}, pState), { isFetchingCaseDetails: false, isFetchingCaseDetailsError: true, caseDetailsError: action.payload.caseDetailsError });
|
|
@@ -180,42 +167,24 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
180
167
|
payload: { selectedNotificationContacts },
|
|
181
168
|
});
|
|
182
169
|
};
|
|
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
|
|
184
|
-
var _a, _b
|
|
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;
|
|
185
172
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
186
173
|
try {
|
|
187
174
|
const casePayload = createCasePayload(caseDetails, sessionItem, isCaseCreate);
|
|
188
|
-
const graphQLPayload = createCasePayloadGraphQL(caseDetails, sessionItem, isCaseCreate);
|
|
189
175
|
dispatch({ type: CaseReducerConstants.resetCaseNoOfCreatedCase, payload: { caseNoOfCreatedCase: '' } });
|
|
190
|
-
const
|
|
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) === 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
|
-
}
|
|
176
|
+
const caseNumber = yield publicApi.kase.createCase(casePayload, caseDetails.selectedAccountDetails.data.secureSupport);
|
|
208
177
|
if (casePayload.contactSSOName === loggedInUserSsoUsername &&
|
|
209
|
-
!isEmpty((
|
|
178
|
+
!isEmpty((_a = casePayload.phoneAreaCodePrefixLineNumber) === null || _a === void 0 ? void 0 : _a.trim()) &&
|
|
210
179
|
!isEmpty(trimAndReplacePlus((casePayload === null || casePayload === void 0 ? void 0 : casePayload.phoneCountryCode) || ''))) {
|
|
211
180
|
contacts.updateContactBySSO(casePayload.contactSSOName, {
|
|
212
181
|
supportPhoneCountryCode: casePayload.phoneCountryCode,
|
|
213
182
|
supportPhoneAreaCodePrefixLineNumber: casePayload.phoneAreaCodePrefixLineNumber,
|
|
214
183
|
});
|
|
215
184
|
}
|
|
216
|
-
// For updating the sessions and posting cep details
|
|
217
|
-
postCaseCreationProcessing(isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem
|
|
218
|
-
dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(
|
|
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[(_b = caseDetails.caseDetails) === null || _b === void 0 ? void 0 : _b.caseType], caseDetails.caseDetails.summary, caseDetails.caseDetails.product, caseDetails.caseDetails.version);
|
|
219
188
|
dispatch({ type: CaseReducerConstants.caseCreated, payload: { caseNoOfCreatedCase: caseNumber } });
|
|
220
189
|
}
|
|
221
190
|
catch (error) {
|
|
@@ -286,30 +255,10 @@ export const postRemoteSessionRequest = (dispatch, caseNumber) => __awaiter(void
|
|
|
286
255
|
}
|
|
287
256
|
});
|
|
288
257
|
// For all post case creation processing contexts
|
|
289
|
-
export const postCaseCreationProcessing = (isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem
|
|
290
|
-
var _a;
|
|
258
|
+
export const postCaseCreationProcessing = (isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem) => __awaiter(void 0, void 0, void 0, function* () {
|
|
291
259
|
isSecureSupport === false && !!sessionItem && resolveSession(sessionRestoreDispatch, sessionItem, caseNumber);
|
|
292
260
|
caseDetails.caseDetails.cep === true && postCepDetails(dispatch, caseNumber, caseDetails.cepDetails);
|
|
293
261
|
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
|
-
})));
|
|
313
262
|
});
|
|
314
263
|
// To resolve or update session API
|
|
315
264
|
export const resolveSession = (sessionRestoreDispatch, sessionItem, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -427,8 +376,8 @@ export const clearSelectedAccount = (dispatch) => {
|
|
|
427
376
|
payload: { caseDetails: { accountNumberRef: '' } },
|
|
428
377
|
});
|
|
429
378
|
};
|
|
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 = {}
|
|
431
|
-
var _a
|
|
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;
|
|
432
381
|
if (isLoggedInUsersAccount && !isEmpty(loggedInUserAccount) && !isEmpty(accountNumber)) {
|
|
433
382
|
dispatch({
|
|
434
383
|
type: CaseReducerConstants.caseStateChanged,
|
|
@@ -461,12 +410,7 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
461
410
|
payload: { selectedAccountDetails: getApiResourceObject({}, true) },
|
|
462
411
|
});
|
|
463
412
|
try {
|
|
464
|
-
const
|
|
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);
|
|
413
|
+
const selectedAccountDetails = yield accounts.getAccount(accountNumber);
|
|
470
414
|
dispatch({
|
|
471
415
|
type: CaseReducerConstants.caseStateChanged,
|
|
472
416
|
payload: { selectedAccountDetails: getApiResourceObject(selectedAccountDetails) },
|
|
@@ -490,7 +434,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
490
434
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
491
435
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
492
436
|
? caseGroupNumberToRestore
|
|
493
|
-
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b :
|
|
437
|
+
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b : '-1';
|
|
494
438
|
dispatch({
|
|
495
439
|
type: CaseReducerConstants.caseStateChanged,
|
|
496
440
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -502,7 +446,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
502
446
|
type: CaseReducerConstants.caseStateChanged,
|
|
503
447
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
504
448
|
});
|
|
505
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
449
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
506
450
|
}
|
|
507
451
|
});
|
|
508
452
|
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) {
|
|
@@ -518,7 +462,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
518
462
|
},
|
|
519
463
|
},
|
|
520
464
|
});
|
|
521
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
465
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
522
466
|
dispatch({
|
|
523
467
|
type: CaseReducerConstants.caseStateChanged,
|
|
524
468
|
payload: {
|
|
@@ -531,29 +475,23 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
531
475
|
}
|
|
532
476
|
dispatch({
|
|
533
477
|
type: CaseReducerConstants.caseStateChanged,
|
|
534
|
-
payload: {
|
|
535
|
-
selectedOwner: getApiResourceObject(owner),
|
|
536
|
-
// Invert global/user isEntitled (from subscription GraphQL) into case entitlement flag
|
|
537
|
-
hasInvalidEntitlements: owner.isEntitled === false,
|
|
538
|
-
},
|
|
478
|
+
payload: { selectedOwner: getApiResourceObject(owner) },
|
|
539
479
|
});
|
|
540
480
|
dispatch({
|
|
541
481
|
type: CaseReducerConstants.caseDetailChanged,
|
|
542
482
|
payload: { caseDetails: { contactSSOName: owner.ssoUsername } },
|
|
543
483
|
});
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
// 'later'
|
|
556
|
-
// );
|
|
484
|
+
if (canChangeGroup) {
|
|
485
|
+
if (caseAccountNumber) {
|
|
486
|
+
fetchCaseGroupsForAccount(dispatch, caseAccountNumber, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
|
|
487
|
+
}
|
|
488
|
+
else {
|
|
489
|
+
fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
delay(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
493
|
+
return yield fetchCaseEntitlements(dispatch, owner.ssoUsername, product, abortSignalEntitlements, isUserUpdate, caseNumber);
|
|
494
|
+
}), 5000, 'later');
|
|
557
495
|
});
|
|
558
496
|
//changing the item values to uppercase to match the backend values
|
|
559
497
|
const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
|
|
@@ -616,7 +554,7 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
616
554
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
617
555
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
618
556
|
? caseGroupNumberToRestore
|
|
619
|
-
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b :
|
|
557
|
+
: (_a = find(response, (g) => g.isDefault)) === null || _a === void 0 ? void 0 : _a.groupNum)) !== null && _b !== void 0 ? _b : '-1';
|
|
620
558
|
dispatch({
|
|
621
559
|
type: CaseReducerConstants.caseStateChanged,
|
|
622
560
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -628,79 +566,18 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
628
566
|
type: CaseReducerConstants.caseStateChanged,
|
|
629
567
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
630
568
|
});
|
|
631
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
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 [];
|
|
569
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
693
570
|
}
|
|
694
571
|
});
|
|
695
572
|
const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
|
|
696
573
|
return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
|
|
697
574
|
};
|
|
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 = {}
|
|
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 = {}) {
|
|
699
576
|
var _a, _b, _c, _d;
|
|
700
577
|
const caseDetails = getCaseFromSessionDetails(sessionItem, loggedInUserAccountNumber, loggedInUserContact.ssoUsername);
|
|
701
578
|
const { sessionDetails } = sessionItem;
|
|
702
579
|
setCaseDetails(dispatch, caseDetails);
|
|
703
|
-
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount
|
|
580
|
+
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount);
|
|
704
581
|
// entitlementSla gets undefined when case group, owner or product is changed
|
|
705
582
|
// Please refer line 60
|
|
706
583
|
if (isUndefined(caseDetails.entitlementSla)) {
|
|
@@ -709,7 +586,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
709
586
|
// Set owner and Notified users
|
|
710
587
|
const notifiedUsersExternal = (_b = (_a = sessionDetails.notifiedUsersExternal) === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : [];
|
|
711
588
|
const notifiedUsersInternal = (_d = (_c = sessionDetails.notifiedUsersInternal) === null || _c === void 0 ? void 0 : _c.split(',')) !== null && _d !== void 0 ? _d : [];
|
|
712
|
-
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal
|
|
589
|
+
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal);
|
|
713
590
|
const owner = find(allRelevantContacts, (c) => c.ssoUsername === caseDetails.contactSSOName);
|
|
714
591
|
const selectedNotificationContacts = getSelectedNotificationContactsFromSession(allRelevantContacts, [
|
|
715
592
|
...notifiedUsersExternal,
|
|
@@ -733,7 +610,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
733
610
|
});
|
|
734
611
|
}
|
|
735
612
|
});
|
|
736
|
-
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal
|
|
613
|
+
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
737
614
|
if (loggedInUserContact.isInternal) {
|
|
738
615
|
// Internal users can use the internal API and be done with it
|
|
739
616
|
const userArray = uniq([contactSsoUsername, ...notifiedUsersExternal, ...notifiedUsersInternal]);
|
|
@@ -744,23 +621,28 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
|
|
|
744
621
|
return response.items;
|
|
745
622
|
}
|
|
746
623
|
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);
|
|
747
633
|
const contactsToReturn = [];
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
const accountContacts = yield fetchLoggedInUserAccountContactsFromGraphQL(apolloClient);
|
|
751
|
-
contactsToReturn.push(...accountContacts);
|
|
752
|
-
}
|
|
634
|
+
response[0] && contactsToReturn.push(...response[0]);
|
|
635
|
+
response[1] && contactsToReturn.push(...response[1]);
|
|
753
636
|
contactsToReturn.push(loggedInUserContact);
|
|
754
637
|
return uniqBy(contactsToReturn, 'ssoUsername');
|
|
755
638
|
}
|
|
756
639
|
});
|
|
757
|
-
export const
|
|
640
|
+
export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, loggedInUser) => __awaiter(void 0, void 0, void 0, function* () {
|
|
758
641
|
var _a, _b;
|
|
759
642
|
dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
|
|
760
643
|
try {
|
|
761
644
|
const data = yield publicApi.kase.getCase(caseNumber);
|
|
762
645
|
const caseDetails = {
|
|
763
|
-
id: data.id,
|
|
764
646
|
product: data.product,
|
|
765
647
|
version: data.version,
|
|
766
648
|
summary: data.summary,
|
|
@@ -782,7 +664,7 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
782
664
|
createdDate: data.createdDate,
|
|
783
665
|
createdById: data.createdById,
|
|
784
666
|
alternateId: data.alternateId,
|
|
785
|
-
groupNumber: data.groupNumber ||
|
|
667
|
+
groupNumber: data.groupNumber || '-1', //Explicitly assigning folderNumber = '-1' for ungrouped case when case payload has no group information
|
|
786
668
|
caseNumber: data.caseNumber,
|
|
787
669
|
hostname: data.hostname,
|
|
788
670
|
contactInfo24x7: data.contactInfo24x7,
|
|
@@ -794,7 +676,7 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
794
676
|
sbrGroups: (data === null || data === void 0 ? void 0 : data.sbrGroups) || [],
|
|
795
677
|
firstCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.firstCaseInactivityWarningSentAt) || undefined,
|
|
796
678
|
secondCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.secondCaseInactivityWarningSentAt) || undefined,
|
|
797
|
-
groupName:
|
|
679
|
+
groupName: data.groupName || '',
|
|
798
680
|
remoteSessionTermsAcked: (_a = data.remoteSessionTermsAcked) !== null && _a !== void 0 ? _a : false,
|
|
799
681
|
noClusterIdReason: data.noClusterIdReason || '',
|
|
800
682
|
noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
|
|
@@ -825,10 +707,12 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
825
707
|
caseNoOfCreatedCase: caseNumber,
|
|
826
708
|
};
|
|
827
709
|
dispatch({ type: CaseReducerConstants.receivedCaseDetails, payload: Object.assign(Object.assign({}, caseState), { caseDetails }) });
|
|
828
|
-
setCaseAccountNumber(dispatch, data.accountNumberRef
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
710
|
+
setCaseAccountNumber(dispatch, data.accountNumberRef);
|
|
711
|
+
const canChangeGroup = loggedInUserRights.isInternal() ||
|
|
712
|
+
loggedInUser.isOrgAdmin ||
|
|
713
|
+
loggedInUser.ssoUsername === caseDetails.contactSSOName ||
|
|
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
716
|
const notifiedListUsers = map(data.notifiedUsers, (o) => ({
|
|
833
717
|
ssoUsername: o.ssoUsername,
|
|
834
718
|
fullNameCustom: o.title,
|
|
@@ -837,22 +721,15 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
837
721
|
type: CaseReducerConstants.setLoadedNotificationContacts,
|
|
838
722
|
payload: { notifiedUsers: notifiedListUsers },
|
|
839
723
|
});
|
|
840
|
-
if (data.groupNumber) {
|
|
724
|
+
if (data.groupNumber && data.groupNumber !== '-1') {
|
|
841
725
|
setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
|
|
842
726
|
}
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
// notifiedListUsers,
|
|
850
|
-
// loggedInUserRights,
|
|
851
|
-
// data.accountNumberRef,
|
|
852
|
-
// data.contactSSOName,
|
|
853
|
-
// data.contactName
|
|
854
|
-
// );
|
|
855
|
-
// }
|
|
727
|
+
if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
|
|
728
|
+
getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
|
|
729
|
+
}
|
|
730
|
+
else {
|
|
731
|
+
getNotificationContacts4ExternalUser(dispatch, notifiedListUsers, loggedInUserRights, data.accountNumberRef, data.contactSSOName, data.contactName);
|
|
732
|
+
}
|
|
856
733
|
}
|
|
857
734
|
catch (error) {
|
|
858
735
|
dispatch({ type: CaseReducerConstants.receivedCaseDetailsError, payload: { caseDetailsError: error } });
|
|
@@ -876,61 +753,9 @@ export const updateCaseDetails = (dispatch, caseNumber, caseDetails, dontSetDeta
|
|
|
876
753
|
}
|
|
877
754
|
catch (error) {
|
|
878
755
|
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
879
|
-
|
|
756
|
+
return Promise.reject(error);
|
|
880
757
|
}
|
|
881
758
|
});
|
|
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
|
-
});
|
|
934
759
|
export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerSSO) => __awaiter(void 0, void 0, void 0, function* () {
|
|
935
760
|
const usersArr = (users || []).map((o) => o.ssoUsername).filter((s) => !!s);
|
|
936
761
|
caseOwnerSSO && usersArr.push(caseOwnerSSO);
|
|
@@ -968,7 +793,7 @@ export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerS
|
|
|
968
793
|
});
|
|
969
794
|
}
|
|
970
795
|
});
|
|
971
|
-
export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUserRights, accountNumber, caseOwnerSSO, fullNameCustom
|
|
796
|
+
export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUserRights, accountNumber, caseOwnerSSO, fullNameCustom) => __awaiter(void 0, void 0, void 0, function* () {
|
|
972
797
|
try {
|
|
973
798
|
const selectedNotificationContacts = [];
|
|
974
799
|
if (loggedInUserRights.isExternalNonOrgAdmin()) {
|
|
@@ -1007,14 +832,24 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
1007
832
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
1008
833
|
payload: { isFetchingSelectedNotificationContacts: true, hasErrorSelectedNotificationContacts: false },
|
|
1009
834
|
});
|
|
1010
|
-
const
|
|
1011
|
-
|
|
835
|
+
const promiseArray = [];
|
|
836
|
+
// Only Org admins have access to there own org accounts
|
|
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);
|
|
1012
848
|
let contactsToReturn = [];
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
}
|
|
849
|
+
response[0] && contactsToReturn.push(...response[0]);
|
|
850
|
+
response[1] && contactsToReturn.push(...response[1]);
|
|
851
|
+
contactsToReturn = uniqBy(contactsToReturn, 'ssoUsername').filter((contact) => usersArr.indexOf(contact.ssoUsername) !== -1);
|
|
852
|
+
selectedNotificationContacts.push(...contactsToReturn);
|
|
1018
853
|
}
|
|
1019
854
|
dispatch({
|
|
1020
855
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
@@ -1032,23 +867,20 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
1032
867
|
});
|
|
1033
868
|
}
|
|
1034
869
|
});
|
|
1035
|
-
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus
|
|
1036
|
-
if (
|
|
1037
|
-
return;
|
|
1038
|
-
const { apolloClient, caseNumber, existingCaseDetails } = options !== null && options !== void 0 ? options : {};
|
|
1039
|
-
if (!apolloClient || !caseNumber)
|
|
870
|
+
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus) => {
|
|
871
|
+
if (isInternal)
|
|
1040
872
|
return;
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
}
|
|
1044
|
-
}
|
|
873
|
+
if (currentStatus === 'Closed' || currentStatus === 'Waiting on Customer') {
|
|
874
|
+
setCaseDetails(dispatch, { status: 'Waiting on Red Hat' });
|
|
875
|
+
}
|
|
876
|
+
};
|
|
1045
877
|
// to fetch all users for the selected case group after fetching case details so that we can
|
|
1046
878
|
// check which users have access to the selected case group and filter the owner dropdown list accordingly
|
|
1047
879
|
export const setSelectedCaseGroupUsers = (dispatch, accountNumber, groupNumber, loggedInUserRights) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1048
880
|
const canUserChangeOwner = loggedInUserRights.isOrgAdmin() ||
|
|
1049
881
|
(loggedInUserRights.isExternalNonOrgAdmin() &&
|
|
1050
882
|
loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumber));
|
|
1051
|
-
if (
|
|
883
|
+
if (groupNumber === '-1' || !canUserChangeOwner) {
|
|
1052
884
|
dispatch({
|
|
1053
885
|
type: CaseReducerConstants.caseStateChanged,
|
|
1054
886
|
payload: { selectedCaseGroupUsers: getApiResourceObject([]) },
|
|
@@ -1103,26 +935,14 @@ export function updateEmailListState(dispatch, email, customEmailsList, callback
|
|
|
1103
935
|
payload: { customEmailsList: Object.assign(Object.assign({}, customEmailsList), { data: newEmail }) },
|
|
1104
936
|
});
|
|
1105
937
|
}
|
|
1106
|
-
export function getVersionsDetails(dispatch,
|
|
938
|
+
export function getVersionsDetails(dispatch, product) {
|
|
1107
939
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1108
|
-
var _a, _b, _c, _d;
|
|
1109
940
|
try {
|
|
1110
941
|
dispatch({
|
|
1111
942
|
type: CaseReducerConstants.getVersionDetails,
|
|
1112
943
|
payload: { versionsDetails: getApiResourceObject([], true) },
|
|
1113
944
|
});
|
|
1114
|
-
const
|
|
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);
|
|
945
|
+
const versionsDetails = yield pcm.products.getDetailedVersions(product);
|
|
1126
946
|
dispatch({
|
|
1127
947
|
type: CaseReducerConstants.getVersionDetails,
|
|
1128
948
|
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;AAG3B,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;AAGF,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,kBAsC5B,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,kBAqC5B,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"}
|