@rh-support/troubleshoot 2.6.287 → 2.6.295
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/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +42 -12
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +7 -5
- 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 +14 -10
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +24 -18
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +9 -6
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +7 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +38 -34
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +9 -9
- 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/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/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +3 -2
- 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 -9
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +11 -12
- 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 +19 -53
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +16 -18
- 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.js +1 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +50 -64
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +106 -23
- 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/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/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +18 -11
- package/lib/esm/reducers/CaseConstNTypes.d.ts +86 -2
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +5 -0
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +3 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +22 -5
- package/lib/esm/reducers/CaseHelpers.d.ts +2 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +34 -2
- 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 +27 -8
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +113 -29
- package/package.json +5 -5
|
@@ -6,13 +6,16 @@ import { IContact } from '@cee-eng/hydrajs/@types/models/contact';
|
|
|
6
6
|
import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
7
7
|
import { IApiResponseDetails } from '@rh-support/types/shared';
|
|
8
8
|
import { UserAuth } from '@rh-support/user-permissions';
|
|
9
|
-
import {
|
|
9
|
+
import { IGraphQLCaseUpdateInput } from '@rh-support/utils';
|
|
10
|
+
import { CaseReducerDispatchType, ICaseDetailsState, ICaseState } from './CaseConstNTypes';
|
|
10
11
|
import { SessionReducerDispatchType } from './SessionRestoreReducer';
|
|
11
12
|
export declare const caseReducer: (pState: ICaseState, action: any) => ICaseState;
|
|
12
|
-
export declare const setCaseDetails: (dispatch: CaseReducerDispatchType, caseState: Partial<
|
|
13
|
+
export declare const setCaseDetails: (dispatch: CaseReducerDispatchType, caseState: Partial<ICaseDetailsState>) => void;
|
|
13
14
|
export declare const setCaseState: (dispatch: CaseReducerDispatchType, caseState: Partial<ICaseState>) => void;
|
|
14
15
|
export declare const setNotifiedUser: (dispatch: CaseReducerDispatchType, selectedNotificationContacts: IContact[]) => void;
|
|
15
|
-
export declare const submitCase: (dispatch: CaseReducerDispatchType, sessionRestoreDispatch: SessionReducerDispatchType, caseDetails: ICaseState, isCaseCreate: boolean, errorMessage500: string | JSX.Element, loggedInUserSsoUsername: string, isSecureSupport: boolean, isResubmit: boolean, isCreatingCaseFlow: boolean, sessionItem?: ISessionItem
|
|
16
|
+
export declare const submitCase: (dispatch: CaseReducerDispatchType, sessionRestoreDispatch: SessionReducerDispatchType, caseDetails: ICaseState, isCaseCreate: boolean, errorMessage500: string | JSX.Element, loggedInUserSsoUsername: string, isSecureSupport: boolean, isResubmit: boolean, isCreatingCaseFlow: boolean, sessionItem?: ISessionItem, apolloClient?: {
|
|
17
|
+
mutate: (options: any) => Promise<any>;
|
|
18
|
+
}) => Promise<void>;
|
|
16
19
|
/**
|
|
17
20
|
* Update case details if there is HTTP 500 error while submitting case
|
|
18
21
|
* @param dispatch CaseReducerDispatchType
|
|
@@ -35,21 +38,37 @@ export declare const submitNotifiedUser: (dispatch: CaseReducerDispatchType, cas
|
|
|
35
38
|
export declare const deleteNotifiedUsers: (dispatch: CaseReducerDispatchType, caseNumber: string, ssoUsernames: string[]) => Promise<void>;
|
|
36
39
|
export declare const addingNotifiedUsers: (dispatch: CaseReducerDispatchType, caseNumber: string, addedUsers: IContact[]) => Promise<void>;
|
|
37
40
|
export declare const clearSelectedAccount: (dispatch: CaseReducerDispatchType) => void;
|
|
38
|
-
export declare const setCaseAccountNumber: (dispatch: CaseReducerDispatchType, accountNumber: string, isLoggedInUsersAccount?: boolean, loggedInUserAccount?: Partial<IAccount
|
|
41
|
+
export declare const setCaseAccountNumber: (dispatch: CaseReducerDispatchType, accountNumber: string, isLoggedInUsersAccount?: boolean, loggedInUserAccount?: Partial<IAccount>, apolloClient?: {
|
|
42
|
+
query: (options: any) => Promise<any>;
|
|
43
|
+
}) => Promise<void>;
|
|
39
44
|
export declare const fetchCaseGroupsForAccount: (dispatch: CaseReducerDispatchType, accountNumber: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
|
|
40
45
|
export declare const setCaseOwner: (dispatch: CaseReducerDispatchType, owner: IContact, product: string, abortSignalCaseGroup?: AbortSignal, abortSignalEntitlements?: AbortSignal, setCaseGroupToUngroupedOrDefault?: boolean, caseGroupNumberToRestore?: string | undefined, canChangeGroup?: boolean, isUserUpdate?: boolean, caseNumber?: string, caseAccountNumber?: string) => Promise<void>;
|
|
41
46
|
export declare const fetchCaseEntitlements: (dispatch: CaseReducerDispatchType, ssoUserName: string, product?: string, abortSignal?: AbortSignal, isUserUpdate?: boolean, caseNumber?: string) => Promise<void>;
|
|
42
47
|
export declare const fetchCaseGroupsForSSO: (dispatch: CaseReducerDispatchType, contactSsoUsername: string, setCaseGroupToUngroupedOrDefault?: boolean, abortSignal?: AbortSignal, caseGroupNumberToRestore?: string | undefined) => Promise<void>;
|
|
43
|
-
export declare const updateCaseWithSession: (dispatch: CaseReducerDispatchType, sessionItem: ISessionItem, loggedInUserAccountNumber: string, loggedInUserContact: IContact, loggedInUserAccount?: Partial<IAccount
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
export declare const updateCaseWithSession: (dispatch: CaseReducerDispatchType, sessionItem: ISessionItem, loggedInUserAccountNumber: string, loggedInUserContact: IContact, loggedInUserAccount?: Partial<IAccount>, apolloClient?: {
|
|
49
|
+
query: (options: any) => Promise<any>;
|
|
50
|
+
}) => Promise<void>;
|
|
51
|
+
export declare const fetchCaseDetailsHydra: (dispatch: CaseReducerDispatchType, caseNumber: string, loggedInUserRights: any, loggedInUser: any, apolloClient?: {
|
|
52
|
+
query: (options: any) => Promise<any>;
|
|
53
|
+
}) => Promise<void>;
|
|
54
|
+
export declare const updateCaseDetails: (dispatch: CaseReducerDispatchType, caseNumber: string, caseDetails: Partial<ICasePayload>, dontSetDetails?: boolean) => Promise<void>;
|
|
55
|
+
export interface UpdateCaseDetailsGraphQLOptions {
|
|
56
|
+
salesforceCaseId?: string;
|
|
57
|
+
existingCaseDetails?: Partial<ICaseDetailsState>;
|
|
58
|
+
}
|
|
59
|
+
export declare const updateCaseDetailsGraphQL: (dispatch: CaseReducerDispatchType, apolloClient: {
|
|
60
|
+
query: (options: any) => Promise<any>;
|
|
61
|
+
mutate: (options: any) => Promise<any>;
|
|
62
|
+
}, caseNumber: string, caseUpdate: Partial<IGraphQLCaseUpdateInput>, dontSetDetails?: boolean, options?: UpdateCaseDetailsGraphQLOptions) => Promise<void>;
|
|
46
63
|
export declare const getNotificationContacts4InternalUser: (dispatch: CaseReducerDispatchType, users: INotifiedUser[], caseOwnerSSO: string) => Promise<void>;
|
|
47
64
|
export declare const getNotificationContacts4ExternalUser: (dispatch: CaseReducerDispatchType, users: any, loggedInUserRights: any, accountNumber: any, caseOwnerSSO: string, fullNameCustom: string) => Promise<void>;
|
|
48
65
|
export declare const checkForCaseStatusToggleOnAttachOrComment: (dispatch: CaseReducerDispatchType, isInternal: boolean, currentStatus: string) => void;
|
|
49
66
|
export declare const setSelectedCaseGroupUsers: (dispatch: CaseReducerDispatchType, accountNumber: string, groupNumber: string, loggedInUserRights: UserAuth) => Promise<void>;
|
|
50
67
|
export declare function getCustomNotificationEmails(dispatch: CaseReducerDispatchType, caseNumber: string): Promise<void>;
|
|
51
68
|
export declare function updateEmailListState(dispatch: CaseReducerDispatchType, email: string, customEmailsList: IApiResponseDetails<Partial<ICaseNotificationAddresses[]>>, callback: (email: string) => ICaseNotificationAddresses[]): void;
|
|
52
|
-
export declare function getVersionsDetails(dispatch: CaseReducerDispatchType,
|
|
69
|
+
export declare function getVersionsDetails(dispatch: CaseReducerDispatchType, apolloClient: {
|
|
70
|
+
query: (options: any) => Promise<any>;
|
|
71
|
+
}, parentProductId: string, parentProductName: string): Promise<void>;
|
|
53
72
|
export declare const setRemoteRiderFlag: (dispatch: CaseReducerDispatchType, flag: boolean) => void;
|
|
54
73
|
export declare const setABTestVariation: (dispatch: CaseReducerDispatchType, ABTestVariation: string) => void;
|
|
55
74
|
//# sourceMappingURL=CaseReducer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAUH,uBAAuB,EAK1B,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AAuB,EACjC,YAAY,EAAE;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CAAE,EACvD,eAAe,EAAE,MAAM,EACvB,iBAAiB,EAAE,MAAM,iBAgC5B;AAED,eAAO,MAAM,kBAAkB,GAAI,UAAU,uBAAuB,EAAE,MAAM,OAAO,SAKlF,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,UAAU,uBAAuB,EAAE,iBAAiB,MAAM,SAK5F,CAAC"}
|
|
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { accounts, contacts, kase, pcm, publicApi } from '@cee-eng/hydrajs';
|
|
11
11
|
import { formattedApiErrorMessage } from '@rh-support/components';
|
|
12
|
-
import { dtmTrackEventCaseCreationStepEncountered, getApiResourceObject, PreviousToNewCaseTypeMap, } from '@rh-support/utils';
|
|
13
|
-
import delay from 'lodash/delay';
|
|
12
|
+
import { CREATE_SUPPORT_CASE, dtmTrackEventCaseCreationStepEncountered, fetchCaseDetailsByCaseNumber, GET_ACCOUNT, GET_PRODUCTS, getAccountQueryVariables, getApiResourceObject, handleGraphQLAccountResponse, handleGraphQLVersionsResponse, mapGraphQLCaseDetailsToCasePayload, PreviousToNewCaseTypeMap, updateCaseDetailsGraphQLRequest, } from '@rh-support/utils';
|
|
13
|
+
// import delay from 'lodash/delay';
|
|
14
14
|
import filter from 'lodash/filter';
|
|
15
15
|
import find from 'lodash/find';
|
|
16
16
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -20,7 +20,7 @@ import uniq from 'lodash/uniq';
|
|
|
20
20
|
import uniqBy from 'lodash/uniqBy';
|
|
21
21
|
import { trimAndReplacePlus } from '../components/shared/utils';
|
|
22
22
|
import { CaseReducerConstants, DESCRIPTION_LENGTH_LIMIT, initialCaseState, SupportLevelDisplay, } from './CaseConstNTypes';
|
|
23
|
-
import { createCasePayload, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
23
|
+
import { createCasePayload, createCasePayloadGraphQL, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
24
24
|
import { updateSession } from './SessionRestoreReducer';
|
|
25
25
|
export const caseReducer = (pState, action) => {
|
|
26
26
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
@@ -29,17 +29,20 @@ export const caseReducer = (pState, action) => {
|
|
|
29
29
|
const hasLargeCaseDescription = action.payload.caseDetails.hasOwnProperty('description')
|
|
30
30
|
? (action.payload.caseDetails.description || '').length > DESCRIPTION_LENGTH_LIMIT
|
|
31
31
|
: pState.hasLargeCaseDescription;
|
|
32
|
+
let resetEntitlementId = false;
|
|
32
33
|
if (((_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseDetails) === null || _b === void 0 ? void 0 : _b.contactSSOName) &&
|
|
33
34
|
pState.caseDetails.contactSSOName !== ((_d = (_c = action.payload) === null || _c === void 0 ? void 0 : _c.caseDetails) === null || _d === void 0 ? void 0 : _d.contactSSOName)) {
|
|
34
35
|
// Need to reset casegroup and sla as they are dependent on selected owner
|
|
35
36
|
action.payload.caseDetails.entitlementSla = undefined;
|
|
37
|
+
resetEntitlementId = true;
|
|
36
38
|
}
|
|
37
39
|
if (((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.caseDetails) === null || _f === void 0 ? void 0 : _f.product) &&
|
|
38
40
|
pState.caseDetails.product !== ((_h = (_g = action.payload) === null || _g === void 0 ? void 0 : _g.caseDetails) === null || _h === void 0 ? void 0 : _h.product)) {
|
|
39
41
|
// need to reset sla on product change as individiual products can have independent sla
|
|
40
42
|
action.payload.caseDetails.entitlementSla = undefined;
|
|
43
|
+
resetEntitlementId = true;
|
|
41
44
|
}
|
|
42
|
-
return Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false });
|
|
45
|
+
return Object.assign(Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false }), (resetEntitlementId ? { selectedEntitlementId: undefined } : {}));
|
|
43
46
|
}
|
|
44
47
|
case CaseReducerConstants.caseStateChanged: {
|
|
45
48
|
return Object.assign(Object.assign({}, pState), action.payload);
|
|
@@ -167,15 +170,23 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
167
170
|
payload: { selectedNotificationContacts },
|
|
168
171
|
});
|
|
169
172
|
};
|
|
170
|
-
export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1], void 0, function* (dispatch, sessionRestoreDispatch, caseDetails, isCaseCreate, errorMessage500, loggedInUserSsoUsername, isSecureSupport = false, isResubmit, isCreatingCaseFlow, sessionItem) {
|
|
171
|
-
var _a, _b;
|
|
173
|
+
export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionRestoreDispatch_1, caseDetails_1, isCaseCreate_1, errorMessage500_1, loggedInUserSsoUsername_1, ...args_1], void 0, function* (dispatch, sessionRestoreDispatch, caseDetails, isCaseCreate, errorMessage500, loggedInUserSsoUsername, isSecureSupport = false, isResubmit, isCreatingCaseFlow, sessionItem, apolloClient) {
|
|
174
|
+
var _a, _b, _c, _d, _e, _f;
|
|
172
175
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
173
176
|
try {
|
|
174
177
|
const casePayload = createCasePayload(caseDetails, sessionItem, isCaseCreate);
|
|
178
|
+
const graphQLPayload = createCasePayloadGraphQL(caseDetails, sessionItem, isCaseCreate);
|
|
175
179
|
dispatch({ type: CaseReducerConstants.resetCaseNoOfCreatedCase, payload: { caseNoOfCreatedCase: '' } });
|
|
176
|
-
const
|
|
180
|
+
const { data } = yield apolloClient.mutate({
|
|
181
|
+
mutation: CREATE_SUPPORT_CASE,
|
|
182
|
+
variables: {
|
|
183
|
+
caseInput: graphQLPayload,
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
const caseRecord = (_b = (_a = data === null || data === void 0 ? void 0 : data.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.CaseCreate) === null || _b === void 0 ? void 0 : _b.SalesforceSupportRecord;
|
|
187
|
+
const caseNumber = (_c = caseRecord === null || caseRecord === void 0 ? void 0 : caseRecord.CaseNumber) === null || _c === void 0 ? void 0 : _c.value;
|
|
177
188
|
if (casePayload.contactSSOName === loggedInUserSsoUsername &&
|
|
178
|
-
!isEmpty((
|
|
189
|
+
!isEmpty((_d = casePayload.phoneAreaCodePrefixLineNumber) === null || _d === void 0 ? void 0 : _d.trim()) &&
|
|
179
190
|
!isEmpty(trimAndReplacePlus((casePayload === null || casePayload === void 0 ? void 0 : casePayload.phoneCountryCode) || ''))) {
|
|
180
191
|
contacts.updateContactBySSO(casePayload.contactSSOName, {
|
|
181
192
|
supportPhoneCountryCode: casePayload.phoneCountryCode,
|
|
@@ -184,7 +195,7 @@ export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1,
|
|
|
184
195
|
}
|
|
185
196
|
// For updating the sessions and posting cep details after case creation
|
|
186
197
|
postCaseCreationProcessing(isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem);
|
|
187
|
-
dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(
|
|
198
|
+
dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(_e = caseDetails.caseDetails) === null || _e === void 0 ? void 0 : _e.caseType], (_f = caseDetails.caseDetails.summary) !== null && _f !== void 0 ? _f : undefined, caseDetails.caseDetails.product, caseDetails.caseDetails.version);
|
|
188
199
|
dispatch({ type: CaseReducerConstants.caseCreated, payload: { caseNoOfCreatedCase: caseNumber } });
|
|
189
200
|
}
|
|
190
201
|
catch (error) {
|
|
@@ -376,8 +387,8 @@ export const clearSelectedAccount = (dispatch) => {
|
|
|
376
387
|
payload: { caseDetails: { accountNumberRef: '' } },
|
|
377
388
|
});
|
|
378
389
|
};
|
|
379
|
-
export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, accountNumber_1, ...args_1], void 0, function* (dispatch, accountNumber, isLoggedInUsersAccount = false, loggedInUserAccount = {}) {
|
|
380
|
-
var _a;
|
|
390
|
+
export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) => __awaiter(void 0, [dispatch_1, accountNumber_1, ...args_1], void 0, function* (dispatch, accountNumber, isLoggedInUsersAccount = false, loggedInUserAccount = {}, apolloClient) {
|
|
391
|
+
var _a, _b, _c, _d, _e;
|
|
381
392
|
if (isLoggedInUsersAccount && !isEmpty(loggedInUserAccount) && !isEmpty(accountNumber)) {
|
|
382
393
|
dispatch({
|
|
383
394
|
type: CaseReducerConstants.caseStateChanged,
|
|
@@ -410,7 +421,12 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
410
421
|
payload: { selectedAccountDetails: getApiResourceObject({}, true) },
|
|
411
422
|
});
|
|
412
423
|
try {
|
|
413
|
-
const
|
|
424
|
+
const { data } = yield apolloClient.query({
|
|
425
|
+
query: GET_ACCOUNT,
|
|
426
|
+
variables: getAccountQueryVariables(accountNumber),
|
|
427
|
+
});
|
|
428
|
+
const edges = (_e = (_d = (_c = (_b = data === null || data === void 0 ? void 0 : data.salesforce_support_uiapi) === null || _b === void 0 ? void 0 : _b.query) === null || _c === void 0 ? void 0 : _c.SalesforceSupportAccount) === null || _d === void 0 ? void 0 : _d.edges) !== null && _e !== void 0 ? _e : [];
|
|
429
|
+
const selectedAccountDetails = handleGraphQLAccountResponse(edges);
|
|
414
430
|
dispatch({
|
|
415
431
|
type: CaseReducerConstants.caseStateChanged,
|
|
416
432
|
payload: { selectedAccountDetails: getApiResourceObject(selectedAccountDetails) },
|
|
@@ -475,7 +491,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
475
491
|
}
|
|
476
492
|
dispatch({
|
|
477
493
|
type: CaseReducerConstants.caseStateChanged,
|
|
478
|
-
payload: { selectedOwner: getApiResourceObject(owner) },
|
|
494
|
+
payload: { selectedOwner: getApiResourceObject(owner), hasInvalidEntitlements: false },
|
|
479
495
|
});
|
|
480
496
|
dispatch({
|
|
481
497
|
type: CaseReducerConstants.caseDetailChanged,
|
|
@@ -489,9 +505,19 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
489
505
|
fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
|
|
490
506
|
}
|
|
491
507
|
}
|
|
492
|
-
delay(
|
|
493
|
-
|
|
494
|
-
|
|
508
|
+
// delay(
|
|
509
|
+
// async () =>
|
|
510
|
+
// await fetchCaseEntitlements(
|
|
511
|
+
// dispatch,
|
|
512
|
+
// owner.ssoUsername!,
|
|
513
|
+
// product,
|
|
514
|
+
// abortSignalEntitlements,
|
|
515
|
+
// isUserUpdate,
|
|
516
|
+
// caseNumber
|
|
517
|
+
// ),
|
|
518
|
+
// 5000,
|
|
519
|
+
// 'later'
|
|
520
|
+
// );
|
|
495
521
|
});
|
|
496
522
|
//changing the item values to uppercase to match the backend values
|
|
497
523
|
const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
|
|
@@ -572,12 +598,12 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
572
598
|
const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
|
|
573
599
|
return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
|
|
574
600
|
};
|
|
575
|
-
export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1], void 0, function* (dispatch, sessionItem, loggedInUserAccountNumber, loggedInUserContact, loggedInUserAccount = {}) {
|
|
601
|
+
export const updateCaseWithSession = (dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1) => __awaiter(void 0, [dispatch_1, sessionItem_1, loggedInUserAccountNumber_1, loggedInUserContact_1, ...args_1], void 0, function* (dispatch, sessionItem, loggedInUserAccountNumber, loggedInUserContact, loggedInUserAccount = {}, apolloClient) {
|
|
576
602
|
var _a, _b, _c, _d;
|
|
577
603
|
const caseDetails = getCaseFromSessionDetails(sessionItem, loggedInUserAccountNumber, loggedInUserContact.ssoUsername);
|
|
578
604
|
const { sessionDetails } = sessionItem;
|
|
579
605
|
setCaseDetails(dispatch, caseDetails);
|
|
580
|
-
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount);
|
|
606
|
+
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount, apolloClient);
|
|
581
607
|
// entitlementSla gets undefined when case group, owner or product is changed
|
|
582
608
|
// Please refer line 60
|
|
583
609
|
if (isUndefined(caseDetails.entitlementSla)) {
|
|
@@ -637,7 +663,7 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
|
|
|
637
663
|
return uniqBy(contactsToReturn, 'ssoUsername');
|
|
638
664
|
}
|
|
639
665
|
});
|
|
640
|
-
export const
|
|
666
|
+
export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights, loggedInUser, apolloClient) => __awaiter(void 0, void 0, void 0, function* () {
|
|
641
667
|
var _a, _b;
|
|
642
668
|
dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
|
|
643
669
|
try {
|
|
@@ -707,7 +733,7 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
707
733
|
caseNoOfCreatedCase: caseNumber,
|
|
708
734
|
};
|
|
709
735
|
dispatch({ type: CaseReducerConstants.receivedCaseDetails, payload: Object.assign(Object.assign({}, caseState), { caseDetails }) });
|
|
710
|
-
setCaseAccountNumber(dispatch, data.accountNumberRef);
|
|
736
|
+
setCaseAccountNumber(dispatch, data.accountNumberRef, false, {}, apolloClient);
|
|
711
737
|
const canChangeGroup = loggedInUserRights.isInternal() ||
|
|
712
738
|
loggedInUser.isOrgAdmin ||
|
|
713
739
|
loggedInUser.ssoUsername === caseDetails.contactSSOName ||
|
|
@@ -724,12 +750,19 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, logge
|
|
|
724
750
|
if (data.groupNumber && data.groupNumber !== '-1') {
|
|
725
751
|
setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
|
|
726
752
|
}
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
else {
|
|
731
|
-
|
|
732
|
-
|
|
753
|
+
// TODO: Re-enable send notifications calls once GraphQL support is available
|
|
754
|
+
// if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
|
|
755
|
+
// getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
|
|
756
|
+
// } else {
|
|
757
|
+
// getNotificationContacts4ExternalUser(
|
|
758
|
+
// dispatch,
|
|
759
|
+
// notifiedListUsers,
|
|
760
|
+
// loggedInUserRights,
|
|
761
|
+
// data.accountNumberRef,
|
|
762
|
+
// data.contactSSOName,
|
|
763
|
+
// data.contactName
|
|
764
|
+
// );
|
|
765
|
+
// }
|
|
733
766
|
}
|
|
734
767
|
catch (error) {
|
|
735
768
|
dispatch({ type: CaseReducerConstants.receivedCaseDetailsError, payload: { caseDetailsError: error } });
|
|
@@ -753,7 +786,46 @@ export const updateCaseDetails = (dispatch, caseNumber, caseDetails, dontSetDeta
|
|
|
753
786
|
}
|
|
754
787
|
catch (error) {
|
|
755
788
|
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
756
|
-
|
|
789
|
+
throw error;
|
|
790
|
+
}
|
|
791
|
+
});
|
|
792
|
+
export const updateCaseDetailsGraphQL = (dispatch, apolloClient, caseNumber, caseUpdate, dontSetDetails, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
793
|
+
var _a, _b;
|
|
794
|
+
try {
|
|
795
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailUpdating });
|
|
796
|
+
const salesforceCaseId = (_a = options === null || options === void 0 ? void 0 : options.salesforceCaseId) !== null && _a !== void 0 ? _a : (_b = options === null || options === void 0 ? void 0 : options.existingCaseDetails) === null || _b === void 0 ? void 0 : _b.id;
|
|
797
|
+
const graphqlDetails = yield updateCaseDetailsGraphQLRequest(apolloClient, caseNumber, caseUpdate, {
|
|
798
|
+
salesforceCaseId,
|
|
799
|
+
existingCaseDetails: (options === null || options === void 0 ? void 0 : options.existingCaseDetails)
|
|
800
|
+
? {
|
|
801
|
+
product: options.existingCaseDetails.product,
|
|
802
|
+
version: options.existingCaseDetails.version,
|
|
803
|
+
}
|
|
804
|
+
: undefined,
|
|
805
|
+
});
|
|
806
|
+
if (dontSetDetails) {
|
|
807
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailCompleted });
|
|
808
|
+
return;
|
|
809
|
+
}
|
|
810
|
+
let updatedCaseDetails = Object.assign({}, caseUpdate);
|
|
811
|
+
if (graphqlDetails) {
|
|
812
|
+
const mappedGraphQLDetails = mapGraphQLCaseDetailsToCasePayload(graphqlDetails);
|
|
813
|
+
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), Object.fromEntries(Object.entries(mappedGraphQLDetails).filter(([, value]) => value !== null && value !== undefined && value !== '')));
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
const refreshedDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber);
|
|
817
|
+
if (refreshedDetails) {
|
|
818
|
+
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), mapGraphQLCaseDetailsToCasePayload(refreshedDetails));
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
dispatch({
|
|
822
|
+
type: CaseReducerConstants.caseDetailChanged,
|
|
823
|
+
payload: { caseDetails: updatedCaseDetails, isCaseUpdating: false },
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
catch (error) {
|
|
827
|
+
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
828
|
+
throw error;
|
|
757
829
|
}
|
|
758
830
|
});
|
|
759
831
|
export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerSSO) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -935,14 +1007,26 @@ export function updateEmailListState(dispatch, email, customEmailsList, callback
|
|
|
935
1007
|
payload: { customEmailsList: Object.assign(Object.assign({}, customEmailsList), { data: newEmail }) },
|
|
936
1008
|
});
|
|
937
1009
|
}
|
|
938
|
-
export function getVersionsDetails(dispatch,
|
|
1010
|
+
export function getVersionsDetails(dispatch, apolloClient, parentProductId, parentProductName) {
|
|
939
1011
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1012
|
+
var _a, _b, _c, _d;
|
|
940
1013
|
try {
|
|
941
1014
|
dispatch({
|
|
942
1015
|
type: CaseReducerConstants.getVersionDetails,
|
|
943
1016
|
payload: { versionsDetails: getApiResourceObject([], true) },
|
|
944
1017
|
});
|
|
945
|
-
const
|
|
1018
|
+
const { data } = yield apolloClient.query({
|
|
1019
|
+
query: GET_PRODUCTS,
|
|
1020
|
+
variables: {
|
|
1021
|
+
where: {
|
|
1022
|
+
ParentProduct__c: { eq: parentProductId },
|
|
1023
|
+
IsActive: { eq: true },
|
|
1024
|
+
},
|
|
1025
|
+
first: 200,
|
|
1026
|
+
},
|
|
1027
|
+
});
|
|
1028
|
+
const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.SalesforceSupportProduct2) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
|
|
1029
|
+
const versionsDetails = handleGraphQLVersionsResponse(edges, parentProductName);
|
|
946
1030
|
dispatch({
|
|
947
1031
|
type: CaseReducerConstants.getVersionDetails,
|
|
948
1032
|
payload: { versionsDetails: getApiResourceObject(versionsDetails) },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.295",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -54,10 +54,10 @@
|
|
|
54
54
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
55
55
|
"@redux-devtools/extension": "^3.3.0",
|
|
56
56
|
"@rh-support/components": "2.5.165",
|
|
57
|
-
"@rh-support/react-context": "2.5.
|
|
57
|
+
"@rh-support/react-context": "2.5.271",
|
|
58
58
|
"@rh-support/types": "2.0.26",
|
|
59
|
-
"@rh-support/user-permissions": "2.5.
|
|
60
|
-
"@rh-support/utils": "2.5.
|
|
59
|
+
"@rh-support/user-permissions": "2.5.123",
|
|
60
|
+
"@rh-support/utils": "2.5.106",
|
|
61
61
|
"@types/react-redux": "^7.1.33",
|
|
62
62
|
"@types/redux": "^3.6.0",
|
|
63
63
|
"date-fns": "3.6.0",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"defaults and supports es6-module",
|
|
128
128
|
"maintained node versions"
|
|
129
129
|
],
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "7b1306d35722c768378d97b4c6f9895c6a66bce8"
|
|
131
131
|
}
|