@rh-support/troubleshoot 2.2.2 → 2.2.3
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 +15 -6
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseHostname.js +4 -2
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +13 -3
- package/lib/esm/components/EditDescription/EditDescription.d.ts.map +1 -1
- package/lib/esm/components/EditDescription/EditDescription.js +4 -2
- package/lib/esm/components/shared/useIsSectionValid.js +12 -10
- package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
- package/lib/esm/components/wizardLayout/WizardLayout.js +2 -3
- package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
- package/lib/esm/reducers/CaseHelpers.js +2 -0
- package/lib/esm/reducers/CaseReducer.d.ts +1 -2
- package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
- package/lib/esm/reducers/CaseReducer.js +1 -3
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAiBA,wBAAgB,sBAAsB,gBAgLrC"}
|
|
@@ -13,6 +13,7 @@ import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
|
|
|
13
13
|
import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
|
|
14
14
|
import { PhoneInput, ToastNotification } from '@rh-support/components';
|
|
15
15
|
import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
|
|
16
|
+
import { isEmpty } from 'lodash';
|
|
16
17
|
import isEqual from 'lodash/isEqual';
|
|
17
18
|
import React, { useContext, useState } from 'react';
|
|
18
19
|
import { Trans, useTranslation } from 'react-i18next';
|
|
@@ -36,6 +37,7 @@ export function CaseContactPhoneNumber() {
|
|
|
36
37
|
const [isCasePhoneUpdating, setCasePhoneUpdating] = useState(false);
|
|
37
38
|
const [localFullPhoneState, setLocalFullPhoneState] = useState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
|
|
38
39
|
const [localCountryCodeState, setLocalCountryCodeState] = useState(phoneCountryCode);
|
|
40
|
+
const [invalid, setInvalid] = useState(false);
|
|
39
41
|
const caseDispatch = useCaseDispatch();
|
|
40
42
|
const caseUpdateError = useCaseUpdateErrorMessage();
|
|
41
43
|
const { t } = useTranslation();
|
|
@@ -108,20 +110,27 @@ export function CaseContactPhoneNumber() {
|
|
|
108
110
|
limit: PHONE_LIMIT,
|
|
109
111
|
});
|
|
110
112
|
const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
|
|
113
|
+
const noCharErrorMessage = t('Phone number can only have digits.');
|
|
114
|
+
const isPhoneNumberValid = (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT
|
|
115
|
+
? ValidatedOptions.error
|
|
116
|
+
: isPhoneNeedsReview
|
|
117
|
+
? ValidatedOptions.warning
|
|
118
|
+
: invalid
|
|
119
|
+
? ValidatedOptions.error
|
|
120
|
+
: ValidatedOptions.default;
|
|
111
121
|
return (React.createElement("div", { className: "form-group pf-u-pb-sm", style: { minWidth: '200px' } },
|
|
112
122
|
React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
|
|
113
123
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
114
124
|
!isExportingPDF ? ContactPhoneNumberPopOver() : ''),
|
|
115
125
|
React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
|
|
116
|
-
React.createElement(PhoneInput, { phoneValue: localFullPhoneState, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations:
|
|
117
|
-
? ValidatedOptions.error
|
|
118
|
-
: isPhoneNeedsReview
|
|
119
|
-
? ValidatedOptions.warning
|
|
120
|
-
: ValidatedOptions.default, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating, isLoading: isCasePhoneUpdating, "data-tracking-id": "case-details-page-supplied-phone" }),
|
|
126
|
+
React.createElement(PhoneInput, { phoneValue: localFullPhoneState, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating, isLoading: isCasePhoneUpdating, "data-tracking-id": "case-details-page-supplied-phone", invalid: invalid, setInvalid: setInvalid }),
|
|
121
127
|
React.createElement("button", { className: "btn btn-app btn-link pf-u-ml-sm", type: "button", "data-tracking-id": "case-details-page-supplied-phone-save", onClick: () => onSave(), disabled: (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT ||
|
|
122
128
|
localFullPhoneState === phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber, style: { display: isExportingPDF ? 'none' : '' } },
|
|
123
129
|
React.createElement(CheckIcon, null)),
|
|
124
|
-
React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' } },
|
|
130
|
+
React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onClear, "data-tracking-id": "case-details-page-supplied-phone-cancel", style: { display: isExportingPDF ? 'none' : '' }, disabled: isEmpty(localFullPhoneState) },
|
|
125
131
|
React.createElement(TimesIcon, { color: "#6A6E73" }))),
|
|
132
|
+
invalid && React.createElement("p", { className: "form-instructions form-invalid" },
|
|
133
|
+
noCharErrorMessage,
|
|
134
|
+
" "),
|
|
126
135
|
(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage))));
|
|
127
136
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHostname.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseHostname.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"CaseHostname.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseHostname.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAc5D,UAAU,MAAO,SAAQ,gBAAgB;IACrC,cAAc,EAAE,OAAO,CAAC;CAC3B;AAMD,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,eA0KlC;kBA1KQ,YAAY;;;AA6KrB,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -22,6 +22,7 @@ import { HOSTNAME_LENGTH_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
|
22
22
|
import { updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
23
23
|
import { CaseValuesToWatch } from '../../../shared/Constants';
|
|
24
24
|
import { getChangedValueTooltip } from '../../../shared/utils';
|
|
25
|
+
import { PDFContext } from '../../PDFContainer';
|
|
25
26
|
const defaultProps = {
|
|
26
27
|
inlineEditable: false,
|
|
27
28
|
};
|
|
@@ -38,6 +39,7 @@ function CaseHostname(props) {
|
|
|
38
39
|
const canUseHostName = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.HOSTNAME);
|
|
39
40
|
const [isShareHostNamesChecked, setIsShareHostNamesChecked] = useState(false);
|
|
40
41
|
const [isHostnamesLoading, setIsHostnamesLoading] = useState(true);
|
|
42
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
41
43
|
const { globalMetadataState: { loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
|
|
42
44
|
const { request: fetchHostnameDefault } = useFetch(accounts.getIsSharingHostname);
|
|
43
45
|
const userOriginalHostnameValue = () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -108,8 +110,8 @@ function CaseHostname(props) {
|
|
|
108
110
|
return (React.createElement(React.Fragment, null,
|
|
109
111
|
React.createElement(InlineEdit, { labelProps: { htmlFor: 'case-details-hostname' }, formClassName: props.className || '', labelContent: React.createElement(React.Fragment, null,
|
|
110
112
|
React.createElement(Trans, null, "Hostname"),
|
|
111
|
-
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
|
|
112
|
-
React.createElement(QuestionCircleIcon, { className: "pf-u-ml-xs icon-size", "aria-label": "Hostname Info" })), allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined },
|
|
113
|
+
React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localHostnameChange, value: hostname, getTooltipContent: getChangedValueTooltip(() => CaseValuesToWatch.hostname) })), helperContent: !isExportingPDF ? (React.createElement(Popover, { "aria-label": "Hostname Info", position: PopoverPosition.auto, bodyContent: hostNameVisibilityContent, closeBtnAriaLabel: "Close", headerContent: 'Share hostname?', onShow: () => userOriginalHostnameValue() },
|
|
114
|
+
React.createElement(QuestionCircleIcon, { className: "pf-u-ml-xs icon-size", "aria-label": "Hostname Info" }))) : undefined, allowInlineEdit: props.inlineEditable, content: hostname, saveDisabled: hostnameState === hostname || isHostnameUpdating || lengthError, onSave: onSave, onCancel: onCancel, initialIsEditing: false, loadingIndicator: isHostnameUpdating ? React.createElement(LoadingIndicator, { show: isHostnameUpdating, isInline: true }) : undefined, isExportingPDF: isExportingPDF },
|
|
113
115
|
React.createElement("input", { type: "text", id: "case-details-hostname", className: `form-control${lengthError ? ' form-invalid' : ''}`, name: "case-details-hostname", value: hostnameState, onChange: onHostnameChange, disabled: isHostnameUpdating, "data-tracking-id": "case-details-hostname", "aria-invalid": lengthError })),
|
|
114
116
|
lengthError && (React.createElement("div", { className: "pull-top" },
|
|
115
117
|
React.createElement("p", { className: "form-instructions form-invalid" },
|
|
@@ -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,gBAkFjC"}
|
|
@@ -2,7 +2,7 @@ import { ValidatedOptions } from '@patternfly/react-core';
|
|
|
2
2
|
import { PhoneInput } from '@rh-support/components';
|
|
3
3
|
import isEmpty from 'lodash/isEmpty';
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
5
|
-
import React from 'react';
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
7
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
8
8
|
import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
|
|
@@ -16,10 +16,14 @@ export function ContactPhoneNumber() {
|
|
|
16
16
|
phoneCountryCode: state.caseDetails.phoneCountryCode,
|
|
17
17
|
phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
|
|
18
18
|
}), isEqual);
|
|
19
|
+
const [invalid, setInvalid] = useState(false);
|
|
19
20
|
const getPhone = () => phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, '');
|
|
20
21
|
const caseDispatch = useCaseDispatch();
|
|
21
22
|
const { t } = useTranslation();
|
|
22
23
|
const onPhoneChange = (fullPhone) => {
|
|
24
|
+
if (isEmpty(fullPhone)) {
|
|
25
|
+
setInvalid(false);
|
|
26
|
+
}
|
|
23
27
|
setCaseDetails(caseDispatch, {
|
|
24
28
|
phoneAreaCodePrefixLineNumber: phoneCountryCode
|
|
25
29
|
? fullPhone.substring(phoneCountryCode.length, fullPhone.length).trim()
|
|
@@ -41,12 +45,18 @@ export function ContactPhoneNumber() {
|
|
|
41
45
|
? ValidatedOptions.warning
|
|
42
46
|
: isPhoneNumberEmpty
|
|
43
47
|
? ValidatedOptions.error
|
|
44
|
-
:
|
|
48
|
+
: invalid
|
|
49
|
+
? ValidatedOptions.error
|
|
50
|
+
: ValidatedOptions.default;
|
|
51
|
+
const noCharErrorMessage = t('Phone number can only have digits.');
|
|
45
52
|
return (React.createElement("div", { className: "form-group pf-u-pb-xl", style: { minWidth: '200px' } },
|
|
46
53
|
React.createElement("label", null,
|
|
47
54
|
React.createElement(Trans, null, "Case owner's phone number"),
|
|
48
55
|
ContactPhoneNumberPopOver()),
|
|
49
|
-
React.createElement(PhoneInput, { phoneValue: getPhone(), onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid }),
|
|
56
|
+
React.createElement(PhoneInput, { phoneValue: getPhone(), onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid }),
|
|
57
|
+
invalid && React.createElement("p", { className: "form-instructions form-invalid" },
|
|
58
|
+
noCharErrorMessage,
|
|
59
|
+
" "),
|
|
50
60
|
((_b = getPhone()) === null || _b === void 0 ? void 0 : _b.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
|
|
51
61
|
isPhoneNumberEmpty && React.createElement("p", { className: "form-instructions form-invalid" }, phoneNumberEmptyError)));
|
|
52
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditDescription.d.ts","sourceRoot":"","sources":["../../../../src/components/EditDescription/EditDescription.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EditDescription.d.ts","sourceRoot":"","sources":["../../../../src/components/EditDescription/EditDescription.tsx"],"names":[],"mappings":"AAcA,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;CAC3B;AAUD,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eAuEpD"}
|
|
@@ -11,12 +11,13 @@ import { kase } from '@cee-eng/hydrajs';
|
|
|
11
11
|
import { encodeAngularBrackets, linkifyBZIDs, linkifyWithCaseIDs } from '@cee-eng/ui-toolkit';
|
|
12
12
|
import { InlineEdit, LoadingIndicator, TextAreaAutosize, ToastNotification } from '@rh-support/components';
|
|
13
13
|
import isEqual from 'lodash/isEqual';
|
|
14
|
-
import React, { useState } from 'react';
|
|
14
|
+
import React, { useContext, useState } from 'react';
|
|
15
15
|
import { Trans, useTranslation } from 'react-i18next';
|
|
16
16
|
import { useParams } from 'react-router-dom';
|
|
17
17
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
18
18
|
import { DESCRIPTION_LENGTH_LIMIT, LargeDescriptionErrorMessage } from '../../reducers/CaseConstNTypes';
|
|
19
19
|
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
20
|
+
import { PDFContext } from '../CaseEditView/PDFContainer';
|
|
20
21
|
const linkifiedDescription = (text) => {
|
|
21
22
|
text = encodeAngularBrackets(text);
|
|
22
23
|
text = linkifyWithCaseIDs(text);
|
|
@@ -33,6 +34,7 @@ export default function EditDescription(props) {
|
|
|
33
34
|
const caseDispatch = useCaseDispatch();
|
|
34
35
|
const [localDescription, setLocalDescription] = useState(description);
|
|
35
36
|
const [isUpdating, setIsUpdating] = useState(false);
|
|
37
|
+
const { isExportingPDF } = useContext(PDFContext);
|
|
36
38
|
const [isDescriptionTextAreaFocused, setDescriptionTextAreaFocused] = useState(false);
|
|
37
39
|
const onDescriptionSave = () => __awaiter(this, void 0, void 0, function* () {
|
|
38
40
|
setDescriptionTextAreaFocused(false);
|
|
@@ -58,7 +60,7 @@ export default function EditDescription(props) {
|
|
|
58
60
|
};
|
|
59
61
|
const descriptionErrorMessage = t(LargeDescriptionErrorMessage, { limit: DESCRIPTION_LENGTH_LIMIT });
|
|
60
62
|
return (React.createElement(InlineEdit, { labelContent: React.createElement(React.Fragment, null,
|
|
61
|
-
React.createElement(Trans, null, "Description")), loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { size: "xs" }) : null, labelProps: { htmlFor: 'edit-description' }, content: React.createElement("div", { dangerouslySetInnerHTML: { __html: linkifiedDescription(localDescription) } }), allowInlineEdit: !!props.inlineEditable, saveDisabled: localDescription === description || isUpdating, usePreformattedTag: true, onSave: onDescriptionSave },
|
|
63
|
+
React.createElement(Trans, null, "Description")), loadingIndicator: isUpdating ? React.createElement(LoadingIndicator, { size: "xs" }) : null, labelProps: { htmlFor: 'edit-description' }, content: React.createElement("div", { dangerouslySetInnerHTML: { __html: linkifiedDescription(localDescription) } }), allowInlineEdit: !!props.inlineEditable, saveDisabled: localDescription === description || isUpdating, usePreformattedTag: true, onSave: onDescriptionSave, isExportingPDF: isExportingPDF },
|
|
62
64
|
React.createElement(TextAreaAutosize, { id: "edit-description", name: "edit-description", className: `form-control${hasLargeCaseDescription ? ' form-invalid' : ''}`, value: localDescription, disabled: isUpdating, onChange: onDescriptionChange, "data-tracking-id": "edit-description" }),
|
|
63
65
|
React.createElement("p", { className: "form-instructions" }, `${hasLargeCaseDescription && isDescriptionTextAreaFocused ? descriptionErrorMessage : ''}`)));
|
|
64
66
|
}
|
|
@@ -43,7 +43,7 @@ export function useIsSectionValid(sectionName) {
|
|
|
43
43
|
if (caseType === 'Feature / Enhancement Request') {
|
|
44
44
|
unallowedFiles = selectedLocalFiles.filter((file) => !allowedTypesIdea.includes(file.type));
|
|
45
45
|
}
|
|
46
|
-
let hasUnallowedFiles = unallowedFiles.length > 0;
|
|
46
|
+
let hasUnallowedFiles = (unallowedFiles === null || unallowedFiles === void 0 ? void 0 : unallowedFiles.length) > 0;
|
|
47
47
|
return !hasUnallowedFiles; // we want it false to trigger the error if its true
|
|
48
48
|
};
|
|
49
49
|
const isGetSupportSectionValidLocal = () => {
|
|
@@ -53,6 +53,7 @@ export function useIsSectionValid(sectionName) {
|
|
|
53
53
|
!selectedAccountDetails.data.subscriptionAbuse);
|
|
54
54
|
};
|
|
55
55
|
const isSummarizeSectionValid = () => {
|
|
56
|
+
var _a;
|
|
56
57
|
return (!isEmpty(product) &&
|
|
57
58
|
!isEmpty(version) &&
|
|
58
59
|
!allProducts.isFetching &&
|
|
@@ -60,15 +61,16 @@ export function useIsSectionValid(sectionName) {
|
|
|
60
61
|
!topContent.isFetching &&
|
|
61
62
|
!isEmpty(summary) &&
|
|
62
63
|
!recommendationState.isLoadingRecommendations &&
|
|
63
|
-
summary.length < SUMMARY_LENGTH_LIMIT);
|
|
64
|
+
((_a = summary) === null || _a === void 0 ? void 0 : _a.length) < SUMMARY_LENGTH_LIMIT);
|
|
64
65
|
};
|
|
65
66
|
const isCaseManagementSectionValid = () => {
|
|
67
|
+
var _a, _b;
|
|
66
68
|
const hasContactInfo24x7ValidLength = contactInfo24x7
|
|
67
|
-
? contactInfo24x7.length <= CONTACT_INFO_24X7_LIMIT
|
|
69
|
+
? (contactInfo24x7 === null || contactInfo24x7 === void 0 ? void 0 : contactInfo24x7.length) <= CONTACT_INFO_24X7_LIMIT
|
|
68
70
|
: true;
|
|
69
|
-
const hasAlternateCaseIdValidLength = alternateId ? alternateId.length <= CASE_REFERENCE_NUMBER_LIMIT : true;
|
|
71
|
+
const hasAlternateCaseIdValidLength = alternateId ? (alternateId === null || alternateId === void 0 ? void 0 : alternateId.length) <= CASE_REFERENCE_NUMBER_LIMIT : true;
|
|
70
72
|
const hasSuppliedPhoneValidLength = phoneAreaCodePrefixLineNumber || phoneCountryCode
|
|
71
|
-
? phoneCountryCode.length + phoneAreaCodePrefixLineNumber.length + 1 <= PHONE_LIMIT
|
|
73
|
+
? ((_a = phoneCountryCode) === null || _a === void 0 ? void 0 : _a.length) + ((_b = phoneAreaCodePrefixLineNumber) === null || _b === void 0 ? void 0 : _b.length) + 1 <= PHONE_LIMIT
|
|
72
74
|
: true;
|
|
73
75
|
return (isCaseManagementStateValid(caseState, loggedInUserJwtToken) &&
|
|
74
76
|
hasContactInfo24x7ValidLength &&
|
|
@@ -76,15 +78,15 @@ export function useIsSectionValid(sectionName) {
|
|
|
76
78
|
hasSuppliedPhoneValidLength);
|
|
77
79
|
};
|
|
78
80
|
const isTroubleshootSectionValid = () => {
|
|
79
|
-
var _a;
|
|
81
|
+
var _a, _b, _c;
|
|
80
82
|
// don't check for entitled product if user is on search intent flow
|
|
81
83
|
const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
|
|
82
84
|
return (!recommendationState.isLoadingRecommendations &&
|
|
83
85
|
!isEmpty(summary) &&
|
|
84
86
|
isEntitledProductLocal &&
|
|
85
|
-
summary.length <= SUMMARY_LENGTH_LIMIT &&
|
|
86
|
-
description.length <= DESCRIPTION_LENGTH_LIMIT &&
|
|
87
|
-
isClusterIDValid(caseState, (
|
|
87
|
+
((_a = summary) === null || _a === void 0 ? void 0 : _a.length) <= SUMMARY_LENGTH_LIMIT &&
|
|
88
|
+
((_b = description) === null || _b === void 0 ? void 0 : _b.length) <= DESCRIPTION_LENGTH_LIMIT &&
|
|
89
|
+
isClusterIDValid(caseState, (_c = allProducts.data) === null || _c === void 0 ? void 0 : _c.productsResult));
|
|
88
90
|
};
|
|
89
91
|
const isReviewSectionValid = () => {
|
|
90
92
|
var _a;
|
|
@@ -103,7 +105,7 @@ export function useIsSectionValid(sectionName) {
|
|
|
103
105
|
};
|
|
104
106
|
const isCaseDescribeMoreSectionValidLocal = () => {
|
|
105
107
|
var _a;
|
|
106
|
-
const hostnameIsValid = hostname ? hostname.length <= HOSTNAME_LENGTH_LIMIT : true;
|
|
108
|
+
const hostnameIsValid = hostname ? (hostname === null || hostname === void 0 ? void 0 : hostname.length) <= HOSTNAME_LENGTH_LIMIT : true;
|
|
107
109
|
return (!caseState.hasInvalidEntitlements &&
|
|
108
110
|
isClusterIDValid(caseState, (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) &&
|
|
109
111
|
isCaseInformationSectionValid(caseState, loggedInUserJwtToken) &&
|
|
@@ -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,eAqIzC"}
|
|
@@ -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 {
|
|
21
|
+
import { 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,7 +33,6 @@ 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);
|
|
37
36
|
const caseDispatch = useCaseDispatch();
|
|
38
37
|
const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
|
|
39
38
|
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
@@ -85,7 +84,7 @@ export function WizardLayout(props) {
|
|
|
85
84
|
"Try submitting again after a minute. Please ",
|
|
86
85
|
React.createElement(SupportFeedbackForm, { isInline: true }),
|
|
87
86
|
" if you continue to see this message.")));
|
|
88
|
-
submitCase(caseDispatch,
|
|
87
|
+
submitCase(caseDispatch, caseState, sessionItem, isCaseCreate, errorMessageCaseSubmit500);
|
|
89
88
|
// reset viewedModals on case submit
|
|
90
89
|
viewedConfirmationModalsList.current = [];
|
|
91
90
|
!isReSubmitting &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseHelpers.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseHelpers.ts"],"names":[],"mappings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AEF,eAAO,MAAM,0BAA0B,cACxB,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAqBF,CAAC;AAIF,eAAO,MAAM,6BAA6B,cAC3B,UAAU,wBACC,QAAQ,eAAe,CAAC,KAC/C,OAuBF,CAAC;AAEF,eAAO,MAAM,iBAAiB,cACf,UAAU,gBACP,YAAY,iBACZ,OAAO,KACtB,QAAQ,YAAY,CA2EtB,CAAC;AAEF,eAAO,MAAM,wBAAwB,qBAAsB,YAAY,EAAE,KAAG,YAAY,EAEvF,CAAC;AACF,eAAO,MAAM,yBAAyB,qBAAsB,YAAY,EAAE,KAAG,OAE5E,CAAC;AAEF,eAAO,MAAM,yBAAyB,gBACrB,YAAY,6BACE,MAAM,mBAChB,MAAM,KACxB,QAAQ,YAAY,CAgCtB,CAAC;AACF,eAAO,MAAM,yBAAyB,gBACrB,QAAQ,YAAY,CAAC,gCACJ,QAAQ,EAAE,KACzC,eA+CF,CAAC"}
|
|
@@ -132,6 +132,7 @@ export const isClusterIDValid = (caseState, allProducts) => {
|
|
|
132
132
|
export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
133
133
|
var _a, _b;
|
|
134
134
|
const case_details = caseState.caseDetails;
|
|
135
|
+
const regex = /^[\d ()+-]+$/;
|
|
135
136
|
return (!isEmpty(case_details.issue) &&
|
|
136
137
|
isEmpty(case_details.caseNumber) &&
|
|
137
138
|
!caseState.hasLargeCaseDescription &&
|
|
@@ -161,6 +162,7 @@ export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
|
|
|
161
162
|
isEmpty(case_details.phoneAreaCodePrefixLineNumber.replace(case_details.phoneCountryCode, ''))
|
|
162
163
|
? false
|
|
163
164
|
: true) &&
|
|
165
|
+
regex.test(case_details.phoneAreaCodePrefixLineNumber.replace(case_details.phoneCountryCode, '')) &&
|
|
164
166
|
(caseState.selectedAccountDetails.data.requireCGroupOnCreate
|
|
165
167
|
? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
|
|
166
168
|
: true) &&
|
|
@@ -7,12 +7,11 @@ 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';
|
|
11
10
|
export declare const caseReducer: (pState: ICaseState, action: any) => ICaseState;
|
|
12
11
|
export declare const setCaseDetails: (dispatch: CaseReducerDispatchType, caseState: Partial<ICasePayload>) => void;
|
|
13
12
|
export declare const setCaseState: (dispatch: CaseReducerDispatchType, caseState: Partial<ICaseState>) => void;
|
|
14
13
|
export declare const setNotifiedUser: (dispatch: CaseReducerDispatchType, selectedNotificationContacts: IContact[]) => void;
|
|
15
|
-
export declare const submitCase: (dispatch: CaseReducerDispatchType,
|
|
14
|
+
export declare const submitCase: (dispatch: CaseReducerDispatchType, caseDetails: ICaseState, sessionItem: ISessionItem, isCaseCreate: boolean, errorMessage500: string | JSX.Element) => Promise<void>;
|
|
16
15
|
/**
|
|
17
16
|
* Update case details if there is HTTP 500 error while submitting case
|
|
18
17
|
* @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,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,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AAC,kBAiDzC,CAAC;AAmCF,eAAO,MAAM,gBAAgB,aACf,uBAAuB,cACrB,MAAM,8DAGH,QAAQ,YAAY,CAAC,kBAsGvC,CAAC;AAEF,eAAO,MAAM,iBAAiB,aAChB,uBAAuB,cACrB,MAAM,eACL,QAAQ,YAAY,CAAC,mBACjB,OAAO,mBAiB3B,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,SAC1B,aAAa,EAAE,gBACR,MAAM,kBAmCvB,CAAC;AAEF,eAAO,MAAM,oCAAoC,aACnC,uBAAuB,yEAInB,MAAM,kBACJ,MAAM,kBAgFzB,CAAC;AAEF,eAAO,MAAM,yCAAyC,aACxC,uBAAuB,cACrB,OAAO,iBACJ,MAAM,SAMxB,CAAC;AAIF,eAAO,MAAM,yBAAyB,aACxB,uBAAuB,iBAClB,MAAM,eACR,MAAM,sBACC,QAAQ,kBA6B/B,CAAC;AAEF,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAmBtG;AAGD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,0BAA0B,EAAE,QAO5D;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAiB1F;AAED,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,QAAQ,OAAO,SAKlF,CAAC"}
|
|
@@ -18,7 +18,6 @@ import uniq from 'lodash/uniq';
|
|
|
18
18
|
import uniqBy from 'lodash/uniqBy';
|
|
19
19
|
import { CaseReducerConstants, DESCRIPTION_LENGTH_LIMIT, initialCaseState, } from './CaseConstNTypes';
|
|
20
20
|
import { createCasePayload, getCaseFromSessionDetails, getCaseRecommendations, getCepCommentFromCepDetails, getHasInvalidEntitlements, getProcessedEntitlements, } from './CaseHelpers';
|
|
21
|
-
import { updateSession } from './SessionRestoreReducer';
|
|
22
21
|
export const caseReducer = (pState, action) => {
|
|
23
22
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
24
23
|
switch (action.type) {
|
|
@@ -149,7 +148,7 @@ export const setNotifiedUser = (dispatch, selectedNotificationContacts) => {
|
|
|
149
148
|
payload: { selectedNotificationContacts },
|
|
150
149
|
});
|
|
151
150
|
};
|
|
152
|
-
export const submitCase = (dispatch,
|
|
151
|
+
export const submitCase = (dispatch, caseDetails, sessionItem, isCaseCreate, errorMessage500) => __awaiter(void 0, void 0, void 0, function* () {
|
|
153
152
|
dispatch({ type: CaseReducerConstants.isCreatingCase });
|
|
154
153
|
try {
|
|
155
154
|
const casePayload = createCasePayload(caseDetails, sessionItem, isCaseCreate);
|
|
@@ -159,7 +158,6 @@ export const submitCase = (dispatch, sessionRestoreDispatch, caseDetails, sessio
|
|
|
159
158
|
supportPhoneAreaCodePrefixLineNumber: casePayload.phoneAreaCodePrefixLineNumber,
|
|
160
159
|
});
|
|
161
160
|
postCaseCreationProcessing(dispatch, caseNumber, caseDetails);
|
|
162
|
-
yield updateSession(sessionRestoreDispatch, sessionItem.session.id, sessionItem.sessionDetails, sessionItem.session);
|
|
163
161
|
dispatch({ type: CaseReducerConstants.caseCreated, payload: { caseDetails: { caseNumber } } });
|
|
164
162
|
}
|
|
165
163
|
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.3",
|
|
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.2",
|
|
70
|
+
"@rh-support/react-context": "2.1.2",
|
|
71
71
|
"@rh-support/types": "2.0.2",
|
|
72
|
-
"@rh-support/user-permissions": "2.1.
|
|
72
|
+
"@rh-support/user-permissions": "2.1.2",
|
|
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": "01f23b19ee074f6515c54b2cdec744deb3ba2c1b"
|
|
137
137
|
}
|