@rh-support/troubleshoot 2.6.354 → 2.6.357
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 +19 -29
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +60 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
- 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 +1 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +76 -45
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
- 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 +1 -3
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +23 -10
- 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 +0 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +132 -57
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
- 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 +18 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
- package/lib/esm/components/CaseInformation/CaseLabels.js +103 -0
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +31 -17
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +21 -13
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +110 -0
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +11 -9
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +22 -3
- 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 +15 -22
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
- 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 +16 -18
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +4 -3
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +3 -9
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +25 -19
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
- 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 +104 -62
- package/lib/esm/components/shared/Constants.d.ts +5 -0
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +5 -0
- 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 +2 -3
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
- 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 +21 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +210 -34
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
- 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 +116 -47
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +22 -57
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +16 -28
- package/lib/esm/components/shared/utils.d.ts +1 -0
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +9 -3
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +5 -0
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/app.css +28 -0
- package/lib/esm/css/case.css +60 -209
- package/lib/esm/graphql/index.d.ts +4 -0
- package/lib/esm/graphql/index.d.ts.map +1 -0
- package/lib/esm/graphql/index.js +3 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
- package/lib/esm/graphql/mutations/index.d.ts +2 -0
- package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/index.js +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
- package/lib/esm/graphql/queries/index.d.ts +2 -0
- package/lib/esm/graphql/queries/index.d.ts.map +1 -0
- package/lib/esm/graphql/queries/index.js +1 -0
- package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
- package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/escalation.js +1 -0
- package/lib/esm/graphql/schemas/index.d.ts +2 -0
- package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/index.js +1 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +45 -23
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/index.js +5 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/types.js +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
- package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
- package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseHistory.js +98 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +21 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +91 -0
- 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 +21 -11
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +18 -11
- package/lib/esm/hooks/useS3Upload.d.ts +5 -4
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +28 -30
- 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 +1 -0
- package/lib/esm/models/cache.d.ts +0 -2
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/models/caseHistory.d.ts +80 -0
- package/lib/esm/models/caseHistory.d.ts.map +1 -0
- package/lib/esm/models/caseHistory.js +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +31 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
- package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +117 -17
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
- package/lib/esm/reducers/CaseReducer.d.ts +56 -11
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +279 -99
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +15 -18
- package/lib/esm/scss/_main.scss +9 -0
- package/lib/esm/utils/TimelineUtils.d.ts +41 -0
- package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
- package/lib/esm/utils/TimelineUtils.js +135 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseHistoryUtils.js +165 -0
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
- package/package.json +9 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
|
@@ -7,341 +7,291 @@ 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
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
11
|
+
import { Button, ButtonVariant, Checkbox } from '@patternfly/react-core';
|
|
12
12
|
import PlusIcon from '@patternfly/react-icons/dist/js/icons/plus-icon';
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
13
|
+
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
14
|
+
import { LoadingIndicator, RichTextEditor, ToastNotification, usePrevious } from '@rh-support/components';
|
|
15
|
+
import { GlobalMetadataStateContext, useCanEditCase, useUserPreferences } from '@rh-support/react-context';
|
|
16
|
+
import { ability, CaseDiscussionFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
17
|
+
import { formatDateTime, getHydraAttachmentImageUrl } from '@rh-support/utils';
|
|
16
18
|
import isEmpty from 'lodash/isEmpty';
|
|
17
19
|
import isEqual from 'lodash/isEqual';
|
|
18
|
-
import
|
|
19
|
-
import React, { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
|
+
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react';
|
|
20
21
|
import { useDropzone } from 'react-dropzone';
|
|
21
22
|
import { Trans, useTranslation } from 'react-i18next';
|
|
22
23
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import { CaseDetailsCacheUtils } from '../../../../utils/caseDetailsCacheUtils';
|
|
28
|
-
import { AttachmentDispatchContext, AttachmentStateContext, hasSomeSelectedFiles, hasSomeUnUploadedAttachments, isUploadingAttachment, resetAttachment, } from '../../../shared/fileUpload';
|
|
24
|
+
import { useCreateCaseComment } from '../../../../hooks/useCaseComments';
|
|
25
|
+
import { useS3Upload } from '../../../../hooks/useS3Upload';
|
|
26
|
+
import { checkForCaseStatusToggleOnAttachOrComment } from '../../../../reducers/CaseReducer';
|
|
27
|
+
import { AttachmentDispatchContext, AttachmentStateContext, hasAbortedOrFailedAttachments, hasQueuedAttachmentUploads, hasSomeSelectedFiles, isUploadingAttachment, resetAttachment, } from '../../../shared/fileUpload';
|
|
29
28
|
import FileSelectorButton from '../../../shared/fileUpload/fileSelectors/FileSelectorButton';
|
|
30
29
|
import FileUpload from '../../../shared/fileUpload/FileUpload';
|
|
31
30
|
import { PDFContext } from '../../PDFContainer';
|
|
31
|
+
import { useAttachmentUploadCompletion } from './PostComment/useAttachmentUploadCompletion';
|
|
32
|
+
import { useCommentDrafts } from './PostComment/useCommentDrafts';
|
|
32
33
|
import { useMarkdownFileUploader } from './PostComment/useMarkdownFileUploader';
|
|
33
34
|
import { VerifyCaseStatusModal } from './VerifyCaseStatusModal/VerifyCaseStatusModal';
|
|
34
35
|
export function PostComment(props) {
|
|
35
|
-
var _a, _b;
|
|
36
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
36
37
|
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);
|
|
41
40
|
const canPostPrivateComments = ability.can(resourceActions.PATCH, resources.CASE_COMMENTS, CaseDiscussionFields.POST_PRIVATE_COMMENT);
|
|
42
|
-
const {
|
|
43
|
-
propgateErrors: true,
|
|
44
|
-
});
|
|
41
|
+
const { createComment, loading: isPostingComment } = useCreateCaseComment();
|
|
45
42
|
const dispatchToAttachmentReducer = useContext(AttachmentDispatchContext);
|
|
46
43
|
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);
|
|
50
44
|
const isUploadingAttachmentPrevious = useRef(false);
|
|
45
|
+
const batchSuccessCountRef = useRef(0);
|
|
51
46
|
const isUploadingAttachments = isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles);
|
|
52
|
-
const
|
|
47
|
+
const hasQueuedUploads = hasQueuedAttachmentUploads(attachmentState.caseFiles.selectedLocalFiles);
|
|
48
|
+
const hasAbortedOrFailed = hasAbortedOrFailedAttachments(attachmentState.caseFiles.selectedLocalFiles);
|
|
53
49
|
const hasSomeSelectedFilesLocal = hasSomeSelectedFiles(attachmentState.caseFiles.selectedLocalFiles);
|
|
54
|
-
const [
|
|
50
|
+
const [isPublic, setIsPublic] = useState((_a = props.defaultIsPublic) !== null && _a !== void 0 ? _a : true);
|
|
55
51
|
const [commentSignature, setCommentSignature] = useState('');
|
|
52
|
+
const [commentText, setCommentText] = useState('');
|
|
56
53
|
const { isExportingPDF } = useContext(PDFContext);
|
|
57
54
|
const { getCommentTypeFromPreference, getCommentSignature } = useUserPreferences();
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
const defaultCommentSignature = retrievedCommentSignature || '';
|
|
66
|
-
setCommentSignature(defaultCommentSignature);
|
|
67
|
-
if (isEmpty(commentText) && !isEmpty(defaultCommentSignature)) {
|
|
68
|
-
setCommentText(`\n ${defaultCommentSignature}` || '');
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
catch (error) {
|
|
72
|
-
console.log(error);
|
|
73
|
-
}
|
|
74
|
-
});
|
|
55
|
+
const applySignature = useCallback((text) => {
|
|
56
|
+
if (isEmpty(commentSignature))
|
|
57
|
+
return;
|
|
58
|
+
const signatureHtml = `<p>${commentSignature}</p>`;
|
|
59
|
+
const signed = text.includes(commentSignature) ? text : text + signatureHtml;
|
|
60
|
+
setCommentText(signed);
|
|
61
|
+
}, [commentSignature]);
|
|
75
62
|
useEffect(() => {
|
|
76
|
-
|
|
63
|
+
function loadPrefs() {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
65
|
+
try {
|
|
66
|
+
yield getCommentTypeFromPreference();
|
|
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
|
+
});
|
|
77
|
+
}
|
|
78
|
+
loadPrefs();
|
|
77
79
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
78
80
|
}, []);
|
|
79
81
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
80
82
|
const [cssCommentAgreed, setCssCommentAgreed] = useState(false);
|
|
81
|
-
const [isProcessing, setIsProcessing] = useState(
|
|
83
|
+
const [isProcessing, setIsProcessing] = useState(false);
|
|
82
84
|
const { globalMetadataState: { loggedInUser, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
83
|
-
const { onFileAttach,
|
|
85
|
+
const { onFileAttach, cancelFileUpload } = useMarkdownFileUploader({
|
|
84
86
|
caseNumber,
|
|
85
|
-
|
|
86
|
-
onAttachmentAdded: props.onAttachmentAdded,
|
|
87
|
+
onAttachmentAdded: (_b = props.onAttachmentAdded) !== null && _b !== void 0 ? _b : (() => undefined),
|
|
87
88
|
});
|
|
88
|
-
const {
|
|
89
|
+
const { getRootProps, getInputProps } = useDropzone({
|
|
90
|
+
onDrop: (files) => onFileAttach(files, isPublic),
|
|
91
|
+
multiple: false,
|
|
92
|
+
noClick: true,
|
|
93
|
+
noKeyboard: true,
|
|
94
|
+
});
|
|
95
|
+
const { status, caseSalesforceId, existingCaseDetails } = useCaseSelector((state) => ({
|
|
89
96
|
status: state.caseDetails.status,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
selectedAccountDetails: state.selectedAccountDetails,
|
|
97
|
+
caseSalesforceId: state.caseDetails.id,
|
|
98
|
+
existingCaseDetails: state.caseDetails,
|
|
93
99
|
}), isEqual);
|
|
94
|
-
const
|
|
95
|
-
|
|
100
|
+
const apolloClient = useApolloClient();
|
|
101
|
+
const { uploadFile: uploadImageFile } = useS3Upload(caseNumber, apolloClient, caseSalesforceId);
|
|
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;
|
|
96
110
|
const caseDispatch = useCaseDispatch();
|
|
97
111
|
const [isCommentTooLong, setIsCommentTooLong] = useState(false);
|
|
98
|
-
const canEditCase = useCanEditCase();
|
|
112
|
+
const canEditCase = useCanEditCase(status);
|
|
113
|
+
const isCaseReadOnly = canEditCase.isCaseNotEditable;
|
|
99
114
|
const componentRef = useRef(null);
|
|
100
|
-
|
|
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
|
+
const resetIsPublic = useCallback(() => { var _a; return setIsPublic((_a = props.defaultIsPublic) !== null && _a !== void 0 ? _a : true); }, [props.defaultIsPublic]);
|
|
107
116
|
const previousDefaultIsPublic = usePrevious(props.defaultIsPublic);
|
|
108
117
|
useEffect(() => {
|
|
118
|
+
var _a;
|
|
109
119
|
if (previousDefaultIsPublic === props.defaultIsPublic)
|
|
110
120
|
return;
|
|
111
|
-
props.defaultIsPublic
|
|
121
|
+
setIsPublic((_a = props.defaultIsPublic) !== null && _a !== void 0 ? _a : true);
|
|
112
122
|
}, [props.defaultIsPublic, resetIsPublic, previousDefaultIsPublic]);
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126
|
-
[commentText]);
|
|
123
|
+
const quillEditorRef = useRef(null);
|
|
124
|
+
const loggedInUserSSO = loggedInUserRights.data.getSSOUsername();
|
|
125
|
+
const { saveDraft, clearDraft } = useCommentDrafts({
|
|
126
|
+
caseNumber,
|
|
127
|
+
loggedInUserSSO,
|
|
128
|
+
isInternal: loggedInUserRights.data.isInternal(),
|
|
129
|
+
commentSignature,
|
|
130
|
+
canPostPrivateComments,
|
|
131
|
+
setCommentText,
|
|
132
|
+
setIsPublic,
|
|
133
|
+
applySignature,
|
|
134
|
+
});
|
|
127
135
|
const resetCommentSection = () => __awaiter(this, void 0, void 0, function* () {
|
|
128
136
|
setCommentText('');
|
|
129
137
|
setIsTextAreaFocused(false);
|
|
130
138
|
resetIsPublic();
|
|
131
|
-
|
|
132
|
-
|
|
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}` || '');
|
|
139
|
+
yield clearDraft();
|
|
140
|
+
setCommentText(commentSignature ? `<p><br></p><p>${commentSignature}</p>` : '');
|
|
138
141
|
});
|
|
139
142
|
const resetAttachmentSection = () => {
|
|
140
143
|
resetAttachment(dispatchToAttachmentReducer);
|
|
141
144
|
};
|
|
145
|
+
const onCaseFileUploaded = () => {
|
|
146
|
+
ToastNotification.addSuccessMessage(t('Attachment uploaded successfully'));
|
|
147
|
+
batchSuccessCountRef.current += 1;
|
|
148
|
+
};
|
|
149
|
+
useAttachmentUploadCompletion({
|
|
150
|
+
isUploadingAttachments,
|
|
151
|
+
hasQueuedUploads,
|
|
152
|
+
hasAbortedOrFailed,
|
|
153
|
+
isUploadingAttachmentPrevious,
|
|
154
|
+
batchSuccessCountRef,
|
|
155
|
+
caseDispatch,
|
|
156
|
+
apolloClient,
|
|
157
|
+
caseNumber,
|
|
158
|
+
existingCaseDetails,
|
|
159
|
+
isInternal: loggedInUserRights.data.isInternal(),
|
|
160
|
+
status,
|
|
161
|
+
resetAttachmentSection,
|
|
162
|
+
setCssCommentAgreed,
|
|
163
|
+
onAttachmentBatchAdded: props.onAttachmentAdded,
|
|
164
|
+
});
|
|
142
165
|
const onCancelClick = () => {
|
|
166
|
+
// Cancel only clears comment text; file removal stays on FileLister Remove.
|
|
143
167
|
resetCommentSection();
|
|
144
|
-
resetAttachmentSection();
|
|
145
168
|
cancelFileUpload();
|
|
146
169
|
};
|
|
147
|
-
const
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const addUserToNotifyList = () =>
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}, [isPublic]);
|
|
176
|
-
useEffect(() => {
|
|
177
|
-
if (isCommentEmpty) {
|
|
178
|
-
props.onCommentClear && props.onCommentClear();
|
|
179
|
-
}
|
|
180
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
181
|
-
}, [commentText]);
|
|
182
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
170
|
+
const onCommentTextChange = (html) => {
|
|
171
|
+
setCommentText(html);
|
|
172
|
+
saveDraft(html, isPublic);
|
|
173
|
+
};
|
|
174
|
+
const onCancel = () => {
|
|
175
|
+
setIsModalOpen(false);
|
|
176
|
+
};
|
|
177
|
+
const isNotInternalConfirm = () => {
|
|
178
|
+
onPostComment();
|
|
179
|
+
};
|
|
180
|
+
const onConfirm = () => {
|
|
181
|
+
setIsModalOpen(false);
|
|
182
|
+
isNotInternalConfirm();
|
|
183
|
+
};
|
|
184
|
+
const onBtnClick = () => {
|
|
185
|
+
setIsModalOpen(true);
|
|
186
|
+
};
|
|
187
|
+
// TODO: Re-enable after GraphQL migration (REST notification)
|
|
188
|
+
// const addUserToNotifyList = async () => {
|
|
189
|
+
// const sso = loggedInUserRights.data.getSSOUsername();
|
|
190
|
+
// const alreadyNotified = (selectedNotificationContacts || []).some((item) => item.ssoUsername === sso);
|
|
191
|
+
// if (sso === contactSSOName || alreadyNotified) return;
|
|
192
|
+
// await addingNotifiedUsers(caseDispatch, caseNumber, [{ ssoUsername: sso }]);
|
|
193
|
+
// setNotifiedUser(caseDispatch, uniqBy([...selectedNotificationContacts, loggedInUser.data], 'ssoUsername'));
|
|
194
|
+
// };
|
|
195
|
+
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 : '';
|
|
196
|
+
const checkCommentSignature = plainTextContent.replace(commentSignature, '');
|
|
197
|
+
const isCommentEmpty = isEmpty(checkCommentSignature === null || checkCommentSignature === void 0 ? void 0 : checkCommentSignature.trim());
|
|
183
198
|
const onPostComment = () => __awaiter(this, void 0, void 0, function* () {
|
|
199
|
+
var _a, _b;
|
|
184
200
|
if (canEditCase.alert())
|
|
185
201
|
return;
|
|
186
|
-
if (commentText)
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
if (!commentText)
|
|
203
|
+
return;
|
|
204
|
+
if (!caseSalesforceId)
|
|
205
|
+
return;
|
|
206
|
+
let body = commentText;
|
|
207
|
+
if (props.replyingToAuthor) {
|
|
208
|
+
const formattedTimestamp = props.replyingToTimestamp ? formatDateTime(props.replyingToTimestamp) : '';
|
|
209
|
+
const replyPrefix = formattedTimestamp
|
|
210
|
+
? t('(replying to {{commentCreator}}, {{timestamp}}) \n', {
|
|
211
|
+
commentCreator: props.replyingToAuthor,
|
|
212
|
+
timestamp: formattedTimestamp,
|
|
213
|
+
})
|
|
214
|
+
: t('(replying to {{commentCreator}}) \n', {
|
|
215
|
+
commentCreator: props.replyingToAuthor,
|
|
216
|
+
});
|
|
217
|
+
body = `<p>${replyPrefix}</p>${body}`;
|
|
218
|
+
}
|
|
219
|
+
try {
|
|
220
|
+
setIsProcessing(true);
|
|
221
|
+
yield createComment({
|
|
222
|
+
caseId: caseSalesforceId,
|
|
223
|
+
body,
|
|
224
|
+
isPublic,
|
|
225
|
+
isAssociate: loggedInUserRights.data.isInternal(),
|
|
226
|
+
});
|
|
227
|
+
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status, {
|
|
228
|
+
apolloClient,
|
|
229
|
+
caseNumber,
|
|
230
|
+
existingCaseDetails,
|
|
231
|
+
});
|
|
232
|
+
if (!isPublic)
|
|
233
|
+
setIsPublic(true);
|
|
234
|
+
// TODO: Re-enable after GraphQL migration (REST notification)
|
|
235
|
+
// addUserToNotifyList();
|
|
236
|
+
yield ((_a = props.onCommentAdded) === null || _a === void 0 ? void 0 : _a.call(props));
|
|
237
|
+
resetCommentSection();
|
|
238
|
+
(_b = props.onClearReply) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
239
|
+
ToastNotification.addSuccessMessage(t('Comment submitted'));
|
|
240
|
+
setCssCommentAgreed(false);
|
|
241
|
+
}
|
|
242
|
+
catch (_c) {
|
|
243
|
+
ToastNotification.addDangerMessage(t('Could not submit comment. Please refresh the page and try again.'));
|
|
244
|
+
}
|
|
245
|
+
finally {
|
|
246
|
+
setIsProcessing(false);
|
|
206
247
|
}
|
|
207
248
|
});
|
|
208
249
|
const handleCheckboxToggle = () => {
|
|
209
250
|
setIsPublic((publicComment) => !publicComment);
|
|
210
251
|
};
|
|
211
252
|
function isCommentSignatureMatch() {
|
|
212
|
-
|
|
253
|
+
var _a, _b, _c, _d;
|
|
254
|
+
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();
|
|
255
|
+
return plainText === commentSignature;
|
|
213
256
|
}
|
|
214
257
|
const isPostCommentDisabled = isProcessing || !commentText || isCommentSignatureMatch();
|
|
215
|
-
const isFileUploadDisabled = isConfirmedStateSideSupport && !cssCommentAgreed;
|
|
258
|
+
const isFileUploadDisabled = (isConfirmedStateSideSupport && !cssCommentAgreed) || isCaseReadOnly;
|
|
216
259
|
const onFileUploadClick = () => {
|
|
217
260
|
ToastNotification.addInfoMessage(t('Uploading Attachment(s)'));
|
|
218
261
|
};
|
|
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]);
|
|
282
262
|
const onTextAreaBlur = () => {
|
|
283
|
-
!commentText
|
|
263
|
+
if (!commentText)
|
|
264
|
+
setIsTextAreaFocused(false);
|
|
284
265
|
};
|
|
285
266
|
const onCommentExceedCharsLimit = (lengthExceededNew) => {
|
|
286
267
|
if (isCommentTooLong !== lengthExceededNew)
|
|
287
268
|
setIsCommentTooLong(lengthExceededNew);
|
|
288
269
|
};
|
|
289
|
-
|
|
290
|
-
|
|
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 ||
|
|
327
|
-
isPostCommentDisabled ||
|
|
328
|
-
(isConfirmedStateSideSupport && !cssCommentAgreed);
|
|
270
|
+
// Submit stays independent of attachment upload so comments can be posted mid-upload (PCM-15915).
|
|
271
|
+
const isSubmitDisabled = isCommentEmpty || isPostCommentDisabled || (isConfirmedStateSideSupport && !cssCommentAgreed) || isCaseReadOnly;
|
|
329
272
|
return (React.createElement("div", { className: `pf-v6-u-mb-md ${isExportingPDF ? 'hide-in-pdf' : ''}`, ref: componentRef },
|
|
330
|
-
React.createElement(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
273
|
+
props.replyingToAuthor && (React.createElement("div", { className: "post-comment-reply-banner pf-v6-u-mb-sm", "data-tracking-id": "reply-banner" },
|
|
274
|
+
React.createElement("span", null,
|
|
275
|
+
React.createElement(Trans, null, "Replying to"),
|
|
276
|
+
" ",
|
|
277
|
+
React.createElement("strong", null, props.replyingToAuthor),
|
|
278
|
+
props.replyingToTimestamp && (React.createElement("span", { className: "pf-v6-u-ml-xs pf-v6-u-color-200" },
|
|
279
|
+
"(",
|
|
280
|
+
formatDateTime(props.replyingToTimestamp),
|
|
281
|
+
")"))),
|
|
282
|
+
React.createElement(Button, { variant: ButtonVariant.plain, "aria-label": t('Cancel reply'), onClick: props.onClearReply, "data-tracking-id": "cancel-reply-button" },
|
|
283
|
+
React.createElement(TimesIcon, null)))),
|
|
284
|
+
React.createElement(RichTextEditor, { key: `${caseNumber}-${isCaseReadOnly}`, className: `${!isPublic && canPostPrivateComments ? 'is-private' : ''}`, disabled: isProcessing || isCaseReadOnly, hideToolbar: isCaseReadOnly, "aria-label": "comment text area", onFocus: () => {
|
|
285
|
+
if (isCaseReadOnly)
|
|
286
|
+
return;
|
|
287
|
+
setIsTextAreaFocused(true);
|
|
288
|
+
}, onBlur: onTextAreaBlur, onChange: onCommentTextChange, value: commentText, height: isTextAreaFocused ? 313 : 120, onCharLimitExceeded: onCommentExceedCharsLimit, placeholder: !isPublic && canPostPrivateComments
|
|
289
|
+
? 'Add a comment or attach a file privately'
|
|
290
|
+
: 'Add a comment to this case', charLimit: 32000, onImageUpload: onImageUpload, bindEditor: (editor) => {
|
|
291
|
+
quillEditorRef.current = editor;
|
|
342
292
|
} }),
|
|
343
293
|
isConfirmedStateSideSupport && (React.createElement("div", { className: "pf-v6-u-mt-md pf-v6-u-mb-lg" },
|
|
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) }),
|
|
294
|
+
React.createElement("input", { type: "checkbox", id: "css-case-comment-agreement", name: "css-case-comment-agreement", "data-tracking-id": "css-case-comment-agreement", checked: cssCommentAgreed, disabled: isCaseReadOnly, onChange: (e) => setCssCommentAgreed(e.target.checked) }),
|
|
345
295
|
React.createElement("label", { htmlFor: "css-case-comment-agreement", className: "pf-v6-u-font-weight-normal pf-v6-u-font-size-sm" },
|
|
346
296
|
React.createElement(Trans, null, "I will not transmit controlled unclassified information to or export it from the Red Hat Customer Portal."),
|
|
347
297
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")))),
|
|
@@ -349,15 +299,15 @@ export function PostComment(props) {
|
|
|
349
299
|
isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
|
|
350
300
|
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" },
|
|
351
301
|
React.createElement(Trans, null, "Submit")),
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
302
|
+
React.createElement(FileSelectorButton, { isSessionId: false, isDisabled: isFileUploadDisabled, buttonLabel: React.createElement(React.Fragment, null,
|
|
303
|
+
React.createElement(PlusIcon, null),
|
|
304
|
+
" ",
|
|
305
|
+
React.createElement(Trans, null, "Attach files")) }),
|
|
306
|
+
React.createElement(Button, { className: "secondary-button-pill", "data-tracking-id": "postcomment-cancel-button", type: "button", variant: ButtonVariant.link, onClick: onCancelClick, isDisabled: isCommentEmpty || isProcessing || isCaseReadOnly },
|
|
355
307
|
React.createElement(Trans, null, "Cancel")),
|
|
356
308
|
canPostPrivateComments && (React.createElement("span", { className: "post-comment-checkbox" },
|
|
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" }))))),
|
|
358
|
-
React.createElement(
|
|
359
|
-
|
|
360
|
-
React.createElement(
|
|
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') }))));
|
|
309
|
+
React.createElement(Checkbox, { label: t('Private'), isChecked: !isPublic && canPostPrivateComments, isDisabled: isCaseReadOnly, onChange: handleCheckboxToggle, "aria-label": t('Private'), id: "private-comment", name: "private-comment", "data-tracking-id": "private-comment-checkbox" }))))),
|
|
310
|
+
React.createElement("div", Object.assign({}, getRootProps(), { className: "post-comment-dropzone" }),
|
|
311
|
+
React.createElement("input", Object.assign({}, getInputProps())),
|
|
312
|
+
React.createElement(FileUpload, { className: `file-upload-section ${hasSomeSelectedFilesLocal ? 'card card-white pf-v6-u-mt-lg pf-v6-u-p-lg' : ''}`, idToUploadTo: caseNumber, caseSalesforceId: caseSalesforceId, onUploadClick: onFileUploadClick, onCaseFileUploaded: onCaseFileUploaded, isSessionId: false, needsAnalyzing: false, autoUploadOnSelect: loggedInUsersAccount.data.secureSupport ? false : true, isPrivate: !isPublic, showDescriptionInfoMsg: true }))));
|
|
363
313
|
}
|
|
@@ -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":"AAaA,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,qBAiJlD"}
|
|
@@ -7,6 +7,7 @@ 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';
|
|
10
11
|
import { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
|
|
11
12
|
import { SingleSelectDropdown, ToastNotification } from '@rh-support/components';
|
|
12
13
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
@@ -43,11 +44,12 @@ export function VerifyCaseStatusModal(props) {
|
|
|
43
44
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
44
45
|
}), isEqual);
|
|
45
46
|
const { status } = caseState.caseDetails;
|
|
46
|
-
const { globalMetadataState: {
|
|
47
|
+
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
48
|
+
const apolloClient = useApolloClient();
|
|
47
49
|
const canManageCase = loggedInUserRights.data.canManageCases();
|
|
48
50
|
useEffect(() => {
|
|
49
|
-
fetchAllStatuses(caseOverviewDispatch,
|
|
50
|
-
}, [caseOverviewDispatch,
|
|
51
|
+
fetchAllStatuses(caseOverviewDispatch, apolloClient);
|
|
52
|
+
}, [caseOverviewDispatch, apolloClient]);
|
|
51
53
|
const { isCaseUpdating } = caseState;
|
|
52
54
|
const canEditCase = useCanEditCase();
|
|
53
55
|
const caseDispatch = useCaseDispatch();
|
|
@@ -69,7 +71,7 @@ export function VerifyCaseStatusModal(props) {
|
|
|
69
71
|
}
|
|
70
72
|
catch (e) {
|
|
71
73
|
setStatusUpdating(caseOverviewDispatch, false);
|
|
72
|
-
caseUpdateError.showError(e, t('Status failed to update'));
|
|
74
|
+
caseUpdateError.showError(e, t('Status failed to update, try refreshing the page. Please contact us if the problem persists.'));
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
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;AAK1B,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,QAAA,MAAM,WAAW,GAAI,OAAO,MAAM,sBAQjC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|