@rh-support/troubleshoot 1.0.49 → 1.0.50

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 (51) hide show
  1. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/OwnerSelector.js +36 -3
  3. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/Case.js +4 -3
  5. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts +2 -0
  6. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +2 -2
  8. package/lib/esm/components/CaseEditView/CaseDetailsWarningMessage.js +1 -1
  9. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts +2 -0
  10. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  11. package/lib/esm/components/CaseEditView/CaseOverview/index.js +2 -0
  12. package/lib/esm/components/CaseEditView/CaseSecureSupportAlert.d.ts.map +1 -1
  13. package/lib/esm/components/CaseEditView/CaseSecureSupportAlert.js +1 -1
  14. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts +2 -0
  15. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -0
  16. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +91 -0
  17. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts +2 -0
  18. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  19. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +9 -1
  20. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts +9 -0
  21. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.d.ts.map +1 -0
  22. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CasePhoneNumberConfirmAlert.js +62 -0
  23. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts +2 -0
  24. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -0
  25. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +45 -0
  26. package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.d.ts +2 -0
  27. package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.d.ts.map +1 -0
  28. package/lib/esm/components/CaseInformation/ContactPhoneNumberAlert.js +33 -0
  29. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts +2 -0
  30. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.d.ts.map +1 -0
  31. package/lib/esm/components/CaseInformation/ContactPhoneNumberPopOver.js +12 -0
  32. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  33. package/lib/esm/components/CaseManagement/CaseManagement.js +9 -1
  34. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  35. package/lib/esm/components/Review/Review.js +7 -1
  36. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  37. package/lib/esm/components/shared/useIsSectionValid.js +6 -3
  38. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  39. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +8 -0
  40. package/lib/esm/constants/caseDetailsConstants.d.ts +1 -0
  41. package/lib/esm/constants/caseDetailsConstants.d.ts.map +1 -1
  42. package/lib/esm/constants/caseDetailsConstants.js +1 -0
  43. package/lib/esm/css/app.css +5 -0
  44. package/lib/esm/reducers/CaseConstNTypes.d.ts +2 -0
  45. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  46. package/lib/esm/reducers/CaseConstNTypes.js +4 -0
  47. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  48. package/lib/esm/reducers/CaseHelpers.js +14 -3
  49. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  50. package/lib/esm/reducers/CaseReducer.js +2 -0
  51. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AA4BA,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,eA2NnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"OwnerSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/OwnerSelector.tsx"],"names":[],"mappings":"AA8BA,UAAU,MAAM;CAAG;AAEnB,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,eA8PnC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -7,6 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
+ import { contacts } from '@cee-eng/hydrajs';
10
11
  import { CaseContactsSelectorExternal, getHydraContactLabel, renderMenuItemChildren, ToastNotification, usePrevious, ValueChangedIcon, } from '@rh-support/components';
11
12
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
12
13
  import { sortHydraContacts } from '@rh-support/utils';
@@ -20,7 +21,7 @@ import { Trans, useTranslation } from 'react-i18next';
20
21
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
21
22
  import { RouteContext } from '../../context/RouteContext';
22
23
  import { useCaseUpdateErrorMessage } from '../../hooks/useCaseUpdateErrorMessage';
23
- import { setCaseOwner, setNotifiedUser, updateCaseDetails } from '../../reducers/CaseReducer';
24
+ import { setCaseDetails, setCaseOwner, setNotifiedUser, updateCaseDetails } from '../../reducers/CaseReducer';
24
25
  import { CaseValuesToWatch } from '../shared/Constants';
25
26
  import { getChangedValueTooltip } from '../shared/utils';
26
27
  function OwnerSelector(props) {
@@ -35,7 +36,7 @@ function OwnerSelector(props) {
35
36
  }), isEqual);
36
37
  const { routeState: { showValidationErrorAlert }, } = useContext(RouteContext);
37
38
  const caseDispatch = useCaseDispatch();
38
- const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
39
+ const { globalMetadataState: { loggedInUserRights, loggedInUser }, } = useContext(GlobalMetadataStateContext);
39
40
  const previousAccountNumber = usePrevious(accountNumber);
40
41
  const [isCaseOwnerUpdating, setCaseOwnerUpdating] = useState(false);
41
42
  const [usersWithGroupAccess, setUsersWithGroupAccess] = useState([]);
@@ -47,17 +48,48 @@ function OwnerSelector(props) {
47
48
  !isEmpty(pvalue.ssoUsername) &&
48
49
  value.ssoUsername !== pvalue.ssoUsername;
49
50
  const canEditCase = useCanEditCase();
51
+ const setContactPhoneNumber = (sso) => __awaiter(this, void 0, void 0, function* () {
52
+ if (sso === loggedInUser.data.ssoUsername) {
53
+ setCaseDetails(caseDispatch, {
54
+ phone: loggedInUser.data.phone,
55
+ suppliedPhoneNumberVerified: 'True',
56
+ });
57
+ }
58
+ else {
59
+ const selectedContact = yield contacts.getSFDCContactBySso(sso);
60
+ setCaseDetails(caseDispatch, {
61
+ phone: selectedContact.phone,
62
+ suppliedPhoneNumberVerified: 'Deferred',
63
+ });
64
+ }
65
+ });
66
+ const updateContactPhoneNumber = (sso) => __awaiter(this, void 0, void 0, function* () {
67
+ if (sso === loggedInUser.data.ssoUsername) {
68
+ yield updateCaseDetails(caseDispatch, caseNumber, {
69
+ phone: loggedInUser.data.phone,
70
+ suppliedPhoneNumberVerified: 'True',
71
+ });
72
+ }
73
+ else {
74
+ const selectedContact = yield contacts.getSFDCContactBySso(sso);
75
+ yield updateCaseDetails(caseDispatch, caseNumber, {
76
+ phone: selectedContact.phone,
77
+ suppliedPhoneNumberVerified: 'Deferred',
78
+ });
79
+ }
80
+ });
50
81
  /**
51
82
  * Changing selected owner related
52
83
  */
53
84
  const previousCaseOwner = usePrevious(selectedOwner.data.ssoUsername);
54
85
  const onOwnerChange = (selectedContact, prevCaseOwner, notificationContacts, dispatch, abortSignalCaseGroup, abortSignalEntitlements) => __awaiter(this, void 0, void 0, function* () {
55
- if (prevCaseOwner === selectedContact.ssoUsername)
86
+ if (prevCaseOwner === selectedContact.ssoUsername || isEmpty(selectedContact.ssoUsername))
56
87
  return;
57
88
  yield setCaseOwner(dispatch, selectedContact, '', abortSignalCaseGroup, abortSignalEntitlements, true);
58
89
  setLocalOwnerChange(true);
59
90
  !isEmpty(selectedContact) &&
60
91
  setNotifiedUser(dispatch, filter(notificationContacts, (c) => c.ssoUsername !== selectedContact.ssoUsername));
92
+ setContactPhoneNumber(selectedContact.ssoUsername);
61
93
  });
62
94
  /** Reset owner when selected account number changes */
63
95
  useEffect(() => {
@@ -103,6 +135,7 @@ function OwnerSelector(props) {
103
135
  setLocalOwnerChange(true);
104
136
  updateNotifyUsersList(newOwner);
105
137
  setCaseOwnerUpdating(false);
138
+ updateContactPhoneNumber(newOwner.ssoUsername);
106
139
  ToastNotification.addSuccessMessage(t(`Owner has been successfully updated`));
107
140
  }
108
141
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,eAuLzC"}
1
+ {"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,eA6LzC"}
@@ -4,7 +4,7 @@ import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@
4
4
  import { getUrlParsedParams, isValidCaseNumber } from '@rh-support/utils';
5
5
  import isEmpty from 'lodash/isEmpty';
6
6
  import isEqual from 'lodash/isEqual';
7
- import React, { useContext, useEffect } from 'react';
7
+ import React, { useContext, useEffect, useRef } from 'react';
8
8
  import { useTranslation } from 'react-i18next';
9
9
  import { Route, Switch, useLocation, useParams, useRouteMatch } from 'react-router-dom';
10
10
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
@@ -29,6 +29,7 @@ export default function Case(props) {
29
29
  const { caseNumber } = useParams();
30
30
  const queryParams = getUrlParsedParams(useLocation().search);
31
31
  const ability = useContext(AbilityContext);
32
+ const caseDetailsTabsRef = useRef(null);
32
33
  const canSeeFeedbackButtons = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_FEEDBACK_BUTTONS);
33
34
  const canReadCase = ability.can(resourceActions.READ, resources.CASE_DETAILS);
34
35
  const canSeeExternalTracker = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_EXTERNAL_TRACKER);
@@ -115,10 +116,10 @@ export default function Case(props) {
115
116
  (!isFetchingCaseDetails || !isEmpty(product)) &&
116
117
  !isFetchingCaseDetailsError && (React.createElement(React.Fragment, null,
117
118
  React.createElement(ErrorBoundary, { errorMsgInfo: t('There was an error loading cases. Please try refreshing the page.') },
118
- React.createElement(CaseOverview, { caseNumber: caseNumber })),
119
+ React.createElement(CaseOverview, { caseNumber: caseNumber, tabsRef: caseDetailsTabsRef })),
119
120
  React.createElement(Switch, null,
120
121
  React.createElement(Route, { path: `${path}/:activeTab?` },
121
- React.createElement(CaseDetailsTabs, { basePath: url, caseNumber: caseNumber, routeProps: props.routeProps }))))),
122
+ React.createElement(CaseDetailsTabs, { basePath: url, caseNumber: caseNumber, routeProps: props.routeProps, tabdRef: caseDetailsTabsRef }))))),
122
123
  React.createElement(HostnameAwarenessModal, null))),
123
124
  React.createElement(CaseDetailsAside, { caseNumber: caseNumber }),
124
125
  React.createElement(CaseDetailsModals, { caseNumber: caseNumber, isSecureSupport: loggedInUsersAccount.data.secureSupport })))))));
@@ -1,8 +1,10 @@
1
+ import React from 'react';
1
2
  import { RouteComponentProps } from 'react-router-dom';
2
3
  interface IProps {
3
4
  caseNumber: string;
4
5
  routeProps: RouteComponentProps;
5
6
  basePath: string;
7
+ tabdRef: React.MutableRefObject<HTMLDivElement>;
6
8
  }
7
9
  export declare function CaseDetailsTabs(props: IProps): JSX.Element;
8
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAwBlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;CACpB;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,eAiL5C"}
1
+ {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AAwBlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AACD,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,eAmL5C"}
@@ -59,7 +59,7 @@ export function CaseDetailsTabs(props) {
59
59
  key: 'case details',
60
60
  routePath: 'management',
61
61
  ref: managementTabRef,
62
- component: React.createElement(CaseDetailsManagement, { caseNumber: caseNumber, routeProps: props.routeProps }),
62
+ component: (React.createElement(CaseDetailsManagement, { caseNumber: caseNumber, routeProps: props.routeProps, tabRef: managementTabRef })),
63
63
  });
64
64
  canSeeBugZillas &&
65
65
  tabsToRender.push({
@@ -104,7 +104,7 @@ export function CaseDetailsTabs(props) {
104
104
  return tabIndex > -1 ? tabIndex : activeTabKey;
105
105
  };
106
106
  const isTabVisibleInPdfExport = (tab) => tab.title === CaseDetailsTabsEnum.DISCUSSION && pdfOption === 'Reduced' ? false : true;
107
- return (React.createElement("div", { className: "case-details-tabs" },
107
+ return (React.createElement("div", { className: "case-details-tabs", ref: props.tabdRef },
108
108
  React.createElement(Tabs, { className: "hide-in-pdf", activeKey: getActiveTabKey(), component: TabsComponent.nav, onSelect: handleTabClick }, tabsToRender.map((tab, index) => (React.createElement(Tab, { eventKey: index, tabContentRef: tab.ref, tabContentId: tab.key, key: tab.title, href: `#${props.basePath}/${tab.routePath}`, "data-tracking-id": tab['data-tracking-id'], title: React.createElement(TabTitleText, null,
109
109
  React.createElement(Trans, null, tab.title)) })))),
110
110
  React.createElement("div", { className: "case-details-tabs-content pf-u-pt-xl" }, tabsToRender.map((tab, index) => (React.createElement(TabContent, { eventKey: index, key: tab.key, id: tab.key, ref: tab.ref, "aria-label": tab.title, hidden: isExportingPDF ? !isTabVisibleInPdfExport(tab) : index !== getActiveTabKey() },
@@ -4,7 +4,7 @@ import { CaseSecureSupportAlert } from './CaseSecureSupportAlert';
4
4
  import { CaseSubscriptionAbuseAlert } from './CaseSubscriptionAbuseAlert';
5
5
  export function CaseDetailsWarningMessage(props) {
6
6
  const subscriptionAbused = useSubscriptionAbused();
7
- return (React.createElement("div", { className: "pf-u-mb-md" },
7
+ return (React.createElement(React.Fragment, null,
8
8
  React.createElement(CaseSecureSupportAlert, { caseNumber: props.caseNumber, selectedAccountDetails: props.selectedAccountDetails }),
9
9
  subscriptionAbused.isAccountFreezed && React.createElement(CaseSubscriptionAbuseAlert, null)));
10
10
  }
@@ -1,5 +1,7 @@
1
+ import React from 'react';
1
2
  interface IProps {
2
3
  caseNumber: string;
4
+ tabsRef: React.MutableRefObject<HTMLDivElement>;
3
5
  }
4
6
  export default function CaseOverview(props: IProps): JSX.Element;
5
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAyCA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,eAoejD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAaA,OAAO,KAA8D,MAAM,OAAO,CAAC;AA6BnF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACnD;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,MAAM,eAqejD"}
@@ -26,6 +26,7 @@ import { usePostComment } from '../../shared/usePostComment';
26
26
  import { ReopenCaseModal } from '../ConfirmationModals/ReopenCaseModal';
27
27
  import { PDFContext } from '../PDFContainer';
28
28
  import { CaseInformation } from '../Tabs/CaseDetails/CaseInformation';
29
+ import { CaseContactPhoneNumberAlert } from '../Tabs/CaseDetails/CasePhoneNumberConfirmAlert';
29
30
  import Summary from '../Tabs/CaseDetails/Summary';
30
31
  import CaseOwnerInfo from './CaseOwnerInfo';
31
32
  import CaseStatus from './CaseStatus';
@@ -224,6 +225,7 @@ export default function CaseOverview(props) {
224
225
  React.createElement(Trans, null, "Case inactivity warning")),
225
226
  React.createElement("p", { className: "pf-u-mb-sm" },
226
227
  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."))) })))),
228
+ React.createElement(CaseContactPhoneNumberAlert, { isReview: true, tabRef: props.tabsRef }),
227
229
  React.createElement("header", null,
228
230
  React.createElement("h2", { className: "case-ID" },
229
231
  React.createElement(Trans, null, "Case"),
@@ -1 +1 @@
1
- {"version":3,"file":"CaseSecureSupportAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseSecureSupportAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAOlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,QAAQ,CAAC;CACpC;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,eAyBnD"}
1
+ {"version":3,"file":"CaseSecureSupportAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseSecureSupportAlert.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAOlE,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB,EAAE,QAAQ,CAAC;CACpC;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,eA+BnD"}
@@ -17,6 +17,6 @@ export function CaseSecureSupportAlert(props) {
17
17
  "to access secure support cases."));
18
18
  }
19
19
  };
20
- return (React.createElement(AlertMessage, { variant: AlertType.WARNING, show: isSecureSupportTechViewingSecureCase, isInline: true },
20
+ return (React.createElement(AlertMessage, { className: "pf-u-mb-md", variant: AlertType.WARNING, show: isSecureSupportTechViewingSecureCase, isInline: true },
21
21
  React.createElement(Trans, null, getWarningMsg())));
22
22
  }
@@ -0,0 +1,2 @@
1
+ export declare function CaseContactPhoneNumber(): JSX.Element;
2
+ //# sourceMappingURL=CaseContactPhoneNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CaseContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.tsx"],"names":[],"mappings":"AAsBA,wBAAgB,sBAAsB,gBAsIrC"}
@@ -0,0 +1,91 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { InputGroupText, InputGroupTextVariant, Spinner, TextInput, TextInputGroup, ValidatedOptions, } from '@patternfly/react-core';
11
+ import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
12
+ import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
13
+ import { NewInlineEdit, ToastNotification } from '@rh-support/components';
14
+ import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
15
+ import isEqual from 'lodash/isEqual';
16
+ import React, { useContext, useState } from 'react';
17
+ import { Trans, useTranslation } from 'react-i18next';
18
+ import { PHONE_INSTRUCTION } from '../../../../constants/caseDetailsConstants';
19
+ import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
20
+ import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
21
+ import { PHONE_LIMIT } from '../../../../reducers/CaseConstNTypes';
22
+ import { updateCaseDetails } from '../../../../reducers/CaseReducer';
23
+ import { ContactPhoneNumberPopOver } from '../../../CaseInformation/ContactPhoneNumberPopOver';
24
+ export function CaseContactPhoneNumber() {
25
+ const { phone, caseNumber, contactSSOName, suppliedPhoneNumberVerified } = useCaseSelector((state) => ({
26
+ phone: state.caseDetails.phone || '',
27
+ caseNumber: state.caseDetails.caseNumber,
28
+ contactSSOName: state.caseDetails.contactSSOName,
29
+ suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
30
+ }), isEqual);
31
+ const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
32
+ const canEditCase = useCanEditCase();
33
+ const [isCasePhoneUpdating, setCasePhoneUpdating] = useState(false);
34
+ const [localPhoneState, setLocalPhoneState] = useState(phone);
35
+ const caseDispatch = useCaseDispatch();
36
+ const caseUpdateError = useCaseUpdateErrorMessage();
37
+ const { t } = useTranslation();
38
+ const onPhoneChange = (phone) => __awaiter(this, void 0, void 0, function* () {
39
+ if (canEditCase.alert())
40
+ return;
41
+ setLocalPhoneState(phone);
42
+ });
43
+ const onSave = () => __awaiter(this, void 0, void 0, function* () {
44
+ setCasePhoneUpdating(true);
45
+ try {
46
+ yield updateCaseDetails(caseDispatch, caseNumber, { phone: localPhoneState });
47
+ setCasePhoneUpdating(false);
48
+ ToastNotification.addSuccessMessage(t(`Phone number has been successfully updated`));
49
+ }
50
+ catch (e) {
51
+ setCasePhoneUpdating(false);
52
+ caseUpdateError.showError(e, t(`Phone number failed to update`));
53
+ }
54
+ });
55
+ const onCancel = () => {
56
+ setLocalPhoneState(phone);
57
+ };
58
+ // Function to handle keyDown events
59
+ const handleKeyDown = (e) => __awaiter(this, void 0, void 0, function* () {
60
+ // Cancel on pressing esc
61
+ if (e.keyCode === 27) {
62
+ yield onCancel();
63
+ }
64
+ // Save on pressing enter
65
+ else if (!isCasePhoneUpdating && e.keyCode === 13) {
66
+ yield onSave();
67
+ }
68
+ });
69
+ const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} characters.', {
70
+ limit: PHONE_LIMIT,
71
+ });
72
+ const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
73
+ return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
74
+ React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-supplied-phone' }, labelContent: React.createElement(React.Fragment, null,
75
+ React.createElement(Trans, null, "Case owner's phone number"),
76
+ ContactPhoneNumberPopOver()), allowInlineEdit: false, hideSaveCancel: false, saveDisabled: isCasePhoneUpdating },
77
+ React.createElement(TextInputGroup, null,
78
+ React.createElement(TextInput, { value: localPhoneState || '', type: "text", className: "form-control", id: "case-details-supplied-phone", placeholder: "+1 555-555-5555", onChange: onPhoneChange, "data-tracking-id": "case-details-page-supplied-phone", isDisabled: isCasePhoneUpdating, onKeyDown: handleKeyDown, validated: (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT
79
+ ? ValidatedOptions.error
80
+ : isPhoneNeedsReview
81
+ ? ValidatedOptions.warning
82
+ : ValidatedOptions.default }),
83
+ !isCasePhoneUpdating ? (React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
84
+ React.createElement("button", { className: "btn btn-app btn-link pf-u-ml-sm", type: "button", "data-tracking-id": "case-details-page-supplied-phone-save", onClick: () => onSave(), disabled: (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT },
85
+ React.createElement(CheckIcon, null)),
86
+ React.createElement("button", { className: "btn btn-app btn-link", type: "button", onClick: onCancel, "data-tracking-id": "case-details-page-supplied-phone-cancel" },
87
+ React.createElement(TimesIcon, { color: "#6A6E73" })))) : (React.createElement(InputGroupText, { variant: InputGroupTextVariant.plain },
88
+ React.createElement(Spinner, { isSVG: true, size: "lg", className: "pf-u-ml-2xl pf-u-mr-xl" })))),
89
+ (localPhoneState === null || localPhoneState === void 0 ? void 0 : localPhoneState.length) > PHONE_LIMIT ? (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)) : (React.createElement("p", { className: "form-instructions" },
90
+ React.createElement(Trans, null, PHONE_INSTRUCTION))))));
91
+ }
@@ -1,8 +1,10 @@
1
1
  import { IDClassNameProps } from '@rh-support/types/shared';
2
+ import React from 'react';
2
3
  import { RouteComponentProps } from 'react-router';
3
4
  interface IProps extends IDClassNameProps {
4
5
  caseNumber: string;
5
6
  routeProps: RouteComponentProps;
7
+ tabRef: React.MutableRefObject<HTMLDivElement>;
6
8
  }
7
9
  export default function CaseDetailsManagement(props: IProps): JSX.Element;
8
10
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAenD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,eAyD1D"}
1
+ {"version":3,"file":"CaseDetailsManagement.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAA+B,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAiBnD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,KAAK,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAAC,KAAK,EAAE,MAAM,eAiE1D"}
@@ -1,3 +1,4 @@
1
+ import { Flex, FlexItem } from '@patternfly/react-core';
1
2
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
2
3
  import isEqual from 'lodash/isEqual';
3
4
  import React, { useContext, useState } from 'react';
@@ -11,7 +12,9 @@ import CaseContactSelector from '../../../CaseManagement/SendNotifications/CaseC
11
12
  import { PartnerCaseHelper } from '../../ShareCase/PartnerCaseHelper';
12
13
  import { ShareWithPartner } from '../../ShareCase/PartnerShare';
13
14
  import CaseAlternateId from './CaseAlternateId';
15
+ import { CaseContactPhoneNumber } from './CaseContactPhoneNumber';
14
16
  import CaseInternalStatus from './CaseInternalStatus';
17
+ import { CaseContactPhoneNumberAlert } from './CasePhoneNumberConfirmAlert';
15
18
  import CaseSbrGroups from './CaseSbrGroups';
16
19
  export default function CaseDetailsManagement(props) {
17
20
  const [isUpdatingPartner, setIsUpdatingPartner] = useState(false);
@@ -30,7 +33,12 @@ export default function CaseDetailsManagement(props) {
30
33
  React.createElement(PartnerCaseHelper, { setIsUpdatingPartners: setIsUpdatingPartner, caseNumber: props.caseNumber, routeProps: props.routeProps }),
31
34
  React.createElement("section", { className: "card card-white" },
32
35
  React.createElement("form", { onSubmit: handleFormSubmit },
33
- React.createElement(OwnerSelector, null),
36
+ React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
37
+ React.createElement(FlexItem, { flex: { default: 'flex_1' } },
38
+ React.createElement(OwnerSelector, null)),
39
+ React.createElement(FlexItem, { flex: { default: 'flex_1' } },
40
+ React.createElement(CaseContactPhoneNumber, null))),
41
+ React.createElement(CaseContactPhoneNumberAlert, { isConfirm: true }),
34
42
  canSeeInternalStatus && React.createElement(CaseInternalStatus, null),
35
43
  canSeeSBRGroups && React.createElement(CaseSbrGroups, null),
36
44
  React.createElement(CaseGroup, null),
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface IProps {
3
+ isReview?: boolean;
4
+ isConfirm?: boolean;
5
+ tabRef?: React.MutableRefObject<HTMLDivElement>;
6
+ }
7
+ export declare function CaseContactPhoneNumberAlert(props: IProps): JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=CasePhoneNumberConfirmAlert.d.ts.map
@@ -0,0 +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;AAQpD,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,eA4FxD"}
@@ -0,0 +1,62 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { Alert, AlertVariant, Button, ButtonVariant } from '@patternfly/react-core';
11
+ import { ToastNotification } from '@rh-support/components';
12
+ import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
+ import { scrollIntoView } from '@rh-support/utils';
14
+ import isEqual from 'lodash/isEqual';
15
+ import React, { useContext, useState } from 'react';
16
+ import { Trans, useTranslation } from 'react-i18next';
17
+ import { Link } from 'react-router-dom';
18
+ import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
19
+ import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
20
+ import { updateCaseDetails } from '../../../../reducers/CaseReducer';
21
+ export function CaseContactPhoneNumberAlert(props) {
22
+ const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
23
+ const [isCaseUpdating, setCasUpdating] = useState(false);
24
+ const { caseNumber, suppliedPhoneNumberVerified, contactSSOName } = useCaseSelector((state) => ({
25
+ caseNumber: state.caseDetails.caseNumber,
26
+ suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
27
+ contactSSOName: state.caseDetails.contactSSOName,
28
+ }), isEqual);
29
+ const { t } = useTranslation();
30
+ const caseDispatch = useCaseDispatch();
31
+ const caseUpdateError = useCaseUpdateErrorMessage();
32
+ const onCaseDetailsChange = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
33
+ setCasUpdating(true);
34
+ try {
35
+ yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
36
+ setCasUpdating(false);
37
+ ToastNotification.addSuccessMessage(t(`Phone number has been successfully confirmed`));
38
+ }
39
+ catch (e) {
40
+ setCasUpdating(false);
41
+ caseUpdateError.showError(e, t(`Phone number failed to be confirmed`));
42
+ }
43
+ });
44
+ const goToPhoneField = () => {
45
+ scrollIntoView(props.tabRef);
46
+ };
47
+ const isPhoneNeedsReview = contactSSOName === loggedInUser.data.ssoUsername && suppliedPhoneNumberVerified === 'Deferred';
48
+ if (!isPhoneNeedsReview)
49
+ return React.createElement(React.Fragment, null);
50
+ return (React.createElement(React.Fragment, null, props.isReview ? (React.createElement(Alert, { className: "pf-u-mb-md", isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
51
+ React.createElement(Link, { replace: true, to: {
52
+ pathname: `/case/${caseNumber}/management`,
53
+ search: 'hello',
54
+ }, onClick: () => goToPhoneField(), "data-tracking-id": "case-contact-phone-number-review" },
55
+ React.createElement(Trans, null, "Review phone number")),
56
+ ] },
57
+ React.createElement(Trans, null, "You are the new owner for this case. Is the new phone number correct?"))) : props.isConfirm ? (React.createElement(Alert, { isInline: true, className: "pf-u-mb-md", variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
58
+ React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm", isLoading: isCaseUpdating, isDisabled: isCaseUpdating },
59
+ React.createElement(Trans, null, "Confirm phone number")),
60
+ ] },
61
+ React.createElement(Trans, null, "You are the new owner for this case. Is the new phone number correct?"))) : (React.createElement(React.Fragment, null))));
62
+ }
@@ -0,0 +1,2 @@
1
+ export declare function ContactPhoneNumber(): JSX.Element;
2
+ //# sourceMappingURL=ContactPhoneNumber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAYA,wBAAgB,kBAAkB,gBAiDjC"}
@@ -0,0 +1,45 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { TextInput, ValidatedOptions } from '@patternfly/react-core';
11
+ import isEmpty from 'lodash/isEmpty';
12
+ import isEqual from 'lodash/isEqual';
13
+ import React from 'react';
14
+ import { Trans, useTranslation } from 'react-i18next';
15
+ import { PHONE_INSTRUCTION } from '../../constants/caseDetailsConstants';
16
+ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
17
+ import { PHONE_LIMIT } from '../../reducers/CaseConstNTypes';
18
+ import { setCaseDetails } from '../../reducers/CaseReducer';
19
+ import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
20
+ export function ContactPhoneNumber() {
21
+ const { caseDetails } = useCaseSelector((state) => ({
22
+ caseDetails: state.caseDetails,
23
+ selectedOwner: state.selectedOwner,
24
+ }), isEqual);
25
+ const caseDispatch = useCaseDispatch();
26
+ const { t } = useTranslation();
27
+ const handlePhoneChange = (phone) => __awaiter(this, void 0, void 0, function* () {
28
+ setCaseDetails(caseDispatch, { phone });
29
+ });
30
+ const maxLengthErrorMessage = t('Phone number cannot be more than {{limit}} characters.', {
31
+ limit: PHONE_LIMIT,
32
+ });
33
+ return (React.createElement("div", { className: "form-group", style: { minWidth: '200px' } },
34
+ React.createElement("h3", { className: "subheading subheading-sm" },
35
+ React.createElement(Trans, null, "Case owner's phone number"),
36
+ ContactPhoneNumberPopOver()),
37
+ React.createElement(TextInput, { id: "case-phone-number", placeholder: "+1 555-555-5555", value: caseDetails.phone, onChange: handlePhoneChange, validated: caseDetails.phone.length > PHONE_LIMIT
38
+ ? ValidatedOptions.error
39
+ : caseDetails.severity === "1 (Urgent)" /* SEV_1 */ &&
40
+ isEmpty(caseDetails.suppliedPhoneNumberVerified)
41
+ ? ValidatedOptions.warning
42
+ : ValidatedOptions.default }),
43
+ caseDetails.phone.length > PHONE_LIMIT ? (React.createElement("p", { className: "form-instructions form-invalid" }, maxLengthErrorMessage)) : (React.createElement("p", { className: "form-instructions" },
44
+ React.createElement(Trans, null, PHONE_INSTRUCTION)))));
45
+ }
@@ -0,0 +1,2 @@
1
+ export declare function ContactPhoneNumberAlert(): JSX.Element;
2
+ //# sourceMappingURL=ContactPhoneNumberAlert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactPhoneNumberAlert.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberAlert.tsx"],"names":[],"mappings":"AAWA,wBAAgB,uBAAuB,gBAyDtC"}
@@ -0,0 +1,33 @@
1
+ import { Alert, AlertVariant, Button, ButtonVariant } from '@patternfly/react-core';
2
+ import isEmpty from 'lodash/isEmpty';
3
+ import isEqual from 'lodash/isEqual';
4
+ import React, { useEffect } from 'react';
5
+ import { Trans, useTranslation } from 'react-i18next';
6
+ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
7
+ import { setCaseDetails } from '../../reducers/CaseReducer';
8
+ export function ContactPhoneNumberAlert() {
9
+ const { t } = useTranslation();
10
+ const caseDispatch = useCaseDispatch();
11
+ const { caseDetails } = useCaseSelector((state) => ({
12
+ caseDetails: state.caseDetails,
13
+ }), isEqual);
14
+ const onCaseDetailsChange = (caseDetails) => {
15
+ setCaseDetails(caseDispatch, caseDetails);
16
+ };
17
+ useEffect(() => {
18
+ if (caseDetails.severity === "1 (Urgent)" /* SEV_1 */) {
19
+ onCaseDetailsChange({ suppliedPhoneNumberVerified: undefined });
20
+ }
21
+ // eslint-disable-next-line react-hooks/exhaustive-deps
22
+ }, [caseDetails.severity]);
23
+ const hideAlert = caseDetails.severity !== "1 (Urgent)" /* SEV_1 */ || !isEmpty(caseDetails.suppliedPhoneNumberVerified);
24
+ if (hideAlert)
25
+ return React.createElement(React.Fragment, null);
26
+ return (React.createElement(Alert, { className: "form-group", isInline: true, variant: AlertVariant.warning, title: t('Review phone number'), actionLinks: [
27
+ React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'True' }), "data-tracking-id": "case-contact-phone-number-confirm" },
28
+ React.createElement(Trans, null, "Confirm phone number")),
29
+ React.createElement(Button, { variant: ButtonVariant.link, isInline: true, onClick: () => onCaseDetailsChange({ suppliedPhoneNumberVerified: 'Deferred' }), "data-tracking-id": "case-contact-phone-number-dont-know" },
30
+ React.createElement(Trans, null, "I don't know")),
31
+ ] },
32
+ React.createElement(Trans, null, "You are opening an urgent or high severity case, please confirm the phone number we have on file is correct.")));
33
+ }
@@ -0,0 +1,2 @@
1
+ export declare function ContactPhoneNumberPopOver(): JSX.Element;
2
+ //# sourceMappingURL=ContactPhoneNumberPopOver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactPhoneNumberPopOver.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumberPopOver.tsx"],"names":[],"mappings":"AAIA,wBAAgB,yBAAyB,gBA2BxC"}
@@ -0,0 +1,12 @@
1
+ import { Popover, PopoverPosition } from '@patternfly/react-core';
2
+ import React from 'react';
3
+ import { Trans } from 'react-i18next';
4
+ export function ContactPhoneNumberPopOver() {
5
+ return (React.createElement(Popover, { "aria-label": "Support Severity Level info", position: PopoverPosition.right, bodyContent: React.createElement("p", null,
6
+ React.createElement(Trans, null,
7
+ "These changes to your phone number affect only this case. To update your phone number for all future cases, go to",
8
+ ' ',
9
+ React.createElement("a", { href: "https://www.redhat.com/wapps/ugc/protected/personalInfo.html", "data-tracking-id": "case-contact-phone-number-account-details", target: "_blank", rel: "noopener noreferrer" }, "your account details"),
10
+ ".")), closeBtnAriaLabel: "Close" },
11
+ React.createElement("i", { "aria-label": "Support Severity Level info", className: "fa fa-question-circle" })));
12
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AAmBA,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,eAyEnD"}
1
+ {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AAsBA,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,eAiFnD"}
@@ -1,3 +1,4 @@
1
+ import { Flex, FlexItem } from '@patternfly/react-core';
1
2
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
2
3
  import isEmpty from 'lodash/isEmpty';
3
4
  import isEqual from 'lodash/isEqual';
@@ -7,6 +8,8 @@ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
7
8
  import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
8
9
  import { setCaseDetails, setDetectedLanguage } from '../../reducers/CaseReducer';
9
10
  import CaseGroup from '../CaseInformation/CaseGroup';
11
+ import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
12
+ import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
10
13
  import Fts from '../CaseInformation/Fts';
11
14
  import Severity from '../CaseInformation/Severity';
12
15
  import SupportLevel from '../CaseInformation/SupportLevel';
@@ -56,7 +59,12 @@ export default function CaseManagement(props) {
56
59
  };
57
60
  return (React.createElement("form", { onSubmit: handleFormSubmit },
58
61
  React.createElement(SupportLevel, null),
59
- React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange }),
62
+ React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
63
+ React.createElement(FlexItem, { flex: { default: 'flex_1' } },
64
+ React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
65
+ React.createElement(FlexItem, { flex: { default: 'flex_1' } },
66
+ React.createElement(ContactPhoneNumber, null))),
67
+ React.createElement(ContactPhoneNumberAlert, null),
60
68
  React.createElement(Fts, { inlineEditable: false }),
61
69
  React.createElement(CaseGroup, { init: true }),
62
70
  React.createElement(CaseLanguageSelector, null),
@@ -1 +1 @@
1
- {"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAqBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,eA2D3C"}
1
+ {"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAsBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,eAkE3C"}
@@ -1,3 +1,4 @@
1
+ import { Flex, FlexItem } from '@patternfly/react-core';
1
2
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
2
3
  import isEmpty from 'lodash/isEmpty';
3
4
  import isEqual from 'lodash/isEqual';
@@ -8,6 +9,7 @@ import { AccountSelector } from '../AccountInfo/AccountSelector';
8
9
  import { OwnerSelector } from '../AccountInfo/OwnerSelector';
9
10
  import CaseGroup from '../CaseInformation/CaseGroup';
10
11
  import CaseType from '../CaseInformation/CaseType';
12
+ import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
11
13
  import Description from '../CaseInformation/Description';
12
14
  import Fts from '../CaseInformation/Fts';
13
15
  import OpenCaseIssue from '../CaseInformation/OpenCaseIssue';
@@ -47,7 +49,11 @@ export default function Review(props) {
47
49
  React.createElement(KtQuestions, { inlineEditable: true, hideSaveCancel: true }),
48
50
  React.createElement(CaseType, null),
49
51
  React.createElement(SupportLevel, null),
50
- React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange }),
52
+ React.createElement(Flex, { direction: { default: 'column', '2xl': 'row' } },
53
+ React.createElement(FlexItem, { flex: { default: 'flex_1' } },
54
+ React.createElement(Severity, { showSeverityInfoIcon: true, onSeverityChange: onSeverityChange })),
55
+ React.createElement(FlexItem, { flex: { default: 'flex_1' } },
56
+ React.createElement(ContactPhoneNumber, null))),
51
57
  React.createElement(Fts, { inlineEditable: true, initialIsEditing: isEmpty(contactInfo24x7), hideSaveCancel: true }),
52
58
  React.createElement(CaseGroup, null),
53
59
  React.createElement(CaseLanguageSelector, null),
@@ -1 +1 @@
1
- {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,wBAAgB,iBAAiB,CAAC,WAAW,GAAE,gBAAuB;;;;;EAyKrE"}
1
+ {"version":3,"file":"useIsSectionValid.d.ts","sourceRoot":"","sources":["../../../../src/components/shared/useIsSectionValid.tsx"],"names":[],"mappings":"AAwBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGnE,wBAAgB,iBAAiB,CAAC,WAAW,GAAE,gBAAuB;;;;;EA6KrE"}
@@ -7,13 +7,13 @@ import { useCaseSelector } from '../../context/CaseContext';
7
7
  import { RecommendationStateContext } from '../../context/RecommendationContext';
8
8
  import { RouteContext, RouteDispatchContext } from '../../context/RouteContext';
9
9
  import { TCStateContext } from '../../context/TopContentContext';
10
- import { ALTERNATE_CASE_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, SUMMARY_LENGTH_LIMIT, } from '../../reducers/CaseConstNTypes';
10
+ import { ALTERNATE_CASE_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, PHONE_LIMIT, SUMMARY_LENGTH_LIMIT, } from '../../reducers/CaseConstNTypes';
11
11
  import { isCaseInformationSectionValid, isCaseManagementStateValid, isCaseStateValid, isClusterIDValid, } from '../../reducers/CaseHelpers';
12
12
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
13
13
  import { RouteReducerConstants } from '../../reducers/RouteReducer';
14
14
  export function useIsSectionValid(sectionName = null) {
15
15
  var _a, _b;
16
- const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, description, hostname, contactInfo24x7, alternateId, selectedAccountDetails, } = useCaseSelector((state) => ({
16
+ const { caseState, caseType, product, version, contactSSOName, accountNumber, summary, description, hostname, contactInfo24x7, alternateId, selectedAccountDetails, phone, } = useCaseSelector((state) => ({
17
17
  caseState: state,
18
18
  caseType: state.caseDetails.caseType,
19
19
  product: state.caseDetails.product,
@@ -27,6 +27,7 @@ export function useIsSectionValid(sectionName = null) {
27
27
  contactInfo24x7: state.caseDetails.contactInfo24x7,
28
28
  alternateId: state.caseDetails.alternateId,
29
29
  selectedAccountDetails: state.selectedAccountDetails,
30
+ phone: state.caseDetails.phone,
30
31
  }), isEqual);
31
32
  const { globalMetadataState: { allProducts, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
32
33
  const { topContentState: { topContent }, } = useContext(TCStateContext);
@@ -52,9 +53,11 @@ export function useIsSectionValid(sectionName = null) {
52
53
  ? contactInfo24x7.length <= CONTACT_INFO_24X7_LIMIT
53
54
  : true;
54
55
  const hasAlternateCaseIdValidLength = alternateId ? alternateId.length <= ALTERNATE_CASE_ID_LIMIT : true;
56
+ const hasSppliedPhoneValidLength = phone ? phone.length <= PHONE_LIMIT : true;
55
57
  return (isCaseManagementStateValid(caseState, loggedInUserJwtToken) &&
56
58
  hasContactInfo24x7ValidLength &&
57
- hasAlternateCaseIdValidLength);
59
+ hasAlternateCaseIdValidLength &&
60
+ hasSppliedPhoneValidLength);
58
61
  };
59
62
  const isRecommendationSectionValid = () => {
60
63
  // don't check for entitled product if user is on search intent flow
@@ -1 +1 @@
1
- {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eAuZtD"}
1
+ {"version":3,"file":"GlobalTroubleshootEffects.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/GlobalTroubleshootEffects.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAWvD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAQrF,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,eAgatD"}
@@ -232,6 +232,14 @@ export function GlobalTroubleshootEffects(props) {
232
232
  setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), product, undefined, undefined, true);
233
233
  // eslint-disable-next-line react-hooks/exhaustive-deps
234
234
  }, [caseDispatch, loggedInUserRights.data]);
235
+ /**
236
+ * Setting supplied phone number
237
+ */
238
+ useEffect(() => {
239
+ setCaseDetails(caseDispatch, {
240
+ phone: loggedInUser.data.phone,
241
+ });
242
+ }, [caseDispatch, loggedInUser.data]);
235
243
  /**
236
244
  * handling top content call
237
245
  */
@@ -12,4 +12,5 @@ export declare enum CaseStatusEnum {
12
12
  WAITING_ON_CUSTOMER = "Waiting on Customer",
13
13
  WAITING_ON_REDHAT = "Waiting on Red Hat"
14
14
  }
15
+ export declare const PHONE_INSTRUCTION = "A current phone number with the country code helps us support you better.";
15
16
  //# sourceMappingURL=caseDetailsConstants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;CAC7B;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C"}
1
+ {"version":3,"file":"caseDetailsConstants.d.ts","sourceRoot":"","sources":["../../../src/constants/caseDetailsConstants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,yBAAyB,CAAC;AAE3E,oBAAY,mBAAmB;IAC3B,UAAU,eAAe;IACzB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,UAAU,gBAAgB;CAC7B;AAED,oBAAY,cAAc;IACtB,MAAM,WAAW;IACjB,mBAAmB,wBAAwB;IAC3C,iBAAiB,uBAAuB;CAC3C;AAED,eAAO,MAAM,iBAAiB,8EAA8E,CAAC"}
@@ -14,3 +14,4 @@ export var CaseStatusEnum;
14
14
  CaseStatusEnum["WAITING_ON_CUSTOMER"] = "Waiting on Customer";
15
15
  CaseStatusEnum["WAITING_ON_REDHAT"] = "Waiting on Red Hat";
16
16
  })(CaseStatusEnum || (CaseStatusEnum = {}));
17
+ export const PHONE_INSTRUCTION = 'A current phone number with the country code helps us support you better.';
@@ -511,6 +511,11 @@ form textarea {
511
511
  resize: vertical !important;
512
512
  }
513
513
 
514
+ .pf-c-form-control.pf-m-warning {
515
+ border-bottom-color: var(--pf-c-form-control--m-warning--BorderBottomColor);
516
+ border-bottom-width: 2px;
517
+ }
518
+
514
519
  form .form-group .form-control.form-invalid {
515
520
  border-bottom-color: #c9190b !important;
516
521
  border-bottom-width: 2px;
@@ -16,6 +16,7 @@ export declare const HOSTNAME_LENGTH_LIMIT = 255;
16
16
  export declare const CONTACT_INFO_24X7_LIMIT = 32768;
17
17
  export declare const CLUSTER_ID_LIMIT = 255;
18
18
  export declare const ALTERNATE_CASE_ID_LIMIT = 100;
19
+ export declare const PHONE_LIMIT = 40;
19
20
  export declare const SESSION_NOTIFIED_USERS_INTERNAL_LIMIT = 1024;
20
21
  export declare const SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT = 1024;
21
22
  export declare const SESSION_TIME_FRAMES_URGENCY_LIMIT = 32768;
@@ -25,6 +26,7 @@ export declare const SESSION_ENVIRONMENT_LIMIT = 32768;
25
26
  export declare const SESSION_REFERRER_URL_LIMIT = 1024;
26
27
  export declare const SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT = 255;
27
28
  export declare const SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT = 255;
29
+ export declare const SESSION_PHONE_LENGTH_LIMIT = 45;
28
30
  export declare const CASE_DEATILS_ISSUE_LIMIT = 20000;
29
31
  export declare const CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT = 4000;
30
32
  export declare const CASE_DEATILS_ENVIRONMENT_LIMIT = 3000;
@@ -1 +1 @@
1
- {"version":3,"file":"CaseConstNTypes.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseConstNTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACjH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEnF,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,eAAO,MAAM,oBAAoB,MAAM,CAAC;AACxC,eAAO,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C,EAAE,MAAM,CAAC;IACvB,0BAA0B,EAAE,OAAO,CAAC;IACpC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,sBAAuB,SAAQ,UAAU;CAAG;AAC7D,oBAAY,eAAe,GAAG,OAAO,CAAC,oBAAoB,EAAE,sBAAsB,CAAC,CAAC;AACpF,oBAAY,uBAAuB,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEhE,eAAO,MAAM,qCAAqC,+CAA+C,CAAC;AAClG,eAAO,MAAM,yCAAyC,+CAA+C,CAAC"}
@@ -8,6 +8,7 @@ export const HOSTNAME_LENGTH_LIMIT = 255;
8
8
  export const CONTACT_INFO_24X7_LIMIT = 32768;
9
9
  export const CLUSTER_ID_LIMIT = 255;
10
10
  export const ALTERNATE_CASE_ID_LIMIT = 100;
11
+ export const PHONE_LIMIT = 40;
11
12
  export const SESSION_NOTIFIED_USERS_INTERNAL_LIMIT = 1024;
12
13
  export const SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT = 1024;
13
14
  export const SESSION_TIME_FRAMES_URGENCY_LIMIT = 32768;
@@ -17,6 +18,7 @@ export const SESSION_ENVIRONMENT_LIMIT = 32768;
17
18
  export const SESSION_REFERRER_URL_LIMIT = 1024;
18
19
  export const SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT = 255;
19
20
  export const SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT = 255;
21
+ export const SESSION_PHONE_LENGTH_LIMIT = 45;
20
22
  //Case detail limits for each individual KT Question in order as they appear on troubleshoot/opencase
21
23
  //We are totaling 31k here to allow for the backend to accept response when combined with question copy.
22
24
  export const CASE_DEATILS_ISSUE_LIMIT = 20000; // 1st Q
@@ -146,6 +148,8 @@ export const initialCaseState = {
146
148
  noClusterIdReason: '',
147
149
  noClusterIdReasonExplanation: '',
148
150
  openshiftClusterVersion: '',
151
+ phone: '',
152
+ suppliedPhoneNumberVerified: undefined,
149
153
  },
150
154
  customerE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from 'lodash/unionBy';
8
8
  import uniqBy from 'lodash/uniqBy';
9
9
  import { getIsClusterIdInvalid, isClusterIdEnabledForProduct } from '../utils/caseOpenshiftClusterIdUtils';
10
- import { ALTERNATE_CASE_ID_LIMIT, CASE_DEATILS_ENVIRONMENT_LIMIT, CASE_DEATILS_ISSUE_LIMIT, CASE_DEATILS_PERIODICITYOFISSUE_LIMIT, CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, ITRForSLASeverity, KtQuestionConstant, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
10
+ import { ALTERNATE_CASE_ID_LIMIT, CASE_DEATILS_ENVIRONMENT_LIMIT, CASE_DEATILS_ISSUE_LIMIT, CASE_DEATILS_PERIODICITYOFISSUE_LIMIT, CASE_DETAILS_TIMEFRAMESANDURGENCY_LIMIT, CLUSTER_ID_LIMIT, CONTACT_INFO_24X7_LIMIT, DESCRIPTION_LENGTH_LIMIT, HOSTNAME_LENGTH_LIMIT, ITRForSLASeverity, KtQuestionConstant, PHONE_LIMIT, SESSION_ENVIRONMENT_LIMIT, SESSION_ISSUE_LIMIT, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT, SESSION_NOTIFIED_USERS_EXTERNAL_LIMIT, SESSION_NOTIFIED_USERS_INTERNAL_LIMIT, SESSION_PERIODICITY_OF_ISSUE_LIMIT, SESSION_PHONE_LENGTH_LIMIT, SESSION_TIME_FRAMES_URGENCY_LIMIT, SeverityDescription, SUMMARY_LENGTH_LIMIT, } from './CaseConstNTypes';
11
11
  export const getCaseRecommendations = (docs, oldDocs) => {
12
12
  const recs = [];
13
13
  docs.forEach((doc, i) => {
@@ -148,6 +148,7 @@ export const isCaseStateValid = (caseState, loggedInUserJwtToken) => {
148
148
  !isEmpty(case_details.severity) &&
149
149
  !isEmpty(case_details.accountNumberRef) &&
150
150
  !isEmpty(case_details.contactSSOName) &&
151
+ case_details.phone.length <= PHONE_LIMIT &&
151
152
  (caseState.selectedAccountDetails.data.requireCGroupOnCreate
152
153
  ? !isEmpty(case_details.groupNumber) && case_details.groupNumber !== '-1'
153
154
  : true) &&
@@ -209,6 +210,12 @@ export const createCasePayload = (caseState, sessionItem, isCaseCreate = false)
209
210
  case_details.cep && (casePayload.cep = !!case_details.cep);
210
211
  !isEmpty(case_details.hostname) && (casePayload.hostname = case_details.hostname);
211
212
  !isEmpty(case_details.caseResourceLinks) && (casePayload.caseResourceLinks = case_details.caseResourceLinks);
213
+ !isEmpty(case_details.phone) && (casePayload.phone = case_details.phone);
214
+ casePayload.suppliedPhoneNumberVerified = !isEmpty(case_details.suppliedPhoneNumberVerified)
215
+ ? case_details.suppliedPhoneNumberVerified
216
+ : !isEmpty(case_details.phone)
217
+ ? 'True'
218
+ : 'False';
212
219
  if (!isEmpty(case_details.entitlementSla) &&
213
220
  some(caseState.ownersEntitlements.data, ['slaProcessId', case_details.entitlementSla])) {
214
221
  casePayload.entitlementSla = case_details.entitlementSla;
@@ -256,7 +263,7 @@ export const getHasInvalidEntitlements = (caseEntitlements) => {
256
263
  return filter(unionBy(caseEntitlements, 'slaProcessId'), (e) => !!e.slaProcessId).length === 0;
257
264
  };
258
265
  export const getCaseFromSessionDetails = (sessionItem, loggedInUserAccountNumber, loggedInUserSSO) => {
259
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
266
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
260
267
  const { sessionDetails, session } = sessionItem;
261
268
  return {
262
269
  product: sessionDetails.product,
@@ -282,12 +289,14 @@ export const getCaseFromSessionDetails = (sessionItem, loggedInUserAccountNumber
282
289
  alternateId: (_h = sessionDetails.caseAlternateId) !== null && _h !== void 0 ? _h : '',
283
290
  noClusterIdReason: (_j = sessionDetails.noClusterIdReason) !== null && _j !== void 0 ? _j : '',
284
291
  noClusterIdReasonExplanation: (_k = sessionDetails.noClusterIdReasonExplanation) !== null && _k !== void 0 ? _k : '',
292
+ phone: (_l = sessionDetails.phone) !== null && _l !== void 0 ? _l : '',
293
+ suppliedPhoneNumberVerified: (_m = sessionDetails.suppliedPhoneNumberVerified) !== null && _m !== void 0 ? _m : undefined,
285
294
  userAgent: session.userAgent,
286
295
  originatingSystem: session.originatingSystem,
287
296
  };
288
297
  };
289
298
  export const getSessionDetailsFromCase = (caseDetails, selectedNotificationContacts) => {
290
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
299
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
291
300
  const notifiedUsersInternal = [];
292
301
  const notifiedUsersExternal = [];
293
302
  forEach(selectedNotificationContacts, (contact) => {
@@ -324,5 +333,7 @@ export const getSessionDetailsFromCase = (caseDetails, selectedNotificationConta
324
333
  caseAlternateId: (_o = (_m = caseDetails.alternateId) === null || _m === void 0 ? void 0 : _m.substring(0, ALTERNATE_CASE_ID_LIMIT)) !== null && _o !== void 0 ? _o : '',
325
334
  noClusterIdReason: (_q = (_p = caseDetails.noClusterIdReason) === null || _p === void 0 ? void 0 : _p.substring(0, SESSION_NO_CLUSTER_REASON_LENGTH_LIMIT)) !== null && _q !== void 0 ? _q : '',
326
335
  noClusterIdReasonExplanation: (_s = (_r = caseDetails.noClusterIdReasonExplanation) === null || _r === void 0 ? void 0 : _r.substring(0, SESSION_NO_CLUSTER_REASON_EXPLANATION_LENGTH_LIMIT)) !== null && _s !== void 0 ? _s : '',
336
+ phone: (_u = (_t = caseDetails.phone) === null || _t === void 0 ? void 0 : _t.substring(0, SESSION_PHONE_LENGTH_LIMIT)) !== null && _u !== void 0 ? _u : '',
337
+ suppliedPhoneNumberVerified: caseDetails.suppliedPhoneNumberVerified,
327
338
  };
328
339
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CaseReducer.d.ts","sourceRoot":"","sources":["../../../src/reducers/CaseReducer.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qDAAqD,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAEtH,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,0BAA0B,EAA+B,MAAM,qCAAqC,CAAC;AAC9G,OAAO,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAE/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AASxD,OAAO,EAEH,uBAAuB,EAEvB,UAAU,EAEb,MAAM,mBAAmB,CAAC;AAU3B,eAAO,MAAM,WAAW,WAAY,UAAU,UAAU,GAAG,KAAG,UA6L7D,CAAC;AAGF,eAAO,MAAM,cAAc,aAAc,uBAAuB,aAAa,QAAQ,YAAY,CAAC,SAEjG,CAAC;AAEF,eAAO,MAAM,YAAY,aAAc,uBAAuB,aAAa,QAAQ,UAAU,CAAC,SAE7F,CAAC;AAEF,eAAO,MAAM,eAAe,aAAc,uBAAuB,gCAAgC,QAAQ,EAAE,SAK1G,CAAC;AAEF,eAAO,MAAM,UAAU,aACT,uBAAuB,eACpB,UAAU,eACV,Y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M,kBACJ,MAAM,kBAgFzB,CAAC;AAEF,eAAO,MAAM,yCAAyC,aACxC,uBAAuB,cACrB,OAAO,iBACJ,MAAM,SAMxB,CAAC;AAIF,eAAO,MAAM,yBAAyB,aACxB,uBAAuB,iBAClB,MAAM,eACR,MAAM,sBACC,QAAQ,kBA6B/B,CAAC;AAEF,wBAAsB,2BAA2B,CAAC,QAAQ,EAAE,uBAAuB,EAAE,UAAU,EAAE,MAAM,iBAmBtG;AAGD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,uBAAuB,EACjC,KAAK,EAAE,MAAM,EACb,gBAAgB,EAAE,mBAAmB,CAAC,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC,EAC5E,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,0BAA0B,EAAE,QAO5D;AAED,wBAAsB,kBAAkB,CAAC,QAAQ,EAAE,uBAAuB,EAAE,OAAO,EAAE,MAAM,iBAiB1F;AAED,eAAO,MAAM,kBAAkB,aAAc,uBAAuB,QAAQ,OAAO,SAKlF,CAAC"}
@@ -537,6 +537,8 @@ export const fetchCaseDetails = (dispatch, caseNumber, loggedInUserRights, refre
537
537
  remoteSessionTermsAcked: (_h = data.remoteSessionTermsAcked) !== null && _h !== void 0 ? _h : false,
538
538
  noClusterIdReason: data.noClusterIdReason || '',
539
539
  noClusterIdReasonExplanation: data.noClusterIdReasonExplanation || '',
540
+ phone: data.phone || '',
541
+ suppliedPhoneNumberVerified: data.suppliedPhoneNumberVerified || undefined,
540
542
  };
541
543
  caseDetails.chats = data === null || data === void 0 ? void 0 : data.chats;
542
544
  caseDetails.comments = data === null || data === void 0 ? void 0 : data.comments;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "1.0.49",
3
+ "version": "1.0.50",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,7 +26,7 @@
26
26
  "lib/**/*"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@cee-eng/hydrajs": "4.14.53",
29
+ "@cee-eng/hydrajs": "4.15.64",
30
30
  "@cee-eng/ui-toolkit": "1.1.6",
31
31
  "@patternfly/patternfly": "4.196.7",
32
32
  "@patternfly/pfe-accordion": "1.12.3",
@@ -63,7 +63,7 @@
63
63
  "react-virtualized": "^9.21.2"
64
64
  },
65
65
  "dependencies": {
66
- "@cee-eng/hydrajs": "4.14.53",
66
+ "@cee-eng/hydrajs": "4.15.64",
67
67
  "@cee-eng/ui-toolkit": "1.1.6",
68
68
  "@patternfly/patternfly": "4.196.7",
69
69
  "@patternfly/pfe-accordion": "1.12.3",
@@ -73,11 +73,11 @@
73
73
  "@patternfly/react-core": "4.264.0",
74
74
  "@progress/kendo-drawing": "^1.6.0",
75
75
  "@progress/kendo-react-pdf": "^3.12.0",
76
- "@rh-support/components": "1.2.23",
77
- "@rh-support/react-context": "1.0.31",
76
+ "@rh-support/components": "1.2.24",
77
+ "@rh-support/react-context": "1.0.32",
78
78
  "@rh-support/types": "0.2.0",
79
- "@rh-support/user-permissions": "1.0.13",
80
- "@rh-support/utils": "1.0.11",
79
+ "@rh-support/user-permissions": "1.0.14",
80
+ "@rh-support/utils": "1.0.12",
81
81
  "@types/react-redux": "^7.1.12",
82
82
  "@types/redux": "^3.6.0",
83
83
  "@webcomponents/webcomponentsjs": "^2.2.10",
@@ -145,5 +145,5 @@
145
145
  "not ie <= 11",
146
146
  "not op_mini all"
147
147
  ],
148
- "gitHead": "5a6ac6cd2418495e7fdd0f48cfaa34a7c627635a"
148
+ "gitHead": "415d159b0afb5dddc9247a314d138571433625a2"
149
149
  }