@rh-support/troubleshoot 2.2.130 → 2.2.131
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/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +1 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.js +37 -15
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +18 -19
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/EARules/EARuleInfoAccordion.js +11 -1
- package/lib/esm/components/Recommendations/InsightsResults.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsResults.js +14 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts +2 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/InsightsRuleInfo.js +4 -2
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +6 -13
- 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/CaseDiscussionTabReducer.d.ts +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseDiscussionTabReducer.js +4 -2
- package/lib/esm/reducers/SessionRestoreReducer.d.ts +2 -0
- package/lib/esm/reducers/SessionRestoreReducer.d.ts.map +1 -1
- package/lib/esm/reducers/SessionRestoreReducer.js +12 -3
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,sBAiTrC"}
|
|
@@ -101,8 +101,7 @@ export function CaseContactPhoneNumber() {
|
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
const onClear = () => __awaiter(this, void 0, void 0, function* () {
|
|
104
|
-
|
|
105
|
-
setLocalCountryCodeState('');
|
|
104
|
+
setIsEditting(false);
|
|
106
105
|
});
|
|
107
106
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
108
107
|
limit: PHONE_LIMIT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseDiscussion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/CaseDiscussion.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAA0B,MAAM,yCAAyC,CAAC;AAa1G,OAAO,KAAoE,MAAM,OAAO,CAAC;AAsCzF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,SAAS,EAAE,SAAS,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;IAC/C,eAAe,EAAE,OAAO,CAAC;CAC5B;AAOD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAwmBnD"}
|
|
@@ -8,10 +8,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { caseAttachments } from '@cee-eng/hydrajs';
|
|
11
|
-
import {
|
|
11
|
+
import { MenuToggle, Select, SelectList, SelectOption } from '@patternfly/react-core';
|
|
12
|
+
import { AlertMessage, AlertType, ErrorBoundary, LoadingIndicator, ToastNotification } from '@rh-support/components';
|
|
12
13
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
13
14
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
14
|
-
import { getDropdownBtnPlaceholder, getUrlParsedParams, scrollIntoView
|
|
15
|
+
import { getDropdownBtnPlaceholder, getUrlParsedParams, scrollIntoView } from '@rh-support/utils';
|
|
15
16
|
import cloneDeep from 'lodash/cloneDeep';
|
|
16
17
|
import filter from 'lodash/filter';
|
|
17
18
|
import findIndex from 'lodash/findIndex';
|
|
@@ -76,6 +77,10 @@ export default function CaseDiscussion(props) {
|
|
|
76
77
|
const [replyingToPrivateComment, setReplyingToPrivateComment] = useState(null);
|
|
77
78
|
// used for tracking comment section width changes
|
|
78
79
|
const [discussionSectionWidth, setDiscussionSectionWidth] = useState(null);
|
|
80
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
81
|
+
const [selectedFilterItems, setSelectedFilterItems] = useState([]);
|
|
82
|
+
const [isSortOpen, setIsSortOpen] = useState(false);
|
|
83
|
+
const [sortSelected, setSortSelected] = useState('Select a value');
|
|
79
84
|
if (props.isDiscussionTab) {
|
|
80
85
|
cellMeasureCache = new CellMeasurerCache({
|
|
81
86
|
fixedWidth: true,
|
|
@@ -156,14 +161,6 @@ export default function CaseDiscussion(props) {
|
|
|
156
161
|
}
|
|
157
162
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
158
163
|
}, [props.caseComments, caseAttachmentHydra, props.caseChats, caseFeedbacksHydra, caseExternalTrackersUpdate]);
|
|
159
|
-
const onSortChange = (selectedSort) => {
|
|
160
|
-
setSort(dispatchDiscussion, selectedSort.value, allDiscussions);
|
|
161
|
-
};
|
|
162
|
-
const onFilterChange = (selectedFilter) => {
|
|
163
|
-
selectedFilter = selectedFilter.map((item) => item.value.value);
|
|
164
|
-
setFilter(dispatchDiscussion, selectedFilter, discussionFiltersListState);
|
|
165
|
-
shouldRenderRVComponent && setCanUpdateScrollTop(false);
|
|
166
|
-
};
|
|
167
164
|
const onAttachmentRemove = (uuid_removed) => {
|
|
168
165
|
updateAttacmentsAfterRemoval(dispatchDiscussion, uuid_removed, allDiscussions, discussionFiltersListState);
|
|
169
166
|
};
|
|
@@ -326,6 +323,30 @@ export default function CaseDiscussion(props) {
|
|
|
326
323
|
}
|
|
327
324
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
328
325
|
}, [isPostingRemoteRequestCommentCompleted]);
|
|
326
|
+
const onToggleClick = () => {
|
|
327
|
+
setIsOpen(!isOpen);
|
|
328
|
+
};
|
|
329
|
+
const onSortToggleClick = () => {
|
|
330
|
+
setIsSortOpen(!isSortOpen);
|
|
331
|
+
};
|
|
332
|
+
const onFilterSelect = (_event, prevOption) => {
|
|
333
|
+
const isFilterSelected = !prevOption.isSelected; // to get updated state of changed filter
|
|
334
|
+
const prevSelectedFilters = list.filter((option) => option.isSelected && option.value !== prevOption.value); // to get previously selected filters
|
|
335
|
+
const prevSelectedFiltersValue = prevSelectedFilters.map((option) => option.value);
|
|
336
|
+
const newSelectedFilters = isFilterSelected // has all the selected values of filter with the updated selected filter state
|
|
337
|
+
? [...prevSelectedFiltersValue, prevOption.value]
|
|
338
|
+
: prevSelectedFiltersValue;
|
|
339
|
+
setFilter(dispatchDiscussion, newSelectedFilters, discussionFiltersListState);
|
|
340
|
+
shouldRenderRVComponent && setCanUpdateScrollTop(false);
|
|
341
|
+
setSelectedFilterItems(prevSelectedFiltersValue);
|
|
342
|
+
};
|
|
343
|
+
const toggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onToggleClick, isExpanded: isOpen, isFullWidth: true }, getDropdownBtnPlaceholder(t('Select a filter'), list.filter((i) => i.isSelected).map((i) => i.filterLabel), ' ', list.length, t('All comments'))));
|
|
344
|
+
const onSortSelect = (_event, selectedSort) => {
|
|
345
|
+
setSort(dispatchDiscussion, selectedSort, allDiscussions);
|
|
346
|
+
setSortSelected(selectedSort.value);
|
|
347
|
+
setIsSortOpen(false);
|
|
348
|
+
};
|
|
349
|
+
const onSortToggle = (toggleRef) => (React.createElement(MenuToggle, { ref: toggleRef, onClick: onSortToggleClick, isExpanded: isSortOpen, isFullWidth: true }, sort.name));
|
|
329
350
|
return (React.createElement(React.Fragment, null,
|
|
330
351
|
React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading post comment section') } },
|
|
331
352
|
React.createElement(AttachmentContextProvider, null,
|
|
@@ -346,12 +367,13 @@ export default function CaseDiscussion(props) {
|
|
|
346
367
|
React.createElement("div", { className: `pfe-l-grid pfe-m-all-6-col pfe-m-gutters push-bottom ${isExportingPDF ? 'hide-in-pdf' : ''}` },
|
|
347
368
|
React.createElement("div", { className: "pfe-m-12-col" }, allDiscussions.length > 20 && (React.createElement(CommentSearch, { caseDiscussions: computeFilteredComments || [], onCommentSearch: onCaseCommentSearch, isCommentSearchCleared: isCommentSearchCleared }))),
|
|
348
369
|
React.createElement("span", { className: "push-top-narrow" },
|
|
349
|
-
React.createElement(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
}), list: toOptions(list, { labelKey: 'filterLabel', disabledKey: 'isDisabled' }) })),
|
|
370
|
+
React.createElement("label", { htmlFor: "case-list-comments-dropdown", className: "pf-v5-u-mb-sm" }, t('Filter by')),
|
|
371
|
+
React.createElement(Select, { "data-tracking-id": "discussions-filter-comments-dropdown", id: "case-list-comments-dropdown", role: "menu", isOpen: isOpen, selected: selectedFilterItems, onSelect: onFilterSelect, onOpenChange: (isOpen) => setIsOpen(isOpen), toggle: toggle, popperProps: { direction: 'down', enableFlip: false }, zIndex: 9 },
|
|
372
|
+
React.createElement(SelectList, null, list.map((option) => (React.createElement(SelectOption, { hasCheckbox: true, value: option, isSelected: option.isSelected, isDisabled: option.isDisabled }, option.filterLabel)))))),
|
|
353
373
|
React.createElement("span", { className: "push-top-narrow" },
|
|
354
|
-
React.createElement(
|
|
374
|
+
React.createElement("label", { htmlFor: "se-discussion-sort", className: "pf-v5-u-mb-sm" }, t('Sort by')),
|
|
375
|
+
React.createElement(Select, { id: "se-discussion-sort", "data-tracking-id": "discussions-sort-dropdown", isOpen: isSortOpen, selected: sortSelected, onSelect: onSortSelect, onOpenChange: (isSortOpen) => setIsSortOpen(isSortOpen), toggle: onSortToggle, shouldFocusToggleOnSelect: true, popperProps: { direction: 'down', enableFlip: false }, zIndex: 9 },
|
|
376
|
+
React.createElement(SelectList, null, discussionSortOrderConst.map((option) => (React.createElement(SelectOption, { value: option, isSelected: isEqual(sort.name, option.name) }, option.name))))))),
|
|
355
377
|
React.createElement("div", { className: "support-comment-section" }, !shouldRenderRVComponent &&
|
|
356
378
|
!isSearchResultEmpty &&
|
|
357
379
|
comuteSearchedComments.map((discussion, index) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAkB/D,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAkB/D,wBAAgB,kBAAkB,sBA2UjC"}
|
|
@@ -20,23 +20,23 @@ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHON
|
|
|
20
20
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
21
21
|
import { RouteContext } from '../../context/RouteContext';
|
|
22
22
|
import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
23
|
-
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
23
|
+
import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
|
|
24
24
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
25
25
|
import { removeAllChars, trimAndReplacePlus } from '../shared/utils';
|
|
26
26
|
import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
|
|
27
27
|
import MandatoryPhonePopOver from './MandatoryPhonePopOver';
|
|
28
28
|
export function ContactPhoneNumber() {
|
|
29
|
-
const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', hasLoggedInUserConfirmedPhoneNumber, contactSSOName, } = useCaseSelector((state) => ({
|
|
29
|
+
const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', hasLoggedInUserConfirmedPhoneNumber, contactSSOName, shouldNotSetPhoneCountryCode, } = useCaseSelector((state) => ({
|
|
30
30
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
31
31
|
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
32
32
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
33
33
|
hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
|
|
34
34
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
35
|
+
shouldNotSetPhoneCountryCode: state.shouldNotSetPhoneCountryCode,
|
|
35
36
|
}), isEqual);
|
|
36
37
|
const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
|
|
37
38
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
38
39
|
const [invalid, setInvalid] = useState(false);
|
|
39
|
-
const [shouldNotSetCountryCode, setShouldNotSetCountryCode] = useState(false);
|
|
40
40
|
const [portalPhone, setPortalPhone] = useState('');
|
|
41
41
|
const [localFullPhone, setLocalFullPhone] = useState('');
|
|
42
42
|
const [isSettingLocalPhone, setIsSettingLocalPhone] = useState(false);
|
|
@@ -50,15 +50,15 @@ export function ContactPhoneNumber() {
|
|
|
50
50
|
return '';
|
|
51
51
|
}
|
|
52
52
|
else if (!isEmpty(_localFullPhone.trim()) && !_localFullPhone.trim().startsWith('+')) {
|
|
53
|
-
return '+' + _localFullPhone.
|
|
53
|
+
return '+' + _localFullPhone.trim();
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
|
-
return _localFullPhone;
|
|
56
|
+
return _localFullPhone.trim();
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
const onPhoneChange = (fullPhone) => {
|
|
60
60
|
setLocalFullPhone(checkingPlusInLocalFullPhone(fullPhone));
|
|
61
|
-
if (!
|
|
61
|
+
if (!shouldNotSetPhoneCountryCode) {
|
|
62
62
|
setCaseDetails(caseDispatch, {
|
|
63
63
|
phoneAreaCodePrefixLineNumber: getPhoneObj(fullPhone).phoneLine,
|
|
64
64
|
phoneCountryCode: getPhoneObj(fullPhone).countryCode,
|
|
@@ -66,7 +66,7 @@ export function ContactPhoneNumber() {
|
|
|
66
66
|
}
|
|
67
67
|
else {
|
|
68
68
|
if (!isEmpty(fullPhone) && !isEqual(removeAllChars(portalPhone), removeAllChars(fullPhone))) {
|
|
69
|
-
|
|
69
|
+
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: false });
|
|
70
70
|
}
|
|
71
71
|
setCaseDetails(caseDispatch, {
|
|
72
72
|
phoneAreaCodePrefixLineNumber: checkingPlusInLocalFullPhone(fullPhone),
|
|
@@ -100,8 +100,6 @@ export function ContactPhoneNumber() {
|
|
|
100
100
|
: invalid
|
|
101
101
|
? ValidatedOptions.error
|
|
102
102
|
: ValidatedOptions.default;
|
|
103
|
-
// Regular expression pattern to match hyphens and round brackets in phone
|
|
104
|
-
const pattern = /[-()]/g;
|
|
105
103
|
// This useEffect initialize phone number inputbox
|
|
106
104
|
// - User open case for first time for herself/himself -> show portal phone number
|
|
107
105
|
// - User open case for NOT first time for herself/himself -> show phone number that we have on user contact in SF
|
|
@@ -130,7 +128,7 @@ export function ContactPhoneNumber() {
|
|
|
130
128
|
}
|
|
131
129
|
else {
|
|
132
130
|
// User is openning a case for the first time
|
|
133
|
-
const phoneLength = trimAndReplacePlus(loggedInUser.data.phone)
|
|
131
|
+
const phoneLength = trimAndReplacePlus(removeAllChars(loggedInUser.data.phone)).length;
|
|
134
132
|
// For first time user whose phone is fetched from portal without country code
|
|
135
133
|
// For phone length less or equal to 10 country code shouldn't be fetched to avoid faulty phone population
|
|
136
134
|
if (phoneLength > 10) {
|
|
@@ -140,9 +138,11 @@ export function ContactPhoneNumber() {
|
|
|
140
138
|
_phoneCountryCode = countryCode;
|
|
141
139
|
}
|
|
142
140
|
else {
|
|
141
|
+
setCaseState(caseDispatch, {
|
|
142
|
+
shouldNotSetPhoneCountryCode: true,
|
|
143
|
+
});
|
|
143
144
|
_phoneAreaCodePrefixLineNumber = loggedInUser.data.phone;
|
|
144
145
|
_phoneCountryCode = '';
|
|
145
|
-
setShouldNotSetCountryCode(true);
|
|
146
146
|
setPortalPhone(loggedInUser.data.phone);
|
|
147
147
|
}
|
|
148
148
|
_suppliedPhoneNumberVerified =
|
|
@@ -166,7 +166,7 @@ export function ContactPhoneNumber() {
|
|
|
166
166
|
_suppliedPhoneNumberVerified = 'Deferred';
|
|
167
167
|
}
|
|
168
168
|
else {
|
|
169
|
-
const phoneLength = trimAndReplacePlus(selectedContact.phone)
|
|
169
|
+
const phoneLength = trimAndReplacePlus(removeAllChars(selectedContact.phone)).length;
|
|
170
170
|
if (phoneLength > 10) {
|
|
171
171
|
_phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
|
|
172
172
|
_phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
|
|
@@ -174,7 +174,7 @@ export function ContactPhoneNumber() {
|
|
|
174
174
|
else {
|
|
175
175
|
_phoneAreaCodePrefixLineNumber = selectedContact.phone;
|
|
176
176
|
_phoneCountryCode = '';
|
|
177
|
-
|
|
177
|
+
setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
|
|
178
178
|
setPortalPhone(selectedContact.phone);
|
|
179
179
|
}
|
|
180
180
|
_suppliedPhoneNumberVerified = 'Deferred';
|
|
@@ -213,7 +213,7 @@ export function ContactPhoneNumber() {
|
|
|
213
213
|
if (isEmpty(selectedContact.supportPhoneAreaCodePrefixLineNumber) &&
|
|
214
214
|
!isEmpty(selectedContact.phone)) {
|
|
215
215
|
portalPhone = selectedContact.phone;
|
|
216
|
-
phoneLength = trimAndReplacePlus(portalPhone)
|
|
216
|
+
phoneLength = trimAndReplacePlus(removeAllChars(portalPhone)).length;
|
|
217
217
|
supportPhone = selectedContact.supportPhoneAreaCodePrefixLineNumber;
|
|
218
218
|
}
|
|
219
219
|
}
|
|
@@ -228,7 +228,7 @@ export function ContactPhoneNumber() {
|
|
|
228
228
|
if (isEmpty(loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) &&
|
|
229
229
|
!isEmpty(loggedInUser.data.phone)) {
|
|
230
230
|
portalPhone = loggedInUser.data.phone;
|
|
231
|
-
phoneLength = trimAndReplacePlus(portalPhone)
|
|
231
|
+
phoneLength = trimAndReplacePlus(removeAllChars(portalPhone)).length;
|
|
232
232
|
supportPhone = loggedInUser.data.supportPhoneAreaCodePrefixLineNumber;
|
|
233
233
|
}
|
|
234
234
|
}
|
|
@@ -239,22 +239,21 @@ export function ContactPhoneNumber() {
|
|
|
239
239
|
if ((isUndefined(supportPhone) || isEmpty(supportPhone)) &&
|
|
240
240
|
isEqual(removeAllChars(portalPhone), removeAllChars(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber)) &&
|
|
241
241
|
phoneLength <= 10) {
|
|
242
|
-
setShouldNotSetCountryCode(true);
|
|
243
242
|
setPortalPhone(portalPhone);
|
|
244
243
|
}
|
|
245
|
-
setLocalFullPhone(checkingPlusInLocalFullPhone(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber));
|
|
244
|
+
setLocalFullPhone(checkingPlusInLocalFullPhone((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim()));
|
|
246
245
|
setIsSettingLocalPhone(false);
|
|
247
246
|
}
|
|
248
247
|
});
|
|
249
248
|
getPhoneInfo();
|
|
250
249
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
251
|
-
}, [contactSSOName]);
|
|
250
|
+
}, [contactSSOName, shouldNotSetPhoneCountryCode]);
|
|
252
251
|
return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
|
|
253
252
|
React.createElement("label", null,
|
|
254
253
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
255
254
|
React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
|
|
256
255
|
ContactPhoneNumberPopOver()),
|
|
257
|
-
React.createElement(PhoneInput, { phoneValue: localFullPhone, countryCode: phoneCountryCode, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid, isLoading: isFetchingSso || isSettingLocalPhone, shouldNotSetCountryCode:
|
|
256
|
+
React.createElement(PhoneInput, { phoneValue: localFullPhone, countryCode: phoneCountryCode, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid, isLoading: isFetchingSso || isSettingLocalPhone, shouldNotSetCountryCode: shouldNotSetPhoneCountryCode }),
|
|
258
257
|
React.createElement(MandatoryPhonePopOver, null),
|
|
259
258
|
!invalid &&
|
|
260
259
|
getPhone().length < PHONE_LIMIT &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EARuleInfoAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoAccordion.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EARuleInfoAccordion.d.ts","sourceRoot":"","sources":["../../../../../src/components/Recommendations/EARules/EARuleInfoAccordion.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAI/D,UAAU,MAAM;IACZ,IAAI,EAAE,aAAa,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;CAChB;AAID,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,MAAM,qBAiDrE"}
|
|
@@ -1,13 +1,23 @@
|
|
|
1
|
+
import { pcm } from '@cee-eng/hydrajs';
|
|
1
2
|
import { AccordionContent, AccordionItem, AccordionToggle, Label } from '@patternfly/react-core';
|
|
2
|
-
import React, { useState } from 'react';
|
|
3
|
+
import React, { useContext, useState } from 'react';
|
|
3
4
|
import { Trans } from 'react-i18next';
|
|
5
|
+
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../../context/SessionRestoreContext';
|
|
6
|
+
import { createOrUpdateSessionResources, getSessResFromRules } from '../../../reducers/SessionRestoreReducer';
|
|
4
7
|
import { EARule, EARuleArticle, EARuleDescription, EARuleTitle } from './EARule';
|
|
8
|
+
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
5
9
|
export function EARuleInfoAccordion({ rule, showNewTag, rank }) {
|
|
6
10
|
var _a;
|
|
7
11
|
const [isExpanded, setIsExpanded] = useState(false);
|
|
12
|
+
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
13
|
+
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
8
14
|
return (React.createElement(EARule, { rule: rule, ruleRank: rank },
|
|
9
15
|
React.createElement(AccordionItem, null,
|
|
10
16
|
React.createElement(AccordionToggle, { isExpanded: isExpanded, id: "ea-rule-accordion-toggle", onClick: () => {
|
|
17
|
+
!isExpanded &&
|
|
18
|
+
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [
|
|
19
|
+
getSessResFromRules(rule.cta, SessionResourceVisibility.PRESENTED_TAB, rank, rule.rule_id),
|
|
20
|
+
]);
|
|
11
21
|
setIsExpanded(!isExpanded);
|
|
12
22
|
} },
|
|
13
23
|
showNewTag && ((_a = rule === null || rule === void 0 ? void 0 : rule.isNew) !== null && _a !== void 0 ? _a : false) && (React.createElement(Label, { color: "green", className: "pf-v5-u-mr-md" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,OAAO,KAAkD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InsightsResults.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsResults.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAgC,MAAM,0CAA0C,CAAC;AAG7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAO5D,OAAO,KAAkD,MAAM,OAAO,CAAC;AAmBvE,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AASD,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,OAAO,CAAC;CAClB;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBA8QrC;kBA9QQ,eAAe;;;AAiRxB,eAAe,eAAe,CAAC"}
|
|
@@ -18,7 +18,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
18
18
|
}
|
|
19
19
|
return t;
|
|
20
20
|
};
|
|
21
|
-
import { search } from '@cee-eng/hydrajs';
|
|
21
|
+
import { pcm, search } from '@cee-eng/hydrajs';
|
|
22
22
|
import { Alert } from '@patternfly/react-core';
|
|
23
23
|
import { usePrevious } from '@rh-support/components';
|
|
24
24
|
import { getSolrParams, PreviousCaseTypes } from '@rh-support/utils';
|
|
@@ -32,9 +32,11 @@ import { Trans, useTranslation } from 'react-i18next';
|
|
|
32
32
|
import { useCaseSelector } from '../../context/CaseContext';
|
|
33
33
|
import { RecommendationDispatchContext } from '../../context/RecommendationContext';
|
|
34
34
|
import { RulesDispatchContext, RulesStateContext } from '../../context/RulesContext';
|
|
35
|
+
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
35
36
|
import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
|
|
36
37
|
import { setInsighResultsKcsIds } from '../../reducers/RecommendationsReducer';
|
|
37
38
|
import { RulesReducerConstants } from '../../reducers/RulesReducer';
|
|
39
|
+
import { createOrUpdateSessionResources, getSessResFromRecs } from '../../reducers/SessionRestoreReducer';
|
|
38
40
|
import { isAnalysisComplete, isFileDeleted } from '../shared/fileUpload/reducer/AttachmentHelper';
|
|
39
41
|
import { updateAnalysisMetadata } from '../shared/fileUpload/reducer/AttachmentReducer';
|
|
40
42
|
import { AttachmentDispatchContext, AttachmentStateContext, } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
@@ -49,6 +51,9 @@ const defaultProps = {
|
|
|
49
51
|
function InsightsResults(props) {
|
|
50
52
|
const recommendationDispatch = useContext(RecommendationDispatchContext);
|
|
51
53
|
const { attachmentState: { includeAnalysisResults, caseFiles: { selectedLocalFiles }, }, } = useContext(AttachmentStateContext);
|
|
54
|
+
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
55
|
+
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
56
|
+
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
52
57
|
const { product, version, environment, summary, issue, periodicityOfIssue, timeFramesAndUrgency, caseType } = useCaseSelector((state) => ({
|
|
53
58
|
product: state.caseDetails.product,
|
|
54
59
|
version: state.caseDetails.version,
|
|
@@ -203,6 +208,14 @@ function InsightsResults(props) {
|
|
|
203
208
|
});
|
|
204
209
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
205
210
|
}, [allResults.length, includeAnalysisResults]);
|
|
211
|
+
useEffect(() => {
|
|
212
|
+
if (allResults.length === 0)
|
|
213
|
+
return;
|
|
214
|
+
if (isRuleModalVisible || props.isDisplayOnMain) {
|
|
215
|
+
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, getSessResFromRecs(allResults, SessionResourceVisibility.PRESENTED));
|
|
216
|
+
}
|
|
217
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
218
|
+
}, [allResults, activeSessionId, isRuleModalVisible]);
|
|
206
219
|
function insightsModalToggle() {
|
|
207
220
|
setEAModalVisibility(!isRuleModalVisible);
|
|
208
221
|
selectedLocalFiles.map((file, index) => {
|
|
@@ -4,6 +4,7 @@ interface IProps {
|
|
|
4
4
|
doc: ISOSReportRecommendation;
|
|
5
5
|
showNewTag: boolean;
|
|
6
6
|
duplicateKeys: string[];
|
|
7
|
+
rank: number;
|
|
7
8
|
}
|
|
8
9
|
declare global {
|
|
9
10
|
namespace JSX {
|
|
@@ -12,6 +13,6 @@ declare global {
|
|
|
12
13
|
}
|
|
13
14
|
}
|
|
14
15
|
}
|
|
15
|
-
export declare function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }: IProps): React.JSX.Element;
|
|
16
|
+
export declare function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }: IProps): React.JSX.Element;
|
|
16
17
|
export {};
|
|
17
18
|
//# sourceMappingURL=InsightsRuleInfo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"InsightsRuleInfo.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/InsightsRuleInfo.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAWvE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,GAAG,EAAE,wBAAwB,CAAC;IAC9B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CAChB;AAOD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,GAAG,CAAC;QACV,UAAU,iBAAiB;YACvB,SAAS,EAAE,GAAG,CAAC;SAClB;KACJ;CACJ;AAED,wBAAgB,gBAAgB,CAAC,EAAE,GAAG,EAAE,UAAU,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE,MAAM,qBA6KhF"}
|
|
@@ -9,10 +9,10 @@ import React, { useContext, useEffect, useRef, useState } from 'react';
|
|
|
9
9
|
import { Trans } from 'react-i18next';
|
|
10
10
|
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
11
11
|
import { useParseRuleMarkdown } from '../../hooks/useParseRuleMarkdown';
|
|
12
|
-
import { createOrUpdateSessionResources, getSessResFromRules } from '../../reducers/SessionRestoreReducer';
|
|
12
|
+
import { createOrUpdateSessionResources, getSessResFromRec, getSessResFromRules, } from '../../reducers/SessionRestoreReducer';
|
|
13
13
|
import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
14
14
|
const { SessionResourceSource, SessionResourceVisibility } = pcm.preCase.session;
|
|
15
|
-
export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
|
|
15
|
+
export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys, rank }) {
|
|
16
16
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
17
17
|
const [ruleData, setRuleData] = useState(null);
|
|
18
18
|
const insightsReport = useRef(null);
|
|
@@ -53,6 +53,8 @@ export function InsightsRuleInfo({ doc, showNewTag, duplicateKeys }) {
|
|
|
53
53
|
};
|
|
54
54
|
return (React.createElement(React.Fragment, null, ruleData && (React.createElement(AccordionItem, null,
|
|
55
55
|
React.createElement(AccordionToggle, { isExpanded: isParentExpanded, id: doc.id + doc.attachmentId, onClick: () => {
|
|
56
|
+
!isParentExpanded &&
|
|
57
|
+
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, [getSessResFromRec(doc, SessionResourceVisibility.PRESENTED_TAB, rank)]);
|
|
56
58
|
setIsParentExpanded(!isParentExpanded);
|
|
57
59
|
} },
|
|
58
60
|
React.createElement("div", null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"RulesModal.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RulesModal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAG5D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAI7D,UAAU,MAAM;IACZ,cAAc,EAAE,wBAAwB,EAAE,CAAC;IAC3C,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,GAAG,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,qBA2M/C"}
|
|
@@ -14,16 +14,14 @@ import { getResTypeFromUrl } from '@rh-support/utils';
|
|
|
14
14
|
import React, { useContext, useEffect, useState } from 'react';
|
|
15
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
16
16
|
import { useCaseDispatch } from '../../context/CaseContext';
|
|
17
|
-
import {
|
|
17
|
+
import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
18
18
|
import { setCaseState } from '../../reducers/CaseReducer';
|
|
19
|
-
import { createOrUpdateSessionResources, getSessResFromRecs } from '../../reducers/SessionRestoreReducer';
|
|
20
19
|
import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentReducerContext';
|
|
21
20
|
import { EARuleInfoAccordion } from './EARules/EARuleInfoAccordion';
|
|
22
21
|
import { InsightsRuleInfo } from './InsightsRuleInfo';
|
|
23
22
|
import { RecommendationFeedbackModal } from './RecommendationFeedbackModal';
|
|
24
23
|
export function InsightResultModal(props) {
|
|
25
24
|
const { t } = useTranslation();
|
|
26
|
-
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
27
25
|
const potentialDuplicate = {};
|
|
28
26
|
props.insightResults.map((value) => {
|
|
29
27
|
if (potentialDuplicate.hasOwnProperty(value.id)) {
|
|
@@ -38,7 +36,7 @@ export function InsightResultModal(props) {
|
|
|
38
36
|
});
|
|
39
37
|
const { attachmentState: { caseFiles: { selectedLocalFiles }, }, } = useContext(AttachmentStateContext);
|
|
40
38
|
const [canShowNewTag, setCanShowNewTag] = useState(false);
|
|
41
|
-
const { SessionResourceSource
|
|
39
|
+
const { SessionResourceSource } = pcm.preCase.session;
|
|
42
40
|
const { request: resolveSessionRequest, isFetching } = useFetch(pcm.preCase.session.resolveSession);
|
|
43
41
|
const { sessionRestore: { activeSessionId, sessionResourceTracking }, } = useContext(SessionRestoreStateContext);
|
|
44
42
|
const [isModalVisible, setIsModalVisible] = useState(false);
|
|
@@ -67,11 +65,6 @@ export function InsightResultModal(props) {
|
|
|
67
65
|
const onExpand = (event, id) => {
|
|
68
66
|
setIsExpanded(!isExpanded);
|
|
69
67
|
};
|
|
70
|
-
useEffect(() => {
|
|
71
|
-
props.isOpen &&
|
|
72
|
-
createOrUpdateSessionResources(sessionRestoreDispatch, activeSessionId, sessionResourceTracking, SessionResourceSource.INSIGHTS, getSessResFromRecs(props.insightResults, SessionResourceVisibility.PRESENTED));
|
|
73
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
|
-
}, [props.insightResults, activeSessionId, props.isOpen]);
|
|
75
68
|
useEffect(() => {
|
|
76
69
|
let total = props.EARule.length;
|
|
77
70
|
let trueValues = 0;
|
|
@@ -108,9 +101,9 @@ export function InsightResultModal(props) {
|
|
|
108
101
|
React.createElement(CardExpandableContent, null,
|
|
109
102
|
React.createElement(CardBody, { className: "file-recommendation", "data-tracking-id": "file-recommendation-tracking-id" },
|
|
110
103
|
React.createElement(Accordion, { headingLevel: "h5", asDefinitionList: false, isBordered: true },
|
|
111
|
-
props.insightResults.map((doc) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc }))),
|
|
104
|
+
props.insightResults.map((doc, index) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc, rank: index + 1 }))),
|
|
112
105
|
props.EARule.length > 0 &&
|
|
113
|
-
props.EARule.map((rule, index) => (React.createElement(EARuleInfoAccordion, { showNewTag: canShowNewTag, key: `${index}_eaRule`, rule: rule, rank: index + 1 }))))))));
|
|
106
|
+
props.EARule.map((rule, index) => (React.createElement(EARuleInfoAccordion, { showNewTag: canShowNewTag, key: `${index}_eaRule`, rule: rule, rank: index + props.insightResults.length + 1 }))))))));
|
|
114
107
|
}
|
|
115
108
|
return (React.createElement(React.Fragment, null,
|
|
116
109
|
React.createElement(RecommendationFeedbackModal, { isModalOpen: isModalVisible, handleModalToggle: onModalToggle, modalContent: t(`Great, we're glad that resolved your issue`) }),
|
|
@@ -122,7 +115,7 @@ export function InsightResultModal(props) {
|
|
|
122
115
|
React.createElement(Button, { onClick: props.onModalToggle, key: "confirm", variant: "secondary", "data-tracking-id": "cancel-critical-solutions-modal" }, t('Cancel')),
|
|
123
116
|
] },
|
|
124
117
|
React.createElement(Accordion, { className: "push-top-narrow rules-modal-items", headingLevel: "h2", asDefinitionList: false, isBordered: true },
|
|
125
|
-
props.insightResults.map((doc) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc }))),
|
|
118
|
+
props.insightResults.map((doc, index) => (React.createElement(InsightsRuleInfo, { duplicateKeys: duplicateKeys, showNewTag: canShowNewTag, key: doc.id + doc.attachmentId, doc: doc, rank: index + 1 }))),
|
|
126
119
|
props.EARule.length > 0 &&
|
|
127
|
-
props.EARule.map((rule, index) => (React.createElement(EARuleInfoAccordion, { showNewTag: canShowNewTag, key: `${index}_eaRule`, rule: rule, rank: index + 1 })))))));
|
|
120
|
+
props.EARule.map((rule, index) => (React.createElement(EARuleInfoAccordion, { showNewTag: canShowNewTag, key: `${index}_eaRule`, rule: rule, rank: index + props.insightResults.length + 1 })))))));
|
|
128
121
|
}
|
|
@@ -218,6 +218,7 @@ export interface ICaseState {
|
|
|
218
218
|
isPostingRemoteRequestCommentCompletedErrorMessage?: string | undefined;
|
|
219
219
|
isExistingPhoneNumber?: boolean;
|
|
220
220
|
hasLoggedInUserConfirmedPhoneNumber?: 'True' | 'False' | 'Deferred' | undefined;
|
|
221
|
+
shouldNotSetPhoneCountryCode?: boolean;
|
|
221
222
|
}
|
|
222
223
|
export interface ICreateCasePayloadType extends ICaseState {
|
|
223
224
|
}
|
|
@@ -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,EAAE,MAAM,yCAAyC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,MAAM,mCAAmC,MAAM,CAAC;AACvD,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,wBAAwB,QAAQ,CAAC;AAC9C,eAAO,MAAM,iCAAiC,QAAQ,CAAC;AACv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AAE,MAAM,CAAC;IAC7B,sCAAsC,CAAC,EAAE,OAAO,CAAC;IACjD,kDAAkD,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxE,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,mCAAmC,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,SAAS,CAAC;IAChF,4BAA4B,CAAC,EAAE,OAAO,CAAC;CAC1C;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"}
|
|
@@ -213,6 +213,7 @@ export const initialCaseState = {
|
|
|
213
213
|
isPostingRemoteRequestCommentCompletedErrorMessage: '',
|
|
214
214
|
isExistingPhoneNumber: false,
|
|
215
215
|
hasLoggedInUserConfirmedPhoneNumber: 'False',
|
|
216
|
+
shouldNotSetPhoneCountryCode: false,
|
|
216
217
|
};
|
|
217
218
|
export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
|
|
218
219
|
export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
|
|
@@ -43,7 +43,7 @@ export declare enum DiscussionsConstants {
|
|
|
43
43
|
}
|
|
44
44
|
export declare const discussionReducer: (state: IDiscussionState, action: IActionType) => IDiscussionState;
|
|
45
45
|
export declare const setSort: (dispatch: DiscussionsReducerDispatchType, sort: ISort, allDiscussions: IDiscussion[]) => void;
|
|
46
|
-
export declare const setFilter: (dispatch: DiscussionsReducerDispatchType, selected: string, discussionFiltersListState: IFilter[]) => void;
|
|
46
|
+
export declare const setFilter: (dispatch: DiscussionsReducerDispatchType, selected: string[], discussionFiltersListState: IFilter[]) => void;
|
|
47
47
|
export declare const setDiscussions: (dispatch: DiscussionsReducerDispatchType, comments: ICaseComment[], chats: ICaseChat[], attachments: IAttachment[], feedbacks: ICommentFeedback[], trackerUpdates: Partial<IExternalTrackerUpdate[]>, discussionFiltersListState: IFilter[], canSeeExternalTracker: boolean, canSeeChat: boolean, canSeeAttachments: boolean) => void;
|
|
48
48
|
export declare const updateAttacmentsAfterRemoval: (dispatch: DiscussionsReducerDispatchType, uuid_removed: string, allDiscussions: IDiscussion[], discussionFiltersListState: IFilter[]) => void;
|
|
49
49
|
export declare const updateCommentStateFeedback: (dispatch: DiscussionsReducerDispatchType, comment_id: string, newFeedback: any, allDiscussions: IDiscussion[]) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseDiscussionTabReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseDiscussionTabReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseDiscussionTabReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseDiscussionTabReducer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAMnD,KAAK,WAAW,GAAG,OAAO,CAAC,oBAAoB,EAAE,gBAAgB,CAA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W,EAAE,SAM3G,CAAC;AAEF,eAAO,MAAM,SAAS,aACR,8BAA8B,YAC9B,MAAM,EAAE,8BACU,OAAO,EAAE,SAmBxC,CAAC;AAOF,eAAO,MAAM,cAAc,aACb,8BAA8B,YAC9B,YAAY,EAAE,SACjB,SAAS,EAAE,eACL,WAAW,EAAE,aACf,gBAAgB,EAAE,kBACb,QAAQ,sBAAsB,EAAE,CAAC,8BACrB,OAAO,EAAE,yBACd,OAAO,cAClB,OAAO,qBACA,OAAO,SA0E7B,CAAC;AAEF,eAAO,MAAM,4BAA4B,aAC3B,8BAA8B,gBAC1B,MAAM,kBACJ,WAAW,EAAE,8BACD,OAAO,EAAE,SAsBxC,CAAC;AAEF,eAAO,MAAM,0BAA0B,aACzB,8BAA8B,cAC5B,MAAM,oCAEF,WAAW,EAAE,kBAUhC,CAAC;AAEF,eAAO,MAAM,gBAAgB,aACf,8BAA8B,QAClC,MAAM,sCAEI,WAAW,EAAE,SAUhC,CAAC;AAEF,eAAO,MAAM,6BAA6B,aAC5B,8BAA8B,cAC5B,MAAM,kBACF,WAAW,EAAE,QACvB,KAAK,aACA,gBAAgB,EAAE,8BACD,OAAO,EAAE,kBAkCxC,CAAC;AAEF,eAAO,MAAM,gCAAgC,aAC/B,8BAA8B,cAC5B,MAAM,kBACF,WAAW,EAAE,QACvB,KAAK,mBACM,OAAO,8BACI,OAAO,EAAE,kBA2BxC,CAAC;AAEF,eAAO,MAAM,cAAc,aACb,8BAA8B,oBACtB,MAAM,uBACH,MAAM,SAG9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAAc,8BAA8B,SAKzE,CAAC"}
|
|
@@ -10,6 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { kase, publicApi } from '@cee-eng/hydrajs';
|
|
11
11
|
import filter from 'lodash/filter';
|
|
12
12
|
import findIndex from 'lodash/findIndex';
|
|
13
|
+
import isEqual from 'lodash/isEqual';
|
|
13
14
|
import orderBy from 'lodash/orderBy';
|
|
14
15
|
export var DiscussionType;
|
|
15
16
|
(function (DiscussionType) {
|
|
@@ -95,8 +96,9 @@ export const setSort = (dispatch, sort, allDiscussions) => {
|
|
|
95
96
|
});
|
|
96
97
|
};
|
|
97
98
|
export const setFilter = (dispatch, selected, discussionFiltersListState) => {
|
|
98
|
-
const
|
|
99
|
-
if (selected.length >
|
|
99
|
+
const prevSelectedListLength = discussionFiltersListState.filter((filter) => filter.isSelected).length;
|
|
100
|
+
if (selected.length > prevSelectedListLength &&
|
|
101
|
+
(isEqual(selected.length, 4) || selected[selected.length - 1] === DiscussionType.ALL)) {
|
|
100
102
|
// selected item is ALL
|
|
101
103
|
discussionFiltersListState.forEach((filter) => (filter.isSelected = true));
|
|
102
104
|
dispatch({ type: DiscussionsConstants.updateDiscussionState, payload: { discussionFiltersListState } });
|
|
@@ -15,6 +15,7 @@ export interface IResourceTracking {
|
|
|
15
15
|
isUpdating: boolean;
|
|
16
16
|
visitedResources: ISessionResource[];
|
|
17
17
|
presentedResources: ISessionResource[];
|
|
18
|
+
presentedTabResources: ISessionResource[];
|
|
18
19
|
}
|
|
19
20
|
export interface ISessionResourcesTracking {
|
|
20
21
|
[source: string]: IResourceTracking;
|
|
@@ -37,6 +38,7 @@ export interface ISessionRestorePayloadType extends ISessionRestoreState {
|
|
|
37
38
|
payload: string;
|
|
38
39
|
visitedResources: ISessionResource[];
|
|
39
40
|
presentedResources: ISessionResource[];
|
|
41
|
+
presentedTabResources: ISessionResource[];
|
|
40
42
|
}
|
|
41
43
|
type IActionType = IAction<SessionRestoreConstants, ISessionRestorePayloadType>;
|
|
42
44
|
export type SessionReducerDispatchType = (value: IActionType) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestoreReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/SessionRestoreReducer.ts"],"names":[],"mappings":"AACA,OAAO,EACH,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,gBAAgB,EACh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AAM,YAAY,eACT,mBAAmB,mBACd,mBAAmB,EAAE,YAC7B,mBAAmB,EAAE,uBAWjC,CAAC"}
|
|
@@ -45,7 +45,7 @@ export const initialSessionRestoreState = {
|
|
|
45
45
|
};
|
|
46
46
|
// Reducers
|
|
47
47
|
export const sessionRestoreReducer = (state, action) => {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f;
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
49
49
|
switch (action.type) {
|
|
50
50
|
case SessionRestoreConstants.getSessions: {
|
|
51
51
|
return Object.assign(Object.assign({}, state), { previousSessions: action.payload.previousSessions, hasFetchedPreviousSessions: action.payload.hasFetchedPreviousSessions });
|
|
@@ -103,6 +103,7 @@ export const sessionRestoreReducer = (state, action) => {
|
|
|
103
103
|
resTemp.payload = action.payload.hasOwnProperty('payload') ? action.payload.payload : resTemp.payload;
|
|
104
104
|
resTemp.visitedResources = uniqBy([...((_a = resTemp.visitedResources) !== null && _a !== void 0 ? _a : []), ...((_c = (_b = action.payload) === null || _b === void 0 ? void 0 : _b.visitedResources) !== null && _c !== void 0 ? _c : [])], 'resourceEntityId');
|
|
105
105
|
resTemp.presentedResources = uniqBy([...((_d = resTemp.presentedResources) !== null && _d !== void 0 ? _d : []), ...((_f = (_e = action.payload) === null || _e === void 0 ? void 0 : _e.presentedResources) !== null && _f !== void 0 ? _f : [])], 'resourceEntityId');
|
|
106
|
+
resTemp.presentedTabResources = uniqBy([...((_g = resTemp.presentedTabResources) !== null && _g !== void 0 ? _g : []), ...((_j = (_h = action.payload) === null || _h === void 0 ? void 0 : _h.presentedTabResources) !== null && _j !== void 0 ? _j : [])], 'resourceEntityId');
|
|
106
107
|
return Object.assign(Object.assign({}, state), { sessionResourceTracking: Object.assign(Object.assign({}, state.sessionResourceTracking), { [action.payload.resourceSource]: resTemp }) });
|
|
107
108
|
}
|
|
108
109
|
case SessionRestoreConstants.updatePreviousSessions: {
|
|
@@ -319,6 +320,7 @@ export function createSessionResourcesLocal(dispatch, activeSessionId, currentSe
|
|
|
319
320
|
payload,
|
|
320
321
|
visitedResources: filter(resources, (res) => res.visibilityStatus === SessionResourceVisibility.VISITED),
|
|
321
322
|
presentedResources: filter(resources, (res) => res.visibilityStatus === SessionResourceVisibility.PRESENTED),
|
|
323
|
+
presentedTabResources: filter(resources, (res) => res.visibilityStatus === SessionResourceVisibility.PRESENTED_TAB),
|
|
322
324
|
},
|
|
323
325
|
});
|
|
324
326
|
const response = yield createSessionResources(activeSessionId, { source, payload }, resources);
|
|
@@ -335,7 +337,7 @@ export function createSessionResourcesLocal(dispatch, activeSessionId, currentSe
|
|
|
335
337
|
}
|
|
336
338
|
// Update Session Resource Helper
|
|
337
339
|
export function updateSessionResourcesLocal(dispatch, activeSessionId, currentSessionResourceTracking, source, resources) {
|
|
338
|
-
var _a, _b;
|
|
340
|
+
var _a, _b, _c;
|
|
339
341
|
return __awaiter(this, void 0, void 0, function* () {
|
|
340
342
|
if (isEmpty(activeSessionId) || isEmpty(source) || isEmpty(resources))
|
|
341
343
|
return;
|
|
@@ -344,22 +346,29 @@ export function updateSessionResourcesLocal(dispatch, activeSessionId, currentSe
|
|
|
344
346
|
return;
|
|
345
347
|
const newlyVisitedResources = filter(resources, (res) => res.visibilityStatus === SessionResourceVisibility.VISITED);
|
|
346
348
|
const newlyPresentedResources = filter(resources, (res) => res.visibilityStatus === SessionResourceVisibility.PRESENTED);
|
|
349
|
+
const newlyPresentedTabResources = filter(resources, (res) => res.visibilityStatus === SessionResourceVisibility.PRESENTED_TAB);
|
|
347
350
|
const previouslyVisitedResources = (_a = resourceTracking === null || resourceTracking === void 0 ? void 0 : resourceTracking.visitedResources) !== null && _a !== void 0 ? _a : [];
|
|
348
351
|
const previouslyPresentedResources = (_b = resourceTracking === null || resourceTracking === void 0 ? void 0 : resourceTracking.presentedResources) !== null && _b !== void 0 ? _b : [];
|
|
352
|
+
const previouslyPresentedTabResources = (_c = resourceTracking === null || resourceTracking === void 0 ? void 0 : resourceTracking.presentedTabResources) !== null && _c !== void 0 ? _c : [];
|
|
349
353
|
const nonPreviouslyVisitedResources = differenceBy(newlyVisitedResources, previouslyVisitedResources, 'resourceEntityId');
|
|
350
354
|
const nonPreviouslyPresentedResources = differenceBy(newlyPresentedResources, previouslyPresentedResources, 'resourceEntityId');
|
|
351
|
-
|
|
355
|
+
const nonPreviouslyPresentedTabResources = differenceBy(newlyPresentedTabResources, previouslyPresentedTabResources, 'resourceEntityId');
|
|
356
|
+
if (!nonPreviouslyVisitedResources.length &&
|
|
357
|
+
!nonPreviouslyPresentedResources.length &&
|
|
358
|
+
!nonPreviouslyPresentedTabResources.length)
|
|
352
359
|
return;
|
|
353
360
|
try {
|
|
354
361
|
yield updateSessionResources(activeSessionId, { id: resourceTracking.resourceOriginId }, [
|
|
355
362
|
...nonPreviouslyVisitedResources,
|
|
356
363
|
...nonPreviouslyPresentedResources,
|
|
364
|
+
...nonPreviouslyPresentedTabResources,
|
|
357
365
|
]);
|
|
358
366
|
const payloadToDispatch = {
|
|
359
367
|
resourceSource: source,
|
|
360
368
|
sessionResourceTracking: {},
|
|
361
369
|
visitedResources: previouslyVisitedResources.concat(nonPreviouslyVisitedResources),
|
|
362
370
|
presentedResources: previouslyPresentedResources.concat(nonPreviouslyPresentedResources),
|
|
371
|
+
presentedTabResources: previouslyPresentedTabResources.concat(nonPreviouslyPresentedTabResources),
|
|
363
372
|
};
|
|
364
373
|
dispatch({ type: SessionRestoreConstants.updateSessionResourceTracking, payload: payloadToDispatch });
|
|
365
374
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.131",
|
|
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.21",
|
|
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.21",
|
|
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.63",
|
|
64
|
+
"@rh-support/react-context": "2.1.71",
|
|
65
65
|
"@rh-support/types": "2.0.4",
|
|
66
|
-
"@rh-support/user-permissions": "2.1.
|
|
67
|
-
"@rh-support/utils": "2.1.
|
|
66
|
+
"@rh-support/user-permissions": "2.1.46",
|
|
67
|
+
"@rh-support/utils": "2.1.35",
|
|
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": "85dc8cf2f736478dc995cb52e1a5be8e608e2fb8"
|
|
135
135
|
}
|