@rh-support/troubleshoot 2.2.118 → 2.2.120

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.
Files changed (24) hide show
  1. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/OwnerSelector.js +7 -43
  3. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +33 -75
  5. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +2 -6
  7. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.js +3 -7
  9. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/PostComment.js +6 -1
  11. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  12. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +20 -32
  13. package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.d.ts.map +1 -1
  14. package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.js +7 -29
  15. package/lib/esm/components/CaseInformation/Severity.d.ts.map +1 -1
  16. package/lib/esm/components/CaseInformation/Severity.js +1 -0
  17. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -1
  18. package/lib/esm/components/shared/utils.js +5 -5
  19. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  20. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +0 -8
  21. package/lib/esm/reducers/CaseConstNTypes.d.ts +0 -2
  22. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  23. package/lib/esm/reducers/CaseConstNTypes.js +0 -2
  24. package/package.json +4 -4
@@ -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,qBAmYnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
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,qBA2VnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -28,7 +28,7 @@ import { getChangedValueTooltip } from '../shared/utils';
28
28
  function OwnerSelector(props) {
29
29
  const { t } = useTranslation();
30
30
  const caseUpdateError = useCaseUpdateErrorMessage();
31
- const { accountNumber, caseNumber, selectedNotificationContacts, selectedOwner, selectedCaseGroupUsers, isCaseOwnerUpdating, caseDetailes, hasLoggedInUserConfirmedPhoneNumber, } = useCaseSelector((state) => ({
31
+ const { accountNumber, caseNumber, selectedNotificationContacts, selectedOwner, selectedCaseGroupUsers, isCaseOwnerUpdating, caseDetailes, } = useCaseSelector((state) => ({
32
32
  accountNumber: state.caseDetails.accountNumberRef,
33
33
  caseNumber: state.caseDetails.caseNumber,
34
34
  selectedNotificationContacts: state.selectedNotificationContacts,
@@ -36,7 +36,6 @@ function OwnerSelector(props) {
36
36
  selectedCaseGroupUsers: state.selectedCaseGroupUsers,
37
37
  isCaseOwnerUpdating: state.isCaseOwnerUpdating,
38
38
  caseDetailes: state.caseDetails,
39
- hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
40
39
  }), isEqual);
41
40
  const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
42
41
  const caseDispatch = useCaseDispatch();
@@ -60,10 +59,7 @@ function OwnerSelector(props) {
60
59
  setCaseDetails(caseDispatch, {
61
60
  phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
62
61
  phoneCountryCode: loggedInUser.data.supportPhoneCountryCode,
63
- suppliedPhoneNumberVerified: isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') || //hasLoggedInUserConfirmedPhoneNumber: global verification phone state for contactSSOName === loggedInUser.data.ssoUsername
64
- isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
65
- ? hasLoggedInUserConfirmedPhoneNumber
66
- : 'False',
62
+ suppliedPhoneNumberVerified: 'True',
67
63
  });
68
64
  }
69
65
  else {
@@ -72,10 +68,7 @@ function OwnerSelector(props) {
72
68
  setCaseDetails(caseDispatch, {
73
69
  phoneAreaCodePrefixLineNumber: phoneLine,
74
70
  phoneCountryCode: countryCode,
75
- suppliedPhoneNumberVerified: isEqual(hasLoggedInUserConfirmedPhoneNumber, 'True') ||
76
- isEqual(hasLoggedInUserConfirmedPhoneNumber, 'Deferred')
77
- ? hasLoggedInUserConfirmedPhoneNumber
78
- : 'False',
71
+ suppliedPhoneNumberVerified: phoneLine && countryCode ? 'True' : 'False',
79
72
  });
80
73
  }
81
74
  }
@@ -108,7 +101,7 @@ function OwnerSelector(props) {
108
101
  });
109
102
  const updatePhone = (phoneSetting) => __awaiter(this, void 0, void 0, function* () {
110
103
  yield updateCaseDetails(caseDispatch, caseNumber, phoneSetting);
111
- setCaseDetails(caseDispatch, Object.assign({}, phoneSetting));
104
+ setCaseDetails(caseDispatch, Object.assign(Object.assign({}, caseDetailes), phoneSetting));
112
105
  });
113
106
  // set owner on updating a case
114
107
  const updateContactPhoneNumber = (sso) => __awaiter(this, void 0, void 0, function* () {
@@ -120,20 +113,14 @@ function OwnerSelector(props) {
120
113
  yield updatePhone({
121
114
  phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
122
115
  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',
116
+ suppliedPhoneNumberVerified: 'True',
127
117
  });
128
118
  }
129
119
  else {
130
120
  yield updatePhone({
131
121
  phoneAreaCodePrefixLineNumber: getPhoneObj(loggedInUser.data.phone).phoneLine || '',
132
122
  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',
123
+ suppliedPhoneNumberVerified: 'False',
137
124
  });
138
125
  }
139
126
  }
@@ -225,9 +212,6 @@ function OwnerSelector(props) {
225
212
  setCaseState(caseDispatch, { isCaseOwnerUpdating: true });
226
213
  try {
227
214
  yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
228
- setCaseDetails(caseDispatch, {
229
- contactSSOName: newOwner.ssoUsername,
230
- });
231
215
  const abortSignal = new AbortController().signal;
232
216
  yield setCaseOwner(caseDispatch, {
233
217
  ssoUsername: newOwner.ssoUsername,
@@ -237,9 +221,9 @@ function OwnerSelector(props) {
237
221
  }, '', abortSignal);
238
222
  setLocalOwnerChange(true);
239
223
  updateNotifyUsersList(newOwner);
240
- ToastNotification.addSuccessMessage(t(`Owner has been successfully updated`));
241
224
  yield updateContactPhoneNumber(newOwner.ssoUsername);
242
225
  setCaseState(caseDispatch, { isCaseOwnerUpdating: false });
226
+ ToastNotification.addSuccessMessage(t(`Owner has been successfully updated`));
243
227
  }
244
228
  catch (e) {
245
229
  setCaseState(caseDispatch, { isCaseOwnerUpdating: false });
@@ -285,26 +269,6 @@ function OwnerSelector(props) {
285
269
  users.length > 0 && setUsersWithGroupAccess(sortHydraContacts(users));
286
270
  }
287
271
  }, [selectedCaseGroupUsers, caseNumber]);
288
- // to populate the phone number with the logged in user data
289
- useEffect(() => {
290
- if (caseDetailes.contactSSOName === loggedInUser.data.ssoUsername) {
291
- if (loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) {
292
- setCaseDetails(caseDispatch, {
293
- phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
294
- phoneCountryCode: loggedInUser.data.supportPhoneCountryCode,
295
- });
296
- }
297
- else {
298
- const phoneLine = getPhoneObj(loggedInUser.data.phone).phoneLine || '';
299
- const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode;
300
- setCaseDetails(caseDispatch, {
301
- phoneAreaCodePrefixLineNumber: phoneLine,
302
- phoneCountryCode: countryCode,
303
- });
304
- }
305
- }
306
- // eslint-disable-next-line react-hooks/exhaustive-deps
307
- }, []);
308
272
  const showUsersWithSelectedGroupAccess = caseNumber &&
309
273
  (selectedCaseGroupUsers.isFetching ||
310
274
  (!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,sBAgTrC"}
1
+ {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,sBAAsB,sBAoPrC"}
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { contacts } from '@cee-eng/hydrajs';
11
11
  import { InputGroupText, ValidatedOptions } from '@patternfly/react-core';
12
12
  import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
13
- import PencilAltIcon from '@patternfly/react-icons/dist/js/icons/pencil-alt-icon';
14
13
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
15
14
  import { getPhoneObj, PhoneInput, ToastNotification } from '@rh-support/components';
16
15
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
@@ -22,7 +21,7 @@ import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHON
22
21
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
23
22
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
24
23
  import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
25
- import { setCaseState, updateCaseDetails } from '../../../../reducers/CaseReducer';
24
+ import { updateCaseDetails } from '../../../../reducers/CaseReducer';
26
25
  import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
27
26
  import { trimAndReplacePlus } from '../../../shared/utils';
28
27
  import { PDFContext } from '../../PDFContainer';
@@ -39,7 +38,6 @@ export function CaseContactPhoneNumber() {
39
38
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
40
39
  const canEditCase = useCanEditCase();
41
40
  const [isCasePhoneUpdating, setCasePhoneUpdating] = useState(false);
42
- const [isEditting, setIsEditting] = useState(false);
43
41
  const [localFullPhoneState, setLocalFullPhoneState] = useState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
44
42
  const [localCountryCodeState, setLocalCountryCodeState] = useState(phoneCountryCode);
45
43
  const [invalid, setInvalid] = useState(false);
@@ -60,12 +58,6 @@ export function CaseContactPhoneNumber() {
60
58
  return;
61
59
  setLocalCountryCodeState(countryCode);
62
60
  };
63
- const regex = /[()\s-]/g; // to have only digits in phone
64
- // To check if country code is given but phone number empty
65
- const isPhoneNumberInvalid = !isEmpty(localFullPhoneState) &&
66
- isEmpty(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.replace(regex, '').replace(localCountryCodeState, ''));
67
- const isPhoneLineEmpty = isEmpty(trimAndReplacePlus(localCountryCodeState)) &&
68
- isEmpty(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.replace(localCountryCodeState, ''));
69
61
  const onSave = () => __awaiter(this, void 0, void 0, function* () {
70
62
  setIsSavedClicked(true);
71
63
  if (isPhoneValueCannotBeSaved)
@@ -81,7 +73,6 @@ export function CaseContactPhoneNumber() {
81
73
  setIsSavedClicked(false);
82
74
  setCasePhoneUpdating(false);
83
75
  ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
84
- setIsEditting(false);
85
76
  try {
86
77
  // update logged-in user contact info
87
78
  if (contactSSOName === loggedInUser.data.ssoUsername && !isEmpty(phoneLine) && !isEmpty(countryCode)) {
@@ -103,58 +94,47 @@ export function CaseContactPhoneNumber() {
103
94
  const onClear = () => __awaiter(this, void 0, void 0, function* () {
104
95
  setLocalFullPhoneState('');
105
96
  setLocalCountryCodeState('');
97
+ setCasePhoneUpdating(true);
98
+ try {
99
+ yield updateCaseDetails(caseDispatch, caseNumber, {
100
+ phoneCountryCode: '',
101
+ phoneAreaCodePrefixLineNumber: '',
102
+ clearPhoneNumber: true,
103
+ suppliedPhoneNumberVerified: 'False',
104
+ });
105
+ setCasePhoneUpdating(false);
106
+ ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
107
+ }
108
+ catch (e) {
109
+ setCasePhoneUpdating(false);
110
+ caseUpdateError.showError(e, t(`Phone number failed to update`));
111
+ }
106
112
  });
107
113
  const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
108
114
  limit: PHONE_LIMIT,
109
115
  });
110
- const isPhoneNeedsReview = !isEmpty(contactSSOName) &&
111
- contactSSOName === loggedInUser.data.ssoUsername &&
112
- suppliedPhoneNumberVerified === 'Deferred' &&
113
- !isCaseOwnerUpdating &&
114
- !isCasePhoneUpdating;
116
+ const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
117
+ // To check if country code is given but phone number empty
118
+ const isPhoneLineEmpty = !isEmpty(localFullPhoneState) && isEmpty(localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.replace(localCountryCodeState, ''));
119
+ const isPhoneNumberInvalid = isEmpty(localCountryCodeState) && !isEmpty(localFullPhoneState);
115
120
  const isPhoneNumberValid = (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT
116
121
  ? ValidatedOptions.error
117
122
  : isPhoneNeedsReview
118
123
  ? ValidatedOptions.warning
119
- : isSaveClicked &&
120
- (isPhoneLineEmpty || isPhoneNumberInvalid || isEmpty(trimAndReplacePlus(localCountryCodeState)))
124
+ : isSaveClicked && (isPhoneLineEmpty || isPhoneNumberInvalid)
121
125
  ? ValidatedOptions.error
122
126
  : invalid
123
127
  ? ValidatedOptions.error
124
128
  : ValidatedOptions.default;
125
- const isPhoneValueCannotBeSaved = isPhoneLineEmpty ||
126
- isPhoneNumberInvalid ||
127
- isEmpty(trimAndReplacePlus(localCountryCodeState)) ||
128
- trimAndReplacePlus(localFullPhoneState) === trimAndReplacePlus(localCountryCodeState);
129
+ const isPhoneValueCannotBeSaved = isPhoneLineEmpty || isPhoneNumberInvalid || localFullPhoneState.trim() === localCountryCodeState.trim();
130
+ // should be removed when old phone field is removed by CCM team
129
131
  useEffect(() => {
130
- if (isEqual(localFullPhoneState.trim(), '+')) {
131
- setLocalFullPhoneState('');
132
- }
133
- if (isEqual(localCountryCodeState.trim(), '+')) {
134
- setLocalCountryCodeState('');
135
- }
136
- // eslint-disable-next-line react-hooks/exhaustive-deps
137
- }, [localFullPhoneState]);
138
- const updatePhone = () => __awaiter(this, void 0, void 0, function* () {
139
132
  var _a, _b;
140
133
  if (isEmpty(phoneCountryCode) && isEmpty(phoneAreaCodePrefixLineNumber) && !isEmpty(phone)) {
141
134
  const oldPhoneline = ((_a = getPhoneObj(phone)) === null || _a === void 0 ? void 0 : _a.phoneLine) || '';
142
135
  const oldCountryCode = ((_b = getPhoneObj(phone)) === null || _b === void 0 ? void 0 : _b.countryCode) || '';
143
136
  if (!isEmpty(oldPhoneline.trim()) && !isEmpty(trimAndReplacePlus(oldCountryCode))) {
144
137
  setLocalFullPhoneState(oldCountryCode + ' ' + oldPhoneline);
145
- setLocalCountryCodeState(oldCountryCode);
146
- setCasePhoneUpdating(true);
147
- try {
148
- yield updateCaseDetails(caseDispatch, caseNumber, {
149
- phoneCountryCode: oldCountryCode,
150
- phoneAreaCodePrefixLineNumber: oldPhoneline,
151
- });
152
- setCasePhoneUpdating(false);
153
- }
154
- catch (e) {
155
- setCasePhoneUpdating(false);
156
- caseUpdateError.showError(e, t(`Phone number failed to update`));
157
- }
158
138
  }
159
139
  else {
160
140
  setIsShowOldPhone(true);
@@ -164,40 +144,20 @@ export function CaseContactPhoneNumber() {
164
144
  setLocalFullPhoneState((phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber).trim());
165
145
  setIsShowOldPhone(false);
166
146
  }
167
- });
168
- // should be removed when old phone field is removed by CCM team
169
- useEffect(() => {
170
- updatePhone();
171
- // eslint-disable-next-line react-hooks/exhaustive-deps
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
147
  // eslint-disable-next-line react-hooks/exhaustive-deps
183
- }, [suppliedPhoneNumberVerified]);
148
+ }, []);
184
149
  return (React.createElement("div", { className: "form-group pf-v5-u-pb-md", style: { minWidth: '200px' } },
185
150
  React.createElement("h3", { className: `subheading subheading-sm ${isExportingPDF ? 'expand-input' : ''}` },
186
151
  React.createElement(Trans, null, "Case owner's phone number"),
187
- React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
188
152
  !isExportingPDF ? ContactPhoneNumberPopOver() : ''),
189
153
  React.createElement(InputGroupText, null,
190
- React.createElement(PhoneInput, { phoneValue: localFullPhoneState, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, isDisabled: isCasePhoneUpdating || isCaseOwnerUpdating || !isEditting, isLoading: isCasePhoneUpdating || isCaseOwnerUpdating, "data-tracking-id": "case-details-page-supplied-phone", invalid: invalid, setInvalid: setInvalid }),
191
- isEditting ? (React.createElement(React.Fragment, null,
192
- 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) ||
193
- (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT ||
194
- localFullPhoneState === phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber ||
195
- isCaseOwnerUpdating ||
196
- isCasePhoneUpdating, style: { display: isExportingPDF ? 'none' : '' } },
197
- React.createElement(CheckIcon, null)),
198
- 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) || isCaseOwnerUpdating || isCasePhoneUpdating, "aria-label": "Clear" },
199
- 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" },
200
- React.createElement(PencilAltIcon, null)))),
154
+ 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 }),
155
+ 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: (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT ||
156
+ localFullPhoneState === phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber ||
157
+ (isSaveClicked && isPhoneValueCannotBeSaved), style: { display: isExportingPDF ? 'none' : '' } },
158
+ React.createElement(CheckIcon, null)),
159
+ 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), "aria-label": "Clear" },
160
+ React.createElement(TimesIcon, { color: "#6A6E73" }))),
201
161
  !invalid &&
202
162
  (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) < PHONE_LIMIT &&
203
163
  !(isSaveClicked && isPhoneValueCannotBeSaved) &&
@@ -206,11 +166,9 @@ export function CaseContactPhoneNumber() {
206
166
  invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
207
167
  React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
208
168
  (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
209
- isSaveClicked && isPhoneLineEmpty && (React.createElement("p", { className: "form-instructions form-invalid" },
210
- React.createElement(Trans, null, PHONE_INSTRUCTION))),
211
- isSaveClicked && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
169
+ isSaveClicked && (isPhoneLineEmpty || localFullPhoneState.trim() === localCountryCodeState.trim()) && (React.createElement("p", { className: "form-instructions form-invalid" },
212
170
  React.createElement(Trans, null, PHONE_LINE_CANNOT_BE_EMPTY))),
213
- isSaveClicked && isEmpty(trimAndReplacePlus(localCountryCodeState)) && !isPhoneLineEmpty && (React.createElement("p", { className: "form-instructions form-invalid" },
171
+ isSaveClicked && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
214
172
  React.createElement(Trans, null, PHONE_IS_NOT_VALID))),
215
173
  isShowOldPhone && (React.createElement("p", { className: "form-instructions form-invalid" },
216
174
  React.createElement(Trans, null,
@@ -1 +1 @@
1
- {"version":3,"file":"CasePhoneNumberConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAUpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAuGxD"}
1
+ {"version":3,"file":"CasePhoneNumberConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAUpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,qBAoGxD"}
@@ -11,7 +11,6 @@ import { Alert, AlertVariant, Button, ButtonVariant } from '@patternfly/react-co
11
11
  import { ToastNotification } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { scrollIntoView } from '@rh-support/utils';
14
- import isEmpty from 'lodash/isEmpty';
15
14
  import isEqual from 'lodash/isEqual';
16
15
  import React, { useContext, useState } from 'react';
17
16
  import { Trans, useTranslation } from 'react-i18next';
@@ -23,11 +22,10 @@ import { PDFContext } from '../../PDFContainer';
23
22
  export function CaseContactPhoneNumberAlert(props) {
24
23
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
25
24
  const [isCaseUpdating, setCasUpdating] = useState(false);
26
- const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, isCaseOwnerUpdating, severity } = useCaseSelector((state) => ({
25
+ const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity } = useCaseSelector((state) => ({
27
26
  caseNumber: state.caseDetails.caseNumber,
28
27
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
29
28
  contactSSOName: state.caseDetails.contactSSOName,
30
- isCaseOwnerUpdating: state.isCaseOwnerUpdating,
31
29
  severity: state.caseDetails.severity,
32
30
  }), isEqual);
33
31
  const { t } = useTranslation();
@@ -49,10 +47,8 @@ export function CaseContactPhoneNumberAlert(props) {
49
47
  const goToPhoneField = () => {
50
48
  scrollIntoView(props.tabRef);
51
49
  };
52
- const isPhoneNeedsReview = !isEmpty(contactSSOName) &&
53
- contactSSOName === loggedInUser.data.ssoUsername &&
50
+ const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername &&
54
51
  suppliedPhoneNumberVerified === 'Deferred' &&
55
- !isCaseOwnerUpdating &&
56
52
  severity !== "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */; // we show another alert when sev is 1
57
53
  const NEW_OWNER_MSG = 'You are the new owner for this case. Is the new phone number correct?';
58
54
  if (!isPhoneNeedsReview)
@@ -1 +1 @@
1
- {"version":3,"file":"CasePhoneNumberSev1ConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAUpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAMD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,qBAuG5D"}
1
+ {"version":3,"file":"CasePhoneNumberSev1ConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAUpD,UAAU,MAAM;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAMD,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,qBAoG5D"}
@@ -11,7 +11,6 @@ import { Alert, AlertVariant, Button, ButtonVariant } from '@patternfly/react-co
11
11
  import { ToastNotification } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import { scrollIntoView } from '@rh-support/utils';
14
- import isEmpty from 'lodash/isEmpty';
15
14
  import isEqual from 'lodash/isEqual';
16
15
  import React, { useContext, useState } from 'react';
17
16
  import { Trans, useTranslation } from 'react-i18next';
@@ -27,12 +26,11 @@ On case detail page when case owner changes the sevirity to sev1, this alert wil
27
26
  export function CasePhoneNumberSev1ConfirmAlert(props) {
28
27
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
29
28
  const [isCaseUpdating, setCasUpdating] = useState(false);
30
- const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity, isCaseOwnerUpdating } = useCaseSelector((state) => ({
29
+ const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity } = useCaseSelector((state) => ({
31
30
  caseNumber: state.caseDetails.caseNumber,
32
31
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
33
32
  contactSSOName: state.caseDetails.contactSSOName,
34
33
  severity: state.caseDetails.severity,
35
- isCaseOwnerUpdating: state.isCaseOwnerUpdating,
36
34
  }), isEqual);
37
35
  const { t } = useTranslation();
38
36
  const caseDispatch = useCaseDispatch();
@@ -53,11 +51,9 @@ export function CasePhoneNumberSev1ConfirmAlert(props) {
53
51
  const goToPhoneField = () => {
54
52
  scrollIntoView(props.tabRef);
55
53
  };
56
- const isPhoneNeedsConfirm = !isEmpty(contactSSOName) &&
57
- contactSSOName === loggedInUser.data.ssoUsername &&
54
+ const isPhoneNeedsConfirm = contactSSOName === loggedInUser.data.ssoUsername &&
58
55
  severity === "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */ &&
59
- suppliedPhoneNumberVerified !== 'True' &&
60
- !isCaseOwnerUpdating;
56
+ suppliedPhoneNumberVerified !== 'True';
61
57
  const SEV1_MSG = 'This case severity is urgent. Please confirm the phone number we have on file is correct.';
62
58
  if (!isPhoneNeedsConfirm)
63
59
  return React.createElement(React.Fragment, null);
@@ -1 +1 @@
1
- {"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBAkhBxC"}
1
+ {"version":3,"file":"PostComment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/PostComment.tsx"],"names":[],"mappings":"AA8BA,OAAO,KAAwE,MAAM,OAAO,CAAC;AAQ7F,OAAO,EAAkB,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAsB5F,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACrC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,WAAW,EAAE,CAAC;CACjC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,qBA6hBxC"}
@@ -193,6 +193,7 @@ export function PostComment(props) {
193
193
  yield props.onCommentAdded();
194
194
  resetCommentSection();
195
195
  ToastNotification.addSuccessMessage(t('Comment submitted'));
196
+ setCssCommentAgreed(false);
196
197
  }
197
198
  catch (e) {
198
199
  caseUpdateError.showError(e, t('Could not submit comment'));
@@ -334,7 +335,11 @@ export function PostComment(props) {
334
335
  isUploadingFile: isMarkdownFileUploadInProgress,
335
336
  onClipboardPaste,
336
337
  } }),
337
- isConfirmedStateSideSupport && (React.createElement(Checkbox, { id: "css-case-comment-agreement", name: "css-case-comment-agreement", "data-tracking-id": "css-case-comment-agreement", className: "pf-v5-u-mt-md pf-v5-u-mb-xl", isRequired: true, label: t('I will not transmit controlled, unclassified information to or export it from the Red Hat Customer Portal.'), isChecked: cssCommentAgreed, onChange: (_, c) => setCssCommentAgreed(c) })),
338
+ isConfirmedStateSideSupport && (React.createElement("div", { className: "pf-v5-u-mt-md pf-v5-u-mb-lg" },
339
+ React.createElement("input", { type: "checkbox", id: "css-case-comment-agreement", name: "css-case-comment-agreement", "data-tracking-id": "css-case-comment-agreement", checked: cssCommentAgreed, onChange: (e) => setCssCommentAgreed(e.target.checked) }),
340
+ React.createElement("label", { htmlFor: "css-case-comment-agreement", className: "pf-v5-u-font-weight-normal pf-v5-u-font-size-sm" },
341
+ React.createElement(Trans, null, "I will not transmit controlled unclassified information to or export it from the Red Hat Customer Portal."),
342
+ React.createElement("span", { className: "form-required", "aria-hidden": "true" }, "*")))),
338
343
  isProcessing ? (React.createElement(LoadingIndicator, { isInline: true, size: "sm" })) : (React.createElement("div", { className: "pf-v5-l-flex post-comment-btn-group push-top-narrow" },
339
344
  isModalOpen && loggedInUserRights.data.isInternal() && isPublic && (React.createElement(VerifyCaseStatusModal, { onClose: onCancel, onConfirm: onConfirm, isUpdating: isPostingComment, caseNumber: props.caseNumber })),
340
345
  React.createElement(Button, { "data-tracking-id": "postcomment-submit-button", type: "button", variant: ButtonVariant.primary, onClick: loggedInUser.data.isInternal && isPublic ? onBtnClick : isNotInternalConfirm, isDisabled: isSubmitDisabled, className: "postcomment-submit" },
@@ -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,sBA8KjC"}
1
+ {"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,wBAAgB,kBAAkB,sBA4JjC"}
@@ -4,7 +4,6 @@ import { GlobalMetadataStateContext } from '@rh-support/react-context';
4
4
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
5
5
  import isEmpty from 'lodash/isEmpty';
6
6
  import isEqual from 'lodash/isEqual';
7
- import isUndefined from 'lodash/isUndefined';
8
7
  import React, { useContext, useEffect, useState } from 'react';
9
8
  import { Trans, useTranslation } from 'react-i18next';
10
9
  import { PHONE_INSTRUCTION, PHONE_IS_NOT_VALID, PHONE_LINE_CANNOT_BE_EMPTY, PHONE_NO_CHAR_ERROR, } from '../../constants/caseDetailsConstants';
@@ -12,27 +11,28 @@ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
12
11
  import { RouteContext } from '../../context/RouteContext';
13
12
  import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
14
13
  import { setCaseDetails } from '../../reducers/CaseReducer';
15
- import { PDFContext } from '../CaseEditView/PDFContainer';
16
14
  import { trimAndReplacePlus } from '../shared/utils';
17
15
  import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
18
16
  export function ContactPhoneNumber() {
19
- const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', isExistingPhoneNumber, } = useCaseSelector((state) => ({
17
+ const { suppliedPhoneNumberVerified, severity, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', } = useCaseSelector((state) => ({
20
18
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
19
+ severity: state.caseDetails.severity,
21
20
  phoneCountryCode: state.caseDetails.phoneCountryCode,
22
21
  phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
23
- isExistingPhoneNumber: state.isExistingPhoneNumber,
24
22
  }), isEqual);
25
23
  const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
26
24
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
27
25
  const [invalid, setInvalid] = useState(false);
28
26
  const [localFullPhone, setLocalFullPhone] = useState(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
29
- const { isExportingPDF } = useContext(PDFContext);
30
27
  const canChangeAccountInfo = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ACCOUNT_AND_OWNER);
31
28
  const getPhone = () => phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber;
32
29
  const caseDispatch = useCaseDispatch();
33
30
  const { t } = useTranslation();
34
31
  const onPhoneChange = (fullPhone) => {
35
32
  setLocalFullPhone(fullPhone);
33
+ if (isEmpty(fullPhone)) {
34
+ setInvalid(false);
35
+ }
36
36
  setCaseDetails(caseDispatch, {
37
37
  phoneAreaCodePrefixLineNumber: getPhoneObj(fullPhone).phoneLine,
38
38
  phoneCountryCode: getPhoneObj(fullPhone).countryCode,
@@ -44,27 +44,19 @@ export function ContactPhoneNumber() {
44
44
  const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
45
45
  limit: PHONE_LIMIT,
46
46
  });
47
+ const isPhoneNumberInvalid = isEmpty(trimAndReplacePlus(phoneCountryCode)) && !isEmpty(phoneAreaCodePrefixLineNumber.trim());
47
48
  // To check if country code is given but phone number empty
48
- const isPhoneNumberInvalid = !isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
49
- isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
50
- const isPhoneNumberEmpty = isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
49
+ const isPhoneNumberEmpty = !isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
51
50
  isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
52
- const isPhoneNumberValid = !isEmpty(phoneAreaCodePrefixLineNumber) &&
53
- !isNextBtnClickedToShowValidationError &&
54
- isExistingPhoneNumber &&
55
- !isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
56
- (isEqual(suppliedPhoneNumberVerified, 'False') || isUndefined(suppliedPhoneNumberVerified))
57
- ? ValidatedOptions.warning
58
- : getPhone().length > PHONE_LIMIT
59
- ? ValidatedOptions.error
60
- : isNextBtnClickedToShowValidationError &&
61
- (isPhoneNumberEmpty || isPhoneNumberInvalid || isEmpty(trimAndReplacePlus(phoneCountryCode)))
51
+ const isPhoneNumberValid = getPhone().length > PHONE_LIMIT
52
+ ? ValidatedOptions.error
53
+ : severity === "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */ && isEmpty(suppliedPhoneNumberVerified)
54
+ ? ValidatedOptions.warning
55
+ : isNextBtnClickedToShowValidationError && (isPhoneNumberEmpty || isPhoneNumberInvalid)
62
56
  ? ValidatedOptions.error
63
- : isNextBtnClickedToShowValidationError && !isPhoneNumberEmpty
64
- ? ValidatedOptions.success
65
- : invalid
66
- ? ValidatedOptions.error
67
- : ValidatedOptions.default;
57
+ : invalid
58
+ ? ValidatedOptions.error
59
+ : ValidatedOptions.default;
68
60
  useEffect(() => {
69
61
  // when canChangeAccountInfo is false OwnerSelector is hidden
70
62
  // need to set phone on load here instead of OwnerSelector
@@ -73,6 +65,7 @@ export function ContactPhoneNumber() {
73
65
  setCaseDetails(caseDispatch, {
74
66
  phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
75
67
  phoneCountryCode: loggedInUser.data.supportPhoneCountryCode,
68
+ suppliedPhoneNumberVerified: 'True',
76
69
  });
77
70
  }
78
71
  else {
@@ -81,12 +74,13 @@ export function ContactPhoneNumber() {
81
74
  setCaseDetails(caseDispatch, {
82
75
  phoneAreaCodePrefixLineNumber: phoneLine,
83
76
  phoneCountryCode: countryCode,
77
+ suppliedPhoneNumberVerified: phoneLine && countryCode ? 'True' : 'False',
84
78
  });
85
79
  }
86
80
  }
87
81
  setLocalFullPhone(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
88
82
  // eslint-disable-next-line react-hooks/exhaustive-deps
89
- }, [phoneAreaCodePrefixLineNumber, phoneCountryCode, loggedInUser.data.phone]);
83
+ }, []);
90
84
  useEffect(() => {
91
85
  if (isEqual(localFullPhone.trim(), '+')) {
92
86
  setLocalFullPhone('');
@@ -99,24 +93,18 @@ export function ContactPhoneNumber() {
99
93
  return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
100
94
  React.createElement("label", null,
101
95
  React.createElement(Trans, null, "Case owner's phone number"),
102
- React.createElement("span", { className: `form-required ${isExportingPDF ? 'hide-in-pdf' : ''}`, "aria-hidden": true }, "*"),
103
96
  ContactPhoneNumberPopOver()),
104
97
  React.createElement(PhoneInput, { phoneValue: localFullPhone, onPhoneValueChange: onPhoneChange, onCountryCodeChange: onCountryCodeChange, validations: isPhoneNumberValid, invalid: invalid, setInvalid: setInvalid }),
105
98
  !invalid &&
106
99
  getPhone().length < PHONE_LIMIT &&
107
100
  !(isPhoneNumberEmpty && isNextBtnClickedToShowValidationError) &&
108
- !(isNextBtnClickedToShowValidationError &&
109
- (isPhoneNumberInvalid || isEmpty(trimAndReplacePlus(phoneCountryCode)))) && (React.createElement("p", { className: "form-instructions" },
101
+ !(isNextBtnClickedToShowValidationError && isPhoneNumberInvalid) && (React.createElement("p", { className: "form-instructions" },
110
102
  React.createElement(Trans, null, PHONE_INSTRUCTION))),
111
103
  invalid && (React.createElement("p", { className: "form-instructions form-invalid" },
112
104
  React.createElement(Trans, null, PHONE_NO_CHAR_ERROR))),
113
105
  getPhone().length > PHONE_LIMIT && (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)),
114
106
  isPhoneNumberEmpty && isNextBtnClickedToShowValidationError && (React.createElement("p", { className: "form-instructions form-invalid" },
115
- React.createElement(Trans, null, PHONE_INSTRUCTION))),
116
- isNextBtnClickedToShowValidationError && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
117
107
  React.createElement(Trans, null, PHONE_LINE_CANNOT_BE_EMPTY))),
118
- isNextBtnClickedToShowValidationError &&
119
- isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
120
- !isPhoneNumberEmpty && (React.createElement("p", { className: "form-instructions form-invalid" },
108
+ isNextBtnClickedToShowValidationError && isPhoneNumberInvalid && (React.createElement("p", { className: "form-instructions form-invalid" },
121
109
  React.createElement(Trans, null, PHONE_IS_NOT_VALID)))));
122
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContactPhoneNumberAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberAlert.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAQrD,wBAAgB,uBAAuB,sBAwFtC"}
1
+ {"version":3,"file":"ContactPhoneNumberAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberAlert.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAQrD,wBAAgB,uBAAuB,sBA0DtC"}
@@ -1,51 +1,29 @@
1
1
  import { Alert, AlertVariant, Button, ButtonVariant } from '@patternfly/react-core';
2
- import { GlobalMetadataStateContext } from '@rh-support/react-context';
3
2
  import isEmpty from 'lodash/isEmpty';
4
3
  import isEqual from 'lodash/isEqual';
5
- import isUndefined from 'lodash/isUndefined';
6
4
  import React, { useContext, useEffect } from 'react';
7
5
  import { Trans, useTranslation } from 'react-i18next';
8
6
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
9
- import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
7
+ import { setCaseDetails } from '../../reducers/CaseReducer';
10
8
  import { PDFContext } from '../CaseEditView/PDFContainer';
11
- import { trimAndReplacePlus } from '../shared/utils';
12
9
  export function ContactPhoneNumberAlert() {
13
10
  const { t } = useTranslation();
14
11
  const caseDispatch = useCaseDispatch();
15
- const { caseDetails, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', isExistingPhoneNumber, contactSSOName, } = useCaseSelector((state) => ({
12
+ const { caseDetails } = useCaseSelector((state) => ({
16
13
  caseDetails: state.caseDetails,
17
- phoneCountryCode: state.caseDetails.phoneCountryCode,
18
- phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
19
- isExistingPhoneNumber: state.isExistingPhoneNumber,
20
- contactSSOName: state.caseDetails.contactSSOName,
21
14
  }), isEqual);
22
- const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
23
15
  const { isExportingPDF } = useContext(PDFContext);
24
16
  const onCaseDetailsChange = (caseDetails) => {
25
17
  setCaseDetails(caseDispatch, caseDetails);
26
- if (contactSSOName === loggedInUser.data.ssoUsername) {
27
- // edge case: when loggedInUser === contactSSOName while opening a case confirms or deffers the phone
28
- // we need to save the verification state globallly so that we don't show the phone review banner again
29
- // to the user where he changes it to another owner and then again assigns himself as the case owner
30
- setCaseState(caseDispatch, {
31
- hasLoggedInUserConfirmedPhoneNumber: caseDetails.suppliedPhoneNumberVerified,
32
- });
33
- }
34
18
  };
35
- const isPhoneNumberEmpty = isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
36
- isEmpty(phoneAreaCodePrefixLineNumber === null || phoneAreaCodePrefixLineNumber === void 0 ? void 0 : phoneAreaCodePrefixLineNumber.replace(phoneCountryCode, ''));
37
19
  useEffect(() => {
38
- if (isPhoneNumberEmpty && !caseDetails.suppliedPhoneNumberVerified) {
20
+ if (caseDetails.severity === "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */ && !caseDetails.suppliedPhoneNumberVerified) {
39
21
  onCaseDetailsChange({ suppliedPhoneNumberVerified: undefined });
40
22
  }
41
23
  // eslint-disable-next-line react-hooks/exhaustive-deps
42
- }, []);
43
- const showAlert = (isEqual(caseDetails.suppliedPhoneNumberVerified, 'False') ||
44
- isUndefined(caseDetails.suppliedPhoneNumberVerified)) &&
45
- !isEmpty(caseDetails.phoneAreaCodePrefixLineNumber) &&
46
- !isEmpty(trimAndReplacePlus(phoneCountryCode)) &&
47
- isExistingPhoneNumber;
48
- if (!showAlert)
24
+ }, [caseDetails.severity]);
25
+ const hideAlert = caseDetails.severity !== "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */ || !isEmpty(caseDetails.suppliedPhoneNumberVerified);
26
+ if (hideAlert)
49
27
  return React.createElement(React.Fragment, null);
50
28
  return (React.createElement(Alert, { className: `form-group ${isExportingPDF ? 'hide-in-pdf' : ''}`, isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
51
29
  React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm" },
@@ -53,5 +31,5 @@ export function ContactPhoneNumberAlert() {
53
31
  React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'Deferred' }), "data-tracking-id": "case-contact-phone-number-dont-know" },
54
32
  React.createElement(Trans, null, "I don't know")),
55
33
  ] },
56
- React.createElement(Trans, null, "Please confirm the phone number we have on file is correct.")));
34
+ React.createElement(Trans, null, "You are opening an urgent severity case, please confirm the phone number we have on file is correct.")));
57
35
  }
@@ -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,qBA8R9B;kBA9RQ,QAAQ;;;AAgSjB,eAAe,QAAQ,CAAC"}
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,qBA+R9B;kBA/RQ,QAAQ;;;AAiSjB,eAAe,QAAQ,CAAC"}
@@ -49,6 +49,7 @@ function Severity(props) {
49
49
  const updateState = (value) => {
50
50
  const casePayload = {
51
51
  severity: value,
52
+ suppliedPhoneNumberVerified: undefined, // Restore Initial State If Severity Changes
52
53
  };
53
54
  // .. change fts on sev change only while creating case or when we change to sev1
54
55
  !isOnCaseDetailsPage && (casePayload.fts = showFtsOnCreateCasePage(entitlementSla, value));
@@ -147,7 +147,7 @@ export function SessionRestore(props) {
147
147
  };
148
148
  // PCM-12337 - Moved the session patch call to submit case function in CaseReducer.ts
149
149
  const newSessionDetails = getSessionDetailsFromCase(caseDetails, selectedNotificationContacts);
150
- if (isEqual(newSessionDetails, relevantSession === null || relevantSession === void 0 ? void 0 : relevantSession.sessionDetails))
150
+ if (isEqual(newSessionDetails, relevantSession.sessionDetails))
151
151
  return;
152
152
  updateSession(sessionRestoreDispatch, sessionRestore.activeSessionId, newSessionDetails, session);
153
153
  }, [
@@ -30,18 +30,18 @@ export function getChangedValueTooltip(valueNameCb, accessor) {
30
30
  export const isPhoneValid = (countryCode, phoneLine) => {
31
31
  const regex = /^[\d ()+-]+$/;
32
32
  const phoneIncludesCorrectChars = phoneLine ? regex.test(phoneLine.replace(countryCode, '')) : true;
33
+ // To validate case state if country code and phoneline both are available
34
+ // or none of them are available (xor)
35
+ const isCountryCodeFollowsByPhone = isEmpty(trimAndReplacePlus(countryCode)) === isEmpty(phoneLine === null || phoneLine === void 0 ? void 0 : phoneLine.trim()) ? true : false;
33
36
  const phoneLength = ((countryCode === null || countryCode === void 0 ? void 0 : countryCode.length) || 0) + ((phoneLine === null || phoneLine === void 0 ? void 0 : phoneLine.length) || 0) + 1;
34
37
  const hasSuppliedPhoneValidLength = phoneLength <= PHONE_LIMIT;
35
- return (hasSuppliedPhoneValidLength &&
36
- phoneIncludesCorrectChars &&
37
- !isEmpty(trimAndReplacePlus(countryCode)) &&
38
- !isEmpty(phoneLine === null || phoneLine === void 0 ? void 0 : phoneLine.trim()));
38
+ return isCountryCodeFollowsByPhone && hasSuppliedPhoneValidLength && phoneIncludesCorrectChars;
39
39
  };
40
40
  export const trimAndReplacePlus = (value) => {
41
41
  var _a;
42
42
  if (!value)
43
43
  return '';
44
- return (_a = value === null || value === void 0 ? void 0 : value.trim()) === null || _a === void 0 ? void 0 : _a.replace('+', '');
44
+ return (_a = value.trim()) === null || _a === void 0 ? void 0 : _a.replace('+', '');
45
45
  };
46
46
  export const getProductObj = (products, product) => {
47
47
  const productIndex = findIndex(products, (p) => p.product === product);
@@ -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,qBA+WtD"}
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,qBAqWtD"}
@@ -168,14 +168,6 @@ export function GlobalTroubleshootEffects(props) {
168
168
  useEffect(() => {
169
169
  // 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.
170
170
  // Hence, we are going to honor `supportPhoneAreaCodePrefixLineNumber` and `supportPhoneCountryCode` for it.
171
- if ((!isEmpty(loggedInUser.data.supportPhoneCountryCode) &&
172
- !isEmpty(loggedInUser.data.supportPhoneAreaCodePrefixLineNumber)) ||
173
- !isEmpty(loggedInUser.data.phone)) {
174
- setCaseState(caseDispatch, { isExistingPhoneNumber: true });
175
- }
176
- else {
177
- setCaseState(caseDispatch, { isExistingPhoneNumber: false });
178
- }
179
171
  setCaseDetails(caseDispatch, {
180
172
  phone: loggedInUser.data.phone,
181
173
  phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
@@ -210,8 +210,6 @@ export interface ICaseState {
210
210
  caseNoOfCreatedCase?: string;
211
211
  isPostingRemoteRequestCommentCompleted?: boolean;
212
212
  isPostingRemoteRequestCommentCompletedErrorMessage?: string | undefined;
213
- isExistingPhoneNumber?: boolean;
214
- hasLoggedInUserConfirmedPhoneNumber?: 'True' | 'False' | 'Deferred' | undefined;
215
213
  }
216
214
  export interface ICreateCasePayloadType extends ICaseState {
217
215
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,E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AAE,OAAO,CAAC;IAC5B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,SAAS,CAAC;IAC5B,0BAA0B,EAAE,OAAO,CAAC;IACpC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,oCAAoC,EAAE,OAAO,CAAC;IAC9C,sCAAsC,EAAE,OAAO,CAAC;IAChD,eAAe,EAAE,mBAAmB,CAAC,gBAAgB,EAAE,CAAC,CAAC;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0BAA0B,EAAE,OAAO,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,sCAAsC,CAAC,EAAE,OAAO,CAAC;IACjD,kDAAkD,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3E;AAED,MAAM,WAAW,sBAAuB,SAAQ,UAAU;CAAG;AAC7D,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,MAAM,MAAM,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC"}
@@ -204,8 +204,6 @@ export const initialCaseState = {
204
204
  caseNoOfCreatedCase: '',
205
205
  isPostingRemoteRequestCommentCompleted: false,
206
206
  isPostingRemoteRequestCommentCompletedErrorMessage: '',
207
- isExistingPhoneNumber: false,
208
- hasLoggedInUserConfirmedPhoneNumber: 'False',
209
207
  };
210
208
  export const ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967811';
211
209
  export const NON_ORG_ADMIN_SEND_NOTIFCATION_KBASE_LINK = 'https://access.redhat.com/articles/5967831';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.118",
3
+ "version": "2.2.120",
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.59",
64
- "@rh-support/react-context": "2.1.65",
63
+ "@rh-support/components": "2.1.60",
64
+ "@rh-support/react-context": "2.1.67",
65
65
  "@rh-support/types": "2.0.3",
66
66
  "@rh-support/user-permissions": "2.1.43",
67
67
  "@rh-support/utils": "2.1.33",
@@ -131,5 +131,5 @@
131
131
  "defaults and supports es6-module",
132
132
  "maintained node versions"
133
133
  ],
134
- "gitHead": "deab4dee0be1771b098bd0260da67743c8f2a804"
134
+ "gitHead": "d0800f64f5543b6f26b111bd7f179a8277e32456"
135
135
  }