@rh-support/troubleshoot 2.6.299 → 2.6.300
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 +40 -28
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +19 -46
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +17 -49
- package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsAside.js +8 -25
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +17 -31
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts +2 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/CaseStatus.js +6 -8
- package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +28 -39
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts +3 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/ConfirmationModals/ReopenCaseModal.js +4 -3
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/ESSRemoteSessionModal.js +7 -4
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +36 -13
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +33 -11
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +34 -38
- 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 +59 -19
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts +2 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +148 -110
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts +2 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +241 -147
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +3 -5
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/CaseHistory.js +1 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.css +4 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts +3 -35
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseHistory/Timeline.js +224 -63
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseSummary/CaseSummary.js +2 -7
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +9 -7
- package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/CaseInformation.js +5 -7
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +24 -37
- package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/SupportLevel.js +55 -32
- 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 +9 -4
- package/lib/esm/components/CaseManagement/Cep.d.ts.map +1 -1
- package/lib/esm/components/CaseManagement/Cep.js +7 -4
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +12 -11
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
- package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +50 -30
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +18 -16
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +8 -5
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +64 -50
- package/lib/esm/components/shared/usePostComment.d.ts.map +1 -1
- package/lib/esm/components/shared/usePostComment.js +10 -6
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +24 -105
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +7 -6
- package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -10
- package/lib/esm/context/CaseContext.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +11 -18
- package/lib/esm/reducers/CaseConstNTypes.d.ts +3 -86
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +1 -5
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +1 -3
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +5 -22
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts +2 -0
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +28 -1
- package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +2 -34
- package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
- package/lib/esm/reducers/CaseReducer.d.ts +8 -27
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +33 -127
- package/package.json +6 -6
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts +0 -3
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.js +0 -22
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts +0 -15
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.js +0 -19
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts +0 -17
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map +0 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.js +0 -49
- package/lib/esm/graphql/index.d.ts +0 -4
- package/lib/esm/graphql/index.d.ts.map +0 -1
- package/lib/esm/graphql/index.js +0 -3
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
- package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
- package/lib/esm/graphql/mutations/index.d.ts +0 -2
- package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
- package/lib/esm/graphql/mutations/index.js +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getEscalationDetails.js +0 -24
- package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
- package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
- package/lib/esm/graphql/queries/getParentId.js +0 -16
- package/lib/esm/graphql/queries/index.d.ts +0 -3
- package/lib/esm/graphql/queries/index.d.ts.map +0 -1
- package/lib/esm/graphql/queries/index.js +0 -2
- package/lib/esm/graphql/schemas/escalation.d.ts +0 -84
- package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/escalation.js +0 -1
- package/lib/esm/graphql/schemas/index.d.ts +0 -2
- package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
- package/lib/esm/graphql/schemas/index.js +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts +0 -4
- package/lib/esm/hooks/useCaseComments/caseCommentMutation.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentMutation.js +0 -12
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts +0 -4
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/caseCommentsQuery.js +0 -55
- package/lib/esm/hooks/useCaseComments/index.d.ts +0 -7
- package/lib/esm/hooks/useCaseComments/index.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/index.js +0 -5
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts +0 -25
- package/lib/esm/hooks/useCaseComments/mapCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/mapCaseComment.js +0 -66
- package/lib/esm/hooks/useCaseComments/types.d.ts +0 -80
- package/lib/esm/hooks/useCaseComments/types.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/types.js +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts +0 -16
- package/lib/esm/hooks/useCaseComments/useCaseComments.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCaseComments.js +0 -25
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts +0 -19
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseComments/useCreateCaseComment.js +0 -33
- package/lib/esm/hooks/useCaseHistory.d.ts +0 -26
- package/lib/esm/hooks/useCaseHistory.d.ts.map +0 -1
- package/lib/esm/hooks/useCaseHistory.js +0 -98
- package/lib/esm/models/caseHistory.d.ts +0 -80
- package/lib/esm/models/caseHistory.d.ts.map +0 -1
- package/lib/esm/models/caseHistory.js +0 -1
- package/lib/esm/utils/TimelineUtils.d.ts +0 -41
- package/lib/esm/utils/TimelineUtils.d.ts.map +0 -1
- package/lib/esm/utils/TimelineUtils.js +0 -134
- package/lib/esm/utils/caseHistoryUtils.d.ts +0 -66
- package/lib/esm/utils/caseHistoryUtils.d.ts.map +0 -1
- package/lib/esm/utils/caseHistoryUtils.js +0 -165
|
@@ -7,21 +7,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
11
|
-
var t = {};
|
|
12
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
13
|
-
t[p] = s[p];
|
|
14
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
15
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
16
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
17
|
-
t[p[i]] = s[p[i]];
|
|
18
|
-
}
|
|
19
|
-
return t;
|
|
20
|
-
};
|
|
21
10
|
import { accounts, contacts, kase, pcm, publicApi } from '@cee-eng/hydrajs';
|
|
22
11
|
import { formattedApiErrorMessage } from '@rh-support/components';
|
|
23
|
-
import {
|
|
24
|
-
|
|
12
|
+
import { dtmTrackEventCaseCreationStepEncountered, getApiResourceObject, PreviousToNewCaseTypeMap, } from '@rh-support/utils';
|
|
13
|
+
import delay from 'lodash/delay';
|
|
25
14
|
import filter from 'lodash/filter';
|
|
26
15
|
import find from 'lodash/find';
|
|
27
16
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -31,7 +20,7 @@ import uniq from 'lodash/uniq';
|
|
|
31
20
|
import uniqBy from 'lodash/uniqBy';
|
|
32
21
|
import { trimAndReplacePlus } from '../components/shared/utils';
|
|
33
22
|
import { CaseReducerConstants, DESCRIPTION_LENGTH_LIMIT, initialCaseState, SupportLevelDisplay, } from './CaseConstNTypes';
|
|
34
|
-
import { createCasePayload,
|
|
23
|
+
import { createCasePayload, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
35
24
|
import { updateSession } from './SessionRestoreReducer';
|
|
36
25
|
export const caseReducer = (pState, action) => {
|
|
37
26
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
@@ -40,20 +29,17 @@ export const caseReducer = (pState, action) => {
|
|
|
40
29
|
const hasLargeCaseDescription = action.payload.caseDetails.hasOwnProperty('description')
|
|
41
30
|
? (action.payload.caseDetails.description || '').length > DESCRIPTION_LENGTH_LIMIT
|
|
42
31
|
: pState.hasLargeCaseDescription;
|
|
43
|
-
let resetEntitlementId = false;
|
|
44
32
|
if (((_b = (_a = action.payload) === null || _a === void 0 ? void 0 : _a.caseDetails) === null || _b === void 0 ? void 0 : _b.contactSSOName) &&
|
|
45
33
|
pState.caseDetails.contactSSOName !== ((_d = (_c = action.payload) === null || _c === void 0 ? void 0 : _c.caseDetails) === null || _d === void 0 ? void 0 : _d.contactSSOName)) {
|
|
46
34
|
// Need to reset casegroup and sla as they are dependent on selected owner
|
|
47
35
|
action.payload.caseDetails.entitlementSla = undefined;
|
|
48
|
-
resetEntitlementId = true;
|
|
49
36
|
}
|
|
50
37
|
if (((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.caseDetails) === null || _f === void 0 ? void 0 : _f.product) &&
|
|
51
38
|
pState.caseDetails.product !== ((_h = (_g = action.payload) === null || _g === void 0 ? void 0 : _g.caseDetails) === null || _h === void 0 ? void 0 : _h.product)) {
|
|
52
39
|
// need to reset sla on product change as individiual products can have independent sla
|
|
53
40
|
action.payload.caseDetails.entitlementSla = undefined;
|
|
54
|
-
resetEntitlementId = true;
|
|
55
41
|
}
|
|
56
|
-
return Object.assign(Object.assign(
|
|
42
|
+
return Object.assign(Object.assign({}, pState), { hasLargeCaseDescription, caseDetails: Object.assign(Object.assign({}, pState.caseDetails), action.payload.caseDetails), isCaseUpdating: false });
|
|
57
43
|
}
|
|
58
44
|
case CaseReducerConstants.caseStateChanged: {
|
|
59
45
|
return Object.assign(Object.assign({}, pState), action.payload);
|
|
@@ -103,8 +89,10 @@ export const caseReducer = (pState, action) => {
|
|
|
103
89
|
return Object.assign(Object.assign(Object.assign({}, pState), initialCaseState), { isFetchingCaseDetails: true, isFetchingCaseDetailsError: false, caseDetails: Object.assign(Object.assign({}, initialCaseState.caseDetails), { caseNumber: (_l = (_k = (_j = action.payload) === null || _j === void 0 ? void 0 : _j.caseDetails) === null || _k === void 0 ? void 0 : _k.caseNumber) !== null && _l !== void 0 ? _l : '' }) });
|
|
104
90
|
}
|
|
105
91
|
case CaseReducerConstants.receivedCaseDetails: {
|
|
106
|
-
|
|
107
|
-
|
|
92
|
+
return Object.assign(Object.assign(Object.assign({}, pState), action.payload), { isFetchingCaseDetails: false, isFetchingCaseDetailsError: false });
|
|
93
|
+
}
|
|
94
|
+
case CaseReducerConstants.updateComments: {
|
|
95
|
+
return Object.assign(Object.assign({}, pState), { caseDetails: Object.assign(Object.assign({}, pState.caseDetails), { comments: action.payload.caseDetails.comments }) });
|
|
108
96
|
}
|
|
109
97
|
case CaseReducerConstants.receivedCaseDetailsError: {
|
|
110
98
|
return Object.assign(Object.assign({}, pState), { isFetchingCaseDetails: false, isFetchingCaseDetailsError: true, caseDetailsError: action.payload.caseDetailsError });
|
|
@@ -179,23 +167,15 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
179
167
|
payload: { selectedNotificationContacts },
|
|
180
168
|
});
|
|
181
169
|
};
|
|
182
|
-
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
|
|
183
|
-
var _a, _b
|
|
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;
|
|
184
172
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
185
173
|
try {
|
|
186
174
|
const casePayload = createCasePayload(caseDetails, sessionItem, isCaseCreate);
|
|
187
|
-
const graphQLPayload = createCasePayloadGraphQL(caseDetails, sessionItem, isCaseCreate);
|
|
188
175
|
dispatch({ type: CaseReducerConstants.resetCaseNoOfCreatedCase, payload: { caseNoOfCreatedCase: '' } });
|
|
189
|
-
const
|
|
190
|
-
mutation: CREATE_SUPPORT_CASE,
|
|
191
|
-
variables: {
|
|
192
|
-
caseInput: graphQLPayload,
|
|
193
|
-
},
|
|
194
|
-
});
|
|
195
|
-
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;
|
|
196
|
-
const caseNumber = (_c = caseRecord === null || caseRecord === void 0 ? void 0 : caseRecord.CaseNumber) === null || _c === void 0 ? void 0 : _c.value;
|
|
176
|
+
const caseNumber = yield publicApi.kase.createCase(casePayload, caseDetails.selectedAccountDetails.data.secureSupport);
|
|
197
177
|
if (casePayload.contactSSOName === loggedInUserSsoUsername &&
|
|
198
|
-
!isEmpty((
|
|
178
|
+
!isEmpty((_a = casePayload.phoneAreaCodePrefixLineNumber) === null || _a === void 0 ? void 0 : _a.trim()) &&
|
|
199
179
|
!isEmpty(trimAndReplacePlus((casePayload === null || casePayload === void 0 ? void 0 : casePayload.phoneCountryCode) || ''))) {
|
|
200
180
|
contacts.updateContactBySSO(casePayload.contactSSOName, {
|
|
201
181
|
supportPhoneCountryCode: casePayload.phoneCountryCode,
|
|
@@ -204,7 +184,7 @@ export const submitCase = (dispatch_1, sessionRestoreDispatch_1, caseDetails_1,
|
|
|
204
184
|
}
|
|
205
185
|
// For updating the sessions and posting cep details after case creation
|
|
206
186
|
postCaseCreationProcessing(isSecureSupport, dispatch, sessionRestoreDispatch, caseNumber, caseDetails, sessionItem);
|
|
207
|
-
dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(
|
|
187
|
+
dtmTrackEventCaseCreationStepEncountered(isCreatingCaseFlow, 'Submit', false, caseNumber, PreviousToNewCaseTypeMap[(_b = caseDetails.caseDetails) === null || _b === void 0 ? void 0 : _b.caseType], caseDetails.caseDetails.summary, caseDetails.caseDetails.product, caseDetails.caseDetails.version);
|
|
208
188
|
dispatch({ type: CaseReducerConstants.caseCreated, payload: { caseNoOfCreatedCase: caseNumber } });
|
|
209
189
|
}
|
|
210
190
|
catch (error) {
|
|
@@ -396,8 +376,8 @@ export const clearSelectedAccount = (dispatch) => {
|
|
|
396
376
|
payload: { caseDetails: { accountNumberRef: '' } },
|
|
397
377
|
});
|
|
398
378
|
};
|
|
399
|
-
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 = {}
|
|
400
|
-
var _a
|
|
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;
|
|
401
381
|
if (isLoggedInUsersAccount && !isEmpty(loggedInUserAccount) && !isEmpty(accountNumber)) {
|
|
402
382
|
dispatch({
|
|
403
383
|
type: CaseReducerConstants.caseStateChanged,
|
|
@@ -430,12 +410,7 @@ export const setCaseAccountNumber = (dispatch_1, accountNumber_1, ...args_1) =>
|
|
|
430
410
|
payload: { selectedAccountDetails: getApiResourceObject({}, true) },
|
|
431
411
|
});
|
|
432
412
|
try {
|
|
433
|
-
const
|
|
434
|
-
query: GET_ACCOUNT,
|
|
435
|
-
variables: getAccountQueryVariables(accountNumber),
|
|
436
|
-
});
|
|
437
|
-
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 : [];
|
|
438
|
-
const selectedAccountDetails = handleGraphQLAccountResponse(edges);
|
|
413
|
+
const selectedAccountDetails = yield accounts.getAccount(accountNumber);
|
|
439
414
|
dispatch({
|
|
440
415
|
type: CaseReducerConstants.caseStateChanged,
|
|
441
416
|
payload: { selectedAccountDetails: getApiResourceObject(selectedAccountDetails) },
|
|
@@ -500,7 +475,7 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
500
475
|
}
|
|
501
476
|
dispatch({
|
|
502
477
|
type: CaseReducerConstants.caseStateChanged,
|
|
503
|
-
payload: { selectedOwner: getApiResourceObject(owner)
|
|
478
|
+
payload: { selectedOwner: getApiResourceObject(owner) },
|
|
504
479
|
});
|
|
505
480
|
dispatch({
|
|
506
481
|
type: CaseReducerConstants.caseDetailChanged,
|
|
@@ -514,19 +489,9 @@ export const setCaseOwner = (dispatch_1, owner_1, product_1, abortSignalCaseGrou
|
|
|
514
489
|
fetchCaseGroupsForSSO(dispatch, owner.ssoUsername, setCaseGroupToUngroupedOrDefault, abortSignalCaseGroup, caseGroupNumberToRestore);
|
|
515
490
|
}
|
|
516
491
|
}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
// dispatch,
|
|
521
|
-
// owner.ssoUsername!,
|
|
522
|
-
// product,
|
|
523
|
-
// abortSignalEntitlements,
|
|
524
|
-
// isUserUpdate,
|
|
525
|
-
// caseNumber
|
|
526
|
-
// ),
|
|
527
|
-
// 5000,
|
|
528
|
-
// 'later'
|
|
529
|
-
// );
|
|
492
|
+
delay(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
493
|
+
return yield fetchCaseEntitlements(dispatch, owner.ssoUsername, product, abortSignalEntitlements, isUserUpdate, caseNumber);
|
|
494
|
+
}), 5000, 'later');
|
|
530
495
|
});
|
|
531
496
|
//changing the item values to uppercase to match the backend values
|
|
532
497
|
const slaOrder = Object.values(SupportLevelDisplay).map((item) => {
|
|
@@ -607,12 +572,12 @@ export const fetchCaseGroupsForSSO = (dispatch_1, contactSsoUsername_1, ...args_
|
|
|
607
572
|
const getSelectedNotificationContactsFromSession = (contacts, notifiedUsers) => {
|
|
608
573
|
return filter(contacts, (c) => notifiedUsers.includes(c.ssoUsername));
|
|
609
574
|
};
|
|
610
|
-
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 = {}
|
|
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 = {}) {
|
|
611
576
|
var _a, _b, _c, _d;
|
|
612
577
|
const caseDetails = getCaseFromSessionDetails(sessionItem, loggedInUserAccountNumber, loggedInUserContact.ssoUsername);
|
|
613
578
|
const { sessionDetails } = sessionItem;
|
|
614
579
|
setCaseDetails(dispatch, caseDetails);
|
|
615
|
-
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount
|
|
580
|
+
setCaseAccountNumber(dispatch, caseDetails.accountNumberRef, caseDetails.accountNumberRef === loggedInUserAccountNumber, loggedInUserAccount);
|
|
616
581
|
// entitlementSla gets undefined when case group, owner or product is changed
|
|
617
582
|
// Please refer line 60
|
|
618
583
|
if (isUndefined(caseDetails.entitlementSla)) {
|
|
@@ -672,13 +637,12 @@ const getAllRelevantContacts = (loggedInUserContact, caseAccountNumber, contactS
|
|
|
672
637
|
return uniqBy(contactsToReturn, 'ssoUsername');
|
|
673
638
|
}
|
|
674
639
|
});
|
|
675
|
-
export const
|
|
640
|
+
export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, loggedInUser) => __awaiter(void 0, void 0, void 0, function* () {
|
|
676
641
|
var _a, _b;
|
|
677
642
|
dispatch({ type: CaseReducerConstants.requestCaseDetails, payload: { caseDetails: { caseNumber } } });
|
|
678
643
|
try {
|
|
679
644
|
const data = yield publicApi.kase.getCase(caseNumber);
|
|
680
645
|
const caseDetails = {
|
|
681
|
-
id: data.id,
|
|
682
646
|
product: data.product,
|
|
683
647
|
version: data.version,
|
|
684
648
|
summary: data.summary,
|
|
@@ -743,7 +707,7 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
743
707
|
caseNoOfCreatedCase: caseNumber,
|
|
744
708
|
};
|
|
745
709
|
dispatch({ type: CaseReducerConstants.receivedCaseDetails, payload: Object.assign(Object.assign({}, caseState), { caseDetails }) });
|
|
746
|
-
setCaseAccountNumber(dispatch, data.accountNumberRef
|
|
710
|
+
setCaseAccountNumber(dispatch, data.accountNumberRef);
|
|
747
711
|
const canChangeGroup = loggedInUserRights.isInternal() ||
|
|
748
712
|
loggedInUser.isOrgAdmin ||
|
|
749
713
|
loggedInUser.ssoUsername === caseDetails.contactSSOName ||
|
|
@@ -760,19 +724,12 @@ export const fetchCaseDetailsHydra = (dispatch, caseNumber, loggedInUserRights,
|
|
|
760
724
|
if (data.groupNumber && data.groupNumber !== '-1') {
|
|
761
725
|
setSelectedCaseGroupUsers(dispatch, data.accountNumberRef, data.groupNumber, loggedInUserRights);
|
|
762
726
|
}
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
// notifiedListUsers,
|
|
770
|
-
// loggedInUserRights,
|
|
771
|
-
// data.accountNumberRef,
|
|
772
|
-
// data.contactSSOName,
|
|
773
|
-
// data.contactName
|
|
774
|
-
// );
|
|
775
|
-
// }
|
|
727
|
+
if (loggedInUserRights.isInternal() && !loggedInUserRights.isSecureSupportTech()) {
|
|
728
|
+
getNotificationContacts4InternalUser(dispatch, notifiedListUsers, data.contactSSOName);
|
|
729
|
+
}
|
|
730
|
+
else {
|
|
731
|
+
getNotificationContacts4ExternalUser(dispatch, notifiedListUsers, loggedInUserRights, data.accountNumberRef, data.contactSSOName, data.contactName);
|
|
732
|
+
}
|
|
776
733
|
}
|
|
777
734
|
catch (error) {
|
|
778
735
|
dispatch({ type: CaseReducerConstants.receivedCaseDetailsError, payload: { caseDetailsError: error } });
|
|
@@ -796,46 +753,7 @@ export const updateCaseDetails = (dispatch, caseNumber, caseDetails, dontSetDeta
|
|
|
796
753
|
}
|
|
797
754
|
catch (error) {
|
|
798
755
|
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
799
|
-
|
|
800
|
-
}
|
|
801
|
-
});
|
|
802
|
-
export const updateCaseDetailsGraphQL = (dispatch, apolloClient, caseNumber, caseUpdate, dontSetDetails, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
803
|
-
var _a, _b;
|
|
804
|
-
try {
|
|
805
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailUpdating });
|
|
806
|
-
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;
|
|
807
|
-
const graphqlDetails = yield updateCaseDetailsGraphQLRequest(apolloClient, caseNumber, caseUpdate, {
|
|
808
|
-
salesforceCaseId,
|
|
809
|
-
existingCaseDetails: (options === null || options === void 0 ? void 0 : options.existingCaseDetails)
|
|
810
|
-
? {
|
|
811
|
-
product: options.existingCaseDetails.product,
|
|
812
|
-
version: options.existingCaseDetails.version,
|
|
813
|
-
}
|
|
814
|
-
: undefined,
|
|
815
|
-
});
|
|
816
|
-
if (dontSetDetails) {
|
|
817
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailCompleted });
|
|
818
|
-
return;
|
|
819
|
-
}
|
|
820
|
-
let updatedCaseDetails = Object.assign({}, caseUpdate);
|
|
821
|
-
if (graphqlDetails) {
|
|
822
|
-
const mappedGraphQLDetails = mapGraphQLCaseDetailsToCasePayload(graphqlDetails);
|
|
823
|
-
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), Object.fromEntries(Object.entries(mappedGraphQLDetails).filter(([, value]) => value !== null && value !== undefined && value !== '')));
|
|
824
|
-
}
|
|
825
|
-
else {
|
|
826
|
-
const refreshedDetails = yield fetchCaseDetailsByCaseNumber(apolloClient, caseNumber);
|
|
827
|
-
if (refreshedDetails) {
|
|
828
|
-
updatedCaseDetails = Object.assign(Object.assign({}, updatedCaseDetails), mapGraphQLCaseDetailsToCasePayload(refreshedDetails));
|
|
829
|
-
}
|
|
830
|
-
}
|
|
831
|
-
dispatch({
|
|
832
|
-
type: CaseReducerConstants.caseDetailChanged,
|
|
833
|
-
payload: { caseDetails: updatedCaseDetails, isCaseUpdating: false },
|
|
834
|
-
});
|
|
835
|
-
}
|
|
836
|
-
catch (error) {
|
|
837
|
-
dispatch({ type: CaseReducerConstants.updateCaseDetailsError });
|
|
838
|
-
throw error;
|
|
756
|
+
return Promise.reject(error);
|
|
839
757
|
}
|
|
840
758
|
});
|
|
841
759
|
export const getNotificationContacts4InternalUser = (dispatch, users, caseOwnerSSO) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -1017,26 +935,14 @@ export function updateEmailListState(dispatch, email, customEmailsList, callback
|
|
|
1017
935
|
payload: { customEmailsList: Object.assign(Object.assign({}, customEmailsList), { data: newEmail }) },
|
|
1018
936
|
});
|
|
1019
937
|
}
|
|
1020
|
-
export function getVersionsDetails(dispatch,
|
|
938
|
+
export function getVersionsDetails(dispatch, product) {
|
|
1021
939
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1022
|
-
var _a, _b, _c, _d;
|
|
1023
940
|
try {
|
|
1024
941
|
dispatch({
|
|
1025
942
|
type: CaseReducerConstants.getVersionDetails,
|
|
1026
943
|
payload: { versionsDetails: getApiResourceObject([], true) },
|
|
1027
944
|
});
|
|
1028
|
-
const
|
|
1029
|
-
query: GET_PRODUCTS,
|
|
1030
|
-
variables: {
|
|
1031
|
-
where: {
|
|
1032
|
-
ParentProduct__c: { eq: parentProductId },
|
|
1033
|
-
IsActive: { eq: true },
|
|
1034
|
-
},
|
|
1035
|
-
first: 200,
|
|
1036
|
-
},
|
|
1037
|
-
});
|
|
1038
|
-
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 : [];
|
|
1039
|
-
const versionsDetails = handleGraphQLVersionsResponse(edges, parentProductName);
|
|
945
|
+
const versionsDetails = yield pcm.products.getDetailedVersions(product);
|
|
1040
946
|
dispatch({
|
|
1041
947
|
type: CaseReducerConstants.getVersionDetails,
|
|
1042
948
|
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.300",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -53,11 +53,11 @@
|
|
|
53
53
|
"@progress/kendo-licensing": "1.3.5",
|
|
54
54
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
55
55
|
"@redux-devtools/extension": "^3.3.0",
|
|
56
|
-
"@rh-support/components": "2.5.
|
|
57
|
-
"@rh-support/react-context": "2.5.
|
|
56
|
+
"@rh-support/components": "2.5.182",
|
|
57
|
+
"@rh-support/react-context": "2.5.276",
|
|
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.128",
|
|
60
|
+
"@rh-support/utils": "2.5.92",
|
|
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": "5a3a62786c13896575f6db3805b3a0dc0bd1299f"
|
|
131
131
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remoteSessionUtils.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/RequestRemoteSession/remoteSessionUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,0BAA0B,GAAI,YAAY,MAAM,KAAG,MAa/D,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,aAAa,MAAM,KAAG,MAOxD,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const getLocaleNameFromLocalCode = (localeCode) => {
|
|
2
|
-
if ('Intl' in window && 'DisplayNames' in Intl) {
|
|
3
|
-
try {
|
|
4
|
-
const [lang, locale] = localeCode.includes('_') ? localeCode.split('_') : localeCode.split('-');
|
|
5
|
-
// https://github.com/microsoft/TypeScript/issues/41338
|
|
6
|
-
const langName = new Intl.DisplayNames([lang], { type: 'language' });
|
|
7
|
-
const regionNamesInLang = new Intl.DisplayNames([lang], { type: 'region' });
|
|
8
|
-
return `${regionNamesInLang.of(locale)} (${langName.of(lang)})`;
|
|
9
|
-
}
|
|
10
|
-
catch (e) {
|
|
11
|
-
return localeCode;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
return localeCode;
|
|
15
|
-
};
|
|
16
|
-
export const formatSessionLinks = (sessionLink) => {
|
|
17
|
-
const links = sessionLink
|
|
18
|
-
.split(/[;,| \n\r\t]+/)
|
|
19
|
-
.map((link) => link.trim())
|
|
20
|
-
.filter(Boolean);
|
|
21
|
-
return links.map((link) => `[${link}](${link})`).join('\n');
|
|
22
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Dispatch, MutableRefObject } from 'react';
|
|
2
|
-
interface UseAttachmentUploadCompletionParams {
|
|
3
|
-
isUploadingAttachments: boolean;
|
|
4
|
-
hasSomeUnUploadedFiles: boolean;
|
|
5
|
-
isUploadingAttachmentPrevious: MutableRefObject<boolean>;
|
|
6
|
-
caseDispatch: Dispatch<any>;
|
|
7
|
-
isInternal: boolean;
|
|
8
|
-
status: string | undefined;
|
|
9
|
-
resetAttachmentSection: () => void;
|
|
10
|
-
onAttachmentAdded: () => void;
|
|
11
|
-
setCssCommentAgreed: (v: boolean) => void;
|
|
12
|
-
}
|
|
13
|
-
export declare function useAttachmentUploadCompletion({ isUploadingAttachments, hasSomeUnUploadedFiles, isUploadingAttachmentPrevious, caseDispatch, isInternal, status, resetAttachmentSection, onAttachmentAdded, setCssCommentAgreed, }: UseAttachmentUploadCompletionParams): void;
|
|
14
|
-
export {};
|
|
15
|
-
//# sourceMappingURL=useAttachmentUploadCompletion.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAttachmentUploadCompletion.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useAttachmentUploadCompletion.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAK9D,UAAU,mCAAmC;IACzC,sBAAsB,EAAE,OAAO,CAAC;IAChC,sBAAsB,EAAE,OAAO,CAAC;IAChC,6BAA6B,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACzD,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,EAAE,CAAC,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED,wBAAgB,6BAA6B,CAAC,EAC1C,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,YAAY,EACZ,UAAU,EACV,MAAM,EACN,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,GACtB,EAAE,mCAAmC,QAiBrC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ToastNotification } from '@rh-support/components';
|
|
2
|
-
import { useEffect } from 'react';
|
|
3
|
-
import { useTranslation } from 'react-i18next';
|
|
4
|
-
import { checkForCaseStatusToggleOnAttachOrComment } from '../../../../../reducers/CaseReducer';
|
|
5
|
-
export function useAttachmentUploadCompletion({ isUploadingAttachments, hasSomeUnUploadedFiles, isUploadingAttachmentPrevious, caseDispatch, isInternal, status, resetAttachmentSection, onAttachmentAdded, setCssCommentAgreed, }) {
|
|
6
|
-
const { t } = useTranslation();
|
|
7
|
-
useEffect(() => {
|
|
8
|
-
const justFinished = isUploadingAttachmentPrevious.current && !isUploadingAttachments && !hasSomeUnUploadedFiles;
|
|
9
|
-
if (justFinished) {
|
|
10
|
-
ToastNotification.addSuccessMessage(t('Attachment(s) uploaded successfully'));
|
|
11
|
-
checkForCaseStatusToggleOnAttachOrComment(caseDispatch, isInternal, status);
|
|
12
|
-
resetAttachmentSection();
|
|
13
|
-
onAttachmentAdded();
|
|
14
|
-
setCssCommentAgreed(false);
|
|
15
|
-
}
|
|
16
|
-
isUploadingAttachmentPrevious.current = isUploadingAttachments;
|
|
17
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
18
|
-
}, [isUploadingAttachments]);
|
|
19
|
-
}
|
package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EditorMode } from '@rh-support/components';
|
|
2
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
3
|
-
interface UseCommentDraftsParams {
|
|
4
|
-
caseNumber: string;
|
|
5
|
-
loggedInUserSSO: string;
|
|
6
|
-
commentSignature: string;
|
|
7
|
-
setCommentText: Dispatch<SetStateAction<string>>;
|
|
8
|
-
setCommentType: Dispatch<SetStateAction<EditorMode>>;
|
|
9
|
-
setIsPublic: Dispatch<SetStateAction<boolean | undefined>>;
|
|
10
|
-
applySignature: (text: string) => void;
|
|
11
|
-
}
|
|
12
|
-
export declare function useCommentDrafts({ caseNumber, loggedInUserSSO, commentSignature, setCommentText, setCommentType, setIsPublic, applySignature, }: UseCommentDraftsParams): {
|
|
13
|
-
saveDraft: (...args: any[]) => void;
|
|
14
|
-
clearDraft: () => Promise<void>;
|
|
15
|
-
};
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=useCommentDrafts.d.ts.map
|
package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCommentDrafts.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment/useCommentDrafts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAsB,MAAM,OAAO,CAAC;AAMrE,UAAU,sBAAsB;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC;IACjD,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC;IACrD,WAAW,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;IAC3D,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC1C;AAED,wBAAgB,gBAAgB,CAAC,EAC7B,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,WAAW,EACX,cAAc,GACjB,EAAE,sBAAsB;;;EAgDxB"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
|
-
import { debounce } from '@patternfly/react-core';
|
|
11
|
-
import { useEffect, useMemo } from 'react';
|
|
12
|
-
import { CaseDetailsCacheNamespaces } from '../../../../../enums/cache';
|
|
13
|
-
import { CaseDetailsCacheUtils } from '../../../../../utils/caseDetailsCacheUtils';
|
|
14
|
-
export function useCommentDrafts({ caseNumber, loggedInUserSSO, commentSignature, setCommentText, setCommentType, setIsPublic, applySignature, }) {
|
|
15
|
-
const saveDraft = useMemo(() => debounce(function (value, mode, publicFlag) {
|
|
16
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
17
|
-
const { value: prevDraftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO)) || {};
|
|
18
|
-
prevDraftComments[caseNumber] = { text: value, privateFlag: !publicFlag, type: mode };
|
|
19
|
-
CaseDetailsCacheUtils.set(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO, {
|
|
20
|
-
value: prevDraftComments,
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
}, 500), [caseNumber, loggedInUserSSO]);
|
|
24
|
-
const clearDraft = () => __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
const { value: prevDraftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO)) || {};
|
|
26
|
-
delete prevDraftComments[caseNumber];
|
|
27
|
-
CaseDetailsCacheUtils.set(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO, {
|
|
28
|
-
value: prevDraftComments,
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
useEffect(() => {
|
|
32
|
-
function loadDraft() {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
var _a;
|
|
35
|
-
const { value: draftComments = {} } = (yield CaseDetailsCacheUtils.get(CaseDetailsCacheNamespaces.COMMENTS_DRAFT.name, loggedInUserSSO)) || {};
|
|
36
|
-
const draft = draftComments[caseNumber];
|
|
37
|
-
if (!((_a = draft === null || draft === void 0 ? void 0 : draft.text) === null || _a === void 0 ? void 0 : _a.trim()))
|
|
38
|
-
return;
|
|
39
|
-
applySignature(draft.text);
|
|
40
|
-
if (draft.privateFlag)
|
|
41
|
-
setIsPublic(false);
|
|
42
|
-
setCommentType(draft.type);
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
loadDraft();
|
|
46
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
47
|
-
}, [commentSignature]);
|
|
48
|
-
return { saveDraft, clearDraft };
|
|
49
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
package/lib/esm/graphql/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createRMECaseEscalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/mutations/createRMECaseEscalation.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,uCAsBtC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/mutations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { CREATE_RME_CASE_ESCALATION } from './createRMECaseEscalation';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getEscalationDetails.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getEscalationDetails.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,uCAsBlC,CAAC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getParentId.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getParentId.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,uCAczB,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|