@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,10 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { escalations, publicApi } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Button, ButtonVariant, Flex, FlexItem } from '@patternfly/react-core';
|
|
12
|
-
import { LoadingIndicator, PFTable, TableComponent, ToastNotification } from '@rh-support/components';
|
|
13
|
-
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
12
|
+
import { LoadingIndicator, PFTable, TableComponent, ToastNotification, useFetch, } from '@rh-support/components';
|
|
14
13
|
import { ability, resourceActions, resources } from '@rh-support/user-permissions';
|
|
15
14
|
import { formatDate, sendToSentry } from '@rh-support/utils';
|
|
16
15
|
import find from 'lodash/find';
|
|
@@ -19,10 +18,11 @@ import isEqual from 'lodash/isEqual';
|
|
|
19
18
|
import React, { useEffect, useRef, useState } from 'react';
|
|
20
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
21
20
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
22
|
-
import { useCaseDetailsPageDispatchContext } from '../../../../context/CaseDetailsPageContext';
|
|
23
|
-
import {
|
|
21
|
+
import { useCaseDetailsPageDispatchContext, useCaseDetailsPageStateContext, } from '../../../../context/CaseDetailsPageContext';
|
|
22
|
+
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../../context/CaseDiscussionTabContext';
|
|
24
23
|
import { escalationStatus } from '../../../../models/escalation';
|
|
25
24
|
import { fetchCaseEscalations } from '../../../../reducers/CaseDetailsPageReducer';
|
|
25
|
+
import { updateDiscussionStateComments } from '../../../../reducers/CaseDiscussionTabReducer';
|
|
26
26
|
import { checkForCaseStatusToggleOnAttachOrComment } from '../../../../reducers/CaseReducer';
|
|
27
27
|
const ESCALATION_MSG = 'Request Management Escalation:';
|
|
28
28
|
const UPDATE_ESCALATION_MSG = 'Escalation update requested. You will receive an update from a manager shortly.';
|
|
@@ -30,20 +30,20 @@ const REOPEN_ESCALATION_MSG = 'Escalation reopened. A manager will review your r
|
|
|
30
30
|
const CLOSURE_ESCALATION_MSG = 'Escalation closed.';
|
|
31
31
|
export default function RMEEscalationList(props) {
|
|
32
32
|
const { t } = useTranslation();
|
|
33
|
-
const
|
|
34
|
-
const {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const {
|
|
41
|
-
const
|
|
42
|
-
const
|
|
33
|
+
const { request: updateEscalationRequest, isFetching: isUpdatingEscalation } = useFetch(escalations.updateEscalations, { propgateErrors: true });
|
|
34
|
+
const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
35
|
+
propgateErrors: true,
|
|
36
|
+
});
|
|
37
|
+
const { request: updateCaseRequest, isFetching: isUpdatingCase } = useFetch(publicApi.kase.updateCase, {
|
|
38
|
+
propgateErrors: true,
|
|
39
|
+
});
|
|
40
|
+
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
41
|
+
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
42
|
+
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
43
43
|
const caseDetailsPageDispatch = useCaseDetailsPageDispatchContext();
|
|
44
44
|
const escalationUpdateInProgessIds = useRef([]);
|
|
45
45
|
const caseDispatch = useCaseDispatch();
|
|
46
|
-
const isUpdating = isPostingComment;
|
|
46
|
+
const isUpdating = isUpdatingEscalation || isPostingComment || isUpdatingCase;
|
|
47
47
|
const [escalationList, setEscalationList] = useState([]);
|
|
48
48
|
const cannUpdateRME = ability.can(resourceActions.UPDATE, resources.RME_ESCALATION);
|
|
49
49
|
const { customerEscalation } = useCaseSelector((state) => ({
|
|
@@ -54,48 +54,62 @@ export default function RMEEscalationList(props) {
|
|
|
54
54
|
// called everytime we are updating the escalation
|
|
55
55
|
setEscalationList([...props.escalations]);
|
|
56
56
|
}, [isUpdating, props.escalations]);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
// ...
|
|
60
|
-
// };
|
|
61
|
-
const submitEscalationComment = (escalationName, comment, message) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
-
var _a;
|
|
57
|
+
const updateEscalation = (escalationName, text, options) => __awaiter(this, void 0, void 0, function* () {
|
|
58
|
+
const updateRequest = Object.assign({ escalationName, isPrivate: false, text, isRequestForUpdate: false, isRequestForReOpen: false, isRequestForClosure: false, status: escalationStatus.requestUpdate }, options);
|
|
63
59
|
escalationUpdateInProgessIds.current.push(escalationName);
|
|
60
|
+
return yield updateEscalationRequest(escalationName, updateRequest);
|
|
61
|
+
});
|
|
62
|
+
const submitEscalationComment = (escalationNum, comment, message) => __awaiter(this, void 0, void 0, function* () {
|
|
64
63
|
try {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
body: comment,
|
|
69
|
-
isPublic: true,
|
|
70
|
-
});
|
|
71
|
-
apolloClient.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
72
|
-
// TODO: migrate updateCaseRequest(props.caseNumber, { customerEscalation: true }) to GraphQL
|
|
73
|
-
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.isInternal, props.caseStatus, {
|
|
74
|
-
apolloClient,
|
|
64
|
+
escalationNum &&
|
|
65
|
+
fetchCaseEscalations(caseDetailsPageDispatch, props.caseNumber, props.accountNumber, false);
|
|
66
|
+
yield postCommentRequest({
|
|
75
67
|
caseNumber: props.caseNumber,
|
|
76
|
-
|
|
68
|
+
commentBody: comment,
|
|
69
|
+
contentType: 'plaintext',
|
|
77
70
|
});
|
|
78
|
-
|
|
71
|
+
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
72
|
+
yield updateCaseRequest(props.caseNumber, { customerEscalation: true });
|
|
73
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.isInternal, props.caseStatus);
|
|
74
|
+
escalationNum && ToastNotification.addSuccessMessage(message);
|
|
79
75
|
}
|
|
80
76
|
catch (e) {
|
|
81
77
|
ToastNotification.addDangerMessage(e);
|
|
82
78
|
sendToSentry(e, {}, 'RME form submit error');
|
|
83
79
|
}
|
|
84
80
|
finally {
|
|
85
|
-
escalationUpdateInProgessIds.current = escalationUpdateInProgessIds.current.filter((item) => item !==
|
|
81
|
+
escalationUpdateInProgessIds.current = escalationUpdateInProgessIds.current.filter((item) => item !== escalationNum);
|
|
86
82
|
}
|
|
87
83
|
});
|
|
88
84
|
const requestUpdateRMEEscalation = (escalationName) => __awaiter(this, void 0, void 0, function* () {
|
|
89
85
|
const comment = `${ESCALATION_MSG}\n ${UPDATE_ESCALATION_MSG}`;
|
|
90
|
-
|
|
86
|
+
try {
|
|
87
|
+
const updatedInfo = yield updateEscalation(escalationName, comment, { isRequestForUpdate: true });
|
|
88
|
+
updatedInfo && submitEscalationComment(updatedInfo.escalationName, comment, UPDATE_ESCALATION_MSG);
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
ToastNotification.addDangerMessage(e);
|
|
92
|
+
}
|
|
91
93
|
});
|
|
92
94
|
const requestClosureRMEEscalation = (escalationName) => __awaiter(this, void 0, void 0, function* () {
|
|
93
95
|
const comment = `${ESCALATION_MSG}\n ${CLOSURE_ESCALATION_MSG}`;
|
|
94
|
-
|
|
96
|
+
try {
|
|
97
|
+
const updatedInfo = yield updateEscalation(escalationName, comment, { isRequestForClosure: true });
|
|
98
|
+
updatedInfo && submitEscalationComment(updatedInfo.escalationName, comment, CLOSURE_ESCALATION_MSG);
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
ToastNotification.addDangerMessage(e);
|
|
102
|
+
}
|
|
95
103
|
});
|
|
96
104
|
const requestReOpenRMEEscalation = (escalationName) => __awaiter(this, void 0, void 0, function* () {
|
|
97
105
|
const comment = `${ESCALATION_MSG}\n ${REOPEN_ESCALATION_MSG}`;
|
|
98
|
-
|
|
106
|
+
try {
|
|
107
|
+
const updatedInfo = yield updateEscalation(escalationName, comment, { isRequestForReOpen: true });
|
|
108
|
+
updatedInfo && submitEscalationComment(updatedInfo.escalationName, comment, REOPEN_ESCALATION_MSG);
|
|
109
|
+
}
|
|
110
|
+
catch (e) {
|
|
111
|
+
ToastNotification.addDangerMessage(e);
|
|
112
|
+
}
|
|
99
113
|
});
|
|
100
114
|
const renderActionButtons = (escalation) => {
|
|
101
115
|
if (isUpdating && escalationUpdateInProgessIds.current.includes(escalation.name)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAiB5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAiB5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,qBAqW/B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -7,11 +7,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { useApolloClient } from '@apollo/client/react';
|
|
11
10
|
import { Button, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, } from '@patternfly/react-core';
|
|
12
11
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
13
12
|
import { ToastNotification, useSelectKeyboardNavigator, ValueChangedIcon } from '@rh-support/components';
|
|
14
13
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
14
|
+
import { toOption } from '@rh-support/utils';
|
|
15
15
|
import find from 'lodash/find';
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
17
17
|
import isEqual from 'lodash/isEqual';
|
|
@@ -20,7 +20,7 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
20
20
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
21
21
|
import { RouteContext } from '../../context/RouteContext';
|
|
22
22
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
23
|
-
import {
|
|
23
|
+
import { fetchCaseGroupsForAccount, fetchCaseGroupsForSSO, setCaseDetails, setSelectedCaseGroupUsers, updateCaseDetails, } from '../../reducers/CaseReducer';
|
|
24
24
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
25
25
|
import { CaseValuesToWatch } from '../shared/Constants';
|
|
26
26
|
import { getChangedValueTooltip } from '../shared/utils';
|
|
@@ -35,37 +35,20 @@ const emptyCaseGroup = {
|
|
|
35
35
|
function CaseGroup(props) {
|
|
36
36
|
const { t } = useTranslation();
|
|
37
37
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
38
|
-
const { groupNumber, caseNumber,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
49
|
-
contactSSOName: state.caseDetails.contactSSOName,
|
|
50
|
-
selectedOwnerContactId: (_b = (_a = state.selectedOwner) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.id,
|
|
51
|
-
selectedOwnerIsOrgAdmin: (_e = (_d = (_c = state.selectedOwner) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.isOrgAdmin) !== null && _e !== void 0 ? _e : false,
|
|
52
|
-
pendingCaseOwnerUpdate: state.pendingCaseOwnerUpdate,
|
|
53
|
-
existingCaseDetails: state.caseDetails,
|
|
54
|
-
});
|
|
55
|
-
}, isEqual);
|
|
38
|
+
const { groupNumber, caseNumber, accountNumber, selectedAccountDetails, ownersCaseGroups, groupName, isCaseOwnerUpdating, contactSSOName, } = useCaseSelector((state) => ({
|
|
39
|
+
caseNumber: state.caseDetails.caseNumber,
|
|
40
|
+
groupNumber: state.caseDetails.groupNumber,
|
|
41
|
+
accountNumber: state.caseDetails.accountNumberRef,
|
|
42
|
+
ownersCaseGroups: state.ownersCaseGroups,
|
|
43
|
+
selectedAccountDetails: state.selectedAccountDetails,
|
|
44
|
+
groupName: state.caseDetails.groupName,
|
|
45
|
+
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
46
|
+
contactSSOName: state.caseDetails.contactSSOName,
|
|
47
|
+
}), isEqual);
|
|
56
48
|
const caseDispatch = useCaseDispatch();
|
|
57
|
-
const apolloClient = useApolloClient();
|
|
58
49
|
const { isExportingPDF } = useContext(PDFContext);
|
|
59
50
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
60
51
|
const isGroupMandatory = selectedAccountDetails.data.requireCGroupOnCreate;
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (!caseNumber)
|
|
63
|
-
return;
|
|
64
|
-
if (isEmpty(selectedOwnerContactId) || isEmpty(accountNumber))
|
|
65
|
-
return;
|
|
66
|
-
fetchCaseGroupsForContactGraphQL(caseDispatch, apolloClient, selectedOwnerContactId, accountNumber, null, selectedOwnerIsOrgAdmin, groupNumber !== null && groupNumber !== void 0 ? groupNumber : '');
|
|
67
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
-
}, [selectedOwnerContactId, accountNumber, selectedOwnerIsOrgAdmin]);
|
|
69
52
|
const [selectedCaseGroup, setSelectedCaseGroup] = useState(isGroupMandatory ? undefined : emptyCaseGroup);
|
|
70
53
|
const [isCaseGroupInvalid, setCaseGroupInvalid] = useState(false);
|
|
71
54
|
const [isSelectedUngroupedInvalid, setIsSelectedUngroupedInvalid] = useState(false);
|
|
@@ -87,23 +70,14 @@ function CaseGroup(props) {
|
|
|
87
70
|
return isInValidGroup;
|
|
88
71
|
};
|
|
89
72
|
const onCaseGroupUpdate = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
-
var _a;
|
|
91
73
|
if (canEditCase.alert())
|
|
92
74
|
return;
|
|
93
75
|
setCaseGroupUpdating(true);
|
|
94
76
|
try {
|
|
95
|
-
|
|
96
|
-
const updatePayload = pendingOwnerUpdate
|
|
97
|
-
? Object.assign({ contactId: pendingOwnerUpdate.contactId, contactSSOName: pendingOwnerUpdate.contactSSOName, groupNumber: caseDetails.groupNumber }, ((_a = pendingOwnerUpdate.phoneCaseUpdate) !== null && _a !== void 0 ? _a : {})) : { groupNumber: caseDetails.groupNumber };
|
|
98
|
-
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, updatePayload, false, pendingOwnerUpdate
|
|
99
|
-
? { existingCaseDetails }
|
|
100
|
-
: { salesforceCaseId: caseId });
|
|
101
|
-
if (pendingOwnerUpdate) {
|
|
102
|
-
setCaseState(caseDispatch, { pendingCaseOwnerUpdate: null });
|
|
103
|
-
setSelectedCaseGroupUsers(caseDispatch, accountNumber, caseDetails.groupNumber, loggedInUserRights.data);
|
|
104
|
-
}
|
|
105
|
-
ToastNotification.addSuccessMessage(t(`Group has been successfully updated`));
|
|
77
|
+
yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
|
|
106
78
|
setCaseGroupUpdating(false);
|
|
79
|
+
setSelectedCaseGroupUsers(caseDispatch, accountNumber, caseDetails.groupNumber, loggedInUserRights.data);
|
|
80
|
+
ToastNotification.addSuccessMessage(t(`Group has been successfully updated`));
|
|
107
81
|
}
|
|
108
82
|
catch (e) {
|
|
109
83
|
setCaseGroupUpdating(false);
|
|
@@ -111,7 +85,7 @@ function CaseGroup(props) {
|
|
|
111
85
|
}
|
|
112
86
|
});
|
|
113
87
|
const onCaseGroupChange = (selection) => __awaiter(this, void 0, void 0, function* () {
|
|
114
|
-
if (!isInvalidateCaseGroup(selection) &&
|
|
88
|
+
if (!isInvalidateCaseGroup(selection) && selection.groupNum !== groupNumber) {
|
|
115
89
|
const caseDetails = {
|
|
116
90
|
groupNumber: selection.groupNum,
|
|
117
91
|
groupName: selection.name || '',
|
|
@@ -119,7 +93,7 @@ function CaseGroup(props) {
|
|
|
119
93
|
setIsOpen(false);
|
|
120
94
|
if (!isEmpty(caseNumber)) {
|
|
121
95
|
yield onCaseGroupUpdate(caseDetails);
|
|
122
|
-
setIsSelectedUngroupedInvalid(isGroupMandatory && !selection.groupNum);
|
|
96
|
+
setIsSelectedUngroupedInvalid(isGroupMandatory && (!selection.groupNum || selection.groupNum === '-1'));
|
|
123
97
|
}
|
|
124
98
|
else {
|
|
125
99
|
setCaseDetails(caseDispatch, caseDetails);
|
|
@@ -146,7 +120,10 @@ function CaseGroup(props) {
|
|
|
146
120
|
? list.filter((v) => v.name.toLowerCase().includes(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase()))
|
|
147
121
|
: list;
|
|
148
122
|
if (isGroupMandatory) {
|
|
149
|
-
|
|
123
|
+
// having group selected for case is mandatory, make 'UnGrouped Case' option disabled
|
|
124
|
+
const listItems = options.map((item) => (Object.assign(Object.assign({}, item), { disabled: item.groupNum === '-1' })));
|
|
125
|
+
// As group is mandatory, 'UnGrouped Case' cannot be selected we filter it out
|
|
126
|
+
return listItems.filter((g) => g.groupNum !== '-1');
|
|
150
127
|
}
|
|
151
128
|
else
|
|
152
129
|
return options;
|
|
@@ -157,11 +134,11 @@ function CaseGroup(props) {
|
|
|
157
134
|
useEffect(() => {
|
|
158
135
|
var _a, _b;
|
|
159
136
|
// case group may change outside of PCM. On group load check if we have a valid group
|
|
160
|
-
setIsSelectedUngroupedInvalid(isGroupMandatory && !groupNumber);
|
|
137
|
+
setIsSelectedUngroupedInvalid(isGroupMandatory && (!groupNumber || groupNumber === '-1'));
|
|
161
138
|
if (groupNumber === undefined)
|
|
162
139
|
return;
|
|
163
140
|
if (((_b = (_a = ownersCaseGroups === null || ownersCaseGroups === void 0 ? void 0 : ownersCaseGroups.data) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) === 0) {
|
|
164
|
-
if (groupNumber && groupName && caseNumber) {
|
|
141
|
+
if (groupNumber !== '-1' && groupName && caseNumber) {
|
|
165
142
|
setSelectedCaseGroup({
|
|
166
143
|
name: groupName,
|
|
167
144
|
groupNum: groupNumber,
|
|
@@ -173,16 +150,11 @@ function CaseGroup(props) {
|
|
|
173
150
|
setInputValue(groupName);
|
|
174
151
|
setSelected(groupName);
|
|
175
152
|
}
|
|
176
|
-
else if (!groupNumber) {
|
|
177
|
-
setSelectedCaseGroup(isGroupMandatory ? undefined : emptyCaseGroup);
|
|
178
|
-
setInputValue('');
|
|
179
|
-
setSelected('');
|
|
180
|
-
}
|
|
181
153
|
return;
|
|
182
154
|
}
|
|
183
155
|
const selectedGroup = find(ownersCaseGroups.data, (g) => g.groupNum === groupNumber);
|
|
184
156
|
if (selectedGroup && selectedGroup.groupNum) {
|
|
185
|
-
if (isGroupMandatory &&
|
|
157
|
+
if (isGroupMandatory && selectedGroup.groupNum === '-1') {
|
|
186
158
|
setCaseGroupInvalid(true);
|
|
187
159
|
}
|
|
188
160
|
else {
|
|
@@ -191,77 +163,40 @@ function CaseGroup(props) {
|
|
|
191
163
|
setInputValue(selectedGroup.name);
|
|
192
164
|
setSelected(selectedGroup.name);
|
|
193
165
|
}
|
|
194
|
-
else if (groupNumber && groupName) {
|
|
195
|
-
setSelectedCaseGroup({
|
|
196
|
-
name: groupName,
|
|
197
|
-
groupNum: groupNumber,
|
|
198
|
-
defaultMembers: [],
|
|
199
|
-
isDefault: false,
|
|
200
|
-
isPrivate: false,
|
|
201
|
-
members: [],
|
|
202
|
-
});
|
|
203
|
-
setInputValue(groupName);
|
|
204
|
-
setSelected(groupName);
|
|
205
|
-
}
|
|
206
|
-
else if (!groupNumber) {
|
|
207
|
-
setSelectedCaseGroup(isGroupMandatory ? undefined : emptyCaseGroup);
|
|
208
|
-
setInputValue('');
|
|
209
|
-
setSelected('');
|
|
210
|
-
setCaseGroupInvalid(!!isGroupMandatory);
|
|
211
|
-
}
|
|
212
166
|
else {
|
|
213
167
|
setCaseGroupInvalid(true);
|
|
214
168
|
}
|
|
215
169
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
216
|
-
}, [ownersCaseGroups, caseNumber, isGroupMandatory
|
|
217
|
-
|
|
218
|
-
|
|
170
|
+
}, [ownersCaseGroups, caseNumber, isGroupMandatory]);
|
|
171
|
+
useEffect(() => {
|
|
172
|
+
// On case edit, groups are loaded via fetchCaseDetails/setCaseOwner and OwnerSelector.
|
|
173
|
+
if (caseNumber)
|
|
219
174
|
return;
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
};
|
|
224
|
-
if (caseNumber) {
|
|
225
|
-
setCaseGroupUpdating(true);
|
|
226
|
-
try {
|
|
227
|
-
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, { groupNumber: '' }, false, {
|
|
228
|
-
salesforceCaseId: caseId,
|
|
229
|
-
});
|
|
230
|
-
setCaseDetails(caseDispatch, caseDetails);
|
|
231
|
-
setCaseGroupUpdating(false);
|
|
232
|
-
ToastNotification.addSuccessMessage(t(`Group has been successfully updated`));
|
|
233
|
-
}
|
|
234
|
-
catch (e) {
|
|
235
|
-
setCaseGroupUpdating(false);
|
|
236
|
-
caseUpdateError.showError(e, t(`Group failed to update`));
|
|
237
|
-
return;
|
|
175
|
+
if (loggedInUserRights.data.isInternal()) {
|
|
176
|
+
if (accountNumber) {
|
|
177
|
+
fetchCaseGroupsForAccount(caseDispatch, accountNumber);
|
|
238
178
|
}
|
|
239
179
|
}
|
|
240
|
-
else {
|
|
241
|
-
|
|
242
|
-
|
|
180
|
+
else if (contactSSOName) {
|
|
181
|
+
fetchCaseGroupsForSSO(caseDispatch, contactSSOName);
|
|
182
|
+
}
|
|
183
|
+
}, [accountNumber, caseDispatch, caseNumber, contactSSOName, loggedInUserRights.data]);
|
|
184
|
+
const onCaseGroupClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
var _a;
|
|
186
|
+
try {
|
|
187
|
+
yield onCaseGroupChange(toOption(emptyCaseGroup));
|
|
188
|
+
setSelectedCaseGroup(emptyCaseGroup);
|
|
189
|
+
setInputValue('');
|
|
190
|
+
setSelected('');
|
|
191
|
+
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
192
|
+
setIsOpen(false);
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
console.log(error);
|
|
243
196
|
}
|
|
244
|
-
setSelectedCaseGroup(emptyCaseGroup);
|
|
245
|
-
setCaseGroupInvalid(!!isGroupMandatory);
|
|
246
|
-
setInputValue('');
|
|
247
|
-
setSelected('');
|
|
248
|
-
setIsOpen(false);
|
|
249
197
|
});
|
|
250
|
-
const
|
|
251
|
-
|
|
252
|
-
: t('Users are not allowed to create case if on account level caseGroupRequired is set to true');
|
|
253
|
-
const showMandatoryGroupValidationError = isGroupMandatory &&
|
|
254
|
-
!isExportingPDF &&
|
|
255
|
-
(isCaseGroupInvalid || isSelectedUngroupedInvalid || !!pendingCaseOwnerUpdate) &&
|
|
256
|
-
isEmpty(groupNumber) &&
|
|
257
|
-
(!!caseNumber || isNextBtnClickedToShowValidationError || isEmpty(groupNumber));
|
|
258
|
-
const showHelperText = !showMandatoryGroupValidationError;
|
|
259
|
-
useEffect(() => {
|
|
260
|
-
setCaseState(caseDispatch, { showMandatoryCaseGroupValidationError: !!showMandatoryGroupValidationError });
|
|
261
|
-
return () => {
|
|
262
|
-
setCaseState(caseDispatch, { showMandatoryCaseGroupValidationError: false });
|
|
263
|
-
};
|
|
264
|
-
}, [caseDispatch, showMandatoryGroupValidationError]);
|
|
198
|
+
const showHelperText = !isSelectedUngroupedInvalid || (!isCaseGroupInvalid && !isGroupMandatory);
|
|
199
|
+
const showEmptyValidationError = !caseNumber && isNextBtnClickedToShowValidationError && isCaseGroupInvalid;
|
|
265
200
|
const canNotChangeGroup = () => !loggedInUserRights.data.isInternal() &&
|
|
266
201
|
!loggedInUser.data.isOrgAdmin &&
|
|
267
202
|
loggedInUser.data.ssoUsername !== contactSSOName &&
|
|
@@ -290,15 +225,11 @@ function CaseGroup(props) {
|
|
|
290
225
|
ownersCaseGroups.isFetching ||
|
|
291
226
|
isCaseGroupUpdating ||
|
|
292
227
|
isCaseOwnerUpdating ||
|
|
293
|
-
canNotChangeGroup() ||
|
|
294
|
-
|
|
228
|
+
canNotChangeGroup(), status: ownersCaseGroups.isError || showEmptyValidationError || (caseNumber && isSelectedUngroupedInvalid)
|
|
229
|
+
? 'danger'
|
|
230
|
+
: undefined, isFullWidth: true },
|
|
295
231
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
296
|
-
React.createElement(TextInputGroupMain, { value: inputValue, onClick: onToggleClick, onChange: onInputQueryChange, onKeyDown: onInputKeyDown,
|
|
297
|
-
if (selected) {
|
|
298
|
-
setInputValue(selected);
|
|
299
|
-
setShouldFilter(false);
|
|
300
|
-
}
|
|
301
|
-
}, autoComplete: "off", innerRef: textInputRef, placeholder: t(`Select a group`), role: "combobox", isExpanded: isOpen, "aria-controls": "select-typeahead-listbox" }),
|
|
232
|
+
React.createElement(TextInputGroupMain, { value: inputValue, onClick: onToggleClick, onChange: onInputQueryChange, onKeyDown: onInputKeyDown, autoComplete: "off", innerRef: textInputRef, placeholder: t(`Select a group`), role: "combobox", isExpanded: isOpen, "aria-controls": "select-typeahead-listbox" }),
|
|
302
233
|
!isCaseOwnerUpdating && (ownersCaseGroups.isFetching || isCaseGroupUpdating) ? (React.createElement(TextInputGroupUtilities, null,
|
|
303
234
|
React.createElement(Spinner, { size: "md" }))) : (React.createElement(TextInputGroupUtilities, Object.assign({}, (!inputValue ? { style: { display: 'none' } } : {})),
|
|
304
235
|
React.createElement(Button, { icon: React.createElement(TimesIcon, { "aria-hidden": true }), variant: "plain", onClick: onCaseGroupClear, "aria-label": "Clear input value" }))))));
|
|
@@ -309,7 +240,10 @@ function CaseGroup(props) {
|
|
|
309
240
|
isGroupMandatory && !isExportingPDF && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
310
241
|
React.createElement(Select, { id: "get-support-group", "data-tracking-id": "get-support-group", isOpen: isOpen, selected: selected, onSelect: (event, val) => onCaseGroupChange(val), onOpenChange: () => setIsOpen(false), toggle: toggle, shouldFocusFirstItemOnOpen: false, onBlur: () => onOuterClickGroupCheck, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
|
|
311
242
|
React.createElement(SelectList, null, computeDropdownList().map((option, index) => (React.createElement(SelectOption, { key: option.name, isFocused: focusedItemIndex === index, value: option, isSelected: option.name === selected }, option.name))))),
|
|
312
|
-
|
|
243
|
+
caseNumber && isSelectedUngroupedInvalid && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
244
|
+
React.createElement(Trans, null, "'Ungrouped Case' cannot be selected. Please select a group."))),
|
|
245
|
+
showEmptyValidationError && isGroupMandatory && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
246
|
+
React.createElement(Trans, null, "Case group cannot be empty."))),
|
|
313
247
|
showHelperText && (React.createElement("p", { className: "form-instructions" },
|
|
314
248
|
React.createElement(Trans, null, "Organization administrators have the permission to manage groups.")))));
|
|
315
249
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkHpD"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { useApolloClient } from '@apollo/client/react';
|
|
2
1
|
import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
|
|
3
2
|
import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
4
3
|
import { haventLoadedMetadata } from '@rh-support/utils';
|
|
@@ -8,18 +7,18 @@ import React, { useContext, useEffect } from 'react';
|
|
|
8
7
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
8
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
10
9
|
import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
|
|
11
|
-
|
|
10
|
+
import { Hostname } from '../ImproveCase/Hostname';
|
|
12
11
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
13
12
|
import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
|
|
14
13
|
export default function CaseInformation(props) {
|
|
15
14
|
const { t } = useTranslation();
|
|
16
15
|
const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
|
|
17
16
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
18
|
-
const
|
|
19
|
-
const { contactSSOName, selectedAccountDetails, ownersCaseGroups } = useCaseSelector((state) => ({
|
|
17
|
+
const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
20
18
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
21
19
|
ownersCaseGroups: state.ownersCaseGroups,
|
|
22
20
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
21
|
+
hasInvalidEntitlements: state.hasInvalidEntitlements,
|
|
23
22
|
}), isEqual);
|
|
24
23
|
const isMetadataLoading = () => {
|
|
25
24
|
return !isMetadataLoadingError() && (loggedInUser.isFetching || selectedAccountDetails.isFetching);
|
|
@@ -39,13 +38,13 @@ export default function CaseInformation(props) {
|
|
|
39
38
|
}
|
|
40
39
|
const allPromisses = [];
|
|
41
40
|
if (haventLoadedMetadata(allCaseTypes)) {
|
|
42
|
-
allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer,
|
|
41
|
+
allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport));
|
|
43
42
|
}
|
|
44
43
|
if (haventLoadedMetadata(allCaseSeverities)) {
|
|
45
|
-
allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer,
|
|
44
|
+
allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport));
|
|
46
45
|
}
|
|
47
46
|
if (haventLoadedMetadata(caseLanguages)) {
|
|
48
|
-
allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer
|
|
47
|
+
allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer));
|
|
49
48
|
}
|
|
50
49
|
Promise.all(allPromisses);
|
|
51
50
|
}, [
|
|
@@ -57,7 +56,6 @@ export default function CaseInformation(props) {
|
|
|
57
56
|
loggedInUserJwtToken,
|
|
58
57
|
selectedAccountDetails,
|
|
59
58
|
loggedInUsersAccount.data.secureSupport,
|
|
60
|
-
apolloClient,
|
|
61
59
|
]);
|
|
62
60
|
return (React.createElement(React.Fragment, null,
|
|
63
61
|
React.createElement(LoadingIndicator, { show: isMetadataLoading(), size: "lg" }),
|
|
@@ -68,17 +66,18 @@ export default function CaseInformation(props) {
|
|
|
68
66
|
' ',
|
|
69
67
|
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
70
68
|
" for assistance.")),
|
|
71
|
-
React.createElement(AlertMessage, { show:
|
|
69
|
+
React.createElement(AlertMessage, { show: hasInvalidEntitlements, variant: AlertType.DANGER, className: "pf-v6-u-mt-lg", isInline: true },
|
|
72
70
|
React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
|
|
73
71
|
"You need a valid entitlement to create a case.\u00A0 Please contact",
|
|
74
72
|
' ',
|
|
75
73
|
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
76
74
|
" for assistance.")),
|
|
77
|
-
|
|
75
|
+
!hasInvalidEntitlements &&
|
|
78
76
|
!isMetadataLoading() &&
|
|
79
77
|
!isMetadataLoadingError() &&
|
|
80
78
|
loggedInUserRights.data.canManageCases() && (React.createElement(React.Fragment, null,
|
|
81
79
|
React.createElement("form", null,
|
|
80
|
+
React.createElement(Hostname, null),
|
|
82
81
|
React.createElement(OpenShiftClusterId, null),
|
|
83
82
|
React.createElement(ClusterRecommendations, { className: "push-bottom" }),
|
|
84
83
|
React.createElement(KtQuestions, null))))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,wBAAgB,kBAAkB,sBAsVjC"}
|