@rh-support/troubleshoot 2.2.29 → 2.2.30

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 (27) hide show
  1. package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
  2. package/lib/esm/components/CaseEditView/Case.js +1 -1
  3. package/lib/esm/components/CaseEditView/CaseDetailsModals.d.ts +3 -0
  4. package/lib/esm/components/CaseEditView/CaseDetailsModals.d.ts.map +1 -1
  5. package/lib/esm/components/CaseEditView/CaseDetailsModals.js +1 -1
  6. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
  7. package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +8 -5
  8. package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
  9. package/lib/esm/components/CaseInformation/FileDiag.js +5 -2
  10. package/lib/esm/components/IdeaInformation/{IdeaInformtion.d.ts → IdeaInformation.d.ts} +1 -1
  11. package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -0
  12. package/lib/esm/components/IdeaInformation/{IdeaInformtion.js → IdeaInformation.js} +10 -3
  13. package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
  14. package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +12 -5
  15. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts +3 -0
  16. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
  17. package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +19 -2
  18. package/lib/esm/components/RemoteRider/RemoteRiderBanner.d.ts +3 -0
  19. package/lib/esm/components/RemoteRider/RemoteRiderBanner.d.ts.map +1 -1
  20. package/lib/esm/components/RemoteRider/RemoteRiderBanner.js +1 -1
  21. package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
  22. package/lib/esm/components/SubmitCase/SubmitCase.js +2 -2
  23. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
  24. package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +8 -1
  25. package/lib/esm/hooks/useWizard.js +1 -1
  26. package/package.json +8 -8
  27. package/lib/esm/components/IdeaInformation/IdeaInformtion.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,eA8LzC"}
1
+ {"version":3,"file":"Case.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/Case.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAS,mBAAmB,EAAiD,MAAM,kBAAkB,CAAC;AAmB7G,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,KAAK,EAAE,MAAM,eA+LzC"}
@@ -123,5 +123,5 @@ export default function Case(props) {
123
123
  React.createElement(CaseDetailsTabs, { basePath: url, caseNumber: caseNumber, routeProps: props.routeProps, tabdRef: caseDetailsTabsRef }))))),
124
124
  React.createElement(HostnameAwarenessModal, null))),
125
125
  React.createElement(CaseDetailsAside, { caseNumber: caseNumber }),
126
- React.createElement(CaseDetailsModals, { caseNumber: caseNumber, isSecureSupport: loggedInUsersAccount.data.secureSupport })))))));
126
+ React.createElement(CaseDetailsModals, { caseNumber: caseNumber, isSecureSupport: loggedInUsersAccount.data.secureSupport, loggedInUserRights: loggedInUserRights })))))));
127
127
  }
@@ -1,6 +1,9 @@
1
+ import { IApiResponseDetails } from '@rh-support/types/shared';
2
+ import { UserAuth } from '@rh-support/user-permissions';
1
3
  interface IProps {
2
4
  caseNumber: string;
3
5
  isSecureSupport: boolean;
6
+ loggedInUserRights: IApiResponseDetails<UserAuth>;
4
7
  }
5
8
  export default function CaseDetailsModals(props: IProps): any;
6
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"CaseDetailsModals.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsModals.tsx"],"names":[],"mappings":"AAaA,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;CAC5B;AAKD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,OA6EtD"}
1
+ {"version":3,"file":"CaseDetailsModals.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseEditView/CaseDetailsModals.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAaxD,UAAU,MAAM;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAKD,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,MAAM,OA8EtD"}
@@ -55,7 +55,7 @@ export default function CaseDetailsModals(props) {
55
55
  React.createElement("a", { href: getTnCRemoteRiderUrl(props.caseNumber, props.isSecureSupport), target: "_blank", rel: "noopener noreferrer" }, "link"),
56
56
  "to accept the terms in a new tab.")));
57
57
  };
58
- const remoterRiderModal = remoteSessionTermsAcked ? null : (React.createElement(RemoteRiderAcceptanceModal, { caseNumber: props.caseNumber, isModalOpen: !remoteSessionTermsAcked, onSuccess: onRemoteRiderSuccess, onFailure: onRemoteRiderFailure, onModalClose: onModalClose, isCaseDetailsPage: true }));
58
+ const remoterRiderModal = remoteSessionTermsAcked ? null : (React.createElement(RemoteRiderAcceptanceModal, { caseNumber: props.caseNumber, isModalOpen: !remoteSessionTermsAcked, onSuccess: onRemoteRiderSuccess, onFailure: onRemoteRiderFailure, onModalClose: onModalClose, isCaseDetailsPage: true, loggedInUserRights: props.loggedInUserRights }));
59
59
  const modalNameComponentMap = {
60
60
  [ModalNames.REMOTE_RIDER_TERMS]: remoterRiderModal,
61
61
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA6BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eAwPrC;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ProductVersion.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CaseEditView/Tabs/CaseDetails/ProductVersion.tsx"],"names":[],"mappings":"AA6BA,UAAU,MAAM;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACvC;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,MAAM,eA4PrC;AAED,eAAe,eAAe,CAAC"}
@@ -137,10 +137,13 @@ function ProductNVersion(props) {
137
137
  // populate versions with SE product api versions
138
138
  const productObj = getProductObj(allProducts.data.productsResult, selectedProductLocal);
139
139
  if (productObj.versions) {
140
- setVersions(productObj.versions);
141
- if (productObj.versions.length === 1 && !selectedVersionLocal) {
142
- setSelectedVersionLocal(productObj.versions[0]);
143
- updateProductVerstion(selectedProductLocal, productObj.versions[0]);
140
+ const productVersions = productObj.hasComponentsInsteadOfVersions
141
+ ? productObj.versions.sort()
142
+ : productObj.versions;
143
+ setVersions(productVersions);
144
+ if (productVersions.length === 1 && !selectedVersionLocal) {
145
+ setSelectedVersionLocal(productVersions[0]);
146
+ updateProductVerstion(selectedProductLocal, productVersions[0]);
144
147
  }
145
148
  }
146
149
  else {
@@ -163,7 +166,7 @@ function ProductNVersion(props) {
163
166
  const sfdcVersions = getUniqueSortedVersions(fetchedVersions);
164
167
  const versionsForSelectedProduct = productObj.versions ? productObj.versions : sfdcVersions;
165
168
  const productVersions = (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions)
166
- ? versionsForSelectedProduct.reverse()
169
+ ? versionsForSelectedProduct.sort()
167
170
  : versionsForSelectedProduct;
168
171
  setVersions(productVersions);
169
172
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1 +1 @@
1
- {"version":3,"file":"FileDiag.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/FileDiag.tsx"],"names":[],"mappings":"AAYA,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eAiCrC"}
1
+ {"version":3,"file":"FileDiag.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/FileDiag.tsx"],"names":[],"mappings":"AAYA,UAAU,MAAM;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,eAqCrC"}
@@ -2,7 +2,7 @@ import { GlobalMetadataStateContext } from '@rh-support/react-context';
2
2
  import { ability, CaseListFields, resourceActions, resources } from '@rh-support/user-permissions';
3
3
  import { PreviousCaseTypes } from '@rh-support/utils';
4
4
  import isEqual from 'lodash/isEqual';
5
- import React, { useContext } from 'react';
5
+ import React, { useContext, useEffect, useState } from 'react';
6
6
  import { useCaseSelector } from '../../context/CaseContext';
7
7
  import { RulesStateContext } from '../../context/RulesContext';
8
8
  import { SessionRestoreStateContext } from '../../context/SessionRestoreContext';
@@ -16,7 +16,10 @@ export function FileDiag(props) {
16
16
  const { caseType } = useCaseSelector((state) => ({
17
17
  caseType: state.caseDetails.caseType,
18
18
  }), isEqual);
19
- const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
19
+ const [isIdea, setIsIdea] = useState(false);
20
+ useEffect(() => {
21
+ setIsIdea(caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT);
22
+ }, [caseType]);
20
23
  if (!canAddAttachments)
21
24
  return null;
22
25
  return (React.createElement(WidgetFileUploader, { className: props.className, idToUploadTo: activeSessionId, isPrivate: false, needsAnalyzing: isIdea ? false : true, isSessionId: true, isSecureSupport: loggedInUsersAccount.data.secureSupport, autoUploadOnSelect: loggedInUsersAccount.data.secureSupport ? false : true, helperText: getValidAttachmentRules(rulesState.EARules.rules).length > 0 ? React.createElement(FileEARule, null) : null, isIdea: isIdea }));
@@ -1,2 +1,2 @@
1
1
  export default function IdeaInformation(): JSX.Element;
2
- //# sourceMappingURL=IdeaInformtion.d.ts.map
2
+ //# sourceMappingURL=IdeaInformation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IdeaInformation.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformation.tsx"],"names":[],"mappings":"AAgCA,MAAM,CAAC,OAAO,UAAU,eAAe,gBA+ItC"}
@@ -1,7 +1,7 @@
1
1
  import { Flex, FlexItem } from '@patternfly/react-core';
2
2
  import { AlertMessage, AlertType, LoadingIndicator } from '@rh-support/components';
3
- import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, } from '@rh-support/react-context';
4
- import { canManageCase, haventLoadedMetadata } from '@rh-support/utils';
3
+ import { fetchCaseSeverities, fetchCaseTypes, fetchLanguageMetadata, GlobalMetadataDispatchContext, GlobalMetadataStateContext, useGlobalStateContext, } from '@rh-support/react-context';
4
+ import { canManageCase, haventLoadedMetadata, isSpecialSupportOfferingEnabled } from '@rh-support/utils';
5
5
  import isEmpty from 'lodash/isEmpty';
6
6
  import isEqual from 'lodash/isEqual';
7
7
  import React, { useContext, useEffect } from 'react';
@@ -16,19 +16,23 @@ import Severity from '../CaseInformation/Severity';
16
16
  import SupportLevel from '../CaseInformation/SupportLevel';
17
17
  import CaseLanguageSelector from '../CaseManagement/CaseLanguageSelector';
18
18
  import { Cep } from '../CaseManagement/Cep';
19
+ import ESSRemoteSessionCheckBox from '../CaseManagement/ESSRemoteSessionCheckBox';
19
20
  import OpenReferenceNumber from '../CaseManagement/OpenReferenceNumber';
20
21
  import { RHAssociatesSelector } from '../CaseManagement/RHAssociatesSelector';
21
22
  import CaseContactSelector from '../CaseManagement/SendNotifications/CaseContactSelector';
22
23
  import KtQuestions from '../ImproveCase/KtQuestions';
23
24
  export default function IdeaInformation() {
25
+ var _a;
24
26
  const { t } = useTranslation();
25
27
  const { globalMetadataState: { allCaseTypes, allCaseSeverities, caseLanguages, loggedInUser, loggedInUserJwtToken, loggedInUsersAccount, }, } = useContext(GlobalMetadataStateContext);
26
28
  const dispatchToGlobalMetadataReducer = useContext(GlobalMetadataDispatchContext);
27
- const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements } = useCaseSelector((state) => ({
29
+ const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
30
+ const { contactSSOName, selectedAccountDetails, ownersCaseGroups, hasInvalidEntitlements, product } = useCaseSelector((state) => ({
28
31
  contactSSOName: state.caseDetails.contactSSOName,
29
32
  ownersCaseGroups: state.ownersCaseGroups,
30
33
  selectedAccountDetails: state.selectedAccountDetails,
31
34
  hasInvalidEntitlements: state.hasInvalidEntitlements,
35
+ product: state.caseDetails.product,
32
36
  }), isEqual);
33
37
  const caseDispatch = useCaseDispatch();
34
38
  const isMetadataLoading = () => {
@@ -71,6 +75,8 @@ export default function IdeaInformation() {
71
75
  const onSeverityChange = (payload) => {
72
76
  setCaseDetails(caseDispatch, payload);
73
77
  };
78
+ // To check if the user is ESS Customer and Product has ESS Support
79
+ const isESSCustomer = isSpecialSupportOfferingEnabled((_a = allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, product);
74
80
  return (React.createElement(React.Fragment, null,
75
81
  React.createElement(LoadingIndicator, { show: isMetadataLoading(), size: "lg" }),
76
82
  React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-u-mb-md", title: t("Sorry, we're having a problem gathering your information."), show: isMetadataLoadingError(), isInline: true }),
@@ -105,5 +111,6 @@ export default function IdeaInformation() {
105
111
  React.createElement(CaseContactSelector, null),
106
112
  React.createElement(RHAssociatesSelector, null),
107
113
  React.createElement(OpenReferenceNumber, { inlineEditable: false, hideSaveCancel: true }),
114
+ isESSCustomer && React.createElement(ESSRemoteSessionCheckBox, null),
108
115
  React.createElement(Cep, null))))));
109
116
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NewProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductVersionSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAYpE,UAAU,MAAM;IACZ,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,qCAAqC,EAAE,OAAO,CAAC;CAClD;AAED,eAAO,MAAM,yBAAyB,UAAW,MAAM,gBAqItD,CAAC"}
1
+ {"version":3,"file":"NewProductVersionSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductVersionSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAYpE,UAAU,MAAM;IACZ,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,qCAAqC,EAAE,OAAO,CAAC;CAClD;AAED,eAAO,MAAM,yBAAyB,UAAW,MAAM,gBA+ItD,CAAC"}
@@ -30,10 +30,14 @@ export const NewProductVersionSelector = (props) => {
30
30
  if (isEmpty((_a = props.selectedProduct) === null || _a === void 0 ? void 0 : _a.name))
31
31
  return;
32
32
  if (props.selectedProduct.versions) {
33
+ const productObj = getProductObj(allProducts.data.productsResult, props.selectedProduct.name);
34
+ const productVersions = productObj.hasComponentsInsteadOfVersions
35
+ ? props.selectedProduct.versions.sort()
36
+ : props.selectedProduct.versions;
33
37
  // if versions array has one value set that value as selected
34
- if (props.selectedProduct.versions.length === 1) {
35
- props.onVersionChange(props.selectedProduct.versions[0]);
36
- setSelected(props.selectedProduct.versions[0]);
38
+ if (productVersions.length === 1) {
39
+ props.onVersionChange(productVersions[0]);
40
+ setSelected(productVersions[0]);
37
41
  }
38
42
  else {
39
43
  setSelected('');
@@ -56,7 +60,10 @@ export const NewProductVersionSelector = (props) => {
56
60
  return;
57
61
  const productObj = getProductObj(allProducts.data.productsResult, props.selectedProduct.name);
58
62
  if (productObj.versions) {
59
- const versionArray = productObj.versions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
63
+ const productVersions = productObj.hasComponentsInsteadOfVersions
64
+ ? productObj.versions.sort()
65
+ : productObj.versions;
66
+ const versionArray = productVersions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
60
67
  setSelectVersionOptions(versionArray);
61
68
  setSelected(props.versionState);
62
69
  }
@@ -77,7 +84,7 @@ export const NewProductVersionSelector = (props) => {
77
84
  }
78
85
  const productObj = getProductObj(allProducts.data.productsResult, props.selectedProduct.name);
79
86
  const sfdcVersions = getUniqueSortedVersions(fetchedVersions);
80
- const productVersions = (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions) ? sfdcVersions.reverse() : sfdcVersions;
87
+ const productVersions = (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions) ? sfdcVersions.sort() : sfdcVersions;
81
88
  const versionArray = productVersions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
82
89
  setSelectVersionOptions(versionArray);
83
90
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1,3 +1,5 @@
1
+ import { IApiResponseDetails } from '@rh-support/types/shared';
2
+ import { UserAuth } from '@rh-support/user-permissions';
1
3
  interface IProps {
2
4
  isModalOpen: boolean;
3
5
  onModalClose?: () => void;
@@ -5,6 +7,7 @@ interface IProps {
5
7
  onFailure: () => void;
6
8
  isCaseDetailsPage?: boolean;
7
9
  caseNumber: string;
10
+ loggedInUserRights: IApiResponseDetails<UserAuth>;
8
11
  }
9
12
  export default function RemoteRiderAcceptanceModal(props: IProps): JSX.Element;
10
13
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteRiderAcceptanceModal.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderAcceptanceModal.tsx"],"names":[],"mappings":"AAOA,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAK,EAAE,MAAM,eA2B/D"}
1
+ {"version":3,"file":"RemoteRiderAcceptanceModal.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderAcceptanceModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAMxD,UAAU,MAAM;IACZ,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAAC,KAAK,EAAE,MAAM,eAsD/D"}
@@ -8,21 +8,38 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
8
8
  });
9
9
  };
10
10
  import { publicApi } from '@cee-eng/hydrajs';
11
- import { AcceptTermsModal, useFetch } from '@rh-support/components';
11
+ import { AcceptTermsModal, ToastNotification, useFetch } from '@rh-support/components';
12
12
  import { GlobalMetadataStateContext } from '@rh-support/react-context';
13
13
  import React, { useContext } from 'react';
14
+ import { useTranslation } from 'react-i18next';
14
15
  import { TnC } from '../../constants/tncConstants';
15
16
  export default function RemoteRiderAcceptanceModal(props) {
16
17
  const { globalMetadataState: { loggedInUser }, } = useContext(GlobalMetadataStateContext);
18
+ const { t } = useTranslation();
17
19
  const { request, isFetching } = useFetch(publicApi.kase.acknowledgeRemoteSessionTerms, { propgateErrors: true });
20
+ const { request: postCommentRequest, isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
21
+ propgateErrors: true,
22
+ });
18
23
  const onConfirm = (pdfId) => __awaiter(this, void 0, void 0, function* () {
19
24
  try {
20
25
  yield request(props.caseNumber, pdfId);
26
+ try {
27
+ const requestComment = t('#### Remote Access Rider agreement has been accepted.\n\n This action does not initiate a remote session. Please make a case comment if you would like to submit a request.');
28
+ yield postCommentRequest({
29
+ caseNumber: props.caseNumber,
30
+ commentBody: requestComment,
31
+ contentType: 'markdown',
32
+ });
33
+ ToastNotification.addSuccessMessage(t('Remote Access Rider agreement has been accepted'), t('This action does not initiate a remote session. Please make a case comment if you would like to submit a request.'));
34
+ }
35
+ catch (e) {
36
+ ToastNotification.addWarningMessage(t('Could not submit a comment'), t('Rest assured, we have noted you have accepted the agreement'));
37
+ }
21
38
  props.onSuccess && props.onSuccess();
22
39
  }
23
40
  catch (e) {
24
41
  props.onFailure && props.onFailure();
25
42
  }
26
43
  });
27
- return (React.createElement(AcceptTermsModal, { isSubmitting: isFetching, siteCode: TnC.REMOTE_RIDER_SITE_CODE, eventCode: TnC.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername, isModalOpen: props.isModalOpen, onModalClose: props.onModalClose, dataTrackingId: props.isCaseDetailsPage ? 'rar-case-details' : 'rar-case-submit', onConfirm: onConfirm }));
44
+ return (React.createElement(AcceptTermsModal, { isSubmitting: isFetching, siteCode: TnC.REMOTE_RIDER_SITE_CODE, eventCode: TnC.REMOTER_RIDER_EVENT_CODE, loggedInUser: loggedInUser.data.ssoUsername, isModalOpen: props.isModalOpen, onModalClose: props.onModalClose, dataTrackingId: props.isCaseDetailsPage ? 'rar-case-details' : 'rar-case-submit', onConfirm: onConfirm, isDisabled: isPostingComment }));
28
45
  }
@@ -1,8 +1,11 @@
1
+ import { IApiResponseDetails } from '@rh-support/types/shared';
2
+ import { UserAuth } from '@rh-support/user-permissions';
1
3
  interface IProps {
2
4
  onConfirm: () => void;
3
5
  onClose: () => void;
4
6
  caseNumber: string;
5
7
  isSecureSupport: boolean;
8
+ loggedInUserRights: IApiResponseDetails<UserAuth>;
6
9
  }
7
10
  export declare function RemoteRiderBanner(props: IProps): JSX.Element;
8
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteRiderBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderBanner.tsx"],"names":[],"mappings":"AASA,UAAU,MAAM;IACZ,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;CAC5B;AAMD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAkF9C"}
1
+ {"version":3,"file":"RemoteRiderBanner.d.ts","sourceRoot":"","sources":["../../../../src/components/RemoteRider/RemoteRiderBanner.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAOxD,UAAU,MAAM;IACZ,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,mBAAmB,CAAC,QAAQ,CAAC,CAAC;CACrD;AAMD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,eAmF9C"}
@@ -43,5 +43,5 @@ export function RemoteRiderBanner(props) {
43
43
  " ",
44
44
  React.createElement(ExternalLinkAltIcon, null)))), actionClose: React.createElement(AlertActionCloseButton, { onClose: props.onClose }) },
45
45
  React.createElement(Trans, null, areTermsAccepted ? TERMS_ACCEPTED_MSG : TERMS_ACCEPT_MSG)),
46
- isRemoteRiderModalVisble && (React.createElement(RemoteRiderAcceptanceModal, { caseNumber: props.caseNumber, isModalOpen: true, onModalClose: onModalClose, onSuccess: onTermsAcceptSuccess, onFailure: onTermsAcceptFailure }))));
46
+ isRemoteRiderModalVisble && (React.createElement(RemoteRiderAcceptanceModal, { caseNumber: props.caseNumber, isModalOpen: true, onModalClose: onModalClose, onSuccess: onTermsAcceptSuccess, onFailure: onTermsAcceptFailure, loggedInUserRights: props.loggedInUserRights }))));
47
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAkCA,MAAM,CAAC,OAAO,UAAU,UAAU,gBAiTjC"}
1
+ {"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAkCA,MAAM,CAAC,OAAO,UAAU,UAAU,gBAkTjC"}
@@ -47,7 +47,7 @@ export default function SubmitCase() {
47
47
  const { clusterRecommendationsState: { clusterRecommendations }, } = useContext(ClusterRecommendationsContext);
48
48
  const { attachmentState } = useContext(AttachmentStateContext);
49
49
  const [isRemoteRiderBannerVisible, setIsRemoteRiderBannerVisible] = useState(true);
50
- const { globalMetadataState: { loggedInUser, loggedInUsersAccount, pcmConfig }, } = useContext(GlobalMetadataStateContext);
50
+ const { globalMetadataState: { loggedInUser, loggedInUsersAccount, pcmConfig, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
51
51
  const getBusinessHours = useFetch(publicApi.businessHours.getBusinessHours);
52
52
  const { t } = useTranslation();
53
53
  const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
@@ -95,7 +95,7 @@ export default function SubmitCase() {
95
95
  !isESSCustomer &&
96
96
  !screenSessionRequested &&
97
97
  showRemoteRiderBanner &&
98
- !loggedInUser.data.isInternal && (React.createElement(RemoteRiderBanner, { onConfirm: onRemoteRiderConfirm, onClose: onRemoteRiderClose, caseNumber: caseNumber, isSecureSupport: loggedInUsersAccount.data.secureSupport })),
98
+ !loggedInUser.data.isInternal && (React.createElement(RemoteRiderBanner, { onConfirm: onRemoteRiderConfirm, onClose: onRemoteRiderClose, caseNumber: caseNumber, isSecureSupport: loggedInUsersAccount.data.secureSupport, loggedInUserRights: loggedInUserRights })),
99
99
  React.createElement("div", { className: "submit-case-header-container" },
100
100
  React.createElement("p", { className: "kicker kicker-sm pf-u-mb-sm" }, !isEmpty(RouteUtils.seBasePath) &&
101
101
  !isUploadingAttachment(attachmentState.caseFiles.selectedLocalFiles) ? (React.createElement(React.Fragment, null,
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/WidgetFileUploader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AA0B/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAInD,UAAU,MAAO,SAAQ,wBAAwB,EAAE,gBAAgB;IAC/D,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAYD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,eA4NxC;kBA5NQ,kBAAkB;;;AAgO3B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"WidgetFileUploader.d.ts","sourceRoot":"","sources":["../../../../../src/components/shared/fileUpload/WidgetFileUploader.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAA0C,MAAM,OAAO,CAAC;AA0B/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAInD,UAAU,MAAO,SAAQ,wBAAwB,EAAE,gBAAgB;IAC/D,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IACtC,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAYD,iBAAS,kBAAkB,CAAC,KAAK,EAAE,MAAM,eA2OxC;kBA3OQ,kBAAkB;;;AA+O3B,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
@@ -70,6 +70,14 @@ function WidgetFileUploader(props) {
70
70
  payload: { isRuleModalVisible: true },
71
71
  });
72
72
  };
73
+ useEffect(() => {
74
+ //need to run the analysis to throw an error if the file is an error
75
+ attachmentState.caseFiles.selectedLocalFiles.forEach((file, index) => {
76
+ props.needsAnalyzing &&
77
+ doSosReportAnalysisForFile(dispatchToAttachmentReducer, props.idToUploadTo, file.attachmentId, file, true, index);
78
+ });
79
+ // eslint-disable-next-line react-hooks/exhaustive-deps
80
+ }, [props.isIdea]);
73
81
  useEffect(() => {
74
82
  attachmentState.caseFiles.selectedLocalFiles.forEach((file, index) => {
75
83
  if (isRestoredFromSession(file.uploadProgress.uploadStatus) &&
@@ -84,7 +92,6 @@ function WidgetFileUploader(props) {
84
92
  props.idToUploadTo,
85
93
  dispatchToAttachmentReducer,
86
94
  props.needsAnalyzing,
87
- props.isIdea,
88
95
  ]);
89
96
  const getFileAccessDetails = (file) => __awaiter(this, void 0, void 0, function* () {
90
97
  const fileName = (file === null || file === void 0 ? void 0 : file.name) || '';
@@ -6,7 +6,7 @@ import React, { Suspense, useContext } from 'react';
6
6
  import { Trans, useTranslation } from 'react-i18next';
7
7
  import CaseInformation from '../components/CaseInformation/CaseInformation';
8
8
  import CaseManagement from '../components/CaseManagement/CaseManagement';
9
- import IdeaInformation from '../components/IdeaInformation/IdeaInformtion';
9
+ import IdeaInformation from '../components/IdeaInformation/IdeaInformation';
10
10
  import OpenCase from '../components/OpenCase/OpenCase';
11
11
  import ProductSelector from '../components/ProductSelector/ProductSelector';
12
12
  import Review from '../components/Review/Review';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.29",
3
+ "version": "2.2.30",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -26,7 +26,7 @@
26
26
  "lib/**/*"
27
27
  ],
28
28
  "peerDependencies": {
29
- "@cee-eng/hydrajs": "4.16.17",
29
+ "@cee-eng/hydrajs": "4.16.18",
30
30
  "@cee-eng/ui-toolkit": "1.1.6",
31
31
  "@patternfly/patternfly": "4.196.7",
32
32
  "@patternfly/pfe-accordion": "1.12.3",
@@ -56,7 +56,7 @@
56
56
  "react-virtualized": "^9.21.2"
57
57
  },
58
58
  "dependencies": {
59
- "@cee-eng/hydrajs": "4.16.17",
59
+ "@cee-eng/hydrajs": "4.16.18",
60
60
  "@cee-eng/ui-toolkit": "1.1.6",
61
61
  "@patternfly/patternfly": "4.196.7",
62
62
  "@patternfly/pfe-accordion": "1.12.3",
@@ -66,11 +66,11 @@
66
66
  "@patternfly/react-core": "4.264.0",
67
67
  "@progress/kendo-drawing": "^1.6.0",
68
68
  "@progress/kendo-react-pdf": "^3.12.0",
69
- "@rh-support/components": "2.1.16",
70
- "@rh-support/react-context": "2.1.16",
69
+ "@rh-support/components": "2.1.17",
70
+ "@rh-support/react-context": "2.1.17",
71
71
  "@rh-support/types": "2.0.2",
72
- "@rh-support/user-permissions": "2.1.10",
73
- "@rh-support/utils": "2.1.7",
72
+ "@rh-support/user-permissions": "2.1.11",
73
+ "@rh-support/utils": "2.1.8",
74
74
  "@types/react-redux": "^7.1.12",
75
75
  "@types/redux": "^3.6.0",
76
76
  "dompurify": "^2.4.1",
@@ -133,5 +133,5 @@
133
133
  "defaults and supports es6-module",
134
134
  "maintained node versions"
135
135
  ],
136
- "gitHead": "16b7fff6899cdf8d7011becba0351d66ee723f90"
136
+ "gitHead": "4ec11a07c3b157b92a224211e68c903243028255"
137
137
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"IdeaInformtion.d.ts","sourceRoot":"","sources":["../../../../src/components/IdeaInformation/IdeaInformtion.tsx"],"names":[],"mappings":"AA8BA,MAAM,CAAC,OAAO,UAAU,eAAe,gBAsItC"}