@rh-support/troubleshoot 2.7.33 → 2.7.34
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/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +3 -6
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +47 -101
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +13 -15
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAoBxE,UAAU,MAAM;CAAG;AAMnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAqBA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAoBxE,UAAU,MAAM;CAAG;AAMnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAsanC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -216,12 +216,9 @@ function OwnerSelector(props) {
|
|
|
216
216
|
fullNameCustom: '',
|
|
217
217
|
},
|
|
218
218
|
];
|
|
219
|
-
//
|
|
220
|
-
|
|
221
|
-
setCaseDetails(caseDispatch, {
|
|
222
|
-
phoneAreaCodePrefixLineNumber: '',
|
|
223
|
-
phoneCountryCode: '',
|
|
224
|
-
});
|
|
219
|
+
// Apply phone from selected owner details (already loaded with contact)
|
|
220
|
+
const ownerPhoneCaseUpdate = getOwnerPhoneCaseUpdate(customerContacts[0]);
|
|
221
|
+
setCaseDetails(caseDispatch, Object.assign({ contactSSOName: customerContacts[0].ssoUsername, phoneAreaCodePrefixLineNumber: '', phoneCountryCode: '', phone: '' }, (ownerPhoneCaseUpdate !== null && ownerPhoneCaseUpdate !== void 0 ? ownerPhoneCaseUpdate : {})));
|
|
225
222
|
setCaseState(caseDispatch, { hasUserUpdatedSuppliedPhone: false });
|
|
226
223
|
onOwnerChange(customerContacts[0], previousCaseOwner, selectedNotificationContacts, caseDispatch);
|
|
227
224
|
}
|
|
@@ -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":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AA4C/D,wBAAgB,kBAAkB,sBAwVjC"}
|
|
@@ -7,11 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
-
import { useApolloClient } from '@apollo/client/react';
|
|
11
10
|
import { ValidatedOptions } from '@patternfly/react-core';
|
|
12
11
|
import { getPhoneObj, PhoneInput } from '@rh-support/components';
|
|
13
12
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
14
|
-
import { buildAccountWhereForContacts, GET_ACCOUNT_CONTACTS } from '@rh-support/utils';
|
|
15
13
|
import isEmpty from 'lodash/isEmpty';
|
|
16
14
|
import isEqual from 'lodash/isEqual';
|
|
17
15
|
import isUndefined from 'lodash/isUndefined';
|
|
@@ -25,42 +23,45 @@ import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
|
|
|
25
23
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
26
24
|
import { removeAllChars, trimAndReplacePlus } from '../shared/utils';
|
|
27
25
|
import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
first: 1,
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
const response = data;
|
|
40
|
-
const contactNode = (_j = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportAccount) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Contacts) === null || _g === void 0 ? void 0 : _g.edges) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.node;
|
|
26
|
+
/** Parse owner phone into case phone fields (same rules as GraphQL phone mapping). */
|
|
27
|
+
function parseOwnerPhone(ownerPhone) {
|
|
28
|
+
if (!(ownerPhone === null || ownerPhone === void 0 ? void 0 : ownerPhone.trim())) {
|
|
29
|
+
return { phoneAreaCodePrefixLineNumber: '', phoneCountryCode: '' };
|
|
30
|
+
}
|
|
31
|
+
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format
|
|
32
|
+
const explicitPhoneMatch = ownerPhone.trim().match(/^\+(\d+)-(.+)$/);
|
|
33
|
+
if (explicitPhoneMatch) {
|
|
41
34
|
return {
|
|
42
|
-
|
|
35
|
+
phoneCountryCode: `+${explicitPhoneMatch[1]}`,
|
|
36
|
+
phoneAreaCodePrefixLineNumber: explicitPhoneMatch[2],
|
|
43
37
|
};
|
|
44
|
-
}
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
// TODO: Temporary — strip leading + when phone is not in +{countryCode}-{phoneLine} format.
|
|
41
|
+
phoneAreaCodePrefixLineNumber: ownerPhone.replace(/^\+/, ''),
|
|
42
|
+
phoneCountryCode: '',
|
|
43
|
+
portalPhone: ownerPhone,
|
|
44
|
+
};
|
|
45
45
|
}
|
|
46
46
|
export function ContactPhoneNumber() {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', hasLoggedInUserConfirmedPhoneNumber, contactSSOName, shouldNotSetPhoneCountryCode, isCasePhoneUpdating, selectedOwnerPhone, } = useCaseSelector((state) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return ({
|
|
50
|
+
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
51
|
+
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
52
|
+
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
53
|
+
hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
|
|
54
|
+
contactSSOName: state.caseDetails.contactSSOName,
|
|
55
|
+
shouldNotSetPhoneCountryCode: state.shouldNotSetPhoneCountryCode,
|
|
56
|
+
isCasePhoneUpdating: state.isCasePhoneUpdating,
|
|
57
|
+
selectedOwnerPhone: (_b = (_a = state.selectedOwner) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.phone,
|
|
58
|
+
});
|
|
59
|
+
}, isEqual);
|
|
58
60
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
59
61
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
60
62
|
const [invalid, setInvalid] = useState(false);
|
|
61
63
|
const [portalPhone, setPortalPhone] = useState('');
|
|
62
64
|
const [localFullPhone, setLocalFullPhone] = useState('');
|
|
63
|
-
const [isFetchingSso, setIsFetchingSso] = useState(false);
|
|
64
65
|
const { isExportingPDF } = useContext(PDFContext);
|
|
65
66
|
const getPhone = phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber;
|
|
66
67
|
const caseDispatch = useCaseDispatch();
|
|
@@ -141,7 +142,7 @@ export function ContactPhoneNumber() {
|
|
|
141
142
|
setLocalFullPhone('');
|
|
142
143
|
setCaseState(caseDispatch, { isCasePhoneUpdating: true });
|
|
143
144
|
const initContactPhoneNumber = () => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
-
var _a
|
|
145
|
+
var _a;
|
|
145
146
|
let _phoneAreaCodePrefixLineNumber;
|
|
146
147
|
let _phoneCountryCode;
|
|
147
148
|
let _suppliedPhoneNumberVerified;
|
|
@@ -205,51 +206,15 @@ export function ContactPhoneNumber() {
|
|
|
205
206
|
}
|
|
206
207
|
}
|
|
207
208
|
else {
|
|
208
|
-
//
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
216
|
-
const phoneLength = trimAndReplacePlus(removeAllChars(selectedContact.phone)).length;
|
|
217
|
-
|
|
218
|
-
if (phoneLength > 10) {
|
|
219
|
-
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
220
|
-
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
221
|
-
} else {
|
|
222
|
-
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
223
|
-
_phoneCountryCode = '';
|
|
224
|
-
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
225
|
-
setPortalPhone(selectedContact.phone);
|
|
226
|
-
}
|
|
227
|
-
*/
|
|
228
|
-
// TODO: Temporary — only parse country code from +{countryCode}-{phoneLine} format (e.g. +93-895674341).
|
|
229
|
-
const explicitPhoneMatch = (_b = selectedContact.phone) === null || _b === void 0 ? void 0 : _b.trim().match(/^\+(\d+)-(.+)$/);
|
|
230
|
-
if (explicitPhoneMatch) {
|
|
231
|
-
_phoneCountryCode = `+${explicitPhoneMatch[1]}`;
|
|
232
|
-
_phoneAreaCodePrefixLineNumber = explicitPhoneMatch[2];
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
// TODO: Temporary — strip leading + when phone is not in +{countryCode}-{phoneLine} format.
|
|
236
|
-
_phoneAreaCodePrefixLineNumber = selectedContact.phone.replace(/^\+/, '');
|
|
237
|
-
/* TODO: Revert to previous logic after phone format handling is finalized.
|
|
238
|
-
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
239
|
-
*/
|
|
240
|
-
_phoneCountryCode = '';
|
|
241
|
-
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
242
|
-
setPortalPhone(selectedContact.phone);
|
|
243
|
-
}
|
|
244
|
-
_suppliedPhoneNumberVerified = 'Deferred';
|
|
245
|
-
}
|
|
246
|
-
catch (e) {
|
|
247
|
-
_phoneAreaCodePrefixLineNumber = '';
|
|
248
|
-
_phoneCountryCode = '';
|
|
249
|
-
_suppliedPhoneNumberVerified = 'False';
|
|
250
|
-
setIsFetchingSso(false);
|
|
251
|
-
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
209
|
+
// Opening case for another owner — use phone already on selectedOwner
|
|
210
|
+
const parsed = parseOwnerPhone(selectedOwnerPhone);
|
|
211
|
+
_phoneAreaCodePrefixLineNumber = parsed.phoneAreaCodePrefixLineNumber;
|
|
212
|
+
_phoneCountryCode = parsed.phoneCountryCode;
|
|
213
|
+
if (parsed.portalPhone) {
|
|
214
|
+
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
215
|
+
setPortalPhone(parsed.portalPhone);
|
|
252
216
|
}
|
|
217
|
+
_suppliedPhoneNumberVerified = 'Deferred';
|
|
253
218
|
}
|
|
254
219
|
setCaseDetails(caseDispatch, {
|
|
255
220
|
phoneAreaCodePrefixLineNumber: _phoneAreaCodePrefixLineNumber,
|
|
@@ -279,24 +244,6 @@ export function ContactPhoneNumber() {
|
|
|
279
244
|
let portalPhone;
|
|
280
245
|
let supportPhone;
|
|
281
246
|
setCaseState(caseDispatch, { isCasePhoneUpdating: true });
|
|
282
|
-
const getSelectedContactPhoneInfo = () => __awaiter(this, void 0, void 0, function* () {
|
|
283
|
-
try {
|
|
284
|
-
if (!contactSSOName)
|
|
285
|
-
return;
|
|
286
|
-
const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
|
|
287
|
-
if (!isEmpty(selectedContact.phone)) {
|
|
288
|
-
portalPhone = selectedContact.phone;
|
|
289
|
-
phoneLength = trimAndReplacePlus(removeAllChars(portalPhone)).length;
|
|
290
|
-
supportPhone = '';
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
catch (e) {
|
|
294
|
-
portalPhone = '';
|
|
295
|
-
supportPhone = '';
|
|
296
|
-
phoneLength = 0;
|
|
297
|
-
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
247
|
// logged in user and case owner are the same
|
|
301
248
|
if (contactSSOName === loggedInUser.data.ssoUsername) {
|
|
302
249
|
if (isEmpty(loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) &&
|
|
@@ -307,13 +254,12 @@ export function ContactPhoneNumber() {
|
|
|
307
254
|
}
|
|
308
255
|
}
|
|
309
256
|
else {
|
|
310
|
-
//
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
setCaseState(caseDispatch, { isCasePhoneUpdating: false });
|
|
257
|
+
// Opening case for another owner — use phone already on selectedOwner
|
|
258
|
+
const ownerPhone = selectedOwnerPhone !== null && selectedOwnerPhone !== void 0 ? selectedOwnerPhone : '';
|
|
259
|
+
if (!isEmpty(ownerPhone)) {
|
|
260
|
+
portalPhone = ownerPhone;
|
|
261
|
+
phoneLength = trimAndReplacePlus(removeAllChars(portalPhone)).length;
|
|
262
|
+
supportPhone = '';
|
|
317
263
|
}
|
|
318
264
|
}
|
|
319
265
|
if ((isUndefined(supportPhone) || isEmpty(supportPhone)) &&
|
|
@@ -335,13 +281,13 @@ export function ContactPhoneNumber() {
|
|
|
335
281
|
});
|
|
336
282
|
getPhoneInfo();
|
|
337
283
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
338
|
-
}, [contactSSOName, shouldNotSetPhoneCountryCode]);
|
|
284
|
+
}, [contactSSOName, selectedOwnerPhone, shouldNotSetPhoneCountryCode]);
|
|
339
285
|
return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
|
|
340
286
|
React.createElement("label", null,
|
|
341
287
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
342
288
|
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
|
|
343
289
|
ContactPhoneNumberPopOver()),
|
|
344
|
-
React.createElement(PhoneInput, { phoneValue: localFullPhone, countryCode: phoneCountryCode, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid, isLoading:
|
|
290
|
+
React.createElement(PhoneInput, { phoneValue: localFullPhone, countryCode: phoneCountryCode, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid, isLoading: isCasePhoneUpdating, shouldNotSetCountryCode: shouldNotSetPhoneCountryCode, isDisabled: isCasePhoneUpdating }),
|
|
345
291
|
!invalid &&
|
|
346
292
|
getPhone.length <= PHONE_LIMIT &&
|
|
347
293
|
!(isPhoneNumberEmpty && isNextBtnClickedToShowValidationError) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAiBvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAiBvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAYvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBAgftD"}
|
|
@@ -200,12 +200,10 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
200
200
|
if (selectedOwnerContactId)
|
|
201
201
|
return;
|
|
202
202
|
const fetchAndSetDefaultOwner = () => __awaiter(this, void 0, void 0, function* () {
|
|
203
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x
|
|
203
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x;
|
|
204
204
|
try {
|
|
205
205
|
// Same as logged-in user resolve: JWT/SSO → RedHatSupportContact by SSOUserName__c
|
|
206
|
-
const ssoUsername =
|
|
207
|
-
((_a = loggedInUser.data) === null || _a === void 0 ? void 0 : _a.ssoUsername) ||
|
|
208
|
-
(loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.preferred_username) ||
|
|
206
|
+
const ssoUsername = (loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.preferred_username) ||
|
|
209
207
|
(loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.username) ||
|
|
210
208
|
(loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.RHAT_LOGIN) ||
|
|
211
209
|
(loggedInUserJwtToken === null || loggedInUserJwtToken === void 0 ? void 0 : loggedInUserJwtToken.REDHAT_LOGIN) ||
|
|
@@ -221,27 +219,27 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
221
219
|
},
|
|
222
220
|
fetchPolicy: 'network-only',
|
|
223
221
|
});
|
|
224
|
-
const contactDetails = (
|
|
222
|
+
const contactDetails = (_e = (_d = (_c = (_b = (_a = contactData === null || contactData === void 0 ? void 0 : contactData.redhat_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.RedHatSupportContact) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node;
|
|
225
223
|
if (!(contactDetails === null || contactDetails === void 0 ? void 0 : contactDetails.Id))
|
|
226
224
|
return;
|
|
227
225
|
const ownerData = {
|
|
228
226
|
id: contactDetails.Id,
|
|
229
|
-
ssoUsername: ((
|
|
230
|
-
firstName: (
|
|
231
|
-
lastName: (
|
|
232
|
-
fullNameCustom: (
|
|
233
|
-
manageSupportCases: (
|
|
234
|
-
isInternal: (
|
|
235
|
-
isOrgAdmin: (
|
|
236
|
-
phone: (
|
|
237
|
-
defaultCaseGroup: (
|
|
227
|
+
ssoUsername: ((_f = contactDetails.SSOUserName__c) === null || _f === void 0 ? void 0 : _f.value) || ssoUsername,
|
|
228
|
+
firstName: (_h = (_g = contactDetails.FirstName) === null || _g === void 0 ? void 0 : _g.value) !== null && _h !== void 0 ? _h : '',
|
|
229
|
+
lastName: (_k = (_j = contactDetails.LastName) === null || _j === void 0 ? void 0 : _j.value) !== null && _k !== void 0 ? _k : '',
|
|
230
|
+
fullNameCustom: (_m = (_l = contactDetails.Name) === null || _l === void 0 ? void 0 : _l.value) !== null && _m !== void 0 ? _m : '',
|
|
231
|
+
manageSupportCases: (_p = (_o = contactDetails.ManageSupportCases__c) === null || _o === void 0 ? void 0 : _o.value) !== null && _p !== void 0 ? _p : true,
|
|
232
|
+
isInternal: (_r = (_q = contactDetails.IsInternal__c) === null || _q === void 0 ? void 0 : _q.value) !== null && _r !== void 0 ? _r : false,
|
|
233
|
+
isOrgAdmin: (_t = (_s = contactDetails.IsOrgAdmin__c) === null || _s === void 0 ? void 0 : _s.value) !== null && _t !== void 0 ? _t : false,
|
|
234
|
+
phone: (_v = (_u = contactDetails.Phone) === null || _u === void 0 ? void 0 : _u.value) !== null && _v !== void 0 ? _v : '',
|
|
235
|
+
defaultCaseGroup: (_x = (_w = contactDetails.DefaultCaseGroup__c) === null || _w === void 0 ? void 0 : _w.value) !== null && _x !== void 0 ? _x : null,
|
|
238
236
|
};
|
|
239
237
|
setCaseState(caseDispatch, {
|
|
240
238
|
selectedOwner: { data: ownerData, isFetching: false, isError: false, errorMessage: '' },
|
|
241
239
|
});
|
|
242
240
|
setCaseDetails(caseDispatch, { contactSSOName: ownerData.ssoUsername });
|
|
243
241
|
}
|
|
244
|
-
catch (
|
|
242
|
+
catch (_y) {
|
|
245
243
|
// Contact fetch failed; owner stays empty
|
|
246
244
|
}
|
|
247
245
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.34",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -129,5 +129,5 @@
|
|
|
129
129
|
"defaults and supports es6-module",
|
|
130
130
|
"maintained node versions"
|
|
131
131
|
],
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "d2cd25f1bebe257d74cd823d8f7f8e5f724e0025"
|
|
133
133
|
}
|