@rh-support/troubleshoot 2.7.52 → 2.7.54
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/CaseEditView/CaseOverview/index.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +7 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +9 -3
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +54 -54
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/reducer/AttachmentHelper.js +10 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/useFileUploader.js +7 -3
- package/lib/esm/constants/caseDetailsConstants.d.ts +1 -0
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +1 -0
- package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -1
- package/lib/esm/graphql/queries/getEscalationDetails.js +3 -0
- package/lib/esm/graphql/schemas/escalation.d.ts +3 -0
- package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.d.ts.map +1 -1
- package/lib/esm/hooks/useS3Upload.js +5 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDetailsPageReducer.js +20 -4
- package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseOverviewReducer.js +34 -15
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAmCA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,qBAwlBjD"}
|
|
@@ -91,11 +91,14 @@ export default function CaseOverview(props) {
|
|
|
91
91
|
ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_MANAGED_BY_PARTNER_FLAG);
|
|
92
92
|
const canSeeInternalFlags = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_INTERNAL_FLAGS);
|
|
93
93
|
const confirm = useConfirmation();
|
|
94
|
+
const requestedHydraCaseNumber = useRef(null);
|
|
94
95
|
useEffect(() => {
|
|
95
|
-
if (haventLoadedMetadata(caseOverviewState.caseDetailsHydra)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
if (haventLoadedMetadata(caseOverviewState.caseDetailsHydra) &&
|
|
97
|
+
canSeeCaseOwnerInfo &&
|
|
98
|
+
caseNumber &&
|
|
99
|
+
requestedHydraCaseNumber.current !== caseNumber) {
|
|
100
|
+
requestedHydraCaseNumber.current = caseNumber;
|
|
101
|
+
fetchCaseHydra(caseOverviewDispatch, caseNumber);
|
|
99
102
|
}
|
|
100
103
|
if (haventLoadedMetadata(allCaseSeverities)) {
|
|
101
104
|
fetchCaseSeverities(globalMetadataDispatchContext, apolloClient);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAW7F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAmB5E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAW7F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAmB5E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBA4cxC"}
|
|
@@ -214,7 +214,7 @@ export function PostComment(props) {
|
|
|
214
214
|
const checkCommentSignature = derivedPlainText.replace(commentSignature, '');
|
|
215
215
|
const isCommentEmpty = isEmpty(checkCommentSignature === null || checkCommentSignature === void 0 ? void 0 : checkCommentSignature.trim());
|
|
216
216
|
const onPostComment = () => __awaiter(this, void 0, void 0, function* () {
|
|
217
|
-
var _a, _b;
|
|
217
|
+
var _a, _b, _c, _d;
|
|
218
218
|
if (canEditCase.alert())
|
|
219
219
|
return;
|
|
220
220
|
if (!commentText)
|
|
@@ -257,8 +257,14 @@ export function PostComment(props) {
|
|
|
257
257
|
ToastNotification.addSuccessMessage(t('Comment submitted'));
|
|
258
258
|
setCssCommentAgreed(false);
|
|
259
259
|
}
|
|
260
|
-
catch (
|
|
261
|
-
|
|
260
|
+
catch (error) {
|
|
261
|
+
const statusCode = (_c = error === null || error === void 0 ? void 0 : error.statusCode) !== null && _c !== void 0 ? _c : (_d = error === null || error === void 0 ? void 0 : error.networkError) === null || _d === void 0 ? void 0 : _d.statusCode;
|
|
262
|
+
if (statusCode === 403) {
|
|
263
|
+
ToastNotification.addDangerMessage(t('Could not submit comment. Remove or rephrase code/stack-trace text and try again.'));
|
|
264
|
+
}
|
|
265
|
+
else {
|
|
266
|
+
ToastNotification.addDangerMessage(t('Could not submit comment. Please refresh the page and try again.'));
|
|
267
|
+
}
|
|
262
268
|
}
|
|
263
269
|
finally {
|
|
264
270
|
setIsProcessing(false);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAYA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAoF/D,wBAAgB,kBAAkB,sBAqUjC"}
|
|
@@ -8,14 +8,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { ValidatedOptions } from '@patternfly/react-core';
|
|
11
|
-
import { getPhoneObj, PhoneInput } from '@rh-support/components';
|
|
11
|
+
import { getCountryByIso2, getExactCountry, getPhoneObj, getPreferredCountryIso2FromTimezone, PhoneInput, } from '@rh-support/components';
|
|
12
12
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
13
13
|
import isEmpty from 'lodash/isEmpty';
|
|
14
14
|
import isEqual from 'lodash/isEqual';
|
|
15
15
|
import isUndefined from 'lodash/isUndefined';
|
|
16
16
|
import React, { useContext, useEffect, useState } from 'react';
|
|
17
17
|
import { Trans, useTranslation } from 'react-i18next';
|
|
18
|
-
import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../constants/caseDetailsConstants';
|
|
18
|
+
import { AMBIGUOUS_SHARED_DIAL_CODES, PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../constants/caseDetailsConstants';
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
20
20
|
import { RouteContext } from '../../context/RouteContext';
|
|
21
21
|
import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
@@ -23,24 +23,53 @@ import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
|
|
|
23
23
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
24
24
|
import { removeAllChars, trimAndReplacePlus } from '../shared/utils';
|
|
25
25
|
import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
function parsePhone(rawPhone, preferredCountryIso2) {
|
|
27
|
+
var _a;
|
|
28
|
+
const trimmedPhone = rawPhone === null || rawPhone === void 0 ? void 0 : rawPhone.trim();
|
|
29
|
+
if (!trimmedPhone) {
|
|
30
|
+
return { phoneAreaCodePrefixLineNumber: '', phoneCountryCode: '', shouldNotSetPhoneCountryCode: false };
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
const explicitPhoneMatch = ownerPhone.trim().match(/^\+(\d+)-(.+)$/);
|
|
32
|
+
const explicitPhoneMatch = trimmedPhone.match(/^\+(\d+)-(.+)$/);
|
|
33
33
|
if (explicitPhoneMatch) {
|
|
34
34
|
return {
|
|
35
35
|
phoneCountryCode: `+${explicitPhoneMatch[1]}`,
|
|
36
36
|
phoneAreaCodePrefixLineNumber: explicitPhoneMatch[2],
|
|
37
|
+
shouldNotSetPhoneCountryCode: false,
|
|
37
38
|
};
|
|
38
39
|
}
|
|
40
|
+
const preferredCountry = getCountryByIso2(preferredCountryIso2 || '');
|
|
41
|
+
const rawDigits = removeAllChars(trimmedPhone);
|
|
42
|
+
if (preferredCountry && rawDigits) {
|
|
43
|
+
const dial = String(preferredCountry.dialCode);
|
|
44
|
+
const nationalNumber = rawDigits.startsWith(dial) && rawDigits.length > dial.length + 6
|
|
45
|
+
? rawDigits.substring(dial.length)
|
|
46
|
+
: rawDigits;
|
|
47
|
+
return {
|
|
48
|
+
phoneCountryCode: `+${dial}`,
|
|
49
|
+
phoneAreaCodePrefixLineNumber: nationalNumber,
|
|
50
|
+
shouldNotSetPhoneCountryCode: false,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
if (rawDigits.length > 10) {
|
|
54
|
+
const exactCountry = getExactCountry(rawDigits);
|
|
55
|
+
const dialCode = !isEmpty(exactCountry) ? String(exactCountry['dialCode']) : '';
|
|
56
|
+
const phoneInitials = !isEmpty(exactCountry) ? (_a = exactCountry['phoneInitials']) !== null && _a !== void 0 ? _a : [] : [];
|
|
57
|
+
const isReliableMatch = !isEmpty(dialCode) &&
|
|
58
|
+
(!AMBIGUOUS_SHARED_DIAL_CODES.has(dialCode) ||
|
|
59
|
+
phoneInitials.some((initial) => rawDigits.startsWith(initial)));
|
|
60
|
+
if (isReliableMatch) {
|
|
61
|
+
return {
|
|
62
|
+
phoneCountryCode: `+${dialCode}`,
|
|
63
|
+
phoneAreaCodePrefixLineNumber: rawDigits.substring(dialCode.length),
|
|
64
|
+
shouldNotSetPhoneCountryCode: false,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
39
68
|
return {
|
|
40
|
-
|
|
41
|
-
phoneAreaCodePrefixLineNumber: ownerPhone.replace(/^\+/, ''),
|
|
69
|
+
phoneAreaCodePrefixLineNumber: trimmedPhone.replace(/^\+/, ''),
|
|
42
70
|
phoneCountryCode: '',
|
|
43
|
-
|
|
71
|
+
shouldNotSetPhoneCountryCode: true,
|
|
72
|
+
portalPhone: trimmedPhone,
|
|
44
73
|
};
|
|
45
74
|
}
|
|
46
75
|
export function ContactPhoneNumber() {
|
|
@@ -101,7 +130,7 @@ export function ContactPhoneNumber() {
|
|
|
101
130
|
}
|
|
102
131
|
};
|
|
103
132
|
const onCountryCodeChange = (phoneCountryCode) => {
|
|
104
|
-
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: true });
|
|
133
|
+
setCaseState(caseDispatch, Object.assign({ hasUserUpdatedSuppliedPhone: true }, (phoneCountryCode ? { shouldNotSetPhoneCountryCode: false } : {})));
|
|
105
134
|
setCaseDetails(caseDispatch, { phoneCountryCode });
|
|
106
135
|
};
|
|
107
136
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
@@ -142,7 +171,6 @@ export function ContactPhoneNumber() {
|
|
|
142
171
|
setLocalFullPhone('');
|
|
143
172
|
setCaseState(caseDispatch, { isCasePhoneUpdating: true });
|
|
144
173
|
const initContactPhoneNumber = () => __awaiter(this, void 0, void 0, function* () {
|
|
145
|
-
var _a;
|
|
146
174
|
let _phoneAreaCodePrefixLineNumber;
|
|
147
175
|
let _phoneCountryCode;
|
|
148
176
|
let _suppliedPhoneNumberVerified;
|
|
@@ -159,44 +187,15 @@ export function ContactPhoneNumber() {
|
|
|
159
187
|
: 'False';
|
|
160
188
|
}
|
|
161
189
|
else {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
_phoneAreaCodePrefixLineNumber = phoneLine;
|
|
173
|
-
_phoneCountryCode = countryCode;
|
|
174
|
-
} else {
|
|
175
|
-
setCaseState(caseDispatch, {
|
|
176
|
-
shouldNotSetPhoneCountryCode: true,
|
|
177
|
-
});
|
|
178
|
-
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone!;
|
|
179
|
-
_phoneCountryCode = '';
|
|
180
|
-
setPortalPhone(loggedInUser.data.phone!);
|
|
181
|
-
}
|
|
182
|
-
*/
|
|
183
|
-
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format
|
|
184
|
-
const explicitPhoneMatch = (_a = loggedInUser.data.phone) === null || _a === void 0 ? void 0 : _a.trim().match(/^\+(\d+)-(.+)$/);
|
|
185
|
-
if (explicitPhoneMatch) {
|
|
186
|
-
_phoneCountryCode = `+${explicitPhoneMatch[1]}`;
|
|
187
|
-
_phoneAreaCodePrefixLineNumber = explicitPhoneMatch[2];
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
setCaseState(caseDispatch, {
|
|
191
|
-
shouldNotSetPhoneCountryCode: true,
|
|
192
|
-
});
|
|
193
|
-
// TODO: Temporary — strip leading + when phone is not in +{countryCode}-{phoneLine} format.
|
|
194
|
-
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone.replace(/^\+/, '');
|
|
195
|
-
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
196
|
-
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone!;
|
|
197
|
-
*/
|
|
198
|
-
_phoneCountryCode = '';
|
|
199
|
-
setPortalPhone(loggedInUser.data.phone);
|
|
190
|
+
const preferredIso2 = getPreferredCountryIso2FromTimezone(loggedInUser.data.timezone || loggedInUser.data.normalizedTZ);
|
|
191
|
+
const parsed = parsePhone(loggedInUser.data.phone, preferredIso2);
|
|
192
|
+
_phoneCountryCode = parsed.phoneCountryCode;
|
|
193
|
+
_phoneAreaCodePrefixLineNumber = parsed.phoneAreaCodePrefixLineNumber;
|
|
194
|
+
setCaseState(caseDispatch, {
|
|
195
|
+
shouldNotSetPhoneCountryCode: parsed.shouldNotSetPhoneCountryCode,
|
|
196
|
+
});
|
|
197
|
+
if (parsed.portalPhone) {
|
|
198
|
+
setPortalPhone(parsed.portalPhone);
|
|
200
199
|
}
|
|
201
200
|
_suppliedPhoneNumberVerified =
|
|
202
201
|
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
|
|
@@ -207,11 +206,12 @@ export function ContactPhoneNumber() {
|
|
|
207
206
|
}
|
|
208
207
|
else {
|
|
209
208
|
// Opening case for another owner — use phone already on selectedOwner
|
|
210
|
-
const
|
|
209
|
+
const preferredIso2 = getPreferredCountryIso2FromTimezone(loggedInUser.data.timezone || loggedInUser.data.normalizedTZ);
|
|
210
|
+
const parsed = parsePhone(selectedOwnerPhone, preferredIso2);
|
|
211
211
|
_phoneAreaCodePrefixLineNumber = parsed.phoneAreaCodePrefixLineNumber;
|
|
212
212
|
_phoneCountryCode = parsed.phoneCountryCode;
|
|
213
|
+
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: parsed.shouldNotSetPhoneCountryCode });
|
|
213
214
|
if (parsed.portalPhone) {
|
|
214
|
-
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
215
215
|
setPortalPhone(parsed.portalPhone);
|
|
216
216
|
}
|
|
217
217
|
_suppliedPhoneNumberVerified = 'Deferred';
|
|
@@ -287,7 +287,7 @@ export function ContactPhoneNumber() {
|
|
|
287
287
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
288
288
|
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
|
|
289
289
|
ContactPhoneNumberPopOver()),
|
|
290
|
-
React.createElement(PhoneInput, { phoneValue: localFullPhone, countryCode: phoneCountryCode, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid, isLoading: isCasePhoneUpdating, shouldNotSetCountryCode: shouldNotSetPhoneCountryCode, isDisabled: isCasePhoneUpdating }),
|
|
290
|
+
React.createElement(PhoneInput, { phoneValue: localFullPhone, countryCode: phoneCountryCode, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid, isLoading: isCasePhoneUpdating, shouldNotSetCountryCode: shouldNotSetPhoneCountryCode, preferredCountryIso2: getPreferredCountryIso2FromTimezone(loggedInUser.data.timezone || loggedInUser.data.normalizedTZ), isDisabled: isCasePhoneUpdating }),
|
|
291
291
|
!invalid &&
|
|
292
292
|
getPhone.length <= PHONE_LIMIT &&
|
|
293
293
|
!(isPhoneNumberEmpty && isNextBtnClickedToShowValidationError) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttachmentHelper.d.ts","sourceRoot":"","sources":["../../../../../../src/components/shared/fileUpload/reducer/AttachmentHelper.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAA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,EACrB,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,iBAAiB,EAChC,gBAAgB,CAAC,EAAE,MAAM,iBAiF5B;AAED,wBAAsB,uBAAuB,CAAC,QAAQ,KAAA,EAAE,SAAS,EAAE,MAAM,iBAgDxE;AAED,wBAAgB,+BAA+B,CAAC,UAAU,EAAE,UAAU,EAAE,WAEvE;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,UAAU,EAAE,WAKzD;AAED,eAAO,MAAM,uBAAuB,GAAI,YAAY,UAAU,KAAG,OAShE,CAAC;AAKF,eAAO,MAAM,2BAA2B,UAOvC,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,oBAAoB,UAAU,EAAE,YAE9E,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,aAAQ,SASvC,CAAC"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { Config, pcm, sessionAttachments } from '@cee-eng/hydrajs';
|
|
11
11
|
import { ToastNotification } from '@rh-support/components';
|
|
12
|
-
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, GET_CONTENT_DOCUMENT_IDS, getText, markCaseAttachmentUploadFailed, markCaseAttachmentUploadInProgress, MultipartUploadError, pollAttachmentUploadStatus, pollContentVersionStatus, uploadCaseAttachment, USER_ABORTED_REQUEST_DESCRIPTION, } from '@rh-support/utils';
|
|
12
|
+
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, GET_CONTENT_DOCUMENT_IDS, getText, markCaseAttachmentUploadFailed, markCaseAttachmentUploadInProgress, MultipartUploadError, pollAttachmentUploadStatus, pollContentVersionStatus, sendToSentry, setTag, uploadCaseAttachment, USER_ABORTED_REQUEST_DESCRIPTION, } from '@rh-support/utils';
|
|
13
13
|
import find from 'lodash/find';
|
|
14
14
|
import includes from 'lodash/includes';
|
|
15
15
|
import isEmpty from 'lodash/isEmpty';
|
|
@@ -483,6 +483,10 @@ needsAnalyzing = false, isSessionId = false, slowUploadConfig = {}, apolloClient
|
|
|
483
483
|
}
|
|
484
484
|
else {
|
|
485
485
|
console.error(error);
|
|
486
|
+
if (attachmentIdFromError) {
|
|
487
|
+
setTag('attachment_uuid', attachmentIdFromError);
|
|
488
|
+
}
|
|
489
|
+
sendToSentry(error, { error: error.message });
|
|
486
490
|
const singlePutResume = error instanceof CaseAttachmentUploadError ? error.resumeData : undefined;
|
|
487
491
|
const uploadErrorPayload = Object.assign({ uploadStatus: isSessionId
|
|
488
492
|
? UploadStatusConstants.uploadOnSessionFailed
|
|
@@ -647,6 +651,11 @@ export function moveSessionAttachmentToCase(dispatch, caseNumber, sessionId, loc
|
|
|
647
651
|
// Show alert if needed
|
|
648
652
|
}
|
|
649
653
|
else {
|
|
654
|
+
const attachmentUUID = localFile.attachmentId;
|
|
655
|
+
if (attachmentUUID) {
|
|
656
|
+
setTag('attachment_uuid', attachmentUUID);
|
|
657
|
+
}
|
|
658
|
+
sendToSentry(error, { error: error.message });
|
|
650
659
|
updateUploadMetadata(dispatch, fileIndex, {
|
|
651
660
|
uploadStatus: UploadStatusConstants.uploadOnCaseFailed,
|
|
652
661
|
uploadErrorMessage: error.message,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/useFileUploader.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAA8D,MAAM,OAAO,CAAC;AAiBnF,OAAO,EACH,UAAU,EAKb,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAKnD,wBAAgB,eAAe,CAAC,KAAK,EAAE,wBAAwB;gCAoKjB,MAAM;gCAYA,UAAU,mBAAmB,MAAM,WAAW,UAAU;oCAOpD,MAAM,QAAQ,UAAU;wBA9GzD,KAAK,CAAC,UAAU,CAAC,iBAAiB,EAAE,UAAU,CAAC;4BA6K3B,MAAM;kCA7EN,MAAM;EAqHhD"}
|
|
@@ -11,7 +11,7 @@ import { useApolloClient } from '@apollo/client/react';
|
|
|
11
11
|
import { sessionAttachments } from '@cee-eng/hydrajs';
|
|
12
12
|
import { useFetch, usePrevious } from '@rh-support/components';
|
|
13
13
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
14
|
-
import { abortMultipartUpload, deleteCaseAttachment, fetchCaseDetailsByCaseNumber, getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE, } from '@rh-support/utils';
|
|
14
|
+
import { abortMultipartUpload, deleteCaseAttachment, fetchCaseDetailsByCaseNumber, getConfigField, getUserAgentForCaseMode, PCM_CONFIG_FIELD_TYPE, sendToSentry, setTag, } from '@rh-support/utils';
|
|
15
15
|
import debounce from 'lodash/debounce';
|
|
16
16
|
import { useCallback, useContext, useEffect, useMemo, useRef } from 'react';
|
|
17
17
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
|
|
@@ -189,15 +189,19 @@ export function useFileUploader(props) {
|
|
|
189
189
|
try {
|
|
190
190
|
yield abortMultipartUpload(multipartResume.attachmentId, idToUploadTo, multipartResume.uploadId);
|
|
191
191
|
}
|
|
192
|
-
catch (
|
|
192
|
+
catch (error) {
|
|
193
193
|
// Best-effort: still attempt deleteFile below
|
|
194
|
+
setTag('attachment_uuid', multipartResume.attachmentId);
|
|
195
|
+
sendToSentry(error, { error: error === null || error === void 0 ? void 0 : error.message });
|
|
194
196
|
}
|
|
195
197
|
}
|
|
196
198
|
try {
|
|
197
199
|
yield deleteCaseAttachmentRequest(idToUploadTo, attachmentIdToDelete);
|
|
198
200
|
}
|
|
199
|
-
catch (
|
|
201
|
+
catch (error) {
|
|
200
202
|
// Best-effort: row is already removed from the PCM queue
|
|
203
|
+
setTag('attachment_uuid', attachmentIdToDelete);
|
|
204
|
+
sendToSentry(error, { error: error === null || error === void 0 ? void 0 : error.message });
|
|
201
205
|
}
|
|
202
206
|
}
|
|
203
207
|
});
|
|
@@ -35,4 +35,5 @@ export declare const PHONE_LINE_CANNOT_BE_EMPTY = "Phone number cannot be empty
|
|
|
35
35
|
export declare const PHONE_NO_CHAR_ERROR = "Phone number can only have digits.";
|
|
36
36
|
export declare const PHONE_IS_NOT_VALID = "Phone number without country code is invalid.";
|
|
37
37
|
export declare const PHONE_INSTRUCTION = "A current phone number with the country code helps us support you better.";
|
|
38
|
+
export declare const AMBIGUOUS_SHARED_DIAL_CODES: Set<string>;
|
|
38
39
|
//# sourceMappingURL=caseDetailsConstants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,eAAO,MAAM,mBAAmB;;;;;;;;;CAyB/B,CAAC;AAEF,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mCAAmC,wCAAwC;IAC3E,sCAAsC,2CAA2C;IACjF,WAAW,gBAAgB;IAC3B,4DAA4D;IAC5D,mBAAmB,wBAAwB;IAC3C,4DAA4D;IAC5D,iBAAiB,uBAAuB;CAC3C;AAED,oBAAY,0BAA0B;IAClC,OAAO,MAAM;IACb,WAAW,OAAO;IAClB,OAAO,MAAM;CAChB;AACD,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,2BAA2B,gCAAgC;IAC3D,wBAAwB,6BAA6B;CACxD;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,kDAAkD,CAAC;AAElF,eAAO,MAAM,iBAAiB,8EAA8E,CAAC"}
|
|
1
|
+
{"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,eAAO,MAAM,mBAAmB;;;;;;;;;CAyB/B,CAAC;AAEF,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mCAAmC,wCAAwC;IAC3E,sCAAsC,2CAA2C;IACjF,WAAW,gBAAgB;IAC3B,4DAA4D;IAC5D,mBAAmB,wBAAwB;IAC3C,4DAA4D;IAC5D,iBAAiB,uBAAuB;CAC3C;AAED,oBAAY,0BAA0B;IAClC,OAAO,MAAM;IACb,WAAW,OAAO;IAClB,OAAO,MAAM;CAChB;AACD,oBAAY,iBAAiB;IACzB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,2BAA2B,gCAAgC;IAC3D,wBAAwB,6BAA6B;CACxD;AAED,eAAO,MAAM,0BAA0B,6DAA6D,CAAC;AAErG,eAAO,MAAM,mBAAmB,uCAAuC,CAAC;AAExE,eAAO,MAAM,kBAAkB,kDAAkD,CAAC;AAElF,eAAO,MAAM,iBAAiB,8EAA8E,CAAC;AAE7G,eAAO,MAAM,2BAA2B,aAAmC,CAAC"}
|
|
@@ -55,3 +55,4 @@ export const PHONE_LINE_CANNOT_BE_EMPTY = 'Phone number cannot be empty when cou
|
|
|
55
55
|
export const PHONE_NO_CHAR_ERROR = 'Phone number can only have digits.';
|
|
56
56
|
export const PHONE_IS_NOT_VALID = 'Phone number without country code is invalid.';
|
|
57
57
|
export const PHONE_INSTRUCTION = 'A current phone number with the country code helps us support you better.';
|
|
58
|
+
export const AMBIGUOUS_SHARED_DIAL_CODES = new Set(['1', '7', '39', '599']);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEscalationDetails.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getEscalationDetails.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"getEscalationDetails.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getEscalationDetails.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,uCAsClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"escalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/schemas/escalation.ts"],"names":[],"mappings":"AAAA,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,oBAAoB,EAAE;QAClB,UAAU,EAAE;YACR,mBAAmB,EAAE;gBACjB,EAAE,EAAE,MAAM,CAAC;gBACX,aAAa,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;gBACjC,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,EACC;QACI,QAAQ,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KAC5B,GACD;QACI,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KACvC,CAAC;CACX;AAED,MAAM,WAAW,4BAA4B;IACzC,oBAAoB,EAAE;QAClB,KAAK,EAAE;YACH,iBAAiB,EAAE;gBACf,KAAK,EAAE,KAAK,CAAC;oBACT,IAAI,EAAE;wBACF,EAAE,EAAE,MAAM,CAAC;wBACX,aAAa,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBACjC,OAAO,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBAC3B,MAAM,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBAC1B,KAAK,CAAC,EAAE;4BAAE,IAAI,CAAC,EAAE;gCAAE,KAAK,EAAE,MAAM,CAAA;6BAAE,CAAA;yBAAE,CAAC;qBACxC,CAAC;iBACL,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
|
|
1
|
+
{"version":3,"file":"escalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/schemas/escalation.ts"],"names":[],"mappings":"AAAA,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,oBAAoB,EAAE;QAClB,UAAU,EAAE;YACR,mBAAmB,EAAE;gBACjB,EAAE,EAAE,MAAM,CAAC;gBACX,aAAa,EAAE;oBAAE,KAAK,EAAE,MAAM,CAAA;iBAAE,CAAC;gBACjC,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,EACC;QACI,QAAQ,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KAC5B,GACD;QACI,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KACvC,CAAC;CACX;AAED,MAAM,WAAW,4BAA4B;IACzC,oBAAoB,EAAE;QAClB,KAAK,EAAE;YACH,iBAAiB,EAAE;gBACf,KAAK,EAAE,KAAK,CAAC;oBACT,IAAI,EAAE;wBACF,EAAE,EAAE,MAAM,CAAC;wBACX,aAAa,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBACjC,OAAO,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBAC3B,MAAM,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBAC1B,IAAI,CAAC,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;wBACzB,KAAK,CAAC,EAAE;4BAAE,IAAI,CAAC,EAAE;gCAAE,KAAK,EAAE,MAAM,CAAA;6BAAE,CAAA;yBAAE,CAAC;qBACxC,CAAC;iBACL,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useS3Upload.d.ts","sourceRoot":"","sources":["../../../src/hooks/useS3Upload.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,
|
|
1
|
+
{"version":3,"file":"useS3Upload.d.ts","sourceRoot":"","sources":["../../../src/hooks/useS3Upload.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,iBAAiB,EAUpB,MAAM,mBAAmB,CAAC;AAU3B,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAE,MAAM;gEA0BpG;QACC,IAAI,EAAE,IAAI,CAAC;QACX,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;KAC7D;;EAsEJ"}
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { ToastNotification } from '@rh-support/components';
|
|
11
11
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
12
|
-
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, markCaseAttachmentUploadFailed, MultipartUploadError, pollAttachmentUploadStatus, uploadCaseAttachment, USER_ABORTED_REQUEST_DESCRIPTION, } from '@rh-support/utils';
|
|
12
|
+
import { CaseAttachmentUploadError, fetchCaseDetailsByCaseNumber, markCaseAttachmentUploadFailed, MultipartUploadError, pollAttachmentUploadStatus, sendToSentry, setTag, uploadCaseAttachment, USER_ABORTED_REQUEST_DESCRIPTION, } from '@rh-support/utils';
|
|
13
13
|
import { useTranslation } from 'react-i18next';
|
|
14
14
|
// TODO: Re-enable when Hydra/GraphQL attachment APIs support secure support again
|
|
15
15
|
// Previously: useS3Upload(idToUploadTo, isSecureSupport) and passed isSecureSupport into uploadAttachmentS3
|
|
@@ -66,6 +66,10 @@ export function useS3Upload(caseNumber, apolloClient, caseSalesforceId) {
|
|
|
66
66
|
if (isUserAbort) {
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
|
+
if (attachmentIdFromError) {
|
|
70
|
+
setTag('attachment_uuid', attachmentIdFromError);
|
|
71
|
+
}
|
|
72
|
+
sendToSentry(error, { error: error.message });
|
|
69
73
|
throw error;
|
|
70
74
|
}
|
|
71
75
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDetailsPageReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseDetailsPageReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACH,iBAAiB,
|
|
1
|
+
{"version":3,"file":"CaseDetailsPageReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseDetailsPageReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EACH,iBAAiB,EAOpB,MAAM,mBAAmB,CAAC;AAQ3B,KAAK,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACjE,MAAM,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE1E,oBAAY,oBAAoB;IAC5B,WAAW,gBAAgB;CAC9B;AAED,MAAM,WAAW,cAAc;IAC3B,kBAAkB,EAAE,mBAAmB,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC;IACrE,mBAAmB,EAAE,mBAAmB,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAGjE,0BAA0B,EAAE,mBAAmB,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACpE,eAAe,EAAE,mBAAmB,CAAC,eAAe,EAAE,CAAC,CAAC;CAC3D;AAED,eAAO,MAAM,2BAA2B,EAAE,cAOzC,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,cAAc,EAAE,QAAQ,WAAW,KAAG,GASnF,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,UAAU,8BAA8B,EACxC,YAAY,MAAM,EAClB,cAAc,iBAAiB,EAC/B,mBAAmB,MAAM,EACzB,8BAA4B,kBA+B/B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAU,UAAU,8BAA8B,EAAE,YAAY,MAAM,kBAoBhG,CAAC;AAsBF,eAAO,MAAM,qBAAqB,GAAU,WAAW,8BAA8B,EAAE,aAAa,MAAM,kBAEzG,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC7B,UAAU,8BAA8B,EACxC,UAAU,MAAM,EAChB,cAAc;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CAAE,EACvD,oBAAiB,EACjB,8BAA4B,EAC5B,cAAa,aAAa,GAAG,cAA8B,KAC5D,OAAO,CAAC,eAAe,EAAE,CAwD3B,CAAC"}
|
|
@@ -8,8 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { publicApi } from '@cee-eng/hydrajs';
|
|
11
|
-
import { buildAccessRestrictionExclusionFilter, fetchCaseAttachmentsViaGraphQL, fetchCaseDetailsByCaseNumber, getApiResourceObject, } from '@rh-support/utils';
|
|
11
|
+
import { buildAccessRestrictionExclusionFilter, ensureEscalationRecordTypeId, fetchCaseAttachmentsViaGraphQL, fetchCaseDetailsByCaseNumber, getApiResourceObject, } from '@rh-support/utils';
|
|
12
12
|
import { GET_ESCALATION_DETAILS } from '../graphql';
|
|
13
|
+
/** Portal Escalations tab is RME-only; ACE/ICE child cases must not appear for customers. */
|
|
14
|
+
const RME_ESCALATION_TYPE = 'RME';
|
|
15
|
+
const RME_ESCALATION_SOURCE = 'RME Escalation';
|
|
13
16
|
export var CaseDetailsConstants;
|
|
14
17
|
(function (CaseDetailsConstants) {
|
|
15
18
|
CaseDetailsConstants["updateState"] = "updateState";
|
|
@@ -110,17 +113,30 @@ export const fetchCaseEscalations = (dispatch_1, parentId_1, apolloClient_1, ...
|
|
|
110
113
|
type: CaseDetailsConstants.updateState,
|
|
111
114
|
payload: { caseEscalations: getApiResourceObject([], setLoading) },
|
|
112
115
|
});
|
|
116
|
+
const escalationRecordTypeId = yield ensureEscalationRecordTypeId();
|
|
117
|
+
const andConditions = [
|
|
118
|
+
{ ParentId: { eq: parentId } },
|
|
119
|
+
// RME escalations are Type=RME; ACE/ICE must not surface in this tab.
|
|
120
|
+
{ Type: { eq: RME_ESCALATION_TYPE } },
|
|
121
|
+
buildAccessRestrictionExclusionFilter(includeSecureSupport),
|
|
122
|
+
];
|
|
123
|
+
if (escalationRecordTypeId) {
|
|
124
|
+
andConditions.push({ RecordTypeId: { eq: escalationRecordTypeId } });
|
|
125
|
+
}
|
|
113
126
|
const { data } = yield apolloClient.query({
|
|
114
127
|
query: GET_ESCALATION_DETAILS,
|
|
115
128
|
fetchPolicy,
|
|
116
129
|
variables: {
|
|
117
130
|
where: {
|
|
118
|
-
and:
|
|
131
|
+
and: andConditions,
|
|
119
132
|
},
|
|
120
133
|
},
|
|
121
134
|
});
|
|
122
135
|
const edges = (_d = (_c = (_b = (_a = data === null || data === void 0 ? void 0 : data.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportCase) === null || _c === void 0 ? void 0 : _c.edges) !== null && _d !== void 0 ? _d : [];
|
|
123
|
-
|
|
136
|
+
// Defense in depth: same RME-only filter Hydra used via escalationSource === 'RME Escalation'.
|
|
137
|
+
const caseEscalations = edges
|
|
138
|
+
.filter(({ node }) => { var _a, _b; return ((_b = (_a = node.Type) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : '') === RME_ESCALATION_TYPE; })
|
|
139
|
+
.map(({ node }) => {
|
|
124
140
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
125
141
|
return ({
|
|
126
142
|
id: (_a = node.Id) !== null && _a !== void 0 ? _a : '',
|
|
@@ -128,7 +144,7 @@ export const fetchCaseEscalations = (dispatch_1, parentId_1, apolloClient_1, ...
|
|
|
128
144
|
subject: (_e = (_d = node.Subject) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : '',
|
|
129
145
|
status: (_g = (_f = node.Status) === null || _f === void 0 ? void 0 : _f.value) !== null && _g !== void 0 ? _g : '',
|
|
130
146
|
owner: (_k = (_j = (_h = node.Owner) === null || _h === void 0 ? void 0 : _h.Name) === null || _j === void 0 ? void 0 : _j.value) !== null && _k !== void 0 ? _k : '',
|
|
131
|
-
escalationSource:
|
|
147
|
+
escalationSource: RME_ESCALATION_SOURCE,
|
|
132
148
|
});
|
|
133
149
|
});
|
|
134
150
|
dispatch({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseOverviewReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseOverviewReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGxE,KAAK,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,cAAc,CAAC,CAAC;AACjE,MAAM,MAAM,8BAA8B,GAAG,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;AAE1E,oBAAY,oBAAoB;IAC5B,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IAC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,GAAI,UAAU,8BAA8B,EAAE,cAAc,MAAM,SAE7F,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,8BAA8B,EAAE,kBAAkB,MAAM,SAErG,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,8BAA8B,EAAE,gBAAgB,MAAM,SAEjG,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,UAAU,8BAA8B,EAAE,sBAAsB,OAAO,SAE1G,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,8BAA8B,EAAE,oBAAoB,OAAO,SAEtG,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU,8BAA8B,EAAE,kBAAkB,OAAO,SAElG,CAAC;AAEF,eAAO,MAAM,gBAAgB,GACzB,UAAU,8BAA8B,EACxC,cAAc;IAAE,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CAAE,kBAoB1D,CAAC;AAkBF,eAAO,MAAM,cAAc,GAAI,UAAU,8BAA8B,EAAE,YAAY,MAAM,kBA4B1F,CAAC"}
|
|
@@ -87,22 +87,41 @@ export const fetchAllStatuses = (dispatch, apolloClient) => __awaiter(void 0, vo
|
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
})
|
|
90
|
+
const caseHydraRequests = new Map();
|
|
91
|
+
const receivedCaseHydra = (dispatch, caseDetailsHydra) => {
|
|
92
|
+
dispatch({
|
|
93
|
+
type: CaseDetailsConstants.getCaseDetailsHydra,
|
|
94
|
+
payload: { caseDetailsHydra: getApiResourceObject(caseDetailsHydra) },
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
const failedCaseHydra = (dispatch, error) => {
|
|
98
|
+
dispatch({
|
|
99
|
+
type: CaseDetailsConstants.getCaseDetailsHydra,
|
|
100
|
+
payload: { caseDetailsHydra: getApiResourceObject({}, false, true, error === null || error === void 0 ? void 0 : error.message) },
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
export const fetchCaseHydra = (dispatch, caseNumber) => {
|
|
104
|
+
const existingRequest = caseHydraRequests.get(caseNumber);
|
|
105
|
+
if (existingRequest) {
|
|
106
|
+
return existingRequest.then((caseDetailsHydra) => receivedCaseHydra(dispatch, caseDetailsHydra), (error) => failedCaseHydra(dispatch, error));
|
|
101
107
|
}
|
|
102
|
-
|
|
108
|
+
const request = kase.getCase(caseNumber, fields.getCaseFields({ includeCaseOwner: true }));
|
|
109
|
+
caseHydraRequests.set(caseNumber, request);
|
|
110
|
+
request.catch(() => {
|
|
111
|
+
if (caseHydraRequests.get(caseNumber) === request) {
|
|
112
|
+
caseHydraRequests.delete(caseNumber);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
return (() => __awaiter(void 0, void 0, void 0, function* () {
|
|
103
116
|
dispatch({
|
|
104
117
|
type: CaseDetailsConstants.getCaseDetailsHydra,
|
|
105
|
-
payload: { caseDetailsHydra: getApiResourceObject({},
|
|
118
|
+
payload: { caseDetailsHydra: getApiResourceObject({}, true) },
|
|
106
119
|
});
|
|
107
|
-
|
|
108
|
-
|
|
120
|
+
try {
|
|
121
|
+
receivedCaseHydra(dispatch, yield request);
|
|
122
|
+
}
|
|
123
|
+
catch (e) {
|
|
124
|
+
failedCaseHydra(dispatch, e);
|
|
125
|
+
}
|
|
126
|
+
}))();
|
|
127
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.54",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"@progress/kendo-licensing": "1.3.5",
|
|
53
53
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
54
54
|
"@redux-devtools/extension": "^3.3.0",
|
|
55
|
-
"@rh-support/components": "2.6.
|
|
56
|
-
"@rh-support/react-context": "2.6.
|
|
55
|
+
"@rh-support/components": "2.6.46",
|
|
56
|
+
"@rh-support/react-context": "2.6.48",
|
|
57
57
|
"@rh-support/types": "2.0.31",
|
|
58
|
-
"@rh-support/user-permissions": "2.6.
|
|
59
|
-
"@rh-support/utils": "2.6.
|
|
58
|
+
"@rh-support/user-permissions": "2.6.43",
|
|
59
|
+
"@rh-support/utils": "2.6.42",
|
|
60
60
|
"@types/react-redux": "^7.1.33",
|
|
61
61
|
"@types/redux": "^3.6.0",
|
|
62
62
|
"date-fns": "3.6.0",
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"defaults and supports es6-module",
|
|
130
130
|
"maintained node versions"
|
|
131
131
|
],
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "f93a43376534c539511491878802f207d215360c"
|
|
133
133
|
}
|