@rh-support/troubleshoot 2.6.296 → 2.6.300

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 (106) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +40 -28
  3. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  4. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +12 -42
  5. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Case.js +5 -7
  7. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +8 -25
  9. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +10 -14
  11. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseOverview/index.js +18 -24
  13. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/RequestRemoteSession/NewEssTermsModal.js +6 -9
  15. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/RequestRemoteSession/RemoteSessionAgreementModal.js +3 -7
  17. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +34 -38
  19. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +9 -9
  21. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +59 -19
  23. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +9 -16
  25. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +3 -5
  27. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  28. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +2 -3
  29. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  30. package/lib/esm/components/CaseInformation/CaseInformation.js +5 -7
  31. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  32. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +24 -37
  33. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  34. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -32
  35. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  36. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  37. package/lib/esm/components/CaseManagement/CaseManagement.js +9 -4
  38. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  39. package/lib/esm/components/IdeaInformation/IdeaInformation.js +12 -11
  40. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  41. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  42. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  43. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  44. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  45. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  46. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  47. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  48. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +53 -19
  49. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  50. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  51. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  52. package/lib/esm/components/Review/Review.js +18 -16
  53. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  54. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  55. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +1 -1
  56. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  57. package/lib/esm/components/shared/useIsSectionValid.js +64 -50
  58. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  59. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +23 -106
  60. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  61. package/lib/esm/components/wizardLayout/WizardLayout.js +7 -6
  62. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  63. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -10
  64. package/lib/esm/context/CaseContext.d.ts.map +1 -1
  65. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  66. package/lib/esm/hooks/useResetCaseCreate.js +11 -18
  67. package/lib/esm/reducers/CaseConstNTypes.d.ts +2 -86
  68. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  69. package/lib/esm/reducers/CaseConstNTypes.js +0 -5
  70. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +1 -3
  71. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  72. package/lib/esm/reducers/CaseDetailsPageReducer.js +5 -22
  73. package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
  74. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  75. package/lib/esm/reducers/CaseHelpers.js +2 -34
  76. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  77. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  78. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  79. package/lib/esm/reducers/CaseReducer.d.ts +8 -27
  80. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  81. package/lib/esm/reducers/CaseReducer.js +29 -113
  82. package/package.json +6 -6
  83. package/lib/esm/graphql/index.d.ts +0 -4
  84. package/lib/esm/graphql/index.d.ts.map +0 -1
  85. package/lib/esm/graphql/index.js +0 -3
  86. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +0 -2
  87. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +0 -1
  88. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +0 -24
  89. package/lib/esm/graphql/mutations/index.d.ts +0 -2
  90. package/lib/esm/graphql/mutations/index.d.ts.map +0 -1
  91. package/lib/esm/graphql/mutations/index.js +0 -1
  92. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +0 -2
  93. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +0 -1
  94. package/lib/esm/graphql/queries/getEscalationDetails.js +0 -24
  95. package/lib/esm/graphql/queries/getParentId.d.ts +0 -2
  96. package/lib/esm/graphql/queries/getParentId.d.ts.map +0 -1
  97. package/lib/esm/graphql/queries/getParentId.js +0 -16
  98. package/lib/esm/graphql/queries/index.d.ts +0 -3
  99. package/lib/esm/graphql/queries/index.d.ts.map +0 -1
  100. package/lib/esm/graphql/queries/index.js +0 -2
  101. package/lib/esm/graphql/schemas/escalation.d.ts +0 -84
  102. package/lib/esm/graphql/schemas/escalation.d.ts.map +0 -1
  103. package/lib/esm/graphql/schemas/escalation.js +0 -1
  104. package/lib/esm/graphql/schemas/index.d.ts +0 -2
  105. package/lib/esm/graphql/schemas/index.d.ts.map +0 -1
  106. package/lib/esm/graphql/schemas/index.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"AccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/AccountSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAOnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAK5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,eAAO,MAAM,YAAY,EAAE,MAG1B,CAAC;AAEF,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBAmKrC;kBAnKQ,eAAe;;;AAuKxB,OAAO,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"AccountSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/AccountInfo/AccountSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC;AAOnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAK5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAS/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAE5C,eAAO,MAAM,YAAY,EAAE,MAG1B,CAAC;AAEF,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,qBA6KrC;kBA7KQ,eAAe;;;AAiLxB,OAAO,EAAE,eAAe,EAAE,CAAC"}
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import './css/accountSelector.css';
11
- import { useApolloClient } from '@apollo/client/react';
11
+ import { accounts } from '@cee-eng/hydrajs';
12
12
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
13
13
  import { AlertMessage, AlertType } from '@rh-support/components';
14
14
  import { AccountSelectorInternal, GlobalMetadataStateContext } from '@rh-support/react-context';
@@ -30,14 +30,12 @@ export const defaultProps = {
30
30
  function AccountSelector(props) {
31
31
  var _a;
32
32
  const [showNotEntitledMessage, setShowNotEntitledMessage] = useState(false);
33
- const { accountNumber, selectedAccountDetails, hasInvalidEntitlements } = useCaseSelector((state) => ({
33
+ const { accountNumber, selectedAccountDetails } = useCaseSelector((state) => ({
34
34
  accountNumber: state.caseDetails.accountNumberRef,
35
35
  selectedAccountDetails: state.selectedAccountDetails,
36
- hasInvalidEntitlements: state.hasInvalidEntitlements,
37
36
  }), isEqual);
38
37
  const isSelectedAccountSubscriptionAbused = ((_a = selectedAccountDetails === null || selectedAccountDetails === void 0 ? void 0 : selectedAccountDetails.data) === null || _a === void 0 ? void 0 : _a.subscriptionAbuse) || false;
39
38
  const caseDispatch = useCaseDispatch();
40
- const apolloClient = useApolloClient();
41
39
  const routeDispatch = useRouteDispatchContext();
42
40
  const { globalMetadataState: { bookmarkedGroupAccounts, loggedInUserRights, managedAccounts, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
43
41
  const { t } = useTranslation();
@@ -45,7 +43,7 @@ function AccountSelector(props) {
45
43
  const ability = useContext(AbilityContext);
46
44
  const canAccessManagedAccounts = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.MANAGED_ACCOUNTS);
47
45
  const canBookmarkAccounts = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.BOOKMARK_ACCOUNTS);
48
- // const canUseFindMyAccount = loggedInUserRights.data.isAccountDifferentFromLoggedInAccount(accountNumber!);
46
+ const canUseFindMyAccount = loggedInUserRights.data.isAccountDifferentFromLoggedInAccount(accountNumber);
49
47
  // Account Change Handler
50
48
  const onAccountChange = (account) => __awaiter(this, void 0, void 0, function* () {
51
49
  if (selectedAccountDetails.data.accountNumber === account.accountNumber)
@@ -54,7 +52,7 @@ function AccountSelector(props) {
54
52
  clearSelectedAccount(caseDispatch);
55
53
  return;
56
54
  }
57
- setCaseAccountNumber(caseDispatch, account.accountNumber, loggedInUserRights.data.isAccountSameAsLoggedInAccount(account.accountNumber), loggedInUsersAccount.data, apolloClient);
55
+ setCaseAccountNumber(caseDispatch, account.accountNumber, loggedInUserRights.data.isAccountSameAsLoggedInAccount(account.accountNumber), loggedInUsersAccount.data);
58
56
  });
59
57
  const onInternalAccountSelect = (accounts) => {
60
58
  if (!isArray(accounts))
@@ -66,36 +64,48 @@ function AccountSelector(props) {
66
64
  selection.accountNum &&
67
65
  onAccountChange({ accountNumber: selection.accountNum, name: selection.name });
68
66
  };
69
- // const onFindMyAccountClick = (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => {
70
- // !isEmpty(loggedInUserRights.data) &&
71
- // onAccountChange({
72
- // accountNumber: loggedInUserRights.data.getAccountNumber(),
73
- // name: loggedInUserRights.data.getAccountName(),
74
- // });
75
- // };
67
+ const onFindMyAccountClick = (event) => {
68
+ !isEmpty(loggedInUserRights.data) &&
69
+ onAccountChange({
70
+ accountNumber: loggedInUserRights.data.getAccountNumber(),
71
+ name: loggedInUserRights.data.getAccountName(),
72
+ });
73
+ };
76
74
  const selectedAccount = {
77
75
  name: selectedAccountDetails.data.name,
78
76
  accountNumber: selectedAccountDetails.data.accountNumber,
79
77
  subscriptionAbuse: selectedAccountDetails.data.subscriptionAbuse,
80
78
  };
79
+ // When internal user wants to open a case for a customer but customer account doesn't have entitlement, we show an error
81
80
  useEffect(() => {
82
- if (!loggedInUserRights.data.isInternal() || !selectedAccountDetails.data.accountNumber) {
83
- return;
84
- }
85
- if (selectedAccountDetails.data.accountNumber === loggedInUsersAccount.data.accountNumber) {
86
- setNoValidEntitlement(routeDispatch, false);
81
+ const getAccountEntitlement = () => __awaiter(this, void 0, void 0, function* () {
82
+ // internal user doesn't open case for customer. No need to check account entitlement
83
+ if (selectedAccountDetails.data.accountNumber === loggedInUsersAccount.data.accountNumber) {
84
+ setNoValidEntitlement(routeDispatch, false);
85
+ setShowNotEntitledMessage(false);
86
+ return;
87
+ }
87
88
  setShowNotEntitledMessage(false);
88
- return;
89
+ try {
90
+ const res = yield accounts.getAccountEntitlementByInternalUser(selectedAccountDetails.data.accountNumber);
91
+ if (isEmpty(res)) {
92
+ setShowNotEntitledMessage(true);
93
+ setNoValidEntitlement(routeDispatch, true);
94
+ }
95
+ else {
96
+ setShowNotEntitledMessage(false);
97
+ setNoValidEntitlement(routeDispatch, false);
98
+ }
99
+ }
100
+ catch (e) {
101
+ console.log(e);
102
+ }
103
+ });
104
+ if (loggedInUserRights.data.isInternal() && selectedAccountDetails.data.accountNumber) {
105
+ getAccountEntitlement();
89
106
  }
90
- setShowNotEntitledMessage(hasInvalidEntitlements);
91
- setNoValidEntitlement(routeDispatch, hasInvalidEntitlements);
92
107
  // eslint-disable-next-line react-hooks/exhaustive-deps
93
- }, [
94
- selectedAccountDetails.data.accountNumber,
95
- loggedInUserRights.data,
96
- loggedInUsersAccount.data,
97
- hasInvalidEntitlements,
98
- ]);
108
+ }, [selectedAccountDetails.data.accountNumber, loggedInUserRights.data, loggedInUsersAccount.data]);
99
109
  if (isEmpty(loggedInUserRights.data))
100
110
  return React.createElement(React.Fragment, null);
101
111
  return (React.createElement("div", { id: props.id, className: `form-group ${props.className}` },
@@ -104,7 +114,9 @@ function AccountSelector(props) {
104
114
  React.createElement("label", { htmlFor: "account-selector" },
105
115
  React.createElement(Trans, null, "Account"),
106
116
  ' ',
107
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
117
+ React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
118
+ canUseFindMyAccount && (React.createElement("button", { role: "link", className: "btn btn-link btn-app find-my-account pf-v6-u-ml-auto", onClick: onFindMyAccountClick, disabled: selectedAccountDetails.isFetching, "data-tracking-id": "get-support-find-my-account", type: "button" },
119
+ React.createElement(Trans, null, "Find my account")))),
108
120
  React.createElement("div", { className: "account-selector-wrapper" },
109
121
  React.createElement(AccountSelectorInternal, { selectedAccounts: [selectedAccount], canBookmarkAccount: canBookmarkAccounts, bookmarkedAccounts: bookmarkedGroupAccounts.data, id: "account-or-bookmark-selector", className: "account-selector", name: "account-or-bookmark-selector", placeholder: t(`Search for an account ${loggedInUserRights.data.isExternal() ? 'or select a bookmark' : ''} `), onSelect: onInternalAccountSelect, disabled: loggedInUserRights.data.isExternal() || selectedAccountDetails.isFetching, isInValid: isSelectedAccountSubscriptionAbused, restrictedOnSubscriptionAbuse: true })),
110
122
  canAccessManagedAccounts && !isEmpty(managedAccounts.data) && (React.createElement(ManagedAccountsDropdown, { className: "managed-account-selector pf-v6-u-mt-xl", onManagedAccountChange: onManagedAccountChange, managedAccounts: managedAccounts, selectedAccountNumber: accountNumber, disabled: selectedAccountDetails.isFetching })),
@@ -1 +1 @@
1
- {"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAkCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AA0BnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBAmYnD"}
1
+ {"version":3,"file":"RequestEscalationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAkBnD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,qBA6WnD"}
@@ -7,7 +7,6 @@ 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 { useApolloClient } from '@apollo/client/react';
11
10
  import { escalations, publicApi } from '@cee-eng/hydrajs';
12
11
  import { Button, Form, FormGroup, FormHelperText, Grid, GridItem, HelperText, HelperTextItem, Modal, ModalBody, ModalFooter, ModalHeader, Popover, TextArea, TextInput, Title, ValidatedOptions, } from '@patternfly/react-core';
13
12
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
@@ -20,16 +19,14 @@ import { useCaseDispatch } from '../../../context/CaseContext';
20
19
  import { useCaseDetailsPageDispatchContext, useCaseDetailsPageStateContext, } from '../../../context/CaseDetailsPageContext';
21
20
  import { useCaseDiscussionTabDispatchContext, useCaseDiscussionTabStateContext, } from '../../../context/CaseDiscussionTabContext';
22
21
  import { CustomerGEOs } from '../../../enums/customerGEOs';
23
- import { CREATE_RME_CASE_ESCALATION, GET_PARENT_ID, } from '../../../graphql';
24
22
  import { ESCALATION_SUBJECT_LENGTH_LIMIT } from '../../../reducers/CaseConstNTypes';
25
23
  import { fetchCaseEscalations } from '../../../reducers/CaseDetailsPageReducer';
26
24
  import { updateDiscussionStateComments } from '../../../reducers/CaseDiscussionTabReducer';
27
- import { checkForCaseStatusToggleOnAttachOrComment, fetchCaseDetailsHydra } from '../../../reducers/CaseReducer';
25
+ import { checkForCaseStatusToggleOnAttachOrComment, fetchCaseDetails } from '../../../reducers/CaseReducer';
28
26
  const customerGEOKeys = Object.keys(CustomerGEOs);
29
27
  export function RequestEscalationModal(props) {
30
28
  const { globalMetadataState: { loggedInUser, loggedInUserRights }, } = useGlobalStateContext();
31
29
  const { t } = useTranslation();
32
- const apolloClient = useApolloClient();
33
30
  const [categories, setCategories] = useState([]);
34
31
  const initialState = {
35
32
  subject: '',
@@ -45,7 +42,7 @@ export function RequestEscalationModal(props) {
45
42
  // checks if all the fields have values.
46
43
  const hasRequiredInfo = () => Object.keys(formState).reduce((accumulator, currentValue) => { var _a; return !accumulator ? accumulator : formState[currentValue].length > 0 && ((_a = formState[currentValue]) === null || _a === void 0 ? void 0 : _a.trim()); }, true);
47
44
  const setFormStateValue = (key, value) => setFormState((pre) => (Object.assign(Object.assign({}, pre), { [key]: value })));
48
- const [isCreatingEscalation, setIsCreatingEscalation] = useState(false);
45
+ const createEscalationFetch = useFetch(escalations.createIceEscalation, { propgateErrors: true });
49
46
  const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
50
47
  propgateErrors: true,
51
48
  });
@@ -65,12 +62,13 @@ export function RequestEscalationModal(props) {
65
62
  setFormState(Object.assign(Object.assign({}, formState), { rmeCategory: selection.value }));
66
63
  };
67
64
  const submitEscalationComment = (escalationNum, comment) => __awaiter(this, void 0, void 0, function* () {
68
- escalationNum && fetchCaseEscalations(caseDetailsPageDispatch, props.caseNumber, apolloClient, false);
65
+ escalationNum &&
66
+ fetchCaseEscalations(caseDetailsPageDispatch, props.caseNumber, loggedInUserRights.data.getAccountNumber(), false);
69
67
  yield postCommentRequest({ caseNumber: props.caseNumber, commentBody: comment, contentType: 'markdown' });
70
68
  updateDiscussionStateComments(dispatchDiscussion, caseDispatch, props.caseNumber, allDiscussions, sort, caseFeedbacksHydra.data, discussionFiltersListState);
71
69
  yield updateCaseRequest(props.caseNumber, { customerEscalation: true });
72
70
  checkForCaseStatusToggleOnAttachOrComment(caseDispatch, loggedInUserRights.data.isInternal(), props.caseStatus);
73
- yield fetchCaseDetailsHydra(caseDispatch, props.caseNumber, loggedInUserRights.data, loggedInUser.data, apolloClient);
71
+ yield fetchCaseDetails(caseDispatch, props.caseNumber, loggedInUserRights.data, loggedInUser.data);
74
72
  escalationNum &&
75
73
  ToastNotification.addSuccessMessage(t('Your escalation request has been successfully submitted.'));
76
74
  });
@@ -80,7 +78,7 @@ export function RequestEscalationModal(props) {
80
78
  setFormState(Object.assign(Object.assign({}, formState), { subject }));
81
79
  };
82
80
  const onCancel = () => {
83
- if (isPostingComment || isUpdatingCase || isCreatingEscalation)
81
+ if (isPostingComment || isUpdatingCase || createEscalationFetch.isFetching)
84
82
  return;
85
83
  setSubmitSaveButtonIsClicked(false);
86
84
  setFormState(initialState);
@@ -88,37 +86,11 @@ export function RequestEscalationModal(props) {
88
86
  props.onClose();
89
87
  };
90
88
  const onSubmit = () => __awaiter(this, void 0, void 0, function* () {
91
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
92
89
  setSubmitSaveButtonIsClicked(true);
93
90
  if (!hasRequiredInfo() || hasLargeSubject)
94
91
  return;
95
92
  try {
96
- setIsCreatingEscalation(true);
97
- const { data: parentData } = yield apolloClient.query({
98
- query: GET_PARENT_ID,
99
- variables: { where: { CaseNumber: { eq: props.caseNumber } } },
100
- });
101
- const parentId = (_f = (_e = (_d = (_c = (_b = (_a = parentData === null || parentData === void 0 ? void 0 : parentData.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.SalesforceSupportCase) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Id;
102
- if (!parentId)
103
- throw new Error('Could not find parent case ID');
104
- const { data: escalationData } = yield apolloClient.mutate({
105
- mutation: CREATE_RME_CASE_ESCALATION,
106
- variables: {
107
- caseInput: {
108
- Subject: formState.subject,
109
- Description: formState.description,
110
- Status: 'New',
111
- Origin: 'Portal ACE',
112
- Priority: props.severity ? `P${props.severity.charAt(0)}` : 'Medium',
113
- Type: 'RME',
114
- RecordTypeId: '012Ek00000JUtx5IAD',
115
- ParentId: parentId,
116
- EscalationCategory__c: formState.rmeCategory,
117
- ImpactOnUserOrBusiness__c: formState.businessImpactDescription,
118
- },
119
- },
120
- });
121
- const createdCaseNumber = (_k = (_j = (_h = (_g = escalationData === null || escalationData === void 0 ? void 0 : escalationData.salesforce_support_uiapi) === null || _g === void 0 ? void 0 : _g.CaseCreate) === null || _h === void 0 ? void 0 : _h.SalesforceSupportRecord) === null || _j === void 0 ? void 0 : _j.CaseNumber) === null || _k === void 0 ? void 0 : _k.value;
93
+ const res = yield createEscalationFetch.request(Object.assign(Object.assign({}, formState), { recordType: 'Active Customer Escalation', escalationSource: 'RME Escalation', status: 'New', accountNumber: loggedInUserRights.data.getAccountNumber(), caseNumber: props.caseNumber, requestor: `${loggedInUser.data.firstName} ${loggedInUser.data.lastName}`, requestorEmail: loggedInUser.data.email, requestorPhone: loggedInUser.data.phone, alreadyEscalated: false, severity: props.severity ? props.severity.charAt(0) : '3' }));
122
94
  const fullComment = t('### Request Management Escalation:\n\n**Subject**\n{{subject}}\n\n**Category**\n{{rmeCategory}}\n\n**Description**\n{{description}}\n\n**Expectations**\n{{expectations}}\n\n**Business Impact**\n{{businessImpactDescription}}', {
123
95
  category: formState.rmeCategory,
124
96
  subject: formState.subject,
@@ -128,7 +100,7 @@ export function RequestEscalationModal(props) {
128
100
  rmeCategory: formState.rmeCategory,
129
101
  });
130
102
  try {
131
- yield submitEscalationComment(createdCaseNumber, fullComment);
103
+ yield submitEscalationComment(res.name, fullComment);
132
104
  }
133
105
  catch (e) {
134
106
  // silently fails, escalation is created but adding comment fails
@@ -136,11 +108,9 @@ export function RequestEscalationModal(props) {
136
108
  props.onClose();
137
109
  }
138
110
  catch (error) {
111
+ //=> handle error
139
112
  setCreationError(true);
140
113
  }
141
- finally {
142
- setIsCreatingEscalation(false);
143
- }
144
114
  });
145
115
  const header = (React.createElement(Title, { className: "pf-v6-u-mb-0", id: "custom-header-label", headingLevel: "h1" },
146
116
  React.createElement(Trans, null, "Request an escalation"),
@@ -222,9 +192,9 @@ export function RequestEscalationModal(props) {
222
192
  : ValidatedOptions.default, placeholder: t('Does your business impact change with this escalation? Please describe how it changed.'), id: "business-impact-input", value: formState.businessImpactDescription, "aria-label": t('Business impact'), resizeOrientation: "vertical" }))))),
223
193
  React.createElement(ModalFooter, null,
224
194
  React.createElement(Button, { key: "submit", variant: "primary", onClick: onSubmit, "data-tracking-id": "request-rme-submit", isDisabled: submitButtonIsClicked &&
225
- (isPostingComment || isUpdatingCase || isCreatingEscalation || !hasRequiredInfo()), "aria-label": t('Submit') },
226
- (isPostingComment || isUpdatingCase || isCreatingEscalation) && (React.createElement(LoadingIndicator, { key: "loading", isInline: true })),
195
+ (isPostingComment || isUpdatingCase || createEscalationFetch.isFetching || !hasRequiredInfo()), "aria-label": t('Submit') },
196
+ (isPostingComment || isUpdatingCase || createEscalationFetch.isFetching) && (React.createElement(LoadingIndicator, { key: "loading", isInline: true })),
227
197
  ' ',
228
198
  t('Submit')),
229
- React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, "data-tracking-id": "request-rme-cancel", isDisabled: isCreatingEscalation || isPostingComment || isUpdatingCase, "aria-label": t('Cancel') }, t('Cancel')))));
199
+ React.createElement(Button, { key: "cancel", variant: "link", onClick: onCancel, "data-tracking-id": "request-rme-cancel", isDisabled: createEscalationFetch.isFetching || isPostingComment || isUpdatingCase, "aria-label": t('Cancel') }, t('Cancel')))));
230
200
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,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,qBAoPzC"}
1
+ {"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAE7D,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,qBAmPzC"}
@@ -7,9 +7,8 @@ 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 { useApolloClient } from '@apollo/client/react';
11
10
  import { CoverSpinner, ErrorBoundary, OverviewContentLoader, ToastNotification, useDocumentTitle, usePrevious, } from '@rh-support/components';
12
- import { fetchCaseDetails, GlobalMetadataStateContext, HostnameAwarenessModal } from '@rh-support/react-context';
11
+ import { GlobalMetadataStateContext, HostnameAwarenessModal } from '@rh-support/react-context';
13
12
  import { AbilityContext, CaseDetailsFields, resourceActions, resources } from '@rh-support/user-permissions';
14
13
  import { getUrlParsedParams, isValidCaseNumber } from '@rh-support/utils';
15
14
  import isEmpty from 'lodash/isEmpty';
@@ -21,7 +20,7 @@ import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
21
20
  import { useCaseDetailsPageDispatchContext } from '../../context/CaseDetailsPageContext';
22
21
  import { CaseReducerConstants } from '../../reducers/CaseConstNTypes';
23
22
  import { fetchAttachments, fetchCaseEscalations, fetchExternalTrackers, fetchFeedbacks, } from '../../reducers/CaseDetailsPageReducer';
24
- import { setCaseAccountNumber } from '../../reducers/CaseReducer';
23
+ import { fetchCaseDetails, setCaseAccountNumber } from '../../reducers/CaseReducer';
25
24
  import { CaseDetailsAside } from './CaseDetailsAside';
26
25
  import { CaseDetailsErrorMessage } from './CaseDetailsErrorMessage';
27
26
  import CaseDetailsModals from './CaseDetailsModals';
@@ -29,9 +28,8 @@ import { CaseDetailsTabs } from './CaseDetailsTabs';
29
28
  import CaseOverview from './CaseOverview';
30
29
  import { PDFContext } from './PDFContainer';
31
30
  export default function Case(props) {
32
- const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
31
+ const { globalMetadataState: { loggedInUserRights, loggedInUsersAccount, loggedInUser }, } = useContext(GlobalMetadataStateContext);
33
32
  const caseDetailsPageDispatch = useCaseDetailsPageDispatchContext();
34
- const apolloClient = useApolloClient();
35
33
  const { t } = useTranslation();
36
34
  // The `path` lets us build <Route> paths that are
37
35
  // relative to the parent route, while the `url` lets
@@ -109,11 +107,11 @@ export default function Case(props) {
109
107
  caseDispatch(action);
110
108
  }
111
109
  };
112
- yield fetchCaseDetails(safeDispatch, apolloClient, targetCaseNumber, setCaseAccountNumber);
110
+ yield fetchCaseDetails(safeDispatch, targetCaseNumber, loggedInUserRights.data, loggedInUser.data);
113
111
  if (currentCaseRef.current !== targetCaseNumber)
114
112
  return;
115
113
  if (canSeeRMEs) {
116
- fetchCaseEscalations((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber, apolloClient);
114
+ fetchCaseEscalations((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber, loggedInUserRights.data.getAccountNumber());
117
115
  }
118
116
  if (canSeeAttachments) {
119
117
  fetchAttachments((action) => currentCaseRef.current === targetCaseNumber && caseDetailsPageDispatch(action), targetCaseNumber, loggedInUsersAccount.data.secureSupport);
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAahF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA2Z7C"}
1
+ {"version":3,"file":"CaseDetailsAside.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsAside.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAA2D,MAAM,OAAO,CAAC;AAYhF,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;CACtB;AAMD,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBAyY7C"}
@@ -7,7 +7,6 @@ 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 { useQuery } from '@apollo/client/react';
11
10
  import { Button, Checkbox, Icon, Popover, PopoverPosition, Switch, Tooltip } from '@patternfly/react-core';
12
11
  import InfoCircleIcon from '@patternfly/react-icons/dist/js/icons/info-circle-icon';
13
12
  import ListIcon from '@patternfly/react-icons/dist/js/icons/list-icon';
@@ -26,13 +25,12 @@ import { Link } from 'react-router-dom';
26
25
  import { useCaseSelector } from '../../context/CaseContext';
27
26
  import { useCaseDetailsPageStateContext } from '../../context/CaseDetailsPageContext';
28
27
  import { useRecommendationStateContext } from '../../context/RecommendationContext';
29
- import { GET_ESCALATION_DETAILS, GET_PARENT_ID } from '../../graphql';
30
28
  import { ActiveCustomerEscalation } from './ActiveCustomerEscalation';
31
29
  import { CaseSolutions } from './CaseSolutions';
32
30
  import { PDFContext } from './PDFContainer';
33
31
  import { ESSRemoteSession, RemoteSessionAgreement } from './RequestRemoteSession';
34
32
  export function CaseDetailsAside(props) {
35
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
33
+ var _a, _b;
36
34
  const { t } = useTranslation();
37
35
  const { severity, status, isFetchingCaseDetails, isFetchingCaseDetailsError, acceptedRemoteSessionTerms, product, waitingOnCallback, groupNumber, ownersCaseGroups, } = useCaseSelector((state) => ({
38
36
  severity: state.caseDetails.severity,
@@ -50,15 +48,6 @@ export function CaseDetailsAside(props) {
50
48
  const isCreateRMEVisible = (caseEscalations.data || []).length === 0 || caseEscalations.data.every((item) => item.status === 'Closed');
51
49
  const { recommendationState: { isLoadingRecommendations, allDocs }, } = useRecommendationStateContext();
52
50
  const { caseNumber } = props;
53
- const { data: parentData, loading: isLoadingParentId } = useQuery(GET_PARENT_ID, {
54
- variables: { where: { CaseNumber: { eq: caseNumber } } },
55
- });
56
- const parentId = (_f = (_e = (_d = (_c = (_b = (_a = parentData === null || parentData === void 0 ? void 0 : parentData.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.SalesforceSupportCase) === null || _c === void 0 ? void 0 : _c.edges) === null || _d === void 0 ? void 0 : _d[0]) === null || _e === void 0 ? void 0 : _e.node) === null || _f === void 0 ? void 0 : _f.Id;
57
- const { loading: isLoadingEscalations } = useQuery(GET_ESCALATION_DETAILS, {
58
- variables: { where: { ParentId: { eq: parentId } } },
59
- skip: !parentId,
60
- });
61
- const isEscalationsFetching = isLoadingParentId || isLoadingEscalations;
62
51
  const canCreateRME = ability.can(resourceActions.CREATE, resources.RME_ESCALATION);
63
52
  const canCreateICE = ability.can(resourceActions.CREATE, resources.ICE_ESCALATION);
64
53
  const canSeeToggleCustomerView = ability.can(resourceActions.PATCH, resources.CASE_DETAILS, CaseDetailsFields.CASE_DETAILS_TOGGLE_CUSTOMER_VIEW);
@@ -72,8 +61,7 @@ export function CaseDetailsAside(props) {
72
61
  const isXLScreen = breakPoint.xl;
73
62
  const toggleCustomerViewRef = useRef(null);
74
63
  const isFirstMountRef = useRef(true);
75
- const { globalMetadataState: { navBarRef, viewAsCustomer, loggedInUsersAccount, allProducts, loggedInUserRights }, } = useGlobalStateContext();
76
- const isInternal = (_g = loggedInUserRights.data) === null || _g === void 0 ? void 0 : _g.isInternal();
64
+ const { globalMetadataState: { navBarRef, viewAsCustomer, loggedInUsersAccount, allProducts }, } = useGlobalStateContext();
77
65
  const isSecureSupportAccount = loggedInUsersAccount.data.secureSupport;
78
66
  // To check if user has read only access
79
67
  const canReadCase = ability.can(resourceActions.READ, resources.CASE_DETAILS);
@@ -89,14 +77,9 @@ export function CaseDetailsAside(props) {
89
77
  const [viewAsInternalPref, setViewAsInternalPref] = useState();
90
78
  const [isDefaultBoxChecked, setIsDefaultBoxChecked] = useState(true);
91
79
  const { isExportingPDF } = useContext(PDFContext);
92
- // TODO: When casegroups is deployed on SCT stage, update this logic to properly gate on ownersCaseGroups.data
93
80
  const isWritePermissionforCase = useMemo(() => {
94
- if (isInternal || groupNumber === '-1')
95
- return true;
96
- if (!ownersCaseGroups.data)
97
- return true;
98
- return (ownersCaseGroups.data || []).some((group) => group.groupNum === groupNumber);
99
- }, [groupNumber, ownersCaseGroups.data, isInternal]);
81
+ return (ownersCaseGroups.data || []).some((group) => group.groupNum === groupNumber) || groupNumber === '-1';
82
+ }, [groupNumber, ownersCaseGroups.data]);
100
83
  useEffect(() => {
101
84
  const userPreferredCaseView = () => __awaiter(this, void 0, void 0, function* () {
102
85
  try {
@@ -174,7 +157,7 @@ export function CaseDetailsAside(props) {
174
157
  setIsDefaultBoxChecked(!isDefaultBoxChecked);
175
158
  toggleViewAsCustomerFlag(globalMetadataDispatchContext);
176
159
  };
177
- const isSideBarExpanded = (_h = caseDetailsAsidePanelRef.current) === null || _h === void 0 ? void 0 : _h.expanded;
160
+ const isSideBarExpanded = (_a = caseDetailsAsidePanelRef.current) === null || _a === void 0 ? void 0 : _a.expanded;
178
161
  if (isFetchingCaseDetails || isFetchingCaseDetailsError)
179
162
  return null;
180
163
  const renderCasePrefPopoverText = () => {
@@ -186,7 +169,7 @@ export function CaseDetailsAside(props) {
186
169
  }
187
170
  };
188
171
  // To check if the user is ESS Customer and Product has ESS Support
189
- const isESSCustomer = isSpecialSupportOfferingEnabled((_j = allProducts.data) === null || _j === void 0 ? void 0 : _j.productsResult, selectedProduct);
172
+ const isESSCustomer = isSpecialSupportOfferingEnabled((_b = allProducts.data) === null || _b === void 0 ? void 0 : _b.productsResult, selectedProduct);
190
173
  return (React.createElement("aside", { className: `grid-aside ${isSideBarExpanded ? '' : 'sidebar-collapsed'} ` },
191
174
  React.createElement("pfe-collapse-toggle", { "aria-label": `${isSideBarExpanded ? t('Collapse sidebar') : t('Expand sidebar')}`, "aria-controls": "case-details-aside-content", onClick: onToggleAside }, isSideBarExpanded ? (React.createElement("div", { className: `sidebar-header ${isExportingPDF ? 'hide-in-pdf' : ''}` },
192
175
  React.createElement("div", { className: "case-detail-collapse-panel" },
@@ -203,7 +186,7 @@ export function CaseDetailsAside(props) {
203
186
  !isLoadingRecommendations && allDocs.length > 0 && (React.createElement(Tooltip, { content: t('Top recommendations'), position: "left" },
204
187
  React.createElement(Button, { icon: React.createElement(Icon, { className: "pf-v6-u-p-sm", size: "lg" },
205
188
  React.createElement(ListIcon, null)), variant: "link", onClick: () => setSectionToScollRef(topSolutionsRef), className: "sidebar-section-toggle-btn", "aria-label": t('Top recommendations') }))),
206
- !isEscalationsFetching && (canCreateICE || (canCreateRME && isCreateRMEVisible)) && (React.createElement(Tooltip, { content: t('Request an escalation'), position: "left" },
189
+ !caseEscalations.isFetching && (canCreateICE || (canCreateRME && isCreateRMEVisible)) && (React.createElement(Tooltip, { content: t('Request an escalation'), position: "left" },
207
190
  React.createElement(Button, { icon: React.createElement(Icon, { className: "pf-v6-u-p-sm", size: "lg" },
208
191
  React.createElement(TrendUpIcon, null)), variant: "link", className: "sidebar-section-toggle-btn", onClick: () => setSectionToScollRef(createEscalationRef), "aria-label": t('Request an escalation') }))))))),
209
192
  React.createElement("pfe-collapse-panel", { className: "sidebar-content", "pfe-animation": "false", id: "case-details-aside-content", ref: caseDetailsAsidePanelRef },
@@ -230,6 +213,6 @@ export function CaseDetailsAside(props) {
230
213
  React.createElement(ESSRemoteSession, { waitingOnCallback: waitingOnCallback, remoteSessionTermsAcked: acceptedRemoteSessionTerms, caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, readOnly: canReadCase }))),
231
214
  !isESSCustomer && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading remote session agreement section') } },
232
215
  React.createElement(RemoteSessionAgreement, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef, waitingOnCallback: waitingOnCallback, acceptedRemoteSessionTerms: acceptedRemoteSessionTerms && waitingOnCallback, readOnly: canReadCase }))),
233
- !isEscalationsFetching && isWritePermissionforCase && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading customer escalation section') } },
216
+ !caseEscalations.isFetching && isWritePermissionforCase && (React.createElement(ErrorBoundary, { errorMsgInfo: { message: t('There was an error loading customer escalation section') } },
234
217
  React.createElement(ActiveCustomerEscalation, { caseNumber: caseNumber, caseSeverity: severity, caseStatus: status, ref: createEscalationRef })))))));
235
218
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA2BlE,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,qBAqS5C"}
1
+ {"version":3,"file":"CaseDetailsTabs.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsTabs.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAEtE,OAAO,EAAE,mBAAmB,EAAa,MAAM,kBAAkB,CAAC;AA0BlE,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,qBAoS5C"}
@@ -17,10 +17,7 @@ import CaseDetailsManagement from './Tabs/CaseDetails/CaseDetailsManagement';
17
17
  import CaseHistory from './Tabs/CaseHistory/CaseHistory';
18
18
  import { CaseSummary } from './Tabs/CaseSummary/CaseSummary';
19
19
  const RelatedTasks = React.lazy(() => import(/* webpackChunkName: 'CaseBugzilla' */ './Tabs/RelatedTasks/RelatedTasks'));
20
- // TODO: Re-enable Action Plan tab when ready
21
- // const CaseActionPlan = React.lazy(
22
- // () => import(/* webpackChunkName: 'CaseActionPlan' */ './Tabs/CaseActionPlan/CaseActionPlan')
23
- // );
20
+ const CaseActionPlan = React.lazy(() => import(/* webpackChunkName: 'CaseActionPlan' */ './Tabs/CaseActionPlan/CaseActionPlan'));
24
21
  const CasePrivateNotes = React.lazy(() => import(/* webpackChunkName: 'CasePrivateNotes' */ './Tabs/CasePrivateNotes/CasePrivateNotes'));
25
22
  const CaseDiscussion = React.lazy(() => import(/* webpackChunkName: 'CaseDiscussion' */ './Tabs/CaseDiscussion/CaseDiscussion'));
26
23
  const RMEEscalationList = React.lazy(() => import(/* webpackChunkName: 'RMEEscalationList' */ './Tabs/RMEEscalations/RMEEscalationList'));
@@ -52,7 +49,7 @@ export function CaseDetailsTabs(props) {
52
49
  // const bugZillaTabRef: React.MutableRefObject<HTMLDivElement> = useRef(null);
53
50
  const managementTabRef = useRef(null);
54
51
  const privateNotesTabRef = useRef(null);
55
- // const actionPlanTabRef: React.MutableRefObject<HTMLDivElement> = useRef(null);
52
+ const actionPlanTabRef = useRef(null);
56
53
  const escalationTabRef = useRef(null);
57
54
  const relatedTasksRef = useRef(null);
58
55
  const caseHistoryTabRef = useRef(null);
@@ -89,15 +86,14 @@ export function CaseDetailsTabs(props) {
89
86
  title: CaseDetailsTabsEnum.RELATED_TASKS,
90
87
  component: React.createElement(RelatedTasks, null),
91
88
  });
92
- // TODO: Re-enable Action Plan tab when ready
93
- // tabsToRender.push({
94
- // 'data-tracking-id': 'case-details-actionplan-tab',
95
- // key: 'action plan',
96
- // ref: actionPlanTabRef,
97
- // title: CaseDetailsTabsEnum.ACTION_PLAN,
98
- // routePath: 'plan',
99
- // component: <CaseActionPlan caseNumber={caseNumber} />,
100
- // });
89
+ tabsToRender.push({
90
+ 'data-tracking-id': 'case-details-actionplan-tab',
91
+ key: 'action plan',
92
+ ref: actionPlanTabRef,
93
+ title: CaseDetailsTabsEnum.ACTION_PLAN,
94
+ routePath: 'plan',
95
+ component: React.createElement(CaseActionPlan, { caseNumber: caseNumber }),
96
+ });
101
97
  canSeePrivateNotes &&
102
98
  tabsToRender.push({
103
99
  'data-tracking-id': 'case-details-pvtnotes-tab',
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AAiCA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA2BvE,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,qBAkgBjD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/CaseEditView/CaseOverview/index.tsx"],"names":[],"mappings":"AA+BA,OAAO,KAAkD,MAAM,OAAO,CAAC;AA4BvE,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,qBA0fjD"}