@rh-support/troubleshoot 2.6.341 → 2.6.349
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +29 -19
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +16 -91
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +2 -6
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +32 -61
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +33 -60
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -39
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +4 -15
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +55 -82
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +0 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +45 -76
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +109 -203
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +9 -5
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +17 -18
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +47 -51
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +44 -49
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +45 -51
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +10 -21
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +2 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +57 -132
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +4 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +58 -93
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +91 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +33 -78
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +153 -122
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +137 -74
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +7 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +263 -211
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +57 -123
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +30 -107
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +7 -10
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +16 -30
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +11 -17
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +8 -2
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +9 -11
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +22 -15
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
- package/lib/esm/components/EditDescription/EditDescription.js +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +18 -16
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +3 -4
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.js +2 -2
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +16 -20
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +62 -109
- package/lib/esm/components/shared/Constants.d.ts +0 -5
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +0 -5
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
- package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -21
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
- package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -116
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +57 -22
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +28 -16
- package/lib/esm/components/shared/utils.d.ts +0 -1
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +3 -9
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -170
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +0 -5
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/case.css +202 -60
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +11 -18
- package/lib/esm/hooks/useS3Upload.d.ts +4 -5
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +30 -28
- package/lib/esm/i18n/template-de.d.ts +2 -2
- package/lib/esm/i18n/template-de.js +2 -2
- package/lib/esm/i18n/template-es.d.ts +2 -2
- package/lib/esm/i18n/template-es.js +2 -2
- package/lib/esm/i18n/template-fr.d.ts +2 -2
- package/lib/esm/i18n/template-fr.js +2 -2
- package/lib/esm/i18n/template-it.d.ts +2 -2
- package/lib/esm/i18n/template-it.js +2 -2
- package/lib/esm/i18n/template-jp.d.ts +2 -2
- package/lib/esm/i18n/template-jp.js +2 -2
- package/lib/esm/i18n/template-ko.d.ts +2 -2
- package/lib/esm/i18n/template-ko.js +2 -2
- package/lib/esm/i18n/template-pt.d.ts +2 -2
- package/lib/esm/i18n/template-pt.js +2 -2
- package/lib/esm/i18n/template-ru.d.ts +2 -2
- package/lib/esm/i18n/template-ru.js +2 -2
- package/lib/esm/i18n/template-zh.d.ts +2 -2
- package/lib/esm/i18n/template-zh.js +2 -2
- package/lib/esm/index.js +0 -1
- package/lib/esm/models/cache.d.ts +2 -0
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -123
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +7 -31
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
- package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +17 -92
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
- package/lib/esm/reducers/CaseReducer.d.ts +11 -56
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +99 -279
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +18 -15
- package/lib/esm/scss/_main.scss +0 -9
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/package.json +8 -9
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
- package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
- package/lib/esm/graphql/index.d.ts +0 -4
- package/lib/esm/graphql/index.d.ts.map +0 -1
- package/lib/esm/graphql/index.js +0 -3
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
- package/lib/esm/graphql/mutations/index.d.ts +0 -2
- package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/index.js +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
- package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
- package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getParentId.js +0 -16
- package/lib/esm/graphql/queries/index.d.ts +0 -3
- package/lib/esm/graphql/queries/index.d.ts.map +0 -1
- package/lib/esm/graphql/queries/index.js +0 -2
- package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
- package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/escalation.js +0 -1
- package/lib/esm/graphql/schemas/index.d.ts +0 -2
- package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/index.js +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
- package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/index.js +0 -5
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
- package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/types.js +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
- package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
- package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseHistory.js +0 -98
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
- package/lib/esm/models/caseHistory.d.ts +0 -80
- package/lib/esm/models/caseHistory.d.ts.map +0 -1
- package/lib/esm/models/caseHistory.js +0 -1
- package/lib/esm/utils/TimelineUtils.d.ts +0 -41
- package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
- package/lib/esm/utils/TimelineUtils.js +0 -135
- package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseHistoryUtils.js +0 -165
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +0 -6
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +0 -26
|
@@ -22,14 +22,12 @@ import { search } from '@cee-eng/hydrajs';
|
|
|
22
22
|
import { Button, Card, CardBody, CardExpandableContent, CardHeader, Label, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
|
|
23
23
|
import { PaginatedList, ToastNotification } from '@rh-support/components';
|
|
24
24
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
25
|
-
|
|
26
|
-
// import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
25
|
+
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
27
26
|
import { getSolrParams } from '@rh-support/utils';
|
|
28
27
|
import { isEmpty } from 'lodash';
|
|
29
28
|
import find from 'lodash/find';
|
|
30
29
|
import isEqual from 'lodash/isEqual';
|
|
31
|
-
|
|
32
|
-
// import some from 'lodash/some';
|
|
30
|
+
import some from 'lodash/some';
|
|
33
31
|
import React, { forwardRef, useContext, useEffect, useState } from 'react';
|
|
34
32
|
import { Trans, useTranslation } from 'react-i18next';
|
|
35
33
|
import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
|
|
@@ -44,6 +42,7 @@ import { fetchRecommendations, fetchWatsonXRecommendations } from '../../../redu
|
|
|
44
42
|
import { extractKTQuestion1FromDescription } from '../../../utils/caseUtils';
|
|
45
43
|
import { usePostComment } from '../../shared/usePostComment';
|
|
46
44
|
import { CaseSolutionsItem } from './CaseSolutionsItem';
|
|
45
|
+
import { HandpickedItem } from './HandpicketItem';
|
|
47
46
|
// some of the pinned and hadpicked titles are set to 'Red Hat Knowledge Base'
|
|
48
47
|
// this workaround is added till backend fix
|
|
49
48
|
const titleFix = (recommendations, allDocs) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -119,32 +118,27 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
119
118
|
}), isEqual);
|
|
120
119
|
const caseDispatch = useCaseDispatch();
|
|
121
120
|
const caseOverviewDispatch = useContext(CaseOverviewDispatchContext);
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
// };
|
|
121
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
122
|
+
const onExpand = () => {
|
|
123
|
+
setIsExpanded(!isExpanded);
|
|
124
|
+
};
|
|
127
125
|
const { recommendationState: { isLoadingRecommendations, allDocs }, } = useRecommendationStateContext();
|
|
128
126
|
const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
|
|
129
127
|
const recommendationsDispatch = useRecommendationDispatchContext();
|
|
130
128
|
const { postComment } = usePostComment({ caseNumber: props.caseNumber });
|
|
131
129
|
const { caseNumber, isSecureSupportAccount } = props;
|
|
132
|
-
|
|
133
|
-
// const [isPinLoading, setIsPinLoading] = useState({});
|
|
130
|
+
const [isPinLoading, setIsPinLoading] = useState({});
|
|
134
131
|
const [isCaseCloseLoading, setIsCaseCloseLoading] = useState(false);
|
|
135
132
|
const [pinnedOpen, setPinnedOpen] = useState(true);
|
|
136
133
|
const [recommendations, setRecommendations] = useState([]);
|
|
137
134
|
const [topRecommendations, setTopRecommendations] = useState([]);
|
|
138
135
|
const [isCloseCaseModalOpen, setIsCloseCaseModalOpen] = useState(false);
|
|
139
|
-
|
|
140
|
-
// const ability = useContext(AbilityContext);
|
|
136
|
+
const ability = useContext(AbilityContext);
|
|
141
137
|
const { t } = useTranslation();
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
// TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
|
|
145
|
-
// const hasLink = some(recommendations, (p) => p.isLinked);
|
|
138
|
+
const hasPin = some(recommendations, (p) => p.isPinned);
|
|
139
|
+
const hasLink = some(recommendations, (p) => p.isLinked);
|
|
146
140
|
const getCommentBody = () => {
|
|
147
|
-
return
|
|
141
|
+
return `**Reason for closing case:** \nOther. Found a pinned article that perfectly resolved the issue. Closing this case now.`;
|
|
148
142
|
};
|
|
149
143
|
const handleCaseClose = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
150
144
|
setStatusUpdating(caseOverviewDispatch, true);
|
|
@@ -157,134 +151,88 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
157
151
|
updateDiscussionState: true,
|
|
158
152
|
doNotChangeStatus: true,
|
|
159
153
|
});
|
|
160
|
-
setIsCloseCaseModalOpen(false);
|
|
161
154
|
ToastNotification.addSuccessMessage(t('Status has been successfully updated'));
|
|
155
|
+
setIsCloseCaseModalOpen(false);
|
|
162
156
|
}
|
|
163
157
|
catch (err) {
|
|
164
|
-
caseUpdateError.showError(err, t('Status failed to update
|
|
158
|
+
caseUpdateError.showError(err, t('Status failed to update'));
|
|
165
159
|
}
|
|
166
160
|
finally {
|
|
167
161
|
setIsCaseCloseLoading(false);
|
|
168
162
|
setStatusUpdating(caseOverviewDispatch, false);
|
|
169
163
|
}
|
|
170
164
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
// caseNumber,
|
|
193
|
-
// {
|
|
194
|
-
// caseResourceLinks: [recommendation],
|
|
195
|
-
// },
|
|
196
|
-
// true
|
|
197
|
-
// );
|
|
198
|
-
// };
|
|
199
|
-
// TODO: KCS pin/unpin disabled -- PCM-15276 -- restore when pin/unpin is re-enabled
|
|
200
|
-
// const canPinUnpin = ability.can(
|
|
201
|
-
// resourceActions.PATCH,
|
|
202
|
-
// resources.CASE_DETAILS,
|
|
203
|
-
// CaseDetailsFields.CASE_DETAILS_PIN_UNPIN_RESOURCES
|
|
204
|
-
// );
|
|
205
|
-
// TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
|
|
206
|
-
// const canLinkUnlink = ability.can(
|
|
207
|
-
// resourceActions.PATCH,
|
|
208
|
-
// resources.CASE_DETAILS,
|
|
209
|
-
// CaseDetailsFields.CASE_DETAILS_LINK_UNLINK_RESOURCES
|
|
210
|
-
// );
|
|
165
|
+
const updateRecommendation = (recommendationToUpdate, linked) => __awaiter(void 0, void 0, void 0, function* () {
|
|
166
|
+
const recommendation = {
|
|
167
|
+
resourceId: recommendationToUpdate.resourceId,
|
|
168
|
+
resourceType: recommendationToUpdate.resourceType,
|
|
169
|
+
linked,
|
|
170
|
+
};
|
|
171
|
+
if (recommendationToUpdate.resourceViewURI)
|
|
172
|
+
recommendation.resourceViewURI = recommendationToUpdate.resourceViewURI;
|
|
173
|
+
// for some doc types like Errata we don't have resourceURI. If resourceURI was not available,
|
|
174
|
+
// we constructe a 'fake' one to be used when linking in SFDC
|
|
175
|
+
recommendation.resourceURI = recommendationToUpdate.resourceURI
|
|
176
|
+
? recommendationToUpdate.resourceURI
|
|
177
|
+
: recommendationToUpdate.resourceViewURI
|
|
178
|
+
? recommendationToUpdate.resourceViewURI
|
|
179
|
+
: recommendationToUpdate.resourceId;
|
|
180
|
+
yield updateCaseDetails(caseDispatch, caseNumber, {
|
|
181
|
+
caseResourceLinks: [recommendation],
|
|
182
|
+
}, true);
|
|
183
|
+
});
|
|
184
|
+
const canPinUnpin = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_PIN_UNPIN_RESOURCES);
|
|
185
|
+
const canLinkUnlink = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_LINK_UNLINK_RESOURCES);
|
|
211
186
|
const addDtmEvent = (stepName) => {
|
|
212
187
|
// reserve for when fixing dtm
|
|
213
188
|
};
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
// )
|
|
262
|
-
// .filter((rec) => rec.isLinked || rec.isPinned);
|
|
263
|
-
// }
|
|
264
|
-
// });
|
|
265
|
-
// setIsPinLoading((prevPiningMap) => ({ ...prevPiningMap, [recommendationToUpdate.resourceId]: false }));
|
|
266
|
-
// } catch (error) {
|
|
267
|
-
// if (error.status === 403) {
|
|
268
|
-
// ToastNotification.addDangerMessage(
|
|
269
|
-
// t('You do not have the proper entitlements to pin a recommendation.'),
|
|
270
|
-
// <>
|
|
271
|
-
// {t('Please')}
|
|
272
|
-
// <a href="/support/contact/customerService"> {t('contact Customer Service')} </a>
|
|
273
|
-
// {t('if you think this is an error.')}
|
|
274
|
-
// </>
|
|
275
|
-
// );
|
|
276
|
-
// } else {
|
|
277
|
-
// isPinned !== undefined || isLinked !== undefined
|
|
278
|
-
// ? caseUpdateError.showError(error, t('Could not unpin the solution'))
|
|
279
|
-
// : caseUpdateError.showError(error, t('Could not pin the solution'));
|
|
280
|
-
// }
|
|
281
|
-
// setIsPinLoading((prevPiningMap) => {
|
|
282
|
-
// const newMap = { ...prevPiningMap };
|
|
283
|
-
// delete newMap[recommendationToUpdate.resourceId];
|
|
284
|
-
// return newMap;
|
|
285
|
-
// });
|
|
286
|
-
// }
|
|
287
|
-
// };
|
|
189
|
+
const updateRecommendations = (recommendationToUpdate, isPinned, isLinked) => () => __awaiter(void 0, void 0, void 0, function* () {
|
|
190
|
+
try {
|
|
191
|
+
setIsPinLoading((prevPiningMap) => (Object.assign(Object.assign({}, prevPiningMap), { [recommendationToUpdate.resourceId]: true })));
|
|
192
|
+
yield updateRecommendation(recommendationToUpdate, isLinked !== undefined ? !isLinked : !isPinned);
|
|
193
|
+
setTopRecommendations((prevTopRecs) => prevTopRecs.map((rec) => rec.resourceId === recommendationToUpdate.resourceId
|
|
194
|
+
? Object.assign(Object.assign({}, rec), { isLinked: isLinked !== undefined ? !isLinked : !!rec.isLinked, isPinned: isPinned !== undefined ? !isPinned : !!rec.isPinned }) : rec));
|
|
195
|
+
setRecommendations((prevRecs) => {
|
|
196
|
+
const toBeAdded = !prevRecs.some((r) => r.resourceId === recommendationToUpdate.resourceId);
|
|
197
|
+
if (toBeAdded) {
|
|
198
|
+
return [
|
|
199
|
+
...prevRecs,
|
|
200
|
+
Object.assign(Object.assign({}, recommendationToUpdate), { isLinked: isLinked !== undefined ? !isLinked : recommendationToUpdate.isLinked, isPinned: isPinned !== undefined ? !isPinned : recommendationToUpdate.isPinned, isPinnedAndLinked: (isPinned !== undefined ? !isPinned : recommendationToUpdate.isPinned) &&
|
|
201
|
+
(isLinked !== undefined ? !isLinked : recommendationToUpdate.isLinked) }),
|
|
202
|
+
];
|
|
203
|
+
}
|
|
204
|
+
else {
|
|
205
|
+
return prevRecs
|
|
206
|
+
.map((rec) => rec.resourceId === recommendationToUpdate.resourceId
|
|
207
|
+
? Object.assign(Object.assign({}, rec), { isLinked: isLinked !== undefined ? !isLinked : !!rec.isLinked, isPinned: isPinned !== undefined ? !isPinned : !!rec.isPinned, isPinnedAndLinked: (isPinned !== undefined ? !isPinned : rec.isPinned) &&
|
|
208
|
+
(isLinked !== undefined ? !isLinked : rec.isLinked) }) : rec)
|
|
209
|
+
.filter((rec) => rec.isLinked || rec.isPinned);
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
setIsPinLoading((prevPiningMap) => (Object.assign(Object.assign({}, prevPiningMap), { [recommendationToUpdate.resourceId]: false })));
|
|
213
|
+
}
|
|
214
|
+
catch (error) {
|
|
215
|
+
if (error.status === 403) {
|
|
216
|
+
ToastNotification.addDangerMessage(t('You do not have the proper entitlements to pin a recommendation.'), React.createElement(React.Fragment, null,
|
|
217
|
+
t('Please'),
|
|
218
|
+
React.createElement("a", { href: "/support/contact/customerService" },
|
|
219
|
+
" ",
|
|
220
|
+
t('contact Customer Service'),
|
|
221
|
+
" "),
|
|
222
|
+
t('if you think this is an error.')));
|
|
223
|
+
}
|
|
224
|
+
else {
|
|
225
|
+
isPinned !== undefined || isLinked !== undefined
|
|
226
|
+
? caseUpdateError.showError(error, t('Could not unpin the solution'))
|
|
227
|
+
: caseUpdateError.showError(error, t('Could not pin the solution'));
|
|
228
|
+
}
|
|
229
|
+
setIsPinLoading((prevPiningMap) => {
|
|
230
|
+
const newMap = Object.assign({}, prevPiningMap);
|
|
231
|
+
delete newMap[recommendationToUpdate.resourceId];
|
|
232
|
+
return newMap;
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
});
|
|
288
236
|
// fetch top recommendations
|
|
289
237
|
useEffect(() => {
|
|
290
238
|
function fetchRecs() {
|
|
@@ -344,71 +292,18 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
344
292
|
}
|
|
345
293
|
}, [allDocs, isFetchingCaseDetails, isLoadingRecommendations, recomendationsObj]);
|
|
346
294
|
const renderTopRecommendations = (recommendation, index, type) => (React.createElement(React.Fragment, null,
|
|
347
|
-
React.createElement(CaseSolutionsItem
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
showPin: false, type: type, pinTitle: '', isPinLoading: {}, index: index, recommendation: recommendation, onPinClicked: () => { }, onLinkClick: (name) => addDtmEvent(name) })));
|
|
352
|
-
// TODO: KCS pin/unpin disabled -- PCM-15276 -- restore showPin when pin/unpin is re-enabled
|
|
353
|
-
const renderPinsByCustomer = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: false, type: type, pinTitle: '', isPinLoading: {}, index: index, recommendation: recommendation, onPinClicked: () => { }, onLinkClick: (name) => addDtmEvent(name) }));
|
|
354
|
-
// TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
|
|
295
|
+
canPinUnpin && (React.createElement(CaseSolutionsItem, { showPin: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined), onLinkClick: (name) => addDtmEvent(name) })),
|
|
296
|
+
canLinkUnlink && (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? t('Unlink') : t('Link'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) }))));
|
|
297
|
+
// customer logged in: we show pins and perform pin/unpin
|
|
298
|
+
const renderPinsByCustomer = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showPin: true, isPinned: true, type: type, pinTitle: recommendation.isPinned ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, recommendation.isPinned, undefined), onLinkClick: (name) => addDtmEvent(name) }));
|
|
355
299
|
// customer logged in: we show links but perform pin/unpin
|
|
356
|
-
|
|
357
|
-
// recommendation: ICaseDetailAsideRecommendation,
|
|
358
|
-
// index: number,
|
|
359
|
-
// type: string
|
|
360
|
-
// ) => (
|
|
361
|
-
// <HandpickedItem
|
|
362
|
-
// type={type}
|
|
363
|
-
// caseNumber={props.caseNumber}
|
|
364
|
-
// pinTitle={recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin')}
|
|
365
|
-
// isPinLoading={isPinLoading}
|
|
366
|
-
// index={index}
|
|
367
|
-
// recommendation={recommendation}
|
|
368
|
-
// onRecommendationLike={() => setIsCloseCaseModalOpen(true)}
|
|
369
|
-
// onLinkClick={(name) => addDtmEvent(name)}
|
|
370
|
-
// />
|
|
371
|
-
// );
|
|
372
|
-
// TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
|
|
300
|
+
const renderHandpickedCustomerView = (recommendation, index, type) => (React.createElement(HandpickedItem, { type: type, caseNumber: props.caseNumber, pinTitle: recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onRecommendationLike: () => setIsCloseCaseModalOpen(true), onLinkClick: (name) => addDtmEvent(name) }));
|
|
373
301
|
// redhatter logged in: we show pins but perform link/unlink
|
|
374
|
-
|
|
375
|
-
// recommendation: ICaseDetailAsideRecommendation,
|
|
376
|
-
// index: number,
|
|
377
|
-
// type: string
|
|
378
|
-
// ) => (
|
|
379
|
-
// <CaseSolutionsItem
|
|
380
|
-
// showLink={true}
|
|
381
|
-
// type={type}
|
|
382
|
-
// pinTitle={recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin')}
|
|
383
|
-
// isPinLoading={isPinLoading}
|
|
384
|
-
// index={index}
|
|
385
|
-
// recommendation={recommendation}
|
|
386
|
-
// onPinClicked={updateRecommendations(recommendation, undefined, recommendation.isLinked)}
|
|
387
|
-
// onLinkClick={(name) => addDtmEvent(name)}
|
|
388
|
-
// />
|
|
389
|
-
// );
|
|
390
|
-
// TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
|
|
302
|
+
const renderPinnedByCustomerRedhatterView = (recommendation, index, type) => (React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isPinnedAndLinked ? t('Unpin') : t('Pin'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) }));
|
|
391
303
|
// redhatter logged in: we show links and perform link/unlink
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
// type: string
|
|
396
|
-
// ) => (
|
|
397
|
-
// <div className="pf-v6-u-ml-lg">
|
|
398
|
-
// <CaseSolutionsItem
|
|
399
|
-
// showLink={true}
|
|
400
|
-
// type={type}
|
|
401
|
-
// pinTitle={recommendation.isLinked ? t('Unlink') : t('Link')}
|
|
402
|
-
// isPinLoading={isPinLoading}
|
|
403
|
-
// index={index}
|
|
404
|
-
// recommendation={recommendation}
|
|
405
|
-
// onPinClicked={updateRecommendations(recommendation, undefined, recommendation.isLinked)}
|
|
406
|
-
// onLinkClick={(name) => addDtmEvent(name)}
|
|
407
|
-
// />
|
|
408
|
-
// </div>
|
|
409
|
-
// );
|
|
410
|
-
// TODO: KCS linking disabled -- PCM-15276 -- restore when linking is re-enabled
|
|
411
|
-
// const linkedRecommendations = recommendations.filter((r) => r.isLinked);
|
|
304
|
+
const renderHandPickedByRedHatter = (recommendation, index, type) => (React.createElement("div", { className: "pf-v6-u-ml-lg" },
|
|
305
|
+
React.createElement(CaseSolutionsItem, { showLink: true, type: type, pinTitle: recommendation.isLinked ? t('Unlink') : t('Link'), isPinLoading: isPinLoading, index: index, recommendation: recommendation, onPinClicked: updateRecommendations(recommendation, undefined, recommendation.isLinked), onLinkClick: (name) => addDtmEvent(name) })));
|
|
306
|
+
const linkedRecommendations = recommendations.filter((r) => r.isLinked);
|
|
412
307
|
const pinnedRecommendations = recommendations.filter((r) => r.isPinned);
|
|
413
308
|
const closeCaseModal = (React.createElement(Modal, { variant: ModalVariant.small, isOpen: isCloseCaseModalOpen && caseStatus !== CaseStatusEnum.CLOSED, onClose: () => setIsCloseCaseModalOpen(false) },
|
|
414
309
|
React.createElement(ModalHeader, { title: t('Did this solve your case?') }),
|
|
@@ -421,19 +316,30 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
421
316
|
React.createElement(Trans, null, "Close case")))));
|
|
422
317
|
return (React.createElement(React.Fragment, null,
|
|
423
318
|
closeCaseModal,
|
|
319
|
+
linkedRecommendations.length > 0 && (React.createElement(Card, { isExpanded: isExpanded },
|
|
320
|
+
React.createElement(CardHeader, { className: "pf-v6-u-display-flex", onExpand: onExpand },
|
|
321
|
+
React.createElement("span", null, canLinkUnlink ? React.createElement(Trans, null, "Handpicked by you") : React.createElement(Trans, null, "Handpicked for this case")),
|
|
322
|
+
React.createElement("span", { className: "badge-item pf-v6-u-font-size-sm pf-v6-u-mx-sm" }, linkedRecommendations.length)),
|
|
323
|
+
React.createElement(CardExpandableContent, null,
|
|
324
|
+
React.createElement(CardBody, null, !hasLink ? (!canLinkUnlink ? (React.createElement(Trans, null, "If a Red Hat engineer finds an article or solution that can help with your case, they'll pin it here.")) : (React.createElement(React.Fragment, null))) : (React.createElement(PaginatedList, { id: "case-details-handpicked-recommendations", listItems: linkedRecommendations.map((rec, index) => canLinkUnlink
|
|
325
|
+
? renderHandPickedByRedHatter(rec, index, 'handpicked-recommendations')
|
|
326
|
+
: renderHandpickedCustomerView(rec, index, 'handpicked-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
|
|
327
|
+
{ title: '5', value: 5 },
|
|
328
|
+
{ title: '10', value: 10 },
|
|
329
|
+
] })))))),
|
|
424
330
|
pinnedRecommendations.length > 0 && (React.createElement(Card, { isExpanded: pinnedOpen },
|
|
425
331
|
React.createElement(CardHeader, { className: "pf-v6-u-display-flex", onExpand: () => setPinnedOpen((pre) => !pre) },
|
|
426
332
|
React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" },
|
|
427
|
-
React.createElement("span", null,
|
|
428
|
-
React.createElement(Trans, null, "My pinned recommendations")),
|
|
333
|
+
React.createElement("span", null, canLinkUnlink ? (React.createElement(Trans, null, "Pinned by customer")) : (React.createElement(Trans, null, "My pinned recommendations"))),
|
|
429
334
|
React.createElement("span", { className: "badge-item pf-v6-u-font-size-sm pf-v6-u-mx-sm", style: { lineHeight: '18px' } },
|
|
430
335
|
React.createElement(Label, null, pinnedRecommendations.length)))),
|
|
431
336
|
React.createElement(CardExpandableContent, null,
|
|
432
|
-
React.createElement(CardBody, null,
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
337
|
+
React.createElement(CardBody, null, !hasPin ? (!canLinkUnlink ? (React.createElement(Trans, null, "When you save a recommended article or solution, you'll see it here. Saved items display only in this case and are not saved for later.")) : (React.createElement(React.Fragment, null))) : (React.createElement(PaginatedList, { id: "case-details-pinned-recommendations", listItems: pinnedRecommendations.map((rec, index) => canLinkUnlink
|
|
338
|
+
? renderPinnedByCustomerRedhatterView(rec, index, 'pinned-recommendations')
|
|
339
|
+
: renderPinsByCustomer(rec, index, 'pinned-recommendations')), perPage: 5, className: "list-icons list-icons-flush", isFetching: !!isLoadingRecommendations, perPageOptions: [
|
|
340
|
+
{ title: '5', value: 5 },
|
|
341
|
+
{ title: '10', value: 10 },
|
|
342
|
+
] })))))),
|
|
437
343
|
topRecommendations.length > 0 && (React.createElement(Card, { className: "card-support recommendations", ref: ref },
|
|
438
344
|
React.createElement(CardHeader, null,
|
|
439
345
|
React.createElement("h3", { className: "card-heading case-detail-panel-card-heading" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSolutionsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseSolutionsItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutionsItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAQ5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,UAAU,MAAM;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,8BAA8B,CAAC;IAC/C,YAAY,EAAE,GAAG,CAAC;IAClB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAED,MAAM,WAAW,8BAA+B,SAAQ,OAAO,CAAC,iBAAiB,CAAC;IAC9E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,0BAA0B,CAAC;CACnD;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,qBA2D9C"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Button, Icon } from '@patternfly/react-core';
|
|
2
|
-
|
|
3
|
-
// import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
|
|
2
|
+
import LinkIcon from '@patternfly/react-icons/dist/js/icons/link-icon';
|
|
4
3
|
import OutlinedStarIcon from '@patternfly/react-icons/dist/js/icons/outlined-star-icon';
|
|
5
4
|
import StarIcon from '@patternfly/react-icons/dist/js/icons/star-icon';
|
|
6
5
|
import { LoadingIndicator } from '@rh-support/components';
|
|
@@ -13,10 +12,11 @@ export function CaseSolutionsItem(props) {
|
|
|
13
12
|
const isLoading = !!props.isPinLoading[props.recommendation.resourceId];
|
|
14
13
|
return (React.createElement("div", null,
|
|
15
14
|
React.createElement("div", { className: "recommendation-header" },
|
|
16
|
-
|
|
15
|
+
React.createElement(Button, { icon: React.createElement(React.Fragment, null,
|
|
17
16
|
isLoading && React.createElement(LoadingIndicator, { show: isLoading, size: "xs" }),
|
|
18
|
-
!isLoading && (React.createElement(React.Fragment, null,
|
|
19
|
-
React.createElement(Icon, { size: "md", color: "0066cc" }, props.isPinned ? (React.createElement(StarIcon, { className: "pinned-resource" })) : (React.createElement(OutlinedStarIcon, { className: "pinned-resource" })))))
|
|
17
|
+
!isLoading && props.showPin && (React.createElement(React.Fragment, null,
|
|
18
|
+
React.createElement(Icon, { size: "md", color: "0066cc" }, props.isPinned ? (React.createElement(StarIcon, { className: "pinned-resource" })) : (React.createElement(OutlinedStarIcon, { className: "pinned-resource" }))))),
|
|
19
|
+
!isLoading && props.showLink && React.createElement(LinkIcon, null)), title: props.pinTitle, onClick: props.onPinClicked, "data-tracking-id": `case-resource-${props.pinTitle}`, variant: "plain", className: "list-icon" }),
|
|
20
20
|
React.createElement("a", { href: props.recommendation.resourceViewURI, "data-tracking-id": `case-resource-${props.type}-link-${props.index}`, target: "_blank", rel: "noopener noreferrer", className: "case-resource-recommendation-link", dangerouslySetInnerHTML: {
|
|
21
21
|
__html: DOMPurify.sanitize(truncate(decodeMarkTag(props.recommendation.title || ''), maxTitleLength)),
|
|
22
22
|
}, onClick: () => props.onLinkClick('case solution click') })),
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
|
|
2
3
|
interface IProps {
|
|
3
4
|
onConfirm: (commentBody: any, newStatus: any, reopenedAt?: any, reopenedBySSOName?: any, reopenedReason?: any, reopenedReasonOther?: any) => void;
|
|
4
5
|
onClose: () => void;
|
|
5
6
|
caseNumber: string;
|
|
6
7
|
isInternal: boolean;
|
|
8
|
+
allStatuses: string[];
|
|
7
9
|
isUpdating: boolean;
|
|
8
|
-
reopenStatus:
|
|
10
|
+
reopenStatus: CaseStatusEnum;
|
|
9
11
|
whoIsUpdating: string;
|
|
10
12
|
}
|
|
11
13
|
export declare function ReopenCaseModal(props: IProps): React.JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"ReopenCaseModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ConfirmationModals/ReopenCaseModal.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AAEzE,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,KAAA,EAAE,SAAS,KAAA,EAAE,UAAU,CAAC,KAAA,EAAE,iBAAiB,CAAC,KAAA,EAAE,cAAc,CAAC,KAAA,EAAE,mBAAmB,CAAC,KAAA,KAAK,IAAI,CAAC;IACpH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,cAAc,CAAC;IAC7B,aAAa,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkN5C"}
|
|
@@ -9,11 +9,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Button, ButtonVariant, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, TextArea, } from '@patternfly/react-core';
|
|
11
11
|
import { SingleSelectDropdown } from '@rh-support/components';
|
|
12
|
-
import { formatDateTime
|
|
12
|
+
import { formatDateTime } from '@rh-support/utils';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
14
14
|
import map from 'lodash/map';
|
|
15
15
|
import React, { useState } from 'react';
|
|
16
16
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
+
import { CaseStatusEnum } from '../../../constants/caseDetailsConstants';
|
|
17
18
|
const reasonWithDescription = ['Other'];
|
|
18
19
|
const reasonWithoutDescription = ['I am experiencing the same issue', 'My case has been closed prematurely'];
|
|
19
20
|
const reasonsList = [...reasonWithoutDescription, ...reasonWithDescription];
|
|
@@ -42,15 +43,18 @@ export function ReopenCaseModal(props) {
|
|
|
42
43
|
return isValid;
|
|
43
44
|
};
|
|
44
45
|
const getCommentBody = () => {
|
|
45
|
-
return
|
|
46
|
+
return `**Reason for reopening case:** \n${selectedReason}${reasonWithDescription.includes(selectedReason) || props.isInternal
|
|
46
47
|
? `${props.isInternal ? '' : '. '}${reopenDescription}`
|
|
47
|
-
: ''}
|
|
48
|
+
: ''}
|
|
49
|
+
\n **Reopened date:** \n${formatDateTime(Date())}
|
|
50
|
+
\n**Reopened by:** \n${props.whoIsUpdating}
|
|
51
|
+
\n**Reopened reason other description:**\n${reopenDescription}`;
|
|
48
52
|
};
|
|
49
53
|
const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
|
|
50
54
|
if (!checkForRequiredFields())
|
|
51
55
|
return;
|
|
52
56
|
let submissionDate = new Date();
|
|
53
|
-
props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus ||
|
|
57
|
+
props.onConfirm(getCommentBody(), props.reopenStatus || selectedStatus || CaseStatusEnum.WAITING_ON_REDHAT, submissionDate, props.whoIsUpdating, selectedReason, reopenDescription);
|
|
54
58
|
});
|
|
55
59
|
const onReasonChange = (option) => {
|
|
56
60
|
setSelectedReason(option.value);
|
|
@@ -66,7 +70,7 @@ export function ReopenCaseModal(props) {
|
|
|
66
70
|
label: option,
|
|
67
71
|
value: option,
|
|
68
72
|
}));
|
|
69
|
-
const getStatusDropdownOptions = map(
|
|
73
|
+
const getStatusDropdownOptions = map(props.allStatuses.filter((status) => status !== CaseStatusEnum.CLOSED), (option) => ({
|
|
70
74
|
label: option,
|
|
71
75
|
value: option,
|
|
72
76
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ESSRemoteSessionModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ESSRemoteSessionModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,KAAmB,MAAM,OAAO,CAAC;AAgBxC,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;IAClB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAsKlD"}
|
|
@@ -7,24 +7,27 @@ 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 { publicApi } from '@cee-eng/hydrajs';
|
|
11
11
|
import { Button, ButtonVariant, Icon, Modal, ModalFooter, ModalHeader, ModalVariant, Title, TitleSizes, } from '@patternfly/react-core';
|
|
12
12
|
import CheckCircleIcon from '@patternfly/react-icons/dist/js/icons/check-circle-icon';
|
|
13
|
-
import { ToastNotification } from '@rh-support/components';
|
|
14
|
-
import isEqual from 'lodash/isEqual';
|
|
13
|
+
import { ToastNotification, useFetch } from '@rh-support/components';
|
|
15
14
|
import React, { useState } from 'react';
|
|
16
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
17
|
-
import { useCaseDispatch
|
|
18
|
-
import {
|
|
16
|
+
import { useCaseDispatch } from '../../../context/CaseContext';
|
|
17
|
+
import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
|
|
18
|
+
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
|
|
19
|
+
import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
|
|
19
20
|
import { checkForCaseStatusToggleOnAttachOrComment, setCaseDetails, updateCaseDetails, } from '../../../reducers/CaseReducer';
|
|
20
21
|
export function ESSRemoteSessionModal(props) {
|
|
21
22
|
const { t } = useTranslation();
|
|
22
23
|
const caseDispatch = useCaseDispatch();
|
|
23
24
|
const [agreeLoading, setAgreeLoading] = useState(false);
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const
|
|
25
|
+
const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
26
|
+
propgateErrors: true,
|
|
27
|
+
});
|
|
28
|
+
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
29
|
+
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
30
|
+
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
28
31
|
// To handle modal cancel and close
|
|
29
32
|
const onCancel = () => {
|
|
30
33
|
props.onClose && props.onClose();
|
|
@@ -38,17 +41,13 @@ export function ESSRemoteSessionModal(props) {
|
|
|
38
41
|
screenSessionRequested: true,
|
|
39
42
|
});
|
|
40
43
|
try {
|
|
41
|
-
yield
|
|
42
|
-
caseId: caseSalesforceId,
|
|
43
|
-
body: requestComment,
|
|
44
|
-
isPublic: true,
|
|
45
|
-
});
|
|
46
|
-
client.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
47
|
-
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
|
|
48
|
-
apolloClient: client,
|
|
44
|
+
yield postCommentRequest({
|
|
49
45
|
caseNumber: props.caseNumber,
|
|
50
|
-
|
|
46
|
+
commentBody: requestComment,
|
|
47
|
+
contentType: 'markdown',
|
|
51
48
|
});
|
|
49
|
+
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
50
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
52
51
|
onCancel();
|
|
53
52
|
setAgreeLoading(false);
|
|
54
53
|
ToastNotification.addSuccessMessage(t('Remote session has been requested successfully'), t('Red Hat will add a comment to your case to schedule your remote session.'));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"NewEssTermsModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAYnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AA4BD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAmY7C"}
|