@rh-support/troubleshoot 2.2.28 → 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.
- package/lib/esm/components/CaseEditView/Case.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Case.js +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsModals.d.ts +3 -0
- package/lib/esm/components/CaseEditView/CaseDetailsModals.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/CaseDetailsModals.js +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.d.ts.map +1 -1
- package/lib/esm/components/CaseEditView/Tabs/CaseDetails/ProductVersion.js +33 -18
- package/lib/esm/components/CaseInformation/FileDiag.d.ts.map +1 -1
- package/lib/esm/components/CaseInformation/FileDiag.js +5 -2
- package/lib/esm/components/IdeaInformation/{IdeaInformtion.d.ts → IdeaInformation.d.ts} +1 -1
- package/lib/esm/components/IdeaInformation/IdeaInformation.d.ts.map +1 -0
- package/lib/esm/components/IdeaInformation/{IdeaInformtion.js → IdeaInformation.js} +10 -3
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/AllProductsSelector.js +11 -47
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts +0 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductDropdownSelector.js +1 -7
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/NewProductVersionSelector.js +46 -48
- package/lib/esm/components/ProductSelector/ProductSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductSelector.js +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.d.ts.map +1 -1
- package/lib/esm/components/ProductSelector/ProductVersionDropdownSelector.js +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts +3 -0
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderAcceptanceModal.js +19 -2
- package/lib/esm/components/RemoteRider/RemoteRiderBanner.d.ts +3 -0
- package/lib/esm/components/RemoteRider/RemoteRiderBanner.d.ts.map +1 -1
- package/lib/esm/components/RemoteRider/RemoteRiderBanner.js +1 -1
- package/lib/esm/components/Review/Review.d.ts.map +1 -1
- package/lib/esm/components/Review/Review.js +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.d.ts.map +1 -1
- package/lib/esm/components/SubmitCase/SubmitCase.js +8 -7
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.d.ts.map +1 -1
- package/lib/esm/components/shared/fileUpload/WidgetFileUploader.js +8 -1
- package/lib/esm/hooks/useWizard.js +1 -1
- package/package.json +8 -8
- 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,
|
|
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":"
|
|
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,
|
|
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"}
|
|
@@ -41,6 +41,7 @@ function ProductNVersion(props) {
|
|
|
41
41
|
const [isVersionInvalid, setIsVersionInvalid] = useState(false);
|
|
42
42
|
const [selectedProductLocal, setSelectedProductLocal] = useState(product);
|
|
43
43
|
const [selectedVersionLocal, setSelectedVersionLocal] = useState(version);
|
|
44
|
+
const [isSEProductApiIsDown, setIsSEProductApiIsDown] = useState(false);
|
|
44
45
|
const canEditCase = useCanEditCase();
|
|
45
46
|
const { isExportingPDF } = useContext(PDFContext);
|
|
46
47
|
useEffect(() => {
|
|
@@ -118,31 +119,42 @@ function ProductNVersion(props) {
|
|
|
118
119
|
});
|
|
119
120
|
// To check if version in invalid
|
|
120
121
|
const checkIfVersionIsInvalid = isVersionInvalid && isEmpty(selectedVersionLocal);
|
|
121
|
-
// when user changes selected product, we need to
|
|
122
|
+
// when user changes selected product, we need to get the versions
|
|
122
123
|
useEffect(() => {
|
|
124
|
+
if (!selectedProductLocal)
|
|
125
|
+
return;
|
|
123
126
|
const getVersions = () => __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
setIsVersionUpdating(true);
|
|
127
|
-
yield getVersionsDetails(caseDispatch, selectedProductLocal);
|
|
128
|
-
setIsVersionUpdating(false);
|
|
129
|
-
}
|
|
130
|
-
catch (e) {
|
|
131
|
-
console.log(e);
|
|
132
|
-
setIsVersionUpdating(false);
|
|
133
|
-
// if sfdc api was downd and verssions were not available then populate versions with SE versions
|
|
134
|
-
const productObj = getProductObj(allProducts.data.productsResult, selectedProductLocal);
|
|
135
|
-
setVersions((productObj === null || productObj === void 0 ? void 0 : productObj.versions) || []);
|
|
136
|
-
}
|
|
127
|
+
try {
|
|
128
|
+
yield getVersionsDetails(caseDispatch, selectedProductLocal);
|
|
137
129
|
}
|
|
138
|
-
|
|
139
|
-
|
|
130
|
+
catch (e) {
|
|
131
|
+
console.log(e);
|
|
140
132
|
}
|
|
141
133
|
});
|
|
134
|
+
// call sfdc version api to get version flags that we only get from sfdc api
|
|
135
|
+
// flags are used in severity components
|
|
142
136
|
getVersions();
|
|
137
|
+
// populate versions with SE product api versions
|
|
138
|
+
const productObj = getProductObj(allProducts.data.productsResult, selectedProductLocal);
|
|
139
|
+
if (productObj.versions) {
|
|
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]);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
setIsSEProductApiIsDown(true);
|
|
151
|
+
}
|
|
152
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
143
153
|
}, [selectedProductLocal, caseDispatch, allProducts.data]);
|
|
144
154
|
// observe when fetched versions are available
|
|
145
155
|
useEffect(() => {
|
|
156
|
+
if (!isSEProductApiIsDown)
|
|
157
|
+
return;
|
|
146
158
|
const fetchedVersions = versionsDetails.data.map(({ name }) => name);
|
|
147
159
|
if (fetchedVersions.length === 1 && !selectedVersionLocal) {
|
|
148
160
|
setVersions(fetchedVersions);
|
|
@@ -152,7 +164,10 @@ function ProductNVersion(props) {
|
|
|
152
164
|
}
|
|
153
165
|
const productObj = getProductObj(allProducts.data.productsResult, selectedProductLocal);
|
|
154
166
|
const sfdcVersions = getUniqueSortedVersions(fetchedVersions);
|
|
155
|
-
const
|
|
167
|
+
const versionsForSelectedProduct = productObj.versions ? productObj.versions : sfdcVersions;
|
|
168
|
+
const productVersions = (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions)
|
|
169
|
+
? versionsForSelectedProduct.sort()
|
|
170
|
+
: versionsForSelectedProduct;
|
|
156
171
|
setVersions(productVersions);
|
|
157
172
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
158
173
|
}, [versionsDetails.data]);
|
|
@@ -174,6 +189,6 @@ function ProductNVersion(props) {
|
|
|
174
189
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
175
190
|
React.createElement("label", { htmlFor: "version-dropdown" },
|
|
176
191
|
React.createElement(Trans, null, "Version")),
|
|
177
|
-
React.createElement(Dropdown, { className: "open-case-version", id: "version-dropdown", placeholder: t(`Select a version`), selectedItem: toOption(selectedVersionLocal), list: toOptions(versions), title: t(`Select a version`), isInValid: checkIfVersionIsInvalid, disabled: isVersionUpdating || (allProducts.isFetching && !allProducts.isError), onChange: onVersionChange, isLoadingList: isVersionUpdating, "data-tracking-id": "case-details-version-selector" }))))));
|
|
192
|
+
React.createElement(Dropdown, { className: "open-case-version", id: "version-dropdown", placeholder: t(`Select a version`), selectedItem: toOption(selectedVersionLocal), list: toOptions(versions), title: t(`Select a version`), isInValid: checkIfVersionIsInvalid, disabled: isVersionUpdating || (allProducts.isFetching && !allProducts.isError), onChange: onVersionChange, isLoadingList: isVersionUpdating || (isSEProductApiIsDown && versionsDetails.isFetching), "data-tracking-id": "case-details-version-selector" }))))));
|
|
178
193
|
}
|
|
179
194
|
export default ProductNVersion;
|
|
@@ -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,
|
|
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 =
|
|
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=
|
|
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 {
|
|
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
|
}
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { RouteComponentProps } from 'react-router';
|
|
3
3
|
import { IRouteUrlParams } from '../../reducers/RouteConstNTypes';
|
|
4
4
|
interface IProps {
|
|
5
|
-
isDropdownSelected?: boolean;
|
|
6
5
|
setIsDropdownSelected?: (flag: boolean) => void;
|
|
7
6
|
routeProps: RouteComponentProps<IRouteUrlParams>;
|
|
8
7
|
loadTCOnChange?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMrF,UAAU,MAAM;IACZ,
|
|
1
|
+
{"version":3,"file":"AllProductsSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/AllProductsSelector.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAsD,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAKnD,OAAO,EAAqB,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMrF,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;CAClC;AAQD;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,4EA+IvB,CAAC;AAGH,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -9,7 +9,7 @@ import React, { forwardRef, useContext, useEffect, useState } from 'react';
|
|
|
9
9
|
import { Trans, useTranslation } from 'react-i18next';
|
|
10
10
|
import { useCaseDispatch, useCaseSelector } from '../../context/CaseContext';
|
|
11
11
|
import { TCStateContext } from '../../context/TopContentContext';
|
|
12
|
-
import {
|
|
12
|
+
import { setCaseDetails } from '../../reducers/CaseReducer';
|
|
13
13
|
import RouteUtils from '../../utils/routeUtils';
|
|
14
14
|
import OpenCaseIssue from '../CaseInformation/OpenCaseIssue';
|
|
15
15
|
import Suggestions from '../Suggestions/Suggestions';
|
|
@@ -19,13 +19,6 @@ const defaultProps = {
|
|
|
19
19
|
showTCAfterButtonClicked: false,
|
|
20
20
|
checkEntitledProduct: false,
|
|
21
21
|
};
|
|
22
|
-
const defaultSelectedProduct = {
|
|
23
|
-
featuredVersion: '',
|
|
24
|
-
product: '',
|
|
25
|
-
versions: [],
|
|
26
|
-
isTopProduct: false,
|
|
27
|
-
isEntitledProduct: true,
|
|
28
|
-
};
|
|
29
22
|
/**
|
|
30
23
|
* Renders a dropdown list to select all products.
|
|
31
24
|
* Manages selected product internally.
|
|
@@ -43,39 +36,21 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
43
36
|
version: state.caseDetails.version,
|
|
44
37
|
contactSSOName: state.caseDetails.contactSSOName,
|
|
45
38
|
}), isEqual);
|
|
46
|
-
const [selectedProductForDropdown, setSelectedProductForDropdown] = useState(
|
|
39
|
+
const [selectedProductForDropdown, setSelectedProductForDropdown] = useState({
|
|
40
|
+
featuredVersion: '',
|
|
41
|
+
product: product,
|
|
42
|
+
name: product,
|
|
43
|
+
versions: [],
|
|
44
|
+
isTopProduct: false,
|
|
45
|
+
isEntitledProduct: true,
|
|
46
|
+
});
|
|
47
47
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
48
|
-
const [localProduct, setLocalProduct] = useState('');
|
|
49
48
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
50
49
|
const [showModal, setShowModal] = useState(false);
|
|
51
50
|
const [showModalButton, setShowModalButton] = useState(false);
|
|
52
51
|
const [isProductChanged, setProductChanged] = useState(false);
|
|
53
52
|
const { t } = useTranslation();
|
|
54
53
|
const isEntitledProduct = (_b = find((_a = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, (p) => p.product === product)) === null || _b === void 0 ? void 0 : _b.isEntitledProduct;
|
|
55
|
-
/**
|
|
56
|
-
* Update value in dropdown based on product & version from case details and if Dropdown is Selected
|
|
57
|
-
*/
|
|
58
|
-
useEffect(() => {
|
|
59
|
-
var _a;
|
|
60
|
-
if (allProducts.isFetching || allProducts.isError)
|
|
61
|
-
return;
|
|
62
|
-
if (!props.isDropdownSelected) {
|
|
63
|
-
if (isEmpty(selectedProductForDropdown.product))
|
|
64
|
-
return;
|
|
65
|
-
else
|
|
66
|
-
setSelectedProductForDropdown(defaultSelectedProduct);
|
|
67
|
-
}
|
|
68
|
-
else {
|
|
69
|
-
const caseDetailsProduct = find((_a = allProducts === null || allProducts === void 0 ? void 0 : allProducts.data) === null || _a === void 0 ? void 0 : _a.productsResult, (p) => p.product === product);
|
|
70
|
-
// When the selectedProductForDropdown is not in sync
|
|
71
|
-
if (!isEmpty(caseDetailsProduct)) {
|
|
72
|
-
setSelectedProductForDropdown(caseDetailsProduct);
|
|
73
|
-
}
|
|
74
|
-
else if (isEmpty(caseDetailsProduct) && !isEmpty(selectedProductForDropdown.product)) {
|
|
75
|
-
setSelectedProductForDropdown(defaultSelectedProduct);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}, [allProducts, product, props.isDropdownSelected, selectedProductForDropdown.product, version]);
|
|
79
54
|
useEffect(() => {
|
|
80
55
|
// after TC data is loaded we open the modal
|
|
81
56
|
const showTCPopUpModalOnProductChange = props.loadTCOnChange && !props.showTCAfterButtonClicked && showModal;
|
|
@@ -91,11 +66,7 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
91
66
|
setIsModalOpen((isModalOpen) => !isModalOpen);
|
|
92
67
|
};
|
|
93
68
|
function onProductChange(selectedProduct) {
|
|
94
|
-
|
|
95
|
-
setLocalProduct(selectedProduct.product);
|
|
96
|
-
if (!props.isDropdownSelected) {
|
|
97
|
-
(_a = props.setIsDropdownSelected) === null || _a === void 0 ? void 0 : _a.call(props, true);
|
|
98
|
-
}
|
|
69
|
+
setSelectedProductForDropdown(selectedProduct);
|
|
99
70
|
const newParams = {
|
|
100
71
|
product: selectedProduct.product,
|
|
101
72
|
version: '',
|
|
@@ -106,20 +77,13 @@ const AllProductsSelector = forwardRef((props, ref) => {
|
|
|
106
77
|
}
|
|
107
78
|
}
|
|
108
79
|
function onVersionChange(selectedVersion) {
|
|
109
|
-
setCaseDetails(caseDispatch, { product:
|
|
80
|
+
setCaseDetails(caseDispatch, { product: selectedProductForDropdown.product, version: selectedVersion });
|
|
110
81
|
const newParams = {
|
|
111
82
|
version: selectedVersion,
|
|
112
83
|
};
|
|
113
84
|
RouteUtils.updateQueryParams(props.routeProps, newParams);
|
|
114
85
|
}
|
|
115
86
|
const entitledProducts = filter(allProducts.data.productsResult, (p) => p.isEntitledProduct);
|
|
116
|
-
useEffect(() => {
|
|
117
|
-
if (!isEmpty(product)) {
|
|
118
|
-
product !== localProduct && setLocalProduct(product);
|
|
119
|
-
getVersionsDetails(caseDispatch, product);
|
|
120
|
-
}
|
|
121
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
122
|
-
}, [caseDispatch, product]);
|
|
123
87
|
return (React.createElement(React.Fragment, null,
|
|
124
88
|
React.createElement("div", { className: "form-group product-selector-wrapper" },
|
|
125
89
|
React.createElement("div", { className: "case-details-summary" },
|
|
@@ -3,7 +3,6 @@ interface IProps {
|
|
|
3
3
|
products: Partial<ISEProduct>[];
|
|
4
4
|
onProductChange: (product: Partial<ISEProduct>) => any;
|
|
5
5
|
selectedProduct: Partial<ISEProduct>;
|
|
6
|
-
onVersionChange: (version: string) => any;
|
|
7
6
|
isNextBtnClickedToShowValidationError: boolean;
|
|
8
7
|
isCaseCreate: boolean;
|
|
9
8
|
}
|
|
@@ -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;AAOpE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,
|
|
1
|
+
{"version":3,"file":"NewProductDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/NewProductDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAOpE,UAAU,MAAM;IACZ,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,qCAAqC,EAAE,OAAO,CAAC;IAC/C,YAAY,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,0BAA0B,UAAW,MAAM,gBA0GvD,CAAC"}
|
|
@@ -6,15 +6,9 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
export const NewProductDropdownSelector = (props) => {
|
|
7
7
|
const { t } = useTranslation();
|
|
8
8
|
const [isOpen, setIsOpen] = useState(false);
|
|
9
|
-
const [selected, setSelected] = useState(
|
|
9
|
+
const [selected, setSelected] = useState(props.selectedProduct.name);
|
|
10
10
|
const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
|
|
11
11
|
const { globalMetadataState: { allProducts }, } = useContext(GlobalMetadataStateContext);
|
|
12
|
-
useEffect(() => {
|
|
13
|
-
if (props.selectedProduct) {
|
|
14
|
-
setSelected(props.selectedProduct.name);
|
|
15
|
-
}
|
|
16
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17
|
-
}, [props.selectedProduct]);
|
|
18
12
|
useEffect(() => {
|
|
19
13
|
setShowValidationLocal(props.isNextBtnClickedToShowValidationError);
|
|
20
14
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -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,
|
|
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"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
-
});
|
|
9
|
-
};
|
|
10
1
|
import { Select, SelectGroup, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
11
2
|
import { GlobalMetadataStateContext } from '@rh-support/react-context';
|
|
12
3
|
import { getUniqueSortedVersions } from '@rh-support/utils';
|
|
@@ -23,6 +14,7 @@ export const NewProductVersionSelector = (props) => {
|
|
|
23
14
|
const [selected, setSelected] = useState('');
|
|
24
15
|
const [selectVersionOptions, setSelectVersionOptions] = React.useState([]);
|
|
25
16
|
const [showValidationLocal, setShowValidationLocal] = useState(props.isNextBtnClickedToShowValidationError);
|
|
17
|
+
const [isSEProductApiIsDown, setIsSEProductApiIsDown] = useState(false);
|
|
26
18
|
const caseDispatch = useCaseDispatch();
|
|
27
19
|
const { versionsDetails } = useCaseSelector((state) => ({
|
|
28
20
|
versionsDetails: state.versionsDetails,
|
|
@@ -32,39 +24,58 @@ export const NewProductVersionSelector = (props) => {
|
|
|
32
24
|
setShowValidationLocal(props.isNextBtnClickedToShowValidationError);
|
|
33
25
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
34
26
|
}, [props.isNextBtnClickedToShowValidationError]);
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
if (isEmpty(props.selectedProduct)) {
|
|
37
|
-
setSelected('');
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
setSelected(props.versionState);
|
|
41
|
-
}
|
|
42
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
43
|
-
}, [props.selectedProduct]);
|
|
44
27
|
// when user selects a product, we need to fetch versions
|
|
45
28
|
useEffect(() => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
29
|
+
var _a;
|
|
30
|
+
if (isEmpty((_a = props.selectedProduct) === null || _a === void 0 ? void 0 : _a.name))
|
|
31
|
+
return;
|
|
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;
|
|
37
|
+
// if versions array has one value set that value as selected
|
|
38
|
+
if (productVersions.length === 1) {
|
|
39
|
+
props.onVersionChange(productVersions[0]);
|
|
40
|
+
setSelected(productVersions[0]);
|
|
58
41
|
}
|
|
59
42
|
else {
|
|
60
|
-
|
|
43
|
+
setSelected('');
|
|
61
44
|
}
|
|
62
|
-
|
|
45
|
+
const versionArray = props.selectedProduct.versions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
|
|
46
|
+
setSelectVersionOptions(versionArray);
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
setSelected('');
|
|
50
|
+
setIsSEProductApiIsDown(true);
|
|
51
|
+
}
|
|
52
|
+
const getVersions = () => getVersionsDetails(caseDispatch, props.selectedProduct.name);
|
|
53
|
+
// call sfdc version api version flags that is used in severity and submit components
|
|
63
54
|
getVersions();
|
|
64
55
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
65
56
|
}, [props.selectedProduct]);
|
|
57
|
+
// We have version that comes from url
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (!props.selectedProduct.name)
|
|
60
|
+
return;
|
|
61
|
+
const productObj = getProductObj(allProducts.data.productsResult, props.selectedProduct.name);
|
|
62
|
+
if (productObj.versions) {
|
|
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 })));
|
|
67
|
+
setSelectVersionOptions(versionArray);
|
|
68
|
+
setSelected(props.versionState);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
setIsSEProductApiIsDown(true);
|
|
72
|
+
}
|
|
73
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
74
|
+
}, [props.versionState]);
|
|
66
75
|
// observe when fetched versions are available
|
|
67
76
|
useEffect(() => {
|
|
77
|
+
if (!isSEProductApiIsDown)
|
|
78
|
+
return;
|
|
68
79
|
const fetchedVersions = versionsDetails.data.map(({ name }) => name);
|
|
69
80
|
// if versions array has one value set that value as selected
|
|
70
81
|
if (fetchedVersions.length === 1) {
|
|
@@ -73,11 +84,11 @@ export const NewProductVersionSelector = (props) => {
|
|
|
73
84
|
}
|
|
74
85
|
const productObj = getProductObj(allProducts.data.productsResult, props.selectedProduct.name);
|
|
75
86
|
const sfdcVersions = getUniqueSortedVersions(fetchedVersions);
|
|
76
|
-
const productVersions = (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions) ? sfdcVersions.
|
|
87
|
+
const productVersions = (productObj === null || productObj === void 0 ? void 0 : productObj.hasComponentsInsteadOfVersions) ? sfdcVersions.sort() : sfdcVersions;
|
|
77
88
|
const versionArray = productVersions.map((version, index) => (React.createElement(SelectOption, { key: index, value: version })));
|
|
78
89
|
setSelectVersionOptions(versionArray);
|
|
79
90
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
80
|
-
}, [versionsDetails.data]);
|
|
91
|
+
}, [versionsDetails.data, isSEProductApiIsDown]);
|
|
81
92
|
let options = [React.createElement(SelectGroup, { key: "productVersions" }), ...selectVersionOptions];
|
|
82
93
|
const onToggle = (isOpen) => {
|
|
83
94
|
setIsOpen(isOpen);
|
|
@@ -87,19 +98,6 @@ export const NewProductVersionSelector = (props) => {
|
|
|
87
98
|
setSelected(selection);
|
|
88
99
|
setIsOpen(false);
|
|
89
100
|
};
|
|
90
|
-
useEffect(() => {
|
|
91
|
-
const versionValidator = () => {
|
|
92
|
-
var _a;
|
|
93
|
-
if (!((_a = props.selectedProduct) === null || _a === void 0 ? void 0 : _a.versions))
|
|
94
|
-
return;
|
|
95
|
-
const confirmMatchVersion = props.selectedProduct.versions.find((version) => version === props.versionState);
|
|
96
|
-
if (isEmpty(confirmMatchVersion)) {
|
|
97
|
-
setSelected('');
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
versionValidator();
|
|
101
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
102
|
-
}, [props.versionState]);
|
|
103
101
|
const titleId = 'version-selector';
|
|
104
|
-
return (React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: onToggle, onSelect: onSelect, isOpen: isOpen, placeholderText: t('Select a version'), "aria-labelledby": titleId, selections: selected, validated: isEmpty(selected) && showValidationLocal ? 'error' : 'default', isDisabled: isEmpty(props.selectedProduct.
|
|
102
|
+
return (React.createElement(Select, Object.assign({ variant: SelectVariant.single, onToggle: onToggle, onSelect: onSelect, isOpen: isOpen, placeholderText: t('Select a version'), "aria-labelledby": titleId, selections: selected, validated: isEmpty(selected) && showValidationLocal ? 'error' : 'default', isDisabled: isEmpty(props.selectedProduct.name), "data-tracking-id": "get-support-version-dropdown-selector" }, (isSEProductApiIsDown && versionsDetails.isFetching && { loadingVariant: 'spinner' })), options));
|
|
105
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ProductSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductSelector.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAMlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,MAAM,eAgFpD"}
|
|
@@ -38,7 +38,7 @@ export default function ProductSelector(props) {
|
|
|
38
38
|
React.createElement(AlertMessage, { variant: AlertType.DANGER, className: "pf-u-mt-lg", title: t('There was an error loading products.'), show: allProducts.isError }),
|
|
39
39
|
!allProducts.isFetching && !allProducts.isError && (React.createElement(React.Fragment, null,
|
|
40
40
|
React.createElement("form", null,
|
|
41
|
-
React.createElement(AllProductsSelector, {
|
|
41
|
+
React.createElement(AllProductsSelector, { routeProps: props.routeProps, checkEntitledProduct: isCaseCreate ? true : false, ref: productSelectorRef }),
|
|
42
42
|
product === 'Subscription Watch' && (React.createElement(Alert, { isInline: true, variant: AlertVariant.warning, title: React.createElement(Trans, null,
|
|
43
43
|
' ',
|
|
44
44
|
"If you're having a subscription issue that doesn't relate to",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAiC,MAAM,OAAO,CAAC;AAOtD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AAOD,QAAA,MAAM,8BAA8B,
|
|
1
|
+
{"version":3,"file":"ProductVersionDropdownSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/ProductSelector/ProductVersionDropdownSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,KAAiC,MAAM,OAAO,CAAC;AAOtD,UAAU,MAAO,SAAQ,gBAAgB;IACrC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;IAChC,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,GAAG,CAAC;IACvD,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,GAAG,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACnB;AAOD,QAAA,MAAM,8BAA8B,wEAsClC,CAAC;AAEH,OAAO,EAAE,8BAA8B,EAAE,CAAC"}
|
|
@@ -15,7 +15,7 @@ const ProductVersionDropdownSelector = forwardRef((props, ref) => {
|
|
|
15
15
|
React.createElement(Trans, null, "Product"),
|
|
16
16
|
' ',
|
|
17
17
|
React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")),
|
|
18
|
-
React.createElement(NewProductDropdownSelector, { products: props.products, onProductChange: props.onProductChange, selectedProduct: props.selectedProduct,
|
|
18
|
+
React.createElement(NewProductDropdownSelector, { products: props.products, onProductChange: props.onProductChange, selectedProduct: props.selectedProduct, isNextBtnClickedToShowValidationError: isNextBtnClickedToShowValidationError, isCaseCreate: isCaseCreate })),
|
|
19
19
|
React.createElement("div", { className: "version-selector-wrapper" },
|
|
20
20
|
React.createElement("label", { htmlFor: "version-selector-dropdown-toggle" },
|
|
21
21
|
React.createElement(Trans, null, "Version"),
|
|
@@ -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":"
|
|
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":"
|
|
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":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAuBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Review.d.ts","sourceRoot":"","sources":["../../../../src/components/Review/Review.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAInD,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAuBlE,UAAU,MAAM;IACZ,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;CACpD;AACD,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,MAAM,eAsE3C"}
|
|
@@ -49,7 +49,7 @@ export default function Review(props) {
|
|
|
49
49
|
React.createElement("form", { className: "review-form card card-light push-bottom" },
|
|
50
50
|
React.createElement(AccountSelector, null),
|
|
51
51
|
React.createElement(OwnerSelector, null),
|
|
52
|
-
React.createElement(AllProductsSelector, {
|
|
52
|
+
React.createElement(AllProductsSelector, { routeProps: props.routeProps, loadTCOnChange: true, showTCAfterButtonClicked: true, checkEntitledProduct: true }),
|
|
53
53
|
React.createElement(OpenShiftClusterId, null),
|
|
54
54
|
React.createElement(Hostname, null),
|
|
55
55
|
React.createElement(Description, { inlineEditable: true, hideSaveCancel: true }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAkCA,MAAM,CAAC,OAAO,UAAU,UAAU,
|
|
1
|
+
{"version":3,"file":"SubmitCase.d.ts","sourceRoot":"","sources":["../../../../src/components/SubmitCase/SubmitCase.tsx"],"names":[],"mappings":"AAkCA,MAAM,CAAC,OAAO,UAAU,UAAU,gBAkTjC"}
|
|
@@ -26,7 +26,7 @@ import { AttachmentStateContext } from '../shared/fileUpload/reducer/AttachmentR
|
|
|
26
26
|
import Suggestions from '../Suggestions/Suggestions';
|
|
27
27
|
export default function SubmitCase() {
|
|
28
28
|
var _a;
|
|
29
|
-
const { entitlementSla, severity, caseNumber, caseType, version, versionsDetails, addNotifiedUserError, isCreatingCase, caseCreationError, caseCreationErrorMessage, selectedAccountDetails, product, } = useCaseSelector((state) => ({
|
|
29
|
+
const { entitlementSla, severity, caseNumber, caseType, version, versionsDetails, addNotifiedUserError, isCreatingCase, caseCreationError, caseCreationErrorMessage, selectedAccountDetails, product, screenSessionRequested, } = useCaseSelector((state) => ({
|
|
30
30
|
entitlementSla: state.caseDetails.entitlementSla,
|
|
31
31
|
severity: state.caseDetails.severity,
|
|
32
32
|
caseNumber: state.caseDetails.caseNumber,
|
|
@@ -39,17 +39,15 @@ export default function SubmitCase() {
|
|
|
39
39
|
caseCreationErrorMessage: state.caseCreationErrorMessage,
|
|
40
40
|
selectedAccountDetails: state.selectedAccountDetails,
|
|
41
41
|
product: state.caseDetails.product,
|
|
42
|
+
screenSessionRequested: state.caseDetails.screenSessionRequested,
|
|
42
43
|
}), isEqual);
|
|
43
44
|
const isIdea = caseType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
44
|
-
const { isFetching: isPostingComment } = useFetch(publicApi.kase.postComment, {
|
|
45
|
-
propgateErrors: true,
|
|
46
|
-
});
|
|
47
45
|
const { topContentState: { topContent }, } = useContext(TCStateContext);
|
|
48
46
|
const { rulesState } = useContext(RulesStateContext);
|
|
49
47
|
const { clusterRecommendationsState: { clusterRecommendations }, } = useContext(ClusterRecommendationsContext);
|
|
50
48
|
const { attachmentState } = useContext(AttachmentStateContext);
|
|
51
49
|
const [isRemoteRiderBannerVisible, setIsRemoteRiderBannerVisible] = useState(true);
|
|
52
|
-
const { globalMetadataState: { loggedInUser, loggedInUsersAccount, pcmConfig }, } = useContext(GlobalMetadataStateContext);
|
|
50
|
+
const { globalMetadataState: { loggedInUser, loggedInUsersAccount, pcmConfig, loggedInUserRights }, } = useContext(GlobalMetadataStateContext);
|
|
53
51
|
const getBusinessHours = useFetch(publicApi.businessHours.getBusinessHours);
|
|
54
52
|
const { t } = useTranslation();
|
|
55
53
|
const { globalMetadataState: { allProducts }, } = useGlobalStateContext();
|
|
@@ -83,7 +81,7 @@ export default function SubmitCase() {
|
|
|
83
81
|
showRemoteRiderTermsInline &&
|
|
84
82
|
!selectedAccountDetails.data.remoteSessionTermsAcked &&
|
|
85
83
|
!isIdea;
|
|
86
|
-
const viewDisabled =
|
|
84
|
+
const viewDisabled = isEmpty(attachmentState.caseFiles.selectedLocalFiles)
|
|
87
85
|
? false
|
|
88
86
|
: attachmentState.caseFiles.selectedLocalFiles.every((localFile) => !isUploadedAndAnalyzed(localFile));
|
|
89
87
|
const isNotAnIdea = caseType !== PreviousCaseTypes.FEATURE_ENHANCEMENT;
|
|
@@ -94,7 +92,10 @@ export default function SubmitCase() {
|
|
|
94
92
|
React.createElement(AlertMessage, { className: "pf-u-mt-lg", variant: AlertType.DANGER, show: caseCreationError, title: t("Sorry, we're experiencing an error"), isInline: true },
|
|
95
93
|
React.createElement(React.Fragment, null, caseCreationErrorMessage)),
|
|
96
94
|
!isCreatingCase && !caseCreationError && (React.createElement(React.Fragment, null,
|
|
97
|
-
!isESSCustomer &&
|
|
95
|
+
!isESSCustomer &&
|
|
96
|
+
!screenSessionRequested &&
|
|
97
|
+
showRemoteRiderBanner &&
|
|
98
|
+
!loggedInUser.data.isInternal && (React.createElement(RemoteRiderBanner, { onConfirm: onRemoteRiderConfirm, onClose: onRemoteRiderClose, caseNumber: caseNumber, isSecureSupport: loggedInUsersAccount.data.secureSupport, loggedInUserRights: loggedInUserRights })),
|
|
98
99
|
React.createElement("div", { className: "submit-case-header-container" },
|
|
99
100
|
React.createElement("p", { className: "kicker kicker-sm pf-u-mb-sm" }, !isEmpty(RouteUtils.seBasePath) &&
|
|
100
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,
|
|
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/
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
70
|
-
"@rh-support/react-context": "2.1.
|
|
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.
|
|
73
|
-
"@rh-support/utils": "2.1.
|
|
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": "
|
|
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"}
|