@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,11 +7,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { contacts } from '@cee-eng/hydrajs';
|
|
11
11
|
import { ValidatedOptions } from '@patternfly/react-core';
|
|
12
12
|
import { getPhoneObj, PhoneInput } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
14
|
-
import { GET_ACCOUNT_CONTACTS } from '@rh-support/utils';
|
|
15
14
|
import isEmpty from 'lodash/isEmpty';
|
|
16
15
|
import isEqual from 'lodash/isEqual';
|
|
17
16
|
import isUndefined from 'lodash/isUndefined';
|
|
@@ -25,33 +24,13 @@ import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
|
|
|
25
24
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
26
25
|
import { removeAllChars, trimAndReplacePlus } from '../shared/utils';
|
|
27
26
|
import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
|
|
28
|
-
function fetchContactBySSO(apolloClient, accountNumber, ssoUsername) {
|
|
29
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
30
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
31
|
-
const { data } = yield apolloClient.query({
|
|
32
|
-
query: GET_ACCOUNT_CONTACTS,
|
|
33
|
-
variables: {
|
|
34
|
-
accountNumber: { eq: accountNumber },
|
|
35
|
-
contactsWhere: { SSOUserName__c: { eq: ssoUsername } },
|
|
36
|
-
first: 1,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
const response = data;
|
|
40
|
-
const contactNode = (_j = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Contacts) === null || _g === void 0 ? void 0 : _g.edges) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.node;
|
|
41
|
-
return {
|
|
42
|
-
phone: (_l = (_k = contactNode === null || contactNode === void 0 ? void 0 : contactNode.Phone) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : '',
|
|
43
|
-
};
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
27
|
export function ContactPhoneNumber() {
|
|
47
|
-
const
|
|
48
|
-
const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', hasLoggedInUserConfirmedPhoneNumber, contactSSOName, accountNumberRef, shouldNotSetPhoneCountryCode, isCasePhoneUpdating, } = useCaseSelector((state) => ({
|
|
28
|
+
const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', hasLoggedInUserConfirmedPhoneNumber, contactSSOName, shouldNotSetPhoneCountryCode, isCasePhoneUpdating, } = useCaseSelector((state) => ({
|
|
49
29
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
50
30
|
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
51
31
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
52
32
|
hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
|
|
53
33
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
54
|
-
accountNumberRef: state.caseDetails.accountNumberRef,
|
|
55
34
|
shouldNotSetPhoneCountryCode: state.shouldNotSetPhoneCountryCode,
|
|
56
35
|
isCasePhoneUpdating: state.isCasePhoneUpdating,
|
|
57
36
|
}), isEqual);
|
|
@@ -78,7 +57,6 @@ export function ContactPhoneNumber() {
|
|
|
78
57
|
};
|
|
79
58
|
const onPhoneChange = (fullPhone) => {
|
|
80
59
|
setLocalFullPhone(checkingPlusInLocalFullPhone(fullPhone));
|
|
81
|
-
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: true });
|
|
82
60
|
if (!shouldNotSetPhoneCountryCode) {
|
|
83
61
|
setCaseDetails(caseDispatch, {
|
|
84
62
|
phoneAreaCodePrefixLineNumber: getPhoneObj(fullPhone).phoneLine,
|
|
@@ -90,17 +68,12 @@ export function ContactPhoneNumber() {
|
|
|
90
68
|
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: false });
|
|
91
69
|
}
|
|
92
70
|
setCaseDetails(caseDispatch, {
|
|
93
|
-
// TODO: Temporary — do not prepend + for portal phone without country code.
|
|
94
|
-
phoneAreaCodePrefixLineNumber: fullPhone.trim().replace(/^\+/, ''),
|
|
95
|
-
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
96
71
|
phoneAreaCodePrefixLineNumber: checkingPlusInLocalFullPhone(fullPhone),
|
|
97
|
-
*/
|
|
98
72
|
phoneCountryCode: '',
|
|
99
73
|
});
|
|
100
74
|
}
|
|
101
75
|
};
|
|
102
76
|
const onCountryCodeChange = (phoneCountryCode) => {
|
|
103
|
-
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: true });
|
|
104
77
|
setCaseDetails(caseDispatch, { phoneCountryCode });
|
|
105
78
|
};
|
|
106
79
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
@@ -141,7 +114,6 @@ export function ContactPhoneNumber() {
|
|
|
141
114
|
setLocalFullPhone('');
|
|
142
115
|
setCaseState(caseDispatch, { isCasePhoneUpdating: true });
|
|
143
116
|
const initContactPhoneNumber = () => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
var _a, _b;
|
|
145
117
|
let _phoneAreaCodePrefixLineNumber;
|
|
146
118
|
let _phoneCountryCode;
|
|
147
119
|
let _suppliedPhoneNumberVerified;
|
|
@@ -159,41 +131,20 @@ export function ContactPhoneNumber() {
|
|
|
159
131
|
}
|
|
160
132
|
else {
|
|
161
133
|
// User is openning a case for the first time
|
|
162
|
-
|
|
163
|
-
const phoneLength = trimAndReplacePlus(removeAllChars(loggedInUser.data.phone!)).length;
|
|
164
|
-
|
|
134
|
+
const phoneLength = trimAndReplacePlus(removeAllChars(loggedInUser.data.phone)).length;
|
|
165
135
|
// For first time user whose phone is fetched from portal without country code
|
|
166
136
|
// For phone length less or equal to 10 country code shouldn't be fetched to avoid faulty phone population
|
|
167
137
|
if (phoneLength > 10) {
|
|
168
|
-
const phoneLine = getPhoneObj(loggedInUser.data.phone
|
|
169
|
-
const countryCode = getPhoneObj(loggedInUser.data.phone
|
|
170
|
-
|
|
138
|
+
const phoneLine = getPhoneObj(loggedInUser.data.phone).phoneLine || '';
|
|
139
|
+
const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode;
|
|
171
140
|
_phoneAreaCodePrefixLineNumber = phoneLine;
|
|
172
141
|
_phoneCountryCode = countryCode;
|
|
173
|
-
} else {
|
|
174
|
-
setCaseState(caseDispatch, {
|
|
175
|
-
shouldNotSetPhoneCountryCode: true,
|
|
176
|
-
});
|
|
177
|
-
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone!;
|
|
178
|
-
_phoneCountryCode = '';
|
|
179
|
-
setPortalPhone(loggedInUser.data.phone!);
|
|
180
|
-
}
|
|
181
|
-
*/
|
|
182
|
-
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format
|
|
183
|
-
const explicitPhoneMatch = (_a = loggedInUser.data.phone) === null || _a === void 0 ? void 0 : _a.trim().match(/^\+(\d+)-(.+)$/);
|
|
184
|
-
if (explicitPhoneMatch) {
|
|
185
|
-
_phoneCountryCode = `+${explicitPhoneMatch[1]}`;
|
|
186
|
-
_phoneAreaCodePrefixLineNumber = explicitPhoneMatch[2];
|
|
187
142
|
}
|
|
188
143
|
else {
|
|
189
144
|
setCaseState(caseDispatch, {
|
|
190
145
|
shouldNotSetPhoneCountryCode: true,
|
|
191
146
|
});
|
|
192
|
-
|
|
193
|
-
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone.replace(/^\+/, '');
|
|
194
|
-
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
195
|
-
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone!;
|
|
196
|
-
*/
|
|
147
|
+
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone;
|
|
197
148
|
_phoneCountryCode = '';
|
|
198
149
|
setPortalPhone(loggedInUser.data.phone);
|
|
199
150
|
}
|
|
@@ -205,43 +156,32 @@ export function ContactPhoneNumber() {
|
|
|
205
156
|
}
|
|
206
157
|
}
|
|
207
158
|
else {
|
|
208
|
-
// user is
|
|
159
|
+
// user is openning case for others (use is partner or red hatter)
|
|
209
160
|
try {
|
|
210
161
|
if (!contactSSOName)
|
|
211
162
|
return;
|
|
212
163
|
setIsFetchingSso(true);
|
|
213
|
-
const selectedContact = yield
|
|
164
|
+
const selectedContact = yield contacts.getSFDCContactBySso(contactSSOName);
|
|
214
165
|
setIsFetchingSso(false);
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
220
|
-
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
221
|
-
} else {
|
|
222
|
-
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
223
|
-
_phoneCountryCode = '';
|
|
224
|
-
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
225
|
-
setPortalPhone(selectedContact.phone);
|
|
226
|
-
}
|
|
227
|
-
*/
|
|
228
|
-
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format (e.g. +93-895674341).
|
|
229
|
-
const explicitPhoneMatch = (_b = selectedContact.phone) === null || _b === void 0 ? void 0 : _b.trim().match(/^\+(\d+)-(.+)$/);
|
|
230
|
-
if (explicitPhoneMatch) {
|
|
231
|
-
_phoneCountryCode = `+${explicitPhoneMatch[1]}`;
|
|
232
|
-
_phoneAreaCodePrefixLineNumber = explicitPhoneMatch[2];
|
|
166
|
+
if (selectedContact.supportPhoneAreaCodePrefixLineNumber) {
|
|
167
|
+
_phoneAreaCodePrefixLineNumber = selectedContact.supportPhoneAreaCodePrefixLineNumber;
|
|
168
|
+
_phoneCountryCode = selectedContact.supportPhoneCountryCode;
|
|
169
|
+
_suppliedPhoneNumberVerified = 'Deferred';
|
|
233
170
|
}
|
|
234
171
|
else {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
172
|
+
const phoneLength = trimAndReplacePlus(removeAllChars(selectedContact.phone)).length;
|
|
173
|
+
if (phoneLength > 10) {
|
|
174
|
+
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
175
|
+
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
179
|
+
_phoneCountryCode = '';
|
|
180
|
+
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
181
|
+
setPortalPhone(selectedContact.phone);
|
|
182
|
+
}
|
|
183
|
+
_suppliedPhoneNumberVerified = 'Deferred';
|
|
243
184
|
}
|
|
244
|
-
_suppliedPhoneNumberVerified = 'Deferred';
|
|
245
185
|
}
|
|
246
186
|
catch (e) {
|
|
247
187
|
_phoneAreaCodePrefixLineNumber = '';
|
|
@@ -256,19 +196,9 @@ export function ContactPhoneNumber() {
|
|
|
256
196
|
phoneCountryCode: _phoneCountryCode,
|
|
257
197
|
suppliedPhoneNumberVerified: _suppliedPhoneNumberVerified,
|
|
258
198
|
});
|
|
259
|
-
// TODO: Temporary — do not prepend + when country code is not set.
|
|
260
|
-
const _localFullPhone = isEmpty(_phoneCountryCode)
|
|
261
|
-
? (_phoneAreaCodePrefixLineNumber === null || _phoneAreaCodePrefixLineNumber === void 0 ? void 0 : _phoneAreaCodePrefixLineNumber.trim()) || ''
|
|
262
|
-
: checkingPlusInLocalFullPhone(`${_phoneCountryCode} ${_phoneAreaCodePrefixLineNumber}`);
|
|
263
|
-
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
264
199
|
let _localFullPhone = _phoneCountryCode + ' ' + _phoneAreaCodePrefixLineNumber;
|
|
265
200
|
setLocalFullPhone(checkingPlusInLocalFullPhone(_localFullPhone));
|
|
266
|
-
|
|
267
|
-
setLocalFullPhone(_localFullPhone);
|
|
268
|
-
setCaseState(caseDispatch, {
|
|
269
|
-
isCasePhoneUpdating: false,
|
|
270
|
-
hasUserUpdatedSuppliedPhone: false,
|
|
271
|
-
});
|
|
201
|
+
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
272
202
|
});
|
|
273
203
|
// if phone not initialized with portal and user contact value, initialize it else populate phone inputbox
|
|
274
204
|
if (isEmpty(phoneAreaCodePrefixLineNumber) && isEmpty(phoneCountryCode)) {
|
|
@@ -283,11 +213,12 @@ export function ContactPhoneNumber() {
|
|
|
283
213
|
try {
|
|
284
214
|
if (!contactSSOName)
|
|
285
215
|
return;
|
|
286
|
-
const selectedContact = yield
|
|
287
|
-
if (
|
|
216
|
+
const selectedContact = yield contacts.getSFDCContactBySso(contactSSOName);
|
|
217
|
+
if (isEmpty(selectedContact.supportPhoneAreaCodePrefixLineNumber) &&
|
|
218
|
+
!isEmpty(selectedContact.phone)) {
|
|
288
219
|
portalPhone = selectedContact.phone;
|
|
289
220
|
phoneLength = trimAndReplacePlus(removeAllChars(portalPhone)).length;
|
|
290
|
-
supportPhone =
|
|
221
|
+
supportPhone = selectedContact.supportPhoneAreaCodePrefixLineNumber;
|
|
291
222
|
}
|
|
292
223
|
}
|
|
293
224
|
catch (e) {
|
|
@@ -321,15 +252,7 @@ export function ContactPhoneNumber() {
|
|
|
321
252
|
phoneLength <= 10) {
|
|
322
253
|
setPortalPhone(portalPhone);
|
|
323
254
|
}
|
|
324
|
-
|
|
325
|
-
setLocalFullPhone(isEmpty(phoneCountryCode)
|
|
326
|
-
? (phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.trim()) || ''
|
|
327
|
-
: checkingPlusInLocalFullPhone((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim()));
|
|
328
|
-
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
329
|
-
setLocalFullPhone(
|
|
330
|
-
checkingPlusInLocalFullPhone((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim())
|
|
331
|
-
);
|
|
332
|
-
*/
|
|
255
|
+
setLocalFullPhone(checkingPlusInLocalFullPhone((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim()));
|
|
333
256
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
334
257
|
}
|
|
335
258
|
});
|
|
@@ -30,7 +30,7 @@ export default function Description(props) {
|
|
|
30
30
|
const caseDispatch = useCaseDispatch();
|
|
31
31
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
32
32
|
const breakPoint = useBreakpoint();
|
|
33
|
-
const isLgScreenHeight = breakPoint.lgh;
|
|
33
|
+
const isLgScreenHeight = breakPoint.lgh; // min-height: 1100px
|
|
34
34
|
const [isOpen, setIsOpen] = useState(false);
|
|
35
35
|
const [hasShownPopover, setHasShownPopover] = useState(false);
|
|
36
36
|
const textAreaRef = useRef(null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
2
|
+
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
3
3
|
import { PreviousCaseTypes } from '@rh-support/utils';
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
5
5
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -10,10 +10,8 @@ import FileEARule, { getValidAttachmentRules } from '../ImproveCase/FileEARule';
|
|
|
10
10
|
import { WidgetFileUploader } from '../shared/fileUpload/WidgetFileUploader';
|
|
11
11
|
export function FileDiag(props) {
|
|
12
12
|
const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
// globalMetadataState: { loggedInUsersAccount },
|
|
16
|
-
// } = useContext(GlobalMetadataStateContext);
|
|
13
|
+
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
14
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
17
15
|
const { rulesState } = useContext(RulesStateContext);
|
|
18
16
|
const { caseType } = useCaseSelector((state) => ({
|
|
19
17
|
caseType: state.caseDetails.caseType,
|
|
@@ -22,8 +20,7 @@ export function FileDiag(props) {
|
|
|
22
20
|
useEffect(() => {
|
|
23
21
|
setIsIdea(caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT);
|
|
24
22
|
}, [caseType]);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
autoUploadOnSelect: true, helperText: getValidAttachmentRules(rulesState.EARules.rules).length > 0 ? React.createElement(FileEARule, null) : null, isIdea: isIdea }));
|
|
23
|
+
if (!canAddAttachments)
|
|
24
|
+
return null;
|
|
25
|
+
return (React.createElement(WidgetFileUploader, { className: props.className, idToUploadTo: activeSessionId, isPrivate: false, needsAnalyzing: isIdea ? false : true, isSessionId: true, isSecureSupport: loggedInUsersAccount.data.secureSupport, autoUploadOnSelect: loggedInUsersAccount.data.secureSupport ? false : true, helperText: getValidAttachmentRules(rulesState.EARules.rules).length > 0 ? React.createElement(FileEARule, null) : null, isIdea: isIdea }));
|
|
29
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,qBA+OzB;kBA/OQ,GAAG;;;AAkPZ,eAAe,GAAG,CAAC"}
|
|
@@ -150,8 +150,7 @@ function Fts(props) {
|
|
|
150
150
|
}
|
|
151
151
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
152
152
|
}, [phoneAreaCodePrefixLineNumber, phoneCountryCode]);
|
|
153
|
-
const disableFtsNContact = !isEmpty(caseNumber) &&
|
|
154
|
-
(!isFtsEditableOnEditPage(entitlementSla, severity) || isFtsUpdating || canEditCase.isCaseNotEditable);
|
|
153
|
+
const disableFtsNContact = !isEmpty(caseNumber) && (!isFtsEditableOnEditPage(entitlementSla, severity) || isFtsUpdating);
|
|
155
154
|
const maxLengthErrorMessage = t('Contact information cannot be more than {{limit}} characters.', {
|
|
156
155
|
limit: CONTACT_INFO_24X7_LIMIT,
|
|
157
156
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBAoJlC;kBApJQ,YAAY;;;AAsJrB,eAAe,YAAY,CAAC"}
|
|
@@ -1,86 +1,105 @@
|
|
|
1
1
|
import { Popover, PopoverPosition } from '@patternfly/react-core';
|
|
2
2
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
|
|
3
3
|
import { SingleSelectDropdown } from '@rh-support/components';
|
|
4
|
+
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
4
5
|
import { PreviousCaseTypes, showFtsOnCaseViewEditPage, showFtsOnCreateCasePage } from '@rh-support/utils';
|
|
5
6
|
import isEmpty from 'lodash/isEmpty';
|
|
6
7
|
import isEqual from 'lodash/isEqual';
|
|
7
|
-
import React, { useEffect, useState } from 'react';
|
|
8
|
+
import React, { useContext, useEffect, useState } from 'react';
|
|
8
9
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
10
|
-
import { setCaseDetails
|
|
11
|
+
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
11
12
|
const defaultProps = {
|
|
12
13
|
id: '',
|
|
13
14
|
className: '',
|
|
14
15
|
};
|
|
15
16
|
function SupportLevel(props) {
|
|
16
|
-
const { caseNumber, severity, entitlementSla,
|
|
17
|
+
const { product, caseNumber, severity, entitlementSla, ownersEntitlements, caseType, openShiftClusterSupportLevel, } = useCaseSelector((state) => ({
|
|
18
|
+
product: state.caseDetails.product,
|
|
17
19
|
caseNumber: state.caseDetails.caseNumber,
|
|
18
20
|
severity: state.caseDetails.severity,
|
|
19
21
|
entitlementSla: state.caseDetails.entitlementSla,
|
|
22
|
+
ownersEntitlements: state.ownersEntitlements,
|
|
20
23
|
caseType: state.caseDetails.caseType,
|
|
21
|
-
|
|
22
|
-
otherServiceLevels: state.otherServiceLevels,
|
|
23
|
-
selectedEntitlementId: state.selectedEntitlementId,
|
|
24
|
+
openShiftClusterSupportLevel: state.openShiftClusterSupportLevel,
|
|
24
25
|
}), isEqual);
|
|
25
26
|
const caseDispatch = useCaseDispatch();
|
|
27
|
+
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
26
28
|
const { t } = useTranslation();
|
|
27
29
|
const [isSupportLevelInValid, setIsSupportLevelInValid] = useState(false);
|
|
28
30
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
29
|
-
const allSlaOptions = [...(productServiceLevel ? [productServiceLevel] : []), ...(otherServiceLevels !== null && otherServiceLevels !== void 0 ? otherServiceLevels : [])].sort((a, b) => b.priority - a.priority);
|
|
30
|
-
const hasMultipleSlas = allSlaOptions.length > 1;
|
|
31
31
|
const onCaseDetailsChange = (caseDetails) => {
|
|
32
32
|
setCaseDetails(caseDispatch, caseDetails);
|
|
33
33
|
};
|
|
34
34
|
const onEntitlementChange = (selectedOption) => {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const slaLabel = (matchedSla === null || matchedSla === void 0 ? void 0 : matchedSla.serviceLevelLabel) || '';
|
|
38
|
-
const casePayload = { entitlementSla: slaLabel };
|
|
35
|
+
const selected = selectedOption.value;
|
|
36
|
+
const casePayload = { entitlementSla: selected };
|
|
39
37
|
casePayload.fts = caseNumber
|
|
40
|
-
? showFtsOnCaseViewEditPage(
|
|
41
|
-
: showFtsOnCreateCasePage(
|
|
38
|
+
? showFtsOnCaseViewEditPage(selected, severity)
|
|
39
|
+
: showFtsOnCreateCasePage(selected, severity);
|
|
42
40
|
casePayload.fts = casePayload.fts && !isIdea;
|
|
43
|
-
setIsSupportLevelInValid(isEmpty(
|
|
41
|
+
setIsSupportLevelInValid(isEmpty(selected));
|
|
44
42
|
onCaseDetailsChange(casePayload);
|
|
45
|
-
setCaseState(caseDispatch, { selectedEntitlementId: entitlementId });
|
|
46
43
|
};
|
|
47
|
-
const
|
|
48
|
-
|
|
44
|
+
const getSlaList = () => {
|
|
45
|
+
var _a, _b;
|
|
46
|
+
if (openShiftClusterSupportLevel)
|
|
47
|
+
return [openShiftClusterSupportLevel];
|
|
48
|
+
const entitledProduct = ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) !== null && _b !== void 0 ? _b : []).find((entitledProduct) => entitledProduct.product === product);
|
|
49
|
+
if (entitledProduct && entitledProduct.serviceLevels) {
|
|
50
|
+
return entitledProduct.serviceLevels.split(';') || [];
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return ownersEntitlements.data ? ownersEntitlements.data.map((sla) => sla.slaProcessId) : [];
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
const getSelectedSla = () => {
|
|
57
|
+
var _a, _b;
|
|
58
|
+
if (openShiftClusterSupportLevel)
|
|
59
|
+
return openShiftClusterSupportLevel;
|
|
60
|
+
const entitledProduct = ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) !== null && _b !== void 0 ? _b : []).find((entitledProduct) => entitledProduct.product === product);
|
|
61
|
+
// if sla is empty then it means either first time this component is rendered or product has changed.
|
|
62
|
+
if (isEmpty(entitlementSla) && entitledProduct && entitledProduct.preferredServiceLevel) {
|
|
63
|
+
return entitledProduct.preferredServiceLevel;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
return isEmpty(entitlementSla) && !isEmpty(ownersEntitlements.data)
|
|
67
|
+
? ownersEntitlements.data[0].slaProcessId
|
|
68
|
+
: entitlementSla;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const selectedSla = getSelectedSla();
|
|
49
72
|
useEffect(() => {
|
|
50
|
-
if (!
|
|
73
|
+
if (!selectedSla || entitlementSla)
|
|
51
74
|
return;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
.filter((id) => !!id));
|
|
55
|
-
const hasValidSelection = !!selectedEntitlementId && validEntitlementIds.has(selectedEntitlementId);
|
|
56
|
-
if (!hasValidSelection) {
|
|
57
|
-
onCaseDetailsChange({ entitlementSla: productServiceLevel.serviceLevelLabel });
|
|
58
|
-
setCaseState(caseDispatch, { selectedEntitlementId: productServiceLevel.entitlementId });
|
|
75
|
+
if (entitlementSla !== selectedSla) {
|
|
76
|
+
onCaseDetailsChange({ entitlementSla: selectedSla });
|
|
59
77
|
}
|
|
60
78
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
61
|
-
}, [
|
|
79
|
+
}, [selectedSla, entitlementSla]);
|
|
80
|
+
// Create selected option for SingleSelectDropdown
|
|
62
81
|
const getSelectedOption = () => ({
|
|
63
|
-
label: selectedSla,
|
|
64
|
-
value:
|
|
82
|
+
label: selectedSla || '',
|
|
83
|
+
value: selectedSla || '',
|
|
65
84
|
});
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
85
|
+
// Create options array for SingleSelectDropdown
|
|
86
|
+
const getDropdownOptions = () => getSlaList().map((sla) => ({
|
|
87
|
+
label: sla,
|
|
88
|
+
value: sla,
|
|
69
89
|
}));
|
|
70
|
-
if (!hasMultipleSlas)
|
|
71
|
-
return null;
|
|
72
90
|
return (React.createElement("div", { className: `form-group ${props.className}`, id: `${props.id}` },
|
|
73
91
|
React.createElement("label", { htmlFor: "get-support-supportLevel" },
|
|
74
92
|
React.createElement(Trans, null, "Support level"),
|
|
75
93
|
' ',
|
|
76
|
-
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
94
|
+
!isEmpty(ownersEntitlements.data) && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
77
95
|
React.createElement(Popover, { "aria-label": "Support Level info", position: PopoverPosition.top, bodyContent: React.createElement("p", null,
|
|
78
96
|
React.createElement(Trans, { i18nKey: "i18ProductionSupportServiceLevelAgreement" },
|
|
79
97
|
"Learn more about our",
|
|
80
98
|
' ',
|
|
81
99
|
React.createElement("a", { href: "/support/offerings/production/sla", target: "_blank" }, "production support service level agreement"))), closeBtnAriaLabel: "Close" },
|
|
82
100
|
React.createElement(QuestionCircleIcon, { color: "#5e40be", className: "pf-v6-u-ml-xs icon-size cursor-pointer", "aria-label": "Support Level Info" })),
|
|
83
|
-
React.createElement(SingleSelectDropdown, { ariaLabel: t('Select Support Level'), onSelect: onEntitlementChange, selected: getSelectedOption(), options: getDropdownOptions(), isInvalid: isSupportLevelInValid, dataTrackingId: "get-support-supportLevel", placeholder: t('Select Support Level') })
|
|
101
|
+
React.createElement(SingleSelectDropdown, { ariaLabel: t('Select Support Level'), onSelect: onEntitlementChange, selected: getSelectedOption(), options: getDropdownOptions(), isDisabled: ownersEntitlements.isError || isEmpty(ownersEntitlements.data), isInvalid: isSupportLevelInValid, dataTrackingId: "get-support-supportLevel", placeholder: t('Select Support Level') }),
|
|
102
|
+
isEmpty(ownersEntitlements.data) && (React.createElement("p", { className: "form-instructions" }, ownersEntitlements.isError ? t('Error loading support levels') : t('No active subscriptions')))));
|
|
84
103
|
}
|
|
85
104
|
SupportLevel.defaultProps = defaultProps;
|
|
86
105
|
export default SupportLevel;
|
|
@@ -53,11 +53,11 @@ export default function CaseLanguageSelector(props) {
|
|
|
53
53
|
props.isManageStep,
|
|
54
54
|
]);
|
|
55
55
|
const getLanguageDropdownOptions = map(caseLanguages.data, (language) => ({
|
|
56
|
-
label: Constants.languagesMap[language]
|
|
56
|
+
label: Constants.languagesMap[language],
|
|
57
57
|
value: language,
|
|
58
58
|
}));
|
|
59
59
|
const getSelectedLanguageOption = {
|
|
60
|
-
label: caseLanguage ? Constants.languagesMap[caseLanguage]
|
|
60
|
+
label: caseLanguage ? Constants.languagesMap[caseLanguage] : '',
|
|
61
61
|
value: caseLanguage || '',
|
|
62
62
|
};
|
|
63
63
|
return (React.createElement("div", { className: "form-group" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAiCnD"}
|
|
@@ -4,16 +4,15 @@ import { useCaseDispatch } from '../../context/CaseContext';
|
|
|
4
4
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
5
5
|
import CaseGroup from '../CaseInformation/CaseGroup';
|
|
6
6
|
import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
|
|
7
|
-
|
|
8
|
-
// import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
|
|
7
|
+
import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
|
|
9
8
|
import Fts from '../CaseInformation/Fts';
|
|
10
9
|
import Severity from '../CaseInformation/Severity';
|
|
11
10
|
import SupportLevel from '../CaseInformation/SupportLevel';
|
|
12
|
-
import CaseLabelsCreate from './CaseLabelsCreate';
|
|
13
11
|
import CaseLanguageSelector from './CaseLanguageSelector';
|
|
14
|
-
|
|
12
|
+
import { Cep } from './Cep';
|
|
15
13
|
import OpenReferenceNumber from './OpenReferenceNumber';
|
|
16
14
|
import { RHAssociatesSelector } from './RHAssociatesSelector';
|
|
15
|
+
import CaseContactSelector from './SendNotifications/CaseContactSelector';
|
|
17
16
|
export default function CaseManagement(props) {
|
|
18
17
|
const caseDispatch = useCaseDispatch();
|
|
19
18
|
const onSeverityChange = (payload) => {
|
|
@@ -26,15 +25,15 @@ export default function CaseManagement(props) {
|
|
|
26
25
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
27
26
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
28
27
|
React.createElement(ContactPhoneNumber, null))),
|
|
28
|
+
React.createElement(ContactPhoneNumberAlert, null),
|
|
29
29
|
React.createElement(Fts, { inlineEditable: false }),
|
|
30
30
|
React.createElement(Grid, { hasGutter: true },
|
|
31
31
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
32
32
|
React.createElement(CaseLanguageSelector, { isManageStep: true })),
|
|
33
33
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
34
34
|
React.createElement(CaseGroup, { init: true }))),
|
|
35
|
-
React.createElement(
|
|
36
|
-
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
37
|
-
React.createElement(CaseLabelsCreate, null))),
|
|
35
|
+
React.createElement(CaseContactSelector, null),
|
|
38
36
|
React.createElement(RHAssociatesSelector, null),
|
|
39
|
-
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true })
|
|
37
|
+
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
|
|
38
|
+
React.createElement(Cep, null)));
|
|
40
39
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAoB/D,UAAU,MAAM;CAAG;AAEnB,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,qBA8ThC"}
|
|
@@ -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, Checkbox, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, Popover, PopoverPosition, TextArea, TextInput, ValidatedOptions, } from '@patternfly/react-core';
|
|
12
11
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
|
|
13
12
|
import { LoadingIndicator, ToastNotification, useConfirmation } from '@rh-support/components';
|
|
@@ -18,22 +17,23 @@ import isEqual from 'lodash/isEqual';
|
|
|
18
17
|
import React, { useContext, useEffect, useState } from 'react';
|
|
19
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
19
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
21
|
-
import {
|
|
20
|
+
import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageContext';
|
|
21
|
+
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../context/CaseDiscussionTabContext';
|
|
22
22
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
23
|
+
import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
|
|
23
24
|
import { checkForCaseStatusToggleOnAttachOrComment, postCepDetails, setCaseDetails, setCaseState, updateCaseDetails, } from '../../reducers/CaseReducer';
|
|
24
25
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
25
26
|
export function Cep(props) {
|
|
26
27
|
var _a, _b, _c, _d, _e, _f;
|
|
27
28
|
const { t } = useTranslation();
|
|
28
29
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
29
|
-
const { cep, caseNumber, status, cepDetails, isPostingCep, isCaseUpdating
|
|
30
|
+
const { cep, caseNumber, status, cepDetails, isPostingCep, isCaseUpdating } = useCaseSelector((state) => ({
|
|
30
31
|
cep: state.caseDetails.cep,
|
|
31
32
|
caseNumber: state.caseDetails.caseNumber,
|
|
32
33
|
status: state.caseDetails.status,
|
|
33
34
|
cepDetails: state.cepDetails,
|
|
34
35
|
isPostingCep: state.isPostingCep,
|
|
35
36
|
isCaseUpdating: state.isCaseUpdating,
|
|
36
|
-
existingCaseDetails: state.caseDetails,
|
|
37
37
|
}), isEqual);
|
|
38
38
|
const caseDispatch = useCaseDispatch();
|
|
39
39
|
const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -42,7 +42,9 @@ export function Cep(props) {
|
|
|
42
42
|
const ability = useContext(AbilityContext);
|
|
43
43
|
const canUseCep = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.CEP);
|
|
44
44
|
const confirm = useConfirmation();
|
|
45
|
-
const
|
|
45
|
+
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
46
|
+
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
47
|
+
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
46
48
|
const canEditCase = useCanEditCase();
|
|
47
49
|
const [saveButtonIsClicked, setSaveButtonIsClicked] = useState(false);
|
|
48
50
|
const { isExportingPDF } = useContext(PDFContext);
|
|
@@ -87,14 +89,10 @@ export function Cep(props) {
|
|
|
87
89
|
const cepUpdate = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
|
|
88
90
|
try {
|
|
89
91
|
yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
|
|
90
|
-
|
|
91
|
-
apolloClient: client,
|
|
92
|
-
caseNumber,
|
|
93
|
-
existingCaseDetails,
|
|
94
|
-
});
|
|
92
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status);
|
|
95
93
|
if (caseDetails.cep) {
|
|
96
94
|
yield postCepDetails(caseDispatch, caseNumber, cepDetailsLocal);
|
|
97
|
-
|
|
95
|
+
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
98
96
|
}
|
|
99
97
|
ToastNotification.addSuccessMessage(t(`Consultant Engagement in Progress has been updated successfully`));
|
|
100
98
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface IProps {
|
|
3
|
-
onReasonInputBoxChanged
|
|
4
|
-
onReasonInputBoxBlur?: (reason: string) => void;
|
|
3
|
+
onReasonInputBoxChanged: (Reason: string) => void;
|
|
5
4
|
onReasonChange: (Reason: string) => void;
|
|
6
5
|
noClusterIdReasonExplanation: string;
|
|
7
6
|
noClusterIdReason: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NoClusterIDReasonSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/NoClusterIDReasonSelector.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,uBAAuB,
|
|
1
|
+
{"version":3,"file":"NoClusterIDReasonSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/NoClusterIDReasonSelector.tsx"],"names":[],"mappings":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAM;IACZ,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,4BAA4B,EAAE,MAAM,CAAC;IACrC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,QAAA,MAAM,yBAAyB,GAAI,OAAO,MAAM,sBAkK/C,CAAC;AAEF,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|