@rh-support/troubleshoot 2.2.117 → 2.2.118
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 +9 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +17 -6
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAkB/D,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAkB/D,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAmYnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -120,12 +120,20 @@ function OwnerSelector(props) {
|
|
|
120
120
|
yield updatePhone({
|
|
121
121
|
phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
|
|
122
122
|
phoneCountryCode: loggedInUser.data.supportPhoneCountryCode,
|
|
123
|
+
suppliedPhoneNumberVerified: isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') || //hasLoggedInUserConfirmedPhoneNumber: global verification phone state for contactSSOName === loggedInUser.data.ssoUsername
|
|
124
|
+
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
|
|
125
|
+
? hasLoggedInUserConfirmedPhoneNumber
|
|
126
|
+
: 'False',
|
|
123
127
|
});
|
|
124
128
|
}
|
|
125
129
|
else {
|
|
126
130
|
yield updatePhone({
|
|
127
131
|
phoneAreaCodePrefixLineNumber: getPhoneObj(loggedInUser.data.phone).phoneLine || '',
|
|
128
132
|
phoneCountryCode: getPhoneObj(loggedInUser.data.phone).countryCode || '',
|
|
133
|
+
suppliedPhoneNumberVerified: isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') || //hasLoggedInUserConfirmedPhoneNumber: global verification phone state for contactSSOName === loggedInUser.data.ssoUsername
|
|
134
|
+
isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
|
|
135
|
+
? hasLoggedInUserConfirmedPhoneNumber
|
|
136
|
+
: 'False',
|
|
129
137
|
});
|
|
130
138
|
}
|
|
131
139
|
}
|
|
@@ -296,7 +304,7 @@ function OwnerSelector(props) {
|
|
|
296
304
|
}
|
|
297
305
|
}
|
|
298
306
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
299
|
-
}, [
|
|
307
|
+
}, []);
|
|
300
308
|
const showUsersWithSelectedGroupAccess = caseNumber &&
|
|
301
309
|
(selectedCaseGroupUsers.isFetching ||
|
|
302
310
|
(!selectedCaseGroupUsers.isFetching && (selectedCaseGroupUsers.data || []).length > 0));
|
|
@@ -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,sBAgTrC"}
|
|
@@ -22,7 +22,7 @@ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHON
|
|
|
22
22
|
import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
|
|
23
23
|
import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
|
|
24
24
|
import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
|
|
25
|
-
import { updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
25
|
+
import { setCaseState, updateCaseDetails } from '../../../../reducers/CaseReducer';
|
|
26
26
|
import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
|
|
27
27
|
import { trimAndReplacePlus } from '../../../shared/utils';
|
|
28
28
|
import { PDFContext } from '../../PDFContainer';
|
|
@@ -137,11 +137,7 @@ export function CaseContactPhoneNumber() {
|
|
|
137
137
|
}, [localFullPhoneState]);
|
|
138
138
|
const updatePhone = () => __awaiter(this, void 0, void 0, function* () {
|
|
139
139
|
var _a, _b;
|
|
140
|
-
if (
|
|
141
|
-
setLocalFullPhoneState((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim());
|
|
142
|
-
setIsShowOldPhone(false);
|
|
143
|
-
}
|
|
144
|
-
else if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber) && !isEmpty(phone)) {
|
|
140
|
+
if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber) && !isEmpty(phone)) {
|
|
145
141
|
const oldPhoneline = ((_a = getPhoneObj(phone)) === null || _a === void 0 ? void 0 : _a.phoneLine) || '';
|
|
146
142
|
const oldCountryCode = ((_b = getPhoneObj(phone)) === null || _b === void 0 ? void 0 : _b.countryCode) || '';
|
|
147
143
|
if (!isEmpty(oldPhoneline.trim()) && !isEmpty(trimAndReplacePlus(oldCountryCode))) {
|
|
@@ -164,12 +160,27 @@ export function CaseContactPhoneNumber() {
|
|
|
164
160
|
setIsShowOldPhone(true);
|
|
165
161
|
}
|
|
166
162
|
}
|
|
163
|
+
else {
|
|
164
|
+
setLocalFullPhoneState((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim());
|
|
165
|
+
setIsShowOldPhone(false);
|
|
166
|
+
}
|
|
167
167
|
});
|
|
168
168
|
// should be removed when old phone field is removed by CCM team
|
|
169
169
|
useEffect(() => {
|
|
170
170
|
updatePhone();
|
|
171
171
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
172
172
|
}, [phone, phoneAreaCodePrefixLineNumber, phoneCountryCode]);
|
|
173
|
+
useEffect(() => {
|
|
174
|
+
if (contactSSOName === loggedInUser.data.ssoUsername) {
|
|
175
|
+
// edge case: when loggedInUser === contactSSOName while opening a case confirms or deffers the phone
|
|
176
|
+
// we need to save the verification state globallly so that we don't show the phone review banner again
|
|
177
|
+
// to the user where he changes it to another owner and then again assigns himself as the case owner
|
|
178
|
+
setCaseState(caseDispatch, {
|
|
179
|
+
hasLoggedInUserConfirmedPhoneNumber: suppliedPhoneNumberVerified,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
183
|
+
}, [suppliedPhoneNumberVerified]);
|
|
173
184
|
return (React.createElement("div", { className: "form-group pf-v5-u-pb-md", style: { minWidth: '200px' } },
|
|
174
185
|
React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
|
|
175
186
|
React.createElement(Trans, null, "Case owner's phone number"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rh-support/troubleshoot",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.118",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org"
|
|
@@ -131,5 +131,5 @@
|
|
|
131
131
|
"defaults and supports es6-module",
|
|
132
132
|
"maintained node versions"
|
|
133
133
|
],
|
|
134
|
-
"gitHead": "
|
|
134
|
+
"gitHead": "deab4dee0be1771b098bd0260da67743c8f2a804"
|
|
135
135
|
}
|