@rh-support/troubleshoot 2.6.355 → 2.6.358
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +60 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +79 -47
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +63 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +130 -55
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
- package/lib/esm/components/CaseInformation/CaseLabels.js +106 -0
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +31 -17
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +33 -24
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +141 -0
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +11 -9
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +20 -3
- 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 +0 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +19 -32
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
- package/lib/esm/components/EditDescription/EditDescription.js +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +23 -17
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +4 -3
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +3 -9
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +25 -19
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +139 -91
- package/lib/esm/components/shared/Constants.d.ts +5 -0
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +5 -0
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
- package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +22 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +307 -59
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +119 -47
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +22 -57
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +16 -28
- package/lib/esm/components/shared/utils.d.ts +1 -0
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +9 -3
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
- package/lib/esm/components/wizardLayout/MainSection.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/MainSection.js +2 -1
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +5 -0
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/app.css +28 -0
- package/lib/esm/css/case.css +60 -209
- package/lib/esm/graphql/index.d.ts +4 -0
- package/lib/esm/graphql/index.d.ts.map +1 -0
- package/lib/esm/graphql/index.js +3 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
- package/lib/esm/graphql/mutations/index.d.ts +2 -0
- package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/index.js +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
- package/lib/esm/graphql/queries/index.d.ts +2 -0
- package/lib/esm/graphql/queries/index.d.ts.map +1 -0
- package/lib/esm/graphql/queries/index.js +1 -0
- package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
- package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/escalation.js +1 -0
- package/lib/esm/graphql/schemas/index.d.ts +2 -0
- package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/index.js +1 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +45 -23
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/index.js +5 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/types.js +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
- package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
- package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseHistory.js +98 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +23 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +84 -0
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +18 -11
- package/lib/esm/hooks/useS3Upload.d.ts +5 -4
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +28 -30
- package/lib/esm/i18n/template-de.d.ts +2 -2
- package/lib/esm/i18n/template-de.js +2 -2
- package/lib/esm/i18n/template-es.d.ts +2 -2
- package/lib/esm/i18n/template-es.js +2 -2
- package/lib/esm/i18n/template-fr.d.ts +2 -2
- package/lib/esm/i18n/template-fr.js +2 -2
- package/lib/esm/i18n/template-it.d.ts +2 -2
- package/lib/esm/i18n/template-it.js +2 -2
- package/lib/esm/i18n/template-jp.d.ts +2 -2
- package/lib/esm/i18n/template-jp.js +2 -2
- package/lib/esm/i18n/template-ko.d.ts +2 -2
- package/lib/esm/i18n/template-ko.js +2 -2
- package/lib/esm/i18n/template-pt.d.ts +2 -2
- package/lib/esm/i18n/template-pt.js +2 -2
- package/lib/esm/i18n/template-ru.d.ts +2 -2
- package/lib/esm/i18n/template-ru.js +2 -2
- package/lib/esm/i18n/template-zh.d.ts +2 -2
- package/lib/esm/i18n/template-zh.js +2 -2
- package/lib/esm/index.js +1 -0
- package/lib/esm/models/cache.d.ts +0 -2
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/models/caseHistory.d.ts +80 -0
- package/lib/esm/models/caseHistory.d.ts.map +1 -0
- package/lib/esm/models/caseHistory.js +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +31 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
- package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +119 -17
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
- package/lib/esm/reducers/CaseReducer.d.ts +56 -11
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +284 -100
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +15 -18
- package/lib/esm/scss/_main.scss +9 -0
- package/lib/esm/utils/TimelineUtils.d.ts +41 -0
- package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
- package/lib/esm/utils/TimelineUtils.js +135 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseHistoryUtils.js +165 -0
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
- package/package.json +9 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
|
@@ -7,8 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
10
11
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
|
|
12
|
+
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant, TextArea, TextInput, } from '@patternfly/react-core';
|
|
12
13
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
13
14
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
14
15
|
import { SingleSelectDropdown, useFetch } from '@rh-support/components';
|
|
@@ -16,41 +17,19 @@ import isEqual from 'lodash/isEqual';
|
|
|
16
17
|
import React, { useEffect, useState } from 'react';
|
|
17
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
18
19
|
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
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
|
-
};
|
|
20
|
+
import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
|
|
21
|
+
import { checkForCaseStatusToggleOnAttachOrComment, updateCaseDetailsGraphQL } from '../../../reducers/CaseReducer';
|
|
22
|
+
import { formatSessionLinks, getLocaleNameFromLocalCode, REMOTE_SESSION_FIELD_LENGTH_LIMIT, } from './remoteSessionUtils';
|
|
46
23
|
export function NewEssTermsModal(props) {
|
|
47
24
|
const { t } = useTranslation();
|
|
48
25
|
const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
|
|
49
26
|
remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
|
|
50
27
|
}), isEqual);
|
|
51
28
|
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
29
|
+
const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
|
|
52
30
|
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
53
31
|
const caseDispatch = useCaseDispatch();
|
|
32
|
+
const apolloClient = useApolloClient();
|
|
54
33
|
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
55
34
|
id: '5001',
|
|
56
35
|
isDefault: false,
|
|
@@ -93,15 +72,32 @@ export function NewEssTermsModal(props) {
|
|
|
93
72
|
fetchTerms();
|
|
94
73
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
95
74
|
}, []);
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
100
|
-
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
101
|
-
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
75
|
+
const client = useApolloClient();
|
|
76
|
+
const { createComment, loading: isPostingComment } = useCreateCaseComment();
|
|
77
|
+
const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
|
|
102
78
|
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
103
79
|
const updateImpact = (event, value) => setImpact(value);
|
|
104
80
|
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
|
+
};
|
|
105
101
|
// To handle modal cancel and close
|
|
106
102
|
const onCancel = () => {
|
|
107
103
|
if (agreeLoading || isPostingComment)
|
|
@@ -127,21 +123,26 @@ export function NewEssTermsModal(props) {
|
|
|
127
123
|
};
|
|
128
124
|
// Function to ack remote session terms and post comment
|
|
129
125
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
const requestComment = t(
|
|
126
|
+
const requestComment = t(`<p><strong>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).</strong></p><p>Submitted a remote session request with following details:</p><p><strong>Preferred Time and Expectations of remote session</strong></p><p>${sessionExpectations}</p><p><strong>Describe the impact to you or the business</strong></p><p>${impact}</p>${sessionLink
|
|
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>`);
|
|
131
129
|
try {
|
|
132
|
-
yield
|
|
130
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
|
|
133
131
|
remoteSessionTermsAcked: true,
|
|
134
|
-
screenSessionRequested: true,
|
|
135
132
|
waitingOnCallback: true,
|
|
136
|
-
});
|
|
133
|
+
}, false, { existingCaseDetails });
|
|
137
134
|
try {
|
|
138
|
-
yield
|
|
135
|
+
yield createComment({
|
|
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,
|
|
139
143
|
caseNumber: props.caseNumber,
|
|
140
|
-
|
|
141
|
-
contentType: 'markdown',
|
|
144
|
+
existingCaseDetails,
|
|
142
145
|
});
|
|
143
|
-
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
144
|
-
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
145
146
|
setAgreeLoading(false);
|
|
146
147
|
setHasSubmitted(true);
|
|
147
148
|
// ToastNotification.addSuccessMessage(
|
|
@@ -170,8 +171,9 @@ export function NewEssTermsModal(props) {
|
|
|
170
171
|
onCancel();
|
|
171
172
|
setAgreeLoading(false);
|
|
172
173
|
setIsTermsChecked(false);
|
|
173
|
-
yield
|
|
174
|
-
|
|
174
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
|
|
175
|
+
remoteSessionTermsAcked: false,
|
|
176
|
+
waitingOnCallback: false,
|
|
175
177
|
});
|
|
176
178
|
// ToastNotification.addDangerMessage(
|
|
177
179
|
// t('Could not submit a request for remote session'),
|
|
@@ -215,12 +217,14 @@ export function NewEssTermsModal(props) {
|
|
|
215
217
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
216
218
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
217
219
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
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" })
|
|
220
|
+
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Preferred Time and Expectations for Remote Session" }),
|
|
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" })),
|
|
219
222
|
React.createElement("div", null,
|
|
220
223
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
221
224
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
222
225
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
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" })
|
|
226
|
+
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Describe the impact to you or the business" }),
|
|
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" })),
|
|
224
228
|
React.createElement("div", null,
|
|
225
229
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
226
230
|
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":"AAsBA,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;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAibxD"}
|
|
@@ -7,8 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
10
11
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, TextArea, TextInput, } from '@patternfly/react-core';
|
|
12
|
+
import { Alert, Button, ButtonVariant, Checkbox, Modal, ModalBody, ModalFooter, ModalHeader, Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant, TextArea, TextInput, } from '@patternfly/react-core';
|
|
12
13
|
import DownloadIcon from '@patternfly/react-icons/dist/js/icons/download-icon';
|
|
13
14
|
import ExternalLinkAltIcon from '@patternfly/react-icons/dist/js/icons/external-link-alt-icon';
|
|
14
15
|
import { SingleSelectDropdown, useFetch } from '@rh-support/components';
|
|
@@ -16,41 +17,19 @@ import isEqual from 'lodash/isEqual';
|
|
|
16
17
|
import React, { useEffect, useState } from 'react';
|
|
17
18
|
import { Trans, useTranslation } from 'react-i18next';
|
|
18
19
|
import { useCaseDispatch, useCaseSelector } from '../../../context/CaseContext';
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
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
|
-
};
|
|
20
|
+
import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../hooks/useCaseComments';
|
|
21
|
+
import { checkForCaseStatusToggleOnAttachOrComment, setRemoteRiderFlag, updateCaseDetailsGraphQL, } from '../../../reducers/CaseReducer';
|
|
22
|
+
import { formatSessionLinks, getLocaleNameFromLocalCode, REMOTE_SESSION_FIELD_LENGTH_LIMIT, } from './remoteSessionUtils';
|
|
46
23
|
export function RemoteSessionAgreementModal(props) {
|
|
47
24
|
const { t } = useTranslation();
|
|
48
25
|
const { remoteSessionTermsAcked } = useCaseSelector((state) => ({
|
|
49
26
|
remoteSessionTermsAcked: state.caseDetails.remoteSessionTermsAcked,
|
|
27
|
+
caseDetails: state.caseDetails,
|
|
50
28
|
}), isEqual);
|
|
51
29
|
const [isTermsChecked, setIsTermsChecked] = useState(false);
|
|
52
30
|
const { request } = useFetch(publicApi.terms.getRequiredTerms);
|
|
53
31
|
const caseDispatch = useCaseDispatch();
|
|
32
|
+
const apolloClient = useApolloClient();
|
|
54
33
|
const [selectedTranslation, setSelectedTranslation] = useState({
|
|
55
34
|
id: '5001',
|
|
56
35
|
isDefault: false,
|
|
@@ -93,15 +72,32 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
93
72
|
fetchTerms();
|
|
94
73
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
95
74
|
}, []);
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const dispatchDiscussion = useCaseDiscussionTabDispatchContext();
|
|
100
|
-
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
101
|
-
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
75
|
+
const client = useApolloClient();
|
|
76
|
+
const { createComment, loading: isPostingComment } = useCreateCaseComment();
|
|
77
|
+
const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
|
|
102
78
|
const updateSessionExpectation = (event, value) => setSessionExpectations(value);
|
|
103
79
|
const updateImpact = (event, value) => setImpact(value);
|
|
104
80
|
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
|
+
};
|
|
105
101
|
// To handle modal cancel and close
|
|
106
102
|
const onCancel = () => {
|
|
107
103
|
if (agreeLoading || isPostingComment)
|
|
@@ -115,23 +111,30 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
115
111
|
props.onClose && props.onClose();
|
|
116
112
|
};
|
|
117
113
|
const toggleRemoteSessionForm = () => setIsRemoteSessionForm(true);
|
|
114
|
+
const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
|
|
118
115
|
// Function to ack remote session terms and post comment
|
|
119
116
|
const submitRemoteSessionAgreement = (pdfId) => __awaiter(this, void 0, void 0, function* () {
|
|
120
|
-
const requestComment = t(
|
|
117
|
+
const requestComment = t(`<p><strong>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).</strong></p><p>Submitted a remote session request with following details:</p><p><strong>Preferred Time and Expectations of remote session</strong></p><p>${sessionExpectations}</p><p><strong>Describe the impact to you or the business</strong></p><p>${impact}</p>${sessionLink
|
|
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>`);
|
|
121
120
|
try {
|
|
122
|
-
yield
|
|
121
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, props.caseNumber, {
|
|
123
122
|
remoteSessionTermsAcked: true,
|
|
124
123
|
waitingOnCallback: true,
|
|
125
|
-
});
|
|
124
|
+
}, false, { existingCaseDetails });
|
|
126
125
|
setRemoteRiderFlag(caseDispatch, true);
|
|
127
126
|
try {
|
|
128
|
-
yield
|
|
127
|
+
yield createComment({
|
|
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,
|
|
129
135
|
caseNumber: props.caseNumber,
|
|
130
|
-
|
|
131
|
-
contentType: 'markdown',
|
|
136
|
+
existingCaseDetails,
|
|
132
137
|
});
|
|
133
|
-
updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
|
|
134
|
-
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.loggedInUserRights.data.isInternal(), props.caseStatus);
|
|
135
138
|
setAgreeLoading(false);
|
|
136
139
|
setHasSubmitted(true);
|
|
137
140
|
// ToastNotification.addSuccessMessage(
|
|
@@ -198,12 +201,14 @@ export function RemoteSessionAgreementModal(props) {
|
|
|
198
201
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
199
202
|
React.createElement(Trans, null, "Preferred Time and Expectations for Remote Session"),
|
|
200
203
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
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" })
|
|
204
|
+
React.createElement(TextArea, { value: sessionExpectations, onChange: updateSessionExpectation, rows: 3, placeholder: "Please share anything that will help prepare for our meeting?", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Preferred Time and Expectations for Remote Session" }),
|
|
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" })),
|
|
202
206
|
React.createElement("div", null,
|
|
203
207
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
204
208
|
React.createElement(Trans, null, "Describe the impact to you or the business"),
|
|
205
209
|
React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")),
|
|
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" })
|
|
210
|
+
React.createElement(TextArea, { value: impact, onChange: updateImpact, rows: 3, placeholder: "Describe the user or financial impact.", isRequired: true, maxLength: REMOTE_SESSION_FIELD_LENGTH_LIMIT, "aria-label": "Describe the impact to you or the business" }),
|
|
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" })),
|
|
207
212
|
React.createElement("div", null,
|
|
208
213
|
React.createElement("label", { className: "pf-v6-u-mt-md" },
|
|
209
214
|
React.createElement(Trans, null, "Remote session link (optional)")),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remoteSessionUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAEtD,eAAO,MAAM,0BAA0B,GAAI,YAAY,MAAM,KAAG,MAa/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MAOxD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export const REMOTE_SESSION_FIELD_LENGTH_LIMIT = 2000;
|
|
2
|
+
export const getLocaleNameFromLocalCode = (localeCode) => {
|
|
3
|
+
if ('Intl' in window && 'DisplayNames' in Intl) {
|
|
4
|
+
try {
|
|
5
|
+
const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
|
|
6
|
+
// https://github.com/microsoft/TypeScript/issues/41338
|
|
7
|
+
const langName = new Intl.DisplayNames([lang], { type: 'language' });
|
|
8
|
+
const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
|
|
9
|
+
return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
|
|
10
|
+
}
|
|
11
|
+
catch (e) {
|
|
12
|
+
return localeCode;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
return localeCode;
|
|
16
|
+
};
|
|
17
|
+
export const formatSessionLinks = (sessionLink) => {
|
|
18
|
+
const links = sessionLink
|
|
19
|
+
.split(/[;,| \n\r\t]+/)
|
|
20
|
+
.map((link) => link.trim())
|
|
21
|
+
.filter(Boolean);
|
|
22
|
+
return links.map((link) => `<a href="${link}">${link}</a>`).join('<br>');
|
|
23
|
+
};
|
|
@@ -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":"AAWA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuC/D,wBAAgB,sBAAsB,sBAgYrC"}
|
|
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
10
11
|
import { contacts } from '@cee-eng/hydrajs';
|
|
11
12
|
import { InputGroupText, ValidatedOptions } from '@patternfly/react-core';
|
|
12
13
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
@@ -14,6 +15,7 @@ import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon
|
|
|
14
15
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
15
16
|
import { getPhoneObj, PhoneInput, ToastNotification } from '@rh-support/components';
|
|
16
17
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
18
|
+
import { GET_ACCOUNT_CONTACTS } from '@rh-support/utils';
|
|
17
19
|
import isEmpty from 'lodash/isEmpty';
|
|
18
20
|
import isEqual from 'lodash/isEqual';
|
|
19
21
|
import React, { useContext, useEffect, useState } from 'react';
|
|
@@ -22,21 +24,43 @@ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHON
|
|
|
22
24
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
23
25
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
24
26
|
import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
25
|
-
import { setCaseState, updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
27
|
+
import { setCaseState, updateCaseDetails, updateCaseDetailsGraphQL } from '../../../../reducers/CaseReducer';
|
|
26
28
|
import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
|
|
27
29
|
import { removeAllChars, trimAndReplacePlus } from '../../../shared/utils';
|
|
28
30
|
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
|
+
}
|
|
29
50
|
export function CaseContactPhoneNumber() {
|
|
30
51
|
var _a;
|
|
31
|
-
const
|
|
52
|
+
const apolloClient = useApolloClient();
|
|
53
|
+
const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, accountNumberRef, suppliedPhoneNumberVerified, isCaseOwnerUpdating, hasLoggedInUserConfirmedPhoneNumber, isCasePhoneUpdating, existingCaseDetails, } = useCaseSelector((state) => ({
|
|
32
54
|
phoneCountryCode: state.caseDetails.phoneCountryCode || '',
|
|
33
55
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
|
|
34
56
|
caseNumber: state.caseDetails.caseNumber,
|
|
35
57
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
58
|
+
accountNumberRef: state.caseDetails.accountNumberRef,
|
|
36
59
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
37
60
|
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
38
61
|
hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
|
|
39
62
|
isCasePhoneUpdating: state.isCasePhoneUpdating,
|
|
63
|
+
existingCaseDetails: state.caseDetails,
|
|
40
64
|
}), isEqual);
|
|
41
65
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
42
66
|
const canEditCase = useCanEditCase();
|
|
@@ -79,8 +103,10 @@ export function CaseContactPhoneNumber() {
|
|
|
79
103
|
const phoneLine = (_a = getPhoneObj(localFullPhoneState)) === null || _a === void 0 ? void 0 : _a.phoneLine;
|
|
80
104
|
const countryCode = (_b = getPhoneObj(localFullPhoneState)) === null || _b === void 0 ? void 0 : _b.countryCode;
|
|
81
105
|
try {
|
|
82
|
-
|
|
83
|
-
|
|
106
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, {
|
|
107
|
+
phoneCountryCode: countryCode,
|
|
108
|
+
phoneAreaCodePrefixLineNumber: phoneLine,
|
|
109
|
+
}, false, { existingCaseDetails });
|
|
84
110
|
setIsSavedClicked(false);
|
|
85
111
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
86
112
|
ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
|
|
@@ -167,6 +193,10 @@ export function CaseContactPhoneNumber() {
|
|
|
167
193
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
168
194
|
}, [suppliedPhoneNumberVerified]);
|
|
169
195
|
useEffect(() => {
|
|
196
|
+
if (!isEmpty(phoneCountryCode) || !isEmpty(phoneAreaCodePrefixLineNumber)) {
|
|
197
|
+
setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
170
200
|
if (isEmpty(contactSSOName)) {
|
|
171
201
|
setLocalFullPhoneState('');
|
|
172
202
|
return;
|
|
@@ -180,29 +210,17 @@ export function CaseContactPhoneNumber() {
|
|
|
180
210
|
if (contactSSOName === loggedInUser.data.ssoUsername) {
|
|
181
211
|
try {
|
|
182
212
|
setIsFetchingSSO(true);
|
|
183
|
-
const loggedInUserContact = yield (
|
|
213
|
+
const loggedInUserContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
|
|
184
214
|
setIsFetchingSSO(false);
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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
|
-
}
|
|
215
|
+
const phoneLine = getPhoneObj(loggedInUserContact.phone).phoneLine || '';
|
|
216
|
+
const countryCode = getPhoneObj(loggedInUserContact.phone).countryCode;
|
|
217
|
+
_phoneAreaCodePrefixLineNumber = phoneLine;
|
|
218
|
+
_phoneCountryCode = countryCode;
|
|
219
|
+
_suppliedPhoneNumberVerified =
|
|
220
|
+
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
|
|
221
|
+
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
|
|
222
|
+
? hasLoggedInUserConfirmedPhoneNumber
|
|
223
|
+
: 'False';
|
|
206
224
|
}
|
|
207
225
|
catch (_a) {
|
|
208
226
|
_phoneAreaCodePrefixLineNumber = '';
|
|
@@ -216,18 +234,11 @@ export function CaseContactPhoneNumber() {
|
|
|
216
234
|
// user is openning case for others (use is partner or red hatter)
|
|
217
235
|
try {
|
|
218
236
|
setIsFetchingSSO(true);
|
|
219
|
-
const selectedContact = yield
|
|
237
|
+
const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
|
|
220
238
|
setIsFetchingSSO(false);
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
_suppliedPhoneNumberVerified = 'Deferred';
|
|
225
|
-
}
|
|
226
|
-
else {
|
|
227
|
-
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
228
|
-
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
229
|
-
_suppliedPhoneNumberVerified = 'Deferred';
|
|
230
|
-
}
|
|
239
|
+
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
240
|
+
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
241
|
+
_suppliedPhoneNumberVerified = 'Deferred';
|
|
231
242
|
}
|
|
232
243
|
catch (e) {
|
|
233
244
|
_phoneAreaCodePrefixLineNumber = '';
|
|
@@ -252,14 +263,9 @@ export function CaseContactPhoneNumber() {
|
|
|
252
263
|
setLocalFullPhoneState(checkingPlusInLocalFullPhone(_localFullPhone));
|
|
253
264
|
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
254
265
|
});
|
|
255
|
-
|
|
256
|
-
initContactPhoneNumber();
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
setLocalFullPhoneState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
260
|
-
}
|
|
266
|
+
initContactPhoneNumber();
|
|
261
267
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
262
|
-
}, [contactSSOName]);
|
|
268
|
+
}, [contactSSOName, phoneCountryCode, phoneAreaCodePrefixLineNumber]);
|
|
263
269
|
return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
|
|
264
270
|
React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
|
|
265
271
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
@@ -275,7 +281,7 @@ export function CaseContactPhoneNumber() {
|
|
|
275
281
|
isCasePhoneUpdating, style: { display: isExportingPDF ? 'none' : '' } },
|
|
276
282
|
React.createElement(CheckIcon, null)),
|
|
277
283
|
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" },
|
|
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 },
|
|
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 || canEditCase.isCaseNotEditable },
|
|
279
285
|
React.createElement(PencilAltIcon, null)))),
|
|
280
286
|
!invalid &&
|
|
281
287
|
(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":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAE/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAsBvD,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,qBAgI1D"}
|