@rh-support/troubleshoot 2.2.0 → 2.2.2
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.js +3 -3
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +17 -10
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +2 -2
- package/lib/esm/components/CaseInformation/Fts.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/Fts.js +2 -2
- package/lib/esm/components/CaseManagement/CaseManagement.js +3 -3
- package/lib/esm/components/CaseManagement/SendNotifications/CaseContactSelector.js +1 -1
- package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
- package/lib/esm/components/shared/useIsSectionValid.js +4 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +2 -0
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +3 -2
- package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
- package/lib/esm/hooks/useResetCaseCreate.js +3 -1
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +19 -2
- package/lib/esm/reducers/CaseReducer.d.ts +2 -1
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +7 -1
- package/package.json +5 -5
|
@@ -23,7 +23,7 @@ import { updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
|
23
23
|
import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
|
|
24
24
|
import { PDFContext } from '../../PDFContainer';
|
|
25
25
|
export function CaseContactPhoneNumber() {
|
|
26
|
-
const { phoneCountryCode, phoneAreaCodePrefixLineNumber, caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating, } = useCaseSelector((state) => ({
|
|
26
|
+
const { phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', caseNumber, contactSSOName, suppliedPhoneNumberVerified, isCaseOwnerUpdating, } = useCaseSelector((state) => ({
|
|
27
27
|
phoneCountryCode: state.caseDetails.phoneCountryCode || '',
|
|
28
28
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber || '',
|
|
29
29
|
caseNumber: state.caseDetails.caseNumber,
|
|
@@ -104,11 +104,11 @@ export function CaseContactPhoneNumber() {
|
|
|
104
104
|
caseUpdateError.showError(e, t(`Phone number failed to update`));
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
|
-
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}}
|
|
107
|
+
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
108
108
|
limit: PHONE_LIMIT,
|
|
109
109
|
});
|
|
110
110
|
const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
|
|
111
|
-
return (React.createElement("div", { className: "form-group pf-u-pb-
|
|
111
|
+
return (React.createElement("div", { className: "form-group pf-u-pb-sm", style: { minWidth: '200px' } },
|
|
112
112
|
React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
|
|
113
113
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
114
114
|
!isExportingPDF ? ContactPhoneNumberPopOver() : ''),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAYA,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAYA,wBAAgB,kBAAkB,gBAsEjC"}
|
|
@@ -10,13 +10,13 @@ import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
|
10
10
|
import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
|
|
11
11
|
export function ContactPhoneNumber() {
|
|
12
12
|
var _a, _b;
|
|
13
|
-
const { suppliedPhoneNumberVerified, severity, phoneCountryCode, phoneAreaCodePrefixLineNumber } = useCaseSelector((state) => ({
|
|
13
|
+
const { suppliedPhoneNumberVerified, severity, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', } = useCaseSelector((state) => ({
|
|
14
14
|
suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
|
|
15
15
|
severity: state.caseDetails.severity,
|
|
16
16
|
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
17
17
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
18
18
|
}), isEqual);
|
|
19
|
-
const getPhone = () => phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber;
|
|
19
|
+
const getPhone = () => phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, '');
|
|
20
20
|
const caseDispatch = useCaseDispatch();
|
|
21
21
|
const { t } = useTranslation();
|
|
22
22
|
const onPhoneChange = (fullPhone) => {
|
|
@@ -27,19 +27,26 @@ export function ContactPhoneNumber() {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
const onCountryCodeChange = (phoneCountryCode) => {
|
|
30
|
-
setCaseDetails(caseDispatch, { phoneCountryCode });
|
|
30
|
+
setCaseDetails(caseDispatch, { phoneCountryCode: phoneCountryCode });
|
|
31
31
|
};
|
|
32
|
-
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}}
|
|
32
|
+
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
33
33
|
limit: PHONE_LIMIT,
|
|
34
34
|
});
|
|
35
|
+
const phoneNumberEmptyError = t('Phone number cannot be empty when country code is given.');
|
|
36
|
+
// To check if country code is given but phone number empty
|
|
37
|
+
const isPhoneNumberEmpty = !isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
|
|
38
|
+
const isPhoneNumberValid = ((_a = getPhone) === null || _a === void 0 ? void 0 : _a.length) > PHONE_LIMIT
|
|
39
|
+
? ValidatedOptions.error
|
|
40
|
+
: severity === "1 (Urgent)" /* SEV_1 */ && isEmpty(suppliedPhoneNumberVerified)
|
|
41
|
+
? ValidatedOptions.warning
|
|
42
|
+
: isPhoneNumberEmpty
|
|
43
|
+
? ValidatedOptions.error
|
|
44
|
+
: ValidatedOptions.default;
|
|
35
45
|
return (React.createElement("div", { className: "form-group pf-u-pb-xl", style: { minWidth: '200px' } },
|
|
36
46
|
React.createElement("label", null,
|
|
37
47
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
38
48
|
ContactPhoneNumberPopOver()),
|
|
39
|
-
React.createElement(PhoneInput, { phoneValue: getPhone(), onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
? ValidatedOptions.warning
|
|
43
|
-
: ValidatedOptions.default }),
|
|
44
|
-
((_b = getPhone()) === null || _b === void 0 ? void 0 : _b.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage))));
|
|
49
|
+
React.createElement(PhoneInput, { phoneValue: getPhone(), onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid }),
|
|
50
|
+
((_b = getPhone()) === null || _b === void 0 ? void 0 : _b.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
|
|
51
|
+
isPhoneNumberEmpty && React.createElement("p", { className: "form-instructions form-invalid" }, phoneNumberEmptyError)));
|
|
45
52
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare
|
|
1
|
+
export declare const ContactPhoneNumberPopOver: () => JSX.Element;
|
|
2
2
|
//# sourceMappingURL=ContactPhoneNumberPopOver.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAKA,
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB,mBAerC,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { Popover, PopoverPosition } from '@patternfly/react-core';
|
|
|
2
2
|
import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { Trans } from 'react-i18next';
|
|
5
|
-
export
|
|
5
|
+
export const ContactPhoneNumberPopOver = () => {
|
|
6
6
|
return (React.createElement(Popover, { "aria-label": "Support Severity Level info", position: PopoverPosition.right, bodyContent: React.createElement("p", null,
|
|
7
7
|
React.createElement(Trans, null, "These changes to your phone number affect only this case.")), closeBtnAriaLabel: "Close" },
|
|
8
8
|
React.createElement(QuestionCircleIcon, { className: "pf-u-ml-xs icon-size", "aria-label": "Contact Phone Number Info" })));
|
|
9
|
-
}
|
|
9
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAoBA,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Fts.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/Fts.tsx"],"names":[],"mappings":"AAoBA,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAQD,iBAAS,GAAG,CAAC,KAAK,EAAE,MAAM,eAsLzB;kBAtLQ,GAAG;;;AAyLZ,eAAe,GAAG,CAAC"}
|
|
@@ -134,13 +134,13 @@ function Fts(props) {
|
|
|
134
134
|
// To disable save button if field is empty or is updating
|
|
135
135
|
const isSaveDisabled = contactInfo24X7State === contactInfo24x7 || isFtsContactUpdating;
|
|
136
136
|
return (React.createElement(React.Fragment, null,
|
|
137
|
-
React.createElement("div", { className: "form-group
|
|
137
|
+
React.createElement("div", { className: "form-group pf-u-mb-md" },
|
|
138
138
|
React.createElement("input", { type: "checkbox", id: "get-support-fts", "data-tracking-id": "get-support-fts", disabled: disableFtsNContact, name: "get-support-fts", checked: fts, onChange: onFtsChange }),
|
|
139
139
|
React.createElement("label", { htmlFor: "get-support-fts" },
|
|
140
140
|
React.createElement(Trans, null, "24x7 Support")),
|
|
141
141
|
React.createElement(LoadingIndicator, { size: "sm", isInline: true, show: isFtsUpdating, className: "pf-u-ml-sm" })),
|
|
142
142
|
fts === true && (React.createElement(React.Fragment, null,
|
|
143
|
-
React.createElement(InlineEdit, { labelProps: { htmlFor: 'get-support-24-7-contact' }, labelContent: React.createElement(Trans, null, "24x7 Contact"), allowInlineEdit: props.inlineEditable && !disableFtsNContact, hideSaveCancel: props.hideSaveCancel, initialIsEditing: props.initialIsEditing, content: contactInfo24x7, onSave: onSave, onCancel: onCancel, saveDisabled: isSaveDisabled, loadingIndicator: isFtsContactUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
143
|
+
React.createElement(InlineEdit, { formClassName: "pf-u-mb-md", labelProps: { htmlFor: 'get-support-24-7-contact' }, labelContent: React.createElement(Trans, null, "24x7 Contact"), allowInlineEdit: props.inlineEditable && !disableFtsNContact, hideSaveCancel: props.hideSaveCancel, initialIsEditing: props.initialIsEditing, content: contactInfo24x7, onSave: onSave, onCancel: onCancel, saveDisabled: isSaveDisabled, loadingIndicator: isFtsContactUpdating ? React.createElement(LoadingIndicator, { isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
144
144
|
React.createElement(TextAreaAutosize, { id: "get-support-24-7-contact", className: `form-control`, name: "get-support-24-7-contact", value: contactInfo24X7State, onChange: onFtsContactChange, disabled: disableFtsNContact, "data-tracking-id": "get-support-24-7-contact" }),
|
|
145
145
|
React.createElement("p", { className: "form-instructions" },
|
|
146
146
|
React.createElement(Trans, null, "Please provide contact information where you can be reached at any time to help you with your case."))),
|
|
@@ -19,12 +19,12 @@ export default function CaseManagement(props) {
|
|
|
19
19
|
setCaseDetails(caseDispatch, payload);
|
|
20
20
|
};
|
|
21
21
|
return (React.createElement("form", null,
|
|
22
|
+
React.createElement(SupportLevel, null),
|
|
22
23
|
React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' }, className: "severity-flex-case-management" },
|
|
23
24
|
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
24
|
-
React.createElement(
|
|
25
|
+
React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
|
|
25
26
|
React.createElement(FlexItem, { flex: { default: 'flex_1' } },
|
|
26
|
-
React.createElement(
|
|
27
|
-
React.createElement(ContactPhoneNumber, null),
|
|
27
|
+
React.createElement(ContactPhoneNumber, null))),
|
|
28
28
|
React.createElement(ContactPhoneNumberAlert, null),
|
|
29
29
|
React.createElement(Fts, { inlineEditable: false }),
|
|
30
30
|
React.createElement(CaseLanguageSelector, { isManageStep: true }),
|
|
@@ -248,7 +248,7 @@ function CaseContactSelector(props) {
|
|
|
248
248
|
};
|
|
249
249
|
if (!canSeeEmailNotifications)
|
|
250
250
|
return React.createElement(React.Fragment, null);
|
|
251
|
-
return (React.createElement("div", { className: "form-group" },
|
|
251
|
+
return (React.createElement("div", { className: "form-group pf-u-mb-md" },
|
|
252
252
|
React.createElement("label", { htmlFor: "get-support-notifications" },
|
|
253
253
|
React.createElement(Trans, null, "Send notifications")),
|
|
254
254
|
loggedInUserRights.data.isOrgAdmin() ? (React.createElement(React.Fragment, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAInE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;
|
|
1
|
+
{"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAyBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAInE,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,gBAAgB;;;;;EAsM9D"}
|
|
@@ -90,7 +90,10 @@ export function useIsSectionValid(sectionName) {
|
|
|
90
90
|
var _a;
|
|
91
91
|
return (isEntitledProduct &&
|
|
92
92
|
isCaseStateValid(caseState, loggedInUserJwtToken) &&
|
|
93
|
-
isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult)
|
|
93
|
+
isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
|
|
94
|
+
(!isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''))
|
|
95
|
+
? false
|
|
96
|
+
: true));
|
|
94
97
|
};
|
|
95
98
|
const isDescribeIdeaSectionValid = () => {
|
|
96
99
|
return (isCaseManagementStateValid(caseState, loggedInUserJwtToken) &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAWA,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,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,eAmWtD"}
|
|
@@ -174,6 +174,8 @@ export function GlobalTroubleshootEffects(props) {
|
|
|
174
174
|
* Setting supplied phone number
|
|
175
175
|
*/
|
|
176
176
|
useEffect(() => {
|
|
177
|
+
// Since we are receiving both `phone` and `supportPhoneNumber` from the user contact API, it is causing confusion regarding which field should be used to pre-populate the user contact information.
|
|
178
|
+
// Hence, we are going to honor `supportPhoneAreaCodePrefixLineNumber` and `supportPhoneCountryCode` for it.
|
|
177
179
|
setCaseDetails(caseDispatch, {
|
|
178
180
|
phone: loggedInUser.data.phone,
|
|
179
181
|
phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAavG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,eA8IzC"}
|
|
@@ -18,7 +18,7 @@ import React, { useContext, useRef, useState } from 'react';
|
|
|
18
18
|
import { Trans } from 'react-i18next';
|
|
19
19
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
20
20
|
import { RouteContext } from '../../context/RouteContext';
|
|
21
|
-
import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
21
|
+
import { SessionRestoreDispatchContext, SessionRestoreStateContext } from '../../context/SessionRestoreContext';
|
|
22
22
|
import { submitCase } from '../../reducers/CaseReducer';
|
|
23
23
|
import { AppRouteSections } from '../../reducers/RouteConstNTypes';
|
|
24
24
|
import RouteUtils from '../../utils/routeUtils';
|
|
@@ -33,6 +33,7 @@ import WizardMain from './WizardMain';
|
|
|
33
33
|
export function WizardLayout(props) {
|
|
34
34
|
const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
|
|
35
35
|
const caseState = useCaseSelector((state) => state, isEqual);
|
|
36
|
+
const sessionRestoreDispatch = useContext(SessionRestoreDispatchContext);
|
|
36
37
|
const caseDispatch = useCaseDispatch();
|
|
37
38
|
const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
|
|
38
39
|
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -84,7 +85,7 @@ export function WizardLayout(props) {
|
|
|
84
85
|
"Try submitting again after a minute. Please ",
|
|
85
86
|
React.createElement(SupportFeedbackForm, { isInline: true }),
|
|
86
87
|
" if you continue to see this message.")));
|
|
87
|
-
submitCase(caseDispatch, caseState, sessionItem, isCaseCreate, errorMessageCaseSubmit500);
|
|
88
|
+
submitCase(caseDispatch, sessionRestoreDispatch, caseState, sessionItem, isCaseCreate, errorMessageCaseSubmit500);
|
|
88
89
|
// reset viewedModals on case submit
|
|
89
90
|
viewedConfirmationModalsList.current = [];
|
|
90
91
|
!isReSubmitting &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,kBAAkB;;EAsCjC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
1
|
+
import { fetchLoggedInUser, fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
|
|
2
2
|
import { useContext } from 'react';
|
|
3
3
|
import { AttachmentDispatchContext, resetAttachment } from '../components/shared/fileUpload';
|
|
4
4
|
import { useCaseDispatch } from '../context/CaseContext';
|
|
@@ -22,6 +22,8 @@ export function useResetCaseCreate() {
|
|
|
22
22
|
const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
|
|
23
23
|
const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
|
|
24
24
|
const resetCaseCreateState = () => {
|
|
25
|
+
// On case creation we refetch the user contact details to get users updated phone number
|
|
26
|
+
fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, {});
|
|
25
27
|
resetAttachment(dispatchToAttachmentReducer);
|
|
26
28
|
resetTopContent(tcDispatch);
|
|
27
29
|
resetRecommendations(recommendationsDispatch);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AACvG,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAkB3D,OAAO,EAUH,UAAU,EAgBb,MAAM,mBAAmB,CAAC;AAE3B,eAAO,MAAM,sBAAsB,SAAU,mBAAmB,EAAE,wBAMjE,CAAC;AAEF,eAAO,MAAM,2BAA2B,eAAgB,WAAW,KAAG,MAOrE,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAAS,mBAAmB,SAAS,MAAM,sBAyB9E,CAAC;AAIF,eAAO,MAAM,qBAAqB,UACvB,MAAM,gBACC,MAAM,uBACC,MAAM,yBACJ,MAAM,kBAC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|
// Add a !isEmpty to to make any KTQuestion Mandatory in isCaseStateValid
|
|
132
132
|
export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
133
|
+
var _a, _b;
|
|
133
134
|
const case_details = caseState.caseDetails;
|
|
134
135
|
return (!isEmpty(case_details.issue) &&
|
|
135
136
|
isEmpty(case_details.caseNumber) &&
|
|
@@ -150,13 +151,23 @@ export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
|
150
151
|
!isEmpty(case_details.severity) &&
|
|
151
152
|
!isEmpty(case_details.accountNumberRef) &&
|
|
152
153
|
!isEmpty(case_details.contactSSOName) &&
|
|
153
|
-
|
|
154
|
+
// Country Code and Phone Number Not Mandatory
|
|
155
|
+
(!isEmpty(case_details.phoneCountryCode) && !isEmpty(case_details.phoneAreaCodePrefixLineNumber)
|
|
156
|
+
? ((_a = case_details.phoneCountryCode) === null || _a === void 0 ? void 0 : _a.length) + ((_b = case_details.phoneAreaCodePrefixLineNumber) === null || _b === void 0 ? void 0 : _b.length) + 1 <=
|
|
157
|
+
PHONE_LIMIT
|
|
158
|
+
: true) &&
|
|
159
|
+
// To validate case state if country code is given but phone number is empty
|
|
160
|
+
(!isEmpty(case_details.phoneCountryCode) &&
|
|
161
|
+
isEmpty(case_details.phoneAreaCodePrefixLineNumber.replace(case_details.phoneCountryCode, ''))
|
|
162
|
+
? false
|
|
163
|
+
: true) &&
|
|
154
164
|
(caseState.selectedAccountDetails.data.requireCGroupOnCreate
|
|
155
165
|
? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
|
|
156
166
|
: true) &&
|
|
157
167
|
canManageCase(loggedInUserJwtToken));
|
|
158
168
|
};
|
|
159
169
|
export const isIdeaCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
170
|
+
var _a, _b;
|
|
160
171
|
const case_details = caseState.caseDetails;
|
|
161
172
|
return (!isEmpty(case_details.issue) &&
|
|
162
173
|
isEmpty(case_details.caseNumber) &&
|
|
@@ -173,13 +184,15 @@ export const isIdeaCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
|
173
184
|
!isEmpty(case_details.severity) &&
|
|
174
185
|
!isEmpty(case_details.accountNumberRef) &&
|
|
175
186
|
!isEmpty(case_details.contactSSOName) &&
|
|
176
|
-
case_details.phoneCountryCode.length + case_details.phoneAreaCodePrefixLineNumber.length + 1 <=
|
|
187
|
+
((_a = case_details.phoneCountryCode) === null || _a === void 0 ? void 0 : _a.length) + ((_b = case_details.phoneAreaCodePrefixLineNumber) === null || _b === void 0 ? void 0 : _b.length) + 1 <=
|
|
188
|
+
PHONE_LIMIT &&
|
|
177
189
|
(caseState.selectedAccountDetails.data.requireCGroupOnCreate
|
|
178
190
|
? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
|
|
179
191
|
: true) &&
|
|
180
192
|
canManageCase(loggedInUserJwtToken));
|
|
181
193
|
};
|
|
182
194
|
export const isCaseManagementStateValid = (caseState, loggedInUserJwtToken) => {
|
|
195
|
+
var _a;
|
|
183
196
|
const case_details = caseState.caseDetails;
|
|
184
197
|
return (isEmpty(case_details.caseNumber) &&
|
|
185
198
|
!caseState.hasLargeCaseDescription &&
|
|
@@ -193,6 +206,10 @@ export const isCaseManagementStateValid = (caseState, loggedInUserJwtToken) => {
|
|
|
193
206
|
(caseState.selectedAccountDetails.data.requireCGroupOnCreate
|
|
194
207
|
? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
|
|
195
208
|
: true) &&
|
|
209
|
+
(!isEmpty(case_details.phoneCountryCode) &&
|
|
210
|
+
isEmpty((_a = case_details.phoneAreaCodePrefixLineNumber) === null || _a === void 0 ? void 0 : _a.replace(case_details.phoneCountryCode, ''))
|
|
211
|
+
? false
|
|
212
|
+
: true) &&
|
|
196
213
|
canManageCase(loggedInUserJwtToken));
|
|
197
214
|
};
|
|
198
215
|
// Add a !isEmpty to to make any KTQuestion Mandatory in isCaseInformationSectionValid
|
|
@@ -7,11 +7,12 @@ import { ISolrRecommendation } from '@cee-eng/hydrajs/@types/models/solr/solr';
|
|
|
7
7
|
import { IApiResponseDetails } from '@rh-support/types/shared';
|
|
8
8
|
import { UserAuth } from '@rh-support/user-permissions';
|
|
9
9
|
import { CaseReducerDispatchType, ICaseState } from './CaseConstNTypes';
|
|
10
|
+
import { SessionReducerDispatchType } from './SessionRestoreReducer';
|
|
10
11
|
export declare const caseReducer: (pState: ICaseState, action: any) => ICaseState;
|
|
11
12
|
export declare const setCaseDetails: (dispatch: CaseReducerDispatchType, caseState: Partial<ICasePayload>) => void;
|
|
12
13
|
export declare const setCaseState: (dispatch: CaseReducerDispatchType, caseState: Partial<ICaseState>) => void;
|
|
13
14
|
export declare const setNotifiedUser: (dispatch: CaseReducerDispatchType, selectedNotificationContacts: IContact[]) => void;
|
|
14
|
-
export declare const submitCase: (dispatch: CaseReducerDispatchType, caseDetails: ICaseState, sessionItem: ISessionItem, isCaseCreate: boolean, errorMessage500: string | JSX.Element) => Promise<void>;
|
|
15
|
+
export declare const submitCase: (dispatch: CaseReducerDispatchType, sessionRestoreDispatch: SessionReducerDispatchType, caseDetails: ICaseState, sessionItem: ISessionItem, isCaseCreate: boolean, errorMessage500: string | JSX.Element) => Promise<void>;
|
|
15
16
|
/**
|
|
16
17
|
* Update case details if there is HTTP 500 error while submitting case
|
|
17
18
|
* @param dispatch CaseReducerDispatchType
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM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ReducerConstants, DESCRIPTION_LENGTH_LIMIT, initialCaseState, } from './CaseConstNTypes';
|
|
20
20
|
import { createCasePayload, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
21
|
+
import { updateSession } from './SessionRestoreReducer';
|
|
21
22
|
export const caseReducer = (pState, action) => {
|
|
22
23
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
23
24
|
switch (action.type) {
|
|
@@ -148,12 +149,17 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
148
149
|
payload: { selectedNotificationContacts },
|
|
149
150
|
});
|
|
150
151
|
};
|
|
151
|
-
export const submitCase = (dispatch, caseDetails, sessionItem, isCaseCreate, errorMessage500) => __awaiter(void 0, void 0, void 0, function* () {
|
|
152
|
+
export const submitCase = (dispatch, sessionRestoreDispatch, caseDetails, sessionItem, isCaseCreate, errorMessage500) => __awaiter(void 0, void 0, void 0, function* () {
|
|
152
153
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
153
154
|
try {
|
|
154
155
|
const casePayload = createCasePayload(caseDetails, sessionItem, isCaseCreate);
|
|
155
156
|
const caseNumber = yield publicApi.kase.createCase(casePayload, caseDetails.selectedAccountDetails.data.secureSupport);
|
|
157
|
+
contacts.updateContactBySSO(casePayload.contactSSOName, {
|
|
158
|
+
supportPhoneCountryCode: casePayload.phoneCountryCode,
|
|
159
|
+
supportPhoneAreaCodePrefixLineNumber: casePayload.phoneAreaCodePrefixLineNumber,
|
|
160
|
+
});
|
|
156
161
|
postCaseCreationProcessing(dispatch, caseNumber, caseDetails);
|
|
162
|
+
yield updateSession(sessionRestoreDispatch, sessionItem.session.id, sessionItem.sessionDetails, sessionItem.session);
|
|
157
163
|
dispatch({ type: CaseReducerConstants.caseCreated, payload: { caseDetails: { caseNumber } } });
|
|
158
164
|
}
|
|
159
165
|
catch (error) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"@patternfly/react-core": "4.264.0",
|
|
67
67
|
"@progress/kendo-drawing": "^1.6.0",
|
|
68
68
|
"@progress/kendo-react-pdf": "^3.12.0",
|
|
69
|
-
"@rh-support/components": "2.1.
|
|
70
|
-
"@rh-support/react-context": "2.1.
|
|
69
|
+
"@rh-support/components": "2.1.1",
|
|
70
|
+
"@rh-support/react-context": "2.1.1",
|
|
71
71
|
"@rh-support/types": "2.0.2",
|
|
72
|
-
"@rh-support/user-permissions": "2.1.
|
|
72
|
+
"@rh-support/user-permissions": "2.1.1",
|
|
73
73
|
"@rh-support/utils": "2.1.0",
|
|
74
74
|
"@types/react-redux": "^7.1.12",
|
|
75
75
|
"@types/redux": "^3.6.0",
|
|
@@ -133,5 +133,5 @@
|
|
|
133
133
|
"defaults and supports es6-module",
|
|
134
134
|
"maintained node versions"
|
|
135
135
|
],
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "edc82728887d89d9975d36c7a08b2ab6d7b73085"
|
|
137
137
|
}
|