@rh-support/troubleshoot 2.2.161 → 2.2.162
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 +6 -4
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +4 -4
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AASA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,sBAAsB,sBAoYrC"}
|
|
@@ -112,13 +112,15 @@ export function CaseContactPhoneNumber() {
|
|
|
112
112
|
const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
|
|
113
113
|
limit: PHONE_LIMIT,
|
|
114
114
|
});
|
|
115
|
+
const phoneObject = getPhoneObj(localFullPhoneState);
|
|
116
|
+
const localFullPhone = phoneObject.countryCode + ' ' + phoneObject.phoneLine;
|
|
115
117
|
const isPhoneNeedsReview = !isEmpty(contactSSOName) &&
|
|
116
118
|
contactSSOName === loggedInUser.data.ssoUsername &&
|
|
117
119
|
suppliedPhoneNumberVerified === 'Deferred' &&
|
|
118
120
|
!isCaseOwnerUpdating &&
|
|
119
121
|
!isCasePhoneUpdating &&
|
|
120
122
|
!isEmpty(localFullPhoneState);
|
|
121
|
-
const isPhoneNumberValid = (
|
|
123
|
+
const isPhoneNumberValid = (localFullPhone === null || localFullPhone === void 0 ? void 0 : localFullPhone.length) > PHONE_LIMIT
|
|
122
124
|
? ValidatedOptions.error
|
|
123
125
|
: isPhoneNeedsReview
|
|
124
126
|
? ValidatedOptions.warning
|
|
@@ -267,7 +269,7 @@ export function CaseContactPhoneNumber() {
|
|
|
267
269
|
React.createElement(PhoneInput, { phoneValue: localFullPhoneState, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating || !isEditting, isLoading: isCasePhoneUpdating || isCaseOwnerUpdating || isFetchingSSO, "data-tracking-id": "case-details-page-supplied-phone", invalid: invalid, setInvalid: setInvalid }),
|
|
268
270
|
isEditting ? (React.createElement(React.Fragment, null,
|
|
269
271
|
React.createElement("button", { className: "btn btn-app btn-link pf-v5-u-ml-sm", type: "button", "data-tracking-id": "case-details-page-supplied-phone-save", onClick: () => onSave(), "aria-label": "Save", disabled: (isSaveClicked && isPhoneValueCannotBeSaved) ||
|
|
270
|
-
(
|
|
272
|
+
(localFullPhone === null || localFullPhone === void 0 ? void 0 : localFullPhone.length) > PHONE_LIMIT ||
|
|
271
273
|
localFullPhoneState === phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber ||
|
|
272
274
|
isCaseOwnerUpdating ||
|
|
273
275
|
isCasePhoneUpdating, style: { display: isExportingPDF ? 'none' : '' } },
|
|
@@ -276,13 +278,13 @@ export function CaseContactPhoneNumber() {
|
|
|
276
278
|
React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: () => setIsEditting(true), "data-tracking-id": "case-details-page-supplied-phone-edit", style: { display: isExportingPDF ? 'none' : '' }, "aria-label": "Edit", disabled: isCaseOwnerUpdating || isCasePhoneUpdating },
|
|
277
279
|
React.createElement(PencilAltIcon, null)))),
|
|
278
280
|
!invalid &&
|
|
279
|
-
(
|
|
281
|
+
(localFullPhone === null || localFullPhone === void 0 ? void 0 : localFullPhone.length) < PHONE_LIMIT &&
|
|
280
282
|
!(isSaveClicked && isPhoneValueCannotBeSaved) &&
|
|
281
283
|
!showInvalidPhoneError && (React.createElement("p", { className: "form-instructions" },
|
|
282
284
|
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
283
285
|
invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
284
286
|
React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
|
|
285
|
-
(
|
|
287
|
+
(localFullPhone === null || localFullPhone === void 0 ? void 0 : localFullPhone.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
|
|
286
288
|
isSaveClicked && isPhoneLineEmpty && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
287
289
|
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
288
290
|
isSaveClicked && isPhoneNumberInvalid && (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":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,wBAAgB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,wBAAgB,kBAAkB,sBAsVjC"}
|
|
@@ -41,7 +41,7 @@ export function ContactPhoneNumber() {
|
|
|
41
41
|
const [localFullPhone, setLocalFullPhone] = useState('');
|
|
42
42
|
const [isFetchingSso, setIsFetchingSso] = useState(false);
|
|
43
43
|
const { isExportingPDF } = useContext(PDFContext);
|
|
44
|
-
const getPhone =
|
|
44
|
+
const getPhone = phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber;
|
|
45
45
|
const caseDispatch = useCaseDispatch();
|
|
46
46
|
const { t } = useTranslation();
|
|
47
47
|
const checkingPlusInLocalFullPhone = (_localFullPhone) => {
|
|
@@ -89,7 +89,7 @@ export function ContactPhoneNumber() {
|
|
|
89
89
|
!isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
|
|
90
90
|
(isEqual(suppliedPhoneNumberVerified, 'False') || isUndefined(suppliedPhoneNumberVerified))
|
|
91
91
|
? ValidatedOptions.warning
|
|
92
|
-
: getPhone
|
|
92
|
+
: getPhone.length > PHONE_LIMIT
|
|
93
93
|
? ValidatedOptions.error
|
|
94
94
|
: isNextBtnClickedToShowValidationError &&
|
|
95
95
|
(isPhoneNumberEmpty || isPhoneNumberInvalid || isEmpty(trimAndReplacePlus(phoneCountryCode)))
|
|
@@ -266,14 +266,14 @@ export function ContactPhoneNumber() {
|
|
|
266
266
|
ContactPhoneNumberPopOver()),
|
|
267
267
|
React.createElement(PhoneInput, { phoneValue: localFullPhone, countryCode: phoneCountryCode, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid, isLoading: isFetchingSso || isCasePhoneUpdating, shouldNotSetCountryCode: shouldNotSetPhoneCountryCode, isDisabled: isFetchingSso || isCasePhoneUpdating }),
|
|
268
268
|
!invalid &&
|
|
269
|
-
getPhone
|
|
269
|
+
getPhone.length < PHONE_LIMIT &&
|
|
270
270
|
!(isPhoneNumberEmpty && isNextBtnClickedToShowValidationError) &&
|
|
271
271
|
!(isNextBtnClickedToShowValidationError &&
|
|
272
272
|
(isPhoneNumberInvalid || isEmpty(trimAndReplacePlus(phoneCountryCode)))) && (React.createElement("p", { className: "form-instructions" },
|
|
273
273
|
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
274
274
|
invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
275
275
|
React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
|
|
276
|
-
getPhone
|
|
276
|
+
getPhone.length > PHONE_LIMIT && React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage),
|
|
277
277
|
isPhoneNumberEmpty && isNextBtnClickedToShowValidationError && (React.createElement("p", { className: "form-instructions form-invalid" },
|
|
278
278
|
React.createElement(Trans, null, PHONE_INSTRUCTION))),
|
|
279
279
|
isNextBtnClickedToShowValidationError && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.162",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"@progress/kendo-licensing": "1.3.5",
|
|
61
61
|
"@progress/kendo-react-pdf": "^5.16.0",
|
|
62
62
|
"@redux-devtools/extension": "^3.3.0",
|
|
63
|
-
"@rh-support/components": "2.1.
|
|
64
|
-
"@rh-support/react-context": "2.1.
|
|
63
|
+
"@rh-support/components": "2.1.78",
|
|
64
|
+
"@rh-support/react-context": "2.1.87",
|
|
65
65
|
"@rh-support/types": "2.0.4",
|
|
66
66
|
"@rh-support/user-permissions": "2.1.49",
|
|
67
67
|
"@rh-support/utils": "2.1.38",
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"defaults and supports es6-module",
|
|
132
132
|
"maintained node versions"
|
|
133
133
|
],
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "0b68f805f8c48c99784e651c3e41fdc81da526eb"
|
|
135
135
|
}
|