@rh-support/troubleshoot 2.6.273 → 2.6.280

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 (65) 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 +1 -3
  5. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  6. package/lib/esm/components/CaseEditView/Case.js +1 -3
  7. package/lib/esm/components/CaseEditView/CaseOverview/index.d.ts.map +1 -1
  8. package/lib/esm/components/CaseEditView/CaseOverview/index.js +4 -6
  9. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.d.ts.map +1 -1
  10. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseContactPhoneNumber.js +34 -38
  11. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.d.ts.map +1 -1
  12. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/CaseDetailsManagement.js +4 -2
  13. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  14. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +59 -19
  15. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.d.ts.map +1 -1
  16. package/lib/esm/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.js +3 -5
  17. package/lib/esm/components/CaseInformation/CaseInformation.d.ts.map +1 -1
  18. package/lib/esm/components/CaseInformation/CaseInformation.js +5 -7
  19. package/lib/esm/components/CaseInformation/ContactPhoneNumber.d.ts.map +1 -1
  20. package/lib/esm/components/CaseInformation/ContactPhoneNumber.js +24 -37
  21. package/lib/esm/components/CaseInformation/SupportLevel.d.ts.map +1 -1
  22. package/lib/esm/components/CaseInformation/SupportLevel.js +55 -32
  23. package/lib/esm/components/CaseManagement/CaseLanguageSelector.js +2 -2
  24. package/lib/esm/components/CaseManagement/CaseManagement.d.ts.map +1 -1
  25. package/lib/esm/components/CaseManagement/CaseManagement.js +7 -4
  26. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -1
  27. package/lib/esm/components/IdeaInformation/IdeaInformation.js +10 -10
  28. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.d.ts.map +1 -1
  29. package/lib/esm/components/OpenCase/SupportTypeSelectorPage.js +2 -4
  30. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +1 -0
  31. package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
  32. package/lib/esm/components/ProductSelector/AllProductsSelector.js +15 -3
  33. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
  34. package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +37 -13
  35. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  36. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +53 -19
  37. package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
  38. package/lib/esm/components/ProductSelector/ProductSelector.js +3 -1
  39. package/lib/esm/components/Review/Review.d.ts.map +1 -1
  40. package/lib/esm/components/Review/Review.js +10 -6
  41. package/lib/esm/components/SessionRestore/SessionRestore.d.ts.map +1 -1
  42. package/lib/esm/components/SessionRestore/SessionRestore.js +1 -3
  43. package/lib/esm/components/shared/useIsSectionValid.d.ts.map +1 -1
  44. package/lib/esm/components/shared/useIsSectionValid.js +64 -50
  45. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.d.ts.map +1 -1
  46. package/lib/esm/components/wizardLayout/GlobalTroubleshootEffects.js +9 -34
  47. package/lib/esm/components/wizardLayout/WizardLayout.d.ts.map +1 -1
  48. package/lib/esm/components/wizardLayout/WizardLayout.js +7 -6
  49. package/lib/esm/components/wizardLayout/WizardNavigation.d.ts.map +1 -1
  50. package/lib/esm/components/wizardLayout/WizardNavigation.js +9 -10
  51. package/lib/esm/hooks/useResetCaseCreate.d.ts.map +1 -1
  52. package/lib/esm/hooks/useResetCaseCreate.js +11 -13
  53. package/lib/esm/reducers/CaseConstNTypes.d.ts +0 -23
  54. package/lib/esm/reducers/CaseConstNTypes.d.ts.map +1 -1
  55. package/lib/esm/reducers/CaseConstNTypes.js +0 -5
  56. package/lib/esm/reducers/CaseHelpers.d.ts +1 -2
  57. package/lib/esm/reducers/CaseHelpers.d.ts.map +1 -1
  58. package/lib/esm/reducers/CaseHelpers.js +2 -39
  59. package/lib/esm/reducers/CaseOverviewReducer.d.ts +1 -3
  60. package/lib/esm/reducers/CaseOverviewReducer.d.ts.map +1 -1
  61. package/lib/esm/reducers/CaseOverviewReducer.js +5 -7
  62. package/lib/esm/reducers/CaseReducer.d.ts +5 -15
  63. package/lib/esm/reducers/CaseReducer.d.ts.map +1 -1
  64. package/lib/esm/reducers/CaseReducer.js +23 -60
  65. package/package.json +6 -6
@@ -1,4 +1,3 @@
1
- import { useApolloClient } from '@apollo/client/react';
2
1
  import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
3
2
  import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
4
3
  import { haventLoadedMetadata } from '@rh-support/utils';
@@ -8,14 +7,13 @@ import React, { useContext, useEffect } from 'react';
8
7
  import { Trans, useTranslation } from 'react-i18next';
9
8
  import { useCaseSelector } from '../../context/CaseContext';
10
9
  import { OpenShiftClusterId } from '../CaseManagement/OpenShiftClusterId';
11
- // import { Hostname } from '../ImproveCase/Hostname';
10
+ import { Hostname } from '../ImproveCase/Hostname';
12
11
  import KtQuestions from '../ImproveCase/KtQuestions';
13
12
  import ClusterRecommendations from '../Recommendations/ClusterRecommendations';
14
13
  export default function CaseInformation(props) {
15
14
  const { t } = useTranslation();
16
15
  const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
17
16
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
18
- const apolloClient = useApolloClient();
19
17
  const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
20
18
  contactSSOName: state.caseDetails.contactSSOName,
21
19
  ownersCaseGroups: state.ownersCaseGroups,
@@ -40,13 +38,13 @@ export default function CaseInformation(props) {
40
38
  }
41
39
  const allPromisses = [];
42
40
  if (haventLoadedMetadata(allCaseTypes)) {
43
- allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, apolloClient));
41
+ allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport));
44
42
  }
45
43
  if (haventLoadedMetadata(allCaseSeverities)) {
46
- allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, apolloClient));
44
+ allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport));
47
45
  }
48
46
  if (haventLoadedMetadata(caseLanguages)) {
49
- allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer, apolloClient));
47
+ allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer));
50
48
  }
51
49
  Promise.all(allPromisses);
52
50
  }, [
@@ -58,7 +56,6 @@ export default function CaseInformation(props) {
58
56
  loggedInUserJwtToken,
59
57
  selectedAccountDetails,
60
58
  loggedInUsersAccount.data.secureSupport,
61
- apolloClient,
62
59
  ]);
63
60
  return (React.createElement(React.Fragment, null,
64
61
  React.createElement(LoadingIndicator, { show: isMetadataLoading(), size: "lg" }),
@@ -80,6 +77,7 @@ export default function CaseInformation(props) {
80
77
  !isMetadataLoadingError() &&
81
78
  loggedInUserRights.data.canManageCases() && (React.createElement(React.Fragment, null,
82
79
  React.createElement("form", null,
80
+ React.createElement(Hostname, null),
83
81
  React.createElement(OpenShiftClusterId, null),
84
82
  React.createElement(ClusterRecommendations, { className: "push-bottom" }),
85
83
  React.createElement(KtQuestions, null))))));
@@ -1 +1 @@
1
- {"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAQA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAuC/D,wBAAgB,kBAAkB,sBAwVjC"}
1
+ {"version":3,"file":"ContactPhoneNumber.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/ContactPhoneNumber.tsx"],"names":[],"mappings":"AAOA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,wBAAgB,kBAAkB,sBAsVjC"}
@@ -7,11 +7,10 @@ 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
+ import { contacts } from '@cee-eng/hydrajs';
11
11
  import { ValidatedOptions } from '@patternfly/react-core';
12
12
  import { getPhoneObj, PhoneInput } from '@rh-support/components';
13
13
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
14
- import { GET_ACCOUNT_CONTACTS } from '@rh-support/utils';
15
14
  import isEmpty from 'lodash/isEmpty';
16
15
  import isEqual from 'lodash/isEqual';
17
16
  import isUndefined from 'lodash/isUndefined';
@@ -25,33 +24,13 @@ import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
25
24
  import { PDFContext } from '../CaseEditView/PDFContainer';
26
25
  import { removeAllChars, trimAndReplacePlus } from '../shared/utils';
27
26
  import { ContactPhoneNumberPopOver } from './ContactPhoneNumberPopOver';
28
- function fetchContactBySSO(apolloClient, accountNumber, ssoUsername) {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
31
- const { data } = yield apolloClient.query({
32
- query: GET_ACCOUNT_CONTACTS,
33
- variables: {
34
- accountNumber: { eq: accountNumber },
35
- contactsWhere: { SSOUserName__c: { eq: ssoUsername } },
36
- first: 1,
37
- },
38
- });
39
- const response = data;
40
- const contactNode = (_j = (_h = (_g = (_f = (_e = (_d = (_c = (_b = (_a = response === null || response === void 0 ? void 0 : response.salesforce_support_uiapi) === null || _a === void 0 ? void 0 : _a.query) === null || _b === void 0 ? void 0 : _b.SalesforceSupportAccount) === 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.Contacts) === null || _g === void 0 ? void 0 : _g.edges) === null || _h === void 0 ? void 0 : _h[0]) === null || _j === void 0 ? void 0 : _j.node;
41
- return {
42
- phone: (_l = (_k = contactNode === null || contactNode === void 0 ? void 0 : contactNode.Phone) === null || _k === void 0 ? void 0 : _k.value) !== null && _l !== void 0 ? _l : '',
43
- };
44
- });
45
- }
46
27
  export function ContactPhoneNumber() {
47
- const apolloClient = useApolloClient();
48
- const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', hasLoggedInUserConfirmedPhoneNumber, contactSSOName, accountNumberRef, shouldNotSetPhoneCountryCode, isCasePhoneUpdating, } = useCaseSelector((state) => ({
28
+ const { suppliedPhoneNumberVerified, phoneCountryCode = '', phoneAreaCodePrefixLineNumber = '', hasLoggedInUserConfirmedPhoneNumber, contactSSOName, shouldNotSetPhoneCountryCode, isCasePhoneUpdating, } = useCaseSelector((state) => ({
49
29
  suppliedPhoneNumberVerified: state.caseDetails.suppliedPhoneNumberVerified,
50
30
  phoneCountryCode: state.caseDetails.phoneCountryCode,
51
31
  phoneAreaCodePrefixLineNumber: state.caseDetails.phoneAreaCodePrefixLineNumber,
52
32
  hasLoggedInUserConfirmedPhoneNumber: state.hasLoggedInUserConfirmedPhoneNumber,
53
33
  contactSSOName: state.caseDetails.contactSSOName,
54
- accountNumberRef: state.caseDetails.accountNumberRef,
55
34
  shouldNotSetPhoneCountryCode: state.shouldNotSetPhoneCountryCode,
56
35
  isCasePhoneUpdating: state.isCasePhoneUpdating,
57
36
  }), isEqual);
@@ -177,25 +156,32 @@ export function ContactPhoneNumber() {
177
156
  }
178
157
  }
179
158
  else {
180
- // user is opening case for others (user is partner or red hatter)
159
+ // user is openning case for others (use is partner or red hatter)
181
160
  try {
182
161
  if (!contactSSOName)
183
162
  return;
184
163
  setIsFetchingSso(true);
185
- const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
164
+ const selectedContact = yield contacts.getSFDCContactBySso(contactSSOName);
186
165
  setIsFetchingSso(false);
187
- const phoneLength = trimAndReplacePlus(removeAllChars(selectedContact.phone)).length;
188
- if (phoneLength > 10) {
189
- _phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
190
- _phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
166
+ if (selectedContact.supportPhoneAreaCodePrefixLineNumber) {
167
+ _phoneAreaCodePrefixLineNumber = selectedContact.supportPhoneAreaCodePrefixLineNumber;
168
+ _phoneCountryCode = selectedContact.supportPhoneCountryCode;
169
+ _suppliedPhoneNumberVerified = 'Deferred';
191
170
  }
192
171
  else {
193
- _phoneAreaCodePrefixLineNumber = selectedContact.phone;
194
- _phoneCountryCode = '';
195
- setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
196
- setPortalPhone(selectedContact.phone);
172
+ const phoneLength = trimAndReplacePlus(removeAllChars(selectedContact.phone)).length;
173
+ if (phoneLength > 10) {
174
+ _phoneAreaCodePrefixLineNumber = getPhoneObj(selectedContact.phone).phoneLine || '';
175
+ _phoneCountryCode = getPhoneObj(selectedContact.phone).countryCode || '';
176
+ }
177
+ else {
178
+ _phoneAreaCodePrefixLineNumber = selectedContact.phone;
179
+ _phoneCountryCode = '';
180
+ setCaseState(caseDispatch, { shouldNotSetPhoneCountryCode: true });
181
+ setPortalPhone(selectedContact.phone);
182
+ }
183
+ _suppliedPhoneNumberVerified = 'Deferred';
197
184
  }
198
- _suppliedPhoneNumberVerified = 'Deferred';
199
185
  }
200
186
  catch (e) {
201
187
  _phoneAreaCodePrefixLineNumber = '';
@@ -227,11 +213,12 @@ export function ContactPhoneNumber() {
227
213
  try {
228
214
  if (!contactSSOName)
229
215
  return;
230
- const selectedContact = yield fetchContactBySSO(apolloClient, accountNumberRef, contactSSOName);
231
- if (!isEmpty(selectedContact.phone)) {
216
+ const selectedContact = yield contacts.getSFDCContactBySso(contactSSOName);
217
+ if (isEmpty(selectedContact.supportPhoneAreaCodePrefixLineNumber) &&
218
+ !isEmpty(selectedContact.phone)) {
232
219
  portalPhone = selectedContact.phone;
233
220
  phoneLength = trimAndReplacePlus(removeAllChars(portalPhone)).length;
234
- supportPhone = '';
221
+ supportPhone = selectedContact.supportPhoneAreaCodePrefixLineNumber;
235
222
  }
236
223
  }
237
224
  catch (e) {
@@ -1 +1 @@
1
- {"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA8B,MAAM,OAAO,CAAC;AAMnD,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBAqHlC;kBArHQ,YAAY;;;AAuHrB,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"SupportLevel.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/SupportLevel.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AAM/D,UAAU,MAAO,SAAQ,gBAAgB;CAAG;AAO5C,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM,qBAoJlC;kBApJQ,YAAY;;;AAsJrB,eAAe,YAAY,CAAC"}
@@ -1,82 +1,105 @@
1
1
  import { Popover, PopoverPosition } from '@patternfly/react-core';
2
2
  import QuestionCircleIcon from '@patternfly/react-icons/dist/js/icons/question-circle-icon';
3
3
  import { SingleSelectDropdown } from '@rh-support/components';
4
+ import { GlobalMetadataStateContext } from '@rh-support/react-context';
4
5
  import { PreviousCaseTypes, showFtsOnCaseViewEditPage, showFtsOnCreateCasePage } from '@rh-support/utils';
5
6
  import isEmpty from 'lodash/isEmpty';
6
7
  import isEqual from 'lodash/isEqual';
7
- import React, { useEffect, useState } from 'react';
8
+ import React, { useContext, useEffect, useState } from 'react';
8
9
  import { Trans, useTranslation } from 'react-i18next';
9
10
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
10
- import { setCaseDetails, setCaseState } from '../../reducers/CaseReducer';
11
+ import { setCaseDetails } from '../../reducers/CaseReducer';
11
12
  const defaultProps = {
12
13
  id: '',
13
14
  className: '',
14
15
  };
15
16
  function SupportLevel(props) {
16
- const { caseNumber, severity, entitlementSla, caseType, productServiceLevel, otherServiceLevels, selectedEntitlementId, } = useCaseSelector((state) => ({
17
+ const { product, caseNumber, severity, entitlementSla, ownersEntitlements, caseType, openShiftClusterSupportLevel, } = useCaseSelector((state) => ({
18
+ product: state.caseDetails.product,
17
19
  caseNumber: state.caseDetails.caseNumber,
18
20
  severity: state.caseDetails.severity,
19
21
  entitlementSla: state.caseDetails.entitlementSla,
22
+ ownersEntitlements: state.ownersEntitlements,
20
23
  caseType: state.caseDetails.caseType,
21
- productServiceLevel: state.productServiceLevel,
22
- otherServiceLevels: state.otherServiceLevels,
23
- selectedEntitlementId: state.selectedEntitlementId,
24
+ openShiftClusterSupportLevel: state.openShiftClusterSupportLevel,
24
25
  }), isEqual);
25
26
  const caseDispatch = useCaseDispatch();
27
+ const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
26
28
  const { t } = useTranslation();
27
29
  const [isSupportLevelInValid, setIsSupportLevelInValid] = useState(false);
28
30
  const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
29
- const allSlaOptions = [...(productServiceLevel ? [productServiceLevel] : []), ...(otherServiceLevels !== null && otherServiceLevels !== void 0 ? otherServiceLevels : [])].sort((a, b) => b.priority - a.priority);
30
- const hasMultipleSlas = allSlaOptions.length > 1;
31
31
  const onCaseDetailsChange = (caseDetails) => {
32
32
  setCaseDetails(caseDispatch, caseDetails);
33
33
  };
34
34
  const onEntitlementChange = (selectedOption) => {
35
- const entitlementId = selectedOption.value;
36
- const matchedSla = allSlaOptions.find((sla) => sla.entitlementId === entitlementId);
37
- const slaLabel = (matchedSla === null || matchedSla === void 0 ? void 0 : matchedSla.serviceLevelLabel) || '';
38
- const casePayload = { entitlementSla: slaLabel };
35
+ const selected = selectedOption.value;
36
+ const casePayload = { entitlementSla: selected };
39
37
  casePayload.fts = caseNumber
40
- ? showFtsOnCaseViewEditPage(slaLabel, severity)
41
- : showFtsOnCreateCasePage(slaLabel, severity);
38
+ ? showFtsOnCaseViewEditPage(selected, severity)
39
+ : showFtsOnCreateCasePage(selected, severity);
42
40
  casePayload.fts = casePayload.fts && !isIdea;
43
- setIsSupportLevelInValid(isEmpty(entitlementId));
41
+ setIsSupportLevelInValid(isEmpty(selected));
44
42
  onCaseDetailsChange(casePayload);
45
- setCaseState(caseDispatch, { selectedEntitlementId: entitlementId });
46
43
  };
47
- const selectedSla = entitlementSla || (productServiceLevel === null || productServiceLevel === void 0 ? void 0 : productServiceLevel.serviceLevelLabel) || '';
48
- const currentEntitlementId = selectedEntitlementId || (productServiceLevel === null || productServiceLevel === void 0 ? void 0 : productServiceLevel.entitlementId) || '';
44
+ const getSlaList = () => {
45
+ var _a, _b;
46
+ if (openShiftClusterSupportLevel)
47
+ return [openShiftClusterSupportLevel];
48
+ const entitledProduct = ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) !== null && _b !== void 0 ? _b : []).find((entitledProduct) => entitledProduct.product === product);
49
+ if (entitledProduct && entitledProduct.serviceLevels) {
50
+ return entitledProduct.serviceLevels.split(';') || [];
51
+ }
52
+ else {
53
+ return ownersEntitlements.data ? ownersEntitlements.data.map((sla) => sla.slaProcessId) : [];
54
+ }
55
+ };
56
+ const getSelectedSla = () => {
57
+ var _a, _b;
58
+ if (openShiftClusterSupportLevel)
59
+ return openShiftClusterSupportLevel;
60
+ const entitledProduct = ((_b = (_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult) !== null && _b !== void 0 ? _b : []).find((entitledProduct) => entitledProduct.product === product);
61
+ // if sla is empty then it means either first time this component is rendered or product has changed.
62
+ if (isEmpty(entitlementSla) && entitledProduct && entitledProduct.preferredServiceLevel) {
63
+ return entitledProduct.preferredServiceLevel;
64
+ }
65
+ else {
66
+ return isEmpty(entitlementSla) && !isEmpty(ownersEntitlements.data)
67
+ ? ownersEntitlements.data[0].slaProcessId
68
+ : entitlementSla;
69
+ }
70
+ };
71
+ const selectedSla = getSelectedSla();
49
72
  useEffect(() => {
50
- if (!productServiceLevel || entitlementSla)
73
+ if (!selectedSla || entitlementSla)
51
74
  return;
52
- if (entitlementSla !== productServiceLevel.serviceLevelLabel) {
53
- onCaseDetailsChange({ entitlementSla: productServiceLevel.serviceLevelLabel });
54
- setCaseState(caseDispatch, { selectedEntitlementId: productServiceLevel.entitlementId });
75
+ if (entitlementSla !== selectedSla) {
76
+ onCaseDetailsChange({ entitlementSla: selectedSla });
55
77
  }
56
78
  // eslint-disable-next-line react-hooks/exhaustive-deps
57
- }, [productServiceLevel, entitlementSla]);
79
+ }, [selectedSla, entitlementSla]);
80
+ // Create selected option for SingleSelectDropdown
58
81
  const getSelectedOption = () => ({
59
- label: selectedSla,
60
- value: currentEntitlementId,
82
+ label: selectedSla || '',
83
+ value: selectedSla || '',
61
84
  });
62
- const getDropdownOptions = () => allSlaOptions.map((sla) => ({
63
- label: sla.serviceLevelLabel,
64
- value: sla.entitlementId || sla.serviceLevelLabel,
85
+ // Create options array for SingleSelectDropdown
86
+ const getDropdownOptions = () => getSlaList().map((sla) => ({
87
+ label: sla,
88
+ value: sla,
65
89
  }));
66
- if (!hasMultipleSlas)
67
- return null;
68
90
  return (React.createElement("div", { className: `form-group ${props.className}`, id: `${props.id}` },
69
91
  React.createElement("label", { htmlFor: "get-support-supportLevel" },
70
92
  React.createElement(Trans, null, "Support level"),
71
93
  ' ',
72
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
94
+ !isEmpty(ownersEntitlements.data) && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))),
73
95
  React.createElement(Popover, { "aria-label": "Support Level info", position: PopoverPosition.top, bodyContent: React.createElement("p", null,
74
96
  React.createElement(Trans, { i18nKey: "i18ProductionSupportServiceLevelAgreement" },
75
97
  "Learn more about our",
76
98
  ' ',
77
99
  React.createElement("a", { href: "/support/offerings/production/sla", target: "_blank" }, "production support service level agreement"))), closeBtnAriaLabel: "Close" },
78
100
  React.createElement(QuestionCircleIcon, { color: "#5e40be", className: "pf-v6-u-ml-xs icon-size cursor-pointer", "aria-label": "Support Level Info" })),
79
- React.createElement(SingleSelectDropdown, { ariaLabel: t('Select Support Level'), onSelect: onEntitlementChange, selected: getSelectedOption(), options: getDropdownOptions(), isInvalid: isSupportLevelInValid, dataTrackingId: "get-support-supportLevel", placeholder: t('Select Support Level') })));
101
+ React.createElement(SingleSelectDropdown, { ariaLabel: t('Select Support Level'), onSelect: onEntitlementChange, selected: getSelectedOption(), options: getDropdownOptions(), isDisabled: ownersEntitlements.isError || isEmpty(ownersEntitlements.data), isInvalid: isSupportLevelInValid, dataTrackingId: "get-support-supportLevel", placeholder: t('Select Support Level') }),
102
+ isEmpty(ownersEntitlements.data) && (React.createElement("p", { className: "form-instructions" }, ownersEntitlements.isError ? t('Error loading support levels') : t('No active subscriptions')))));
80
103
  }
81
104
  SupportLevel.defaultProps = defaultProps;
82
105
  export default SupportLevel;
@@ -53,11 +53,11 @@ export default function CaseLanguageSelector(props) {
53
53
  props.isManageStep,
54
54
  ]);
55
55
  const getLanguageDropdownOptions = map(caseLanguages.data, (language) => ({
56
- label: Constants.languagesMap[language] || language,
56
+ label: Constants.languagesMap[language],
57
57
  value: language,
58
58
  }));
59
59
  const getSelectedLanguageOption = {
60
- label: caseLanguage ? Constants.languagesMap[caseLanguage] || caseLanguage : '',
60
+ label: caseLanguage ? Constants.languagesMap[caseLanguage] : '',
61
61
  value: caseLanguage || '',
62
62
  };
63
63
  return (React.createElement("div", { className: "form-group" },
@@ -1 +1 @@
1
- {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAqCnD"}
1
+ {"version":3,"file":"CaseManagement.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseManagement/CaseManagement.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,MAAM;CAAG;AAC1B,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,KAAK,EAAE,MAAM,qBAiCnD"}
@@ -2,14 +2,14 @@ import { Grid, GridItem } from '@patternfly/react-core';
2
2
  import React from 'react';
3
3
  import { useCaseDispatch } from '../../context/CaseContext';
4
4
  import { setCaseDetails } from '../../reducers/CaseReducer';
5
- // import CaseGroup from '../CaseInformation/CaseGroup';
5
+ import CaseGroup from '../CaseInformation/CaseGroup';
6
6
  import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
7
7
  import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
8
8
  import Fts from '../CaseInformation/Fts';
9
9
  import Severity from '../CaseInformation/Severity';
10
10
  import SupportLevel from '../CaseInformation/SupportLevel';
11
11
  import CaseLanguageSelector from './CaseLanguageSelector';
12
- // import { Cep } from './Cep';
12
+ import { Cep } from './Cep';
13
13
  import OpenReferenceNumber from './OpenReferenceNumber';
14
14
  import { RHAssociatesSelector } from './RHAssociatesSelector';
15
15
  import CaseContactSelector from './SendNotifications/CaseContactSelector';
@@ -29,8 +29,11 @@ export default function CaseManagement(props) {
29
29
  React.createElement(Fts, { inlineEditable: false }),
30
30
  React.createElement(Grid, { hasGutter: true },
31
31
  React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
32
- React.createElement(CaseLanguageSelector, { isManageStep: true }))),
32
+ React.createElement(CaseLanguageSelector, { isManageStep: true })),
33
+ React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
34
+ React.createElement(CaseGroup, { init: true }))),
33
35
  React.createElement(CaseContactSelector, null),
34
36
  React.createElement(RHAssociatesSelector, null),
35
- React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true })));
37
+ React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
38
+ React.createElement(Cep, null)));
36
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAiBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBAkJtC"}
1
+ {"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAiBrD,MAAM,CAAC,OAAO,UAAU,eAAe,sBA8ItC"}
@@ -1,4 +1,3 @@
1
- import { useApolloClient } from '@apollo/client/react';
2
1
  import { Grid, GridItem } from '@patternfly/react-core';
3
2
  import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
4
3
  import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
@@ -9,13 +8,13 @@ import React, { useContext, useEffect } from 'react';
9
8
  import { Trans, useTranslation } from 'react-i18next';
10
9
  import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
11
10
  import { setCaseDetails } from '../../reducers/CaseReducer';
12
- // import CaseGroup from '../CaseInformation/CaseGroup';
11
+ import CaseGroup from '../CaseInformation/CaseGroup';
13
12
  import { ContactPhoneNumber } from '../CaseInformation/ContactPhoneNumber';
14
13
  import { ContactPhoneNumberAlert } from '../CaseInformation/ContactPhoneNumberAlert';
15
14
  import Severity from '../CaseInformation/Severity';
16
15
  import SupportLevel from '../CaseInformation/SupportLevel';
17
16
  import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
18
- // import { Cep } from '../CaseManagement/Cep';
17
+ import { Cep } from '../CaseManagement/Cep';
19
18
  import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
20
19
  import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
21
20
  import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
@@ -24,7 +23,6 @@ export default function IdeaInformation() {
24
23
  const { t } = useTranslation();
25
24
  const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, loggedInUserRights, }, } = useContext(GlobalMetadataStateContext);
26
25
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
27
- const apolloClient = useApolloClient();
28
26
  const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
29
27
  contactSSOName: state.caseDetails.contactSSOName,
30
28
  ownersCaseGroups: state.ownersCaseGroups,
@@ -50,13 +48,13 @@ export default function IdeaInformation() {
50
48
  }
51
49
  const allPromisses = [];
52
50
  if (haventLoadedMetadata(allCaseTypes)) {
53
- allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, apolloClient));
51
+ allPromisses.push(fetchCaseTypes(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport));
54
52
  }
55
53
  if (haventLoadedMetadata(allCaseSeverities)) {
56
- allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, apolloClient));
54
+ allPromisses.push(fetchCaseSeverities(dispatchToGlobalMetadataReducer, loggedInUsersAccount.data.secureSupport));
57
55
  }
58
56
  if (haventLoadedMetadata(caseLanguages)) {
59
- allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer, apolloClient));
57
+ allPromisses.push(fetchLanguageMetadata(dispatchToGlobalMetadataReducer));
60
58
  }
61
59
  Promise.all(allPromisses);
62
60
  }, [
@@ -68,7 +66,6 @@ export default function IdeaInformation() {
68
66
  loggedInUserJwtToken,
69
67
  selectedAccountDetails,
70
68
  loggedInUsersAccount.data.secureSupport,
71
- apolloClient,
72
69
  ]);
73
70
  const onSeverityChange = (payload) => {
74
71
  setCaseDetails(caseDispatch, payload);
@@ -103,8 +100,11 @@ export default function IdeaInformation() {
103
100
  React.createElement(ContactPhoneNumberAlert, null),
104
101
  React.createElement(Grid, { hasGutter: true },
105
102
  React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
106
- React.createElement(CaseLanguageSelector, { isManageStep: true }))),
103
+ React.createElement(CaseLanguageSelector, { isManageStep: true })),
104
+ React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
105
+ React.createElement(CaseGroup, { init: true }))),
107
106
  React.createElement(CaseContactSelector, null),
108
107
  React.createElement(RHAssociatesSelector, null),
109
- React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }))))));
108
+ React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
109
+ React.createElement(Cep, null))))));
110
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAMA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,MAAM,CAAC,OAAO,UAAU,uBAAuB,sBAkM9C"}
1
+ {"version":3,"file":"SupportTypeSelectorPage.d.ts","sourceRoot":"","sources":["../../../../src/components/OpenCase/SupportTypeSelectorPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAiB/D,MAAM,CAAC,OAAO,UAAU,uBAAuB,sBAiM9C"}
@@ -1,4 +1,3 @@
1
- import { useApolloClient } from '@apollo/client/react';
2
1
  import { Bullseye, Card, CardBody, Gallery, GalleryItem, Split, SplitItem } from '@patternfly/react-core';
3
2
  import { LoadingIndicator } from '@rh-support/components';
4
3
  import { fetchCaseTypes, useGlobalDispatchContext, useGlobalStateContext } from '@rh-support/react-context';
@@ -12,9 +11,8 @@ import { getUpdatedDescription } from '../../reducers/CaseHelpers';
12
11
  import { setCaseDetails } from '../../reducers/CaseReducer';
13
12
  import { BugIcon, CertificationIcon, CustomerServiceIcon, DocumentationIcon, GearIcon, IdeaIcon, RcaIcon, } from './SupportTypeIcons';
14
13
  export default function SupportTypeSelectorPage() {
15
- const { globalMetadataState: { allCaseTypes }, } = useGlobalStateContext();
14
+ const { globalMetadataState: { allCaseTypes, loggedInUsersAccount }, } = useGlobalStateContext();
16
15
  const globalDispatch = useGlobalDispatchContext();
17
- const apolloClient = useApolloClient();
18
16
  const [selectedSupportType, setSelectedSupportType] = useState('');
19
17
  const { routeState: { isNextBtnClickedToShowValidationError }, } = useContext(RouteContext);
20
18
  const { caseType, isFetchingSelectedAccountDetails, issue, timeFramesAndUrgency, v3ClusterName } = useCaseSelector((state) => ({
@@ -29,7 +27,7 @@ export default function SupportTypeSelectorPage() {
29
27
  useEffect(() => {
30
28
  if (haventLoadedMetadata(allCaseTypes)) {
31
29
  // Load support types.
32
- fetchCaseTypes(globalDispatch, apolloClient);
30
+ fetchCaseTypes(globalDispatch, loggedInUsersAccount.data.secureSupport);
33
31
  }
34
32
  // eslint-disable-next-line react-hooks/exhaustive-deps
35
33
  }, []);
@@ -6,6 +6,7 @@ interface IProps {
6
6
  routeProps: RouteComponentProps<IRouteUrlParams>;
7
7
  loadTCOnChange?: boolean;
8
8
  showTCAfterButtonClicked?: boolean;
9
+ checkEntitledProduct?: boolean;
9
10
  isOnSummaryPage?: boolean;
10
11
  isOnGetSupportPage?: boolean;
11
12
  isOnReviewPage?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAOD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAoJvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,EAAuC,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMvG,UAAU,MAAM;IACZ,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EAuKvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
@@ -1,5 +1,8 @@
1
1
  import { Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant } from '@patternfly/react-core';
2
+ import { AlertMessage, AlertType } from '@rh-support/components';
2
3
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
4
+ import filter from 'lodash/filter';
5
+ import find from 'lodash/find';
3
6
  import isEmpty from 'lodash/isEmpty';
4
7
  import isEqual from 'lodash/isEqual';
5
8
  import React, { forwardRef, useContext, useEffect, useState } from 'react';
@@ -16,6 +19,7 @@ import { ProductVersionDropdownSelector } from './ProductVersionDropdownSelector
16
19
  const defaultProps = {
17
20
  loadTCOnChange: false,
18
21
  showTCAfterButtonClicked: false,
22
+ checkEntitledProduct: false,
19
23
  };
20
24
  /**
21
25
  * Renders a dropdown list to select all products.
@@ -26,12 +30,15 @@ const defaultProps = {
26
30
  * @param props
27
31
  */
28
32
  const AllProductsSelector = forwardRef((props, ref) => {
29
- const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
33
+ var _a, _b;
34
+ const { globalMetadataState: { allProducts, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
30
35
  const caseDispatch = useCaseDispatch();
31
- const { product, version } = useCaseSelector((state) => ({
36
+ const { product, version, contactSSOName } = useCaseSelector((state) => ({
32
37
  product: state.caseDetails.product,
33
38
  version: state.caseDetails.version,
39
+ contactSSOName: state.caseDetails.contactSSOName,
34
40
  }), isEqual);
41
+ //test
35
42
  const { topContentState: { topContent }, } = useContext(TCStateContext);
36
43
  const { routeState: { activeSection, isCaseCreate }, } = useContext(RouteContext);
37
44
  const [isModalOpen, setIsModalOpen] = useState(false);
@@ -39,6 +46,7 @@ const AllProductsSelector = forwardRef((props, ref) => {
39
46
  const [showModalButton, setShowModalButton] = useState(false);
40
47
  const [isProductChanged, setProductChanged] = useState(false);
41
48
  const { t } = useTranslation();
49
+ 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 === product)) === null || _b === void 0 ? void 0 : _b.isEntitledProduct;
42
50
  useEffect(() => {
43
51
  // after TC data is loaded we open the modal
44
52
  const showTCPopUpModalOnProductChange = props.loadTCOnChange && !props.showTCAfterButtonClicked && showModal;
@@ -71,6 +79,7 @@ const AllProductsSelector = forwardRef((props, ref) => {
71
79
  };
72
80
  RouteUtils.updateQueryParams(props.routeProps, newParams);
73
81
  }
82
+ const entitledProducts = filter(allProducts.data.productsResult, (p) => p.isEntitledProduct);
74
83
  const renderProductVersionDropdownSelector = (activeSection === (isCaseCreate ? AppRouteSections.SUMMARIZE : AppRouteSections.TROUBLESHOOT) &&
75
84
  !props.caseCreateExperience) ||
76
85
  activeSection === AppRouteSections.GET_SUPPORT ||
@@ -82,9 +91,12 @@ const AllProductsSelector = forwardRef((props, ref) => {
82
91
  return (React.createElement(React.Fragment, null,
83
92
  renderProductVersionDropdownSelector && (React.createElement("div", { className: "form-group product-selector-wrapper" },
84
93
  React.createElement("div", { className: "all-product-selector-dropdown" },
85
- React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching })))),
94
+ React.createElement(ProductVersionDropdownSelector, { isLoading: allProducts.isFetching, products: props.checkEntitledProduct ? entitledProducts : allProducts.data.productsResult, onProductChange: onProductChange, onVersionChange: onVersionChange, ref: ref, isOnSummaryPage: props.isOnSummaryPage, loadTCOnChange: props.loadTCOnChange, isFetching: topContent.isFetching })))),
86
95
  renderOpenCaseIssue && (React.createElement("div", { className: "case-details-summary" },
87
96
  React.createElement(OpenCaseIssue, { inlineEditable: false, required: true, isOnSummaryPage: props.isOnSummaryPage, isOnGetSupportPage: props.isOnGetSupportPage }))),
97
+ React.createElement(AlertMessage, { isInline: true, variant: AlertType.DANGER, className: "pf-v6-u-mt-lg", title: t(`${loggedInUserRights.data.isSSOUsernameSameAsLoggedInUser(contactSSOName)
98
+ ? 'You are'
99
+ : 'Selected owner is'} not allowed to create case on this product.`), show: !allProducts.isFetching && props.checkEntitledProduct && !isEntitledProduct && !isEmpty(product) }),
88
100
  showModalButton &&
89
101
  !isEmpty(product) &&
90
102
  !isEmpty(version) &&
@@ -1 +1 @@
1
- {"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAiBpE,OAAO,KAAsC,MAAM,OAAO,CAAC;AAK3D,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,0BAA0B,GAAI,OAAO,MAAM,sBA+JvD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}
1
+ {"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAoBpE,OAAO,KAAkD,MAAM,OAAO,CAAC;AAUvE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,0BAA0B,GAAI,OAAO,MAAM,sBA2MvD,CAAC;AAEF,eAAe,0BAA0B,CAAC"}