@rh-support/troubleshoot 2.6.340 → 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 +1 -1
- 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 +1 -2
- 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.js +2 -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.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +7 -9
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +18 -13
- 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 -135
- 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 -160
- 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 -121
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +7 -30
- 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 +2 -3
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +15 -98
- 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 -50
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +99 -270
- 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
|
@@ -7,34 +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
22
|
import { CaseReducerConstants, DESCRIPTION_LENGTH_LIMIT, initialCaseState, SupportLevelDisplay, } from './CaseConstNTypes';
|
|
35
|
-
import { createCasePayload,
|
|
23
|
+
import { createCasePayload, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
36
24
|
import { updateSession } from './SessionRestoreReducer';
|
|
37
|
-
const safeDecodeGroupName = (value) => unescape(value);
|
|
38
25
|
export const caseReducer = (pState, action) => {
|
|
39
26
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
40
27
|
switch (action.type) {
|
|
@@ -42,18 +29,17 @@ export const caseReducer = (pState, action) => {
|
|
|
42
29
|
const hasLargeCaseDescription = action.payload.caseDetails.hasOwnProperty('description')
|
|
43
30
|
? (action.payload.caseDetails.description || '').length > DESCRIPTION_LENGTH_LIMIT
|
|
44
31
|
: pState.hasLargeCaseDescription;
|
|
45
|
-
let resetEntitlementId = false;
|
|
46
32
|
if (((_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseDetails) === null || _b === void 0 ? void 0 : _b.contactSSOName) &&
|
|
47
33
|
pState.caseDetails.contactSSOName !== ((_d = (_c = action.payload) === null || _c === void 0 ? void 0 : _c.caseDetails) === null || _d === void 0 ? void 0 : _d.contactSSOName)) {
|
|
48
34
|
// Need to reset casegroup and sla as they are dependent on selected owner
|
|
49
35
|
action.payload.caseDetails.entitlementSla = undefined;
|
|
50
|
-
resetEntitlementId = true;
|
|
51
36
|
}
|
|
52
|
-
if (
|
|
37
|
+
if (((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.caseDetails) === null || _f === void 0 ? void 0 : _f.product) &&
|
|
53
38
|
pState.caseDetails.product !== ((_h = (_g = action.payload) === null || _g === void 0 ? void 0 : _g.caseDetails) === null || _h === void 0 ? void 0 : _h.product)) {
|
|
54
|
-
|
|
39
|
+
// need to reset sla on product change as individiual products can have independent sla
|
|
40
|
+
action.payload.caseDetails.entitlementSla = undefined;
|
|
55
41
|
}
|
|
56
|
-
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 });
|
|
57
43
|
}
|
|
58
44
|
case CaseReducerConstants.caseStateChanged: {
|
|
59
45
|
return Object.assign(Object.assign({}, pState), action.payload);
|
|
@@ -103,8 +89,10 @@ export const caseReducer = (pState, action) => {
|
|
|
103
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 : '' }) });
|
|
104
90
|
}
|
|
105
91
|
case CaseReducerConstants.receivedCaseDetails: {
|
|
106
|
-
|
|
107
|
-
|
|
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 }) });
|
|
108
96
|
}
|
|
109
97
|
case CaseReducerConstants.receivedCaseDetailsError: {
|
|
110
98
|
return Object.assign(Object.assign({}, pState), { isFetchingCaseDetails: false, isFetchingCaseDetailsError: true, caseDetailsError: action.payload.caseDetailsError });
|
|
@@ -179,42 +167,24 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
179
167
|
payload: { selectedNotificationContacts },
|
|
180
168
|
});
|
|
181
169
|
};
|
|
182
|
-
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
|
|
183
|
-
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;
|
|
184
172
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
185
173
|
try {
|
|
186
174
|
const casePayload = createCasePayload(caseDetails, sessionItem, isCaseCreate);
|
|
187
|
-
const graphQLPayload = createCasePayloadGraphQL(caseDetails, sessionItem, isCaseCreate);
|
|
188
175
|
dispatch({ type: CaseReducerConstants.resetCaseNoOfCreatedCase, payload: { caseNoOfCreatedCase: '' } });
|
|
189
|
-
const
|
|
190
|
-
mutation: CREATE_SUPPORT_CASE,
|
|
191
|
-
variables: {
|
|
192
|
-
caseInput: graphQLPayload,
|
|
193
|
-
},
|
|
194
|
-
});
|
|
195
|
-
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;
|
|
196
|
-
const caseNumber = (_c = caseRecord === null || caseRecord === void 0 ? void 0 : caseRecord.CaseNumber) === null || _c === void 0 ? void 0 : _c.value;
|
|
197
|
-
let caseSfId = caseRecord === null || caseRecord === void 0 ? void 0 : caseRecord.Id;
|
|
198
|
-
if (!caseSfId && caseNumber && apolloClient && ((_d = caseDetails.selectedLabelIds) === null || _d === void 0 ? void 0 : _d.length)) {
|
|
199
|
-
try {
|
|
200
|
-
const createdCase = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, isSecureSupport);
|
|
201
|
-
caseSfId = createdCase === null || createdCase === void 0 ? void 0 : createdCase.id;
|
|
202
|
-
}
|
|
203
|
-
catch (_h) {
|
|
204
|
-
// Non-blocking: label linking will be skipped if Id cannot be resolved
|
|
205
|
-
}
|
|
206
|
-
}
|
|
176
|
+
const caseNumber = yield publicApi.kase.createCase(casePayload, caseDetails.selectedAccountDetails.data.secureSupport);
|
|
207
177
|
if (casePayload.contactSSOName === loggedInUserSsoUsername &&
|
|
208
|
-
!isEmpty((
|
|
178
|
+
!isEmpty((_a = casePayload.phoneAreaCodePrefixLineNumber) === null || _a === void 0 ? void 0 : _a.trim()) &&
|
|
209
179
|
!isEmpty(trimAndReplacePlus((casePayload === null || casePayload === void 0 ? void 0 : casePayload.phoneCountryCode) || ''))) {
|
|
210
180
|
contacts.updateContactBySSO(casePayload.contactSSOName, {
|
|
211
181
|
supportPhoneCountryCode: casePayload.phoneCountryCode,
|
|
212
182
|
supportPhoneAreaCodePrefixLineNumber: casePayload.phoneAreaCodePrefixLineNumber,
|
|
213
183
|
});
|
|
214
184
|
}
|
|
215
|
-
// For updating the sessions and posting cep details
|
|
216
|
-
postCaseCreationProcessing(isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem
|
|
217
|
-
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);
|
|
218
188
|
dispatch({ type: CaseReducerConstants.caseCreated, payload: { caseNoOfCreatedCase: caseNumber } });
|
|
219
189
|
}
|
|
220
190
|
catch (error) {
|
|
@@ -285,30 +255,10 @@ export const postRemoteSessionRequest = (dispatch, caseNumber) => __awaiter(void
|
|
|
285
255
|
}
|
|
286
256
|
});
|
|
287
257
|
// For all post case creation processing contexts
|
|
288
|
-
export const postCaseCreationProcessing = (isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem
|
|
289
|
-
var _a;
|
|
258
|
+
export const postCaseCreationProcessing = (isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem) => __awaiter(void 0, void 0, void 0, function* () {
|
|
290
259
|
isSecureSupport === false && !!sessionItem && resolveSession(sessionRestoreDispatch, sessionItem, caseNumber);
|
|
291
260
|
caseDetails.caseDetails.cep === true && postCepDetails(dispatch, caseNumber, caseDetails.cepDetails);
|
|
292
261
|
caseDetails.caseDetails.screenSessionRequested === true && postRemoteSessionRequest(dispatch, caseNumber);
|
|
293
|
-
if (apolloClient && caseSfId && ((_a = caseDetails.selectedLabelIds) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
294
|
-
postCaseLabelLinks(apolloClient, caseSfId, caseDetails.selectedLabelIds);
|
|
295
|
-
}
|
|
296
|
-
});
|
|
297
|
-
/** Links selected labels to a newly created case. Failures are non-blocking. */
|
|
298
|
-
export const postCaseLabelLinks = (apolloClient, caseSfId, labelIds) => __awaiter(void 0, void 0, void 0, function* () {
|
|
299
|
-
if (!caseSfId || !labelIds.length)
|
|
300
|
-
return;
|
|
301
|
-
yield Promise.allSettled(labelIds.map((labelId) => apolloClient.mutate({
|
|
302
|
-
mutation: CREATE_CASE_LABEL_LINK,
|
|
303
|
-
variables: {
|
|
304
|
-
input: {
|
|
305
|
-
RedHatSupportCaseLabelLink__c: {
|
|
306
|
-
Case__c: caseSfId,
|
|
307
|
-
Label__c: labelId,
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
},
|
|
311
|
-
})));
|
|
312
262
|
});
|
|
313
263
|
// To resolve or update session API
|
|
314
264
|
export const resolveSession = (sessionRestoreDispatch, sessionItem, caseNumber) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -426,8 +376,8 @@ export const clearSelectedAccount = (dispatch) => {
|
|
|
426
376
|
payload: { caseDetails: { accountNumberRef: '' } },
|
|
427
377
|
});
|
|
428
378
|
};
|
|
429
|
-
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 = {}
|
|
430
|
-
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;
|
|
431
381
|
if (isLoggedInUsersAccount && !isEmpty(loggedInUserAccount) && !isEmpty(accountNumber)) {
|
|
432
382
|
dispatch({
|
|
433
383
|
type: CaseReducerConstants.caseStateChanged,
|
|
@@ -460,12 +410,7 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
460
410
|
payload: { selectedAccountDetails: getApiResourceObject({}, true) },
|
|
461
411
|
});
|
|
462
412
|
try {
|
|
463
|
-
const
|
|
464
|
-
query: GET_ACCOUNT,
|
|
465
|
-
variables: getAccountQueryVariables(accountNumber),
|
|
466
|
-
});
|
|
467
|
-
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 : [];
|
|
468
|
-
const selectedAccountDetails = handleGraphQLAccountResponse(edges);
|
|
413
|
+
const selectedAccountDetails = yield accounts.getAccount(accountNumber);
|
|
469
414
|
dispatch({
|
|
470
415
|
type: CaseReducerConstants.caseStateChanged,
|
|
471
416
|
payload: { selectedAccountDetails: getApiResourceObject(selectedAccountDetails) },
|
|
@@ -489,7 +434,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
489
434
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
490
435
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
491
436
|
? caseGroupNumberToRestore
|
|
492
|
-
: (_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';
|
|
493
438
|
dispatch({
|
|
494
439
|
type: CaseReducerConstants.caseStateChanged,
|
|
495
440
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -501,7 +446,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
501
446
|
type: CaseReducerConstants.caseStateChanged,
|
|
502
447
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
503
448
|
});
|
|
504
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
449
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
505
450
|
}
|
|
506
451
|
});
|
|
507
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) {
|
|
@@ -517,7 +462,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
517
462
|
},
|
|
518
463
|
},
|
|
519
464
|
});
|
|
520
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
465
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
521
466
|
dispatch({
|
|
522
467
|
type: CaseReducerConstants.caseStateChanged,
|
|
523
468
|
payload: {
|
|
@@ -530,29 +475,23 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
530
475
|
}
|
|
531
476
|
dispatch({
|
|
532
477
|
type: CaseReducerConstants.caseStateChanged,
|
|
533
|
-
payload: {
|
|
534
|
-
selectedOwner: getApiResourceObject(owner),
|
|
535
|
-
// Invert global/user isEntitled (from subscription GraphQL) into case entitlement flag
|
|
536
|
-
hasInvalidEntitlements: owner.isEntitled === false,
|
|
537
|
-
},
|
|
478
|
+
payload: { selectedOwner: getApiResourceObject(owner) },
|
|
538
479
|
});
|
|
539
480
|
dispatch({
|
|
540
481
|
type: CaseReducerConstants.caseDetailChanged,
|
|
541
482
|
payload: { caseDetails: { contactSSOName: owner.ssoUsername } },
|
|
542
483
|
});
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
// 'later'
|
|
555
|
-
// );
|
|
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');
|
|
556
495
|
});
|
|
557
496
|
//changing the item values to uppercase to match the backend values
|
|
558
497
|
const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
|
|
@@ -615,7 +554,7 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
615
554
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
616
555
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
617
556
|
? caseGroupNumberToRestore
|
|
618
|
-
: (_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';
|
|
619
558
|
dispatch({
|
|
620
559
|
type: CaseReducerConstants.caseStateChanged,
|
|
621
560
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -627,79 +566,18 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
627
566
|
type: CaseReducerConstants.caseStateChanged,
|
|
628
567
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
629
568
|
});
|
|
630
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
631
|
-
}
|
|
632
|
-
});
|
|
633
|
-
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) {
|
|
634
|
-
var _a, _b, _c, _d;
|
|
635
|
-
dispatch({
|
|
636
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
637
|
-
payload: { ownersCaseGroups: getApiResourceObject([], true) },
|
|
638
|
-
});
|
|
639
|
-
try {
|
|
640
|
-
const { data } = yield apolloClient.query({
|
|
641
|
-
query: GET_CASE_GROUP,
|
|
642
|
-
variables: { first: 2000 },
|
|
643
|
-
});
|
|
644
|
-
const response = data;
|
|
645
|
-
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 : [];
|
|
646
|
-
const matchedGroups = allGroups
|
|
647
|
-
.filter(({ node }) => isOrgAdmin ||
|
|
648
|
-
node.CaseGroupMembers__r.edges.some(({ node: member }) => member.Contact__c.value === contactId))
|
|
649
|
-
.map(({ node }) => ({
|
|
650
|
-
groupId: node.Id,
|
|
651
|
-
groupName: safeDecodeGroupName(node.Name.value),
|
|
652
|
-
}));
|
|
653
|
-
if (defaultCaseGroupId && !matchedGroups.some((g) => g.groupId === defaultCaseGroupId)) {
|
|
654
|
-
const currentGroupEdge = allGroups.find(({ node }) => node.Id === defaultCaseGroupId);
|
|
655
|
-
if (currentGroupEdge) {
|
|
656
|
-
matchedGroups.push({
|
|
657
|
-
groupId: currentGroupEdge.node.Id,
|
|
658
|
-
groupName: safeDecodeGroupName(currentGroupEdge.node.Name.value),
|
|
659
|
-
});
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
matchedGroups.sort((a, b) => a.groupName.localeCompare(b.groupName));
|
|
663
|
-
const ownersCaseGroups = matchedGroups.map((g) => ({
|
|
664
|
-
groupNum: g.groupId,
|
|
665
|
-
name: g.groupName,
|
|
666
|
-
isDefault: defaultCaseGroupId ? g.groupId === defaultCaseGroupId : false,
|
|
667
|
-
isPrivate: false,
|
|
668
|
-
defaultMembers: [],
|
|
669
|
-
members: [],
|
|
670
|
-
}));
|
|
671
|
-
dispatch({
|
|
672
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
673
|
-
payload: { ownersCaseGroups: getApiResourceObject(ownersCaseGroups, false) },
|
|
674
|
-
});
|
|
675
|
-
const defaultGroup = defaultCaseGroupId ? matchedGroups.find((g) => g.groupId === defaultCaseGroupId) : null;
|
|
676
|
-
if (currentGroupNumber === '') {
|
|
677
|
-
// User explicitly cleared the group — don't auto-select
|
|
678
|
-
}
|
|
679
|
-
else if (!currentGroupNumber) {
|
|
680
|
-
if (defaultGroup) {
|
|
681
|
-
setCaseDetails(dispatch, { groupNumber: defaultGroup.groupId, groupName: defaultGroup.groupName });
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
return matchedGroups;
|
|
685
|
-
}
|
|
686
|
-
catch (e) {
|
|
687
|
-
dispatch({
|
|
688
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
689
|
-
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
690
|
-
});
|
|
691
|
-
return [];
|
|
569
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
692
570
|
}
|
|
693
571
|
});
|
|
694
572
|
const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
|
|
695
573
|
return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
|
|
696
574
|
};
|
|
697
|
-
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 = {}) {
|
|
698
576
|
var _a, _b, _c, _d;
|
|
699
577
|
const caseDetails = getCaseFromSessionDetails(sessionItem, loggedInUserAccountNumber, loggedInUserContact.ssoUsername);
|
|
700
578
|
const { sessionDetails } = sessionItem;
|
|
701
579
|
setCaseDetails(dispatch, caseDetails);
|
|
702
|
-
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount
|
|
580
|
+
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount);
|
|
703
581
|
// entitlementSla gets undefined when case group, owner or product is changed
|
|
704
582
|
// Please refer line 60
|
|
705
583
|
if (isUndefined(caseDetails.entitlementSla)) {
|
|
@@ -708,7 +586,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
708
586
|
// Set owner and Notified users
|
|
709
587
|
const notifiedUsersExternal = (_b = (_a = sessionDetails.notifiedUsersExternal) === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : [];
|
|
710
588
|
const notifiedUsersInternal = (_d = (_c = sessionDetails.notifiedUsersInternal) === null || _c === void 0 ? void 0 : _c.split(',')) !== null && _d !== void 0 ? _d : [];
|
|
711
|
-
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal
|
|
589
|
+
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal);
|
|
712
590
|
const owner = find(allRelevantContacts, (c) => c.ssoUsername === caseDetails.contactSSOName);
|
|
713
591
|
const selectedNotificationContacts = getSelectedNotificationContactsFromSession(allRelevantContacts, [
|
|
714
592
|
...notifiedUsersExternal,
|
|
@@ -732,7 +610,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
732
610
|
});
|
|
733
611
|
}
|
|
734
612
|
});
|
|
735
|
-
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal
|
|
613
|
+
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
736
614
|
if (loggedInUserContact.isInternal) {
|
|
737
615
|
// Internal users can use the internal API and be done with it
|
|
738
616
|
const userArray = uniq([contactSsoUsername, ...notifiedUsersExternal, ...notifiedUsersInternal]);
|
|
@@ -743,23 +621,28 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
|
|
|
743
621
|
return response.items;
|
|
744
622
|
}
|
|
745
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);
|
|
746
633
|
const contactsToReturn = [];
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
const accountContacts = yield fetchLoggedInUserAccountContactsFromGraphQL(apolloClient);
|
|
750
|
-
contactsToReturn.push(...accountContacts);
|
|
751
|
-
}
|
|
634
|
+
response[0] && contactsToReturn.push(...response[0]);
|
|
635
|
+
response[1] && contactsToReturn.push(...response[1]);
|
|
752
636
|
contactsToReturn.push(loggedInUserContact);
|
|
753
637
|
return uniqBy(contactsToReturn, 'ssoUsername');
|
|
754
638
|
}
|
|
755
639
|
});
|
|
756
|
-
export const
|
|
640
|
+
export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, loggedInUser) => __awaiter(void 0, void 0, void 0, function* () {
|
|
757
641
|
var _a, _b;
|
|
758
642
|
dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
|
|
759
643
|
try {
|
|
760
644
|
const data = yield publicApi.kase.getCase(caseNumber);
|
|
761
645
|
const caseDetails = {
|
|
762
|
-
id: data.id,
|
|
763
646
|
product: data.product,
|
|
764
647
|
version: data.version,
|
|
765
648
|
summary: data.summary,
|
|
@@ -781,7 +664,7 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
781
664
|
createdDate: data.createdDate,
|
|
782
665
|
createdById: data.createdById,
|
|
783
666
|
alternateId: data.alternateId,
|
|
784
|
-
groupNumber: data.groupNumber ||
|
|
667
|
+
groupNumber: data.groupNumber || '-1', //Explicitly assigning folderNumber = '-1' for ungrouped case when case payload has no group information
|
|
785
668
|
caseNumber: data.caseNumber,
|
|
786
669
|
hostname: data.hostname,
|
|
787
670
|
contactInfo24x7: data.contactInfo24x7,
|
|
@@ -793,7 +676,7 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
793
676
|
sbrGroups: (data === null || data === void 0 ? void 0 : data.sbrGroups) || [],
|
|
794
677
|
firstCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.firstCaseInactivityWarningSentAt) || undefined,
|
|
795
678
|
secondCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.secondCaseInactivityWarningSentAt) || undefined,
|
|
796
|
-
groupName:
|
|
679
|
+
groupName: data.groupName || '',
|
|
797
680
|
remoteSessionTermsAcked: (_a = data.remoteSessionTermsAcked) !== null && _a !== void 0 ? _a : false,
|
|
798
681
|
noClusterIdReason: data.noClusterIdReason || '',
|
|
799
682
|
noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
|
|
@@ -824,10 +707,12 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
824
707
|
caseNoOfCreatedCase: caseNumber,
|
|
825
708
|
};
|
|
826
709
|
dispatch({ type: CaseReducerConstants.receivedCaseDetails, payload: Object.assign(Object.assign({}, caseState), { caseDetails }) });
|
|
827
|
-
setCaseAccountNumber(dispatch, data.accountNumberRef
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
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);
|
|
831
716
|
const notifiedListUsers = map(data.notifiedUsers, (o) => ({
|
|
832
717
|
ssoUsername: o.ssoUsername,
|
|
833
718
|
fullNameCustom: o.title,
|
|
@@ -836,22 +721,15 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
836
721
|
type: CaseReducerConstants.setLoadedNotificationContacts,
|
|
837
722
|
payload: { notifiedUsers: notifiedListUsers },
|
|
838
723
|
});
|
|
839
|
-
if (data.groupNumber) {
|
|
724
|
+
if (data.groupNumber && data.groupNumber !== '-1') {
|
|
840
725
|
setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
|
|
841
726
|
}
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
// notifiedListUsers,
|
|
849
|
-
// loggedInUserRights,
|
|
850
|
-
// data.accountNumberRef,
|
|
851
|
-
// data.contactSSOName,
|
|
852
|
-
// data.contactName
|
|
853
|
-
// );
|
|
854
|
-
// }
|
|
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
|
+
}
|
|
855
733
|
}
|
|
856
734
|
catch (error) {
|
|
857
735
|
dispatch({ type: CaseReducerConstants.receivedCaseDetailsError, payload: { caseDetailsError: error } });
|
|
@@ -875,51 +753,7 @@ export const updateCaseDetails = (dispatch, caseNumber, caseDetails, dontSetDeta
|
|
|
875
753
|
}
|
|
876
754
|
catch (error) {
|
|
877
755
|
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
878
|
-
|
|
879
|
-
}
|
|
880
|
-
});
|
|
881
|
-
export const updateCaseDetailsGraphQL = (dispatch, apolloClient, caseNumber, caseUpdate, dontSetDetails, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
882
|
-
var _a, _b;
|
|
883
|
-
try {
|
|
884
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailUpdating });
|
|
885
|
-
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;
|
|
886
|
-
const graphqlDetails = yield updateCaseDetailsGraphQLRequest(apolloClient, caseNumber, caseUpdate, {
|
|
887
|
-
salesforceCaseId,
|
|
888
|
-
existingCaseDetails: (options === null || options === void 0 ? void 0 : options.existingCaseDetails)
|
|
889
|
-
? {
|
|
890
|
-
product: options.existingCaseDetails.product,
|
|
891
|
-
version: options.existingCaseDetails.version,
|
|
892
|
-
noClusterIdReason: options.existingCaseDetails.noClusterIdReason,
|
|
893
|
-
noClusterIdReasonExplanation: options.existingCaseDetails.noClusterIdReasonExplanation,
|
|
894
|
-
additionalCaseInformation: options.existingCaseDetails.additionalCaseInformation,
|
|
895
|
-
}
|
|
896
|
-
: undefined,
|
|
897
|
-
});
|
|
898
|
-
if (dontSetDetails) {
|
|
899
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailCompleted });
|
|
900
|
-
return;
|
|
901
|
-
}
|
|
902
|
-
// productId/entitlementId/entitlementSla are not sent in GraphQL case updates from case edit
|
|
903
|
-
const { productId: _productId, entitlementId: _entitlementId, entitlementSla: _entitlementSla } = caseUpdate, caseUpdateWithoutIds = __rest(caseUpdate, ["productId", "entitlementId", "entitlementSla"]);
|
|
904
|
-
let updatedCaseDetails = Object.assign({}, caseUpdateWithoutIds);
|
|
905
|
-
if (graphqlDetails) {
|
|
906
|
-
const mappedGraphQLDetails = mapGraphQLCaseDetailsToCasePayload(graphqlDetails);
|
|
907
|
-
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), Object.fromEntries(Object.entries(mappedGraphQLDetails).filter(([, value]) => value !== null && value !== undefined && value !== '')));
|
|
908
|
-
}
|
|
909
|
-
else {
|
|
910
|
-
const refreshedDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, options === null || options === void 0 ? void 0 : options.includeSecureSupport);
|
|
911
|
-
if (refreshedDetails) {
|
|
912
|
-
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), mapGraphQLCaseDetailsToCasePayload(refreshedDetails));
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
dispatch({
|
|
916
|
-
type: CaseReducerConstants.caseDetailChanged,
|
|
917
|
-
payload: { caseDetails: updatedCaseDetails, isCaseUpdating: false },
|
|
918
|
-
});
|
|
919
|
-
}
|
|
920
|
-
catch (error) {
|
|
921
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
922
|
-
throw error;
|
|
756
|
+
return Promise.reject(error);
|
|
923
757
|
}
|
|
924
758
|
});
|
|
925
759
|
export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerSSO) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -959,7 +793,7 @@ export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerS
|
|
|
959
793
|
});
|
|
960
794
|
}
|
|
961
795
|
});
|
|
962
|
-
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* () {
|
|
963
797
|
try {
|
|
964
798
|
const selectedNotificationContacts = [];
|
|
965
799
|
if (loggedInUserRights.isExternalNonOrgAdmin()) {
|
|
@@ -998,14 +832,24 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
998
832
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
999
833
|
payload: { isFetchingSelectedNotificationContacts: true, hasErrorSelectedNotificationContacts: false },
|
|
1000
834
|
});
|
|
1001
|
-
const
|
|
1002
|
-
|
|
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);
|
|
1003
848
|
let contactsToReturn = [];
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
}
|
|
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);
|
|
1009
853
|
}
|
|
1010
854
|
dispatch({
|
|
1011
855
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
@@ -1023,23 +867,20 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
1023
867
|
});
|
|
1024
868
|
}
|
|
1025
869
|
});
|
|
1026
|
-
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus
|
|
1027
|
-
if (
|
|
870
|
+
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus) => {
|
|
871
|
+
if (isInternal)
|
|
1028
872
|
return;
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
existingCaseDetails,
|
|
1034
|
-
});
|
|
1035
|
-
});
|
|
873
|
+
if (currentStatus === 'Closed' || currentStatus === 'Waiting on Customer') {
|
|
874
|
+
setCaseDetails(dispatch, { status: 'Waiting on Red Hat' });
|
|
875
|
+
}
|
|
876
|
+
};
|
|
1036
877
|
// to fetch all users for the selected case group after fetching case details so that we can
|
|
1037
878
|
// check which users have access to the selected case group and filter the owner dropdown list accordingly
|
|
1038
879
|
export const setSelectedCaseGroupUsers = (dispatch, accountNumber, groupNumber, loggedInUserRights) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1039
880
|
const canUserChangeOwner = loggedInUserRights.isOrgAdmin() ||
|
|
1040
881
|
(loggedInUserRights.isExternalNonOrgAdmin() &&
|
|
1041
882
|
loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumber));
|
|
1042
|
-
if (
|
|
883
|
+
if (groupNumber === '-1' || !canUserChangeOwner) {
|
|
1043
884
|
dispatch({
|
|
1044
885
|
type: CaseReducerConstants.caseStateChanged,
|
|
1045
886
|
payload: { selectedCaseGroupUsers: getApiResourceObject([]) },
|
|
@@ -1094,26 +935,14 @@ export function updateEmailListState(dispatch, email, customEmailsList, callback
|
|
|
1094
935
|
payload: { customEmailsList: Object.assign(Object.assign({}, customEmailsList), { data: newEmail }) },
|
|
1095
936
|
});
|
|
1096
937
|
}
|
|
1097
|
-
export function getVersionsDetails(dispatch,
|
|
938
|
+
export function getVersionsDetails(dispatch, product) {
|
|
1098
939
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1099
|
-
var _a, _b, _c, _d;
|
|
1100
940
|
try {
|
|
1101
941
|
dispatch({
|
|
1102
942
|
type: CaseReducerConstants.getVersionDetails,
|
|
1103
943
|
payload: { versionsDetails: getApiResourceObject([], true) },
|
|
1104
944
|
});
|
|
1105
|
-
const
|
|
1106
|
-
query: GET_PRODUCTS,
|
|
1107
|
-
variables: {
|
|
1108
|
-
where: {
|
|
1109
|
-
ParentProduct__c: { eq: parentProductId },
|
|
1110
|
-
IsActive: { eq: true },
|
|
1111
|
-
},
|
|
1112
|
-
first: 200,
|
|
1113
|
-
},
|
|
1114
|
-
});
|
|
1115
|
-
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 : [];
|
|
1116
|
-
const versionsDetails = handleGraphQLVersionsResponse(edges, parentProductName);
|
|
945
|
+
const versionsDetails = yield pcm.products.getDetailedVersions(product);
|
|
1117
946
|
dispatch({
|
|
1118
947
|
type: CaseReducerConstants.getVersionDetails,
|
|
1119
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"}
|