@rh-support/troubleshoot 2.6.283 → 2.6.292

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 (108) hide show
  1. package/lib/esm/components/AccountInfo/AccountSelector.d.ts.map +1 -1
  2. package/lib/esm/components/AccountInfo/AccountSelector.js +28 -40
  3. package/lib/esm/components/AccountInfo/OwnerSelector.d.ts.map +1 -1
  4. package/lib/esm/components/AccountInfo/OwnerSelector.js +2 -2
  5. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/ActiveCustomerEscalation/RequestEscalationModal.js +43 -12
  7. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/Case.js +7 -5
  9. package/lib/esm/components/CaseEditView/CaseDetailsAside.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/CaseDetailsAside.js +28 -30
  11. package/lib/esm/components/CaseEditView/CaseDetailsTabs.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/CaseDetailsTabs.js +14 -10
  13. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/CaseOverview/index.js +24 -18
  15. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +38 -34
  17. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  18. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +9 -9
  19. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  20. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +19 -59
  21. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.d.ts.map +1 -1
  22. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/Summary.js +16 -9
  23. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  24. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +5 -3
  25. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.d.ts.map +1 -1
  26. package/lib/esm/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.js +3 -2
  27. package/lib/esm/components/CaseInformation/CaseGroup.d.ts.map +1 -1
  28. package/lib/esm/components/CaseInformation/CaseGroup.js +8 -5
  29. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  30. package/lib/esm/components/CaseInformation/CaseInformation.js +7 -5
  31. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  32. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +37 -24
  33. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  34. package/lib/esm/components/CaseInformation/SupportLevel.js +32 -55
  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 +4 -7
  38. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  39. package/lib/esm/components/IdeaInformation/IdeaInformation.js +10 -10
  40. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  41. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +4 -2
  42. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
  43. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  44. package/lib/esm/components/ProductSelector/AllProductsSelector.js +3 -15
  45. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  46. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +13 -37
  47. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  48. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +19 -53
  49. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  50. package/lib/esm/components/ProductSelector/ProductSelector.js +1 -3
  51. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  52. package/lib/esm/components/Review/Review.js +16 -18
  53. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  54. package/lib/esm/components/SessionRestore/SessionRestore.js +4 -2
  55. package/lib/esm/components/TroubleshootSection/TroubleshootSection.d.ts.map +1 -1
  56. package/lib/esm/components/TroubleshootSection/TroubleshootSection.js +1 -0
  57. package/lib/esm/components/UpdateSeverityModal/UpdateSeverityModal.js +1 -1
  58. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  59. package/lib/esm/components/shared/useIsSectionValid.js +50 -64
  60. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  61. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +39 -10
  62. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  63. package/lib/esm/components/wizardLayout/WizardLayout.js +6 -7
  64. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  65. package/lib/esm/components/wizardLayout/WizardNavigation.js +10 -9
  66. package/lib/esm/css/app.css +2 -2
  67. package/lib/esm/graphql/index.d.ts +4 -0
  68. package/lib/esm/graphql/index.d.ts.map +1 -0
  69. package/lib/esm/graphql/index.js +3 -0
  70. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts +2 -0
  71. package/lib/esm/graphql/mutations/createRMECaseEscalation.d.ts.map +1 -0
  72. package/lib/esm/graphql/mutations/createRMECaseEscalation.js +24 -0
  73. package/lib/esm/graphql/mutations/index.d.ts +2 -0
  74. package/lib/esm/graphql/mutations/index.d.ts.map +1 -0
  75. package/lib/esm/graphql/mutations/index.js +1 -0
  76. package/lib/esm/graphql/queries/getEscalationDetails.d.ts +2 -0
  77. package/lib/esm/graphql/queries/getEscalationDetails.d.ts.map +1 -0
  78. package/lib/esm/graphql/queries/getEscalationDetails.js +24 -0
  79. package/lib/esm/graphql/queries/getParentId.d.ts +2 -0
  80. package/lib/esm/graphql/queries/getParentId.d.ts.map +1 -0
  81. package/lib/esm/graphql/queries/getParentId.js +16 -0
  82. package/lib/esm/graphql/queries/index.d.ts +3 -0
  83. package/lib/esm/graphql/queries/index.d.ts.map +1 -0
  84. package/lib/esm/graphql/queries/index.js +2 -0
  85. package/lib/esm/graphql/schemas/escalation.d.ts +85 -0
  86. package/lib/esm/graphql/schemas/escalation.d.ts.map +1 -0
  87. package/lib/esm/graphql/schemas/escalation.js +1 -0
  88. package/lib/esm/graphql/schemas/index.d.ts +2 -0
  89. package/lib/esm/graphql/schemas/index.d.ts.map +1 -0
  90. package/lib/esm/graphql/schemas/index.js +1 -0
  91. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  92. package/lib/esm/hooks/useResetCaseCreate.js +18 -11
  93. package/lib/esm/reducers/CaseConstNTypes.d.ts +86 -2
  94. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  95. package/lib/esm/reducers/CaseConstNTypes.js +5 -0
  96. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts +3 -1
  97. package/lib/esm/reducers/CaseDetailsPageReducer.d.ts.map +1 -1
  98. package/lib/esm/reducers/CaseDetailsPageReducer.js +22 -5
  99. package/lib/esm/reducers/CaseHelpers.d.ts +2 -1
  100. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  101. package/lib/esm/reducers/CaseHelpers.js +39 -2
  102. package/lib/esm/reducers/CaseOverviewReducer.d.ts +3 -1
  103. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  104. package/lib/esm/reducers/CaseOverviewReducer.js +7 -5
  105. package/lib/esm/reducers/CaseReducer.d.ts +28 -9
  106. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  107. package/lib/esm/reducers/CaseReducer.js +105 -31
  108. package/package.json +5 -5
@@ -7,9 +7,11 @@ 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';
10
11
  import { useDebounce } from '@rh-support/components';
11
12
  import { GlobalMetadataStateContext, useUserPreferences } from '@rh-support/react-context';
12
13
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
14
+ import { resolveProductServiceLevelsForAccount } from '@rh-support/utils';
13
15
  import findIndex from 'lodash/findIndex';
14
16
  import includes from 'lodash/includes';
15
17
  import isEmpty from 'lodash/isEmpty';
@@ -23,7 +25,7 @@ import { TCDispatchContext, TCStateContext } from '../../context/TopContentConte
23
25
  import { useResetCaseCreate } from '../../hooks/useResetCaseCreate';
24
26
  import { CASE_DEATILS_SOURCE_REFERRER_LIMIT } from '../../reducers/CaseConstNTypes';
25
27
  import { getDescriptionWOQues } from '../../reducers/CaseHelpers';
26
- import { setCaseAccountNumber, setCaseDetails, setCaseOwner } from '../../reducers/CaseReducer';
28
+ import { setCaseAccountNumber, setCaseDetails, setCaseOwner, setCaseState } from '../../reducers/CaseReducer';
27
29
  import { AppRouteSections } from '../../reducers/RouteConstNTypes';
28
30
  import { setActiveSectionChanged, setRouteFlags, updateisNextBtnClickedToShowValidationError, } from '../../reducers/RouteReducer';
29
31
  import { fetchEdmundAbbottRules } from '../../reducers/RulesReducer';
@@ -36,11 +38,11 @@ export function GlobalTroubleshootEffects(props) {
36
38
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
37
39
  const { globalMetadataState: { allProducts, loggedInUser, managedAccounts, loggedInUserRights, loggedInUsersAccount }, } = useContext(GlobalMetadataStateContext);
38
40
  const { sessionRestore: { activeSessionId }, } = useContext(SessionRestoreStateContext);
39
- const { accountNumber, product, version, contactSsoUsername, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType, language, selectedAccountDetails, } = useCaseSelector((state) => ({
41
+ const { accountNumber, contactSsoUsername, product, version, summary, issue, environment, periodicityOfIssue, timeFramesAndUrgency, caseType, language, selectedAccountDetails, } = useCaseSelector((state) => ({
40
42
  accountNumber: state.caseDetails.accountNumberRef,
43
+ contactSsoUsername: state.caseDetails.contactSSOName,
41
44
  product: state.caseDetails.product,
42
45
  version: state.caseDetails.version,
43
- contactSsoUsername: state.caseDetails.contactSSOName,
44
46
  summary: state.caseDetails.summary,
45
47
  issue: state.caseDetails.issue,
46
48
  environment: state.caseDetails.environment,
@@ -51,6 +53,7 @@ export function GlobalTroubleshootEffects(props) {
51
53
  selectedAccountDetails: state.selectedAccountDetails,
52
54
  }), isEqual);
53
55
  const caseDispatch = useCaseDispatch();
56
+ const apolloClient = useApolloClient();
54
57
  const isCaseCreate = RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true';
55
58
  const urlQueryParams = RouteUtils.getQueryParams(props.routeProps);
56
59
  const isFirstMount = useRef(true);
@@ -155,16 +158,24 @@ export function GlobalTroubleshootEffects(props) {
155
158
  // eslint-disable-next-line react-hooks/exhaustive-deps
156
159
  }, [dispatchToRouteReducer, props.routeProps.location.pathname, isCaseCreate, isSearchIntent]);
157
160
  /**
158
- * Setting Default AccountNumber and ContactSsoUsername from loggedInUsersAccount
159
- * Disabling exhaustive-deps rule as we don't want to reset default values if user manually clears these from UI.
160
- * This is a one time thing when loggedInUserJwtToken is set.
161
+ * Auto-populate account and owner from logged-in user for external users only.
162
+ * Internal users select account/owner manually on Get Support.
161
163
  */
162
164
  useEffect(() => {
163
- isEmpty(accountNumber) && setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber());
165
+ var _a;
166
+ if (!isCaseCreate)
167
+ return;
168
+ if (loggedInUserRights.data.isInternal())
169
+ return;
170
+ if (isEmpty(accountNumber) && !isEmpty((_a = loggedInUsersAccount.data) === null || _a === void 0 ? void 0 : _a.accountNumber)) {
171
+ setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data, apolloClient);
172
+ }
164
173
  isEmpty(contactSsoUsername) &&
165
- setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), product, undefined, undefined, true);
174
+ setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), product, undefined, undefined, true, undefined, true, undefined, undefined, loggedInUserRights.data.isInternal()
175
+ ? accountNumber || loggedInUserRights.data.getAccountNumber()
176
+ : undefined);
166
177
  // eslint-disable-next-line react-hooks/exhaustive-deps
167
- }, [caseDispatch, loggedInUserRights.data]);
178
+ }, [caseDispatch, loggedInUserRights.data, loggedInUsersAccount.data, apolloClient]);
168
179
  /**
169
180
  * handling top content call
170
181
  */
@@ -176,6 +187,22 @@ export function GlobalTroubleshootEffects(props) {
176
187
  return;
177
188
  fetchTopContent(tcDispatch, { product, version });
178
189
  }, [product, tcDispatch, topContentPayload, version]);
190
+ useEffect(() => {
191
+ if (isEmpty(product) || selectedAccountDetails.isFetching || isEmpty(selectedAccountDetails.data))
192
+ return;
193
+ const serviceLevels = resolveProductServiceLevelsForAccount(selectedAccountDetails.data, allProducts.data.productsResult, product);
194
+ if (!serviceLevels)
195
+ return;
196
+ setCaseState(caseDispatch, {
197
+ productServiceLevel: serviceLevels.productServiceLevel,
198
+ otherServiceLevels: serviceLevels.otherServiceLevels,
199
+ selectedEntitlementId: serviceLevels.defaultEntitlementId,
200
+ });
201
+ if (serviceLevels.entitlementSla) {
202
+ setCaseDetails(caseDispatch, { entitlementSla: serviceLevels.entitlementSla });
203
+ }
204
+ // eslint-disable-next-line react-hooks/exhaustive-deps
205
+ }, [product, selectedAccountDetails.data, allProducts.data.productsResult]);
179
206
  // set case language to preferred language
180
207
  useEffect(() => {
181
208
  const userOriginalPreferredLanguage = () => __awaiter(this, void 0, void 0, function* () {
@@ -252,11 +279,13 @@ export function GlobalTroubleshootEffects(props) {
252
279
  * each case create. Currently we refetch the account details when user clicks on troubleshoot a new session
253
280
  */
254
281
  useEffect(() => {
282
+ if (loggedInUserRights.data.isInternal())
283
+ return;
255
284
  if (!isEmpty(loggedInUsersAccount.data) &&
256
285
  !isEmpty(selectedAccountDetails.data) &&
257
286
  loggedInUserRights.data.isAccountSameAsLoggedInAccount(selectedAccountDetails.data.accountNumber) &&
258
287
  !isEqual(loggedInUsersAccount.data, selectedAccountDetails.data)) {
259
- setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data);
288
+ setCaseAccountNumber(caseDispatch, loggedInUsersAccount.data.accountNumber, true, loggedInUsersAccount.data, apolloClient);
260
289
  }
261
290
  // eslint-disable-next-line react-hooks/exhaustive-deps
262
291
  }, [loggedInUsersAccount.data]);
@@ -1 +1 @@
1
- {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AASA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAcvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAqLzC"}
1
+ {"version":3,"file":"WizardLayout.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardLayout.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAcvG,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,qBAoLzC"}
@@ -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 { useApolloClient } from '@apollo/client/react';
10
11
  import { Grid, GridItem } from '@patternfly/react-core';
11
12
  import { SupportFeedbackForm } from '@rh-support/components';
12
13
  import { fetchProducts, GlobalMetadataDispatchContext, GlobalMetadataStateContext } from '@rh-support/react-context';
@@ -37,10 +38,9 @@ export function WizardLayout(props) {
37
38
  const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
38
39
  const { getMetadata } = useMetadata();
39
40
  const [isAIChatMode, setIsAIChatMode] = useState(false);
40
- const { caseCreationError, contactSSOName, caseType, product, caseState, hasInvalidEntitlements } = useCaseSelector((state) => ({
41
+ const { caseCreationError, caseType, product, caseState, hasInvalidEntitlements } = useCaseSelector((state) => ({
41
42
  caseState: state,
42
43
  caseCreationError: state.caseCreationError,
43
- contactSSOName: state.caseDetails.contactSSOName,
44
44
  caseType: state.caseDetails.caseType,
45
45
  product: state.caseDetails.product,
46
46
  hasInvalidEntitlements: state.hasInvalidEntitlements,
@@ -50,6 +50,7 @@ export function WizardLayout(props) {
50
50
  const { sessionRestore: { activeSessionId, previousSessions }, } = useContext(SessionRestoreStateContext);
51
51
  const { globalMetadataState: { allProducts, loggedInUser, loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
52
52
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
53
+ const apolloClient = useApolloClient();
53
54
  const canAddAttachments = ability.can(resourceActions.PATCH, resources.CASE_CREATE, CaseListFields.ATTACHMENTS);
54
55
  const { attachmentState } = useContext(AttachmentStateContext);
55
56
  const isAnyFileAttachedLocal = isAnyFileAttached(attachmentState.caseFiles.selectedLocalFiles);
@@ -101,7 +102,7 @@ export function WizardLayout(props) {
101
102
  "Try submitting again after a minute. Please ",
102
103
  React.createElement(SupportFeedbackForm, { isInline: true }),
103
104
  " if you continue to see this message.")));
104
- submitCase(caseDispatch, sessionRestoreDispatch, caseState, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false, RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true', sessionItem);
105
+ submitCase(caseDispatch, sessionRestoreDispatch, caseState, isCaseCreate, errorMessageCaseSubmit500, loggedInUser.data.ssoUsername, loggedInUsersAccount === null || loggedInUsersAccount === void 0 ? void 0 : loggedInUsersAccount.data.secureSupport, isReSubmitting || false, RouteUtils.getQueryParams(props.routeProps).caseCreate === 'true', sessionItem, apolloClient);
105
106
  // reset viewedModals on case submit
106
107
  viewedConfirmationModalsList.current = [];
107
108
  !isReSubmitting &&
@@ -120,11 +121,9 @@ export function WizardLayout(props) {
120
121
  }
121
122
  setConfirmationModalType(null);
122
123
  };
123
- // Loading app metadata
124
124
  useEffect(() => {
125
- fetchProducts(dispatchToGlobalMetadataReducer, contactSSOName);
126
- // eslint-disable-next-line react-hooks/exhaustive-deps
127
- }, [contactSSOName, dispatchToGlobalMetadataReducer]);
125
+ fetchProducts(dispatchToGlobalMetadataReducer, apolloClient);
126
+ }, [dispatchToGlobalMetadataReducer, apolloClient]);
128
127
  return (React.createElement(React.Fragment, null,
129
128
  React.createElement(GlobalTroubleshootEffects, { routeProps: props.routeProps }),
130
129
  activeSection !== AppRouteSections.DESCRIBE_IDEA && (React.createElement(PreCaseConfirmationModals, { onModalClose: onModalClose, confirmationModalType: confirmationModalType, onConfirm: () => submitCaseAndNavigate(caseCreationError) })),
@@ -1 +1 @@
1
- {"version":3,"file":"WizardNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/wizardLayout/WizardNavigation.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAmE,MAAM,OAAO,CAAC;AAExF,OAAO,E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CAAgC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACjF,aAAa,CAAC,EAAE,GAAG,CAAC;IACpB,oBAAoB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IACrE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,sBAAsB,CAAC,EAAE,MAAM,IAAI,CAAC;IACpC,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC;AAGD,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,qBA8atC;kBA9aQ,gBAAgB;;;AAgbzB,eAAe,gBAAgB,CAAC"}
@@ -12,7 +12,6 @@ import { Button, ButtonVariant, WizardFooterWrapper } from '@patternfly/react-co
12
12
  import { useFetch, usePrevious } from '@rh-support/components';
13
13
  import { GlobalMetadataStateContext, useCanCreateCase } from '@rh-support/react-context';
14
14
  import { dtmTrackEventCaseCreationStepEncountered, getResTypeFromUrl, isFunctionalCookieAccepted, PreviousToNewCaseTypeMap, scrollIntoView, } from '@rh-support/utils';
15
- import find from 'lodash/find';
16
15
  import isEmpty from 'lodash/isEmpty';
17
16
  import isEqual from 'lodash/isEqual';
18
17
  import React, { useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
@@ -32,14 +31,15 @@ import { RecommendationFeedbackModal } from '../Recommendations/RecommendationFe
32
31
  import { useIsSectionValid } from '../shared/useIsSectionValid';
33
32
  const defaultProps = {};
34
33
  function WizardNavigation(props) {
35
- var _a, _b;
36
34
  const { t } = useTranslation();
37
35
  const { isVariationA } = useAB();
38
36
  const canCreateCase = useCanCreateCase();
39
37
  const { recommendationState } = useContext(RecommendationStateContext);
40
38
  const aiResponseState = useAIResponseState();
41
- const { routeState: { activeSection, isNextBtnClickedToShowValidationError, noValidEntitlement, isSearchIntent, isCaseCreate, }, } = useContext(RouteContext);
42
- const { globalMetadataState: { loggedInUsersAccount, allProducts, navBarRef }, } = useContext(GlobalMetadataStateContext);
39
+ const { routeState: { activeSection, isNextBtnClickedToShowValidationError,
40
+ // noValidEntitlement,
41
+ isCaseCreate, }, } = useContext(RouteContext);
42
+ const { globalMetadataState: { loggedInUsersAccount, navBarRef }, } = useContext(GlobalMetadataStateContext);
43
43
  const { caseState, issue, summary, product, version, caseType } = useCaseSelector((state) => ({
44
44
  caseState: state,
45
45
  issue: state.caseDetails.issue,
@@ -49,8 +49,11 @@ function WizardNavigation(props) {
49
49
  caseType: state.caseDetails.caseType,
50
50
  manageSupportCases: state.selectedOwner.data.manageSupportCases,
51
51
  }), isEqual);
52
- // To check if the user is entitled or not
53
- const isEntitledProduct = (_b = find((_a = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, (p) => p.product === caseState.caseDetails.product)) === null || _b === void 0 ? void 0 : _b.isEntitledProduct;
52
+ // isEntitledProduct commented out; product-level entitlement now resolved from SFDCProductJSON__c
53
+ // const isEntitledProduct = find(
54
+ // allProducts?.data?.productsResult,
55
+ // (p) => p.product === caseState.caseDetails.product
56
+ // )?.isEntitledProduct;
54
57
  const dispatchToRouteReducer = useContext(RouteDispatchContext);
55
58
  const { activeSectionError, isSectionValidFn } = useIsSectionValid(activeSection);
56
59
  const [isRecsModalVisible, setIsRecsModalVisible] = useState(false);
@@ -251,7 +254,6 @@ function WizardNavigation(props) {
251
254
  }
252
255
  catch (e) { }
253
256
  });
254
- const isEntitledProductLocal = isSearchIntent ? true : isEntitledProduct;
255
257
  const nextButtonDisabledLogic = () => {
256
258
  const isLoadingARH = props.isLoadingARH &&
257
259
  props.activeStep.id === AppRouteSections.RESOURCES &&
@@ -263,10 +265,9 @@ function WizardNavigation(props) {
263
265
  let value = isLoadingARH ||
264
266
  ((isEmpty(summary) || isEmpty(issue) || isEmpty(product) || isEmpty(version)) &&
265
267
  props.activeStep.id === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT)) ||
266
- (!isEntitledProductLocal && props.activeStep.nextButtonLabel === 'Get support') ||
267
268
  props.activeStep.nextButtonLabel === 'Troubleshoot' ||
268
269
  (isSectionValidFn && !isSectionValidFn(props.activeStep.id) && isNextBtnClickedToShowValidationError) ||
269
- noValidEntitlement ||
270
+ // noValidEntitlement ||
270
271
  isLoadingRecs;
271
272
  return value;
272
273
  };
@@ -447,9 +447,9 @@ input[type='checkbox'] {
447
447
  }
448
448
 
449
449
  .comment-plaintext.reset-pre-text {
450
- font-family: 'Red Hat Display', 'RedHatDisplay', 'Helvetica Neue', 'Arial', 'sans-serif';
450
+ font-family: 'Red Hat Text', 'RedHatText', 'Helvetica Neue', 'Arial', 'sans-serif';
451
451
  text-rendering: auto;
452
- font-weight: 500;
452
+ font-weight: 400;
453
453
  font-size: 1.12rem;
454
454
  line-height: 1.5em;
455
455
  }
@@ -0,0 +1,4 @@
1
+ export * from './queries';
2
+ export * from './mutations';
3
+ export * from './schemas';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './queries';
2
+ export * from './mutations';
3
+ export * from './schemas';
@@ -0,0 +1,2 @@
1
+ export declare const CREATE_RME_CASE_ESCALATION: import("@apollo/client").DocumentNode;
2
+ //# sourceMappingURL=createRMECaseEscalation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createRMECaseEscalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/mutations/createRMECaseEscalation.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,0BAA0B,uCAsBtC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { gql } from '@apollo/client/core';
2
+ export const CREATE_RME_CASE_ESCALATION = gql `
3
+ mutation CreateRMECaseEscalation($caseInput: SalesforceSupportCaseCreateRepresentation!) {
4
+ salesforce_support_uiapi {
5
+ CaseCreate(input: { SalesforceSupportCase: $caseInput }) {
6
+ SalesforceSupportRecord {
7
+ Id
8
+ CaseNumber {
9
+ value
10
+ }
11
+ Status {
12
+ value
13
+ }
14
+ Subject {
15
+ value
16
+ }
17
+ ParentId {
18
+ value
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ `;
@@ -0,0 +1,2 @@
1
+ export { CREATE_RME_CASE_ESCALATION } from './createRMECaseEscalation';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/mutations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1 @@
1
+ export { CREATE_RME_CASE_ESCALATION } from './createRMECaseEscalation';
@@ -0,0 +1,2 @@
1
+ export declare const GET_ESCALATION_DETAILS: import("@apollo/client").DocumentNode;
2
+ //# sourceMappingURL=getEscalationDetails.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getEscalationDetails.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getEscalationDetails.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,sBAAsB,uCAsBlC,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { gql } from '@apollo/client/core';
2
+ export const GET_ESCALATION_DETAILS = gql `
3
+ query getEscalationDetails($where: SalesforceSupportCase_Filter) {
4
+ salesforce_support_uiapi {
5
+ query {
6
+ SalesforceSupportCase(where: $where) {
7
+ edges {
8
+ node {
9
+ CaseNumber {
10
+ value
11
+ }
12
+ Subject {
13
+ value
14
+ }
15
+ Status {
16
+ value
17
+ }
18
+ }
19
+ }
20
+ }
21
+ }
22
+ }
23
+ }
24
+ `;
@@ -0,0 +1,2 @@
1
+ export declare const GET_PARENT_ID: import("@apollo/client").DocumentNode;
2
+ //# sourceMappingURL=getParentId.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getParentId.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/getParentId.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,uCAczB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { gql } from '@apollo/client/core';
2
+ export const GET_PARENT_ID = gql `
3
+ query Query($where: SalesforceSupportCase_Filter) {
4
+ salesforce_support_uiapi {
5
+ query {
6
+ SalesforceSupportCase(where: $where) {
7
+ edges {
8
+ node {
9
+ Id
10
+ }
11
+ }
12
+ }
13
+ }
14
+ }
15
+ }
16
+ `;
@@ -0,0 +1,3 @@
1
+ export { GET_PARENT_ID } from './getParentId';
2
+ export { GET_ESCALATION_DETAILS } from './getEscalationDetails';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/queries/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { GET_PARENT_ID } from './getParentId';
2
+ export { GET_ESCALATION_DETAILS } from './getEscalationDetails';
@@ -0,0 +1,85 @@
1
+ export interface GetParentIdVariables {
2
+ where: {
3
+ CaseNumber: {
4
+ eq: string;
5
+ };
6
+ };
7
+ }
8
+ export interface GetParentIdResponse {
9
+ salesforce_support_uiapi: {
10
+ query: {
11
+ SalesforceSupportCase: {
12
+ edges: Array<{
13
+ node: {
14
+ Id: string;
15
+ };
16
+ }>;
17
+ };
18
+ };
19
+ };
20
+ }
21
+ export interface CreateRMECaseEscalationVariables {
22
+ caseInput: {
23
+ Subject: string;
24
+ Description: string;
25
+ Status: string;
26
+ Origin: string;
27
+ Priority: string;
28
+ Type: string;
29
+ RecordTypeId: string;
30
+ ParentId: string;
31
+ EscalationCategory__c: string;
32
+ ImpactOnUserOrBusiness__c: string;
33
+ CS_Geo__c: string;
34
+ };
35
+ }
36
+ export interface CreateRMECaseEscalationResponse {
37
+ salesforce_support_uiapi: {
38
+ CaseCreate: {
39
+ SalesforceSupportRecord: {
40
+ Id: string;
41
+ CaseNumber: {
42
+ value: string;
43
+ };
44
+ Status: {
45
+ value: string;
46
+ };
47
+ Subject: {
48
+ value: string;
49
+ };
50
+ ParentId: {
51
+ value: string;
52
+ };
53
+ };
54
+ };
55
+ };
56
+ }
57
+ export interface GetEscalationDetailsVariables {
58
+ where: {
59
+ ParentId: {
60
+ eq: string;
61
+ };
62
+ };
63
+ }
64
+ export interface GetEscalationDetailsResponse {
65
+ salesforce_support_uiapi: {
66
+ query: {
67
+ SalesforceSupportCase: {
68
+ edges: Array<{
69
+ node: {
70
+ CaseNumber: {
71
+ value: string;
72
+ };
73
+ Subject: {
74
+ value: string;
75
+ };
76
+ Status: {
77
+ value: string;
78
+ };
79
+ };
80
+ }>;
81
+ };
82
+ };
83
+ };
84
+ }
85
+ //# sourceMappingURL=escalation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escalation.d.ts","sourceRoot":"","sources":["../../../../src/graphql/schemas/escalation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACjC,KAAK,EAAE;QACH,UAAU,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9B,CAAC;CACL;AAED,MAAM,WAAW,mBAAmB;IAChC,wBAAwB,EAAE;QACtB,KAAK,EAAE;YACH,qBAAqB,EAAE;gBACnB,KAAK,EAAE,KAAK,CAAC;oBACT,IAAI,EAAE;wBACF,EAAE,EAAE,MAAM,CAAC;qBACd,CAAC;iBACL,CAAC,CAAC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BAC3B,MAAM,EAAE;4BAAE,KAAK,EAAE,MAAM,CAAA;yBAAE,CAAC;qBAC7B,CAAC;iBACL,CAAC,CAAC;aACN,CAAC;SACL,CAAC;KACL,CAAC;CACL"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './escalation';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/graphql/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export * from './escalation';
@@ -1 +1 @@
1
- {"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"AAqBA,wBAAgB,kBAAkB;;EAsCjC"}
1
+ {"version":3,"file":"useResetCaseCreate.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResetCaseCreate.tsx"],"names":[],"mappings":"AAcA,wBAAgB,kBAAkB;;EAsCjC"}
@@ -1,4 +1,3 @@
1
- import { fetchLoggedInUser, fetchLoggedInUsersAccount, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
2
1
  import { useContext } from 'react';
3
2
  import { AttachmentDispatchContext, resetAttachment } from '../components/shared/fileUpload';
4
3
  import { useCaseDispatch } from '../context/CaseContext';
@@ -7,7 +6,6 @@ import { useRecommendationDispatchContext } from '../context/RecommendationConte
7
6
  import { RulesDispatchContext } from '../context/RulesContext';
8
7
  import { TCDispatchContext } from '../context/TopContentContext';
9
8
  import { CaseReducerConstants } from '../reducers/CaseConstNTypes';
10
- import { setCaseAccountNumber, setCaseOwner } from '../reducers/CaseReducer';
11
9
  import { resetClusterRecommendations } from '../reducers/ClusterRecommendationsReducer';
12
10
  import { resetRecommendations } from '../reducers/RecommendationsReducer';
13
11
  import { resetEARules } from '../reducers/RulesReducer';
@@ -17,22 +15,31 @@ export function useResetCaseCreate() {
17
15
  const tcDispatch = useContext(TCDispatchContext);
18
16
  const recommendationsDispatch = useRecommendationDispatchContext();
19
17
  const caseDispatch = useCaseDispatch();
20
- const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
21
18
  const rulesDispatch = useContext(RulesDispatchContext);
22
19
  const clusterRecommendationsDispatch = useContext(ClusterRecommendationsDispatchContext);
23
- const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights, loggedInUserJwtToken }, } = useContext(GlobalMetadataStateContext);
24
20
  const resetCaseCreateState = () => {
25
- // On case creation we refetch the user contact details to get users updated phone number
26
- fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, {});
21
+ // Commented out don't refetch logged-in user contact details on case creation
22
+ // fetchLoggedInUser(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, {});
27
23
  resetAttachment(dispatchToAttachmentReducer);
28
24
  resetTopContent(tcDispatch);
29
25
  resetRecommendations(recommendationsDispatch);
30
26
  caseDispatch({ type: CaseReducerConstants.resetCaseState });
31
- // on case creation we refetch the account details to check if user still has all valid
32
- // access for next case creation. For ex. may be user has exhausted his available enhanced sla limit
33
- fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true);
34
- setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber(), true, loggedInUsersAccount.data);
35
- setCaseOwner(caseDispatch, loggedInUserRights.data.getHydraContactFromLoggedInUser(), '', undefined, undefined, true);
27
+ // Commented out don't refetch account details or auto-populate account/owner on case creation
28
+ // fetchLoggedInUsersAccount(dispatchToGlobalMetadataReducer, loggedInUserJwtToken, true, apolloClient);
29
+ // setCaseAccountNumber(caseDispatch, loggedInUserRights.data.getAccountNumber(), true, loggedInUsersAccount.data);
30
+ // setCaseOwner(
31
+ // caseDispatch,
32
+ // loggedInUserRights.data.getHydraContactFromLoggedInUser(),
33
+ // '',
34
+ // undefined,
35
+ // undefined,
36
+ // true,
37
+ // undefined,
38
+ // true,
39
+ // undefined,
40
+ // undefined,
41
+ // loggedInUserRights.data.isInternal() ? loggedInUserRights.data.getAccountNumber() : undefined
42
+ // );
36
43
  resetEARules(rulesDispatch);
37
44
  resetClusterRecommendations(clusterRecommendationsDispatch);
38
45
  };