@rh-support/troubleshoot 2.2.109 → 2.2.111
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 +20 -0
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseSolutions/CaseSolutions.js +5 -3
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +39 -29
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +31 -17
- package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.js +17 -6
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +0 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
- package/lib/esm/components/shared/utils.js +5 -5
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +8 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +1 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +1 -0
- package/lib/esm/reducers/CaseHelpers.js +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAkB/D,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAkB/D,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAgXnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -269,6 +269,26 @@ function OwnerSelector(props) {
|
|
|
269
269
|
users.length > 0 && setUsersWithGroupAccess(sortHydraContacts(users));
|
|
270
270
|
}
|
|
271
271
|
}, [selectedCaseGroupUsers, caseNumber]);
|
|
272
|
+
// to populate the phone number with the logged in user data
|
|
273
|
+
useEffect(() => {
|
|
274
|
+
if (caseDetailes.contactSSOName === loggedInUser.data.ssoUsername) {
|
|
275
|
+
if (loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) {
|
|
276
|
+
setCaseDetails(caseDispatch, {
|
|
277
|
+
phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
|
|
278
|
+
phoneCountryCode: loggedInUser.data.supportPhoneCountryCode,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
const phoneLine = getPhoneObj(loggedInUser.data.phone).phoneLine || '';
|
|
283
|
+
const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode;
|
|
284
|
+
setCaseDetails(caseDispatch, {
|
|
285
|
+
phoneAreaCodePrefixLineNumber: phoneLine,
|
|
286
|
+
phoneCountryCode: countryCode,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
291
|
+
}, [loggedInUser.data, caseDetailes.contactSSOName]);
|
|
272
292
|
const showUsersWithSelectedGroupAccess = caseNumber &&
|
|
273
293
|
(selectedCaseGroupUsers.isFetching ||
|
|
274
294
|
(!selectedCaseGroupUsers.isFetching && (selectedCaseGroupUsers.data || []).length > 0));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAsD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseSolutions.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseSolutions/CaseSolutions.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAuE3E,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,OAAO,CAAC;CACnC;AAUD,eAAO,MAAM,aAAa,+EA4fxB,CAAC"}
|
|
@@ -54,7 +54,9 @@ const titleFix = (recommendations, allDocs) => __awaiter(void 0, void 0, void 0,
|
|
|
54
54
|
(recommendationWithSameID.publishedTitle || recommendationWithSameID.allTitle)) {
|
|
55
55
|
rec.title = (recommendationWithSameID === null || recommendationWithSameID === void 0 ? void 0 : recommendationWithSameID.publishedTitle) || (recommendationWithSameID === null || recommendationWithSameID === void 0 ? void 0 : recommendationWithSameID.allTitle);
|
|
56
56
|
rec.solutionAbstract =
|
|
57
|
-
(recommendationWithSameID === null || recommendationWithSameID === void 0 ? void 0 : recommendationWithSameID.
|
|
57
|
+
(recommendationWithSameID === null || recommendationWithSameID === void 0 ? void 0 : recommendationWithSameID.snippet) ||
|
|
58
|
+
(recommendationWithSameID === null || recommendationWithSameID === void 0 ? void 0 : recommendationWithSameID.publishedAbstract) ||
|
|
59
|
+
(recommendationWithSameID === null || recommendationWithSameID === void 0 ? void 0 : recommendationWithSameID.abstract);
|
|
58
60
|
}
|
|
59
61
|
else {
|
|
60
62
|
ids.push(rec.resourceId);
|
|
@@ -69,7 +71,7 @@ const titleFix = (recommendations, allDocs) => __awaiter(void 0, void 0, void 0,
|
|
|
69
71
|
recs.forEach((rec) => {
|
|
70
72
|
const matchedDoc = find(docs, (doc) => doc.id === rec.resourceId);
|
|
71
73
|
rec.title = matchedDoc ? (matchedDoc === null || matchedDoc === void 0 ? void 0 : matchedDoc.publishedTitle) || (matchedDoc === null || matchedDoc === void 0 ? void 0 : matchedDoc.allTitle) : rec.title;
|
|
72
|
-
rec.solutionAbstract = (matchedDoc === null || matchedDoc === void 0 ? void 0 : matchedDoc.publishedAbstract) || (matchedDoc === null || matchedDoc === void 0 ? void 0 : matchedDoc.abstract);
|
|
74
|
+
rec.solutionAbstract = (matchedDoc === null || matchedDoc === void 0 ? void 0 : matchedDoc.snippet) || (matchedDoc === null || matchedDoc === void 0 ? void 0 : matchedDoc.publishedAbstract) || (matchedDoc === null || matchedDoc === void 0 ? void 0 : matchedDoc.abstract);
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
catch (e) {
|
|
@@ -245,7 +247,7 @@ export const CaseSolutions = forwardRef((props, ref) => {
|
|
|
245
247
|
resourceViewURI: doc.view_uri,
|
|
246
248
|
title: doc.publishedTitle || doc.allTitle,
|
|
247
249
|
resourceType: doc.documentKind,
|
|
248
|
-
solutionAbstract: doc.publishedAbstract || doc.abstract,
|
|
250
|
+
solutionAbstract: doc.snippet || doc.publishedAbstract || doc.abstract,
|
|
249
251
|
};
|
|
250
252
|
return rec;
|
|
251
253
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,sBAAsB,sBA+QrC"}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { contacts } from '@cee-eng/hydrajs';
|
|
11
11
|
import { InputGroupText, ValidatedOptions } from '@patternfly/react-core';
|
|
12
12
|
import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
13
|
+
import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon';
|
|
13
14
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
14
15
|
import { getPhoneObj, PhoneInput, ToastNotification } from '@rh-support/components';
|
|
15
16
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
@@ -38,6 +39,7 @@ export function CaseContactPhoneNumber() {
|
|
|
38
39
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
39
40
|
const canEditCase = useCanEditCase();
|
|
40
41
|
const [isCasePhoneUpdating, setCasePhoneUpdating] = useState(false);
|
|
42
|
+
const [isEditting, setIsEditting] = useState(false);
|
|
41
43
|
const [localFullPhoneState, setLocalFullPhoneState] = useState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
42
44
|
const [localCountryCodeState, setLocalCountryCodeState] = useState(phoneCountryCode);
|
|
43
45
|
const [invalid, setInvalid] = useState(false);
|
|
@@ -58,6 +60,12 @@ export function CaseContactPhoneNumber() {
|
|
|
58
60
|
return;
|
|
59
61
|
setLocalCountryCodeState(countryCode);
|
|
60
62
|
};
|
|
63
|
+
const regex = /[()\s-]/g; // to have only digits in phone
|
|
64
|
+
// To check if country code is given but phone number empty
|
|
65
|
+
const isPhoneNumberInvalid = !isEmpty(localFullPhoneState) &&
|
|
66
|
+
isEmpty(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.replace(regex, '').replace(localCountryCodeState, ''));
|
|
67
|
+
const isPhoneLineEmpty = isEmpty(trimAndReplacePlus(localCountryCodeState)) &&
|
|
68
|
+
isEmpty(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.replace(localCountryCodeState, ''));
|
|
61
69
|
const onSave = () => __awaiter(this, void 0, void 0, function* () {
|
|
62
70
|
setIsSavedClicked(true);
|
|
63
71
|
if (isPhoneValueCannotBeSaved)
|
|
@@ -73,6 +81,7 @@ export function CaseContactPhoneNumber() {
|
|
|
73
81
|
setIsSavedClicked(false);
|
|
74
82
|
setCasePhoneUpdating(false);
|
|
75
83
|
ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
|
|
84
|
+
setIsEditting(false);
|
|
76
85
|
try {
|
|
77
86
|
// update logged-in user contact info
|
|
78
87
|
if (contactSSOName === loggedInUser.data.ssoUsername && !isEmpty(phoneLine) && !isEmpty(countryCode)) {
|
|
@@ -94,39 +103,34 @@ export function CaseContactPhoneNumber() {
|
|
|
94
103
|
const onClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
95
104
|
setLocalFullPhoneState('');
|
|
96
105
|
setLocalCountryCodeState('');
|
|
97
|
-
setCasePhoneUpdating(true);
|
|
98
|
-
try {
|
|
99
|
-
yield updateCaseDetails(caseDispatch, caseNumber, {
|
|
100
|
-
phoneCountryCode: '',
|
|
101
|
-
phoneAreaCodePrefixLineNumber: '',
|
|
102
|
-
clearPhoneNumber: true,
|
|
103
|
-
suppliedPhoneNumberVerified: 'False',
|
|
104
|
-
});
|
|
105
|
-
setCasePhoneUpdating(false);
|
|
106
|
-
ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
|
|
107
|
-
}
|
|
108
|
-
catch (e) {
|
|
109
|
-
setCasePhoneUpdating(false);
|
|
110
|
-
caseUpdateError.showError(e, t(`Phone number failed to update`));
|
|
111
|
-
}
|
|
112
106
|
});
|
|
113
107
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
114
108
|
limit: PHONE_LIMIT,
|
|
115
109
|
});
|
|
116
110
|
const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
|
|
117
|
-
// To check if country code is given but phone number empty
|
|
118
|
-
const isPhoneLineEmpty = !isEmpty(localFullPhoneState) && isEmpty(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.replace(localCountryCodeState, ''));
|
|
119
|
-
const isPhoneNumberInvalid = isEmpty(localCountryCodeState) && !isEmpty(localFullPhoneState);
|
|
120
111
|
const isPhoneNumberValid = (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT
|
|
121
112
|
? ValidatedOptions.error
|
|
122
113
|
: isPhoneNeedsReview
|
|
123
114
|
? ValidatedOptions.warning
|
|
124
|
-
: isSaveClicked &&
|
|
115
|
+
: isSaveClicked &&
|
|
116
|
+
(isPhoneLineEmpty || isPhoneNumberInvalid || isEmpty(trimAndReplacePlus(localCountryCodeState)))
|
|
125
117
|
? ValidatedOptions.error
|
|
126
118
|
: invalid
|
|
127
119
|
? ValidatedOptions.error
|
|
128
120
|
: ValidatedOptions.default;
|
|
129
|
-
const isPhoneValueCannotBeSaved = isPhoneLineEmpty ||
|
|
121
|
+
const isPhoneValueCannotBeSaved = isPhoneLineEmpty ||
|
|
122
|
+
isPhoneNumberInvalid ||
|
|
123
|
+
isEmpty(trimAndReplacePlus(localCountryCodeState)) ||
|
|
124
|
+
trimAndReplacePlus(localFullPhoneState) === trimAndReplacePlus(localCountryCodeState);
|
|
125
|
+
useEffect(() => {
|
|
126
|
+
if (isEqual(localFullPhoneState.trim(), '+')) {
|
|
127
|
+
setLocalFullPhoneState('');
|
|
128
|
+
}
|
|
129
|
+
if (isEqual(localCountryCodeState.trim(), '+')) {
|
|
130
|
+
setLocalCountryCodeState('');
|
|
131
|
+
}
|
|
132
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
133
|
+
}, [localFullPhoneState]);
|
|
130
134
|
// should be removed when old phone field is removed by CCM team
|
|
131
135
|
useEffect(() => {
|
|
132
136
|
var _a, _b;
|
|
@@ -135,6 +139,7 @@ export function CaseContactPhoneNumber() {
|
|
|
135
139
|
const oldCountryCode = ((_b = getPhoneObj(phone)) === null || _b === void 0 ? void 0 : _b.countryCode) || '';
|
|
136
140
|
if (!isEmpty(oldPhoneline.trim()) && !isEmpty(trimAndReplacePlus(oldCountryCode))) {
|
|
137
141
|
setLocalFullPhoneState(oldCountryCode + ' ' + oldPhoneline);
|
|
142
|
+
setLocalCountryCodeState(oldCountryCode);
|
|
138
143
|
}
|
|
139
144
|
else {
|
|
140
145
|
setIsShowOldPhone(true);
|
|
@@ -149,15 +154,18 @@ export function CaseContactPhoneNumber() {
|
|
|
149
154
|
return (React.createElement("div", { className: "form-group pf-v5-u-pb-md", style: { minWidth: '200px' } },
|
|
150
155
|
React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
|
|
151
156
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
157
|
+
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
|
|
152
158
|
!isExportingPDF ? ContactPhoneNumberPopOver() : ''),
|
|
153
159
|
React.createElement(InputGroupText, null,
|
|
154
|
-
React.createElement(PhoneInput, { phoneValue: localFullPhoneState, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating, isLoading: isCasePhoneUpdating, "data-tracking-id": "case-details-page-supplied-phone", invalid: invalid, setInvalid: setInvalid }),
|
|
155
|
-
React.createElement(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
React.createElement(
|
|
160
|
+
React.createElement(PhoneInput, { phoneValue: localFullPhoneState, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating || !isEditting, isLoading: isCasePhoneUpdating, "data-tracking-id": "case-details-page-supplied-phone", invalid: invalid, setInvalid: setInvalid }),
|
|
161
|
+
isEditting ? (React.createElement(React.Fragment, null,
|
|
162
|
+
React.createElement("button", { className: "btn btn-app btn-link pf-v5-u-ml-sm", type: "button", "data-tracking-id": "case-details-page-supplied-phone-save", onClick: () => onSave(), "aria-label": "Save", disabled: (isSaveClicked && isPhoneValueCannotBeSaved) ||
|
|
163
|
+
(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT ||
|
|
164
|
+
localFullPhoneState === phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber, style: { display: isExportingPDF ? 'none' : '' } },
|
|
165
|
+
React.createElement(CheckIcon, null)),
|
|
166
|
+
React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' }, disabled: isEmpty(localFullPhoneState), "aria-label": "Clear" },
|
|
167
|
+
React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit" },
|
|
168
|
+
React.createElement(PencilAltIcon, null)))),
|
|
161
169
|
!invalid &&
|
|
162
170
|
(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) < PHONE_LIMIT &&
|
|
163
171
|
!(isSaveClicked && isPhoneValueCannotBeSaved) &&
|
|
@@ -166,9 +174,11 @@ export function CaseContactPhoneNumber() {
|
|
|
166
174
|
invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
167
175
|
React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
|
|
168
176
|
(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
|
|
169
|
-
isSaveClicked &&
|
|
170
|
-
React.createElement(Trans, null,
|
|
177
|
+
isSaveClicked && isPhoneLineEmpty && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
178
|
+
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
171
179
|
isSaveClicked && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
180
|
+
React.createElement(Trans, null, PHONE_LINE_CANNOT_BE_EMPTY))),
|
|
181
|
+
isSaveClicked && isEmpty(trimAndReplacePlus(localCountryCodeState)) && !isPhoneLineEmpty && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
172
182
|
React.createElement(Trans, null, PHONE_IS_NOT_VALID))),
|
|
173
183
|
isShowOldPhone && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
174
184
|
React.createElement(Trans, null,
|
|
@@ -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":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,wBAAgB,kBAAkB,sBAgLjC"}
|
|
@@ -4,6 +4,7 @@ import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
|
4
4
|
import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
5
5
|
import isEmpty from 'lodash/isEmpty';
|
|
6
6
|
import isEqual from 'lodash/isEqual';
|
|
7
|
+
import isUndefined from 'lodash/isUndefined';
|
|
7
8
|
import React, { useContext, useEffect, useState } from 'react';
|
|
8
9
|
import { Trans, useTranslation } from 'react-i18next';
|
|
9
10
|
import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../constants/caseDetailsConstants';
|
|
@@ -11,28 +12,27 @@ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
|
11
12
|
import { RouteContext } from '../../context/RouteContext';
|
|
12
13
|
import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
13
14
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
15
|
+
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
14
16
|
import { trimAndReplacePlus } from '../shared/utils';
|
|
15
17
|
import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
|
|
16
18
|
export function ContactPhoneNumber() {
|
|
17
|
-
const { suppliedPhoneNumberVerified,
|
|
19
|
+
const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', isExistingPhoneNumber, } = useCaseSelector((state) => ({
|
|
18
20
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
19
|
-
severity: state.caseDetails.severity,
|
|
20
21
|
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
21
22
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
23
|
+
isExistingPhoneNumber: state.isExistingPhoneNumber,
|
|
22
24
|
}), isEqual);
|
|
23
25
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
24
26
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
25
27
|
const [invalid, setInvalid] = useState(false);
|
|
26
28
|
const [localFullPhone, setLocalFullPhone] = useState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
29
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
27
30
|
const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
|
|
28
31
|
const getPhone = () => phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber;
|
|
29
32
|
const caseDispatch = useCaseDispatch();
|
|
30
33
|
const { t } = useTranslation();
|
|
31
34
|
const onPhoneChange = (fullPhone) => {
|
|
32
35
|
setLocalFullPhone(fullPhone);
|
|
33
|
-
if (isEmpty(fullPhone)) {
|
|
34
|
-
setInvalid(false);
|
|
35
|
-
}
|
|
36
36
|
setCaseDetails(caseDispatch, {
|
|
37
37
|
phoneAreaCodePrefixLineNumber: getPhoneObj(fullPhone).phoneLine,
|
|
38
38
|
phoneCountryCode: getPhoneObj(fullPhone).countryCode,
|
|
@@ -44,19 +44,27 @@ export function ContactPhoneNumber() {
|
|
|
44
44
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
45
45
|
limit: PHONE_LIMIT,
|
|
46
46
|
});
|
|
47
|
-
const isPhoneNumberInvalid = isEmpty(trimAndReplacePlus(phoneCountryCode)) && !isEmpty(phoneAreaCodePrefixLineNumber.trim());
|
|
48
47
|
// To check if country code is given but phone number empty
|
|
49
|
-
const
|
|
48
|
+
const isPhoneNumberInvalid = !isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
49
|
+
isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
|
|
50
|
+
const isPhoneNumberEmpty = isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
50
51
|
isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
|
|
51
|
-
const isPhoneNumberValid =
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
const isPhoneNumberValid = !isEmpty(phoneAreaCodePrefixLineNumber) &&
|
|
53
|
+
!isNextBtnClickedToShowValidationError &&
|
|
54
|
+
isExistingPhoneNumber &&
|
|
55
|
+
!isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
56
|
+
(isEqual(suppliedPhoneNumberVerified, 'False') || isUndefined(suppliedPhoneNumberVerified))
|
|
57
|
+
? ValidatedOptions.warning
|
|
58
|
+
: getPhone().length > PHONE_LIMIT
|
|
59
|
+
? ValidatedOptions.error
|
|
60
|
+
: isNextBtnClickedToShowValidationError &&
|
|
61
|
+
(isPhoneNumberEmpty || isPhoneNumberInvalid || isEmpty(trimAndReplacePlus(phoneCountryCode)))
|
|
56
62
|
? ValidatedOptions.error
|
|
57
|
-
:
|
|
58
|
-
? ValidatedOptions.
|
|
59
|
-
:
|
|
63
|
+
: isNextBtnClickedToShowValidationError && !isPhoneNumberEmpty
|
|
64
|
+
? ValidatedOptions.success
|
|
65
|
+
: invalid
|
|
66
|
+
? ValidatedOptions.error
|
|
67
|
+
: ValidatedOptions.default;
|
|
60
68
|
useEffect(() => {
|
|
61
69
|
// when canChangeAccountInfo is false OwnerSelector is hidden
|
|
62
70
|
// need to set phone on load here instead of OwnerSelector
|
|
@@ -93,18 +101,24 @@ export function ContactPhoneNumber() {
|
|
|
93
101
|
return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
|
|
94
102
|
React.createElement("label", null,
|
|
95
103
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
104
|
+
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
|
|
96
105
|
ContactPhoneNumberPopOver()),
|
|
97
106
|
React.createElement(PhoneInput, { phoneValue: localFullPhone, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid }),
|
|
98
107
|
!invalid &&
|
|
99
108
|
getPhone().length < PHONE_LIMIT &&
|
|
100
109
|
!(isPhoneNumberEmpty && isNextBtnClickedToShowValidationError) &&
|
|
101
|
-
!(isNextBtnClickedToShowValidationError &&
|
|
110
|
+
!(isNextBtnClickedToShowValidationError &&
|
|
111
|
+
(isPhoneNumberInvalid || isEmpty(trimAndReplacePlus(phoneCountryCode)))) && (React.createElement("p", { className: "form-instructions" },
|
|
102
112
|
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
103
113
|
invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
104
114
|
React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
|
|
105
115
|
getPhone().length > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
|
|
106
116
|
isPhoneNumberEmpty && isNextBtnClickedToShowValidationError && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
107
|
-
React.createElement(Trans, null,
|
|
117
|
+
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
108
118
|
isNextBtnClickedToShowValidationError && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
119
|
+
React.createElement(Trans, null, PHONE_LINE_CANNOT_BE_EMPTY))),
|
|
120
|
+
isNextBtnClickedToShowValidationError &&
|
|
121
|
+
isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
122
|
+
!isPhoneNumberEmpty && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
109
123
|
React.createElement(Trans, null, PHONE_IS_NOT_VALID)))));
|
|
110
124
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumberAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberAlert.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumberAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberAlert.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAQrD,wBAAgB,uBAAuB,sBA0EtC"}
|
|
@@ -1,29 +1,40 @@
|
|
|
1
1
|
import { Alert, AlertVariant, Button, ButtonVariant } from '@patternfly/react-core';
|
|
2
2
|
import isEmpty from 'lodash/isEmpty';
|
|
3
3
|
import isEqual from 'lodash/isEqual';
|
|
4
|
+
import isUndefined from 'lodash/isUndefined';
|
|
4
5
|
import React, { useContext, useEffect } from 'react';
|
|
5
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
6
7
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
7
8
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
8
9
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
10
|
+
import { trimAndReplacePlus } from '../shared/utils';
|
|
9
11
|
export function ContactPhoneNumberAlert() {
|
|
10
12
|
const { t } = useTranslation();
|
|
11
13
|
const caseDispatch = useCaseDispatch();
|
|
12
|
-
const { caseDetails } = useCaseSelector((state) => ({
|
|
14
|
+
const { caseDetails, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', isExistingPhoneNumber, } = useCaseSelector((state) => ({
|
|
13
15
|
caseDetails: state.caseDetails,
|
|
16
|
+
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
17
|
+
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
18
|
+
isExistingPhoneNumber: state.isExistingPhoneNumber,
|
|
14
19
|
}), isEqual);
|
|
15
20
|
const { isExportingPDF } = useContext(PDFContext);
|
|
16
21
|
const onCaseDetailsChange = (caseDetails) => {
|
|
17
22
|
setCaseDetails(caseDispatch, caseDetails);
|
|
18
23
|
};
|
|
24
|
+
const isPhoneNumberEmpty = isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
25
|
+
isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
|
|
19
26
|
useEffect(() => {
|
|
20
|
-
if (
|
|
27
|
+
if (isPhoneNumberEmpty && !caseDetails.suppliedPhoneNumberVerified) {
|
|
21
28
|
onCaseDetailsChange({ suppliedPhoneNumberVerified: undefined });
|
|
22
29
|
}
|
|
23
30
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
24
|
-
}, [
|
|
25
|
-
const
|
|
26
|
-
|
|
31
|
+
}, []);
|
|
32
|
+
const showAlert = (isEqual(caseDetails.suppliedPhoneNumberVerified, 'False') ||
|
|
33
|
+
isUndefined(caseDetails.suppliedPhoneNumberVerified)) &&
|
|
34
|
+
!isEmpty(caseDetails.phoneAreaCodePrefixLineNumber) &&
|
|
35
|
+
!isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
36
|
+
isExistingPhoneNumber;
|
|
37
|
+
if (!showAlert)
|
|
27
38
|
return React.createElement(React.Fragment, null);
|
|
28
39
|
return (React.createElement(Alert, { className: `form-group ${isExportingPDF ? 'hide-in-pdf' : ''}`, isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
|
|
29
40
|
React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm" },
|
|
@@ -31,5 +42,5 @@ export function ContactPhoneNumberAlert() {
|
|
|
31
42
|
React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'Deferred' }), "data-tracking-id": "case-contact-phone-number-dont-know" },
|
|
32
43
|
React.createElement(Trans, null, "I don't know")),
|
|
33
44
|
] },
|
|
34
|
-
React.createElement(Trans, null, "
|
|
45
|
+
React.createElement(Trans, null, "Please confirm the phone number we have on file is correct.")));
|
|
35
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Severity.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Severity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAMvE,OAAO,EAAE,gBAAgB,EAAW,MAAM,0BAA0B,CAAC;AAerE,OAAO,KAA0C,MAAM,OAAO,CAAC;AAW/D,UAAU,MAAO,SAAQ,g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|
@@ -49,7 +49,6 @@ function Severity(props) {
|
|
|
49
49
|
const updateState = (value) => {
|
|
50
50
|
const casePayload = {
|
|
51
51
|
severity: value,
|
|
52
|
-
suppliedPhoneNumberVerified: undefined, // Restore Initial State If Severity Changes
|
|
53
52
|
};
|
|
54
53
|
// .. change fts on sev change only while creating case or when we change to sev1
|
|
55
54
|
!isOnCaseDetailsPage && (casePayload.fts = showFtsOnCreateCasePage(entitlementSla, value));
|
|
@@ -147,7 +147,7 @@ export function SessionRestore(props) {
|
|
|
147
147
|
};
|
|
148
148
|
// PCM-12337 - Moved the session patch call to submit case function in CaseReducer.ts
|
|
149
149
|
const newSessionDetails = getSessionDetailsFromCase(caseDetails, selectedNotificationContacts);
|
|
150
|
-
if (isEqual(newSessionDetails, relevantSession.sessionDetails))
|
|
150
|
+
if (isEqual(newSessionDetails, relevantSession === null || relevantSession === void 0 ? void 0 : relevantSession.sessionDetails))
|
|
151
151
|
return;
|
|
152
152
|
updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, newSessionDetails, session);
|
|
153
153
|
}, [
|
|
@@ -30,18 +30,18 @@ export function getChangedValueTooltip(valueNameCb, accessor) {
|
|
|
30
30
|
export const isPhoneValid = (countryCode, phoneLine) => {
|
|
31
31
|
const regex = /^[\d ()+-]+$/;
|
|
32
32
|
const phoneIncludesCorrectChars = phoneLine ? regex.test(phoneLine.replace(countryCode, '')) : true;
|
|
33
|
-
// To validate case state if country code and phoneline both are available
|
|
34
|
-
// or none of them are available (xor)
|
|
35
|
-
const isCountryCodeFollowsByPhone = isEmpty(trimAndReplacePlus(countryCode)) === isEmpty(phoneLine === null || phoneLine === void 0 ? void 0 : phoneLine.trim()) ? true : false;
|
|
36
33
|
const phoneLength = ((countryCode === null || countryCode === void 0 ? void 0 : countryCode.length) || 0) + ((phoneLine === null || phoneLine === void 0 ? void 0 : phoneLine.length) || 0) + 1;
|
|
37
34
|
const hasSuppliedPhoneValidLength = phoneLength <= PHONE_LIMIT;
|
|
38
|
-
return
|
|
35
|
+
return (hasSuppliedPhoneValidLength &&
|
|
36
|
+
phoneIncludesCorrectChars &&
|
|
37
|
+
!isEmpty(trimAndReplacePlus(countryCode)) &&
|
|
38
|
+
!isEmpty(phoneLine === null || phoneLine === void 0 ? void 0 : phoneLine.trim()));
|
|
39
39
|
};
|
|
40
40
|
export const trimAndReplacePlus = (value) => {
|
|
41
41
|
var _a;
|
|
42
42
|
if (!value)
|
|
43
43
|
return '';
|
|
44
|
-
return (_a = value.trim()) === null || _a === void 0 ? void 0 : _a.replace('+', '');
|
|
44
|
+
return (_a = value === null || value === void 0 ? void 0 : value.trim()) === null || _a === void 0 ? void 0 : _a.replace('+', '');
|
|
45
45
|
};
|
|
46
46
|
export const getProductObj = (products, product) => {
|
|
47
47
|
const productIndex = findIndex(products, (p) => p.product === product);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AASrF,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":"AAWA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AASrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,qBA+WtD"}
|
|
@@ -168,6 +168,14 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
168
168
|
useEffect(() => {
|
|
169
169
|
// Since we are receiving both `phone` and `supportPhoneNumber` from the user contact API, it is causing confusion regarding which field should be used to pre-populate the user contact information.
|
|
170
170
|
// Hence, we are going to honor `supportPhoneAreaCodePrefixLineNumber` and `supportPhoneCountryCode` for it.
|
|
171
|
+
if ((!isEmpty(loggedInUser.data.supportPhoneCountryCode) &&
|
|
172
|
+
!isEmpty(loggedInUser.data.supportPhoneAreaCodePrefixLineNumber)) ||
|
|
173
|
+
!isEmpty(loggedInUser.data.phone)) {
|
|
174
|
+
setCaseState(caseDispatch, { isExistingPhoneNumber: true });
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
setCaseState(caseDispatch, { isExistingPhoneNumber: false });
|
|
178
|
+
}
|
|
171
179
|
setCaseDetails(caseDispatch, {
|
|
172
180
|
phone: loggedInUser.data.phone,
|
|
173
181
|
phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
|
|
@@ -210,6 +210,7 @@ export interface ICaseState {
|
|
|
210
210
|
caseNoOfCreatedCase?: string;
|
|
211
211
|
isPostingRemoteRequestCommentCompleted?: boolean;
|
|
212
212
|
isPostingRemoteRequestCommentCompletedErrorMessage?: string | undefined;
|
|
213
|
+
isExistingPhoneNumber?: boolean;
|
|
213
214
|
}
|
|
214
215
|
export interface ICreateCasePayloadType extends ICaseState {
|
|
215
216
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,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AE,CAAC,CAAC;IACxD,sBAAsB,EAAE,OAAO,CAAC;IAChC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oCAAoC,EAAE,OAAO,CAAC;IAC9C,sCAAsC,EAAE,OAAO,CAAC;IAChD,eAAe,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B,EAAE,OAAO,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sCAAsC,CAAC,EAAE,OAAO,CAAC;IACjD,kDAAkD,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxE,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACnC;AAED,MAAM,WAAW,sBAAuB,SAAQ,UAAU;CAAG;AAC7D,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC"}
|
|
@@ -204,6 +204,7 @@ export const initialCaseState = {
|
|
|
204
204
|
caseNoOfCreatedCase: '',
|
|
205
205
|
isPostingRemoteRequestCommentCompleted: false,
|
|
206
206
|
isPostingRemoteRequestCommentCompletedErrorMessage: '',
|
|
207
|
+
isExistingPhoneNumber: false,
|
|
207
208
|
};
|
|
208
209
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
209
210
|
export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
|
|
@@ -38,7 +38,7 @@ export const getRecommendationObject = (doc, index) => {
|
|
|
38
38
|
bucket,
|
|
39
39
|
};
|
|
40
40
|
if (doc.documentKind === 'Solution') {
|
|
41
|
-
rec.solutionAbstract = doc.publishedAbstract || doc.abstract;
|
|
41
|
+
rec.solutionAbstract = doc.snippet || doc.publishedAbstract || doc.abstract;
|
|
42
42
|
rec.solutionTitle = doc.publishedTitle || doc.allTitle;
|
|
43
43
|
rec.solutionKcsState = doc.kcsState;
|
|
44
44
|
rec.solutionUrl = doc.view_uri;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.111",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"lib/**/*"
|
|
26
26
|
],
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@cee-eng/hydrajs": "4.17.
|
|
28
|
+
"@cee-eng/hydrajs": "4.17.14",
|
|
29
29
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
30
30
|
"@patternfly/patternfly": "5.1.0",
|
|
31
31
|
"@patternfly/react-core": "5.1.1",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"react-virtualized": "^9.22.5"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@cee-eng/hydrajs": "4.17.
|
|
54
|
+
"@cee-eng/hydrajs": "4.17.14",
|
|
55
55
|
"@cee-eng/ui-toolkit": "1.1.8",
|
|
56
56
|
"@patternfly/patternfly": "5.1.0",
|
|
57
57
|
"@patternfly/react-core": "5.1.1",
|
|
@@ -60,11 +60,11 @@
|
|
|
60
60
|
"@progress/kendo-licensing": "1.3.5",
|
|
61
61
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
62
62
|
"@redux-devtools/extension": "^3.3.0",
|
|
63
|
-
"@rh-support/components": "2.1.
|
|
64
|
-
"@rh-support/react-context": "2.1.
|
|
63
|
+
"@rh-support/components": "2.1.57",
|
|
64
|
+
"@rh-support/react-context": "2.1.63",
|
|
65
65
|
"@rh-support/types": "2.0.3",
|
|
66
|
-
"@rh-support/user-permissions": "2.1.
|
|
67
|
-
"@rh-support/utils": "2.1.
|
|
66
|
+
"@rh-support/user-permissions": "2.1.41",
|
|
67
|
+
"@rh-support/utils": "2.1.31",
|
|
68
68
|
"@types/react-redux": "^7.1.33",
|
|
69
69
|
"@types/redux": "^3.6.0",
|
|
70
70
|
"dompurify": "^2.2.6",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"defaults and supports es6-module",
|
|
132
132
|
"maintained node versions"
|
|
133
133
|
],
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "4dba6a4e5e70b1cccf8fb3ff39ee561b41243326"
|
|
135
135
|
}
|