@rh-support/troubleshoot 2.6.354 → 2.6.357
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/AccountSelector.js +19 -29
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +91 -16
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/ActiveCustomerEscalation.js +6 -2
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +61 -32
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts +8 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/ArchivedCaseBanner.js +18 -0
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +60 -33
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +19 -9
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsErrorMessage.js +15 -4
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +82 -55
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts +2 -0
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseOwnerInfo.js +3 -3
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +1 -2
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +8 -6
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +76 -45
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +203 -109
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts +0 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutionsItem.js +5 -5
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +1 -3
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +5 -9
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +18 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +51 -47
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +49 -44
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +4 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +23 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +51 -45
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +23 -10
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInformation.js +0 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseInternalStatus.js +3 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +132 -57
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseReferenceNumber.js +10 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +110 -65
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseAttachment.js +40 -26
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +122 -148
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +4 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +76 -145
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +22 -9
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +9 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/JumpAndCopyLink.js +8 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +29 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +17 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +60 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useMarkdownFileUploader.js +18 -7
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +9 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +217 -267
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +3 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +35 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +63 -224
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts +4 -5
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CasePrivateNotes/CasePrivateNotes.js +18 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +7 -2
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +38 -52
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +168 -61
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +10 -9
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts +3 -0
- package/lib/esm/components/CaseInformation/CaseLabels.d.ts.map +1 -0
- package/lib/esm/components/CaseInformation/CaseLabels.js +103 -0
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +108 -31
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Description.js +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +2 -5
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +31 -17
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +21 -13
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +36 -55
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts +4 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.d.ts.map +1 -0
- package/lib/esm/components/CaseManagement/CaseLabelsCreate.js +110 -0
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -8
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +13 -10
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +11 -9
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts +2 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/NoClusterIDReasonSelector.js +22 -3
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +6 -6
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +15 -22
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.js +34 -40
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.d.ts.map +1 -1
- package/lib/esm/components/ConfirmationModals/NoAttachmentSelectedModal.js +8 -4
- package/lib/esm/components/EditDescription/EditDescription.js +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +16 -18
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +37 -50
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts +3 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.d.ts.map +1 -0
- package/lib/esm/components/ProductSelector/ProductNotEntitledWarning.js +9 -0
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +9 -1
- package/lib/esm/components/Recommendations/AsideResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/AsideResults.js +4 -3
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendationToast.js +1 -4
- package/lib/esm/components/Recommendations/ClusterRecommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/ClusterRecommendations.js +1 -4
- package/lib/esm/components/Recommendations/InsightsResults.js +3 -3
- package/lib/esm/components/Recommendations/Recommendations.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/Recommendations.js +3 -9
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +10 -8
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +25 -19
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +1 -1
- package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +2 -2
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +104 -62
- package/lib/esm/components/shared/Constants.d.ts +5 -0
- package/lib/esm/components/shared/Constants.d.ts.map +1 -1
- package/lib/esm/components/shared/Constants.js +5 -0
- package/lib/esm/components/shared/fileUpload/FileLister.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileLister.js +3 -3
- package/lib/esm/components/shared/fileUpload/FileUpload.js +2 -3
- package/lib/esm/components/shared/fileUpload/FileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/FileUploader.js +3 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts +1 -0
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +4 -3
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts +1 -1
- package/lib/esm/components/shared/fileUpload/fileSelectors/FileSelectorButton.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts +21 -5
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +210 -34
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentReducer.js +36 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts +5 -1
- package/lib/esm/components/shared/fileUpload/types/index.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts +2 -2
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +116 -47
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +22 -57
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +16 -28
- package/lib/esm/components/shared/utils.d.ts +1 -0
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +9 -3
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +178 -38
- package/lib/esm/components/wizardLayout/WizardAside.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardAside.js +2 -4
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +12 -13
- package/lib/esm/components/wizardLayout/WizardMain.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardMain.js +7 -0
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +14 -11
- package/lib/esm/constants/caseDetailsConstants.d.ts +5 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +5 -0
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/css/app.css +28 -0
- package/lib/esm/css/case.css +60 -209
- package/lib/esm/graphql/index.d.ts +4 -0
- package/lib/esm/graphql/index.d.ts.map +1 -0
- package/lib/esm/graphql/index.js +3 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
- package/lib/esm/graphql/mutations/index.d.ts +2 -0
- package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
- package/lib/esm/graphql/mutations/index.js +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.js +31 -0
- package/lib/esm/graphql/queries/index.d.ts +2 -0
- package/lib/esm/graphql/queries/index.d.ts.map +1 -0
- package/lib/esm/graphql/queries/index.js +1 -0
- package/lib/esm/graphql/schemas/escalation.d.ts +66 -0
- package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/escalation.js +1 -0
- package/lib/esm/graphql/schemas/index.d.ts +2 -0
- package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
- package/lib/esm/graphql/schemas/index.js +1 -0
- package/lib/esm/hooks/useAB.d.ts.map +1 -1
- package/lib/esm/hooks/useAB.js +45 -23
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +4 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +52 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts +7 -0
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/index.js +5 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +25 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +75 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts +85 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/types.js +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +17 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +38 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +19 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +33 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts +3 -0
- package/lib/esm/hooks/useCaseGroupUiState.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseGroupUiState.js +10 -0
- package/lib/esm/hooks/useCaseHistory.d.ts +26 -0
- package/lib/esm/hooks/useCaseHistory.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseHistory.js +98 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts +21 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseLabelLinkMutations.js +91 -0
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.d.ts.map +1 -1
- package/lib/esm/hooks/useCaseUpdateErrorMessage.js +21 -11
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +18 -11
- package/lib/esm/hooks/useS3Upload.d.ts +5 -4
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +28 -30
- package/lib/esm/i18n/template-de.d.ts +2 -2
- package/lib/esm/i18n/template-de.js +2 -2
- package/lib/esm/i18n/template-es.d.ts +2 -2
- package/lib/esm/i18n/template-es.js +2 -2
- package/lib/esm/i18n/template-fr.d.ts +2 -2
- package/lib/esm/i18n/template-fr.js +2 -2
- package/lib/esm/i18n/template-it.d.ts +2 -2
- package/lib/esm/i18n/template-it.js +2 -2
- package/lib/esm/i18n/template-jp.d.ts +2 -2
- package/lib/esm/i18n/template-jp.js +2 -2
- package/lib/esm/i18n/template-ko.d.ts +2 -2
- package/lib/esm/i18n/template-ko.js +2 -2
- package/lib/esm/i18n/template-pt.d.ts +2 -2
- package/lib/esm/i18n/template-pt.js +2 -2
- package/lib/esm/i18n/template-ru.d.ts +2 -2
- package/lib/esm/i18n/template-ru.js +2 -2
- package/lib/esm/i18n/template-zh.d.ts +2 -2
- package/lib/esm/i18n/template-zh.js +2 -2
- package/lib/esm/index.js +1 -0
- package/lib/esm/models/cache.d.ts +0 -2
- package/lib/esm/models/cache.d.ts.map +1 -1
- package/lib/esm/models/caseHistory.d.ts +80 -0
- package/lib/esm/models/caseHistory.d.ts.map +1 -0
- package/lib/esm/models/caseHistory.js +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +123 -9
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +31 -7
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +7 -5
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +58 -26
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +11 -12
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +63 -70
- package/lib/esm/reducers/CaseHelpers.d.ts +11 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +117 -17
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
- package/lib/esm/reducers/CaseReducer.d.ts +56 -11
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +279 -99
- package/lib/esm/reducers/RecommendationsReducer.d.ts.map +1 -1
- package/lib/esm/reducers/RecommendationsReducer.js +15 -18
- package/lib/esm/scss/_main.scss +9 -0
- package/lib/esm/utils/TimelineUtils.d.ts +41 -0
- package/lib/esm/utils/TimelineUtils.d.ts.map +1 -0
- package/lib/esm/utils/TimelineUtils.js +135 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts +66 -0
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseHistoryUtils.js +165 -0
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts +1 -2
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.d.ts.map +1 -1
- package/lib/esm/utils/caseOpenshiftClusterIdUtils.js +4 -4
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts +6 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.d.ts.map +1 -0
- package/lib/esm/utils/caseSeverityFtsGraphQLUtils.js +26 -0
- package/package.json +9 -8
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts +0 -25
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/AsaCommentFeedbackModal.js +0 -88
|
@@ -7,9 +7,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
11
11
|
import { Button, ButtonVariant, Flex, FlexItem } from '@patternfly/react-core';
|
|
12
|
-
import { LoadingIndicator, PFTable, TableComponent, ToastNotification
|
|
12
|
+
import { LoadingIndicator, PFTable, TableComponent, ToastNotification } from '@rh-support/components';
|
|
13
|
+
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
13
14
|
import { ability, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
15
|
import { formatDate, sendToSentry } from '@rh-support/utils';
|
|
15
16
|
import find from 'lodash/find';
|
|
@@ -18,11 +19,10 @@ import isEqual from 'lodash/isEqual';
|
|
|
18
19
|
import React, { useEffect, useRef, useState } from 'react';
|
|
19
20
|
import { Trans, useTranslation } from 'react-i18next';
|
|
20
21
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
21
|
-
import { useCaseDetailsPageDispatchContext
|
|
22
|
-
import {
|
|
22
|
+
import { useCaseDetailsPageDispatchContext } from '../../../../context/CaseDetailsPageContext';
|
|
23
|
+
import { GET_CASE_COMMENTS, useCreateCaseComment } from '../../../../hooks/useCaseComments';
|
|
23
24
|
import { escalationStatus } from '../../../../models/escalation';
|
|
24
25
|
import { fetchCaseEscalations } from '../../../../reducers/CaseDetailsPageReducer';
|
|
25
|
-
import { updateDiscussionStateComments } from '../../../../reducers/CaseDiscussionTabReducer';
|
|
26
26
|
import { checkForCaseStatusToggleOnAttachOrComment } from '../../../../reducers/CaseReducer';
|
|
27
27
|
const ESCALATION_MSG = 'Request Management Escalation:';
|
|
28
28
|
const UPDATE_ESCALATION_MSG = 'Escalation update requested. You will receive an update from a manager shortly.';
|
|
@@ -30,20 +30,20 @@ const REOPEN_ESCALATION_MSG = 'Escalation reopened. A manager will review your r
|
|
|
30
30
|
const CLOSURE_ESCALATION_MSG = 'Escalation closed.';
|
|
31
31
|
export default function RMEEscalationList(props) {
|
|
32
32
|
const { t } = useTranslation();
|
|
33
|
-
const
|
|
34
|
-
const {
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const {
|
|
41
|
-
const
|
|
42
|
-
const
|
|
33
|
+
const apolloClient = useApolloClient();
|
|
34
|
+
const { globalMetadataState: { loggedInUsersAccount }, } = useGlobalStateContext();
|
|
35
|
+
// TODO: migrate escalation update from Hydra to GraphQL
|
|
36
|
+
// const { request: updateEscalationRequest, isFetching: isUpdatingEscalation } = useFetch(
|
|
37
|
+
// escalations.updateEscalations,
|
|
38
|
+
// { propgateErrors: true }
|
|
39
|
+
// );
|
|
40
|
+
const { createComment, loading: isPostingComment } = useCreateCaseComment();
|
|
41
|
+
const caseSalesforceId = useCaseSelector((state) => state.caseDetails.id, isEqual);
|
|
42
|
+
const existingCaseDetails = useCaseSelector((state) => state.caseDetails, isEqual);
|
|
43
43
|
const caseDetailsPageDispatch = useCaseDetailsPageDispatchContext();
|
|
44
44
|
const escalationUpdateInProgessIds = useRef([]);
|
|
45
45
|
const caseDispatch = useCaseDispatch();
|
|
46
|
-
const isUpdating =
|
|
46
|
+
const isUpdating = isPostingComment;
|
|
47
47
|
const [escalationList, setEscalationList] = useState([]);
|
|
48
48
|
const cannUpdateRME = ability.can(resourceActions.UPDATE, resources.RME_ESCALATION);
|
|
49
49
|
const { customerEscalation } = useCaseSelector((state) => ({
|
|
@@ -54,62 +54,48 @@ export default function RMEEscalationList(props) {
|
|
|
54
54
|
// called everytime we are updating the escalation
|
|
55
55
|
setEscalationList([...props.escalations]);
|
|
56
56
|
}, [isUpdating, props.escalations]);
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
// TODO: migrate updateEscalation from Hydra (escalations.updateEscalations) to GraphQL
|
|
58
|
+
// const updateEscalation = async (escalationName: string, text: string, options: Partial<IEscalationUpdate>) => {
|
|
59
|
+
// ...
|
|
60
|
+
// };
|
|
61
|
+
const submitEscalationComment = (escalationName, comment, message) => __awaiter(this, void 0, void 0, function* () {
|
|
62
|
+
var _a;
|
|
59
63
|
escalationUpdateInProgessIds.current.push(escalationName);
|
|
60
|
-
return yield updateEscalationRequest(escalationName, updateRequest);
|
|
61
|
-
});
|
|
62
|
-
const submitEscalationComment = (escalationNum, comment, message) => __awaiter(this, void 0, void 0, function* () {
|
|
63
64
|
try {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
fetchCaseEscalations(caseDetailsPageDispatch, caseSalesforceId, apolloClient, false, Boolean((_a = loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.secureSupport));
|
|
66
|
+
yield createComment({
|
|
67
|
+
caseId: caseSalesforceId,
|
|
68
|
+
body: comment,
|
|
69
|
+
isPublic: true,
|
|
70
|
+
});
|
|
71
|
+
apolloClient.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
72
|
+
// TODO: migrate updateCaseRequest(props.caseNumber, { customerEscalation: true }) to GraphQL
|
|
73
|
+
yield checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.isInternal, props.caseStatus, {
|
|
74
|
+
apolloClient,
|
|
67
75
|
caseNumber: props.caseNumber,
|
|
68
|
-
|
|
69
|
-
contentType: 'plaintext',
|
|
76
|
+
existingCaseDetails,
|
|
70
77
|
});
|
|
71
|
-
|
|
72
|
-
yield updateCaseRequest(props.caseNumber, { customerEscalation: true });
|
|
73
|
-
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, props.isInternal, props.caseStatus);
|
|
74
|
-
escalationNum && ToastNotification.addSuccessMessage(message);
|
|
78
|
+
ToastNotification.addSuccessMessage(message);
|
|
75
79
|
}
|
|
76
80
|
catch (e) {
|
|
77
81
|
ToastNotification.addDangerMessage(e);
|
|
78
82
|
sendToSentry(e, {}, 'RME form submit error');
|
|
79
83
|
}
|
|
80
84
|
finally {
|
|
81
|
-
escalationUpdateInProgessIds.current = escalationUpdateInProgessIds.current.filter((item) => item !==
|
|
85
|
+
escalationUpdateInProgessIds.current = escalationUpdateInProgessIds.current.filter((item) => item !== escalationName);
|
|
82
86
|
}
|
|
83
87
|
});
|
|
84
88
|
const requestUpdateRMEEscalation = (escalationName) => __awaiter(this, void 0, void 0, function* () {
|
|
85
89
|
const comment = `${ESCALATION_MSG}\n ${UPDATE_ESCALATION_MSG}`;
|
|
86
|
-
|
|
87
|
-
const updatedInfo = yield updateEscalation(escalationName, comment, { isRequestForUpdate: true });
|
|
88
|
-
updatedInfo && submitEscalationComment(updatedInfo.escalationName, comment, UPDATE_ESCALATION_MSG);
|
|
89
|
-
}
|
|
90
|
-
catch (e) {
|
|
91
|
-
ToastNotification.addDangerMessage(e);
|
|
92
|
-
}
|
|
90
|
+
yield submitEscalationComment(escalationName, comment, UPDATE_ESCALATION_MSG);
|
|
93
91
|
});
|
|
94
92
|
const requestClosureRMEEscalation = (escalationName) => __awaiter(this, void 0, void 0, function* () {
|
|
95
93
|
const comment = `${ESCALATION_MSG}\n ${CLOSURE_ESCALATION_MSG}`;
|
|
96
|
-
|
|
97
|
-
const updatedInfo = yield updateEscalation(escalationName, comment, { isRequestForClosure: true });
|
|
98
|
-
updatedInfo && submitEscalationComment(updatedInfo.escalationName, comment, CLOSURE_ESCALATION_MSG);
|
|
99
|
-
}
|
|
100
|
-
catch (e) {
|
|
101
|
-
ToastNotification.addDangerMessage(e);
|
|
102
|
-
}
|
|
94
|
+
yield submitEscalationComment(escalationName, comment, CLOSURE_ESCALATION_MSG);
|
|
103
95
|
});
|
|
104
96
|
const requestReOpenRMEEscalation = (escalationName) => __awaiter(this, void 0, void 0, function* () {
|
|
105
97
|
const comment = `${ESCALATION_MSG}\n ${REOPEN_ESCALATION_MSG}`;
|
|
106
|
-
|
|
107
|
-
const updatedInfo = yield updateEscalation(escalationName, comment, { isRequestForReOpen: true });
|
|
108
|
-
updatedInfo && submitEscalationComment(updatedInfo.escalationName, comment, REOPEN_ESCALATION_MSG);
|
|
109
|
-
}
|
|
110
|
-
catch (e) {
|
|
111
|
-
ToastNotification.addDangerMessage(e);
|
|
112
|
-
}
|
|
98
|
+
yield submitEscalationComment(escalationName, comment, REOPEN_ESCALATION_MSG);
|
|
113
99
|
});
|
|
114
100
|
const renderActionButtons = (escalation) => {
|
|
115
101
|
if (isUpdating && escalationUpdateInProgessIds.current.includes(escalation.name)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseGroup.tsx"],"names":[],"mappings":"AAyBA,OAAO,KAAuD,MAAM,OAAO,CAAC;AAmB5E,UAAU,MAAM;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;CAClB;AAWD,iBAAS,SAAS,CAAC,KAAK,EAAE,MAAM,qBAmf/B;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -7,20 +7,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import {
|
|
10
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
11
|
+
import { Button, HelperText, HelperTextItem, MenuToggle, Select, SelectList, SelectOption, Spinner, TextInputGroup, TextInputGroupMain, TextInputGroupUtilities, ValidatedOptions, } from '@patternfly/react-core';
|
|
11
12
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
12
13
|
import { ToastNotification, useSelectKeyboardNavigator, ValueChangedIcon } from '@rh-support/components';
|
|
13
14
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
14
|
-
import {
|
|
15
|
+
import { AbilityContext, resourceActions, resources } from '@rh-support/user-permissions';
|
|
15
16
|
import find from 'lodash/find';
|
|
16
17
|
import isEmpty from 'lodash/isEmpty';
|
|
17
18
|
import isEqual from 'lodash/isEqual';
|
|
18
19
|
import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
19
20
|
import { Trans, useTranslation } from 'react-i18next';
|
|
21
|
+
import { Link } from 'react-router-dom';
|
|
20
22
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
21
23
|
import { RouteContext } from '../../context/RouteContext';
|
|
24
|
+
import { useCaseGroupUiState } from '../../hooks/useCaseGroupUiState';
|
|
22
25
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
23
|
-
import {
|
|
26
|
+
import { fetchCaseGroupsForContactGraphQL, setCaseDetails, setCaseState, setSelectedCaseGroupUsers, updateCaseDetailsGraphQL, } from '../../reducers/CaseReducer';
|
|
24
27
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
25
28
|
import { CaseValuesToWatch } from '../shared/Constants';
|
|
26
29
|
import { getChangedValueTooltip } from '../shared/utils';
|
|
@@ -35,20 +38,41 @@ const emptyCaseGroup = {
|
|
|
35
38
|
function CaseGroup(props) {
|
|
36
39
|
const { t } = useTranslation();
|
|
37
40
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
38
|
-
const { groupNumber, caseNumber,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
const { groupNumber, caseNumber, caseId, accountNumber, ownersCaseGroups, groupName, isCaseOwnerUpdating, contactSSOName, selectedOwnerContactId, selectedOwnerIsOrgAdmin, pendingCaseOwnerUpdate, existingCaseDetails, } = useCaseSelector((state) => {
|
|
42
|
+
var _a, _b, _c, _d, _e;
|
|
43
|
+
return ({
|
|
44
|
+
caseNumber: state.caseDetails.caseNumber,
|
|
45
|
+
caseId: state.caseDetails.id,
|
|
46
|
+
groupNumber: state.caseDetails.groupNumber,
|
|
47
|
+
accountNumber: state.caseDetails.accountNumberRef,
|
|
48
|
+
ownersCaseGroups: state.ownersCaseGroups,
|
|
49
|
+
groupName: state.caseDetails.groupName,
|
|
50
|
+
isCaseOwnerUpdating: state.isCaseOwnerUpdating,
|
|
51
|
+
contactSSOName: state.caseDetails.contactSSOName,
|
|
52
|
+
selectedOwnerContactId: (_b = (_a = state.selectedOwner) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.id,
|
|
53
|
+
selectedOwnerIsOrgAdmin: (_e = (_d = (_c = state.selectedOwner) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.isOrgAdmin) !== null && _e !== void 0 ? _e : false,
|
|
54
|
+
pendingCaseOwnerUpdate: state.pendingCaseOwnerUpdate,
|
|
55
|
+
existingCaseDetails: state.caseDetails,
|
|
56
|
+
});
|
|
57
|
+
}, isEqual);
|
|
48
58
|
const caseDispatch = useCaseDispatch();
|
|
59
|
+
const apolloClient = useApolloClient();
|
|
49
60
|
const { isExportingPDF } = useContext(PDFContext);
|
|
50
61
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
51
|
-
const isGroupMandatory =
|
|
62
|
+
const { isGroupMandatory, shouldHideSelector, isNoGroupsBlockedState } = useCaseGroupUiState();
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!shouldHideSelector || !isEmpty(caseNumber))
|
|
65
|
+
return;
|
|
66
|
+
setCaseDetails(caseDispatch, { groupNumber: '', groupName: '' });
|
|
67
|
+
}, [shouldHideSelector, caseNumber, caseDispatch]);
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (!caseNumber)
|
|
70
|
+
return;
|
|
71
|
+
if (isEmpty(selectedOwnerContactId) || isEmpty(accountNumber))
|
|
72
|
+
return;
|
|
73
|
+
fetchCaseGroupsForContactGraphQL(caseDispatch, apolloClient, selectedOwnerContactId, accountNumber, null, selectedOwnerIsOrgAdmin, groupNumber !== null && groupNumber !== void 0 ? groupNumber : '');
|
|
74
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
75
|
+
}, [selectedOwnerContactId, accountNumber, selectedOwnerIsOrgAdmin]);
|
|
52
76
|
const [selectedCaseGroup, setSelectedCaseGroup] = useState(isGroupMandatory ? undefined : emptyCaseGroup);
|
|
53
77
|
const [isCaseGroupInvalid, setCaseGroupInvalid] = useState(false);
|
|
54
78
|
const [isSelectedUngroupedInvalid, setIsSelectedUngroupedInvalid] = useState(false);
|
|
@@ -59,7 +83,10 @@ function CaseGroup(props) {
|
|
|
59
83
|
const [shouldFilter, setShouldFilter] = useState(false);
|
|
60
84
|
const textInputRef = useRef();
|
|
61
85
|
const canEditCase = useCanEditCase();
|
|
86
|
+
const ability = useContext(AbilityContext);
|
|
62
87
|
const { globalMetadataState: { loggedInUserRights, loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
88
|
+
const canViewManageTab = ability.can(resourceActions.READ, resources.MANAGE);
|
|
89
|
+
const canViewCaseGroups = ability.can(resourceActions.READ, resources.CASE_GROUPS) && canViewManageTab;
|
|
63
90
|
// value changed logic to show a non local group change
|
|
64
91
|
const [localGroupChange, setLocalGroupChange] = useState(false);
|
|
65
92
|
const afterGroupLocalChange = () => setLocalGroupChange(false);
|
|
@@ -70,14 +97,21 @@ function CaseGroup(props) {
|
|
|
70
97
|
return isInValidGroup;
|
|
71
98
|
};
|
|
72
99
|
const onCaseGroupUpdate = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
var _a;
|
|
73
101
|
if (canEditCase.alert())
|
|
74
102
|
return;
|
|
75
103
|
setCaseGroupUpdating(true);
|
|
76
104
|
try {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
105
|
+
const pendingOwnerUpdate = pendingCaseOwnerUpdate;
|
|
106
|
+
const updatePayload = pendingOwnerUpdate
|
|
107
|
+
? Object.assign({ contactId: pendingOwnerUpdate.contactId, contactSSOName: pendingOwnerUpdate.contactSSOName, groupNumber: caseDetails.groupNumber }, ((_a = pendingOwnerUpdate.phoneCaseUpdate) !== null && _a !== void 0 ? _a : {})) : { groupNumber: caseDetails.groupNumber };
|
|
108
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, updatePayload, false, pendingOwnerUpdate ? { existingCaseDetails } : { salesforceCaseId: caseId });
|
|
109
|
+
if (pendingOwnerUpdate) {
|
|
110
|
+
setCaseState(caseDispatch, { pendingCaseOwnerUpdate: null });
|
|
111
|
+
setSelectedCaseGroupUsers(caseDispatch, accountNumber, caseDetails.groupNumber, loggedInUserRights.data);
|
|
112
|
+
}
|
|
80
113
|
ToastNotification.addSuccessMessage(t(`Group has been successfully updated`));
|
|
114
|
+
setCaseGroupUpdating(false);
|
|
81
115
|
}
|
|
82
116
|
catch (e) {
|
|
83
117
|
setCaseGroupUpdating(false);
|
|
@@ -85,7 +119,7 @@ function CaseGroup(props) {
|
|
|
85
119
|
}
|
|
86
120
|
});
|
|
87
121
|
const onCaseGroupChange = (selection) => __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
if (!isInvalidateCaseGroup(selection) && selection.groupNum !== groupNumber) {
|
|
122
|
+
if (!isInvalidateCaseGroup(selection) && (selection.groupNum !== groupNumber || !selected)) {
|
|
89
123
|
const caseDetails = {
|
|
90
124
|
groupNumber: selection.groupNum,
|
|
91
125
|
groupName: selection.name || '',
|
|
@@ -93,7 +127,7 @@ function CaseGroup(props) {
|
|
|
93
127
|
setIsOpen(false);
|
|
94
128
|
if (!isEmpty(caseNumber)) {
|
|
95
129
|
yield onCaseGroupUpdate(caseDetails);
|
|
96
|
-
setIsSelectedUngroupedInvalid(isGroupMandatory &&
|
|
130
|
+
setIsSelectedUngroupedInvalid(isGroupMandatory && !selection.groupNum);
|
|
97
131
|
}
|
|
98
132
|
else {
|
|
99
133
|
setCaseDetails(caseDispatch, caseDetails);
|
|
@@ -120,10 +154,7 @@ function CaseGroup(props) {
|
|
|
120
154
|
? list.filter((v) => v.name.toLowerCase().includes(inputValue === null || inputValue === void 0 ? void 0 : inputValue.toLowerCase()))
|
|
121
155
|
: list;
|
|
122
156
|
if (isGroupMandatory) {
|
|
123
|
-
|
|
124
|
-
const listItems = options.map((item) => (Object.assign(Object.assign({}, item), { disabled: item.groupNum === '-1' })));
|
|
125
|
-
// As group is mandatory, 'UnGrouped Case' cannot be selected we filter it out
|
|
126
|
-
return listItems.filter((g) => g.groupNum !== '-1');
|
|
157
|
+
return options.filter((g) => !!g.groupNum);
|
|
127
158
|
}
|
|
128
159
|
else
|
|
129
160
|
return options;
|
|
@@ -134,11 +165,11 @@ function CaseGroup(props) {
|
|
|
134
165
|
useEffect(() => {
|
|
135
166
|
var _a, _b;
|
|
136
167
|
// case group may change outside of PCM. On group load check if we have a valid group
|
|
137
|
-
setIsSelectedUngroupedInvalid(isGroupMandatory &&
|
|
168
|
+
setIsSelectedUngroupedInvalid(isGroupMandatory && !groupNumber);
|
|
138
169
|
if (groupNumber === undefined)
|
|
139
170
|
return;
|
|
140
171
|
if (((_b = (_a = ownersCaseGroups === null || ownersCaseGroups === void 0 ? void 0 : ownersCaseGroups.data) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) === 0) {
|
|
141
|
-
if (groupNumber
|
|
172
|
+
if (groupNumber && groupName && caseNumber) {
|
|
142
173
|
setSelectedCaseGroup({
|
|
143
174
|
name: groupName,
|
|
144
175
|
groupNum: groupNumber,
|
|
@@ -150,11 +181,16 @@ function CaseGroup(props) {
|
|
|
150
181
|
setInputValue(groupName);
|
|
151
182
|
setSelected(groupName);
|
|
152
183
|
}
|
|
184
|
+
else if (!groupNumber) {
|
|
185
|
+
setSelectedCaseGroup(isGroupMandatory ? undefined : emptyCaseGroup);
|
|
186
|
+
setInputValue('');
|
|
187
|
+
setSelected('');
|
|
188
|
+
}
|
|
153
189
|
return;
|
|
154
190
|
}
|
|
155
191
|
const selectedGroup = find(ownersCaseGroups.data, (g) => g.groupNum === groupNumber);
|
|
156
192
|
if (selectedGroup && selectedGroup.groupNum) {
|
|
157
|
-
if (isGroupMandatory && selectedGroup.groupNum
|
|
193
|
+
if (isGroupMandatory && !selectedGroup.groupNum) {
|
|
158
194
|
setCaseGroupInvalid(true);
|
|
159
195
|
}
|
|
160
196
|
else {
|
|
@@ -163,46 +199,117 @@ function CaseGroup(props) {
|
|
|
163
199
|
setInputValue(selectedGroup.name);
|
|
164
200
|
setSelected(selectedGroup.name);
|
|
165
201
|
}
|
|
202
|
+
else if (groupNumber && groupName) {
|
|
203
|
+
setSelectedCaseGroup({
|
|
204
|
+
name: groupName,
|
|
205
|
+
groupNum: groupNumber,
|
|
206
|
+
defaultMembers: [],
|
|
207
|
+
isDefault: false,
|
|
208
|
+
isPrivate: false,
|
|
209
|
+
members: [],
|
|
210
|
+
});
|
|
211
|
+
setInputValue(groupName);
|
|
212
|
+
setSelected(groupName);
|
|
213
|
+
}
|
|
214
|
+
else if (!groupNumber) {
|
|
215
|
+
setSelectedCaseGroup(isGroupMandatory ? undefined : emptyCaseGroup);
|
|
216
|
+
setInputValue('');
|
|
217
|
+
setSelected('');
|
|
218
|
+
setCaseGroupInvalid(!!isGroupMandatory);
|
|
219
|
+
}
|
|
166
220
|
else {
|
|
167
221
|
setCaseGroupInvalid(true);
|
|
168
222
|
}
|
|
169
223
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
170
|
-
}, [ownersCaseGroups, caseNumber, isGroupMandatory]);
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (caseNumber)
|
|
224
|
+
}, [ownersCaseGroups, caseNumber, isGroupMandatory, groupNumber, groupName]);
|
|
225
|
+
const onCaseGroupClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
226
|
+
if (canEditCase.alert())
|
|
174
227
|
return;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
228
|
+
const caseDetails = {
|
|
229
|
+
groupNumber: '',
|
|
230
|
+
groupName: '',
|
|
231
|
+
};
|
|
232
|
+
if (caseNumber) {
|
|
233
|
+
setCaseGroupUpdating(true);
|
|
234
|
+
try {
|
|
235
|
+
yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, { groupNumber: '' }, false, {
|
|
236
|
+
salesforceCaseId: caseId,
|
|
237
|
+
});
|
|
238
|
+
setCaseDetails(caseDispatch, caseDetails);
|
|
239
|
+
setCaseGroupUpdating(false);
|
|
240
|
+
ToastNotification.addSuccessMessage(t(`Group has been successfully updated`));
|
|
241
|
+
}
|
|
242
|
+
catch (e) {
|
|
243
|
+
setCaseGroupUpdating(false);
|
|
244
|
+
caseUpdateError.showError(e, t(`Group failed to update`));
|
|
245
|
+
return;
|
|
178
246
|
}
|
|
179
247
|
}
|
|
180
|
-
else
|
|
181
|
-
|
|
248
|
+
else {
|
|
249
|
+
setCaseDetails(caseDispatch, caseDetails);
|
|
250
|
+
setSelectedCaseGroupUsers(caseDispatch, accountNumber, '', loggedInUserRights.data);
|
|
182
251
|
}
|
|
183
|
-
|
|
184
|
-
|
|
252
|
+
setSelectedCaseGroup(emptyCaseGroup);
|
|
253
|
+
setCaseGroupInvalid(!!isGroupMandatory);
|
|
254
|
+
setInputValue('');
|
|
255
|
+
setSelected('');
|
|
256
|
+
setIsOpen(false);
|
|
257
|
+
});
|
|
258
|
+
const caseGroupRequiredErrorMessage = caseNumber
|
|
259
|
+
? t('Please select a Case Group to update the case')
|
|
260
|
+
: t('Please select a Case Group to create the case');
|
|
261
|
+
const renderNoGroupsBlockedMessage = () => {
|
|
185
262
|
var _a;
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
(_a = textInputRef === null || textInputRef === void 0 ? void 0 : textInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
192
|
-
setIsOpen(false);
|
|
263
|
+
if (canViewCaseGroups) {
|
|
264
|
+
return (React.createElement("span", { className: "case-group-field-helper__text" },
|
|
265
|
+
t('Groups are enabled for your account, but none have been set up yet. Please '),
|
|
266
|
+
React.createElement(Link, { className: "case-group-field-helper__create-link", to: "/manage/groups" }, t('create a group')),
|
|
267
|
+
caseNumber ? t(' before you update a case.') : t(' before you create a case.')));
|
|
193
268
|
}
|
|
194
|
-
|
|
195
|
-
|
|
269
|
+
if ((_a = loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.data) === null || _a === void 0 ? void 0 : _a.isOrgAdmin) {
|
|
270
|
+
return t('Groups are enabled for your account, but no groups have been set up yet.');
|
|
196
271
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
272
|
+
return caseNumber
|
|
273
|
+
? t('Groups are enabled for your account, but none exist yet. Please contact your org admin to set one up before you update a case.')
|
|
274
|
+
: t('Groups are enabled for your account, but none exist yet. Please contact your org admin to set one up before you create a case.');
|
|
275
|
+
};
|
|
276
|
+
const groupFieldErrorMessage = isNoGroupsBlockedState ? null : caseGroupRequiredErrorMessage;
|
|
277
|
+
const showMandatoryGroupValidationError = !isExportingPDF &&
|
|
278
|
+
(isNoGroupsBlockedState ||
|
|
279
|
+
(isGroupMandatory &&
|
|
280
|
+
(isCaseGroupInvalid || isSelectedUngroupedInvalid || !!pendingCaseOwnerUpdate) &&
|
|
281
|
+
isEmpty(groupNumber) &&
|
|
282
|
+
(!!caseNumber || isNextBtnClickedToShowValidationError || isEmpty(groupNumber))));
|
|
283
|
+
const showGroupFieldValidationError = showMandatoryGroupValidationError || ownersCaseGroups.isError;
|
|
284
|
+
const renderGroupFieldHelperContent = () => {
|
|
285
|
+
if (isNoGroupsBlockedState) {
|
|
286
|
+
return renderNoGroupsBlockedMessage();
|
|
287
|
+
}
|
|
288
|
+
return groupFieldErrorMessage;
|
|
289
|
+
};
|
|
290
|
+
const groupFieldHelperContent = renderGroupFieldHelperContent();
|
|
291
|
+
const showHelperText = !showMandatoryGroupValidationError;
|
|
292
|
+
useEffect(() => {
|
|
293
|
+
setCaseState(caseDispatch, { showMandatoryCaseGroupValidationError: !!showMandatoryGroupValidationError });
|
|
294
|
+
return () => {
|
|
295
|
+
setCaseState(caseDispatch, { showMandatoryCaseGroupValidationError: false });
|
|
296
|
+
};
|
|
297
|
+
}, [caseDispatch, showMandatoryGroupValidationError]);
|
|
200
298
|
const canNotChangeGroup = () => !loggedInUserRights.data.isInternal() &&
|
|
201
299
|
!loggedInUser.data.isOrgAdmin &&
|
|
202
300
|
loggedInUser.data.ssoUsername !== contactSSOName &&
|
|
203
301
|
!loggedInUserRights.data.isPartner();
|
|
302
|
+
const isSelectorDisabled = isNoGroupsBlockedState ||
|
|
303
|
+
ownersCaseGroups.isError ||
|
|
304
|
+
ownersCaseGroups.isFetching ||
|
|
305
|
+
isCaseGroupUpdating ||
|
|
306
|
+
isCaseOwnerUpdating ||
|
|
307
|
+
canNotChangeGroup() ||
|
|
308
|
+
canEditCase.isCaseNotEditable;
|
|
204
309
|
const onToggleClick = () => {
|
|
205
310
|
var _a;
|
|
311
|
+
if (isNoGroupsBlockedState)
|
|
312
|
+
return;
|
|
206
313
|
setIsOpen((prev) => !prev);
|
|
207
314
|
if (!isOpen) {
|
|
208
315
|
setShouldFilter(false);
|
|
@@ -221,18 +328,20 @@ function CaseGroup(props) {
|
|
|
221
328
|
setShouldFilter(true);
|
|
222
329
|
}
|
|
223
330
|
};
|
|
224
|
-
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isDisabled:
|
|
225
|
-
ownersCaseGroups.isFetching ||
|
|
226
|
-
isCaseGroupUpdating ||
|
|
227
|
-
isCaseOwnerUpdating ||
|
|
228
|
-
canNotChangeGroup(), status: ownersCaseGroups.isError || showEmptyValidationError || (caseNumber && isSelectedUngroupedInvalid)
|
|
229
|
-
? 'danger'
|
|
230
|
-
: undefined, isFullWidth: true },
|
|
331
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, variant: "typeahead", onClick: onToggleClick, isExpanded: isOpen, isDisabled: isSelectorDisabled, status: showGroupFieldValidationError ? 'danger' : undefined, isFullWidth: true },
|
|
231
332
|
React.createElement(TextInputGroup, { isPlain: true },
|
|
232
|
-
React.createElement(TextInputGroupMain, { value: inputValue, onClick: onToggleClick, onChange: onInputQueryChange, onKeyDown: onInputKeyDown,
|
|
333
|
+
React.createElement(TextInputGroupMain, { value: inputValue, onClick: onToggleClick, onChange: onInputQueryChange, onKeyDown: onInputKeyDown, onBlur: () => {
|
|
334
|
+
if (selected) {
|
|
335
|
+
setInputValue(selected);
|
|
336
|
+
setShouldFilter(false);
|
|
337
|
+
}
|
|
338
|
+
}, autoComplete: "off", innerRef: textInputRef, placeholder: t(`Select a group`), role: "combobox", isExpanded: isOpen, "aria-controls": "select-typeahead-listbox", "aria-describedby": showGroupFieldValidationError ? "get-support-group-helper'" : undefined, disabled: isSelectorDisabled }),
|
|
233
339
|
!isCaseOwnerUpdating && (ownersCaseGroups.isFetching || isCaseGroupUpdating) ? (React.createElement(TextInputGroupUtilities, null,
|
|
234
340
|
React.createElement(Spinner, { size: "md" }))) : (React.createElement(TextInputGroupUtilities, Object.assign({}, (!inputValue ? { style: { display: 'none' } } : {})),
|
|
235
341
|
React.createElement(Button, { icon: React.createElement(TimesIcon, { "aria-hidden": true }), variant: "plain", onClick: onCaseGroupClear, "aria-label": "Clear input value" }))))));
|
|
342
|
+
if (shouldHideSelector) {
|
|
343
|
+
return null;
|
|
344
|
+
}
|
|
236
345
|
return (React.createElement("div", { className: "form-group" },
|
|
237
346
|
React.createElement("label", { htmlFor: "get-support-group" },
|
|
238
347
|
React.createElement(Trans, null, "Group"),
|
|
@@ -240,10 +349,8 @@ function CaseGroup(props) {
|
|
|
240
349
|
isGroupMandatory && !isExportingPDF && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
|
|
241
350
|
React.createElement(Select, { id: "get-support-group", "data-tracking-id": "get-support-group", isOpen: isOpen, selected: selected, onSelect: (event, val) => onCaseGroupChange(val), onOpenChange: () => setIsOpen(false), toggle: toggle, shouldFocusFirstItemOnOpen: false, onBlur: () => onOuterClickGroupCheck, isScrollable: true, popperProps: { direction: 'down', enableFlip: false } },
|
|
242
351
|
React.createElement(SelectList, null, computeDropdownList().map((option, index) => (React.createElement(SelectOption, { key: option.name, isFocused: focusedItemIndex === index, value: option, isSelected: option.name === selected }, option.name))))),
|
|
243
|
-
|
|
244
|
-
React.createElement(
|
|
245
|
-
showEmptyValidationError && isGroupMandatory && !isExportingPDF && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
246
|
-
React.createElement(Trans, null, "Case group cannot be empty."))),
|
|
352
|
+
showGroupFieldValidationError && groupFieldHelperContent && (React.createElement(HelperText, { className: "pf-v6-u-mt-sm pf-v6-u-mb-sm case-group-field-helper" },
|
|
353
|
+
React.createElement(HelperTextItem, { variant: ValidatedOptions.error, id: "get-support-group-helper'" }, groupFieldHelperContent))),
|
|
247
354
|
showHelperText && (React.createElement("p", { className: "form-instructions" },
|
|
248
355
|
React.createElement(Trans, null, "Organization administrators have the permission to manage groups.")))));
|
|
249
356
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAmHpD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
1
2
|
import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
|
|
2
3
|
import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
3
4
|
import { haventLoadedMetadata } from '@rh-support/utils';
|
|
@@ -7,18 +8,18 @@ import React, { useContext, useEffect } from 'react';
|
|
|
7
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
8
9
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
9
10
|
import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
|
|
10
|
-
import { Hostname } from '../ImproveCase/Hostname';
|
|
11
|
+
// import { Hostname } from '../ImproveCase/Hostname';
|
|
11
12
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
12
13
|
import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
|
|
13
14
|
export default function CaseInformation(props) {
|
|
14
15
|
const { t } = useTranslation();
|
|
15
16
|
const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
|
|
16
17
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
17
|
-
const
|
|
18
|
+
const apolloClient = useApolloClient();
|
|
19
|
+
const { contactSSOName, selectedAccountDetails, ownersCaseGroups } = useCaseSelector((state) => ({
|
|
18
20
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
19
21
|
ownersCaseGroups: state.ownersCaseGroups,
|
|
20
22
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
21
|
-
hasInvalidEntitlements: state.hasInvalidEntitlements,
|
|
22
23
|
}), isEqual);
|
|
23
24
|
const isMetadataLoading = () => {
|
|
24
25
|
return !isMetadataLoadingError() && (loggedInUser.isFetching || selectedAccountDetails.isFetching);
|
|
@@ -38,13 +39,13 @@ export default function CaseInformation(props) {
|
|
|
38
39
|
}
|
|
39
40
|
const allPromisses = [];
|
|
40
41
|
if (haventLoadedMetadata(allCaseTypes)) {
|
|
41
|
-
allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer,
|
|
42
|
+
allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, apolloClient));
|
|
42
43
|
}
|
|
43
44
|
if (haventLoadedMetadata(allCaseSeverities)) {
|
|
44
|
-
allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer,
|
|
45
|
+
allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, apolloClient));
|
|
45
46
|
}
|
|
46
47
|
if (haventLoadedMetadata(caseLanguages)) {
|
|
47
|
-
allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer));
|
|
48
|
+
allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer, apolloClient));
|
|
48
49
|
}
|
|
49
50
|
Promise.all(allPromisses);
|
|
50
51
|
}, [
|
|
@@ -56,6 +57,7 @@ export default function CaseInformation(props) {
|
|
|
56
57
|
loggedInUserJwtToken,
|
|
57
58
|
selectedAccountDetails,
|
|
58
59
|
loggedInUsersAccount.data.secureSupport,
|
|
60
|
+
apolloClient,
|
|
59
61
|
]);
|
|
60
62
|
return (React.createElement(React.Fragment, null,
|
|
61
63
|
React.createElement(LoadingIndicator, { show: isMetadataLoading(), size: "lg" }),
|
|
@@ -66,18 +68,17 @@ export default function CaseInformation(props) {
|
|
|
66
68
|
' ',
|
|
67
69
|
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
68
70
|
" for assistance.")),
|
|
69
|
-
React.createElement(AlertMessage, { show:
|
|
71
|
+
React.createElement(AlertMessage, { show: !loggedInUserRights.data.isEntitled(), variant: AlertType.DANGER, className: "pf-v6-u-mt-lg", isInline: true },
|
|
70
72
|
React.createElement(Trans, { i18nKey: "i18ValidEntitlementContactCustomerService" },
|
|
71
73
|
"You need a valid entitlement to create a case.\u00A0 Please contact",
|
|
72
74
|
' ',
|
|
73
75
|
React.createElement("a", { href: "/support/contact/customerService" }, "Customer Service"),
|
|
74
76
|
" for assistance.")),
|
|
75
|
-
|
|
77
|
+
loggedInUserRights.data.isEntitled() &&
|
|
76
78
|
!isMetadataLoading() &&
|
|
77
79
|
!isMetadataLoadingError() &&
|
|
78
80
|
loggedInUserRights.data.canManageCases() && (React.createElement(React.Fragment, null,
|
|
79
81
|
React.createElement("form", null,
|
|
80
|
-
React.createElement(Hostname, null),
|
|
81
82
|
React.createElement(OpenShiftClusterId, null),
|
|
82
83
|
React.createElement(ClusterRecommendations, { className: "push-bottom" }),
|
|
83
84
|
React.createElement(KtQuestions, null))))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CaseLabels.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseLabels.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAWzD,MAAM,CAAC,OAAO,UAAU,UAAU,sBAmLjC"}
|