@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
|
@@ -7,9 +7,11 @@ 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 { useDebounce } from '@rh-support/components';
|
|
11
12
|
import { GlobalMetadataStateContext, useUserPreferences } from '@rh-support/react-context';
|
|
12
13
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
+
import { GET_ACCOUNT_CONTACTS, resolveProductServiceLevelsForAccount, } from '@rh-support/utils';
|
|
13
15
|
import findIndex from 'lodash/findIndex';
|
|
14
16
|
import includes from 'lodash/includes';
|
|
15
17
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -23,7 +25,7 @@ import { TCDispatchContext, TCStateContext } from '../../context/TopContentConte
|
|
|
23
25
|
import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
|
|
24
26
|
import { CASE_DEATILS_SOURCE_REFERRER_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
25
27
|
import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
|
|
26
|
-
import { setCaseAccountNumber, setCaseDetails, setCaseOwner } from '../../reducers/CaseReducer';
|
|
28
|
+
import { fetchCaseGroupsForContactGraphQL, setCaseAccountNumber, setCaseDetails, setCaseOwner, setCaseState, } from '../../reducers/CaseReducer';
|
|
27
29
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
28
30
|
import { setActiveSectionChanged, setRouteFlags, updateisNextBtnClickedToShowValidationError, } from '../../reducers/RouteReducer';
|
|
29
31
|
import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
|
|
@@ -34,23 +36,33 @@ import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentR
|
|
|
34
36
|
export function GlobalTroubleshootEffects(props) {
|
|
35
37
|
const [initDefaultSection, setInitDefaultSection] = useState(false);
|
|
36
38
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
37
|
-
const { globalMetadataState: { allProducts, loggedInUser, managedAccounts, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
39
|
+
const { globalMetadataState: { allProducts, loggedInUser, managedAccounts, loggedInUserRights, loggedInUsersAccount, loggedInUserJwtToken, }, } = useContext(GlobalMetadataStateContext);
|
|
38
40
|
const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
|
|
39
|
-
const { accountNumber, product, version,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
41
|
+
const { accountNumber, contactSsoUsername, product, version, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType, language, selectedAccountDetails, selectedOwnerContactId, selectedOwnerDefaultCaseGroup, selectedOwnerIsOrgAdmin, groupNumber, } = useCaseSelector((state) => {
|
|
42
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
43
|
+
return ({
|
|
44
|
+
accountNumber: state.caseDetails.accountNumberRef,
|
|
45
|
+
contactSsoUsername: state.caseDetails.contactSSOName,
|
|
46
|
+
product: state.caseDetails.product,
|
|
47
|
+
version: state.caseDetails.version,
|
|
48
|
+
summary: state.caseDetails.summary,
|
|
49
|
+
issue: state.caseDetails.issue,
|
|
50
|
+
environment: state.caseDetails.environment,
|
|
51
|
+
periodicityOfIssue: state.caseDetails.periodicityOfIssue,
|
|
52
|
+
timeFramesAndUrgency: state.caseDetails.timeFramesAndUrgency,
|
|
53
|
+
caseType: state.caseDetails.caseType,
|
|
54
|
+
language: state.caseDetails.caseLanguage,
|
|
55
|
+
selectedAccountDetails: state.selectedAccountDetails,
|
|
56
|
+
selectedOwnerContactId: (_b = (_a = state.selectedOwner) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.id,
|
|
57
|
+
selectedOwnerDefaultCaseGroup: (_d = (_c = state.selectedOwner) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.defaultCaseGroup,
|
|
58
|
+
selectedOwnerIsOrgAdmin: (_g = (_f = (_e = state.selectedOwner) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.isOrgAdmin) !== null && _g !== void 0 ? _g : false,
|
|
59
|
+
groupNumber: state.caseDetails.groupNumber,
|
|
60
|
+
});
|
|
61
|
+
}, isEqual);
|
|
53
62
|
const caseDispatch = useCaseDispatch();
|
|
63
|
+
const apolloClient = useApolloClient();
|
|
64
|
+
const groupNumberRef = useRef(groupNumber);
|
|
65
|
+
groupNumberRef.current = groupNumber;
|
|
54
66
|
const isCaseCreate = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
|
|
55
67
|
const urlQueryParams = RouteUtils.getQueryParams(props.routeProps);
|
|
56
68
|
const isFirstMount = useRef(true);
|
|
@@ -155,20 +167,86 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
155
167
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
156
168
|
}, [dispatchToRouteReducer, props.routeProps.location.pathname, isCaseCreate, isSearchIntent]);
|
|
157
169
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
170
|
+
* Auto-populate account and owner for external users.
|
|
171
|
+
* For org admin: dropdowns are visible but disabled — sets initial values.
|
|
172
|
+
* For non-org admin: dropdowns are hidden — fires the same queries in background.
|
|
161
173
|
*/
|
|
162
174
|
useEffect(() => {
|
|
163
|
-
|
|
175
|
+
var _a, _b;
|
|
176
|
+
if (isEmpty(loggedInUserRights.data))
|
|
177
|
+
return;
|
|
178
|
+
if (loggedInUserRights.data.isInternal())
|
|
164
179
|
return;
|
|
165
|
-
|
|
166
|
-
|
|
180
|
+
const resolvedAccountNumber = ((_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.accountNumber) ||
|
|
181
|
+
loggedInUserRights.data.getAccountNumber() ||
|
|
182
|
+
(loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.account_number) ||
|
|
183
|
+
'';
|
|
184
|
+
if (isEmpty(accountNumber) && !isEmpty(resolvedAccountNumber)) {
|
|
185
|
+
const hasFullAccountData = !isEmpty((_b = loggedInUsersAccount.data) === null || _b === void 0 ? void 0 : _b.accountNumber);
|
|
186
|
+
setCaseAccountNumber(caseDispatch, resolvedAccountNumber, hasFullAccountData, hasFullAccountData ? loggedInUsersAccount.data : {}, apolloClient);
|
|
187
|
+
}
|
|
188
|
+
if (isEmpty(contactSsoUsername)) {
|
|
167
189
|
setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), product, undefined, undefined, true, undefined, true, undefined, undefined, loggedInUserRights.data.isInternal()
|
|
168
190
|
? accountNumber || loggedInUserRights.data.getAccountNumber()
|
|
169
191
|
: undefined);
|
|
192
|
+
}
|
|
170
193
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
171
|
-
}, [
|
|
194
|
+
}, [
|
|
195
|
+
caseDispatch,
|
|
196
|
+
loggedInUserRights.data,
|
|
197
|
+
loggedInUsersAccount.data,
|
|
198
|
+
apolloClient,
|
|
199
|
+
accountNumber,
|
|
200
|
+
contactSsoUsername,
|
|
201
|
+
]);
|
|
202
|
+
useEffect(() => {
|
|
203
|
+
if (isEmpty(loggedInUserRights.data) || loggedInUserRights.data.isInternal())
|
|
204
|
+
return;
|
|
205
|
+
if (isEmpty(accountNumber) || isEmpty(contactSsoUsername))
|
|
206
|
+
return;
|
|
207
|
+
if (selectedAccountDetails.isFetching)
|
|
208
|
+
return;
|
|
209
|
+
if (selectedOwnerContactId)
|
|
210
|
+
return;
|
|
211
|
+
const ownerSso = loggedInUserRights.data.getSSOUsername();
|
|
212
|
+
const fetchContacts = () => __awaiter(this, void 0, void 0, function* () {
|
|
213
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
214
|
+
try {
|
|
215
|
+
const { data } = yield apolloClient.query({
|
|
216
|
+
query: GET_ACCOUNT_CONTACTS,
|
|
217
|
+
variables: {
|
|
218
|
+
accountNumber: { eq: accountNumber },
|
|
219
|
+
first: 200,
|
|
220
|
+
orderBy: { Name: { order: 'ASC' } },
|
|
221
|
+
},
|
|
222
|
+
});
|
|
223
|
+
const response = data;
|
|
224
|
+
const contactEdges = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.SalesforceSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Contacts) === null || _g === void 0 ? void 0 : _g.edges) !== null && _h !== void 0 ? _h : [];
|
|
225
|
+
const matchingContact = contactEdges.find(({ node }) => { var _a, _b; return ((_b = (_a = node.SSOUserName__c) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === (ownerSso === null || ownerSso === void 0 ? void 0 : ownerSso.toLowerCase()); });
|
|
226
|
+
if ((_j = matchingContact === null || matchingContact === void 0 ? void 0 : matchingContact.node) === null || _j === void 0 ? void 0 : _j.Id) {
|
|
227
|
+
const ownerWithId = Object.assign(Object.assign({}, loggedInUserRights.data.getHydraContactFromLoggedInUser()), { id: matchingContact.node.Id, defaultCaseGroup: (_l = (_k = matchingContact.node.DefaultCaseGroup__c) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : null });
|
|
228
|
+
setCaseState(caseDispatch, {
|
|
229
|
+
selectedOwner: { data: ownerWithId, isFetching: false, isError: false, errorMessage: '' },
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
catch (e) {
|
|
234
|
+
// Contact fetch failed; case proceeds with owner from JWT
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
fetchContacts();
|
|
238
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
239
|
+
}, [accountNumber, contactSsoUsername, selectedAccountDetails.isFetching, selectedOwnerContactId]);
|
|
240
|
+
/**
|
|
241
|
+
* Fetch case groups for the selected owner's contactId.
|
|
242
|
+
* Filters groups where the contact is a member via GET_CASE_GROUP.
|
|
243
|
+
*/
|
|
244
|
+
useEffect(() => {
|
|
245
|
+
if (isEmpty(accountNumber) || isEmpty(selectedOwnerContactId))
|
|
246
|
+
return;
|
|
247
|
+
fetchCaseGroupsForContactGraphQL(caseDispatch, apolloClient, selectedOwnerContactId, accountNumber, selectedOwnerDefaultCaseGroup, selectedOwnerIsOrgAdmin, groupNumberRef.current);
|
|
248
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
249
|
+
}, [selectedOwnerContactId, accountNumber]);
|
|
172
250
|
/**
|
|
173
251
|
* handling top content call
|
|
174
252
|
*/
|
|
@@ -180,6 +258,22 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
180
258
|
return;
|
|
181
259
|
fetchTopContent(tcDispatch, { product, version });
|
|
182
260
|
}, [product, tcDispatch, topContentPayload, version]);
|
|
261
|
+
useEffect(() => {
|
|
262
|
+
if (isEmpty(product) || selectedAccountDetails.isFetching || isEmpty(selectedAccountDetails.data))
|
|
263
|
+
return;
|
|
264
|
+
const serviceLevels = resolveProductServiceLevelsForAccount(selectedAccountDetails.data, allProducts.data.productsResult, product);
|
|
265
|
+
if (!serviceLevels)
|
|
266
|
+
return;
|
|
267
|
+
setCaseState(caseDispatch, {
|
|
268
|
+
productServiceLevel: serviceLevels.productServiceLevel,
|
|
269
|
+
otherServiceLevels: serviceLevels.otherServiceLevels,
|
|
270
|
+
selectedEntitlementId: serviceLevels.defaultEntitlementId,
|
|
271
|
+
});
|
|
272
|
+
if (serviceLevels.entitlementSla) {
|
|
273
|
+
setCaseDetails(caseDispatch, { entitlementSla: serviceLevels.entitlementSla });
|
|
274
|
+
}
|
|
275
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
276
|
+
}, [product, selectedAccountDetails.data, allProducts.data.productsResult]);
|
|
183
277
|
// set case language to preferred language
|
|
184
278
|
useEffect(() => {
|
|
185
279
|
const userOriginalPreferredLanguage = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -256,11 +350,13 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
256
350
|
* each case create. Currently we refetch the account details when user clicks on troubleshoot a new session
|
|
257
351
|
*/
|
|
258
352
|
useEffect(() => {
|
|
353
|
+
if (loggedInUserRights.data.isInternal())
|
|
354
|
+
return;
|
|
259
355
|
if (!isEmpty(loggedInUsersAccount.data) &&
|
|
260
356
|
!isEmpty(selectedAccountDetails.data) &&
|
|
261
357
|
loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber) &&
|
|
262
358
|
!isEqual(loggedInUsersAccount.data, selectedAccountDetails.data)) {
|
|
263
|
-
setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data);
|
|
359
|
+
setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data, apolloClient);
|
|
264
360
|
}
|
|
265
361
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
266
362
|
}, [loggedInUsersAccount.data]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAcvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAoLzC"}
|
|
@@ -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 { Grid, GridItem } from '@patternfly/react-core';
|
|
11
12
|
import { SupportFeedbackForm } from '@rh-support/components';
|
|
12
13
|
import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
@@ -37,10 +38,9 @@ export function WizardLayout(props) {
|
|
|
37
38
|
const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
|
|
38
39
|
const { getMetadata } = useMetadata();
|
|
39
40
|
const [isAIChatMode, setIsAIChatMode] = useState(false);
|
|
40
|
-
const { caseCreationError,
|
|
41
|
+
const { caseCreationError, caseType, product, caseState, hasInvalidEntitlements } = useCaseSelector((state) => ({
|
|
41
42
|
caseState: state,
|
|
42
43
|
caseCreationError: state.caseCreationError,
|
|
43
|
-
contactSSOName: state.caseDetails.contactSSOName,
|
|
44
44
|
caseType: state.caseDetails.caseType,
|
|
45
45
|
product: state.caseDetails.product,
|
|
46
46
|
hasInvalidEntitlements: state.hasInvalidEntitlements,
|
|
@@ -50,6 +50,7 @@ export function WizardLayout(props) {
|
|
|
50
50
|
const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
|
|
51
51
|
const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
52
52
|
const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
|
|
53
|
+
const apolloClient = useApolloClient();
|
|
53
54
|
const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
|
|
54
55
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
55
56
|
const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
|
|
@@ -101,7 +102,7 @@ export function WizardLayout(props) {
|
|
|
101
102
|
"Try submitting again after a minute. Please ",
|
|
102
103
|
React.createElement(SupportFeedbackForm, { isInline: true }),
|
|
103
104
|
" if you continue to see this message.")));
|
|
104
|
-
submitCase(caseDispatch, sessionRestoreDispatch, caseState, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false, RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true', sessionItem);
|
|
105
|
+
submitCase(caseDispatch, sessionRestoreDispatch, caseState, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false, RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true', sessionItem, apolloClient);
|
|
105
106
|
// reset viewedModals on case submit
|
|
106
107
|
viewedConfirmationModalsList.current = [];
|
|
107
108
|
!isReSubmitting &&
|
|
@@ -120,11 +121,9 @@ export function WizardLayout(props) {
|
|
|
120
121
|
}
|
|
121
122
|
setConfirmationModalType(null);
|
|
122
123
|
};
|
|
123
|
-
// Loading app metadata
|
|
124
124
|
useEffect(() => {
|
|
125
|
-
fetchProducts(dispatchToGlobalMetadataReducer,
|
|
126
|
-
|
|
127
|
-
}, [contactSSOName, dispatchToGlobalMetadataReducer]);
|
|
125
|
+
fetchProducts(dispatchToGlobalMetadataReducer, apolloClient);
|
|
126
|
+
}, [dispatchToGlobalMetadataReducer, apolloClient]);
|
|
128
127
|
return (React.createElement(React.Fragment, null,
|
|
129
128
|
React.createElement(GlobalTroubleshootEffects, { routeProps: props.routeProps }),
|
|
130
129
|
activeSection !== AppRouteSections.DESCRIBE_IDEA && (React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: () => submitCaseAndNavigate(caseCreationError) })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAUvD,OAAO,EAAoB,eAAe,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM3G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,UAAU,EAAE,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC3C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,mBAAmB,EAAE,CAAC,gCAAgC,EAAE,OAAO,KAAK,IAAI,CAAC;IACzE,gBAAgB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,0BAA0B,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC5E,kCAAkC,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACpF,qCAAqC,CAAC,EAAE,OAAO,CAAC;IAChD,gCAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA+atC;kBA/aQ,gBAAgB;;;AAibzB,eAAe,gBAAgB,CAAC"}
|
|
@@ -12,7 +12,6 @@ import { Button, ButtonVariant, WizardFooterWrapper } from '@patternfly/react-co
|
|
|
12
12
|
import { useFetch, usePrevious } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
|
|
14
14
|
import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, isFunctionalCookieAccepted, PreviousToNewCaseTypeMap, scrollIntoView, } from '@rh-support/utils';
|
|
15
|
-
import find from 'lodash/find';
|
|
16
15
|
import isEmpty from 'lodash/isEmpty';
|
|
17
16
|
import isEqual from 'lodash/isEqual';
|
|
18
17
|
import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
@@ -32,14 +31,15 @@ import { RecommendationFeedbackModal } from '../Recommendations/RecommendationFe
|
|
|
32
31
|
import { useIsSectionValid } from '../shared/useIsSectionValid';
|
|
33
32
|
const defaultProps = {};
|
|
34
33
|
function WizardNavigation(props) {
|
|
35
|
-
var _a, _b;
|
|
36
34
|
const { t } = useTranslation();
|
|
37
35
|
const { isVariationA } = useAB();
|
|
38
36
|
const canCreateCase = useCanCreateCase();
|
|
39
37
|
const { recommendationState } = useContext(RecommendationStateContext);
|
|
40
38
|
const aiResponseState = useAIResponseState();
|
|
41
|
-
const { routeState: { activeSection, isNextBtnClickedToShowValidationError,
|
|
42
|
-
|
|
39
|
+
const { routeState: { activeSection, isNextBtnClickedToShowValidationError,
|
|
40
|
+
// noValidEntitlement,
|
|
41
|
+
isCaseCreate, }, } = useContext(RouteContext);
|
|
42
|
+
const { globalMetadataState: { loggedInUsersAccount, navBarRef }, } = useContext(GlobalMetadataStateContext);
|
|
43
43
|
const { caseState, issue, summary, product, version, caseType } = useCaseSelector((state) => ({
|
|
44
44
|
caseState: state,
|
|
45
45
|
issue: state.caseDetails.issue,
|
|
@@ -49,8 +49,11 @@ function WizardNavigation(props) {
|
|
|
49
49
|
caseType: state.caseDetails.caseType,
|
|
50
50
|
manageSupportCases: state.selectedOwner.data.manageSupportCases,
|
|
51
51
|
}), isEqual);
|
|
52
|
-
//
|
|
53
|
-
const isEntitledProduct =
|
|
52
|
+
// isEntitledProduct — commented out; product-level entitlement now resolved from SFDCProductJSON__c
|
|
53
|
+
// const isEntitledProduct = find(
|
|
54
|
+
// allProducts?.data?.productsResult,
|
|
55
|
+
// (p) => p.product === caseState.caseDetails.product
|
|
56
|
+
// )?.isEntitledProduct;
|
|
54
57
|
const dispatchToRouteReducer = useContext(RouteDispatchContext);
|
|
55
58
|
const { activeSectionError, isSectionValidFn } = useIsSectionValid(activeSection);
|
|
56
59
|
const [isRecsModalVisible, setIsRecsModalVisible] = useState(false);
|
|
@@ -251,7 +254,6 @@ function WizardNavigation(props) {
|
|
|
251
254
|
}
|
|
252
255
|
catch (e) { }
|
|
253
256
|
});
|
|
254
|
-
const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
|
|
255
257
|
const nextButtonDisabledLogic = () => {
|
|
256
258
|
const isLoadingARH = props.isLoadingARH &&
|
|
257
259
|
props.activeStep.id === AppRouteSections.RESOURCES &&
|
|
@@ -263,11 +265,10 @@ function WizardNavigation(props) {
|
|
|
263
265
|
let value = isLoadingARH ||
|
|
264
266
|
((isEmpty(summary) || isEmpty(issue) || isEmpty(product) || isEmpty(version)) &&
|
|
265
267
|
props.activeStep.id === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT)) ||
|
|
266
|
-
(!isEntitledProductLocal && props.activeStep.nextButtonLabel === 'Get support') ||
|
|
267
268
|
props.activeStep.nextButtonLabel === 'Troubleshoot' ||
|
|
268
269
|
!!activeSectionError ||
|
|
269
270
|
(isSectionValidFn && !isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
|
|
270
|
-
noValidEntitlement ||
|
|
271
|
+
// noValidEntitlement ||
|
|
271
272
|
isLoadingRecs;
|
|
272
273
|
return value;
|
|
273
274
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContext.d.ts","sourceRoot":"","sources":["../../../src/context/CaseContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAqE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGxH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAoB,MAAM,6BAA6B,CAAC;AAK5F,eAAO,MAAM,gBAAgB,oEAAiF,CAAC;AAC/G,eAAO,MAAM,YAAY,0DAAiE,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseContext.d.ts","sourceRoot":"","sources":["../../../src/context/CaseContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAqE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAGxH,OAAO,EAAE,eAAe,EAAE,UAAU,EAAoB,MAAM,6BAA6B,CAAC;AAK5F,eAAO,MAAM,gBAAgB,oEAAiF,CAAC;AAC/G,eAAO,MAAM,YAAY,0DAAiE,CAAC;AAE3F,eAAO,MAAM,eAAe,iDAAoE,CAAC;AACjG,eAAO,MAAM,eAAe,iJAAoE,CAAC;AAGjG,wBAAgB,mBAAmB,CAAC,EAAE,QAAQ,EAAE;;CAAA,qBAM/C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createRMECaseEscalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/mutations/createRMECaseEscalation.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,uCAsBtC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { gql } from '@apollo/client/core';
|
|
2
|
+
export const CREATE_RME_CASE_ESCALATION = gql `
|
|
3
|
+
mutation CreateRMECaseEscalation($caseInput: SalesforceSupportCaseCreateRepresentation!) {
|
|
4
|
+
salesforce_support_uiapi {
|
|
5
|
+
CaseCreate(input: { SalesforceSupportCase: $caseInput }) {
|
|
6
|
+
SalesforceSupportRecord {
|
|
7
|
+
Id
|
|
8
|
+
CaseNumber {
|
|
9
|
+
value
|
|
10
|
+
}
|
|
11
|
+
Status {
|
|
12
|
+
value
|
|
13
|
+
}
|
|
14
|
+
Subject {
|
|
15
|
+
value
|
|
16
|
+
}
|
|
17
|
+
ParentId {
|
|
18
|
+
value
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/mutations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CREATE_RME_CASE_ESCALATION } from './createRMECaseEscalation';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getEscalationDetails.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getEscalationDetails.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,uCAsBlC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { gql } from '@apollo/client/core';
|
|
2
|
+
export const GET_ESCALATION_DETAILS = gql `
|
|
3
|
+
query getEscalationDetails($where: SalesforceSupportCase_Filter) {
|
|
4
|
+
salesforce_support_uiapi {
|
|
5
|
+
query {
|
|
6
|
+
SalesforceSupportCase(where: $where) {
|
|
7
|
+
edges {
|
|
8
|
+
node {
|
|
9
|
+
CaseNumber {
|
|
10
|
+
value
|
|
11
|
+
}
|
|
12
|
+
Subject {
|
|
13
|
+
value
|
|
14
|
+
}
|
|
15
|
+
Status {
|
|
16
|
+
value
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getParentId.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getParentId.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,uCAczB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { gql } from '@apollo/client/core';
|
|
2
|
+
export const GET_PARENT_ID = gql `
|
|
3
|
+
query Query($where: SalesforceSupportCase_Filter) {
|
|
4
|
+
salesforce_support_uiapi {
|
|
5
|
+
query {
|
|
6
|
+
SalesforceSupportCase(where: $where) {
|
|
7
|
+
edges {
|
|
8
|
+
node {
|
|
9
|
+
Id
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export interface GetParentIdVariables {
|
|
2
|
+
where: {
|
|
3
|
+
CaseNumber: {
|
|
4
|
+
eq: string;
|
|
5
|
+
};
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export interface GetParentIdResponse {
|
|
9
|
+
salesforce_support_uiapi: {
|
|
10
|
+
query: {
|
|
11
|
+
SalesforceSupportCase: {
|
|
12
|
+
edges: Array<{
|
|
13
|
+
node: {
|
|
14
|
+
Id: string;
|
|
15
|
+
};
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export interface CreateRMECaseEscalationVariables {
|
|
22
|
+
caseInput: {
|
|
23
|
+
Subject: string;
|
|
24
|
+
Description: string;
|
|
25
|
+
Status: string;
|
|
26
|
+
Origin: string;
|
|
27
|
+
Priority: string;
|
|
28
|
+
Type: string;
|
|
29
|
+
RecordTypeId: string;
|
|
30
|
+
ParentId: string;
|
|
31
|
+
EscalationCategory__c: string;
|
|
32
|
+
ImpactOnUserOrBusiness__c: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export interface CreateRMECaseEscalationResponse {
|
|
36
|
+
salesforce_support_uiapi: {
|
|
37
|
+
CaseCreate: {
|
|
38
|
+
SalesforceSupportRecord: {
|
|
39
|
+
Id: string;
|
|
40
|
+
CaseNumber: {
|
|
41
|
+
value: string;
|
|
42
|
+
};
|
|
43
|
+
Status: {
|
|
44
|
+
value: string;
|
|
45
|
+
};
|
|
46
|
+
Subject: {
|
|
47
|
+
value: string;
|
|
48
|
+
};
|
|
49
|
+
ParentId: {
|
|
50
|
+
value: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export interface GetEscalationDetailsVariables {
|
|
57
|
+
where: {
|
|
58
|
+
ParentId: {
|
|
59
|
+
eq: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export interface GetEscalationDetailsResponse {
|
|
64
|
+
salesforce_support_uiapi: {
|
|
65
|
+
query: {
|
|
66
|
+
SalesforceSupportCase: {
|
|
67
|
+
edges: Array<{
|
|
68
|
+
node: {
|
|
69
|
+
CaseNumber: {
|
|
70
|
+
value: string;
|
|
71
|
+
};
|
|
72
|
+
Subject: {
|
|
73
|
+
value: string;
|
|
74
|
+
};
|
|
75
|
+
Status: {
|
|
76
|
+
value: string;
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
}>;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=escalation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"escalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/schemas/escalation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE;QACH,UAAU,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9B,CAAC;CACL;AAED,MAAM,WAAW,mBAAmB;IAChC,wBAAwB,EAAE;QACtB,KAAK,EAAE;YACH,qBAAqB,EAAE;gBACnB,KAAK,EAAE,KAAK,CAAC;oBACT,IAAI,EAAE;wBACF,EAAE,EAAE,MAAM,CAAC;qBACd,CAAC;iBACL,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;CACL;AAED,MAAM,WAAW,gCAAgC;IAC7C,SAAS,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,WAAW,EAAE,MAAM,CAAC;QACpB,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,YAAY,EAAE,MAAM,CAAC;QACrB,QAAQ,EAAE,MAAM,CAAC;QACjB,qBAAqB,EAAE,MAAM,CAAC;QAC9B,yBAAyB,EAAE,MAAM,CAAC;KACrC,CAAC;CACL;AAED,MAAM,WAAW,+BAA+B;IAC5C,wBAAwB,EAAE;QACtB,UAAU,EAAE;YACR,uBAAuB,EAAE;gBACrB,EAAE,EAAE,MAAM,CAAC;gBACX,UAAU,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;gBAC9B,MAAM,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;gBAC1B,OAAO,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;gBAC3B,QAAQ,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;aAC/B,CAAC;SACL,CAAC;KACL,CAAC;CACL;AAED,MAAM,WAAW,6BAA6B;IAC1C,KAAK,EAAE;QACH,QAAQ,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KAC5B,CAAC;CACL;AAED,MAAM,WAAW,4BAA4B;IACzC,wBAAwB,EAAE;QACtB,KAAK,EAAE;YACH,qBAAqB,EAAE;gBACnB,KAAK,EAAE,KAAK,CAAC;oBACT,IAAI,EAAE;wBACF,UAAU,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBAC9B,OAAO,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBAC3B,MAAM,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;qBAC7B,CAAC;iBACL,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './escalation';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TypedDocumentNode } from '@apollo/client/core';
|
|
2
|
+
import { ICreateCaseCommentResponse, ICreateCaseCommentVariables } from './types';
|
|
3
|
+
export declare const CREATE_CASE_COMMENT: TypedDocumentNode<ICreateCaseCommentResponse, ICreateCaseCommentVariables>;
|
|
4
|
+
//# sourceMappingURL=caseCommentMutation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caseCommentMutation.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCaseComments/caseCommentMutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,0BAA0B,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAElF,eAAO,MAAM,mBAAmB,EAAE,iBAAiB,CAAC,0BAA0B,EAAE,2BAA2B,CAU1G,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { gql } from '@apollo/client/core';
|
|
2
|
+
export const CREATE_CASE_COMMENT = gql `
|
|
3
|
+
mutation CreateCaseComment($commentInput: SalesforceSupportCaseComment__cCreateRepresentation!) {
|
|
4
|
+
salesforce_support_uiapi {
|
|
5
|
+
CaseComment__cCreate(input: { SalesforceSupportCaseComment__c: $commentInput }) {
|
|
6
|
+
SalesforceSupportRecord {
|
|
7
|
+
Id
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
`;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TypedDocumentNode } from '@apollo/client/core';
|
|
2
|
+
import { ICaseCommentsVariables, IGetCaseCommentsQueryResponse } from './types';
|
|
3
|
+
export declare const GET_CASE_COMMENTS: TypedDocumentNode<IGetCaseCommentsQueryResponse, ICaseCommentsVariables>;
|
|
4
|
+
//# sourceMappingURL=caseCommentsQuery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caseCommentsQuery.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useCaseComments/caseCommentsQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAEhF,eAAO,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,6BAA6B,EAAE,sBAAsB,CAqDtG,CAAC"}
|