@rh-support/troubleshoot 2.6.361 → 2.6.364
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 +17 -92
- 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 +9 -19
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +7 -28
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +57 -88
- 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 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +11 -24
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +57 -92
- 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 +49 -55
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +46 -53
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.js +3 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +46 -52
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +17 -63
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +2 -2
- 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 +3 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +56 -131
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +6 -11
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseSbrGroups.js +1 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +71 -111
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +10 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/useCustomEmails.js +2 -4
- 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 +102 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +26 -42
- 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 +148 -152
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -10
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +146 -252
- 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 +271 -215
- 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 +2 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -36
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +230 -62
- 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 +8 -24
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -8
- 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 +62 -173
- 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 +31 -108
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +5 -2
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +19 -33
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +24 -33
- 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 +10 -13
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +10 -12
- 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 -20
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts +1 -0
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +32 -19
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/RHAssociatesSelector.js +2 -4
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +2 -4
- 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 +4 -8
- package/lib/esm/components/EditDescription/EditDescription.d.ts.map +1 -1
- package/lib/esm/components/EditDescription/EditDescription.js +2 -4
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +17 -23
- 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.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +9 -3
- 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 +19 -25
- 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 +93 -141
- 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 +0 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +3 -4
- 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 -22
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +59 -307
- 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 -5
- 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 -119
- 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 -178
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +1 -2
- 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 +13 -12
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +0 -7
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +11 -14
- 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/app.css +0 -28
- package/lib/esm/css/case.css +212 -209
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +23 -45
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -9
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +11 -108
- 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 -12
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +73 -88
- package/lib/esm/reducers/CaseHelpers.d.ts +1 -11
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +17 -119
- 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 +100 -284
- 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 -10
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +0 -8
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +0 -18
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -10
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -31
- 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 -62
- 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 -108
- 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 -141
- 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 -36
- package/lib/esm/graphql/queries/index.d.ts +0 -2
- package/lib/esm/graphql/queries/index.d.ts.map +0 -1
- package/lib/esm/graphql/queries/index.js +0 -1
- package/lib/esm/graphql/schemas/escalation.d.ts +0 -66
- 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 -57
- package/lib/esm/hooks/useCaseComments/index.d.ts +0 -8
- 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 -93
- 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 -26
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -113
- 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/useCaseGroupUiState.d.ts +0 -3
- package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseGroupUiState.js +0 -10
- 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 -107
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +0 -23
- 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 -86
- 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 -85
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseHistoryUtils.js +0 -196
- 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
- package/lib/esm/utils/linkifyHtmlTextNodes.d.ts +0 -8
- package/lib/esm/utils/linkifyHtmlTextNodes.d.ts.map +0 -1
- package/lib/esm/utils/linkifyHtmlTextNodes.js +0 -37
|
@@ -7,30 +7,50 @@ 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';
|
|
16
|
-
import { resolveSalesforceUserIdByFederationId } from '@rh-support/utils';
|
|
17
15
|
import isEqual from 'lodash/isEqual';
|
|
18
16
|
import React, { useEffect, useState } from 'react';
|
|
19
17
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
18
|
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
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
|
+
};
|
|
24
46
|
export function NewEssTermsModal(props) {
|
|
25
47
|
const { t } = useTranslation();
|
|
26
48
|
const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
|
|
27
49
|
remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
|
|
28
50
|
}), isEqual);
|
|
29
51
|
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
30
|
-
const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
|
|
31
52
|
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
32
53
|
const caseDispatch = useCaseDispatch();
|
|
33
|
-
const apolloClient = useApolloClient();
|
|
34
54
|
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
35
55
|
id: '5001',
|
|
36
56
|
isDefault: false,
|
|
@@ -73,32 +93,15 @@ export function NewEssTermsModal(props) {
|
|
|
73
93
|
fetchTerms();
|
|
74
94
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
95
|
}, []);
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
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();
|
|
79
102
|
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
80
103
|
const updateImpact = (event, value) => setImpact(value);
|
|
81
104
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
82
|
-
const getVariantSessionExpectations = () => {
|
|
83
|
-
if (!sessionExpectations)
|
|
84
|
-
return ProgressVariant.success;
|
|
85
|
-
if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
86
|
-
return ProgressVariant.warning;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
return ProgressVariant.success;
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const getVariantImpact = () => {
|
|
93
|
-
if (!impact)
|
|
94
|
-
return ProgressVariant.success;
|
|
95
|
-
if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
96
|
-
return ProgressVariant.warning;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
return ProgressVariant.success;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
105
|
// To handle modal cancel and close
|
|
103
106
|
const onCancel = () => {
|
|
104
107
|
if (agreeLoading || isPostingComment)
|
|
@@ -124,27 +127,21 @@ export function NewEssTermsModal(props) {
|
|
|
124
127
|
};
|
|
125
128
|
// Function to ack remote session terms and post comment
|
|
126
129
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
127
|
-
const requestComment = t(
|
|
128
|
-
? `<p><strong>Remote session link</strong></p><p>${formatSessionLinks(sessionLink)}</p>`
|
|
129
|
-
: ''}<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.`);
|
|
130
131
|
try {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
133
|
+
remoteSessionTermsAcked: true,
|
|
134
|
+
screenSessionRequested: true,
|
|
135
|
+
waitingOnCallback: true,
|
|
136
|
+
});
|
|
136
137
|
try {
|
|
137
|
-
yield
|
|
138
|
-
caseId: caseSalesforceId,
|
|
139
|
-
body: requestComment,
|
|
140
|
-
isPublic: true,
|
|
141
|
-
});
|
|
142
|
-
client.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
143
|
-
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
|
|
144
|
-
apolloClient,
|
|
138
|
+
yield postCommentRequest({
|
|
145
139
|
caseNumber: props.caseNumber,
|
|
146
|
-
|
|
140
|
+
commentBody: requestComment,
|
|
141
|
+
contentType: 'markdown',
|
|
147
142
|
});
|
|
143
|
+
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
144
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
148
145
|
setAgreeLoading(false);
|
|
149
146
|
setHasSubmitted(true);
|
|
150
147
|
// ToastNotification.addSuccessMessage(
|
|
@@ -173,9 +170,8 @@ export function NewEssTermsModal(props) {
|
|
|
173
170
|
onCancel();
|
|
174
171
|
setAgreeLoading(false);
|
|
175
172
|
setIsTermsChecked(false);
|
|
176
|
-
yield
|
|
177
|
-
|
|
178
|
-
waitingOnCallback: false,
|
|
173
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
174
|
+
screenSessionRequested: false,
|
|
179
175
|
});
|
|
180
176
|
// ToastNotification.addDangerMessage(
|
|
181
177
|
// t('Could not submit a request for remote session'),
|
|
@@ -219,14 +215,12 @@ export function NewEssTermsModal(props) {
|
|
|
219
215
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
220
216
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
221
217
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
222
|
-
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true,
|
|
223
|
-
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" })),
|
|
224
219
|
React.createElement("div", null,
|
|
225
220
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
226
221
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
227
222
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
228
|
-
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true,
|
|
229
|
-
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" })),
|
|
230
224
|
React.createElement("div", null,
|
|
231
225
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
232
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,30 +7,50 @@ 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';
|
|
16
|
-
import { resolveSalesforceUserIdByFederationId } from '@rh-support/utils';
|
|
17
15
|
import isEqual from 'lodash/isEqual';
|
|
18
16
|
import React, { useEffect, useState } from 'react';
|
|
19
17
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
18
|
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
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
|
+
};
|
|
24
46
|
export function RemoteSessionAgreementModal(props) {
|
|
25
47
|
const { t } = useTranslation();
|
|
26
48
|
const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
|
|
27
49
|
remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
|
|
28
|
-
caseDetails: state.caseDetails,
|
|
29
50
|
}), isEqual);
|
|
30
51
|
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
31
52
|
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
32
53
|
const caseDispatch = useCaseDispatch();
|
|
33
|
-
const apolloClient = useApolloClient();
|
|
34
54
|
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
35
55
|
id: '5001',
|
|
36
56
|
isDefault: false,
|
|
@@ -73,32 +93,15 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
73
93
|
fetchTerms();
|
|
74
94
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
95
|
}, []);
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
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();
|
|
79
102
|
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
80
103
|
const updateImpact = (event, value) => setImpact(value);
|
|
81
104
|
const updateSessionLink = (event, value) => setSessionLink(value);
|
|
82
|
-
const getVariantSessionExpectations = () => {
|
|
83
|
-
if (!sessionExpectations)
|
|
84
|
-
return ProgressVariant.success;
|
|
85
|
-
if (sessionExpectations.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
86
|
-
return ProgressVariant.warning;
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
return ProgressVariant.success;
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
const getVariantImpact = () => {
|
|
93
|
-
if (!impact)
|
|
94
|
-
return ProgressVariant.success;
|
|
95
|
-
if (impact.length > REMOTE_SESSION_FIELD_LENGTH_LIMIT / 2) {
|
|
96
|
-
return ProgressVariant.warning;
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
return ProgressVariant.success;
|
|
100
|
-
}
|
|
101
|
-
};
|
|
102
105
|
// To handle modal cancel and close
|
|
103
106
|
const onCancel = () => {
|
|
104
107
|
if (agreeLoading || isPostingComment)
|
|
@@ -112,31 +115,23 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
112
115
|
props.onClose && props.onClose();
|
|
113
116
|
};
|
|
114
117
|
const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
|
|
115
|
-
const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
|
|
116
118
|
// Function to ack remote session terms and post comment
|
|
117
119
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
118
|
-
const requestComment = t(
|
|
119
|
-
? `<p><strong>Remote session link</strong></p><p>${formatSessionLinks(sessionLink)}</p>`
|
|
120
|
-
: ''}<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.`);
|
|
121
121
|
try {
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, buildRemoteSessionRequestCaseUpdate(ackedByUserId), false, { existingCaseDetails });
|
|
122
|
+
yield updateCaseDetails(caseDispatch, props.caseNumber, {
|
|
123
|
+
remoteSessionTermsAcked: true,
|
|
124
|
+
waitingOnCallback: true,
|
|
125
|
+
});
|
|
127
126
|
setRemoteRiderFlag(caseDispatch, true);
|
|
128
127
|
try {
|
|
129
|
-
yield
|
|
130
|
-
caseId: caseSalesforceId,
|
|
131
|
-
body: requestComment,
|
|
132
|
-
isPublic: true,
|
|
133
|
-
});
|
|
134
|
-
client.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
135
|
-
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus, {
|
|
136
|
-
apolloClient: client,
|
|
128
|
+
yield postCommentRequest({
|
|
137
129
|
caseNumber: props.caseNumber,
|
|
138
|
-
|
|
130
|
+
commentBody: requestComment,
|
|
131
|
+
contentType: 'markdown',
|
|
139
132
|
});
|
|
133
|
+
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
134
|
+
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
140
135
|
setAgreeLoading(false);
|
|
141
136
|
setHasSubmitted(true);
|
|
142
137
|
// ToastNotification.addSuccessMessage(
|
|
@@ -203,14 +198,12 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
203
198
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
204
199
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
205
200
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
206
|
-
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true,
|
|
207
|
-
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" })),
|
|
208
202
|
React.createElement("div", null,
|
|
209
203
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
210
204
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
211
205
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
212
|
-
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true,
|
|
213
|
-
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" })),
|
|
214
207
|
React.createElement("div", null,
|
|
215
208
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
216
209
|
React.createElement(Trans, null, "Remote session link (optional)")),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"CaseActionPlan.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseActionPlan/CaseActionPlan.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,iBAAS,cAAc,CAAC,KAAK,EAAE,MAAM,qBA4HpC;kBA5HQ,cAAc;;;AA+HvB,eAAe,cAAc,CAAC"}
|
|
@@ -39,7 +39,8 @@ function CaseActionPlan(props) {
|
|
|
39
39
|
}
|
|
40
40
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
41
41
|
}, [actionPlan]);
|
|
42
|
-
const
|
|
42
|
+
const updateCase = (event) => __awaiter(this, void 0, void 0, function* () {
|
|
43
|
+
event.preventDefault();
|
|
43
44
|
setIsUpdating(true);
|
|
44
45
|
try {
|
|
45
46
|
const caseDetails = { actionPlan: actionPlanState };
|
|
@@ -49,14 +50,10 @@ function CaseActionPlan(props) {
|
|
|
49
50
|
setIsUpdating(false);
|
|
50
51
|
}
|
|
51
52
|
catch (e) {
|
|
52
|
-
caseUpdateError.
|
|
53
|
+
caseUpdateError.showError(e, t('Action plan failed to update'));
|
|
53
54
|
setIsUpdating(false);
|
|
54
55
|
}
|
|
55
56
|
});
|
|
56
|
-
const updateCase = (event) => __awaiter(this, void 0, void 0, function* () {
|
|
57
|
-
event.preventDefault();
|
|
58
|
-
yield persistActionPlan();
|
|
59
|
-
});
|
|
60
57
|
const discardActionPlan = (event) => {
|
|
61
58
|
event.preventDefault();
|
|
62
59
|
setActionPlan(actionPlan);
|
|
@@ -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`));
|
|
@@ -128,7 +102,7 @@ export function CaseContactPhoneNumber() {
|
|
|
128
102
|
catch (e) {
|
|
129
103
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
130
104
|
setIsEditting(false);
|
|
131
|
-
caseUpdateError.
|
|
105
|
+
caseUpdateError.showError(e, t(`Phone number failed to update`));
|
|
132
106
|
}
|
|
133
107
|
});
|
|
134
108
|
const onClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -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"}
|