@rh-support/troubleshoot 2.2.112 → 2.2.114

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.
@@ -28,7 +28,7 @@ import { ReopenCaseModal } from '../ConfirmationModals/ReopenCaseModal';
28
28
  import { PDFContext } from '../PDFContainer';
29
29
  import { CaseInformation } from '../Tabs/CaseDetails/CaseInformation';
30
30
  import { CaseContactPhoneNumberAlert } from '../Tabs/CaseDetails/CasePhoneNumberConfirmAlert';
31
- import { CasePhoneNumberSev1ConfirmAlert } from '../Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert';
31
+ import { CasePhoneNumberTopConfirmAlert } from '../Tabs/CaseDetails/CasePhoneNumberTopConfirmAlert';
32
32
  import Summary from '../Tabs/CaseDetails/Summary';
33
33
  import CaseOwnerInfo from './CaseOwnerInfo';
34
34
  import CaseStatus from './CaseStatus';
@@ -240,7 +240,7 @@ export default function CaseOverview(props) {
240
240
  React.createElement("p", { className: "pf-v5-u-mb-sm" },
241
241
  React.createElement(Trans, null, "The customer has received two warnings regarding inactivity. This case will be closed soon if we don't receive any input."))) })))),
242
242
  React.createElement(CaseContactPhoneNumberAlert, { isReview: true, tabRef: props.tabsRef }),
243
- React.createElement(CasePhoneNumberSev1ConfirmAlert, { isReview: true, tabRef: props.tabsRef }),
243
+ React.createElement(CasePhoneNumberTopConfirmAlert, { isReview: true, tabRef: props.tabsRef }),
244
244
  React.createElement("header", null,
245
245
  React.createElement("h2", { className: "case-ID" },
246
246
  React.createElement(Trans, null, "Case"),
@@ -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,sBA+QrC"}
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,sBAkRrC"}
@@ -107,7 +107,10 @@ export function CaseContactPhoneNumber() {
107
107
  const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} digits.', {
108
108
  limit: PHONE_LIMIT,
109
109
  });
110
- const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
110
+ const isPhoneNeedsReview = !isEmpty(contactSSOName) &&
111
+ contactSSOName === loggedInUser.data.ssoUsername &&
112
+ suppliedPhoneNumberVerified === 'Deferred' &&
113
+ !isCaseOwnerUpdating;
111
114
  const isPhoneNumberValid = (localFullPhoneState === null || localFullPhoneState === void 0 ? void 0 : localFullPhoneState.length) > PHONE_LIMIT
112
115
  ? ValidatedOptions.error
113
116
  : isPhoneNeedsReview
@@ -14,7 +14,7 @@ import { ShareWithPartner } from '../../ShareCase/PartnerShare';
14
14
  import { CaseContactPhoneNumber } from './CaseContactPhoneNumber';
15
15
  import CaseInternalStatus from './CaseInternalStatus';
16
16
  import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
17
- import { CasePhoneNumberSev1ConfirmAlert } from './CasePhoneNumberSev1ConfirmAlert';
17
+ import { CasePhoneNumberTopConfirmAlert } from './CasePhoneNumberTopConfirmAlert';
18
18
  import CaseReferenceNumber from './CaseReferenceNumber';
19
19
  import CaseSbrGroups from './CaseSbrGroups';
20
20
  export default function CaseDetailsManagement(props) {
@@ -39,7 +39,7 @@ export default function CaseDetailsManagement(props) {
39
39
  React.createElement(FlexItem, { flex: { default: 'flex_1' } },
40
40
  React.createElement(CaseContactPhoneNumber, null))),
41
41
  React.createElement(CaseContactPhoneNumberAlert, { isConfirm: true }),
42
- React.createElement(CasePhoneNumberSev1ConfirmAlert, { isConfirm: true }),
42
+ React.createElement(CasePhoneNumberTopConfirmAlert, { isConfirm: true }),
43
43
  canSeeInternalStatus && React.createElement(CaseInternalStatus, null),
44
44
  canSeeSBRGroups && React.createElement(CaseSbrGroups, null),
45
45
  React.createElement(CaseGroup, null),
@@ -1 +1 @@
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"}
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;AASpD,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,qBAqGxD"}
@@ -11,6 +11,7 @@ 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';
14
15
  import isEqual from 'lodash/isEqual';
15
16
  import React, { useContext, useState } from 'react';
16
17
  import { Trans, useTranslation } from 'react-i18next';
@@ -22,11 +23,11 @@ import { PDFContext } from '../../PDFContainer';
22
23
  export function CaseContactPhoneNumberAlert(props) {
23
24
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
24
25
  const [isCaseUpdating, setCasUpdating] = useState(false);
25
- const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity } = useCaseSelector((state) => ({
26
+ const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, isCaseOwnerUpdating } = useCaseSelector((state) => ({
26
27
  caseNumber: state.caseDetails.caseNumber,
27
28
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
28
29
  contactSSOName: state.caseDetails.contactSSOName,
29
- severity: state.caseDetails.severity,
30
+ isCaseOwnerUpdating: state.isCaseOwnerUpdating,
30
31
  }), isEqual);
31
32
  const { t } = useTranslation();
32
33
  const caseDispatch = useCaseDispatch();
@@ -47,9 +48,10 @@ export function CaseContactPhoneNumberAlert(props) {
47
48
  const goToPhoneField = () => {
48
49
  scrollIntoView(props.tabRef);
49
50
  };
50
- const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername &&
51
+ const isPhoneNeedsReview = !isEmpty(contactSSOName) &&
52
+ contactSSOName === loggedInUser.data.ssoUsername &&
51
53
  suppliedPhoneNumberVerified === 'Deferred' &&
52
- severity !== "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */; // we show another alert when sev is 1
54
+ !isCaseOwnerUpdating;
53
55
  const NEW_OWNER_MSG = 'You are the new owner for this case. Is the new phone number correct?';
54
56
  if (!isPhoneNeedsReview)
55
57
  return React.createElement(React.Fragment, null);
@@ -4,6 +4,6 @@ interface IProps {
4
4
  isConfirm?: boolean;
5
5
  tabRef?: React.MutableRefObject<HTMLDivElement>;
6
6
  }
7
- export declare function CasePhoneNumberSev1ConfirmAlert(props: IProps): React.JSX.Element;
7
+ export declare function CasePhoneNumberTopConfirmAlert(props: IProps): React.JSX.Element;
8
8
  export {};
9
- //# sourceMappingURL=CasePhoneNumberSev1ConfirmAlert.d.ts.map
9
+ //# sourceMappingURL=CasePhoneNumberTopConfirmAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CasePhoneNumberTopConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberTopConfirmAlert.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,8BAA8B,CAAC,KAAK,EAAE,MAAM,qBAuG3D"}
@@ -11,6 +11,7 @@ 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';
14
15
  import isEqual from 'lodash/isEqual';
15
16
  import React, { useContext, useState } from 'react';
16
17
  import { Trans, useTranslation } from 'react-i18next';
@@ -23,14 +24,15 @@ import { PDFContext } from '../../PDFContainer';
23
24
  On case detail page when case owner changes the sevirity to sev1, this alert will be displayed
24
25
  // what happens when partner changes ???
25
26
  */
26
- export function CasePhoneNumberSev1ConfirmAlert(props) {
27
+ export function CasePhoneNumberTopConfirmAlert(props) {
27
28
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
28
29
  const [isCaseUpdating, setCasUpdating] = useState(false);
29
- const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity } = useCaseSelector((state) => ({
30
+ const { caseNumber, suppliedPhoneNumberVerified, contactSSOName, severity, isCaseOwnerUpdating } = useCaseSelector((state) => ({
30
31
  caseNumber: state.caseDetails.caseNumber,
31
32
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
32
33
  contactSSOName: state.caseDetails.contactSSOName,
33
34
  severity: state.caseDetails.severity,
35
+ isCaseOwnerUpdating: state.isCaseOwnerUpdating,
34
36
  }), isEqual);
35
37
  const { t } = useTranslation();
36
38
  const caseDispatch = useCaseDispatch();
@@ -51,10 +53,12 @@ export function CasePhoneNumberSev1ConfirmAlert(props) {
51
53
  const goToPhoneField = () => {
52
54
  scrollIntoView(props.tabRef);
53
55
  };
54
- const isPhoneNeedsConfirm = contactSSOName === loggedInUser.data.ssoUsername &&
56
+ const isPhoneNeedsConfirm = !isEmpty(contactSSOName) &&
57
+ contactSSOName === loggedInUser.data.ssoUsername &&
55
58
  severity === "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */ &&
56
- suppliedPhoneNumberVerified !== 'True';
57
- const SEV1_MSG = 'This case severity is urgent. Please confirm the phone number we have on file is correct.';
59
+ suppliedPhoneNumberVerified !== 'True' &&
60
+ !isCaseOwnerUpdating;
61
+ const SEV_MSG = 'Please confirm the phone number we have on file is correct.';
58
62
  if (!isPhoneNeedsConfirm)
59
63
  return React.createElement(React.Fragment, null);
60
64
  return (React.createElement(React.Fragment, null, props.isReview && !isExportingPDF ? (React.createElement(Alert, { className: "pf-v5-u-mb-md", isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), component: "p", actionLinks: [
@@ -63,9 +67,9 @@ export function CasePhoneNumberSev1ConfirmAlert(props) {
63
67
  }, onClick: () => goToPhoneField(), "data-tracking-id": "case-contact-phone-number-review" },
64
68
  React.createElement(Trans, null, "Review phone number")),
65
69
  ] },
66
- React.createElement(Trans, null, SEV1_MSG))) : props.isConfirm && !isExportingPDF ? (React.createElement(Alert, { isInline: true, className: "pf-v5-u-mb-md", variant: AlertVariant.warning, title: t('Review phone number'), component: "p", actionLinks: [
70
+ React.createElement(Trans, null, SEV_MSG))) : props.isConfirm && !isExportingPDF ? (React.createElement(Alert, { isInline: true, className: "pf-v5-u-mb-md", variant: AlertVariant.warning, title: t('Review phone number'), component: "p", actionLinks: [
67
71
  React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm", isLoading: isCaseUpdating, isDisabled: isCaseUpdating },
68
72
  React.createElement(Trans, null, "Confirm phone number")),
69
73
  ] },
70
- React.createElement(Trans, null, SEV1_MSG))) : (React.createElement(React.Fragment, null))));
74
+ React.createElement(Trans, null, SEV_MSG))) : (React.createElement(React.Fragment, null))));
71
75
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.112",
3
+ "version": "2.2.114",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -25,7 +25,7 @@
25
25
  "lib/**/*"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@cee-eng/hydrajs": "4.17.14",
28
+ "@cee-eng/hydrajs": "4.17.15",
29
29
  "@cee-eng/ui-toolkit": "1.1.8",
30
30
  "@patternfly/patternfly": "5.1.0",
31
31
  "@patternfly/react-core": "5.1.1",
@@ -51,7 +51,7 @@
51
51
  "react-virtualized": "^9.22.5"
52
52
  },
53
53
  "dependencies": {
54
- "@cee-eng/hydrajs": "4.17.14",
54
+ "@cee-eng/hydrajs": "4.17.15",
55
55
  "@cee-eng/ui-toolkit": "1.1.8",
56
56
  "@patternfly/patternfly": "5.1.0",
57
57
  "@patternfly/react-core": "5.1.1",
@@ -60,11 +60,11 @@
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.57",
64
- "@rh-support/react-context": "2.1.63",
63
+ "@rh-support/components": "2.1.58",
64
+ "@rh-support/react-context": "2.1.64",
65
65
  "@rh-support/types": "2.0.3",
66
- "@rh-support/user-permissions": "2.1.41",
67
- "@rh-support/utils": "2.1.31",
66
+ "@rh-support/user-permissions": "2.1.42",
67
+ "@rh-support/utils": "2.1.32",
68
68
  "@types/react-redux": "^7.1.33",
69
69
  "@types/redux": "^3.6.0",
70
70
  "dompurify": "^2.2.6",
@@ -131,5 +131,5 @@
131
131
  "defaults and supports es6-module",
132
132
  "maintained node versions"
133
133
  ],
134
- "gitHead": "a14a54b8200576c50adceffa69700a795a434cfe"
134
+ "gitHead": "0fa0968e831c199572669184c466e9fecd781d12"
135
135
  }
@@ -1 +0,0 @@
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"}