@rh-support/troubleshoot 2.6.341 → 2.6.349
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +29 -19
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +16 -91
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +2 -6
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +32 -61
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +33 -60
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +10 -39
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +4 -15
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +55 -82
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +0 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +45 -76
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +109 -203
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +1 -0
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +9 -5
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +17 -18
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +47 -51
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +44 -49
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +45 -51
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +10 -21
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +2 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +2 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +57 -132
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +4 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +58 -93
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +25 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +91 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +33 -78
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +153 -122
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +137 -74
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +9 -22
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +1 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +7 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +3 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +263 -211
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +4 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +5 -4
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +5 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +52 -38
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +57 -123
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +9 -10
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +30 -107
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +7 -10
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +16 -30
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +11 -17
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +55 -36
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +8 -2
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +7 -8
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +9 -11
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +1 -2
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +3 -22
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +22 -15
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +40 -34
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +3 -8
- package/lib/esm/components/EditDescription/EditDescription.js +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +18 -16
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -37
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -9
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +3 -4
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +4 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +4 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.js +2 -2
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +8 -10
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +16 -20
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +62 -109
- package/lib/esm/components/shared/Constants.d.ts +0 -5
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +0 -5
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
- package/lib/esm/components/shared/fileUpload/FileUpload.js +3 -2
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +1 -3
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +2 -2
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +5 -21
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +34 -210
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +1 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +1 -36
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +1 -4
- package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +47 -116
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +57 -22
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +28 -16
- package/lib/esm/components/shared/utils.d.ts +0 -1
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +3 -9
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +38 -170
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +4 -2
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -11
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +0 -5
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +0 -5
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/case.css +202 -60
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -21
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +11 -18
- package/lib/esm/hooks/useS3Upload.d.ts +4 -5
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +30 -28
- package/lib/esm/i18n/template-de.d.ts +2 -2
- package/lib/esm/i18n/template-de.js +2 -2
- package/lib/esm/i18n/template-es.d.ts +2 -2
- package/lib/esm/i18n/template-es.js +2 -2
- package/lib/esm/i18n/template-fr.d.ts +2 -2
- package/lib/esm/i18n/template-fr.js +2 -2
- package/lib/esm/i18n/template-it.d.ts +2 -2
- package/lib/esm/i18n/template-it.js +2 -2
- package/lib/esm/i18n/template-jp.d.ts +2 -2
- package/lib/esm/i18n/template-jp.js +2 -2
- package/lib/esm/i18n/template-ko.d.ts +2 -2
- package/lib/esm/i18n/template-ko.js +2 -2
- package/lib/esm/i18n/template-pt.d.ts +2 -2
- package/lib/esm/i18n/template-pt.js +2 -2
- package/lib/esm/i18n/template-ru.d.ts +2 -2
- package/lib/esm/i18n/template-ru.js +2 -2
- package/lib/esm/i18n/template-zh.d.ts +2 -2
- package/lib/esm/i18n/template-zh.js +2 -2
- package/lib/esm/index.js +0 -1
- package/lib/esm/models/cache.d.ts +2 -0
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.d.ts +9 -123
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +7 -31
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +26 -58
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +12 -11
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +70 -63
- package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +17 -92
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
- package/lib/esm/reducers/CaseReducer.d.ts +11 -56
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +99 -279
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +18 -15
- package/lib/esm/scss/_main.scss +0 -9
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +2 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/package.json +8 -9
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -7
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -23
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -29
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -29
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -60
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +0 -3
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +0 -1
- package/lib/esm/components/CaseInformation/CaseLabels.js +0 -103
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +0 -4
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +0 -1
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +0 -109
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +0 -3
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +0 -1
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +0 -9
- package/lib/esm/graphql/index.d.ts +0 -4
- package/lib/esm/graphql/index.d.ts.map +0 -1
- package/lib/esm/graphql/index.js +0 -3
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
- package/lib/esm/graphql/mutations/index.d.ts +0 -2
- package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/index.js +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.js +0 -31
- package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
- package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getParentId.js +0 -16
- package/lib/esm/graphql/queries/index.d.ts +0 -3
- package/lib/esm/graphql/queries/index.d.ts.map +0 -1
- package/lib/esm/graphql/queries/index.js +0 -2
- package/lib/esm/graphql/schemas/escalation.d.ts +0 -88
- package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/escalation.js +0 -1
- package/lib/esm/graphql/schemas/index.d.ts +0 -2
- package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/index.js +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -52
- package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/index.js +0 -5
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -75
- package/lib/esm/hooks/useCaseComments/types.d.ts +0 -85
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/types.js +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -17
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -38
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
- package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
- package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseHistory.js +0 -98
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -21
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +0 -84
- package/lib/esm/models/caseHistory.d.ts +0 -80
- package/lib/esm/models/caseHistory.d.ts.map +0 -1
- package/lib/esm/models/caseHistory.js +0 -1
- package/lib/esm/utils/TimelineUtils.d.ts +0 -41
- package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
- package/lib/esm/utils/TimelineUtils.js +0 -135
- package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseHistoryUtils.js +0 -165
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +0 -6
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +0 -26
|
@@ -7,9 +7,8 @@ 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 { publicApi } from '@cee-eng/hydrajs';
|
|
12
|
-
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader,
|
|
11
|
+
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
|
|
13
12
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
14
13
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
15
14
|
import { SingleSelectDropdown, useFetch } from '@rh-support/components';
|
|
@@ -17,19 +16,41 @@ import isEqual from 'lodash/isEqual';
|
|
|
17
16
|
import React, { useEffect, useState } from 'react';
|
|
18
17
|
import { Trans, useTranslation } from 'react-i18next';
|
|
19
18
|
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
19
|
+
import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
|
|
20
|
+
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
|
|
21
|
+
import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
|
|
22
|
+
import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetails } from '../../../reducers/CaseReducer';
|
|
23
|
+
const getLocaleNameFromLocalCode = (localeCode) => {
|
|
24
|
+
if ('Intl' in window && 'DisplayNames' in Intl) {
|
|
25
|
+
try {
|
|
26
|
+
const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
|
|
27
|
+
// https://github.com/microsoft/TypeScript/issues/41338
|
|
28
|
+
const langName = new Intl.DisplayNames([lang], { type: 'language' });
|
|
29
|
+
const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
|
|
30
|
+
return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
return localeCode;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return localeCode;
|
|
37
|
+
};
|
|
38
|
+
const formatSessionLinks = (sessionLink) => {
|
|
39
|
+
const links = sessionLink
|
|
40
|
+
.split(/[;,| \n\r\t]+/)
|
|
41
|
+
.map((link) => link.trim())
|
|
42
|
+
.filter(Boolean);
|
|
43
|
+
const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
|
|
44
|
+
return formattedLinks;
|
|
45
|
+
};
|
|
23
46
|
export function NewEssTermsModal(props) {
|
|
24
47
|
const { t } = useTranslation();
|
|
25
48
|
const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
|
|
26
49
|
remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
|
|
27
50
|
}), isEqual);
|
|
28
51
|
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
29
|
-
const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
|
|
30
52
|
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
31
53
|
const caseDispatch = useCaseDispatch();
|
|
32
|
-
const apolloClient = useApolloClient();
|
|
33
54
|
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
34
55
|
id: '5001',
|
|
35
56
|
isDefault: false,
|
|
@@ -72,32 +93,15 @@ export function NewEssTermsModal(props) {
|
|
|
72
93
|
fetchTerms();
|
|
73
94
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
95
|
}, []);
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
96
|
+
const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
97
|
+
propgateErrors: true,
|
|
98
|
+
});
|
|
99
|
+
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
100
|
+
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
101
|
+
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
78
102
|
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
79
103
|
const updateImpact = (event, value) => setImpact(value);
|
|
80
104
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
81
|
-
const getVariantSessionExpectations = () => {
|
|
82
|
-
if (!sessionExpectations)
|
|
83
|
-
return ProgressVariant.success;
|
|
84
|
-
if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
85
|
-
return ProgressVariant.warning;
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
return ProgressVariant.success;
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
const getVariantImpact = () => {
|
|
92
|
-
if (!impact)
|
|
93
|
-
return ProgressVariant.success;
|
|
94
|
-
if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
95
|
-
return ProgressVariant.warning;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
return ProgressVariant.success;
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
105
|
// To handle modal cancel and close
|
|
102
106
|
const onCancel = () => {
|
|
103
107
|
if (agreeLoading || isPostingComment)
|
|
@@ -123,26 +127,21 @@ export function NewEssTermsModal(props) {
|
|
|
123
127
|
};
|
|
124
128
|
// Function to ack remote session terms and post comment
|
|
125
129
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
126
|
-
const requestComment = t(
|
|
127
|
-
? `<p><strong>Remote session link</strong></p><p>${formatSessionLinks(sessionLink)}</p>`
|
|
128
|
-
: ''}<p>This action does not initiate a remote session. A Red Hat Associate will get back to you soon.</p>`);
|
|
130
|
+
const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
|
|
129
131
|
try {
|
|
130
|
-
yield
|
|
132
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
131
133
|
remoteSessionTermsAcked: true,
|
|
134
|
+
screenSessionRequested: true,
|
|
132
135
|
waitingOnCallback: true,
|
|
133
|
-
}
|
|
136
|
+
});
|
|
134
137
|
try {
|
|
135
|
-
yield
|
|
136
|
-
caseId: caseSalesforceId,
|
|
137
|
-
body: requestComment,
|
|
138
|
-
isPublic: true,
|
|
139
|
-
});
|
|
140
|
-
client.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
141
|
-
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
|
|
142
|
-
apolloClient,
|
|
138
|
+
yield postCommentRequest({
|
|
143
139
|
caseNumber: props.caseNumber,
|
|
144
|
-
|
|
140
|
+
commentBody: requestComment,
|
|
141
|
+
contentType: 'markdown',
|
|
145
142
|
});
|
|
143
|
+
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
144
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
146
145
|
setAgreeLoading(false);
|
|
147
146
|
setHasSubmitted(true);
|
|
148
147
|
// ToastNotification.addSuccessMessage(
|
|
@@ -171,9 +170,8 @@ export function NewEssTermsModal(props) {
|
|
|
171
170
|
onCancel();
|
|
172
171
|
setAgreeLoading(false);
|
|
173
172
|
setIsTermsChecked(false);
|
|
174
|
-
yield
|
|
175
|
-
|
|
176
|
-
waitingOnCallback: false,
|
|
173
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
174
|
+
screenSessionRequested: false,
|
|
177
175
|
});
|
|
178
176
|
// ToastNotification.addDangerMessage(
|
|
179
177
|
// t('Could not submit a request for remote session'),
|
|
@@ -217,14 +215,12 @@ export function NewEssTermsModal(props) {
|
|
|
217
215
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
218
216
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
219
217
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
220
|
-
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true,
|
|
221
|
-
React.createElement(Progress, { value: sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantSessionExpectations(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
|
|
218
|
+
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })),
|
|
222
219
|
React.createElement("div", null,
|
|
223
220
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
224
221
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
225
222
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
226
|
-
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true,
|
|
227
|
-
React.createElement(Progress, { value: impact === null || impact === void 0 ? void 0 : impact.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantImpact(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
|
|
223
|
+
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })),
|
|
228
224
|
React.createElement("div", null,
|
|
229
225
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
230
226
|
React.createElement(Trans, null, "Remote session link (optional)")),
|
package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RemoteSessionAgreementModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAExD,OAAO,KAA8B,MAAM,OAAO,CAAC;AAgBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,OAAO,CAAC;IACd,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAClD,QAAQ,EAAE,OAAO,CAAC;CACrB;AA4BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA0XxD"}
|
|
@@ -7,9 +7,8 @@ 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 { publicApi } from '@cee-eng/hydrajs';
|
|
12
|
-
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader,
|
|
11
|
+
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
|
|
13
12
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
14
13
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
15
14
|
import { SingleSelectDropdown, useFetch } from '@rh-support/components';
|
|
@@ -17,19 +16,41 @@ import isEqual from 'lodash/isEqual';
|
|
|
17
16
|
import React, { useEffect, useState } from 'react';
|
|
18
17
|
import { Trans, useTranslation } from 'react-i18next';
|
|
19
18
|
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
19
|
+
import { useCaseDetailsPageStateContext } from '../../../context/CaseDetailsPageContext';
|
|
20
|
+
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
|
|
21
|
+
import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
|
|
22
|
+
import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetails, } from '../../../reducers/CaseReducer';
|
|
23
|
+
const getLocaleNameFromLocalCode = (localeCode) => {
|
|
24
|
+
if ('Intl' in window && 'DisplayNames' in Intl) {
|
|
25
|
+
try {
|
|
26
|
+
const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
|
|
27
|
+
// https://github.com/microsoft/TypeScript/issues/41338
|
|
28
|
+
const langName = new Intl.DisplayNames([lang], { type: 'language' });
|
|
29
|
+
const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
|
|
30
|
+
return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
|
|
31
|
+
}
|
|
32
|
+
catch (e) {
|
|
33
|
+
return localeCode;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return localeCode;
|
|
37
|
+
};
|
|
38
|
+
const formatSessionLinks = (sessionLink) => {
|
|
39
|
+
const links = sessionLink
|
|
40
|
+
.split(/[;,| \n\r\t]+/)
|
|
41
|
+
.map((link) => link.trim())
|
|
42
|
+
.filter(Boolean);
|
|
43
|
+
const formattedLinks = links.map((link) => `[${link}](${link})`).join('\n');
|
|
44
|
+
return formattedLinks;
|
|
45
|
+
};
|
|
23
46
|
export function RemoteSessionAgreementModal(props) {
|
|
24
47
|
const { t } = useTranslation();
|
|
25
48
|
const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
|
|
26
49
|
remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
|
|
27
|
-
caseDetails: state.caseDetails,
|
|
28
50
|
}), isEqual);
|
|
29
51
|
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
30
52
|
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
31
53
|
const caseDispatch = useCaseDispatch();
|
|
32
|
-
const apolloClient = useApolloClient();
|
|
33
54
|
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
34
55
|
id: '5001',
|
|
35
56
|
isDefault: false,
|
|
@@ -72,32 +93,15 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
72
93
|
fetchTerms();
|
|
73
94
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
95
|
}, []);
|
|
75
|
-
const
|
|
76
|
-
|
|
77
|
-
|
|
96
|
+
const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
97
|
+
propgateErrors: true,
|
|
98
|
+
});
|
|
99
|
+
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
100
|
+
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
101
|
+
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
78
102
|
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
79
103
|
const updateImpact = (event, value) => setImpact(value);
|
|
80
104
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
81
|
-
const getVariantSessionExpectations = () => {
|
|
82
|
-
if (!sessionExpectations)
|
|
83
|
-
return ProgressVariant.success;
|
|
84
|
-
if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
85
|
-
return ProgressVariant.warning;
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
return ProgressVariant.success;
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
const getVariantImpact = () => {
|
|
92
|
-
if (!impact)
|
|
93
|
-
return ProgressVariant.success;
|
|
94
|
-
if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
95
|
-
return ProgressVariant.warning;
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
return ProgressVariant.success;
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
105
|
// To handle modal cancel and close
|
|
102
106
|
const onCancel = () => {
|
|
103
107
|
if (agreeLoading || isPostingComment)
|
|
@@ -111,30 +115,23 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
111
115
|
props.onClose && props.onClose();
|
|
112
116
|
};
|
|
113
117
|
const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
|
|
114
|
-
const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
|
|
115
118
|
// Function to ack remote session terms and post comment
|
|
116
119
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
117
|
-
const requestComment = t(
|
|
118
|
-
? `<p><strong>Remote session link</strong></p><p>${formatSessionLinks(sessionLink)}</p>`
|
|
119
|
-
: ''}<p>This action does not initiate a remote session. A Red Hat Associate will get back to you soon.</p>`);
|
|
120
|
+
const requestComment = t(`\n**Thank you for submitting the request for a remote session. A support manager will review the request, and updates will be provided in the support case. Please continue to provide any data requested by the support engineers in the case prior to the remote session (if applicable).**\n\nSubmitted a remote session request with following details:\n\n**Preferred Time and Expectations of remote session**\n${sessionExpectations}\n\n**Describe the impact to you or the business**\n${impact}\n\n${sessionLink ? `**Remote session link**\n${formatSessionLinks(sessionLink)}\n\n` : ''}This action does not initiate a remote session. A Red Hat Associate will get back to you soon.`);
|
|
120
121
|
try {
|
|
121
|
-
yield
|
|
122
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
122
123
|
remoteSessionTermsAcked: true,
|
|
123
124
|
waitingOnCallback: true,
|
|
124
|
-
}
|
|
125
|
+
});
|
|
125
126
|
setRemoteRiderFlag(caseDispatch, true);
|
|
126
127
|
try {
|
|
127
|
-
yield
|
|
128
|
-
caseId: caseSalesforceId,
|
|
129
|
-
body: requestComment,
|
|
130
|
-
isPublic: true,
|
|
131
|
-
});
|
|
132
|
-
client.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
133
|
-
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
|
|
134
|
-
apolloClient: client,
|
|
128
|
+
yield postCommentRequest({
|
|
135
129
|
caseNumber: props.caseNumber,
|
|
136
|
-
|
|
130
|
+
commentBody: requestComment,
|
|
131
|
+
contentType: 'markdown',
|
|
137
132
|
});
|
|
133
|
+
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
134
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
138
135
|
setAgreeLoading(false);
|
|
139
136
|
setHasSubmitted(true);
|
|
140
137
|
// ToastNotification.addSuccessMessage(
|
|
@@ -201,14 +198,12 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
201
198
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
202
199
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
203
200
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
204
|
-
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true,
|
|
205
|
-
React.createElement(Progress, { value: sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${sessionExpectations === null || sessionExpectations === void 0 ? void 0 : sessionExpectations.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantSessionExpectations(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
|
|
201
|
+
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, "aria-label": "Preferred Time and Expectations for Remote Session" })),
|
|
206
202
|
React.createElement("div", null,
|
|
207
203
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
208
204
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
209
205
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
210
|
-
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true,
|
|
211
|
-
React.createElement(Progress, { value: impact === null || impact === void 0 ? void 0 : impact.length, min: 0, max: REMOTE_SESSION_FIELD_LENGTH_LIMIT, size: ProgressSize.sm, label: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, valueText: `${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${impact === null || impact === void 0 ? void 0 : impact.length} / ${REMOTE_SESSION_FIELD_LENGTH_LIMIT}`, variant: getVariantImpact(), title: ' ', className: `pf-v6-u-mt-md kt-progress-bar`, id: "summary-progress-bar" })),
|
|
206
|
+
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, "aria-label": "Describe the impact to you or the business" })),
|
|
212
207
|
React.createElement("div", null,
|
|
213
208
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
214
209
|
React.createElement(Trans, null, "Remote session link (optional)")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,sBAAsB,sBAoYrC"}
|
|
@@ -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 { contacts } from '@cee-eng/hydrajs';
|
|
12
11
|
import { InputGroupText, ValidatedOptions } from '@patternfly/react-core';
|
|
13
12
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
@@ -15,7 +14,6 @@ import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon
|
|
|
15
14
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
16
15
|
import { getPhoneObj, PhoneInput, ToastNotification } from '@rh-support/components';
|
|
17
16
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
18
|
-
import { GET_ACCOUNT_CONTACTS } from '@rh-support/utils';
|
|
19
17
|
import isEmpty from 'lodash/isEmpty';
|
|
20
18
|
import isEqual from 'lodash/isEqual';
|
|
21
19
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -24,43 +22,21 @@ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHON
|
|
|
24
22
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
25
23
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
26
24
|
import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
27
|
-
import { setCaseState, updateCaseDetails
|
|
25
|
+
import { setCaseState, updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
28
26
|
import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
|
|
29
27
|
import { removeAllChars, trimAndReplacePlus } from '../../../shared/utils';
|
|
30
28
|
import { PDFContext } from '../../PDFContainer';
|
|
31
|
-
function fetchContactBySSO(apolloClient, accountNumber, ssoUsername) {
|
|
32
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
33
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
34
|
-
const { data } = yield apolloClient.query({
|
|
35
|
-
query: GET_ACCOUNT_CONTACTS,
|
|
36
|
-
variables: {
|
|
37
|
-
accountNumber: { eq: accountNumber },
|
|
38
|
-
contactsWhere: { SSOUserName__c: { eq: ssoUsername } },
|
|
39
|
-
first: 1,
|
|
40
|
-
},
|
|
41
|
-
fetchPolicy: 'network-only',
|
|
42
|
-
});
|
|
43
|
-
const response = data;
|
|
44
|
-
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;
|
|
45
|
-
return {
|
|
46
|
-
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 : '',
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
29
|
export function CaseContactPhoneNumber() {
|
|
51
30
|
var _a;
|
|
52
|
-
const
|
|
53
|
-
const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, accountNumberRef, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, existingCaseDetails, } = useCaseSelector((state) => ({
|
|
31
|
+
const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, } = useCaseSelector((state) => ({
|
|
54
32
|
phoneCountryCode: state.caseDetails.phoneCountryCode || '',
|
|
55
33
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
|
|
56
34
|
caseNumber: state.caseDetails.caseNumber,
|
|
57
35
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
58
|
-
accountNumberRef: state.caseDetails.accountNumberRef,
|
|
59
36
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
60
37
|
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
61
38
|
hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
|
|
62
39
|
isCasePhoneUpdating: state.isCasePhoneUpdating,
|
|
63
|
-
existingCaseDetails: state.caseDetails,
|
|
64
40
|
}), isEqual);
|
|
65
41
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
66
42
|
const canEditCase = useCanEditCase();
|
|
@@ -103,10 +79,8 @@ export function CaseContactPhoneNumber() {
|
|
|
103
79
|
const phoneLine = (_a = getPhoneObj(localFullPhoneState)) === null || _a === void 0 ? void 0 : _a.phoneLine;
|
|
104
80
|
const countryCode = (_b = getPhoneObj(localFullPhoneState)) === null || _b === void 0 ? void 0 : _b.countryCode;
|
|
105
81
|
try {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
phoneAreaCodePrefixLineNumber: phoneLine,
|
|
109
|
-
}, false, { existingCaseDetails });
|
|
82
|
+
// update case contact info
|
|
83
|
+
yield updateCaseDetails(caseDispatch, caseNumber, Object.assign(Object.assign({ phoneCountryCode: countryCode, phoneAreaCodePrefixLineNumber: phoneLine }, (contactSSOName === loggedInUser.data.ssoUsername && { suppliedPhoneNumberVerified: 'True' })), (!countryCode && !phoneLine && { clearPhoneNumber: true, suppliedPhoneNumberVerified: 'False' })));
|
|
110
84
|
setIsSavedClicked(false);
|
|
111
85
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
112
86
|
ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
|
|
@@ -193,10 +167,6 @@ export function CaseContactPhoneNumber() {
|
|
|
193
167
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
194
168
|
}, [suppliedPhoneNumberVerified]);
|
|
195
169
|
useEffect(() => {
|
|
196
|
-
if (!isEmpty(phoneCountryCode) || !isEmpty(phoneAreaCodePrefixLineNumber)) {
|
|
197
|
-
setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
198
|
-
return;
|
|
199
|
-
}
|
|
200
170
|
if (isEmpty(contactSSOName)) {
|
|
201
171
|
setLocalFullPhoneState('');
|
|
202
172
|
return;
|
|
@@ -210,17 +180,29 @@ export function CaseContactPhoneNumber() {
|
|
|
210
180
|
if (contactSSOName === loggedInUser.data.ssoUsername) {
|
|
211
181
|
try {
|
|
212
182
|
setIsFetchingSSO(true);
|
|
213
|
-
const loggedInUserContact = yield
|
|
183
|
+
const loggedInUserContact = yield (contacts === null || contacts === void 0 ? void 0 : contacts.getSFDCContactBySso(contactSSOName));
|
|
214
184
|
setIsFetchingSSO(false);
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
185
|
+
if (loggedInUserContact.supportPhoneAreaCodePrefixLineNumber) {
|
|
186
|
+
// User has opened a case before and has phone and area code in her/his contact on SF
|
|
187
|
+
_phoneAreaCodePrefixLineNumber = loggedInUserContact.supportPhoneAreaCodePrefixLineNumber;
|
|
188
|
+
_phoneCountryCode = loggedInUserContact.supportPhoneCountryCode;
|
|
189
|
+
_suppliedPhoneNumberVerified =
|
|
190
|
+
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
|
|
191
|
+
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
|
|
192
|
+
? hasLoggedInUserConfirmedPhoneNumber
|
|
193
|
+
: 'False';
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
const phoneLine = getPhoneObj(loggedInUserContact.phone).phoneLine || '';
|
|
197
|
+
const countryCode = getPhoneObj(loggedInUserContact.phone).countryCode;
|
|
198
|
+
_phoneAreaCodePrefixLineNumber = phoneLine;
|
|
199
|
+
_phoneCountryCode = countryCode;
|
|
200
|
+
_suppliedPhoneNumberVerified =
|
|
201
|
+
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
|
|
202
|
+
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
|
|
203
|
+
? hasLoggedInUserConfirmedPhoneNumber
|
|
204
|
+
: 'False';
|
|
205
|
+
}
|
|
224
206
|
}
|
|
225
207
|
catch (_a) {
|
|
226
208
|
_phoneAreaCodePrefixLineNumber = '';
|
|
@@ -234,11 +216,18 @@ export function CaseContactPhoneNumber() {
|
|
|
234
216
|
// user is openning case for others (use is partner or red hatter)
|
|
235
217
|
try {
|
|
236
218
|
setIsFetchingSSO(true);
|
|
237
|
-
const selectedContact = yield
|
|
219
|
+
const selectedContact = yield contacts.getSFDCContactBySso(contactSSOName);
|
|
238
220
|
setIsFetchingSSO(false);
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
221
|
+
if (selectedContact.supportPhoneAreaCodePrefixLineNumber) {
|
|
222
|
+
_phoneAreaCodePrefixLineNumber = selectedContact.supportPhoneAreaCodePrefixLineNumber;
|
|
223
|
+
_phoneCountryCode = selectedContact.supportPhoneCountryCode;
|
|
224
|
+
_suppliedPhoneNumberVerified = 'Deferred';
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
228
|
+
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
229
|
+
_suppliedPhoneNumberVerified = 'Deferred';
|
|
230
|
+
}
|
|
242
231
|
}
|
|
243
232
|
catch (e) {
|
|
244
233
|
_phoneAreaCodePrefixLineNumber = '';
|
|
@@ -263,9 +252,14 @@ export function CaseContactPhoneNumber() {
|
|
|
263
252
|
setLocalFullPhoneState(checkingPlusInLocalFullPhone(_localFullPhone));
|
|
264
253
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
265
254
|
});
|
|
266
|
-
|
|
255
|
+
if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber)) {
|
|
256
|
+
initContactPhoneNumber();
|
|
257
|
+
}
|
|
258
|
+
else {
|
|
259
|
+
setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
260
|
+
}
|
|
267
261
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
268
|
-
}, [contactSSOName
|
|
262
|
+
}, [contactSSOName]);
|
|
269
263
|
return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
|
|
270
264
|
React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
|
|
271
265
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
@@ -281,7 +275,7 @@ export function CaseContactPhoneNumber() {
|
|
|
281
275
|
isCasePhoneUpdating, style: { display: isExportingPDF ? 'none' : '' } },
|
|
282
276
|
React.createElement(CheckIcon, null)),
|
|
283
277
|
React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' }, disabled: isCaseOwnerUpdating || isCasePhoneUpdating, "aria-label": "Clear" },
|
|
284
|
-
React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating
|
|
278
|
+
React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating },
|
|
285
279
|
React.createElement(PencilAltIcon, null)))),
|
|
286
280
|
!invalid &&
|
|
287
281
|
(localFullPhone === null || localFullPhone === void 0 ? void 0 : localFullPhone.length) <= PHONE_LIMIT &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAkBvD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBAgE1D"}
|
|
@@ -1,63 +1,52 @@
|
|
|
1
1
|
import { Flex, FlexItem } from '@patternfly/react-core';
|
|
2
|
-
import { AlertMessage, AlertType } from '@rh-support/components';
|
|
3
2
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
4
3
|
import isEqual from 'lodash/isEqual';
|
|
5
4
|
import React, { useContext, useState } from 'react';
|
|
6
|
-
import { useTranslation } from 'react-i18next';
|
|
7
5
|
import { useCaseSelector } from '../../../../context/CaseContext';
|
|
8
6
|
import { OwnerSelector } from '../../../AccountInfo/OwnerSelector';
|
|
9
7
|
import CaseGroup from '../../../CaseInformation/CaseGroup';
|
|
10
|
-
import CaseLabels from '../../../CaseInformation/CaseLabels';
|
|
11
8
|
import Fts from '../../../CaseInformation/Fts';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
import { Cep } from '../../../CaseManagement/Cep';
|
|
10
|
+
import { RHAssociatesSelector } from '../../../CaseManagement/RHAssociatesSelector';
|
|
11
|
+
import CaseContactSelector from '../../../CaseManagement/SendNotifications/CaseContactSelector';
|
|
15
12
|
import { PartnerCaseHelper } from '../../ShareCase/PartnerCaseHelper';
|
|
16
13
|
import { ShareWithPartner } from '../../ShareCase/PartnerShare';
|
|
17
14
|
import { CaseContactPhoneNumber } from './CaseContactPhoneNumber';
|
|
18
15
|
import CaseInternalStatus from './CaseInternalStatus';
|
|
19
|
-
|
|
20
|
-
// import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
|
|
16
|
+
import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
|
|
21
17
|
import CaseReferenceNumber from './CaseReferenceNumber';
|
|
22
18
|
import CaseSbrGroups from './CaseSbrGroups';
|
|
23
19
|
import SFDCUrl from './SFDCUrl';
|
|
24
20
|
export default function CaseDetailsManagement(props) {
|
|
25
|
-
const { t } = useTranslation();
|
|
26
21
|
const [isUpdatingPartner, setIsUpdatingPartner] = useState(false);
|
|
27
22
|
const caseState = useCaseSelector((state) => ({
|
|
28
23
|
caseDetails: {
|
|
29
24
|
accountNumber: state.caseDetails.accountNumberRef,
|
|
30
25
|
},
|
|
31
|
-
showMandatoryCaseGroupValidationError: state.showMandatoryCaseGroupValidationError,
|
|
32
26
|
}), isEqual);
|
|
33
27
|
const accountNumber = caseState.caseDetails.accountNumber;
|
|
34
28
|
const ability = useContext(AbilityContext);
|
|
35
|
-
|
|
36
|
-
// resourceActions.PATCH,
|
|
37
|
-
// resources.CASE_DETAILS,
|
|
38
|
-
// CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS
|
|
39
|
-
// );
|
|
29
|
+
const canSeeEmailNotifications = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SEND_NOTIFICATIONS);
|
|
40
30
|
const canSeeInternalStatus = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_INTERNAL_STATUS);
|
|
41
31
|
const canSeeSBRGroups = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_SBR_GROUP);
|
|
42
32
|
return (React.createElement(React.Fragment, null,
|
|
43
33
|
React.createElement(PartnerCaseHelper, { setIsUpdatingPartners: setIsUpdatingPartner, caseNumber: props.caseNumber, routeProps: props.routeProps }),
|
|
44
34
|
React.createElement("section", { className: "card card-white" },
|
|
45
|
-
React.createElement(AlertMessage, { show: !!caseState.showMandatoryCaseGroupValidationError, variant: AlertType.DANGER, isInline: true, title: t('Please address the errors to proceed'), className: "pf-v6-u-mb-lg", "data-tracking-id": "proceed-address-errors" }),
|
|
46
35
|
React.createElement("form", null,
|
|
47
36
|
React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
|
|
48
37
|
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
49
38
|
React.createElement(OwnerSelector, null)),
|
|
50
39
|
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
51
40
|
React.createElement(CaseContactPhoneNumber, null))),
|
|
41
|
+
React.createElement(CaseContactPhoneNumberAlert, { isConfirm: true }),
|
|
52
42
|
canSeeInternalStatus && React.createElement(CaseInternalStatus, null),
|
|
53
43
|
canSeeSBRGroups && React.createElement(CaseSbrGroups, null),
|
|
54
|
-
React.createElement(
|
|
55
|
-
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
56
|
-
React.createElement(CaseGroup, null)),
|
|
57
|
-
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
58
|
-
React.createElement(CaseLabels, null))),
|
|
44
|
+
React.createElement(CaseGroup, null),
|
|
59
45
|
React.createElement(CaseReferenceNumber, null),
|
|
46
|
+
canSeeEmailNotifications && React.createElement(CaseContactSelector, null),
|
|
47
|
+
React.createElement(RHAssociatesSelector, null),
|
|
60
48
|
React.createElement(Fts, { inlineEditable: true }),
|
|
49
|
+
React.createElement(Cep, null),
|
|
61
50
|
React.createElement(SFDCUrl, null),
|
|
62
51
|
React.createElement(ShareWithPartner, { routeProps: props.routeProps, isUpdatingPartner: isUpdatingPartner, accountNumber: accountNumber })))));
|
|
63
52
|
}
|
|
@@ -111,7 +111,7 @@ function CaseHostname(props) {
|
|
|
111
111
|
React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-hostname' }, formClassName: props.className || '', labelContent: React.createElement(React.Fragment, null,
|
|
112
112
|
React.createElement(Trans, { className: "pf-v6-u-mr-xs" }, "Hostname"),
|
|
113
113
|
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: !isExportingPDF ? (React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
|
|
114
|
-
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size cursor-pointer", "aria-label": "Hostname Info", color: "#5e40be" }))) : undefined, allowInlineEdit: props.inlineEditable
|
|
114
|
+
React.createElement(QuestionCircleIcon, { className: "pf-v6-u-ml-sm F icon-size cursor-pointer", "aria-label": "Hostname Info", color: "#5e40be" }))) : undefined, allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
115
115
|
React.createElement(TextInput, { type: "text", id: "case-details-hostname", className: `${lengthError ? ' form-invalid' : ''}`, name: "case-details-hostname", value: hostnameState, onChange: (e, phone) => onHostnameChange(phone), isDisabled: isHostnameUpdating, "data-tracking-id": "case-details-hostname", "aria-invalid": lengthError })),
|
|
116
116
|
lengthError && (React.createElement("div", { className: "pull-top" },
|
|
117
117
|
React.createElement("p", { className: "form-instructions form-invalid" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInformation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseInformation.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,qBAwD5C"}
|