@rh-support/troubleshoot 2.2.113 → 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.
- package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +4 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +6 -4
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/{CasePhoneNumberSev1ConfirmAlert.d.ts → CasePhoneNumberTopConfirmAlert.d.ts} +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberTopConfirmAlert.d.ts.map +1 -0
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/{CasePhoneNumberSev1ConfirmAlert.js → CasePhoneNumberTopConfirmAlert.js} +11 -7
- package/package.json +2 -2
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts.map +0 -1
|
@@ -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 {
|
|
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(
|
|
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,
|
|
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
|
|
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 {
|
|
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(
|
|
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),
|
package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CasePhoneNumberConfirmAlert.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.tsx"],"names":[],"mappings":"
|
|
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,
|
|
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
|
-
|
|
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
|
|
51
|
+
const isPhoneNeedsReview = !isEmpty(contactSSOName) &&
|
|
52
|
+
contactSSOName === loggedInUser.data.ssoUsername &&
|
|
51
53
|
suppliedPhoneNumberVerified === 'Deferred' &&
|
|
52
|
-
|
|
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
|
|
7
|
+
export declare function CasePhoneNumberTopConfirmAlert(props: IProps): React.JSX.Element;
|
|
8
8
|
export {};
|
|
9
|
-
//# sourceMappingURL=
|
|
9
|
+
//# sourceMappingURL=CasePhoneNumberTopConfirmAlert.d.ts.map
|
package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberTopConfirmAlert.d.ts.map
ADDED
|
@@ -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
|
|
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
|
|
56
|
+
const isPhoneNeedsConfirm = !isEmpty(contactSSOName) &&
|
|
57
|
+
contactSSOName === loggedInUser.data.ssoUsername &&
|
|
55
58
|
severity === "1 (Urgent)" /* SeverityLevelsInternal.SEV_1 */ &&
|
|
56
|
-
suppliedPhoneNumberVerified !== 'True'
|
|
57
|
-
|
|
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,
|
|
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,
|
|
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.
|
|
3
|
+
"version": "2.2.114",
|
|
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": "0fa0968e831c199572669184c466e9fecd781d12"
|
|
135
135
|
}
|
package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberSev1ConfirmAlert.d.ts.map
DELETED
|
@@ -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"}
|