@rh-support/troubleshoot 2.6.301 → 2.6.302
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 +28 -40
- package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +52 -14
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +51 -31
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +50 -18
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +25 -8
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +57 -34
- 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 +43 -30
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +76 -30
- 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 +3 -3
- 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 +3 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +13 -17
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +19 -43
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +17 -40
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +3 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +22 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +44 -41
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +8 -7
- 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/CaseOpenshiftClusterId/CaseOpenshiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseOpenshiftClusterId/CaseOpenshiftClusterId.js +38 -18
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +19 -59
- 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/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 +110 -148
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CommentSearch.js +5 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/DiscussionItemLink.js +2 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +15 -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 +19 -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 +49 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +6 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +147 -241
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +5 -3
- 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 +30 -52
- package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseGroup.js +68 -46
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +7 -5
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +37 -24
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +32 -55
- package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
- package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/CaseManagement.js +4 -7
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +4 -7
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenShiftClusterId.js +19 -9
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/OpenshiftDropdownV4.js +16 -11
- 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/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +13 -14
- 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 +30 -50
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -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/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +9 -7
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +16 -16
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +3 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +5 -8
- 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/reducer/AttachmentHelper.d.ts +3 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +76 -4
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +50 -64
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +16 -28
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +120 -24
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +6 -7
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -9
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- 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 +24 -0
- package/lib/esm/graphql/queries/getParentId.d.ts +2 -0
- package/lib/esm/graphql/queries/getParentId.d.ts.map +1 -0
- package/lib/esm/graphql/queries/getParentId.js +16 -0
- package/lib/esm/graphql/queries/index.d.ts +3 -0
- package/lib/esm/graphql/queries/index.d.ts.map +1 -0
- package/lib/esm/graphql/queries/index.js +2 -0
- package/lib/esm/graphql/schemas/escalation.d.ts +84 -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/useCaseComments/caseCommentMutation.d.ts +4 -0
- package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/caseCommentMutation.js +12 -0
- 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 +55 -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 +66 -0
- package/lib/esm/hooks/useCaseComments/types.d.ts +80 -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 +16 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +1 -0
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +25 -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/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/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +18 -11
- 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 +91 -3
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +20 -2
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +5 -4
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +39 -23
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +3 -5
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +33 -46
- package/lib/esm/reducers/CaseHelpers.d.ts +3 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +108 -41
- 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 +30 -8
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +192 -55
- 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 +134 -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/package.json +7 -8
|
@@ -1,105 +1,82 @@
|
|
|
1
1
|
import { Popover, PopoverPosition } from '@patternfly/react-core';
|
|
2
2
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
|
|
3
3
|
import { SingleSelectDropdown } from '@rh-support/components';
|
|
4
|
-
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
5
4
|
import { PreviousCaseTypes, showFtsOnCaseViewEditPage, showFtsOnCreateCasePage } from '@rh-support/utils';
|
|
6
5
|
import isEmpty from 'lodash/isEmpty';
|
|
7
6
|
import isEqual from 'lodash/isEqual';
|
|
8
|
-
import React, {
|
|
7
|
+
import React, { useEffect, useState } from 'react';
|
|
9
8
|
import { Trans, useTranslation } from 'react-i18next';
|
|
10
9
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
11
|
-
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
10
|
+
import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
|
|
12
11
|
const defaultProps = {
|
|
13
12
|
id: '',
|
|
14
13
|
className: '',
|
|
15
14
|
};
|
|
16
15
|
function SupportLevel(props) {
|
|
17
|
-
const {
|
|
18
|
-
product: state.caseDetails.product,
|
|
16
|
+
const { caseNumber, severity, entitlementSla, caseType, productServiceLevel, otherServiceLevels, selectedEntitlementId, } = useCaseSelector((state) => ({
|
|
19
17
|
caseNumber: state.caseDetails.caseNumber,
|
|
20
18
|
severity: state.caseDetails.severity,
|
|
21
19
|
entitlementSla: state.caseDetails.entitlementSla,
|
|
22
|
-
ownersEntitlements: state.ownersEntitlements,
|
|
23
20
|
caseType: state.caseDetails.caseType,
|
|
24
|
-
|
|
21
|
+
productServiceLevel: state.productServiceLevel,
|
|
22
|
+
otherServiceLevels: state.otherServiceLevels,
|
|
23
|
+
selectedEntitlementId: state.selectedEntitlementId,
|
|
25
24
|
}), isEqual);
|
|
26
25
|
const caseDispatch = useCaseDispatch();
|
|
27
|
-
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
28
26
|
const { t } = useTranslation();
|
|
29
27
|
const [isSupportLevelInValid, setIsSupportLevelInValid] = useState(false);
|
|
30
28
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
29
|
+
const allSlaOptions = [...(productServiceLevel ? [productServiceLevel] : []), ...(otherServiceLevels !== null && otherServiceLevels !== void 0 ? otherServiceLevels : [])].sort((a, b) => b.priority - a.priority);
|
|
30
|
+
const hasMultipleSlas = allSlaOptions.length > 1;
|
|
31
31
|
const onCaseDetailsChange = (caseDetails) => {
|
|
32
32
|
setCaseDetails(caseDispatch, caseDetails);
|
|
33
33
|
};
|
|
34
34
|
const onEntitlementChange = (selectedOption) => {
|
|
35
|
-
const
|
|
36
|
-
const
|
|
35
|
+
const entitlementId = selectedOption.value;
|
|
36
|
+
const matchedSla = allSlaOptions.find((sla) => sla.entitlementId === entitlementId);
|
|
37
|
+
const slaLabel = (matchedSla === null || matchedSla === void 0 ? void 0 : matchedSla.serviceLevelLabel) || '';
|
|
38
|
+
const casePayload = { entitlementSla: slaLabel };
|
|
37
39
|
casePayload.fts = caseNumber
|
|
38
|
-
? showFtsOnCaseViewEditPage(
|
|
39
|
-
: showFtsOnCreateCasePage(
|
|
40
|
+
? showFtsOnCaseViewEditPage(slaLabel, severity)
|
|
41
|
+
: showFtsOnCreateCasePage(slaLabel, severity);
|
|
40
42
|
casePayload.fts = casePayload.fts && !isIdea;
|
|
41
|
-
setIsSupportLevelInValid(isEmpty(
|
|
43
|
+
setIsSupportLevelInValid(isEmpty(entitlementId));
|
|
42
44
|
onCaseDetailsChange(casePayload);
|
|
45
|
+
setCaseState(caseDispatch, { selectedEntitlementId: entitlementId });
|
|
43
46
|
};
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
if (openShiftClusterSupportLevel)
|
|
47
|
-
return [openShiftClusterSupportLevel];
|
|
48
|
-
const entitledProduct = ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) !== null && _b !== void 0 ? _b : []).find((entitledProduct) => entitledProduct.product === product);
|
|
49
|
-
if (entitledProduct && entitledProduct.serviceLevels) {
|
|
50
|
-
return entitledProduct.serviceLevels.split(';') || [];
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
return ownersEntitlements.data ? ownersEntitlements.data.map((sla) => sla.slaProcessId) : [];
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
const getSelectedSla = () => {
|
|
57
|
-
var _a, _b;
|
|
58
|
-
if (openShiftClusterSupportLevel)
|
|
59
|
-
return openShiftClusterSupportLevel;
|
|
60
|
-
const entitledProduct = ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) !== null && _b !== void 0 ? _b : []).find((entitledProduct) => entitledProduct.product === product);
|
|
61
|
-
// if sla is empty then it means either first time this component is rendered or product has changed.
|
|
62
|
-
if (isEmpty(entitlementSla) && entitledProduct && entitledProduct.preferredServiceLevel) {
|
|
63
|
-
return entitledProduct.preferredServiceLevel;
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
return isEmpty(entitlementSla) && !isEmpty(ownersEntitlements.data)
|
|
67
|
-
? ownersEntitlements.data[0].slaProcessId
|
|
68
|
-
: entitlementSla;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
const selectedSla = getSelectedSla();
|
|
47
|
+
const selectedSla = entitlementSla || (productServiceLevel === null || productServiceLevel === void 0 ? void 0 : productServiceLevel.serviceLevelLabel) || '';
|
|
48
|
+
const currentEntitlementId = selectedEntitlementId || (productServiceLevel === null || productServiceLevel === void 0 ? void 0 : productServiceLevel.entitlementId) || '';
|
|
72
49
|
useEffect(() => {
|
|
73
|
-
if (!
|
|
50
|
+
if (!productServiceLevel || entitlementSla)
|
|
74
51
|
return;
|
|
75
|
-
if (entitlementSla !==
|
|
76
|
-
onCaseDetailsChange({ entitlementSla:
|
|
52
|
+
if (entitlementSla !== productServiceLevel.serviceLevelLabel) {
|
|
53
|
+
onCaseDetailsChange({ entitlementSla: productServiceLevel.serviceLevelLabel });
|
|
54
|
+
setCaseState(caseDispatch, { selectedEntitlementId: productServiceLevel.entitlementId });
|
|
77
55
|
}
|
|
78
56
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
79
|
-
}, [
|
|
80
|
-
// Create selected option for SingleSelectDropdown
|
|
57
|
+
}, [productServiceLevel, entitlementSla]);
|
|
81
58
|
const getSelectedOption = () => ({
|
|
82
|
-
label: selectedSla
|
|
83
|
-
value:
|
|
59
|
+
label: selectedSla,
|
|
60
|
+
value: currentEntitlementId,
|
|
84
61
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
value: sla,
|
|
62
|
+
const getDropdownOptions = () => allSlaOptions.map((sla) => ({
|
|
63
|
+
label: sla.serviceLevelLabel,
|
|
64
|
+
value: sla.entitlementId || sla.serviceLevelLabel,
|
|
89
65
|
}));
|
|
66
|
+
if (!hasMultipleSlas)
|
|
67
|
+
return null;
|
|
90
68
|
return (React.createElement("div", { className: `form-group ${props.className}`, id: `${props.id}` },
|
|
91
69
|
React.createElement("label", { htmlFor: "get-support-supportLevel" },
|
|
92
70
|
React.createElement(Trans, null, "Support level"),
|
|
93
71
|
' ',
|
|
94
|
-
|
|
72
|
+
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
95
73
|
React.createElement(Popover, { "aria-label": "Support Level info", position: PopoverPosition.top, bodyContent: React.createElement("p", null,
|
|
96
74
|
React.createElement(Trans, { i18nKey: "i18ProductionSupportServiceLevelAgreement" },
|
|
97
75
|
"Learn more about our",
|
|
98
76
|
' ',
|
|
99
77
|
React.createElement("a", { href: "/support/offerings/production/sla", target: "_blank" }, "production support service level agreement"))), closeBtnAriaLabel: "Close" },
|
|
100
78
|
React.createElement(QuestionCircleIcon, { color: "#5e40be", className: "pf-v6-u-ml-xs icon-size cursor-pointer", "aria-label": "Support Level Info" })),
|
|
101
|
-
React.createElement(SingleSelectDropdown, { ariaLabel: t('Select Support Level'), onSelect: onEntitlementChange, selected: getSelectedOption(), options: getDropdownOptions(),
|
|
102
|
-
isEmpty(ownersEntitlements.data) && (React.createElement("p", { className: "form-instructions" }, ownersEntitlements.isError ? t('Error loading support levels') : t('No active subscriptions')))));
|
|
79
|
+
React.createElement(SingleSelectDropdown, { ariaLabel: t('Select Support Level'), onSelect: onEntitlementChange, selected: getSelectedOption(), options: getDropdownOptions(), isInvalid: isSupportLevelInValid, dataTrackingId: "get-support-supportLevel", placeholder: t('Select Support Level') })));
|
|
103
80
|
}
|
|
104
81
|
SupportLevel.defaultProps = defaultProps;
|
|
105
82
|
export default SupportLevel;
|
|
@@ -53,11 +53,11 @@ export default function CaseLanguageSelector(props) {
|
|
|
53
53
|
props.isManageStep,
|
|
54
54
|
]);
|
|
55
55
|
const getLanguageDropdownOptions = map(caseLanguages.data, (language) => ({
|
|
56
|
-
label: Constants.languagesMap[language],
|
|
56
|
+
label: Constants.languagesMap[language] || language,
|
|
57
57
|
value: language,
|
|
58
58
|
}));
|
|
59
59
|
const getSelectedLanguageOption = {
|
|
60
|
-
label: caseLanguage ? Constants.languagesMap[caseLanguage] : '',
|
|
60
|
+
label: caseLanguage ? Constants.languagesMap[caseLanguage] || caseLanguage : '',
|
|
61
61
|
value: caseLanguage || '',
|
|
62
62
|
};
|
|
63
63
|
return (React.createElement("div", { className: "form-group" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAiB1B,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAsCnD"}
|
|
@@ -4,15 +4,15 @@ import { useCaseDispatch } from '../../context/CaseContext';
|
|
|
4
4
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
5
5
|
import CaseGroup from '../CaseInformation/CaseGroup';
|
|
6
6
|
import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
|
|
7
|
-
|
|
7
|
+
// TODO: Re-enable once phone number verification flow is fully supported with GraphQL
|
|
8
|
+
// import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
|
|
8
9
|
import Fts from '../CaseInformation/Fts';
|
|
9
10
|
import Severity from '../CaseInformation/Severity';
|
|
10
11
|
import SupportLevel from '../CaseInformation/SupportLevel';
|
|
11
12
|
import CaseLanguageSelector from './CaseLanguageSelector';
|
|
12
|
-
import { Cep } from './Cep';
|
|
13
|
+
// import { Cep } from './Cep';
|
|
13
14
|
import OpenReferenceNumber from './OpenReferenceNumber';
|
|
14
15
|
import { RHAssociatesSelector } from './RHAssociatesSelector';
|
|
15
|
-
import CaseContactSelector from './SendNotifications/CaseContactSelector';
|
|
16
16
|
export default function CaseManagement(props) {
|
|
17
17
|
const caseDispatch = useCaseDispatch();
|
|
18
18
|
const onSeverityChange = (payload) => {
|
|
@@ -25,15 +25,12 @@ export default function CaseManagement(props) {
|
|
|
25
25
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
26
26
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
27
27
|
React.createElement(ContactPhoneNumber, null))),
|
|
28
|
-
React.createElement(ContactPhoneNumberAlert, null),
|
|
29
28
|
React.createElement(Fts, { inlineEditable: false }),
|
|
30
29
|
React.createElement(Grid, { hasGutter: true },
|
|
31
30
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
32
31
|
React.createElement(CaseLanguageSelector, { isManageStep: true })),
|
|
33
32
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
34
33
|
React.createElement(CaseGroup, { init: true }))),
|
|
35
|
-
React.createElement(CaseContactSelector, null),
|
|
36
34
|
React.createElement(RHAssociatesSelector, null),
|
|
37
|
-
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true })
|
|
38
|
-
React.createElement(Cep, null)));
|
|
35
|
+
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true })));
|
|
39
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Cep.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/Cep.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAe/D,UAAU,MAAM;CAAG;AAEnB,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,qBAkThC"}
|
|
@@ -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 { Button, Checkbox, Form, FormGroup, FormHelperText, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, Popover, PopoverPosition, TextArea, TextInput, ValidatedOptions, } from '@patternfly/react-core';
|
|
11
12
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
|
|
12
13
|
import { LoadingIndicator, ToastNotification, useConfirmation } from '@rh-support/components';
|
|
@@ -17,10 +18,8 @@ import isEqual from 'lodash/isEqual';
|
|
|
17
18
|
import React, { useContext, useEffect, useState } from 'react';
|
|
18
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
19
20
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
20
|
-
import {
|
|
21
|
-
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../context/CaseDiscussionTabContext';
|
|
21
|
+
import { GET_CASE_COMMENTS } from '../../hooks/useCaseComments';
|
|
22
22
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
23
|
-
import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
|
|
24
23
|
import { checkForCaseStatusToggleOnAttachOrComment, postCepDetails, setCaseDetails, setCaseState, updateCaseDetails, } from '../../reducers/CaseReducer';
|
|
25
24
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
26
25
|
export function Cep(props) {
|
|
@@ -42,9 +41,7 @@ export function Cep(props) {
|
|
|
42
41
|
const ability = useContext(AbilityContext);
|
|
43
42
|
const canUseCep = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.CEP);
|
|
44
43
|
const confirm = useConfirmation();
|
|
45
|
-
const
|
|
46
|
-
const { sort, allDiscussions, discussionFiltersListState } = useCaseDiscussionTabStateContext();
|
|
47
|
-
const { caseDetailsPageState: { caseFeedbacksHydra }, } = useCaseDetailsPageStateContext();
|
|
44
|
+
const client = useApolloClient();
|
|
48
45
|
const canEditCase = useCanEditCase();
|
|
49
46
|
const [saveButtonIsClicked, setSaveButtonIsClicked] = useState(false);
|
|
50
47
|
const { isExportingPDF } = useContext(PDFContext);
|
|
@@ -92,7 +89,7 @@ export function Cep(props) {
|
|
|
92
89
|
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), status);
|
|
93
90
|
if (caseDetails.cep) {
|
|
94
91
|
yield postCepDetails(caseDispatch, caseNumber, cepDetailsLocal);
|
|
95
|
-
|
|
92
|
+
client.refetchQueries({ include: [GET_CASE_COMMENTS] });
|
|
96
93
|
}
|
|
97
94
|
ToastNotification.addSuccessMessage(t(`Consultant Engagement in Progress has been updated successfully`));
|
|
98
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,eAAO,MAAM,oBAAoB,yBAShC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAInC,CAAC;AAEF,eAAO,MAAM,4BAA4B,yBAYxC,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBAIjC,CAAC;AAEF,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OpenShiftClusterId.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenShiftClusterId.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuB/D,eAAO,MAAM,oBAAoB,yBAShC,CAAC;AAEF,eAAO,MAAM,uBAAuB,yBAInC,CAAC;AAEF,eAAO,MAAM,4BAA4B,yBAYxC,CAAC;AAEF,eAAO,MAAM,qBAAqB,yBAIjC,CAAC;AAEF,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBA8T/C"}
|
|
@@ -90,8 +90,8 @@ export function OpenShiftClusterId(props) {
|
|
|
90
90
|
if (isEmpty(product))
|
|
91
91
|
return;
|
|
92
92
|
const isClusterVisible = () => __awaiter(this, void 0, void 0, function* () {
|
|
93
|
-
var _a
|
|
94
|
-
const hasCluster = yield isClusterIdEnabledForProduct(product
|
|
93
|
+
var _a;
|
|
94
|
+
const hasCluster = yield isClusterIdEnabledForProduct(product);
|
|
95
95
|
setShowClusterId(hasCluster);
|
|
96
96
|
if (!hasCluster) {
|
|
97
97
|
resetClusterData();
|
|
@@ -117,7 +117,7 @@ export function OpenShiftClusterId(props) {
|
|
|
117
117
|
setIsClusterIdInValid(false);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
const majorVersion = (
|
|
120
|
+
const majorVersion = (_a = getVersion(version)) === null || _a === void 0 ? void 0 : _a.major;
|
|
121
121
|
const isOpenShiftV3 = product === 'OpenShift Container Platform' && majorVersion === '3';
|
|
122
122
|
setShowV3TextBox(isOpenShiftV3);
|
|
123
123
|
if (isOpenShiftV3 || noClusterIdReasonExplanation === 'v3-cluster') {
|
|
@@ -199,11 +199,19 @@ export function OpenShiftClusterId(props) {
|
|
|
199
199
|
fetchClusterRecommendations(clusterRecommendationsDispatch, selectedId, clusterRecommendationsCache);
|
|
200
200
|
};
|
|
201
201
|
const clusterIdDropdownFormInstructions = () => {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
202
|
+
// TODO: Re-enable empty cluster ID check when cluster ID is made mandatory again
|
|
203
|
+
// const errorMessage = isClusterIdInvalid
|
|
204
|
+
// ? isInvalidErrorMessage()
|
|
205
|
+
// : isEmpty(openshiftClusterID) && isEmpty(selectedReason)
|
|
206
|
+
// ? discoverV4ClusterIdLinkError()
|
|
207
|
+
// : null;
|
|
208
|
+
// TODO: Re-enable empty cluster ID check when cluster ID is made mandatory again
|
|
209
|
+
// const errorMessage = isClusterIdInvalid
|
|
210
|
+
// ? isInvalidErrorMessage()
|
|
211
|
+
// : isEmpty(openshiftClusterID) && isEmpty(selectedReason)
|
|
212
|
+
// ? discoverV4ClusterIdLinkError()
|
|
213
|
+
// : null;
|
|
214
|
+
const errorMessage = isClusterIdInvalid ? isInvalidErrorMessage() : null;
|
|
207
215
|
const infoMessage = v3Selected ? v3Tov4TransitionLink() : discoverV4ClusterIdLink();
|
|
208
216
|
return isNextBtnClickedToShowValidationError && errorMessage ? errorMessage : infoMessage;
|
|
209
217
|
};
|
|
@@ -232,7 +240,9 @@ export function OpenShiftClusterId(props) {
|
|
|
232
240
|
return null;
|
|
233
241
|
return (React.createElement("div", { className: `${props.className ? props.className : ''}` },
|
|
234
242
|
!showV3TextBox && (React.createElement(OpenshiftDropdownV4, { openshiftDisplayName: openshiftDisplayName, openshiftClusterIDState: openshiftClusterID || selectedReason, onClusterIdStateUpdate: onClusterIdStateUpdate, isClusterIdInvalid: isNextBtnClickedToShowValidationError &&
|
|
235
|
-
|
|
243
|
+
// TODO: Re-enable empty check when cluster ID is made mandatory again
|
|
244
|
+
// ((isEmpty(openshiftClusterID) && isEmpty(selectedReason)) ||
|
|
245
|
+
isClusterIdInvalid, clusterIdDropdownFormInstructions: clusterIdDropdownFormInstructions(), onClusterClear: resetClusterData, isV3: product !== 'OpenShift Container Platform' })),
|
|
236
246
|
noClusterIdReasonExplanation !== 'v3-cluster' && dontKnowSelected && !showV3TextBox && (React.createElement(NoClusterIDReasonSelector, { noClusterIdReasonExplanation: noClusterIdReasonExplanation, noClusterIdReason: noClusterIdReason, onReasonInputBoxChanged: onReasonExplanationInputBoxChanged, onReasonChange: onReasonChange, isInValid: isInVaidNoClusterIdReason, isCustomer: isCustomer })),
|
|
237
247
|
(v3Selected || showV3TextBox) && (React.createElement(OpenShiftV3Inputbox, { v3ClusterName: v3ClusterName, onReasonInputBoxChanged: v3ClusterNameInputBoxChanged, isInValid: isEmpty(v3ClusterName.trim()) && isNextBtnClickedToShowValidationError, v3Selected: v3Selected }))));
|
|
238
248
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAgB5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;CAC3C;AAsBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OpenshiftDropdownV4.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/OpenshiftDropdownV4.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAgB5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA2D,MAAM,OAAO,CAAC;AAOhF,UAAU,MAAO,SAAQ,gBAAgB;IACrC,uBAAuB,EAAE,MAAM,CAAC;IAChC,sBAAsB,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzF,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iCAAiC,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IAChD,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4BAA4B,CAAC,EAAE,MAAM,CAAC;IACtC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,uBAAuB,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;CAC3C;AAsBD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAwfzC;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -117,7 +117,8 @@ function OpenshiftDropdownV4(props) {
|
|
|
117
117
|
// Define dropdown options for keyboard navigation
|
|
118
118
|
const dropdownOptions = useMemo(() => [
|
|
119
119
|
{ type: 'checkbox', key: 'show-hide-archived-clusters', label: t('Show archived clusters') },
|
|
120
|
-
|
|
120
|
+
// TODO: Re-enable "I don't have my Cluster ID" option when needed
|
|
121
|
+
// { type: 'option', key: 'dont-have-id', label: t("I don't have my Cluster ID") },
|
|
121
122
|
...(props.isV3 ? [{ type: 'option', key: 'v3-cluster', label: t('The case is for a v3 cluster') }] : []),
|
|
122
123
|
], [props.isV3, t]);
|
|
123
124
|
// Use the keyboard navigation hook
|
|
@@ -132,10 +133,10 @@ function OpenshiftDropdownV4(props) {
|
|
|
132
133
|
setShowArchivedClusters(!showArchivedClusters);
|
|
133
134
|
props.onClusterClear();
|
|
134
135
|
setClustersRawResponse([]);
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
props.onClusterIdStateUpdate(createState('dont-have-id', t("I don't have my Cluster ID")));
|
|
138
|
-
setIsOpen(false);
|
|
136
|
+
// TODO: Re-enable "I don't have my Cluster ID" keyboard handler when needed
|
|
137
|
+
// } else if (item.key === 'dont-have-id') {
|
|
138
|
+
// props.onClusterIdStateUpdate(createState('dont-have-id', t("I don't have my Cluster ID")));
|
|
139
|
+
// setIsOpen(false);
|
|
139
140
|
}
|
|
140
141
|
else if (item.key === 'v3-cluster') {
|
|
141
142
|
props.onClusterIdStateUpdate(createState('v3-cluster', t('The case is for a v3 cluster')));
|
|
@@ -146,7 +147,16 @@ function OpenshiftDropdownV4(props) {
|
|
|
146
147
|
const dropdownHeaderOptions = useMemo(() => [
|
|
147
148
|
React.createElement(SelectOption, { hasCheckbox: true, key: "show-archived-clusters", "aria-label": t('Show archived clusters'), id: "show-archived-clusters", className: "archived-clusters-checkbox", "data-tracking-id": "show-hide-archived-clusters", value: { type: 'checkbox' }, isSelected: showArchivedClusters }, t('Show archived clusters')),
|
|
148
149
|
React.createElement(Divider, { component: "div", key: 'cluster-id-options-divider-e' }),
|
|
149
|
-
|
|
150
|
+
/* TODO: Re-enable "I don't have my Cluster ID" dropdown option when needed
|
|
151
|
+
<SelectOption
|
|
152
|
+
key={'dont-have-id'}
|
|
153
|
+
value={createState('dont-have-id', t("I don't have my Cluster ID"))}
|
|
154
|
+
data-tracking-id="dont-have-cluster-id"
|
|
155
|
+
isFocused={focusedItemIndex === 1}
|
|
156
|
+
>
|
|
157
|
+
{"I don't have my Cluster ID"}
|
|
158
|
+
</SelectOption>,
|
|
159
|
+
*/
|
|
150
160
|
...(props.isV3
|
|
151
161
|
? [
|
|
152
162
|
React.createElement(SelectOption, { key: 'v3-cluster', value: createState('v3-cluster', t('The case is for a v3 cluster')), isFocused: focusedItemIndex === 2 }),
|
|
@@ -224,17 +234,14 @@ function OpenshiftDropdownV4(props) {
|
|
|
224
234
|
}
|
|
225
235
|
else {
|
|
226
236
|
if (abortControllerRef.current !== undefined) {
|
|
227
|
-
// Cancel the previous request
|
|
228
237
|
abortControllerRef.current.abort();
|
|
229
238
|
}
|
|
230
|
-
// recreate a new AbortController for each call
|
|
231
239
|
let controller = new AbortController();
|
|
232
240
|
abortControllerRef.current = controller;
|
|
233
241
|
const clusterStatus = ` AND status not in ('Deprovisioned'${!showArchivedClusters ? ",'Archived'" : ''})`;
|
|
234
242
|
const searchPhrase = search
|
|
235
243
|
? ` AND (external_cluster_id ILIKE '%${search}%' OR display_name ILIKE '%${search}%' OR console_url ILIKE '%${search}%')`
|
|
236
244
|
: '';
|
|
237
|
-
// query language: https://github.com/yaacov/tree-search-language
|
|
238
245
|
clustersResponse = yield cloud.getAccountClustersSubscription({
|
|
239
246
|
order: 'display_name asc',
|
|
240
247
|
page,
|
|
@@ -265,7 +272,6 @@ function OpenshiftDropdownV4(props) {
|
|
|
265
272
|
};
|
|
266
273
|
}
|
|
267
274
|
catch (e) {
|
|
268
|
-
// silently fails
|
|
269
275
|
setIsFetchingClusters(false);
|
|
270
276
|
return { items: [], totalResult: 0, page: 1, total: 0 };
|
|
271
277
|
}
|
|
@@ -352,7 +358,6 @@ function OpenshiftDropdownV4(props) {
|
|
|
352
358
|
React.createElement("div", { className: `${props.className} form-group` },
|
|
353
359
|
React.createElement("label", { htmlFor: "case-details-cluster-nickname-selector" },
|
|
354
360
|
React.createElement(Trans, null, "OpenShift Cluster ID"),
|
|
355
|
-
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
|
|
356
361
|
!isExportingPDF ? React.createElement(CaseOpenShiftPopover, null) : ''),
|
|
357
362
|
React.createElement("span", { id: titleId, hidden: true }, "Select a state"),
|
|
358
363
|
React.createElement(Select, { id: "openshift-cluster-selector", isOpen: isOpen, selected: getSelectedItem(), onSelect: onSelect, onOpenChange: (nextOpen) => {
|
package/lib/esm/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"NonOrgCaseNotifyeesSelector.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseManagement/SendNotifications/NonOrgCaseNotifyeesSelector.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,oBAAoB,EAAY,MAAM,wBAAwB,CAAC;AAE9F,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,aAAa,EAAE,oBAAoB,EAAE,CAAC;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,aAAa,EAAE,oBAAoB,EAAE,KAAK,IAAI,CAAC;IAC1D,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC1C,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AA+BD,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBA2NxD"}
|
|
@@ -69,58 +69,52 @@ export function NonOrgCaseNotifyeesSelector(props) {
|
|
|
69
69
|
const onRemoveItem = (optionToRemove) => {
|
|
70
70
|
props.onChange && props.onChange([optionToRemove]);
|
|
71
71
|
};
|
|
72
|
+
const mapContactsToNotifyees = (rawContacts) => rawContacts
|
|
73
|
+
.filter((c) => !!c.ssoName)
|
|
74
|
+
.map((c) => {
|
|
75
|
+
const { ssoName } = c, rest = __rest(c, ["ssoName"]);
|
|
76
|
+
return Object.assign({ ssoUsername: ssoName }, rest);
|
|
77
|
+
});
|
|
78
|
+
const hasSelectedUsername = (mappedContacts) => mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
|
|
72
79
|
const onAddClick = () => __awaiter(this, void 0, void 0, function* () {
|
|
73
80
|
var _a, _b, _c, _d;
|
|
74
81
|
clearErrors();
|
|
75
|
-
const searchResults = yield request(props.accountNumber, inputVal,
|
|
76
|
-
// eslint-disable-next-line eqeqeq
|
|
77
|
-
props.groupNumber == '-1' ? null : props.groupNumber);
|
|
82
|
+
const searchResults = yield request(props.accountNumber, inputVal, props.groupNumber || null);
|
|
78
83
|
const { notificationAddress = { email: '' }, contacts = [] } = (_a = searchResults === null || searchResults === void 0 ? void 0 : searchResults[0]) !== null && _a !== void 0 ? _a : {};
|
|
79
84
|
if ((notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) && (contacts === null || contacts === void 0 ? void 0 : contacts.length)) {
|
|
80
|
-
const mappedContacts = contacts
|
|
81
|
-
|
|
82
|
-
.map((c) => {
|
|
83
|
-
const { ssoName } = c, rest = __rest(c, ["ssoName"]);
|
|
84
|
-
return Object.assign({ ssoUsername: ssoName }, rest);
|
|
85
|
-
});
|
|
86
|
-
const isUsernameAlreadySelected = mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
|
|
87
|
-
if (!isUsernameAlreadySelected) {
|
|
85
|
+
const mappedContacts = mapContactsToNotifyees(contacts);
|
|
86
|
+
if (!hasSelectedUsername(mappedContacts)) {
|
|
88
87
|
(_b = props.onChange) === null || _b === void 0 ? void 0 : _b.call(props, [...mappedContacts]);
|
|
89
88
|
}
|
|
90
89
|
setInputVal('');
|
|
91
90
|
setNotifyeesList([...mappedContacts, { emailAddress: notificationAddress.email }]);
|
|
91
|
+
return;
|
|
92
92
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const updatedSelection = [{ emailAddress: notificationAddress.email, caseNumber: '' }];
|
|
102
|
-
(_c = props.onChange) === null || _c === void 0 ? void 0 : _c.call(props, updatedSelection);
|
|
103
|
-
}
|
|
104
|
-
setInputVal('');
|
|
105
|
-
}
|
|
106
|
-
else if (contacts === null || contacts === void 0 ? void 0 : contacts.length) {
|
|
107
|
-
const mappedContacts = contacts
|
|
108
|
-
.filter((c) => !!c.ssoName)
|
|
109
|
-
.map((c) => {
|
|
110
|
-
const { ssoName } = c, rest = __rest(c, ["ssoName"]);
|
|
111
|
-
return Object.assign({ ssoUsername: ssoName }, rest);
|
|
112
|
-
});
|
|
113
|
-
const isUsernameAlreadySelected = mappedContacts.some((contact) => props.selectedItems.some((item) => isContact(item) && item.ssoUsername === contact.ssoUsername));
|
|
114
|
-
if (!isUsernameAlreadySelected) {
|
|
115
|
-
(_d = props.onChange) === null || _d === void 0 ? void 0 : _d.call(props, [...mappedContacts]);
|
|
116
|
-
}
|
|
117
|
-
setInputVal('');
|
|
93
|
+
if (notificationAddress === null || notificationAddress === void 0 ? void 0 : notificationAddress.email) {
|
|
94
|
+
const isEmailAlreadySelected = props.selectedItems.some((item) => {
|
|
95
|
+
var _a, _b;
|
|
96
|
+
return isCustomEmailAddress(item) &&
|
|
97
|
+
((_a = item.emailAddress) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === ((_b = notificationAddress.email) === null || _b === void 0 ? void 0 : _b.toLowerCase());
|
|
98
|
+
});
|
|
99
|
+
if (!isEmailAlreadySelected) {
|
|
100
|
+
(_c = props.onChange) === null || _c === void 0 ? void 0 : _c.call(props, [{ emailAddress: notificationAddress.email, caseNumber: '' }]);
|
|
118
101
|
}
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
102
|
+
setInputVal('');
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
if (contacts === null || contacts === void 0 ? void 0 : contacts.length) {
|
|
106
|
+
const mappedContacts = mapContactsToNotifyees(contacts);
|
|
107
|
+
if (!hasSelectedUsername(mappedContacts)) {
|
|
108
|
+
(_d = props.onChange) === null || _d === void 0 ? void 0 : _d.call(props, [...mappedContacts]);
|
|
123
109
|
}
|
|
110
|
+
setInputVal('');
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
if (loggedInUsersAccount.data.hasGroupACLs && props.groupNumber) {
|
|
114
|
+
setShowGroupPermissionError(true);
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
setShowAccountPermissionError(true);
|
|
124
118
|
}
|
|
125
119
|
});
|
|
126
120
|
const clearErrors = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAkBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBAqJtC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
1
2
|
import { Grid, GridItem } from '@patternfly/react-core';
|
|
2
3
|
import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
|
|
3
4
|
import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
@@ -8,21 +9,23 @@ import React, { useContext, useEffect } from 'react';
|
|
|
8
9
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
10
11
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
11
|
-
import CaseGroup from '../CaseInformation/CaseGroup';
|
|
12
|
+
// import CaseGroup from '../CaseInformation/CaseGroup';
|
|
12
13
|
import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
|
|
13
|
-
|
|
14
|
+
// TODO: Re-enable once phone number verification flow is fully supported with GraphQL
|
|
15
|
+
// import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
|
|
14
16
|
import Severity from '../CaseInformation/Severity';
|
|
15
17
|
import SupportLevel from '../CaseInformation/SupportLevel';
|
|
16
18
|
import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
|
|
17
|
-
import { Cep } from '../CaseManagement/Cep';
|
|
19
|
+
// import { Cep } from '../CaseManagement/Cep';
|
|
18
20
|
import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
|
|
19
21
|
import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
|
|
20
|
-
import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
|
|
22
|
+
// import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
|
|
21
23
|
import KtQuestions from '../ImproveCase/KtQuestions';
|
|
22
24
|
export default function IdeaInformation() {
|
|
23
25
|
const { t } = useTranslation();
|
|
24
26
|
const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
|
|
25
27
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
28
|
+
const apolloClient = useApolloClient();
|
|
26
29
|
const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
27
30
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
28
31
|
ownersCaseGroups: state.ownersCaseGroups,
|
|
@@ -48,13 +51,13 @@ export default function IdeaInformation() {
|
|
|
48
51
|
}
|
|
49
52
|
const allPromisses = [];
|
|
50
53
|
if (haventLoadedMetadata(allCaseTypes)) {
|
|
51
|
-
allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer,
|
|
54
|
+
allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, apolloClient));
|
|
52
55
|
}
|
|
53
56
|
if (haventLoadedMetadata(allCaseSeverities)) {
|
|
54
|
-
allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer,
|
|
57
|
+
allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, apolloClient));
|
|
55
58
|
}
|
|
56
59
|
if (haventLoadedMetadata(caseLanguages)) {
|
|
57
|
-
allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer));
|
|
60
|
+
allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer, apolloClient));
|
|
58
61
|
}
|
|
59
62
|
Promise.all(allPromisses);
|
|
60
63
|
}, [
|
|
@@ -66,6 +69,7 @@ export default function IdeaInformation() {
|
|
|
66
69
|
loggedInUserJwtToken,
|
|
67
70
|
selectedAccountDetails,
|
|
68
71
|
loggedInUsersAccount.data.secureSupport,
|
|
72
|
+
apolloClient,
|
|
69
73
|
]);
|
|
70
74
|
const onSeverityChange = (payload) => {
|
|
71
75
|
setCaseDetails(caseDispatch, payload);
|
|
@@ -97,14 +101,9 @@ export default function IdeaInformation() {
|
|
|
97
101
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
98
102
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xl" },
|
|
99
103
|
React.createElement(ContactPhoneNumber, null))),
|
|
100
|
-
React.createElement(ContactPhoneNumberAlert, null),
|
|
101
104
|
React.createElement(Grid, { hasGutter: true },
|
|
102
105
|
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
103
|
-
React.createElement(CaseLanguageSelector, { isManageStep: true })),
|
|
104
|
-
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
|
|
105
|
-
React.createElement(CaseGroup, { init: true }))),
|
|
106
|
-
React.createElement(CaseContactSelector, null),
|
|
106
|
+
React.createElement(CaseLanguageSelector, { isManageStep: true }))),
|
|
107
107
|
React.createElement(RHAssociatesSelector, null),
|
|
108
|
-
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true })
|
|
109
|
-
React.createElement(Cep, null))))));
|
|
108
|
+
React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }))))));
|
|
110
109
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,MAAM,CAAC,OAAO,UAAU,uBAAuB,sBAkM9C"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useApolloClient } from '@apollo/client/react';
|
|
1
2
|
import { Bullseye, Card, CardBody, Gallery, GalleryItem, Split, SplitItem } from '@patternfly/react-core';
|
|
2
3
|
import { LoadingIndicator } from '@rh-support/components';
|
|
3
4
|
import { fetchCaseTypes, useGlobalDispatchContext, useGlobalStateContext } from '@rh-support/react-context';
|
|
@@ -11,8 +12,9 @@ import { getUpdatedDescription } from '../../reducers/CaseHelpers';
|
|
|
11
12
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
12
13
|
import { BugIcon, CertificationIcon, CustomerServiceIcon, DocumentationIcon, GearIcon, IdeaIcon, RcaIcon, } from './SupportTypeIcons';
|
|
13
14
|
export default function SupportTypeSelectorPage() {
|
|
14
|
-
const { globalMetadataState: { allCaseTypes
|
|
15
|
+
const { globalMetadataState: { allCaseTypes }, } = useGlobalStateContext();
|
|
15
16
|
const globalDispatch = useGlobalDispatchContext();
|
|
17
|
+
const apolloClient = useApolloClient();
|
|
16
18
|
const [selectedSupportType, setSelectedSupportType] = useState('');
|
|
17
19
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
18
20
|
const { caseType, isFetchingSelectedAccountDetails, issue, timeFramesAndUrgency, v3ClusterName } = useCaseSelector((state) => ({
|
|
@@ -27,7 +29,7 @@ export default function SupportTypeSelectorPage() {
|
|
|
27
29
|
useEffect(() => {
|
|
28
30
|
if (haventLoadedMetadata(allCaseTypes)) {
|
|
29
31
|
// Load support types.
|
|
30
|
-
fetchCaseTypes(globalDispatch,
|
|
32
|
+
fetchCaseTypes(globalDispatch, apolloClient);
|
|
31
33
|
}
|
|
32
34
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
33
35
|
}, []);
|