@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,286 +7,338 @@ 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 {
|
|
11
|
-
import { Button, ButtonVariant, Checkbox } from '@patternfly/react-core';
|
|
10
|
+
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
+
import { Button, ButtonVariant, Checkbox, debounce, Tooltip } from '@patternfly/react-core';
|
|
12
12
|
import PlusIcon from '@patternfly/react-icons/dist/js/icons/plus-icon';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { ability, CaseDiscussionFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
17
|
-
import { formatDateTime, getHydraAttachmentImageUrl } from '@rh-support/utils';
|
|
13
|
+
import { EditorMode, LoadingIndicator, MarkdownEditor, ToastNotification, useFetch, usePrevious, } from '@rh-support/components';
|
|
14
|
+
import { FeatureAnnouncementKeys, GlobalMetadataStateContext, NewFeaturePopoverAnnouncement, useCanEditCase, useUserPreferences, } from '@rh-support/react-context';
|
|
15
|
+
import { ability, CaseDiscussionFields, CaseListFields, resourceActions, resources, } from '@rh-support/user-permissions';
|
|
18
16
|
import isEmpty from 'lodash/isEmpty';
|
|
19
17
|
import isEqual from 'lodash/isEqual';
|
|
20
|
-
import
|
|
18
|
+
import uniqBy from 'lodash/uniqBy';
|
|
19
|
+
import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
21
20
|
import { useDropzone } from 'react-dropzone';
|
|
22
21
|
import { Trans, useTranslation } from 'react-i18next';
|
|
23
22
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
23
|
+
import { CaseDetailsCacheNamespaces } from '../../../../enums/cache';
|
|
24
|
+
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
25
|
+
import { DiscussionType } from '../../../../reducers/CaseDiscussionTabReducer';
|
|
26
|
+
import { addingNotifiedUsers, checkForCaseStatusToggleOnAttachOrComment, setNotifiedUser, } from '../../../../reducers/CaseReducer';
|
|
27
|
+
import { CaseDetailsCacheUtils } from '../../../../utils/caseDetailsCacheUtils';
|
|
28
|
+
import { AttachmentDispatchContext, AttachmentStateContext, hasSomeSelectedFiles, hasSomeUnUploadedAttachments, isUploadingAttachment, resetAttachment, } from '../../../shared/fileUpload';
|
|
28
29
|
import FileSelectorButton from '../../../shared/fileUpload/fileSelectors/FileSelectorButton';
|
|
29
30
|
import FileUpload from '../../../shared/fileUpload/FileUpload';
|
|
30
31
|
import { PDFContext } from '../../PDFContainer';
|
|
31
|
-
import { useAttachmentUploadCompletion } from './PostComment/useAttachmentUploadCompletion';
|
|
32
|
-
import { useCommentDrafts } from './PostComment/useCommentDrafts';
|
|
33
32
|
import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
|
|
34
33
|
import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
|
|
35
34
|
export function PostComment(props) {
|
|
36
|
-
var _a, _b
|
|
35
|
+
var _a, _b;
|
|
37
36
|
const { t } = useTranslation();
|
|
37
|
+
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
38
38
|
let { caseNumber } = props;
|
|
39
39
|
const [isTextAreaFocused, setIsTextAreaFocused] = useState(false);
|
|
40
|
+
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
40
41
|
const canPostPrivateComments = ability.can(resourceActions.PATCH, resources.CASE_COMMENTS, CaseDiscussionFields.POST_PRIVATE_COMMENT);
|
|
41
|
-
const {
|
|
42
|
+
const { request, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
43
|
+
propgateErrors: true,
|
|
44
|
+
});
|
|
42
45
|
const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
|
|
43
46
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
47
|
+
const [commentText, setCommentText] = useState(props.commentText || '');
|
|
48
|
+
const [isPublic, setIsPublic] = useState(props.defaultIsPublic === null ? true : props.defaultIsPublic);
|
|
49
|
+
const isPublicRef = useRef(isPublic);
|
|
44
50
|
const isUploadingAttachmentPrevious = useRef(false);
|
|
45
|
-
const batchSuccessCountRef = useRef(0);
|
|
46
51
|
const isUploadingAttachments = isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles);
|
|
47
|
-
const
|
|
48
|
-
const hasAbortedOrFailed = hasAbortedOrFailedAttachments(attachmentState.caseFiles.selectedLocalFiles);
|
|
52
|
+
const hasSomeUnUploadedFiles = hasSomeUnUploadedAttachments(attachmentState.caseFiles.selectedLocalFiles);
|
|
49
53
|
const hasSomeSelectedFilesLocal = hasSomeSelectedFiles(attachmentState.caseFiles.selectedLocalFiles);
|
|
50
|
-
const [
|
|
54
|
+
const [commentType, setCommentType] = useState(EditorMode.PLAIN);
|
|
51
55
|
const [commentSignature, setCommentSignature] = useState('');
|
|
52
|
-
const [commentText, setCommentText] = useState('');
|
|
53
56
|
const { isExportingPDF } = useContext(PDFContext);
|
|
54
57
|
const { getCommentTypeFromPreference, getCommentSignature } = useUserPreferences();
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
const sig = (yield getCommentSignature()) || '';
|
|
68
|
-
setCommentSignature(sig);
|
|
69
|
-
if (isEmpty(commentText) && !isEmpty(sig)) {
|
|
70
|
-
setCommentText(`<p><br></p><p>${sig}</p>`);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
console.error('Failed to load comment preferences:', error);
|
|
75
|
-
}
|
|
76
|
-
});
|
|
58
|
+
const userOriginalCommentPrefs = () => __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
try {
|
|
60
|
+
const retrievedComment = yield getCommentTypeFromPreference();
|
|
61
|
+
const retrievedCommentSignature = yield getCommentSignature();
|
|
62
|
+
const defaultCommentType = retrievedComment ? retrievedComment : EditorMode.PLAIN;
|
|
63
|
+
// @ts-ignore
|
|
64
|
+
setCommentType(defaultCommentType);
|
|
65
|
+
const defaultCommentSignature = retrievedCommentSignature || '';
|
|
66
|
+
setCommentSignature(defaultCommentSignature);
|
|
67
|
+
if (isEmpty(commentText) && !isEmpty(defaultCommentSignature)) {
|
|
68
|
+
setCommentText(`\n ${defaultCommentSignature}` || '');
|
|
69
|
+
}
|
|
77
70
|
}
|
|
78
|
-
|
|
71
|
+
catch (error) {
|
|
72
|
+
console.log(error);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
userOriginalCommentPrefs();
|
|
79
77
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
80
78
|
}, []);
|
|
81
79
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
82
80
|
const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
|
|
83
|
-
const [isProcessing, setIsProcessing] = useState(
|
|
81
|
+
const [isProcessing, setIsProcessing] = useState(isPostingComment || isUploadingAttachments);
|
|
84
82
|
const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
85
|
-
const { onFileAttach, cancelFileUpload } = useMarkdownFileUploader({
|
|
83
|
+
const { onFileAttach, onFileDelete, isUploadingFile, isMarkdownFileUploadInProgress, cancelFileUpload } = useMarkdownFileUploader({
|
|
86
84
|
caseNumber,
|
|
87
|
-
|
|
85
|
+
secureSupport: loggedInUsersAccount.data.secureSupport,
|
|
86
|
+
onAttachmentAdded: props.onAttachmentAdded,
|
|
88
87
|
});
|
|
89
|
-
const {
|
|
90
|
-
onDrop: (files) => onFileAttach(files, isPublic),
|
|
91
|
-
multiple: false,
|
|
92
|
-
noClick: true,
|
|
93
|
-
noKeyboard: true,
|
|
94
|
-
});
|
|
95
|
-
const { status, caseSalesforceId, existingCaseDetails } = useCaseSelector((state) => ({
|
|
88
|
+
const { selectedNotificationContacts, status, contactSSOName, selectedAccountDetails } = useCaseSelector((state) => ({
|
|
96
89
|
status: state.caseDetails.status,
|
|
97
|
-
|
|
98
|
-
|
|
90
|
+
contactSSOName: state.caseDetails.contactSSOName,
|
|
91
|
+
selectedNotificationContacts: state.selectedNotificationContacts,
|
|
92
|
+
selectedAccountDetails: state.selectedAccountDetails,
|
|
99
93
|
}), isEqual);
|
|
100
|
-
const
|
|
101
|
-
|
|
102
|
-
const onImageUpload = useCallback((file) => __awaiter(this, void 0, void 0, function* () {
|
|
103
|
-
const attachmentId = yield uploadImageFile({ file });
|
|
104
|
-
if (!attachmentId) {
|
|
105
|
-
throw new Error('Upload did not return an attachment id.');
|
|
106
|
-
}
|
|
107
|
-
return getHydraAttachmentImageUrl(caseNumber, attachmentId);
|
|
108
|
-
}), [caseNumber, uploadImageFile]);
|
|
109
|
-
const isConfirmedStateSideSupport = (_c = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _c === void 0 ? void 0 : _c.hasConfirmedStatesideSupport;
|
|
94
|
+
const isConfirmedStateSideSupport = ((_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.hasConfirmedStatesideSupport) ||
|
|
95
|
+
((_b = selectedAccountDetails === null || selectedAccountDetails === void 0 ? void 0 : selectedAccountDetails.data) === null || _b === void 0 ? void 0 : _b.hasConfirmedStatesideSupport);
|
|
110
96
|
const caseDispatch = useCaseDispatch();
|
|
111
97
|
const [isCommentTooLong, setIsCommentTooLong] = useState(false);
|
|
112
98
|
const canEditCase = useCanEditCase();
|
|
113
99
|
const componentRef = useRef(null);
|
|
114
|
-
|
|
100
|
+
let passedReply = props.commentText;
|
|
101
|
+
const { getRootProps, getInputProps, open } = useDropzone({
|
|
102
|
+
onDrop: (files) => onFileAttach(files, isPublic),
|
|
103
|
+
multiple: false,
|
|
104
|
+
});
|
|
105
|
+
// Allows the isPublic default state to be changed by the parent component
|
|
106
|
+
const resetIsPublic = useCallback(() => setIsPublic(props.defaultIsPublic === null ? true : props.defaultIsPublic), [props.defaultIsPublic]);
|
|
115
107
|
const previousDefaultIsPublic = usePrevious(props.defaultIsPublic);
|
|
116
108
|
useEffect(() => {
|
|
117
|
-
var _a;
|
|
118
109
|
if (previousDefaultIsPublic === props.defaultIsPublic)
|
|
119
110
|
return;
|
|
120
|
-
|
|
111
|
+
props.defaultIsPublic === null ? resetIsPublic() : setIsPublic(props.defaultIsPublic);
|
|
121
112
|
}, [props.defaultIsPublic, resetIsPublic, previousDefaultIsPublic]);
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
113
|
+
// why usecallback instead of useRef?
|
|
114
|
+
// https://reactjs.org/docs/hooks-faq.html#how-can-i-measure-a-dom-node
|
|
115
|
+
const textAreaRef = useCallback((node) => {
|
|
116
|
+
if (node !== null &&
|
|
117
|
+
props.commentText &&
|
|
118
|
+
props.commentCreator &&
|
|
119
|
+
commentText &&
|
|
120
|
+
commentText === getReplyText(props.commentText, props.commentCreator)) {
|
|
121
|
+
node.scrollTop = node.scrollHeight;
|
|
122
|
+
node.focus();
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126
|
+
[commentText]);
|
|
134
127
|
const resetCommentSection = () => __awaiter(this, void 0, void 0, function* () {
|
|
135
128
|
setCommentText('');
|
|
136
129
|
setIsTextAreaFocused(false);
|
|
137
130
|
resetIsPublic();
|
|
138
|
-
yield
|
|
139
|
-
|
|
131
|
+
const { value: prevDraftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserRights.data.getSSOUsername())) || {};
|
|
132
|
+
if (prevDraftComments[caseNumber]) {
|
|
133
|
+
delete prevDraftComments[caseNumber];
|
|
134
|
+
}
|
|
135
|
+
CaseDetailsCacheUtils.set(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserRights.data.getSSOUsername(), { value: prevDraftComments });
|
|
136
|
+
props.onCommentClear && props.onCommentClear();
|
|
137
|
+
setCommentText(`\n ${commentSignature}` || '');
|
|
140
138
|
});
|
|
141
139
|
const resetAttachmentSection = () => {
|
|
142
140
|
resetAttachment(dispatchToAttachmentReducer);
|
|
143
141
|
};
|
|
144
|
-
const onCaseFileUploaded = () => {
|
|
145
|
-
ToastNotification.addSuccessMessage(t('Attachment uploaded successfully'));
|
|
146
|
-
batchSuccessCountRef.current += 1;
|
|
147
|
-
};
|
|
148
|
-
useAttachmentUploadCompletion({
|
|
149
|
-
isUploadingAttachments,
|
|
150
|
-
hasQueuedUploads,
|
|
151
|
-
hasAbortedOrFailed,
|
|
152
|
-
isUploadingAttachmentPrevious,
|
|
153
|
-
batchSuccessCountRef,
|
|
154
|
-
caseDispatch,
|
|
155
|
-
apolloClient,
|
|
156
|
-
caseNumber,
|
|
157
|
-
existingCaseDetails,
|
|
158
|
-
isInternal: loggedInUserRights.data.isInternal(),
|
|
159
|
-
status,
|
|
160
|
-
resetAttachmentSection,
|
|
161
|
-
setCssCommentAgreed,
|
|
162
|
-
onAttachmentBatchAdded: props.onAttachmentAdded,
|
|
163
|
-
});
|
|
164
142
|
const onCancelClick = () => {
|
|
165
|
-
// Cancel only clears comment text; file removal stays on FileLister Remove.
|
|
166
143
|
resetCommentSection();
|
|
144
|
+
resetAttachmentSection();
|
|
167
145
|
cancelFileUpload();
|
|
168
146
|
};
|
|
169
|
-
const
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
const onConfirm = () => {
|
|
180
|
-
setIsModalOpen(false);
|
|
181
|
-
isNotInternalConfirm();
|
|
182
|
-
};
|
|
183
|
-
const onBtnClick = () => {
|
|
184
|
-
setIsModalOpen(true);
|
|
185
|
-
};
|
|
186
|
-
// TODO: Re-enable after GraphQL migration (REST notification)
|
|
187
|
-
// const addUserToNotifyList = async () => {
|
|
188
|
-
// const sso = loggedInUserRights.data.getSSOUsername();
|
|
189
|
-
// const alreadyNotified = (selectedNotificationContacts || []).some((item) => item.ssoUsername === sso);
|
|
190
|
-
// if (sso === contactSSOName || alreadyNotified) return;
|
|
191
|
-
// await addingNotifiedUsers(caseDispatch, caseNumber, [{ ssoUsername: sso }]);
|
|
192
|
-
// setNotifiedUser(caseDispatch, uniqBy([...selectedNotificationContacts, loggedInUser.data], 'ssoUsername'));
|
|
193
|
-
// };
|
|
194
|
-
const plainTextContent = (_g = (_f = (_e = (_d = quillEditorRef.current) === null || _d === void 0 ? void 0 : _d.getText) === null || _e === void 0 ? void 0 : _e.call(_d)) === null || _f === void 0 ? void 0 : _f.trim()) !== null && _g !== void 0 ? _g : '';
|
|
195
|
-
const checkCommentSignature = plainTextContent.replace(commentSignature, '');
|
|
196
|
-
const isCommentEmpty = isEmpty(checkCommentSignature === null || checkCommentSignature === void 0 ? void 0 : checkCommentSignature.trim());
|
|
197
|
-
const onPostComment = () => __awaiter(this, void 0, void 0, function* () {
|
|
198
|
-
var _a, _b;
|
|
199
|
-
if (canEditCase.alert())
|
|
200
|
-
return;
|
|
201
|
-
if (!commentText)
|
|
202
|
-
return;
|
|
203
|
-
if (!caseSalesforceId)
|
|
204
|
-
return;
|
|
205
|
-
let body = commentText;
|
|
206
|
-
if (props.replyingToAuthor) {
|
|
207
|
-
const formattedTimestamp = props.replyingToTimestamp ? formatDateTime(props.replyingToTimestamp) : '';
|
|
208
|
-
const replyPrefix = formattedTimestamp
|
|
209
|
-
? t('(replying to {{commentCreator}}, {{timestamp}}) \n', {
|
|
210
|
-
commentCreator: props.replyingToAuthor,
|
|
211
|
-
timestamp: formattedTimestamp,
|
|
212
|
-
})
|
|
213
|
-
: t('(replying to {{commentCreator}}) \n', {
|
|
214
|
-
commentCreator: props.replyingToAuthor,
|
|
215
|
-
});
|
|
216
|
-
body = `<p>${replyPrefix}</p>${body}`;
|
|
217
|
-
}
|
|
218
|
-
try {
|
|
219
|
-
setIsProcessing(true);
|
|
220
|
-
yield createComment({
|
|
221
|
-
caseId: caseSalesforceId,
|
|
222
|
-
body,
|
|
223
|
-
isPublic,
|
|
224
|
-
isAssociate: loggedInUserRights.data.isInternal(),
|
|
225
|
-
});
|
|
226
|
-
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status, {
|
|
227
|
-
apolloClient,
|
|
228
|
-
caseNumber,
|
|
229
|
-
existingCaseDetails,
|
|
147
|
+
const loggedInUserSSO = loggedInUserRights.data.getSSOUsername();
|
|
148
|
+
// https://github.com/facebook/react/issues/19240
|
|
149
|
+
const debouncedCacheSave = useMemo(() => debounce(function (value, mode, publicFlag) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
const { value: prevDraftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO)) || {};
|
|
152
|
+
if (prevDraftComments[caseNumber]) {
|
|
153
|
+
}
|
|
154
|
+
prevDraftComments[caseNumber] = { text: value, privateFlag: !publicFlag, type: mode };
|
|
155
|
+
CaseDetailsCacheUtils.set(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO, {
|
|
156
|
+
value: prevDraftComments,
|
|
230
157
|
});
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
158
|
+
});
|
|
159
|
+
}, 500), [caseNumber, loggedInUserSSO]);
|
|
160
|
+
const onCommentTextChange = (value, mode) => __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
setCommentType(mode);
|
|
162
|
+
setCommentText(value);
|
|
163
|
+
debouncedCacheSave(value, mode, isPublic);
|
|
164
|
+
});
|
|
165
|
+
const addUserToNotifyList = () => __awaiter(this, void 0, void 0, function* () {
|
|
166
|
+
const loggedInUserSSO = loggedInUserRights.data.getSSOUsername();
|
|
167
|
+
if (loggedInUserSSO !== contactSSOName &&
|
|
168
|
+
!(selectedNotificationContacts || []).map((item) => item.ssoUsername).includes(loggedInUserSSO)) {
|
|
169
|
+
yield addingNotifiedUsers(caseDispatch, caseNumber, [{ ssoUsername: loggedInUserSSO }]);
|
|
170
|
+
setNotifiedUser(caseDispatch, uniqBy([...selectedNotificationContacts, loggedInUser.data], 'ssoUsername'));
|
|
240
171
|
}
|
|
241
|
-
|
|
242
|
-
|
|
172
|
+
});
|
|
173
|
+
useEffect(() => {
|
|
174
|
+
isPublicRef.current = isPublic;
|
|
175
|
+
}, [isPublic]);
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
if (isCommentEmpty) {
|
|
178
|
+
props.onCommentClear && props.onCommentClear();
|
|
243
179
|
}
|
|
244
|
-
|
|
245
|
-
|
|
180
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
181
|
+
}, [commentText]);
|
|
182
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
183
|
+
const onPostComment = () => __awaiter(this, void 0, void 0, function* () {
|
|
184
|
+
if (canEditCase.alert())
|
|
185
|
+
return;
|
|
186
|
+
if (commentText) {
|
|
187
|
+
try {
|
|
188
|
+
setIsProcessing(true);
|
|
189
|
+
const newCommentText = commentText.replace(/(^|\n)(-\s.+)(\n(?![-\s]))/g, '$1$2\n\n');
|
|
190
|
+
yield request({ caseNumber, commentBody: newCommentText, isPublic, contentType: commentType });
|
|
191
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status);
|
|
192
|
+
!isPublic && setIsPublic(true);
|
|
193
|
+
addUserToNotifyList();
|
|
194
|
+
// update state
|
|
195
|
+
yield props.onCommentAdded();
|
|
196
|
+
resetCommentSection();
|
|
197
|
+
ToastNotification.addSuccessMessage(t('Comment submitted'));
|
|
198
|
+
setCssCommentAgreed(false);
|
|
199
|
+
}
|
|
200
|
+
catch (e) {
|
|
201
|
+
caseUpdateError.showError(e, t('Could not submit comment'));
|
|
202
|
+
}
|
|
203
|
+
finally {
|
|
204
|
+
setIsProcessing(false);
|
|
205
|
+
}
|
|
246
206
|
}
|
|
247
207
|
});
|
|
248
208
|
const handleCheckboxToggle = () => {
|
|
249
209
|
setIsPublic((publicComment) => !publicComment);
|
|
250
210
|
};
|
|
251
211
|
function isCommentSignatureMatch() {
|
|
252
|
-
|
|
253
|
-
const plainText = (_d = (_c = (_b = (_a = quillEditorRef.current) === null || _a === void 0 ? void 0 : _a.getText) === null || _b === void 0 ? void 0 : _b.call(_a)) === null || _c === void 0 ? void 0 : _c.trim()) !== null && _d !== void 0 ? _d : commentText.trim();
|
|
254
|
-
return plainText === commentSignature;
|
|
212
|
+
return commentText.trim() === commentSignature;
|
|
255
213
|
}
|
|
256
214
|
const isPostCommentDisabled = isProcessing || !commentText || isCommentSignatureMatch();
|
|
257
|
-
const isFileUploadDisabled =
|
|
215
|
+
const isFileUploadDisabled = isConfirmedStateSideSupport && !cssCommentAgreed;
|
|
258
216
|
const onFileUploadClick = () => {
|
|
259
217
|
ToastNotification.addInfoMessage(t('Uploading Attachment(s)'));
|
|
260
218
|
};
|
|
219
|
+
const getReplyText = (replyText, commentCreator) => {
|
|
220
|
+
const person = t(`(replying to {{commentCreator}}) \n`, { commentCreator });
|
|
221
|
+
const reply = replyText
|
|
222
|
+
.substring(0, 1000)
|
|
223
|
+
.split(/\n/)
|
|
224
|
+
.reduce((acc, line) => (acc += '> ' + line + '\n'), person);
|
|
225
|
+
return reply;
|
|
226
|
+
};
|
|
227
|
+
const addCommentSignature = (preSigComment) => {
|
|
228
|
+
if (!isEmpty(commentSignature)) {
|
|
229
|
+
let signedComment = '';
|
|
230
|
+
// Checks if somment signature already exists and depending on that check, adds the signature
|
|
231
|
+
if (preSigComment.includes(commentSignature)) {
|
|
232
|
+
signedComment = preSigComment;
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
signedComment = preSigComment + '\n' + commentSignature;
|
|
236
|
+
}
|
|
237
|
+
setCommentText(signedComment);
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
useEffect(() => {
|
|
241
|
+
if (!props.commentText || !props.commentCreator) {
|
|
242
|
+
return;
|
|
243
|
+
}
|
|
244
|
+
const reply = getReplyText(props.commentText, props.commentCreator);
|
|
245
|
+
if (reply.includes(commentSignature)) {
|
|
246
|
+
setCommentText(reply);
|
|
247
|
+
}
|
|
248
|
+
else {
|
|
249
|
+
addCommentSignature(reply);
|
|
250
|
+
}
|
|
251
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
252
|
+
}, [props.commentText, props.commentCreator]);
|
|
253
|
+
useEffect(() => {
|
|
254
|
+
if (isUploadingAttachmentPrevious.current && !isUploadingAttachments && !hasSomeUnUploadedFiles) {
|
|
255
|
+
ToastNotification.addSuccessMessage(t('Attachment(s) uploaded successfully'));
|
|
256
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status);
|
|
257
|
+
// update state
|
|
258
|
+
resetAttachmentSection();
|
|
259
|
+
props.onAttachmentAdded();
|
|
260
|
+
setCssCommentAgreed(false);
|
|
261
|
+
}
|
|
262
|
+
isUploadingAttachmentPrevious.current = isUploadingAttachments;
|
|
263
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
264
|
+
}, [isUploadingAttachments]);
|
|
265
|
+
useEffect(() => {
|
|
266
|
+
function getDraftComments() {
|
|
267
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
268
|
+
const { value: draftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserRights.data.getSSOUsername())) || {};
|
|
269
|
+
if (draftComments[caseNumber]) {
|
|
270
|
+
const { text, privateFlag, type } = draftComments[caseNumber];
|
|
271
|
+
if (text.trim()) {
|
|
272
|
+
addCommentSignature(text);
|
|
273
|
+
privateFlag === true && setIsPublic(false);
|
|
274
|
+
setCommentType(type);
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
getDraftComments();
|
|
280
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
281
|
+
}, [commentSignature]);
|
|
261
282
|
const onTextAreaBlur = () => {
|
|
262
|
-
|
|
263
|
-
setIsTextAreaFocused(false);
|
|
283
|
+
!commentText && setIsTextAreaFocused(false);
|
|
264
284
|
};
|
|
265
285
|
const onCommentExceedCharsLimit = (lengthExceededNew) => {
|
|
266
286
|
if (isCommentTooLong !== lengthExceededNew)
|
|
267
287
|
setIsCommentTooLong(lengthExceededNew);
|
|
268
288
|
};
|
|
269
|
-
|
|
270
|
-
|
|
289
|
+
const showCaseIsNotEditableAlert = () => {
|
|
290
|
+
if (canEditCase.alert())
|
|
291
|
+
return;
|
|
292
|
+
};
|
|
293
|
+
const fileUploadButton = (React.createElement(React.Fragment, null, canEditCase.isCaseNotEditable ? (React.createElement(Button, { variant: ButtonVariant.secondary, onClick: showCaseIsNotEditableAlert, isDisabled: isFileUploadDisabled }, t(isPublic || !canPostPrivateComments ? 'Attach files' : 'Attach private files'))) : (React.createElement(FileSelectorButton, { buttonLabel: t(isPublic || !canPostPrivateComments ? 'Attach files' : 'Attach private files'), isSessionId: false, isPrivate: !isPublic, "data-tracking-id": "case-discussion-file-selector-button", isDisabled: isFileUploadDisabled }))));
|
|
294
|
+
const markdownToolbarFileSelectorBtn = (React.createElement(Button, { type: "button", onClick: open, "data-tracking-id": "inline-image-attach-file", isDisabled: isUploadingFile, variant: ButtonVariant.link, icon: React.createElement(PlusIcon, null) }, t(isPublic ? 'Attach files' : 'Attach private files')));
|
|
295
|
+
// This is where we get all attachments to show in dropdown
|
|
296
|
+
const getAllAttachments = () => {
|
|
297
|
+
return (props.allDiscussions || [])
|
|
298
|
+
.filter((item) => item.discussionType === DiscussionType.ATTACHMENT)
|
|
299
|
+
.map((elem) => elem.item);
|
|
300
|
+
};
|
|
301
|
+
const onClipboardPaste = (files) => {
|
|
302
|
+
onFileAttach(files, isPublicRef.current);
|
|
303
|
+
};
|
|
304
|
+
const onCancel = () => {
|
|
305
|
+
setIsModalOpen(false);
|
|
306
|
+
};
|
|
307
|
+
const isNotInternalConfirm = () => {
|
|
308
|
+
onPostComment();
|
|
309
|
+
};
|
|
310
|
+
const onConfirm = (commentText) => {
|
|
311
|
+
setIsModalOpen(false);
|
|
312
|
+
isNotInternalConfirm();
|
|
313
|
+
};
|
|
314
|
+
const onBtnClick = () => {
|
|
315
|
+
setIsModalOpen(true);
|
|
316
|
+
};
|
|
317
|
+
// To check is commment is empty
|
|
318
|
+
const checkCommentSignature = commentText.replace(commentSignature, '');
|
|
319
|
+
const isCommentEmpty = isEmpty(checkCommentSignature === null || checkCommentSignature === void 0 ? void 0 : checkCommentSignature.trim());
|
|
320
|
+
// To check is comment reply is empty and disable if it is
|
|
321
|
+
const isReplyDisabled = () => {
|
|
322
|
+
let parsedPassedReply = getReplyText(passedReply, props.commentCreator);
|
|
323
|
+
return (parsedPassedReply === null || parsedPassedReply === void 0 ? void 0 : parsedPassedReply.trim()) === (commentText === null || commentText === void 0 ? void 0 : commentText.trim());
|
|
324
|
+
};
|
|
325
|
+
const isSubmitDisabled = isReplyDisabled() ||
|
|
326
|
+
isCommentEmpty ||
|
|
271
327
|
isPostCommentDisabled ||
|
|
272
|
-
(isConfirmedStateSideSupport && !cssCommentAgreed)
|
|
273
|
-
canEditCase.isCaseNotEditable;
|
|
328
|
+
(isConfirmedStateSideSupport && !cssCommentAgreed);
|
|
274
329
|
return (React.createElement("div", { className: `pf-v6-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
? 'Add a comment or attach a file privately'
|
|
288
|
-
: 'Add a comment to this case', charLimit: 32000, onImageUpload: onImageUpload, bindEditor: (editor) => {
|
|
289
|
-
quillEditorRef.current = editor;
|
|
330
|
+
React.createElement(MarkdownEditor, { className: `${!isPublic && canPostPrivateComments ? 'is-private' : ''}`, disabled: isProcessing || canEditCase.isCaseNotEditable, "aria-label": "comment text area", showMarkdownPlainTextToggle: true, editorMode: commentType, onFocus: () => setIsTextAreaFocused(true), onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, rows: isTextAreaFocused ? 12 : 4, bindTextArea: textAreaRef, onCommentExceedCharsLimit: onCommentExceedCharsLimit, mdPlaceholder: isPublic || !canPostPrivateComments
|
|
331
|
+
? 'Add a comment using markdown'
|
|
332
|
+
: 'Add a comment or attach a file privately', plainTextPlaceholder: isPublic || !canPostPrivateComments
|
|
333
|
+
? 'Add a comment to this case'
|
|
334
|
+
: 'Add a comment or attach a file privately', fileSelectorProps: {
|
|
335
|
+
showFileSelectorInToolbar: !loggedInUsersAccount.data.secureSupport,
|
|
336
|
+
filesList: getAllAttachments(),
|
|
337
|
+
onFileDelete: onFileDelete,
|
|
338
|
+
isSupportedFile: (extension) => true,
|
|
339
|
+
attachFileBtn: markdownToolbarFileSelectorBtn,
|
|
340
|
+
isUploadingFile: isMarkdownFileUploadInProgress,
|
|
341
|
+
onClipboardPaste,
|
|
290
342
|
} }),
|
|
291
343
|
isConfirmedStateSideSupport && (React.createElement("div", { className: "pf-v6-u-mt-md pf-v6-u-mb-lg" },
|
|
292
344
|
React.createElement("input", { type: "checkbox", id: "css-case-comment-agreement", name: "css-case-comment-agreement", "data-tracking-id": "css-case-comment-agreement", checked: cssCommentAgreed, onChange: (e) => setCssCommentAgreed(e.target.checked) }),
|
|
@@ -297,15 +349,15 @@ export function PostComment(props) {
|
|
|
297
349
|
isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
|
|
298
350
|
React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isSubmitDisabled, className: "postcomment-submit" },
|
|
299
351
|
React.createElement(Trans, null, "Submit")),
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
React.createElement(Trans, null, "Attach files")) }),
|
|
304
|
-
React.createElement(Button, { className: "secondary-button-pill", "data-tracking-id": "postcomment-cancel-button", type: "button", variant: ButtonVariant.link, onClick: onCancelClick, isDisabled: isCommentEmpty || isProcessing },
|
|
352
|
+
canAddAttachments &&
|
|
353
|
+
(isPublic && canPostPrivateComments ? (React.createElement(Tooltip, { content: t('You can attach files privately') }, fileUploadButton)) : (fileUploadButton)),
|
|
354
|
+
React.createElement(Button, { className: "secondary-button-pill", "data-tracking-id": "postcomment-cancel-button", type: "button", variant: ButtonVariant.link, onClick: onCancelClick, isDisabled: isPostCommentDisabled },
|
|
305
355
|
React.createElement(Trans, null, "Cancel")),
|
|
306
356
|
canPostPrivateComments && (React.createElement("span", { className: "post-comment-checkbox" },
|
|
307
357
|
React.createElement(Checkbox, { label: t('Private'), isChecked: !isPublic && canPostPrivateComments, onChange: handleCheckboxToggle, "aria-label": t('Private'), id: "private-comment", name: "private-comment", "data-tracking-id": "private-comment-checkbox" }))))),
|
|
308
|
-
React.createElement(
|
|
309
|
-
|
|
310
|
-
React.createElement(
|
|
358
|
+
React.createElement(FileUpload, { className: `file-upload-section ${hasSomeSelectedFilesLocal ? 'card card-white pf-v6-u-mt-lg pf-v6-u-p-lg' : ''}`, idToUploadTo: caseNumber, onUploadClick: onFileUploadClick, isSessionId: false, isSecureSupport: loggedInUsersAccount.data.secureSupport, isPrivate: !isPublic, autoUploadOnSelect: true, showDescriptionInfoMsg: true }),
|
|
359
|
+
React.createElement("span", Object.assign({}, getRootProps(), { tabIndex: -1 }),
|
|
360
|
+
React.createElement("input", Object.assign({ style: { display: 'none !important' } }, getInputProps()))),
|
|
361
|
+
!loggedInUsersAccount.data.secureSupport && (React.createElement(NewFeaturePopoverAnnouncement, { "aria-label": "Attach and embed images! You'll find all of your uploaded images here.", featureName: FeatureAnnouncementKeys.MARKDOWN_INLINE_IMAGES, sectionRef: componentRef, bodyContent: React.createElement("div", null,
|
|
362
|
+
React.createElement(Trans, null, "Attach and embed images! You'll find all of your uploaded images here.")), triggerRef: () => document.getElementById('md-editor-toolbar-file-selector') }))));
|
|
311
363
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAa3E,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA6IlD"}
|
|
@@ -7,7 +7,6 @@ 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, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
|
|
12
11
|
import { SingleSelectDropdown, ToastNotification } from '@rh-support/components';
|
|
13
12
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
@@ -44,12 +43,11 @@ export function VerifyCaseStatusModal(props) {
|
|
|
44
43
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
45
44
|
}), isEqual);
|
|
46
45
|
const { status } = caseState.caseDetails;
|
|
47
|
-
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
48
|
-
const apolloClient = useApolloClient();
|
|
46
|
+
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
49
47
|
const canManageCase = loggedInUserRights.data.canManageCases();
|
|
50
48
|
useEffect(() => {
|
|
51
|
-
fetchAllStatuses(caseOverviewDispatch,
|
|
52
|
-
}, [caseOverviewDispatch,
|
|
49
|
+
fetchAllStatuses(caseOverviewDispatch, loggedInUsersAccount.data.secureSupport);
|
|
50
|
+
}, [caseOverviewDispatch, loggedInUsersAccount.data.secureSupport]);
|
|
53
51
|
const { isCaseUpdating } = caseState;
|
|
54
52
|
const canEditCase = useCanEditCase();
|
|
55
53
|
const caseDispatch = useCaseDispatch();
|
|
@@ -71,7 +69,7 @@ export function VerifyCaseStatusModal(props) {
|
|
|
71
69
|
}
|
|
72
70
|
catch (e) {
|
|
73
71
|
setStatusUpdating(caseOverviewDispatch, false);
|
|
74
|
-
caseUpdateError.showError(e, t('Status failed to update
|
|
72
|
+
caseUpdateError.showError(e, t('Status failed to update'));
|
|
75
73
|
}
|
|
76
74
|
}
|
|
77
75
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseHistory.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseHistory/CaseHistory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,MAAM,sBAMjC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useCaseSelector } from '../../../../context/CaseContext';
|
|
3
2
|
import Timeline from './Timeline';
|
|
4
3
|
const CaseHistory = (props) => {
|
|
5
|
-
const sfdcCaseId = useCaseSelector((state) => { var _a; return (_a = state.caseDetails) === null || _a === void 0 ? void 0 : _a.id; });
|
|
6
4
|
return (React.createElement("div", { className: "pf-v6-u-p-sm" },
|
|
7
|
-
React.createElement(Timeline, { caseNumber: props.caseNumber
|
|
5
|
+
React.createElement(Timeline, { caseNumber: props.caseNumber })));
|
|
8
6
|
};
|
|
9
7
|
export default CaseHistory;
|