@rh-support/troubleshoot 2.2.15 → 2.2.18

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA8D,MAAM,OAAO,CAAC;AA8BnF,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,eA6ejD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAA8D,MAAM,OAAO,CAAC;AA8BnF,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,eA+ejD"}
@@ -7,7 +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 { Alert, AlertVariant, Button, ButtonVariant, ExpandableSection, Label } from '@patternfly/react-core';
10
+ import { Alert, AlertVariant, Button, ButtonVariant, ExpandableSection, Label, ModalVariant, } from '@patternfly/react-core';
11
11
  import { ToastNotification, useConfirmation } from '@rh-support/components';
12
12
  import { CloseCaseModal, fetchCaseSeverities, fetchCaseTypes, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useCanEditCase, } from '@rh-support/react-context';
13
13
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
@@ -172,9 +172,11 @@ export default function CaseOverview(props) {
172
172
  }
173
173
  else {
174
174
  yield confirm({
175
- catchOnCancel: true,
176
- title: t(`Status has been changed`),
177
- description: t('Are you sure you want to change this case status to {{newStatus}}?', { newStatus }),
175
+ title: t(`Update the status of the case?`),
176
+ description: t('Are you sure you want to change the case status to {{newStatus}}?', { newStatus }),
177
+ confirmText: t('Yes, confirm'),
178
+ cancelText: t('No, cancel'),
179
+ modalVariant: ModalVariant.small,
178
180
  });
179
181
  updateStatusState(newStatus);
180
182
  }
@@ -60,7 +60,7 @@ export function ContactPhoneNumber() {
60
60
  useEffect(() => {
61
61
  // when canChangeAccountInfo is false OwnerSelector is hidden
62
62
  // need to set phone on load here instead of OwnerSelector
63
- if (!canChangeAccountInfo) {
63
+ if (!canChangeAccountInfo && (isEmpty(phoneCountryCode) || isEmpty(phoneAreaCodePrefixLineNumber))) {
64
64
  if (loggedInUser.data.supportPhoneAreaCodePrefixLineNumber) {
65
65
  setCaseDetails(caseDispatch, {
66
66
  phoneAreaCodePrefixLineNumber: loggedInUser.data.supportPhoneAreaCodePrefixLineNumber,
@@ -70,7 +70,7 @@ export function ContactPhoneNumber() {
70
70
  }
71
71
  else {
72
72
  const phoneLine = getPhoneObj(loggedInUser.data.phone).phoneLine || '';
73
- const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode;
73
+ const countryCode = getPhoneObj(loggedInUser.data.phone).countryCode || '';
74
74
  setCaseDetails(caseDispatch, {
75
75
  phoneAreaCodePrefixLineNumber: phoneLine,
76
76
  phoneCountryCode: countryCode,
@@ -80,7 +80,7 @@ export function ContactPhoneNumber() {
80
80
  }
81
81
  setLocalFullPhone(phoneCountryCode + ' ' + phoneAreaCodePrefixLineNumber);
82
82
  // eslint-disable-next-line react-hooks/exhaustive-deps
83
- }, [phoneAreaCodePrefixLineNumber, phoneCountryCode, loggedInUser.data]);
83
+ }, []);
84
84
  useEffect(() => {
85
85
  if (isEqual(localFullPhone.trim(), '+')) {
86
86
  setLocalFullPhone('');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.15",
3
+ "version": "2.2.18",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -133,5 +133,5 @@
133
133
  "defaults and supports es6-module",
134
134
  "maintained node versions"
135
135
  ],
136
- "gitHead": "a47ffbcfff1c99bef15fb811497e6c756845e9e8"
136
+ "gitHead": "9c40dbdb688e0686f3dac11a8079325d02d70102"
137
137
  }