@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
@@ -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 { InputGroupText, Spinner, TextInput, ValidatedOptions } from '@patternfly/react-core';
12
11
  import CheckIcon from '@patternfly/react-icons/dist/js/icons/check-icon';
13
12
  import TimesIcon from '@patternfly/react-icons/dist/js/icons/times-icon';
@@ -20,7 +19,7 @@ import { Trans, useTranslation } from 'react-i18next';
20
19
  import { useCaseDispatch, useCaseSelector } from '../../../../context/CaseContext';
21
20
  import { useCaseUpdateErrorMessage } from '../../../../hooks/useCaseUpdateErrorMessage';
22
21
  import { SUMMARY_LENGTH_LIMIT } from '../../../../reducers/CaseConstNTypes';
23
- import { setCaseDetails, updateCaseDetailsGraphQL } from '../../../../reducers/CaseReducer';
22
+ import { setCaseDetails, updateCaseDetails } from '../../../../reducers/CaseReducer';
24
23
  import { PDFContext } from '../../PDFContainer';
25
24
  const defaultProps = {
26
25
  inlineEditable: true,
@@ -30,13 +29,11 @@ const defaultProps = {
30
29
  function Summary(props) {
31
30
  const { t } = useTranslation();
32
31
  const caseUpdateError = useCaseUpdateErrorMessage();
33
- const { summary, caseNumber, existingCaseDetails } = useCaseSelector((state) => ({
32
+ const { summary, caseNumber } = useCaseSelector((state) => ({
34
33
  summary: state.caseDetails.summary,
35
34
  caseNumber: state.caseDetails.caseNumber,
36
- existingCaseDetails: state.caseDetails,
37
35
  }), isEqual);
38
36
  const caseDispatch = useCaseDispatch();
39
- const apolloClient = useApolloClient();
40
37
  const { isExportingPDF } = useContext(PDFContext);
41
38
  const [summaryState, setSummaryState] = useState(summary);
42
39
  const [isSummaryUpdating, setIsSummaryUpdating] = useState(false);
@@ -44,11 +41,9 @@ function Summary(props) {
44
41
  // value changed logic to show a none local severity change
45
42
  const [localSummaryChange, setLocalSummaryChange] = useState(false);
46
43
  // To keep track of Cancel button state to close InlineEdit input mode
47
- const [cancelToggleKey, setCancelToggleKey] = useState(0);
44
+ const [isCancelClicked, setIsCancelClicked] = useState(false);
48
45
  // To keep track of Save button state to close InlineEdit input mode
49
- const [saveToggleKey, setSaveToggleKey] = useState(0);
50
- const closeInlineEdit = () => setSaveToggleKey((key) => key + 1);
51
- const cancelInlineEdit = () => setCancelToggleKey((key) => key + 1);
46
+ const [isSaveClicked, setIsSaveClicked] = useState(false);
52
47
  const afterLocalChange = () => setLocalSummaryChange(false);
53
48
  const getSummaryChangedTT = () => React.createElement(Trans, null, "Summary has been updated");
54
49
  // Function to handle when summary changes
@@ -60,9 +55,7 @@ function Summary(props) {
60
55
  const onSummaryUpdate = (caseDetails) => __awaiter(this, void 0, void 0, function* () {
61
56
  setIsSummaryUpdating(true);
62
57
  try {
63
- yield updateCaseDetailsGraphQL(caseDispatch, apolloClient, caseNumber, caseDetails, false, {
64
- existingCaseDetails,
65
- });
58
+ yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
66
59
  setIsSummaryUpdating(false);
67
60
  ToastNotification.addSuccessMessage(t(`Title has been successfully updated`));
68
61
  }
@@ -88,11 +81,11 @@ function Summary(props) {
88
81
  setCaseDetails(caseDispatch, caseDetails);
89
82
  }
90
83
  setLocalSummaryChange(true);
91
- closeInlineEdit();
84
+ setIsSaveClicked(!isSaveClicked);
92
85
  });
93
86
  const onCancel = () => {
94
87
  setSummaryState(summary);
95
- cancelInlineEdit();
88
+ setIsCancelClicked(!isCancelClicked);
96
89
  };
97
90
  useEffect(() => {
98
91
  setSummaryState(summary);
@@ -126,14 +119,14 @@ function Summary(props) {
126
119
  setCaseDetails(caseDispatch, caseDetails);
127
120
  }
128
121
  setLocalSummaryChange(true);
129
- closeInlineEdit();
122
+ setIsSaveClicked(!isSaveClicked);
130
123
  }
131
124
  });
132
125
  return (React.createElement(React.Fragment, null,
133
126
  React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-summary' }, labelContent: React.createElement(React.Fragment, null,
134
127
  React.createElement(Trans, null, "Title"),
135
128
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localSummaryChange, value: summary, getTooltipContent: getSummaryChangedTT }),
136
- React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: cancelToggleKey % 2 === 1, saveToggleState: saveToggleKey % 2 === 1, isExportingPDF: isExportingPDF },
129
+ React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
137
130
  React.createElement("div", { className: "pf-v6-u-display-flex pf-v6-u-flex-direction-row pf-v6-u-align-items-center" },
138
131
  React.createElement(TextInput, { type: "text", id: "case-details-summary", "aria-required": true, required: true, name: "case-details-summary", value: summaryState, onChange: (_event, value) => onSummaryChange(value), isDisabled: isSummaryUpdating, "data-tracking-id": "case-details-summary", onKeyDown: handleKeyDown, validated: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) > SUMMARY_LENGTH_LIMIT || isSummaryEmpty
139
132
  ? ValidatedOptions.error
@@ -1 +1 @@
1
- {"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAa3E,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA8IlD"}
1
+ {"version":3,"file":"VerifyCaseStatusModal.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/CaseEditView/Tabs/CaseDiscussion/VerifyCaseStatusModal/VerifyCaseStatusModal.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAa3E,UAAU,MAAM;IACZ,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACvB;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,qBA6IlD"}
@@ -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 { Button, ButtonVariant, Modal, ModalBody, ModalFooter, ModalHeader, ModalVariant, } from '@patternfly/react-core';
12
11
  import { SingleSelectDropdown, ToastNotification } from '@rh-support/components';
13
12
  import { GlobalMetadataStateContext, useCanEditCase } from '@rh-support/react-context';
@@ -44,12 +43,11 @@ export function VerifyCaseStatusModal(props) {
44
43
  selectedAccountDetails: state.selectedAccountDetails,
45
44
  }), isEqual);
46
45
  const { status } = caseState.caseDetails;
47
- const { globalMetadataState: { loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
48
- const apolloClient = useApolloClient();
46
+ const { globalMetadataState: { loggedInUsersAccount, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
49
47
  const canManageCase = loggedInUserRights.data.canManageCases();
50
48
  useEffect(() => {
51
- fetchAllStatuses(caseOverviewDispatch, apolloClient);
52
- }, [caseOverviewDispatch, apolloClient]);
49
+ fetchAllStatuses(caseOverviewDispatch, loggedInUsersAccount.data.secureSupport);
50
+ }, [caseOverviewDispatch, loggedInUsersAccount.data.secureSupport]);
53
51
  const { isCaseUpdating } = caseState;
54
52
  const canEditCase = useCanEditCase();
55
53
  const caseDispatch = useCaseDispatch();
@@ -1 +1 @@
1
- {"version":3,"file":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAe/F,OAAO,KAAsC,MAAM,OAAO,CAAC;AAiB3D,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,qBA8MtD"}
1
+ {"version":3,"file":"RMEEscalationList.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/RMEEscalations/RMEEscalationList.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAqB,MAAM,2CAA2C,CAAC;AAe/F,OAAO,KAAsC,MAAM,OAAO,CAAC;AAiB3D,UAAU,MAAM;IACZ,WAAW,EAAE,eAAe,EAAE,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACtB;AAOD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,qBA8MtD"}
@@ -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, ButtonVariant, Flex, FlexItem } from '@patternfly/react-core';
13
12
  import { LoadingIndicator, PFTable, TableComponent, ToastNotification, useFetch, } from '@rh-support/components';
@@ -31,7 +30,6 @@ const REOPEN_ESCALATION_MSG = 'Escalation reopened. A manager will review your r
31
30
  const CLOSURE_ESCALATION_MSG = 'Escalation closed.';
32
31
  export default function RMEEscalationList(props) {
33
32
  const { t } = useTranslation();
34
- const apolloClient = useApolloClient();
35
33
  const { request: updateEscalationRequest, isFetching: isUpdatingEscalation } = useFetch(escalations.updateEscalations, { propgateErrors: true });
36
34
  const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
37
35
  propgateErrors: true,
@@ -63,7 +61,8 @@ export default function RMEEscalationList(props) {
63
61
  });
64
62
  const submitEscalationComment = (escalationNum, comment, message) => __awaiter(this, void 0, void 0, function* () {
65
63
  try {
66
- escalationNum && fetchCaseEscalations(caseDetailsPageDispatch, props.caseNumber, apolloClient, false);
64
+ escalationNum &&
65
+ fetchCaseEscalations(caseDetailsPageDispatch, props.caseNumber, props.accountNumber, false);
67
66
  yield postCommentRequest({
68
67
  caseNumber: props.caseNumber,
69
68
  commentBody: comment,
@@ -1 +1 @@
1
- {"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAoHpD"}
1
+ {"version":3,"file":"CaseInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/CaseInformation.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAErD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAQvD,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,qBAkHpD"}
@@ -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,qBAuCnD"}
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,16 +2,17 @@ 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
+ import CaseContactSelector from './SendNotifications/CaseContactSelector';
15
16
  export default function CaseManagement(props) {
16
17
  const caseDispatch = useCaseDispatch();
17
18
  const onSeverityChange = (payload) => {
@@ -28,7 +29,11 @@ export default function CaseManagement(props) {
28
29
  React.createElement(Fts, { inlineEditable: false }),
29
30
  React.createElement(Grid, { hasGutter: true },
30
31
  React.createElement(GridItem, { span: 12, xl2: 6, className: "pf-v6-u-mb-xs" },
31
- 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 }))),
35
+ React.createElement(CaseContactSelector, null),
32
36
  React.createElement(RHAssociatesSelector, null),
33
- React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true })));
37
+ React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
38
+ React.createElement(Cep, null)));
34
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,sBAoJtC"}
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,22 +8,21 @@ 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
- // import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
20
+ import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
22
21
  import KtQuestions from '../ImproveCase/KtQuestions';
23
22
  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,7 +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 }))),
106
+ React.createElement(CaseContactSelector, null),
107
107
  React.createElement(RHAssociatesSelector, null),
108
- React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }))))));
108
+ React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
109
+ React.createElement(Cep, null))))));
109
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"}