@rh-support/troubleshoot 2.6.361 → 2.6.364
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 +17 -92
- 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 +9 -19
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +7 -28
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +57 -88
- 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 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +11 -24
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +57 -92
- 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 +49 -55
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +46 -53
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +3 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +46 -52
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +17 -63
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -2
- 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 +3 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +56 -131
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +6 -11
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.js +1 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +71 -111
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +10 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +2 -4
- 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 +102 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +26 -42
- 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 +148 -152
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -10
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +146 -252
- 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 +271 -215
- 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 +2 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -36
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +230 -62
- 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 +8 -24
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -8
- 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 +62 -173
- 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 +31 -108
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +5 -2
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +19 -33
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +24 -33
- 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 +10 -13
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +10 -12
- 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 -20
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +1 -0
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +32 -19
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +2 -4
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +2 -4
- 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 +4 -8
- package/lib/esm/components/EditDescription/EditDescription.d.ts.map +1 -1
- package/lib/esm/components/EditDescription/EditDescription.js +2 -4
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +17 -23
- 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.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +9 -3
- 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 +19 -25
- 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 +93 -141
- 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 +0 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -4
- 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 -22
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +59 -307
- 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 -5
- 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 -119
- 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 -178
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +1 -2
- 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 +13 -12
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +0 -7
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +11 -14
- 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/app.css +0 -28
- package/lib/esm/css/case.css +212 -209
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +23 -45
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -9
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -108
- 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 -12
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +73 -88
- package/lib/esm/reducers/CaseHelpers.d.ts +1 -11
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +17 -119
- 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 +100 -284
- 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 -10
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -8
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -18
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -10
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -31
- 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 -62
- 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 -108
- 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 -141
- 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 -36
- package/lib/esm/graphql/queries/index.d.ts +0 -2
- package/lib/esm/graphql/queries/index.d.ts.map +0 -1
- package/lib/esm/graphql/queries/index.js +0 -1
- package/lib/esm/graphql/schemas/escalation.d.ts +0 -66
- 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 -57
- package/lib/esm/hooks/useCaseComments/index.d.ts +0 -8
- 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 -93
- 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 -26
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -113
- 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/useCaseGroupUiState.d.ts +0 -3
- package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseGroupUiState.js +0 -10
- 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 -107
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -23
- 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 -86
- 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 -85
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseHistoryUtils.js +0 -196
- 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
- package/lib/esm/utils/linkifyHtmlTextNodes.d.ts +0 -8
- package/lib/esm/utils/linkifyHtmlTextNodes.d.ts.map +0 -1
- package/lib/esm/utils/linkifyHtmlTextNodes.js +0 -37
|
@@ -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, traditionalSupportAgreed);
|
|
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__c) === null || _c === void 0 ? void 0 : _c.value;
|
|
198
|
-
let caseSfId = caseRecord === null || caseRecord === void 0 ? void 0 : caseRecord.Id;
|
|
199
|
-
if (!caseSfId && caseNumber && apolloClient && ((_d = caseDetails.selectedLabelIds) === null || _d === void 0 ? void 0 : _d.length)) {
|
|
200
|
-
try {
|
|
201
|
-
const createdCase = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, isSecureSupport);
|
|
202
|
-
caseSfId = createdCase === null || createdCase === void 0 ? void 0 : createdCase.id;
|
|
203
|
-
}
|
|
204
|
-
catch (_h) {
|
|
205
|
-
// Non-blocking: label linking will be skipped if Id cannot be resolved
|
|
206
|
-
}
|
|
207
|
-
}
|
|
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,13 +376,9 @@ 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
|
|
432
|
-
|
|
433
|
-
if (isLoggedInUsersAccount &&
|
|
434
|
-
!isEmpty(loggedInUserAccount) &&
|
|
435
|
-
!isEmpty(accountNumber) &&
|
|
436
|
-
loggedInAccountSalesforceId) {
|
|
379
|
+
export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, accountNumber_1, ...args_1], void 0, function* (dispatch, accountNumber, isLoggedInUsersAccount = false, loggedInUserAccount = {}) {
|
|
380
|
+
var _a;
|
|
381
|
+
if (isLoggedInUsersAccount && !isEmpty(loggedInUserAccount) && !isEmpty(accountNumber)) {
|
|
437
382
|
dispatch({
|
|
438
383
|
type: CaseReducerConstants.caseStateChanged,
|
|
439
384
|
payload: { selectedAccountDetails: getApiResourceObject(loggedInUserAccount) },
|
|
@@ -465,12 +410,7 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
465
410
|
payload: { selectedAccountDetails: getApiResourceObject({}, true) },
|
|
466
411
|
});
|
|
467
412
|
try {
|
|
468
|
-
const
|
|
469
|
-
query: GET_ACCOUNT,
|
|
470
|
-
variables: getAccountQueryVariables(accountNumber),
|
|
471
|
-
});
|
|
472
|
-
const edges = (_e = (_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _b === void 0 ? void 0 : _b.query) === null || _c === void 0 ? void 0 : _c.RedHatSupportAccount) === null || _d === void 0 ? void 0 : _d.edges) !== null && _e !== void 0 ? _e : [];
|
|
473
|
-
const selectedAccountDetails = handleGraphQLAccountResponse(edges);
|
|
413
|
+
const selectedAccountDetails = yield accounts.getAccount(accountNumber);
|
|
474
414
|
dispatch({
|
|
475
415
|
type: CaseReducerConstants.caseStateChanged,
|
|
476
416
|
payload: { selectedAccountDetails: getApiResourceObject(selectedAccountDetails) },
|
|
@@ -494,7 +434,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
494
434
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
495
435
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
496
436
|
? caseGroupNumberToRestore
|
|
497
|
-
: (_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';
|
|
498
438
|
dispatch({
|
|
499
439
|
type: CaseReducerConstants.caseStateChanged,
|
|
500
440
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -506,7 +446,7 @@ export const fetchCaseGroupsForAccount = (dispatch_1, accountNumber_1, ...args_1
|
|
|
506
446
|
type: CaseReducerConstants.caseStateChanged,
|
|
507
447
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
508
448
|
});
|
|
509
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
449
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
510
450
|
}
|
|
511
451
|
});
|
|
512
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) {
|
|
@@ -522,7 +462,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
522
462
|
},
|
|
523
463
|
},
|
|
524
464
|
});
|
|
525
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
465
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
526
466
|
dispatch({
|
|
527
467
|
type: CaseReducerConstants.caseStateChanged,
|
|
528
468
|
payload: {
|
|
@@ -535,29 +475,23 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
535
475
|
}
|
|
536
476
|
dispatch({
|
|
537
477
|
type: CaseReducerConstants.caseStateChanged,
|
|
538
|
-
payload: {
|
|
539
|
-
selectedOwner: getApiResourceObject(owner),
|
|
540
|
-
// Invert global/user isEntitled (from subscription GraphQL) into case entitlement flag
|
|
541
|
-
hasInvalidEntitlements: owner.isEntitled === false,
|
|
542
|
-
},
|
|
478
|
+
payload: { selectedOwner: getApiResourceObject(owner) },
|
|
543
479
|
});
|
|
544
480
|
dispatch({
|
|
545
481
|
type: CaseReducerConstants.caseDetailChanged,
|
|
546
482
|
payload: { caseDetails: { contactSSOName: owner.ssoUsername } },
|
|
547
483
|
});
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
// 'later'
|
|
560
|
-
// );
|
|
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');
|
|
561
495
|
});
|
|
562
496
|
//changing the item values to uppercase to match the backend values
|
|
563
497
|
const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
|
|
@@ -620,7 +554,7 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
620
554
|
(response || []).sort((a, b) => a.name.localeCompare(b.name));
|
|
621
555
|
const defaultCaseGroup = (_b = (!isEmpty(caseGroupNumberToRestore)
|
|
622
556
|
? caseGroupNumberToRestore
|
|
623
|
-
: (_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';
|
|
624
558
|
dispatch({
|
|
625
559
|
type: CaseReducerConstants.caseStateChanged,
|
|
626
560
|
payload: { ownersCaseGroups: getApiResourceObject(response, false) },
|
|
@@ -632,79 +566,18 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
632
566
|
type: CaseReducerConstants.caseStateChanged,
|
|
633
567
|
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
634
568
|
});
|
|
635
|
-
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber:
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
export const fetchCaseGroupsForContactGraphQL = (dispatch_1, apolloClient_1, contactId_1, accountNumber_1, defaultCaseGroupId_1, ...args_1) => __awaiter(void 0, [dispatch_1, apolloClient_1, contactId_1, accountNumber_1, defaultCaseGroupId_1, ...args_1], void 0, function* (dispatch, apolloClient, contactId, accountNumber, defaultCaseGroupId, isOrgAdmin = false, currentGroupNumber) {
|
|
639
|
-
var _a, _b, _c, _d;
|
|
640
|
-
dispatch({
|
|
641
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
642
|
-
payload: { ownersCaseGroups: getApiResourceObject([], true) },
|
|
643
|
-
});
|
|
644
|
-
try {
|
|
645
|
-
const { data } = yield apolloClient.query({
|
|
646
|
-
query: GET_CASE_GROUP,
|
|
647
|
-
variables: { first: 2000 },
|
|
648
|
-
});
|
|
649
|
-
const response = data;
|
|
650
|
-
const allGroups = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportCaseGroup__c) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
|
|
651
|
-
const matchedGroups = allGroups
|
|
652
|
-
.filter(({ node }) => isOrgAdmin ||
|
|
653
|
-
node.CaseGroupMembers__r.edges.some(({ node: member }) => member.Contact__c.value === contactId))
|
|
654
|
-
.map(({ node }) => ({
|
|
655
|
-
groupId: node.Id,
|
|
656
|
-
groupName: safeDecodeGroupName(node.Name.value),
|
|
657
|
-
}));
|
|
658
|
-
if (defaultCaseGroupId && !matchedGroups.some((g) => g.groupId === defaultCaseGroupId)) {
|
|
659
|
-
const currentGroupEdge = allGroups.find(({ node }) => node.Id === defaultCaseGroupId);
|
|
660
|
-
if (currentGroupEdge) {
|
|
661
|
-
matchedGroups.push({
|
|
662
|
-
groupId: currentGroupEdge.node.Id,
|
|
663
|
-
groupName: safeDecodeGroupName(currentGroupEdge.node.Name.value),
|
|
664
|
-
});
|
|
665
|
-
}
|
|
666
|
-
}
|
|
667
|
-
matchedGroups.sort((a, b) => a.groupName.localeCompare(b.groupName));
|
|
668
|
-
const ownersCaseGroups = matchedGroups.map((g) => ({
|
|
669
|
-
groupNum: g.groupId,
|
|
670
|
-
name: g.groupName,
|
|
671
|
-
isDefault: defaultCaseGroupId ? g.groupId === defaultCaseGroupId : false,
|
|
672
|
-
isPrivate: false,
|
|
673
|
-
defaultMembers: [],
|
|
674
|
-
members: [],
|
|
675
|
-
}));
|
|
676
|
-
dispatch({
|
|
677
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
678
|
-
payload: { ownersCaseGroups: getApiResourceObject(ownersCaseGroups, false) },
|
|
679
|
-
});
|
|
680
|
-
const defaultGroup = defaultCaseGroupId ? matchedGroups.find((g) => g.groupId === defaultCaseGroupId) : null;
|
|
681
|
-
if (currentGroupNumber === '') {
|
|
682
|
-
// User explicitly cleared the group — don't auto-select
|
|
683
|
-
}
|
|
684
|
-
else if (currentGroupNumber === null || currentGroupNumber === undefined) {
|
|
685
|
-
if (defaultGroup) {
|
|
686
|
-
setCaseDetails(dispatch, { groupNumber: defaultGroup.groupId, groupName: defaultGroup.groupName });
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
return matchedGroups;
|
|
690
|
-
}
|
|
691
|
-
catch (e) {
|
|
692
|
-
dispatch({
|
|
693
|
-
type: CaseReducerConstants.caseStateChanged,
|
|
694
|
-
payload: { ownersCaseGroups: getApiResourceObject([], false, true, e.message) },
|
|
695
|
-
});
|
|
696
|
-
return [];
|
|
569
|
+
setCaseGroupToUngroupedOrDefault && setCaseDetails(dispatch, { groupNumber: '-1' });
|
|
697
570
|
}
|
|
698
571
|
});
|
|
699
572
|
const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
|
|
700
573
|
return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
|
|
701
574
|
};
|
|
702
|
-
export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1], void 0, function* (dispatch, sessionItem, loggedInUserAccountNumber, loggedInUserContact, loggedInUserAccount = {}
|
|
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 = {}) {
|
|
703
576
|
var _a, _b, _c, _d;
|
|
704
577
|
const caseDetails = getCaseFromSessionDetails(sessionItem, loggedInUserAccountNumber, loggedInUserContact.ssoUsername);
|
|
705
578
|
const { sessionDetails } = sessionItem;
|
|
706
579
|
setCaseDetails(dispatch, caseDetails);
|
|
707
|
-
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount
|
|
580
|
+
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount);
|
|
708
581
|
// entitlementSla gets undefined when case group, owner or product is changed
|
|
709
582
|
// Please refer line 60
|
|
710
583
|
if (isUndefined(caseDetails.entitlementSla)) {
|
|
@@ -713,7 +586,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
713
586
|
// Set owner and Notified users
|
|
714
587
|
const notifiedUsersExternal = (_b = (_a = sessionDetails.notifiedUsersExternal) === null || _a === void 0 ? void 0 : _a.split(',')) !== null && _b !== void 0 ? _b : [];
|
|
715
588
|
const notifiedUsersInternal = (_d = (_c = sessionDetails.notifiedUsersInternal) === null || _c === void 0 ? void 0 : _c.split(',')) !== null && _d !== void 0 ? _d : [];
|
|
716
|
-
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal
|
|
589
|
+
const allRelevantContacts = yield getAllRelevantContacts(loggedInUserContact, caseDetails.accountNumberRef, caseDetails.contactSSOName, notifiedUsersExternal, notifiedUsersInternal);
|
|
717
590
|
const owner = find(allRelevantContacts, (c) => c.ssoUsername === caseDetails.contactSSOName);
|
|
718
591
|
const selectedNotificationContacts = getSelectedNotificationContactsFromSession(allRelevantContacts, [
|
|
719
592
|
...notifiedUsersExternal,
|
|
@@ -737,7 +610,7 @@ export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAcc
|
|
|
737
610
|
});
|
|
738
611
|
}
|
|
739
612
|
});
|
|
740
|
-
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal
|
|
613
|
+
const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactSsoUsername, notifiedUsersExternal, notifiedUsersInternal) => __awaiter(void 0, void 0, void 0, function* () {
|
|
741
614
|
if (loggedInUserContact.isInternal) {
|
|
742
615
|
// Internal users can use the internal API and be done with it
|
|
743
616
|
const userArray = uniq([contactSsoUsername, ...notifiedUsersExternal, ...notifiedUsersInternal]);
|
|
@@ -748,23 +621,28 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
|
|
|
748
621
|
return response.items;
|
|
749
622
|
}
|
|
750
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);
|
|
751
633
|
const contactsToReturn = [];
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
const accountContacts = yield fetchLoggedInUserAccountContactsFromGraphQL(apolloClient);
|
|
755
|
-
contactsToReturn.push(...accountContacts);
|
|
756
|
-
}
|
|
634
|
+
response[0] && contactsToReturn.push(...response[0]);
|
|
635
|
+
response[1] && contactsToReturn.push(...response[1]);
|
|
757
636
|
contactsToReturn.push(loggedInUserContact);
|
|
758
637
|
return uniqBy(contactsToReturn, 'ssoUsername');
|
|
759
638
|
}
|
|
760
639
|
});
|
|
761
|
-
export const
|
|
640
|
+
export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, loggedInUser) => __awaiter(void 0, void 0, void 0, function* () {
|
|
762
641
|
var _a, _b;
|
|
763
642
|
dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
|
|
764
643
|
try {
|
|
765
644
|
const data = yield publicApi.kase.getCase(caseNumber);
|
|
766
645
|
const caseDetails = {
|
|
767
|
-
id: data.id,
|
|
768
646
|
product: data.product,
|
|
769
647
|
version: data.version,
|
|
770
648
|
summary: data.summary,
|
|
@@ -786,7 +664,7 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
786
664
|
createdDate: data.createdDate,
|
|
787
665
|
createdById: data.createdById,
|
|
788
666
|
alternateId: data.alternateId,
|
|
789
|
-
groupNumber: data.groupNumber ||
|
|
667
|
+
groupNumber: data.groupNumber || '-1', //Explicitly assigning folderNumber = '-1' for ungrouped case when case payload has no group information
|
|
790
668
|
caseNumber: data.caseNumber,
|
|
791
669
|
hostname: data.hostname,
|
|
792
670
|
contactInfo24x7: data.contactInfo24x7,
|
|
@@ -798,7 +676,7 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
798
676
|
sbrGroups: (data === null || data === void 0 ? void 0 : data.sbrGroups) || [],
|
|
799
677
|
firstCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.firstCaseInactivityWarningSentAt) || undefined,
|
|
800
678
|
secondCaseInactivityWarningSentAt: (data === null || data === void 0 ? void 0 : data.secondCaseInactivityWarningSentAt) || undefined,
|
|
801
|
-
groupName:
|
|
679
|
+
groupName: data.groupName || '',
|
|
802
680
|
remoteSessionTermsAcked: (_a = data.remoteSessionTermsAcked) !== null && _a !== void 0 ? _a : false,
|
|
803
681
|
noClusterIdReason: data.noClusterIdReason || '',
|
|
804
682
|
noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
|
|
@@ -829,10 +707,12 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
829
707
|
caseNoOfCreatedCase: caseNumber,
|
|
830
708
|
};
|
|
831
709
|
dispatch({ type: CaseReducerConstants.receivedCaseDetails, payload: Object.assign(Object.assign({}, caseState), { caseDetails }) });
|
|
832
|
-
setCaseAccountNumber(dispatch, data.accountNumberRef
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
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);
|
|
836
716
|
const notifiedListUsers = map(data.notifiedUsers, (o) => ({
|
|
837
717
|
ssoUsername: o.ssoUsername,
|
|
838
718
|
fullNameCustom: o.title,
|
|
@@ -841,22 +721,15 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
841
721
|
type: CaseReducerConstants.setLoadedNotificationContacts,
|
|
842
722
|
payload: { notifiedUsers: notifiedListUsers },
|
|
843
723
|
});
|
|
844
|
-
if (data.groupNumber) {
|
|
724
|
+
if (data.groupNumber && data.groupNumber !== '-1') {
|
|
845
725
|
setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
|
|
846
726
|
}
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
// notifiedListUsers,
|
|
854
|
-
// loggedInUserRights,
|
|
855
|
-
// data.accountNumberRef,
|
|
856
|
-
// data.contactSSOName,
|
|
857
|
-
// data.contactName
|
|
858
|
-
// );
|
|
859
|
-
// }
|
|
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
|
+
}
|
|
860
733
|
}
|
|
861
734
|
catch (error) {
|
|
862
735
|
dispatch({ type: CaseReducerConstants.receivedCaseDetailsError, payload: { caseDetailsError: error } });
|
|
@@ -880,61 +753,9 @@ export const updateCaseDetails = (dispatch, caseNumber, caseDetails, dontSetDeta
|
|
|
880
753
|
}
|
|
881
754
|
catch (error) {
|
|
882
755
|
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
883
|
-
|
|
756
|
+
return Promise.reject(error);
|
|
884
757
|
}
|
|
885
758
|
});
|
|
886
|
-
export const updateCaseDetailsGraphQL = (dispatch, apolloClient, caseNumber, caseUpdate, dontSetDetails, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
887
|
-
var _a, _b;
|
|
888
|
-
try {
|
|
889
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailUpdating });
|
|
890
|
-
const salesforceCaseId = (_a = options === null || options === void 0 ? void 0 : options.salesforceCaseId) !== null && _a !== void 0 ? _a : (_b = options === null || options === void 0 ? void 0 : options.existingCaseDetails) === null || _b === void 0 ? void 0 : _b.id;
|
|
891
|
-
const graphqlDetails = yield updateCaseDetailsGraphQLRequest(apolloClient, caseNumber, caseUpdate, {
|
|
892
|
-
salesforceCaseId,
|
|
893
|
-
existingCaseDetails: (options === null || options === void 0 ? void 0 : options.existingCaseDetails)
|
|
894
|
-
? {
|
|
895
|
-
product: options.existingCaseDetails.product,
|
|
896
|
-
version: options.existingCaseDetails.version,
|
|
897
|
-
noClusterIdReason: options.existingCaseDetails.noClusterIdReason,
|
|
898
|
-
noClusterIdReasonExplanation: options.existingCaseDetails.noClusterIdReasonExplanation,
|
|
899
|
-
additionalCaseInformation: options.existingCaseDetails.additionalCaseInformation,
|
|
900
|
-
}
|
|
901
|
-
: undefined,
|
|
902
|
-
});
|
|
903
|
-
if (dontSetDetails) {
|
|
904
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailCompleted });
|
|
905
|
-
return;
|
|
906
|
-
}
|
|
907
|
-
// productId/entitlementId/entitlementSla are not sent in GraphQL case updates from case edit
|
|
908
|
-
const { productId: _productId, entitlementId: _entitlementId, entitlementSla: _entitlementSla } = caseUpdate, caseUpdateWithoutIds = __rest(caseUpdate, ["productId", "entitlementId", "entitlementSla"]);
|
|
909
|
-
let updatedCaseDetails = Object.assign({}, caseUpdateWithoutIds);
|
|
910
|
-
if (graphqlDetails) {
|
|
911
|
-
const mappedGraphQLDetails = mapGraphQLCaseDetailsToCasePayload(graphqlDetails);
|
|
912
|
-
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), Object.fromEntries(Object.entries(mappedGraphQLDetails).filter(([, value]) => value !== null && value !== undefined && value !== '')));
|
|
913
|
-
}
|
|
914
|
-
else {
|
|
915
|
-
const refreshedDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber, options === null || options === void 0 ? void 0 : options.includeSecureSupport);
|
|
916
|
-
if (refreshedDetails) {
|
|
917
|
-
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), mapGraphQLCaseDetailsToCasePayload(refreshedDetails));
|
|
918
|
-
}
|
|
919
|
-
}
|
|
920
|
-
dispatch({
|
|
921
|
-
type: CaseReducerConstants.caseDetailChanged,
|
|
922
|
-
payload: { caseDetails: updatedCaseDetails, isCaseUpdating: false },
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
catch (error) {
|
|
926
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
927
|
-
throw error;
|
|
928
|
-
}
|
|
929
|
-
});
|
|
930
|
-
/** GraphQL CaseUpdate for severity/status and FTS (X24x7__c / X24x7ContactInformation__c). */
|
|
931
|
-
export const updateCaseSeverityAndFtsGraphQL = (dispatch, apolloClient, caseNumber, payload, currentSeverity, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
932
|
-
const graphqlUpdate = buildCaseSeverityFtsGraphQLUpdate(payload, currentSeverity);
|
|
933
|
-
if (Object.keys(graphqlUpdate).length === 0) {
|
|
934
|
-
return;
|
|
935
|
-
}
|
|
936
|
-
yield updateCaseDetailsGraphQL(dispatch, apolloClient, caseNumber, graphqlUpdate, false, options);
|
|
937
|
-
});
|
|
938
759
|
export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerSSO) => __awaiter(void 0, void 0, void 0, function* () {
|
|
939
760
|
const usersArr = (users || []).map((o) => o.ssoUsername).filter((s) => !!s);
|
|
940
761
|
caseOwnerSSO && usersArr.push(caseOwnerSSO);
|
|
@@ -972,7 +793,7 @@ export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerS
|
|
|
972
793
|
});
|
|
973
794
|
}
|
|
974
795
|
});
|
|
975
|
-
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* () {
|
|
976
797
|
try {
|
|
977
798
|
const selectedNotificationContacts = [];
|
|
978
799
|
if (loggedInUserRights.isExternalNonOrgAdmin()) {
|
|
@@ -1011,14 +832,24 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
1011
832
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
1012
833
|
payload: { isFetchingSelectedNotificationContacts: true, hasErrorSelectedNotificationContacts: false },
|
|
1013
834
|
});
|
|
1014
|
-
const
|
|
1015
|
-
|
|
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);
|
|
1016
848
|
let contactsToReturn = [];
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
}
|
|
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);
|
|
1022
853
|
}
|
|
1023
854
|
dispatch({
|
|
1024
855
|
type: CaseReducerConstants.getSelectedAccountDetailsHydra,
|
|
@@ -1036,23 +867,20 @@ export const getNotificationContacts4ExternalUser = (dispatch, users, loggedInUs
|
|
|
1036
867
|
});
|
|
1037
868
|
}
|
|
1038
869
|
});
|
|
1039
|
-
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus
|
|
1040
|
-
if (
|
|
1041
|
-
return;
|
|
1042
|
-
const { apolloClient, caseNumber, existingCaseDetails } = options !== null && options !== void 0 ? options : {};
|
|
1043
|
-
if (!apolloClient || !caseNumber)
|
|
870
|
+
export const checkForCaseStatusToggleOnAttachOrComment = (dispatch, isInternal, currentStatus) => {
|
|
871
|
+
if (isInternal)
|
|
1044
872
|
return;
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
}
|
|
1048
|
-
}
|
|
873
|
+
if (currentStatus === 'Closed' || currentStatus === 'Waiting on Customer') {
|
|
874
|
+
setCaseDetails(dispatch, { status: 'Waiting on Red Hat' });
|
|
875
|
+
}
|
|
876
|
+
};
|
|
1049
877
|
// to fetch all users for the selected case group after fetching case details so that we can
|
|
1050
878
|
// check which users have access to the selected case group and filter the owner dropdown list accordingly
|
|
1051
879
|
export const setSelectedCaseGroupUsers = (dispatch, accountNumber, groupNumber, loggedInUserRights) => __awaiter(void 0, void 0, void 0, function* () {
|
|
1052
880
|
const canUserChangeOwner = loggedInUserRights.isOrgAdmin() ||
|
|
1053
881
|
(loggedInUserRights.isExternalNonOrgAdmin() &&
|
|
1054
882
|
loggedInUserRights.isAccountDifferentFromLoggedInAccount(accountNumber));
|
|
1055
|
-
if (
|
|
883
|
+
if (groupNumber === '-1' || !canUserChangeOwner) {
|
|
1056
884
|
dispatch({
|
|
1057
885
|
type: CaseReducerConstants.caseStateChanged,
|
|
1058
886
|
payload: { selectedCaseGroupUsers: getApiResourceObject([]) },
|
|
@@ -1107,26 +935,14 @@ export function updateEmailListState(dispatch, email, customEmailsList, callback
|
|
|
1107
935
|
payload: { customEmailsList: Object.assign(Object.assign({}, customEmailsList), { data: newEmail }) },
|
|
1108
936
|
});
|
|
1109
937
|
}
|
|
1110
|
-
export function getVersionsDetails(dispatch,
|
|
938
|
+
export function getVersionsDetails(dispatch, product) {
|
|
1111
939
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1112
|
-
var _a, _b, _c, _d;
|
|
1113
940
|
try {
|
|
1114
941
|
dispatch({
|
|
1115
942
|
type: CaseReducerConstants.getVersionDetails,
|
|
1116
943
|
payload: { versionsDetails: getApiResourceObject([], true) },
|
|
1117
944
|
});
|
|
1118
|
-
const
|
|
1119
|
-
query: GET_PRODUCTS,
|
|
1120
|
-
variables: {
|
|
1121
|
-
where: {
|
|
1122
|
-
ParentProduct__c: { eq: parentProductId },
|
|
1123
|
-
IsActive: { eq: true },
|
|
1124
|
-
},
|
|
1125
|
-
first: 200,
|
|
1126
|
-
},
|
|
1127
|
-
});
|
|
1128
|
-
const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportProduct2) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
|
|
1129
|
-
const versionsDetails = handleGraphQLVersionsResponse(edges, parentProductName);
|
|
945
|
+
const versionsDetails = yield pcm.products.getDetailedVersions(product);
|
|
1130
946
|
dispatch({
|
|
1131
947
|
type: CaseReducerConstants.getVersionDetails,
|
|
1132
948
|
payload: { versionsDetails: getApiResourceObject(versionsDetails) },
|