@rh-support/troubleshoot 2.2.129 → 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/AccountInfo/OwnerSelector.d.ts.map +1 -1
- package/lib/esm/components/AccountInfo/OwnerSelector.js +1 -77
- 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/CaseComments.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/CaseComments.js +13 -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 +188 -41
- package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.js +12 -15
- package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Severity.js +5 -23
- package/lib/esm/components/CaseManagement/CaseManagement.js +4 -4
- package/lib/esm/components/IdeaInformation/IdeaInformation.js +4 -4
- 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/Recommendations.js +1 -1
- package/lib/esm/components/Recommendations/RulesModal.d.ts.map +1 -1
- package/lib/esm/components/Recommendations/RulesModal.js +6 -13
- package/lib/esm/components/Review/Review.js +4 -4
- package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
- package/lib/esm/components/SessionRestore/SessionRestore.js +27 -22
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.d.ts.map +1 -1
- package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +4 -24
- package/lib/esm/components/shared/utils.d.ts +2 -0
- package/lib/esm/components/shared/utils.d.ts.map +1 -1
- package/lib/esm/components/shared/utils.js +12 -0
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +0 -20
- package/lib/esm/constants/caseDetailsConstants.d.ts +1 -1
- package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
- package/lib/esm/constants/caseDetailsConstants.js +1 -1
- package/lib/esm/css/app.css +2 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts +7 -0
- package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
- package/lib/esm/reducers/CaseConstNTypes.js +11 -3
- 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/CaseHelpers.d.ts +1 -0
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +7 -1
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +8 -1
- 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/lib/esm/scss/_main.scss +5 -0
- package/package.json +9 -9
|
@@ -12,45 +12,42 @@ import { trimAndReplacePlus } from '../shared/utils';
|
|
|
12
12
|
export function ContactPhoneNumberAlert() {
|
|
13
13
|
const { t } = useTranslation();
|
|
14
14
|
const caseDispatch = useCaseDispatch();
|
|
15
|
-
const {
|
|
16
|
-
caseDetails: state.caseDetails,
|
|
15
|
+
const { phoneCountryCode, phoneAreaCodePrefixLineNumber, contactSSOName, suppliedPhoneNumberVerified } = useCaseSelector((state) => ({
|
|
17
16
|
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
18
17
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
19
|
-
isExistingPhoneNumber: state.isExistingPhoneNumber,
|
|
20
18
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
19
|
+
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
21
20
|
}), isEqual);
|
|
22
21
|
const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
|
|
23
22
|
const { isExportingPDF } = useContext(PDFContext);
|
|
24
|
-
const
|
|
25
|
-
setCaseDetails(caseDispatch,
|
|
23
|
+
const onSuppliedPhoneNumberVerifiedChange = (suppliedPhoneNumberVerified) => {
|
|
24
|
+
setCaseDetails(caseDispatch, { suppliedPhoneNumberVerified });
|
|
26
25
|
if (contactSSOName === loggedInUser.data.ssoUsername) {
|
|
27
26
|
// edge case: when loggedInUser === contactSSOName while opening a case confirms or deffers the phone
|
|
28
27
|
// we need to save the verification state globallly so that we don't show the phone review banner again
|
|
29
28
|
// to the user where he changes it to another owner and then again assigns himself as the case owner
|
|
30
29
|
setCaseState(caseDispatch, {
|
|
31
|
-
hasLoggedInUserConfirmedPhoneNumber:
|
|
30
|
+
hasLoggedInUserConfirmedPhoneNumber: suppliedPhoneNumberVerified,
|
|
32
31
|
});
|
|
33
32
|
}
|
|
34
33
|
};
|
|
35
34
|
const isPhoneNumberEmpty = isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
36
35
|
isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
|
|
37
36
|
useEffect(() => {
|
|
38
|
-
if (isPhoneNumberEmpty && !
|
|
39
|
-
|
|
37
|
+
if (isPhoneNumberEmpty && !suppliedPhoneNumberVerified) {
|
|
38
|
+
onSuppliedPhoneNumberVerifiedChange(undefined);
|
|
40
39
|
}
|
|
41
40
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
41
|
}, []);
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
!isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
47
|
-
isExistingPhoneNumber;
|
|
42
|
+
const phoneAndCountryHaveValues = !isEmpty(phoneAreaCodePrefixLineNumber) && !isEmpty(trimAndReplacePlus(phoneCountryCode));
|
|
43
|
+
const phoneNotVerifiedOrVerificationIsUndefined = isEqual(suppliedPhoneNumberVerified, 'False') || isUndefined(suppliedPhoneNumberVerified);
|
|
44
|
+
const showAlert = phoneNotVerifiedOrVerificationIsUndefined && phoneAndCountryHaveValues;
|
|
48
45
|
if (!showAlert)
|
|
49
46
|
return React.createElement(React.Fragment, null);
|
|
50
47
|
return (React.createElement(Alert, { className: `form-group ${isExportingPDF ? 'hide-in-pdf' : ''} phone-review-banner`, isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
|
|
51
|
-
React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () =>
|
|
48
|
+
React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onSuppliedPhoneNumberVerifiedChange('True'), "data-tracking-id": "case-contact-phone-number-confirm", key: "case-contact-phone-number-confirm" },
|
|
52
49
|
React.createElement(Trans, null, "Confirm phone number")),
|
|
53
|
-
React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () =>
|
|
50
|
+
React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onSuppliedPhoneNumberVerifiedChange('Deferred'), "data-tracking-id": "case-contact-phone-number-dont-know", key: "case-contact-phone-number-dont-know" },
|
|
54
51
|
React.createElement(Trans, null, "I don't know")),
|
|
55
52
|
] },
|
|
56
53
|
React.createElement(Trans, null, "Please confirm the phone number we have on file is correct.")));
|
|
@@ -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,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,
|
|
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,gBAAgB;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IAChE,oBAAoB,EAAE,OAAO,CAAC;CACjC;AASD,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,EAAE,OAAO,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,GAAG,GAAG,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,EAAE,CAAC;CACxD;AAED,iBAAS,QAAQ,CAAC,KAAK,EAAE,MAAM,qBA4Q9B;kBA5QQ,QAAQ;;;AA8QjB,eAAe,QAAQ,CAAC"}
|
|
@@ -13,7 +13,7 @@ import map from 'lodash/map';
|
|
|
13
13
|
import React, { useContext, useEffect, useState } from 'react';
|
|
14
14
|
import { Trans, useTranslation } from 'react-i18next';
|
|
15
15
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
16
|
-
import {
|
|
16
|
+
import { getNewSeverityStringDef, getSeverityDescription } from '../../reducers/CaseHelpers';
|
|
17
17
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
18
18
|
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
19
19
|
import { CaseValuesToWatch } from '../shared/Constants';
|
|
@@ -41,7 +41,7 @@ function Severity(props) {
|
|
|
41
41
|
const { isExportingPDF } = useContext(PDFContext);
|
|
42
42
|
const [isSeverityInValid, setIsSeverityInValid] = useState(false);
|
|
43
43
|
const [seviritiesOptions, setSeveritiesOptions] = useState([]);
|
|
44
|
-
const [doNotShowIRT, setDoNotShowIRT] = useState(false);
|
|
44
|
+
// const [doNotShowIRT, setDoNotShowIRT] = useState<boolean>(false);
|
|
45
45
|
const [openUpdateSeverityModal, setOpenUpdateSeverityModal] = useState(false);
|
|
46
46
|
const caseDispatch = useCaseDispatch();
|
|
47
47
|
const isOnCaseDetailsPage = !isEmpty(caseNumber);
|
|
@@ -77,30 +77,12 @@ function Severity(props) {
|
|
|
77
77
|
const [localSeverityChange, setLocalSeverityChange] = useState(false);
|
|
78
78
|
const afterLocalChange = () => setLocalSeverityChange(false);
|
|
79
79
|
const valueComparator = (value, pvalue) => value && value.name && pvalue && pvalue.name && value.name !== pvalue.name;
|
|
80
|
-
const getAdditionalInfo = (sla, severity) => {
|
|
81
|
-
if (doNotShowIRT)
|
|
82
|
-
return React.createElement(React.Fragment, null);
|
|
83
|
-
const irt = getIrtForSLAAndSeverity(sla, severity);
|
|
84
|
-
const ort = getOrtForSLAAndSeverity(sla, severity);
|
|
85
|
-
return isEmpty(irt) ? undefined : irt === ort ? (React.createElement(React.Fragment, null,
|
|
86
|
-
React.createElement("strong", null, irt),
|
|
87
|
-
" ",
|
|
88
|
-
React.createElement(Trans, null, "initial and ongoing response time."))) : (React.createElement(React.Fragment, null,
|
|
89
|
-
React.createElement("strong", null, irt),
|
|
90
|
-
" ",
|
|
91
|
-
React.createElement(Trans, null, "initial and"),
|
|
92
|
-
" ",
|
|
93
|
-
React.createElement("strong", null, ort),
|
|
94
|
-
' ',
|
|
95
|
-
React.createElement(Trans, null, "ongoing response time.")));
|
|
96
|
-
};
|
|
97
|
-
const slaLocal = entitlementSla;
|
|
98
80
|
const filteredSeverities = map(allCaseSeverities.data, (s) => {
|
|
99
81
|
const sevItem = {
|
|
100
82
|
name: s,
|
|
101
83
|
disabled: isEmpty(find(seviritiesOptions, (severity) => s === severity)),
|
|
102
84
|
label: `${s} - ${getSeverityDescription(s)}`,
|
|
103
|
-
additionalInfo:
|
|
85
|
+
additionalInfo: getNewSeverityStringDef(s),
|
|
104
86
|
};
|
|
105
87
|
return sevItem;
|
|
106
88
|
});
|
|
@@ -118,7 +100,7 @@ function Severity(props) {
|
|
|
118
100
|
name: severity,
|
|
119
101
|
disabled: false,
|
|
120
102
|
label: `${severity} - ${getSeverityDescription(severity)}`,
|
|
121
|
-
additionalInfo:
|
|
103
|
+
additionalInfo: getNewSeverityStringDef(severity),
|
|
122
104
|
};
|
|
123
105
|
const toggleModal = () => {
|
|
124
106
|
setOpenUpdateSeverityModal((openUpdateSeverityModal) => !openUpdateSeverityModal);
|
|
@@ -133,7 +115,7 @@ function Severity(props) {
|
|
|
133
115
|
return;
|
|
134
116
|
const productObj = find((_b = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _b === void 0 ? void 0 : _b.productsResult, (productItem) => productItem.name === product);
|
|
135
117
|
const versionDetail = find(versionsDetails === null || versionsDetails === void 0 ? void 0 : versionsDetails.data, (spec) => spec.name === version);
|
|
136
|
-
setDoNotShowIRT(versionDetail
|
|
118
|
+
// setDoNotShowIRT(versionDetail?.doNotShowIRT!);
|
|
137
119
|
let availableSeverities;
|
|
138
120
|
if ((versionDetail === null || versionDetail === void 0 ? void 0 : versionDetail.severities) && (versionDetail === null || versionDetail === void 0 ? void 0 : versionDetail.severities.length) !== 0) {
|
|
139
121
|
//first check if at version level, do we have any severity limit
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid, GridItem } from '@patternfly/react-core';
|
|
2
2
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
3
3
|
import { isSpecialSupportOfferingEnabled } from '@rh-support/utils';
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
@@ -32,10 +32,10 @@ export default function CaseManagement(props) {
|
|
|
32
32
|
const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, selectedProduct);
|
|
33
33
|
return (React.createElement("form", null,
|
|
34
34
|
React.createElement(SupportLevel, null),
|
|
35
|
-
React.createElement(
|
|
36
|
-
React.createElement(
|
|
35
|
+
React.createElement(Grid, { hasGutter: true },
|
|
36
|
+
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v5-u-mb-xs" },
|
|
37
37
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
38
|
-
React.createElement(
|
|
38
|
+
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v5-u-mb-xs" },
|
|
39
39
|
React.createElement(ContactPhoneNumber, null))),
|
|
40
40
|
React.createElement(ContactPhoneNumberAlert, null),
|
|
41
41
|
React.createElement(Fts, { inlineEditable: false }),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid, GridItem } from '@patternfly/react-core';
|
|
2
2
|
import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
|
|
3
3
|
import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useGlobalStateContext, } from '@rh-support/react-context';
|
|
4
4
|
import { canManageCase, haventLoadedMetadata, isSpecialSupportOfferingEnabled } from '@rh-support/utils';
|
|
@@ -101,10 +101,10 @@ export default function IdeaInformation() {
|
|
|
101
101
|
React.createElement(Description, { inlineEditable: false, customTitle: t(KtQuestionConstant.ideaIssue) }),
|
|
102
102
|
React.createElement(KtQuestions, { onlyShowKT4: true }),
|
|
103
103
|
React.createElement(SupportLevel, null),
|
|
104
|
-
React.createElement(
|
|
105
|
-
React.createElement(
|
|
104
|
+
React.createElement(Grid, { hasGutter: true },
|
|
105
|
+
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v5-u-mb-xl" },
|
|
106
106
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
107
|
-
React.createElement(
|
|
107
|
+
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v5-u-mb-xl" },
|
|
108
108
|
React.createElement(ContactPhoneNumber, null))),
|
|
109
109
|
React.createElement(ContactPhoneNumberAlert, null),
|
|
110
110
|
React.createElement(CaseLanguageSelector, { isManageStep: true }),
|
|
@@ -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,
|
|
@@ -139,7 +139,7 @@ export default function Recommendations(props) {
|
|
|
139
139
|
React.createElement("div", { className: "recommendation-list pf-v5-u-pt-md", ref: resultRowRef },
|
|
140
140
|
recommendationState.visibleDocs.length !== 0 && (React.createElement(Label, { color: "purple", className: "pf-v5-u-mb-md" },
|
|
141
141
|
React.createElement(WatsonxAiIcon, { fillColor: "#6753ac", className: "pf-v5-u-mr-xs" }),
|
|
142
|
-
"Live search results powered by
|
|
142
|
+
React.createElement(Trans, null, "Live search results powered by OpenShift AI"))),
|
|
143
143
|
React.createElement("ul", { className: "list-flat" }, map(recommendationState.visibleDocs, (doc, i) => {
|
|
144
144
|
var _a, _b;
|
|
145
145
|
return (React.createElement("li", { className: "result", key: doc.id },
|
|
@@ -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
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Grid, GridItem } from '@patternfly/react-core';
|
|
2
2
|
import { useGlobalStateContext } from '@rh-support/react-context';
|
|
3
3
|
import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
|
|
4
4
|
import { isSpecialSupportOfferingEnabled } from '@rh-support/utils';
|
|
@@ -56,10 +56,10 @@ export default function Review(props) {
|
|
|
56
56
|
React.createElement(KtQuestions, { inlineEditable: true, hideSaveCancel: true }),
|
|
57
57
|
React.createElement(CaseType, { hideIdea: true }),
|
|
58
58
|
React.createElement(SupportLevel, null),
|
|
59
|
-
React.createElement(
|
|
60
|
-
React.createElement(
|
|
59
|
+
React.createElement(Grid, { hasGutter: true },
|
|
60
|
+
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v5-u-mb-xl" },
|
|
61
61
|
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
62
|
-
React.createElement(
|
|
62
|
+
React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v5-u-mb-xl" },
|
|
63
63
|
React.createElement(ContactPhoneNumber, null))),
|
|
64
64
|
React.createElement(ContactPhoneNumberAlert, null),
|
|
65
65
|
React.createElement(Fts, { inlineEditable: true, initialIsEditing: isEmpty(contactInfo24x7), hideSaveCancel: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAiBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"SessionRestore.d.ts","sourceRoot":"","sources":["../../../../src/components/SessionRestore/SessionRestore.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAkD,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,OAAO,EAGH,eAAe,EAElB,MAAM,iCAAiC,CAAC;AAiBzC,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,qBAwV3C"}
|
|
@@ -73,6 +73,8 @@ export function SessionRestore(props) {
|
|
|
73
73
|
* 5. The session doesn't have any visited resource the last time.
|
|
74
74
|
*/
|
|
75
75
|
useEffect(() => {
|
|
76
|
+
if (!isEmpty(sessionRestore.activeSessionId))
|
|
77
|
+
return;
|
|
76
78
|
const hasProductVersionOrSummary = (!isEmpty(caseDetails.product) && !isEmpty(caseDetails.version)) || !isEmpty(caseDetails.summary);
|
|
77
79
|
// Need to skip on the first mount as case details is not reset when navigating from case create page to case list and back.
|
|
78
80
|
// we will just skip if we have product, version or summary in the case details context or we don't have session id in the url.
|
|
@@ -84,29 +86,32 @@ export function SessionRestore(props) {
|
|
|
84
86
|
}
|
|
85
87
|
const currentRelevantSession = getRelevantSessionFromSessions(sessionRestoreDispatch, currentUrlSeSessionId, sessionRestore.previousSessions.data, caseDetails);
|
|
86
88
|
const relevantSession = sessionRestore.previousSessions.data[currentRelevantSession];
|
|
87
|
-
const
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
!sessionRestore.sessionCreationStatus.isError
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
else if (!isEmpty(relevantSession)) {
|
|
101
|
-
// Checking if session needs to be restored based on found relevant session
|
|
102
|
-
// Found relevent session is not same as activeSessionId and is not being restored
|
|
103
|
-
if (currentRelevantSession !== sessionRestore.activeSessionId && !isRestoring) {
|
|
104
|
-
restoreSession(relevantSession, true);
|
|
89
|
+
const setSession = () => __awaiter(this, void 0, void 0, function* () {
|
|
90
|
+
const needsNewSessionId = hasProductVersionOrSummary && isEmpty(relevantSession);
|
|
91
|
+
if (needsNewSessionId) {
|
|
92
|
+
const userAgent = getUserAgentForCaseMode(isCaseCreate);
|
|
93
|
+
let session = {
|
|
94
|
+
userAgent,
|
|
95
|
+
originatingSystem: userAgent,
|
|
96
|
+
referrerUrl: referrerUrl.substring(0, SESSION_REFERRER_URL_LIMIT),
|
|
97
|
+
isInternal: loggedInUserRights.data.isInternal(),
|
|
98
|
+
};
|
|
99
|
+
if (!sessionRestore.sessionCreationStatus.isCreating && !sessionRestore.sessionCreationStatus.isError) {
|
|
100
|
+
yield createSession(sessionRestoreDispatch, getSessionDetailsFromCase(caseDetails, selectedNotificationContacts), session);
|
|
101
|
+
}
|
|
105
102
|
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
103
|
+
else if (!isEmpty(relevantSession)) {
|
|
104
|
+
// Checking if session needs to be restored based on found relevant session
|
|
105
|
+
// Found relevent session is not same as activeSessionId and is not being restored
|
|
106
|
+
if (currentRelevantSession !== sessionRestore.activeSessionId && !isRestoring) {
|
|
107
|
+
restoreSession(relevantSession, true);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
else if (isEmpty(relevantSession) && !isEmpty(currentUrlSeSessionId)) {
|
|
111
|
+
updateActiveSessionId(sessionRestoreDispatch, undefined);
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
setSession();
|
|
110
115
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
111
116
|
}, [
|
|
112
117
|
caseDetails.product,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAoB3E,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"UpdateSeverityModal.d.ts","sourceRoot":"","sources":["../../../../src/components/UpdateSeverityModal/UpdateSeverityModal.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAoB3E,UAAU,MAAM;IACZ,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBAigBxD"}
|
|
@@ -25,7 +25,7 @@ import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageCon
|
|
|
25
25
|
import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../context/CaseDiscussionTabContext';
|
|
26
26
|
import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
|
|
27
27
|
import { updateDiscussionStateComments } from '../../reducers/CaseDiscussionTabReducer';
|
|
28
|
-
import {
|
|
28
|
+
import { getNewSeverityStringDef, getSeverityDescription } from '../../reducers/CaseHelpers';
|
|
29
29
|
import { caseOverviewReducer, initialCaseViewState, setSeverityUpdating } from '../../reducers/CaseOverviewReducer';
|
|
30
30
|
import { checkForCaseStatusToggleOnAttachOrComment, setCaseDetails, updateCaseDetails, } from '../../reducers/CaseReducer';
|
|
31
31
|
export default function UpdateSeverityModal(props) {
|
|
@@ -40,7 +40,6 @@ export default function UpdateSeverityModal(props) {
|
|
|
40
40
|
const [isUpdateClickedToShowError, setIsUpdateClickedToShowError] = useState(false);
|
|
41
41
|
const [isSeverityInValid, setIsSeverityInValid] = useState(false);
|
|
42
42
|
const [seviritiesOptions, setSeveritiesOptions] = useState([]);
|
|
43
|
-
const [doNotShowIRT, setDoNotShowIRT] = useState(false);
|
|
44
43
|
const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
45
44
|
propgateErrors: true,
|
|
46
45
|
});
|
|
@@ -71,31 +70,13 @@ export default function UpdateSeverityModal(props) {
|
|
|
71
70
|
const [localFtsContact, setLocalFtsContact] = useState(contactInfo24x7 || '');
|
|
72
71
|
const [localFts, setLocalFts] = useState(isUndefined(fts) ? true : fts);
|
|
73
72
|
const isFtsEditable = isFtsEditableOnEditPage(entitlementSla, currentSeverity);
|
|
74
|
-
const getAdditionalInfo = (sla, severity) => {
|
|
75
|
-
if (doNotShowIRT)
|
|
76
|
-
return React.createElement(React.Fragment, null);
|
|
77
|
-
const irt = getIrtForSLAAndSeverity(sla, severity);
|
|
78
|
-
const ort = getOrtForSLAAndSeverity(sla, severity);
|
|
79
|
-
return isEmpty(irt) ? undefined : irt === ort ? (React.createElement(React.Fragment, null,
|
|
80
|
-
React.createElement("strong", null, irt),
|
|
81
|
-
" ",
|
|
82
|
-
React.createElement(Trans, null, "initial and ongoing response time."))) : (React.createElement(React.Fragment, null,
|
|
83
|
-
React.createElement("strong", null, irt),
|
|
84
|
-
" ",
|
|
85
|
-
React.createElement(Trans, null, "initial and"),
|
|
86
|
-
" ",
|
|
87
|
-
React.createElement("strong", null, ort),
|
|
88
|
-
' ',
|
|
89
|
-
React.createElement(Trans, null, "ongoing response time.")));
|
|
90
|
-
};
|
|
91
|
-
const slaLocal = caseDetails.entitlementSla;
|
|
92
73
|
// To set the filtered severities from data
|
|
93
74
|
const filteredSeverities = map(allCaseSeverities.data, (s) => {
|
|
94
75
|
const sevItem = {
|
|
95
76
|
name: s,
|
|
96
77
|
disabled: isEmpty(find(seviritiesOptions, (severity) => s === severity)),
|
|
97
78
|
label: `${s} - ${getSeverityDescription(s)}`,
|
|
98
|
-
additionalInfo:
|
|
79
|
+
additionalInfo: getNewSeverityStringDef(s),
|
|
99
80
|
};
|
|
100
81
|
return sevItem;
|
|
101
82
|
});
|
|
@@ -106,7 +87,7 @@ export default function UpdateSeverityModal(props) {
|
|
|
106
87
|
name: currentSeverity,
|
|
107
88
|
disabled: false,
|
|
108
89
|
label: `${currentSeverity} - ${getSeverityDescription(currentSeverity)}`,
|
|
109
|
-
additionalInfo:
|
|
90
|
+
additionalInfo: getNewSeverityStringDef(currentSeverity),
|
|
110
91
|
};
|
|
111
92
|
// To reupdate the severity value when successfully submitted
|
|
112
93
|
const reUpdateSeverity = (severity) => {
|
|
@@ -114,7 +95,7 @@ export default function UpdateSeverityModal(props) {
|
|
|
114
95
|
name: severity,
|
|
115
96
|
disabled: false,
|
|
116
97
|
label: `${severity} - ${getSeverityDescription(severity)}`,
|
|
117
|
-
additionalInfo:
|
|
98
|
+
additionalInfo: getNewSeverityStringDef(severity),
|
|
118
99
|
};
|
|
119
100
|
};
|
|
120
101
|
// To check if severity is valid
|
|
@@ -326,7 +307,6 @@ export default function UpdateSeverityModal(props) {
|
|
|
326
307
|
return;
|
|
327
308
|
const productObj = find((_b = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _b === void 0 ? void 0 : _b.productsResult, (productItem) => productItem.name === caseDetails.product);
|
|
328
309
|
const versionDetail = find(versionsDetails === null || versionsDetails === void 0 ? void 0 : versionsDetails.data, (spec) => spec.name === caseDetails.version);
|
|
329
|
-
setDoNotShowIRT(versionDetail === null || versionDetail === void 0 ? void 0 : versionDetail.doNotShowIRT);
|
|
330
310
|
let availableSeverities;
|
|
331
311
|
if ((versionDetail === null || versionDetail === void 0 ? void 0 : versionDetail.severities) && (versionDetail === null || versionDetail === void 0 ? void 0 : versionDetail.severities.length) !== 0) {
|
|
332
312
|
//first check if at version level, do we have any severity limit
|
|
@@ -13,5 +13,7 @@ import { CaseValuesToWatch } from './Constants';
|
|
|
13
13
|
export declare function getChangedValueTooltip<T>(valueNameCb: (current: T, previous: T) => CaseValuesToWatch, accessor?: (value: T, otherValue: T) => any): (currentValue: T, previousValue: T) => React.JSX.Element;
|
|
14
14
|
export declare const isPhoneValid: (countryCode: string, phoneLine: string) => boolean;
|
|
15
15
|
export declare const trimAndReplacePlus: (value: string) => string;
|
|
16
|
+
export declare const removeAllSpaces: (value: string) => string;
|
|
17
|
+
export declare const removeAllChars: (value: string) => string;
|
|
16
18
|
export declare const getProductObj: (products: Partial<ISEProduct>[], product: string) => Partial<ISEProduct>;
|
|
17
19
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACpC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,iBAAiB,EAC3D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,GAAG,kBAErB,CAAC,iBAAiB,CAAC,uBAQ5C;AAED,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,MAAM,KAAG,OAarE,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,MAAM,WAG/C,CAAC;AAEF,eAAO,MAAM,aAAa,aAAc,QAAQ,UAAU,CAAC,EAAE,WAAW,MAAM,wBAG7E,CAAC"}
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EACpC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,iBAAiB,EAC3D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,KAAK,GAAG,kBAErB,CAAC,iBAAiB,CAAC,uBAQ5C;AAED,eAAO,MAAM,YAAY,gBAAiB,MAAM,aAAa,MAAM,KAAG,OAarE,CAAC;AAEF,eAAO,MAAM,kBAAkB,UAAW,MAAM,WAG/C,CAAC;AAEF,eAAO,MAAM,eAAe,UAAW,MAAM,WAI5C,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,MAAM,WAI3C,CAAC;AAEF,eAAO,MAAM,aAAa,aAAc,QAAQ,UAAU,CAAC,EAAE,WAAW,MAAM,wBAG7E,CAAC"}
|
|
@@ -43,6 +43,18 @@ export const trimAndReplacePlus = (value) => {
|
|
|
43
43
|
return '';
|
|
44
44
|
return (_a = value === null || value === void 0 ? void 0 : value.trim()) === null || _a === void 0 ? void 0 : _a.replace('+', '');
|
|
45
45
|
};
|
|
46
|
+
export const removeAllSpaces = (value) => {
|
|
47
|
+
if (!value)
|
|
48
|
+
return '';
|
|
49
|
+
// to remove all trailing and in between spaces
|
|
50
|
+
return value === null || value === void 0 ? void 0 : value.replace(/\s+/g, '');
|
|
51
|
+
};
|
|
52
|
+
export const removeAllChars = (value) => {
|
|
53
|
+
if (!value)
|
|
54
|
+
return '';
|
|
55
|
+
// to remove all chars, brackets and have only digits
|
|
56
|
+
return value === null || value === void 0 ? void 0 : value.replace(/[^0-9]/g, '');
|
|
57
|
+
};
|
|
46
58
|
export const getProductObj = (products, product) => {
|
|
47
59
|
const productIndex = findIndex(products, (p) => p.product === product);
|
|
48
60
|
return productIndex === -1 ? {} : products[productIndex];
|
|
@@ -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,qBAwVtD"}
|